From eaf12b50c83c01532954795e8d3a56fdf76aa95f Mon Sep 17 00:00:00 2001 From: Jonas Birme Date: Sat, 28 Jan 2017 11:23:45 +0100 Subject: [PATCH] 0.4.5 --- dist/dashvalidator.js | 28 +++++-- dist/dashvalidator.min.js | 75 +++++++++---------- docs/index.html | 2 +- docs/index.js.html | 10 ++- docs/module-dash-validator-DashValidator.html | 41 +++++++--- docs/module-dash-validator.html | 4 +- package.json | 2 +- 7 files changed, 98 insertions(+), 64 deletions(-) diff --git a/dist/dashvalidator.js b/dist/dashvalidator.js index 3da273b..cc074dc 100644 --- a/dist/dashvalidator.js +++ b/dist/dashvalidator.js @@ -111,6 +111,9 @@ DashValidator.prototype.verifyTimestamps = function verifyTimestamps(allowedDiff if (Math.abs(timeAtHead - d) > diffCriteria) { result.clock = "BAD"; result.clockOffset = Math.abs(timeAtHead - d); + } else { + result.clock = "OK"; + result.clockOffset = Math.abs(timeAtHead - d); } } resolve(result); @@ -203,9 +206,10 @@ DashValidator.prototype.verifyAllSegments = function verifyAllSegments(verifyFn, * streaming * * @param {number} iterations Number of iterations to test + * @param {Function} _optIterator For testing purposes * @returns {Promise} */ -DashValidator.prototype.validateDynamicManifest = function validateDynamicManifest(iterations) { +DashValidator.prototype.validateDynamicManifest = function validateDynamicManifest(iterations, _optIterator) { var _this5 = this; return new Promise(function (resolve, reject) { @@ -221,7 +225,7 @@ DashValidator.prototype.validateDynamicManifest = function validateDynamicManife }); }); }); - }).then(function (result) { + }, _optIterator).then(function (result) { resolve(result); }).catch(reject); }); @@ -638,8 +642,9 @@ var DashValidatorRunner = function constructor(mpd, headers, updateTime) { * * @param {number} iterations Number of iterations to run * @param {Function} mpdUpdateFn Function that is called to update manifest + * @param {Function} _optIterator Used for testing purposes */ -DashValidatorRunner.prototype.start = function start(iterations, mpdUpdateFn) { +DashValidatorRunner.prototype.start = function start(iterations, mpdUpdateFn, _optIterator) { var _this2 = this; return new Promise(function (resolve, reject) { @@ -682,6 +687,9 @@ DashValidatorRunner.prototype.start = function start(iterations, mpdUpdateFn) { } setTimeout(timerFn.bind(_this2), _this2.updateTime * 1000); + if (_optIterator) { + _optIterator(); + } }); }; @@ -741,6 +749,12 @@ function hasValidPlayhead(mpd) { function hasValidHeaders(lastHeaders, currentHeaders) { var lastDate = new Date(lastHeaders["date"]); var currentDate = new Date(currentHeaders["date"]); + var lastModifiedDate = new Date(lastHeaders["last-modified"]); + var currentModifiedDate = new Date(currentHeaders["last-modified"]); + + if (lastModifiedDate >= currentModifiedDate) { + return false; + } if (lastDate >= currentDate) { return false; @@ -20360,7 +20374,7 @@ module.exports={ "spec": ">=6.0.0 <7.0.0", "type": "range" }, - "/Users/jobi/Projects/eyevinn-labs/src/dash-validator/node_modules/browserify-sign" + "/Users/deejaybee/Code/eyevinn/dash-validator-js/node_modules/browserify-sign" ] ], "_from": "elliptic@>=6.0.0 <7.0.0", @@ -20395,7 +20409,7 @@ module.exports={ "_shasum": "e4c81e0829cf0a65ab70e998b8232723b5c1bc48", "_shrinkwrap": null, "_spec": "elliptic@^6.0.0", - "_where": "/Users/jobi/Projects/eyevinn-labs/src/dash-validator/node_modules/browserify-sign", + "_where": "/Users/deejaybee/Code/eyevinn/dash-validator-js/node_modules/browserify-sign", "author": { "name": "Fedor Indutny", "email": "fedor@indutny.com" @@ -58968,7 +58982,7 @@ module.exports={ "spec": ">=2.3.0 <2.4.0", "type": "range" }, - "/Users/jobi/Projects/eyevinn-labs/src/dash-validator/node_modules/request" + "/Users/deejaybee/Code/eyevinn/dash-validator-js/node_modules/request" ] ], "_from": "tough-cookie@>=2.3.0 <2.4.0", @@ -59004,7 +59018,7 @@ module.exports={ "_shasum": "f081f76e4c85720e6c37a5faced737150d84072a", "_shrinkwrap": null, "_spec": "tough-cookie@~2.3.0", - "_where": "/Users/jobi/Projects/eyevinn-labs/src/dash-validator/node_modules/request", + "_where": "/Users/deejaybee/Code/eyevinn/dash-validator-js/node_modules/request", "author": { "name": "Jeremy Stashewsky", "email": "jstashewsky@salesforce.com" diff --git a/dist/dashvalidator.min.js b/dist/dashvalidator.min.js index f9c89ec..c97b8b7 100644 --- a/dist/dashvalidator.min.js +++ b/dist/dashvalidator.min.js @@ -1,41 +1,34 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;odiffCriteria){result.clock="BAD";result.clockOffset=Math.abs(timeAtHead-d)}}resolve(result)})};DashValidator.prototype.verifySegments=function verifySegments(verifyFn,segments,doDownload){var _this3=this;return new Promise(function(resolve,reject){var failed=[];var ok=[];var it=util.iteratorFromArray(segments);var base=_this3._base;function checkSegment(doneCb){var iter=it.next();if(iter.done){doneCb()}else{(function(){var segmentUrl=iter.value;verifySegment(verifyFn||defaultVerifyFn,base+segmentUrl,doDownload).then(function(result){if(result.ok){ok.push({uri:segmentUrl})}else{failed.push({uri:segmentUrl,reason:result.reason,headers:result.headers})}util.sleep(50);checkSegment(doneCb)}).catch(function(error){console.error(error)})})()}}checkSegment(function(){resolve({failed:failed,ok:ok})})})};DashValidator.prototype.verifyManifest=function verifyManifest(verifyFn){var _this4=this;return new Promise(function(resolve,reject){var verify=verifyFn||defaultManifestVerifyFn;var result={};result.ok=verify(_this4._manifestHeaders,_this4._manifest.type);result.headers=_this4._manifestHeaders;resolve(result)})};DashValidator.prototype.verifyAllSegments=function verifyAllSegments(verifyFn,doDownload){var segments=this._manifest.segments;return this.verifySegments(verifyFn,segments,doDownload)};DashValidator.prototype.validateDynamicManifest=function validateDynamicManifest(iterations){var _this5=this;return new Promise(function(resolve,reject){_this5._runner.start(iterations,function(){return new Promise(function(resolveUpdateMpd){util.requestXml(_this5._src).then(function(resp){var parser=new DashParser;parser.parse(resp.xml).then(function(manifest){_this5._manifest=manifest;_this5._runner.updateMpd(_this5._manifest,resp.headers);resolveUpdateMpd()})})})}).then(function(result){resolve(result)}).catch(reject)})};DashValidator.prototype.on=function on(eventName,fn){if(["invalidplayhead","invalidheaders","checking"].indexOf(eventName)!=-1){this._runner.on(eventName,fn)}};DashValidator.prototype.duration=function duration(){return this._manifest.totalDuration};DashValidator.prototype.segmentUrls=function segmentUrls(){return this._manifest.segments};DashValidator.prototype.isLive=function isLive(){return this._manifest.type==="dynamic"};function defaultVerifyFn(headers){var headersOk=true;if(typeof headers["cache-control"]==="undefined"||headers["access-control-expose-headers"].split(",").indexOf("Date")==-1||headers["access-control-allow-headers"].split(",").indexOf("origin")==-1){headersOk=false}return headersOk}function defaultManifestVerifyFn(headers,type){if(type=="dynamic"){if(!headers["cache-control"]){return false}var m=headers["cache-control"].match(/max-age=(\d+)/);if(!m){return false}if(m[1]>10){return false}}return true}function verifySegment(verifyFn,segmentUrl,doDownload){return new Promise(function(resolve,reject){var result={};var reqFn=void 0;if(!doDownload){reqFn=util.requestHeaders}else{reqFn=util.requestCacheFill}reqFn(segmentUrl).then(function(headers){result.ok=verifyFn(headers);result.headers=headers;resolve(result)}).catch(function(err){result.ok=false;result.reason=err;resolve(result)})})}module.exports=DashValidator},{"./lib/dash_parser.js":3,"./lib/dash_validator_runner.js":6,"./lib/util.js":7}],2:[function(require,module,exports){"use strict";var util=require("./util.js");var DashManifest=function constructor(internalMpd){var self={mpd:internalMpd,get type(){return this.mpd.type},get availabilityStartTime(){return util.dateInSeconds(this.mpd.availabilityStartTime)},get publishTime(){return util.dateInSeconds(this.mpd.publishTime)},get timeShiftBufferDepth(){return util.durationInSeconds(this.mpd.timeShiftBufferDepth)},get periods(){return this.mpd.periods},get segments(){var segmentUrls=[];defaultFilterFn=function defaultFilterFn(as){return as.mimeType=="video/mp4"};filterFn=defaultFilterFn;this.mpd.periods.forEach(function(p){p.adaptationSets.filter(filterFn).forEach(function(as){as.representations.forEach(function(r){r.segments.forEach(function(seg){segmentUrls.push(p.baseUrl+seg.uri)})})})});return segmentUrls},get totalDuration(){var duration=0;if(this.mpd.type==="dynamic"){return undefined}this.mpd.periods.forEach(function(p){p.adaptationSets.filter(function(as){return as.mimeType=="video/mp4"}).forEach(function(as){duration+=as.representations[0].segments.map(function(s){return s.durationInSeconds}).reduce(function(total,value){return total+value})})});return duration},get timeAtHead(){var lastPeriod=this.mpd.periods[this.mpd.periods.length-1];var as=lastPeriod.adaptationSets.filter(function(as){return as.mimeType=="video/mp4"})[0];var segments=as.representations[0].segments;var lastSegment=segments[segments.length-1];return lastSegment.end*1e3}};return self};module.exports=DashManifest},{"./util.js":7}],3:[function(require,module,exports){"use strict";var DOMParser=require("xmldom").DOMParser;var DashManifest=require("./dash_manifest.js");var DashSegmentList=require("./dash_segmentlist.js");var DashRepresentation=require("./dash_representation.js");var util=require("./util.js");function parsePeriods(xml){var periods=[];var children=util.findChildren(xml,"Period");for(var i=0;i0){var segmentTemplateXml=segmentTemplateXmlChildren[0];var timescale=segmentTemplateXml.getAttribute("timescale");var media=segmentTemplateXml.getAttribute("media");var segmentXmlChildren=util.findChildren(segmentTemplateXml,"SegmentTimeline");var segmentListXmlChildren=util.findChildren(segmentXmlChildren[0],"S");var timeline=[];for(var j=0;j=iterations){resolve(_this.result)}else{setTimeout(timerFn.bind(_this),_this.updateTime*1e3)}})}setTimeout(timerFn.bind(_this2),_this2.updateTime*1e3)})};DashValidatorRunner.prototype.updateMpd=function updateMpd(mpd,headers){this.mpd=mpd;this.headers=headers};DashValidatorRunner.prototype.on=function on(runnerEvent,fn){var listener={eventName:runnerEvent,fn:fn};this.listeners.push(listener)};DashValidatorRunner.prototype.trigger=function trigger(runnerEvent){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}this.listeners.filter(function(l){return l.eventName==runnerEvent}).forEach(function(l){if(l.fn){if(args.length==1){l.fn(args[0])}else{l.fn(args)}}})};function hasValidPlayhead(mpd){var now=Date.now();if(Math.abs(mpd.timeAtHead-now)>2e4){return false}return true}function hasValidHeaders(lastHeaders,currentHeaders){var lastDate=new Date(lastHeaders["date"]);var currentDate=new Date(currentHeaders["date"]);if(lastDate>=currentDate){return false}return true}module.exports=DashValidatorRunner},{"./util.js":7}],7:[function(require,module,exports){"use strict";var request=require("request");var URL=require("url");var http=require("http");var fs=require("fs");var dateInSeconds=function dateInSeconds(dateString){if(!dateString)return null;var result=Date.parse(dateString);return!isNaN(result)?Math.floor(result/1e3):null};var durationInSeconds=function durationInSeconds(durationString){if(!durationString)return null;var re="^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?"+"(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$";var matches=new RegExp(re).exec(durationString);if(!matches){return null}var years=Number(matches[1]||null);var months=Number(matches[2]||null);var days=Number(matches[3]||null);var hours=Number(matches[4]||null);var minutes=Number(matches[5]||null);var seconds=Number(matches[6]||null);var d=60*60*24*365*years+60*60*24*30*months+60*60*24*days+60*60*hours+60*minutes+seconds;return isFinite(d)?d:null};var findChildren=function findChildren(elem,name){var children=Array.prototype.filter.call(elem.childNodes,function(child){return child.tagName===name});return children};var toNumber=function toNumber(xmlattr){if(typeof xmlattr!=="undefined"&&xmlattr!==""){return Number(xmlattr)}return undefined};var getBaseUrl=function getBaseUrl(uri){var sp=uri.split("/");var baseUrl=sp.slice(0,-1).join("/");return baseUrl};var requestXml=function requestXml(uri){return new Promise(function(resolve,reject){request(uri,function(error,response,body){if(!error&&response.statusCode==200){resolve({xml:body,headers:response.headers})}reject(error)})})};var requestCacheFill=function requestCacheFill(uri){return new Promise(function(resolve,reject){var headers=void 0;var statusCode=void 0;var f=fs.createWriteStream("/dev/null");f.on("error",function(error){reject(error)});request.get(uri).on("response",function(response){headers=response.headers;statusCode=response.statusCode;if(statusCode!=200){reject("HTTP error "+statusCode)}}).pipe(f).on("error",function(error){reject(error)}).on("finish",function(){resolve(headers)})})};var requestHeaders=function requestHeaders(uri){return new Promise(function(resolve,reject){var url=URL.parse(uri);var options={method:"HEAD",host:url.host,path:url.path};var req=http.request(options,function(response){if(response.statusCode==200){resolve(response.headers)}reject(response.statusCode)});req.end()})};var iteratorFromArray=function iteratorFromArray(arr){var nextIndex=0;return{next:function next(){return nextIndex1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}if(args.length>0){console.log(str,args)}else{console.log(str)}};module.exports={durationInSeconds:durationInSeconds,dateInSeconds:dateInSeconds,findChildren:findChildren,toNumber:toNumber,requestXml:requestXml,requestHeaders:requestHeaders,requestCacheFill:requestCacheFill,iteratorFromArray:iteratorFromArray,getBaseUrl:getBaseUrl,sleep:sleep,log:log}},{fs:64,http:272,request:226,url:288}],8:[function(require,module,exports){var asn1=exports;asn1.bignum=require("bn.js");asn1.define=require("./asn1/api").define;asn1.base=require("./asn1/base");asn1.constants=require("./asn1/constants");asn1.decoders=require("./asn1/decoders");asn1.encoders=require("./asn1/encoders")},{"./asn1/api":9,"./asn1/base":11,"./asn1/constants":15,"./asn1/decoders":17,"./asn1/encoders":20,"bn.js":35}],9:[function(require,module,exports){var asn1=require("../asn1");var inherits=require("inherits");var api=exports;api.define=function define(name,body){return new Entity(name,body)};function Entity(name,body){this.name=name;this.body=body;this.decoders={};this.encoders={}}Entity.prototype._createNamed=function createNamed(base){var named;try{named=require("vm").runInThisContext("(function "+this.name+"(entity) {\n"+" this._initNamed(entity);\n"+"})")}catch(e){named=function(entity){this._initNamed(entity)}}inherits(named,base);named.prototype._initNamed=function initnamed(entity){base.call(this,entity)};return new named(this)};Entity.prototype._getDecoder=function _getDecoder(enc){enc=enc||"der";if(!this.decoders.hasOwnProperty(enc))this.decoders[enc]=this._createNamed(asn1.decoders[enc]);return this.decoders[enc]};Entity.prototype.decode=function decode(data,enc,options){return this._getDecoder(enc).decode(data,options)};Entity.prototype._getEncoder=function _getEncoder(enc){enc=enc||"der";if(!this.encoders.hasOwnProperty(enc))this.encoders[enc]=this._createNamed(asn1.encoders[enc]);return this.encoders[enc]};Entity.prototype.encode=function encode(data,enc,reporter){return this._getEncoder(enc).encode(data,reporter)}},{"../asn1":8,inherits:152,vm:300}],10:[function(require,module,exports){var inherits=require("inherits");var Reporter=require("../base").Reporter;var Buffer=require("buffer").Buffer;function DecoderBuffer(base,options){Reporter.call(this,options);if(!Buffer.isBuffer(base)){this.error("Input not Buffer");return}this.base=base;this.offset=0;this.length=base.length}inherits(DecoderBuffer,Reporter);exports.DecoderBuffer=DecoderBuffer;DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:Reporter.prototype.save.call(this)}};DecoderBuffer.prototype.restore=function restore(save){var res=new DecoderBuffer(this.base);res.offset=save.offset;res.length=this.offset;this.offset=save.offset;Reporter.prototype.restore.call(this,save.reporter);return res};DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length};DecoderBuffer.prototype.readUInt8=function readUInt8(fail){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(fail||"DecoderBuffer overrun")};DecoderBuffer.prototype.skip=function skip(bytes,fail){if(!(this.offset+bytes<=this.length))return this.error(fail||"DecoderBuffer overrun");var res=new DecoderBuffer(this.base);res._reporterState=this._reporterState;res.offset=this.offset;res.length=this.offset+bytes;this.offset+=bytes;return res};DecoderBuffer.prototype.raw=function raw(save){return this.base.slice(save?save.offset:this.offset,this.length)};function EncoderBuffer(value,reporter){if(Array.isArray(value)){this.length=0;this.value=value.map(function(item){if(!(item instanceof EncoderBuffer))item=new EncoderBuffer(item,reporter);this.length+=item.length;return item},this)}else if(typeof value==="number"){if(!(0<=value&&value<=255))return reporter.error("non-byte EncoderBuffer value");this.value=value;this.length=1}else if(typeof value==="string"){this.value=value;this.length=Buffer.byteLength(value)}else if(Buffer.isBuffer(value)){this.value=value;this.length=value.length}else{return reporter.error("Unsupported type: "+typeof value)}}exports.EncoderBuffer=EncoderBuffer;EncoderBuffer.prototype.join=function join(out,offset){if(!out)out=new Buffer(this.length);if(!offset)offset=0;if(this.length===0)return out;if(Array.isArray(this.value)){this.value.forEach(function(item){item.join(out,offset);offset+=item.length})}else{if(typeof this.value==="number")out[offset]=this.value;else if(typeof this.value==="string")out.write(this.value,offset);else if(Buffer.isBuffer(this.value))this.value.copy(out,offset);offset+=this.length}return out}},{"../base":11,buffer:67,inherits:152}],11:[function(require,module,exports){var base=exports;base.Reporter=require("./reporter").Reporter;base.DecoderBuffer=require("./buffer").DecoderBuffer;base.EncoderBuffer=require("./buffer").EncoderBuffer;base.Node=require("./node")},{"./buffer":10,"./node":12,"./reporter":13}],12:[function(require,module,exports){var Reporter=require("../base").Reporter;var EncoderBuffer=require("../base").EncoderBuffer;var DecoderBuffer=require("../base").DecoderBuffer;var assert=require("minimalistic-assert");var tags=["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"];var methods=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(tags);var overrided=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Node(enc,parent){var state={};this._baseState=state;state.enc=enc;state.parent=parent||null;state.children=null;state.tag=null;state.args=null;state.reverseArgs=null;state.choice=null;state.optional=false;state.any=false;state.obj=false;state.use=null;state.useDecoder=null;state.key=null;state["default"]=null;state.explicit=null;state.implicit=null;state.contains=null;if(!state.parent){state.children=[];this._wrap()}}module.exports=Node;var stateProps=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){var state=this._baseState;var cstate={};stateProps.forEach(function(prop){cstate[prop]=state[prop]});var res=new this.constructor(cstate.parent);res._baseState=cstate;return res};Node.prototype._wrap=function wrap(){var state=this._baseState;methods.forEach(function(method){this[method]=function _wrappedMethod(){var clone=new this.constructor(this);state.children.push(clone);return clone[method].apply(clone,arguments)}},this)};Node.prototype._init=function init(body){var state=this._baseState;assert(state.parent===null);body.call(this);state.children=state.children.filter(function(child){return child._baseState.parent===this},this);assert.equal(state.children.length,1,"Root node can have only one child")};Node.prototype._useArgs=function useArgs(args){var state=this._baseState;var children=args.filter(function(arg){return arg instanceof this.constructor},this);args=args.filter(function(arg){return!(arg instanceof this.constructor)},this);if(children.length!==0){assert(state.children===null);state.children=children;children.forEach(function(child){child._baseState.parent=this},this)}if(args.length!==0){assert(state.args===null);state.args=args;state.reverseArgs=args.map(function(arg){if(typeof arg!=="object"||arg.constructor!==Object)return arg;var res={};Object.keys(arg).forEach(function(key){if(key==(key|0))key|=0;var value=arg[key];res[value]=key});return res})}};overrided.forEach(function(method){Node.prototype[method]=function _overrided(){var state=this._baseState;throw new Error(method+" not implemented for encoding: "+state.enc)}});tags.forEach(function(tag){Node.prototype[tag]=function _tagMethod(){var state=this._baseState;var args=Array.prototype.slice.call(arguments);assert(state.tag===null);state.tag=tag;this._useArgs(args);return this}});Node.prototype.use=function use(item){assert(item);var state=this._baseState;assert(state.use===null);state.use=item;return this};Node.prototype.optional=function optional(){var state=this._baseState;state.optional=true;return this};Node.prototype.def=function def(val){var state=this._baseState;assert(state["default"]===null);state["default"]=val;state.optional=true;return this};Node.prototype.explicit=function explicit(num){var state=this._baseState;assert(state.explicit===null&&state.implicit===null);state.explicit=num;return this};Node.prototype.implicit=function implicit(num){var state=this._baseState;assert(state.explicit===null&&state.implicit===null);state.implicit=num;return this};Node.prototype.obj=function obj(){var state=this._baseState;var args=Array.prototype.slice.call(arguments);state.obj=true;if(args.length!==0)this._useArgs(args);return this};Node.prototype.key=function key(newKey){var state=this._baseState;assert(state.key===null);state.key=newKey;return this};Node.prototype.any=function any(){var state=this._baseState;state.any=true;return this};Node.prototype.choice=function choice(obj){var state=this._baseState;assert(state.choice===null);state.choice=obj;this._useArgs(Object.keys(obj).map(function(key){return obj[key]}));return this};Node.prototype.contains=function contains(item){var state=this._baseState;assert(state.use===null);state.contains=item;return this};Node.prototype._decode=function decode(input,options){var state=this._baseState;if(state.parent===null)return input.wrapResult(state.children[0]._decode(input,options));var result=state["default"];var present=true;var prevKey=null;if(state.key!==null)prevKey=input.enterKey(state.key);if(state.optional){var tag=null;if(state.explicit!==null)tag=state.explicit;else if(state.implicit!==null)tag=state.implicit;else if(state.tag!==null)tag=state.tag;if(tag===null&&!state.any){var save=input.save();try{if(state.choice===null)this._decodeGeneric(state.tag,input,options);else this._decodeChoice(input,options);present=true}catch(e){present=false}input.restore(save)}else{present=this._peekTag(input,tag,state.any);if(input.isError(present))return present}}var prevObj;if(state.obj&&present)prevObj=input.enterObject();if(present){if(state.explicit!==null){var explicit=this._decodeTag(input,state.explicit);if(input.isError(explicit))return explicit;input=explicit}var start=input.offset;if(state.use===null&&state.choice===null){if(state.any)var save=input.save();var body=this._decodeTag(input,state.implicit!==null?state.implicit:state.tag,state.any);if(input.isError(body))return body;if(state.any)result=input.raw(save);else input=body}if(options&&options.track&&state.tag!==null)options.track(input.path(),start,input.length,"tagged");if(options&&options.track&&state.tag!==null)options.track(input.path(),input.offset,input.length,"content");if(state.any)result=result;else if(state.choice===null)result=this._decodeGeneric(state.tag,input,options);else result=this._decodeChoice(input,options);if(input.isError(result))return result;if(!state.any&&state.choice===null&&state.children!==null){state.children.forEach(function decodeChildren(child){child._decode(input,options)})}if(state.contains&&(state.tag==="octstr"||state.tag==="bitstr")){var data=new DecoderBuffer(result);result=this._getUse(state.contains,input._reporterState.obj)._decode(data,options)}}if(state.obj&&present)result=input.leaveObject(prevObj);if(state.key!==null&&(result!==null||present===true))input.leaveKey(prevKey,state.key,result);else if(prevKey!==null)input.exitKey(prevKey);return result};Node.prototype._decodeGeneric=function decodeGeneric(tag,input,options){var state=this._baseState;if(tag==="seq"||tag==="set")return null;if(tag==="seqof"||tag==="setof")return this._decodeList(input,tag,state.args[0],options);else if(/str$/.test(tag))return this._decodeStr(input,tag,options);else if(tag==="objid"&&state.args)return this._decodeObjid(input,state.args[0],state.args[1],options);else if(tag==="objid")return this._decodeObjid(input,null,null,options);else if(tag==="gentime"||tag==="utctime")return this._decodeTime(input,tag,options);else if(tag==="null_")return this._decodeNull(input,options);else if(tag==="bool")return this._decodeBool(input,options);else if(tag==="objDesc")return this._decodeStr(input,tag,options);else if(tag==="int"||tag==="enum")return this._decodeInt(input,state.args&&state.args[0],options);if(state.use!==null){return this._getUse(state.use,input._reporterState.obj)._decode(input,options)}else{return input.error("unknown tag: "+tag)}};Node.prototype._getUse=function _getUse(entity,obj){var state=this._baseState;state.useDecoder=this._use(entity,obj);assert(state.useDecoder._baseState.parent===null);state.useDecoder=state.useDecoder._baseState.children[0];if(state.implicit!==state.useDecoder._baseState.implicit){state.useDecoder=state.useDecoder.clone();state.useDecoder._baseState.implicit=state.implicit}return state.useDecoder};Node.prototype._decodeChoice=function decodeChoice(input,options){var state=this._baseState;var result=null;var match=false;Object.keys(state.choice).some(function(key){var save=input.save();var node=state.choice[key];try{var value=node._decode(input,options);if(input.isError(value))return false;result={type:key,value:value};match=true}catch(e){input.restore(save);return false}return true},this);if(!match)return input.error("Choice not matched");return result};Node.prototype._createEncoderBuffer=function createEncoderBuffer(data){return new EncoderBuffer(data,this.reporter)};Node.prototype._encode=function encode(data,reporter,parent){var state=this._baseState;if(state["default"]!==null&&state["default"]===data)return;var result=this._encodeValue(data,reporter,parent);if(result===undefined)return;if(this._skipDefault(result,reporter,parent))return;return result};Node.prototype._encodeValue=function encode(data,reporter,parent){var state=this._baseState;if(state.parent===null)return state.children[0]._encode(data,reporter||new Reporter);var result=null;this.reporter=reporter;if(state.optional&&data===undefined){if(state["default"]!==null)data=state["default"];else return}var content=null;var primitive=false;if(state.any){result=this._createEncoderBuffer(data)}else if(state.choice){result=this._encodeChoice(data,reporter)}else if(state.contains){content=this._getUse(state.contains,parent)._encode(data,reporter);primitive=true}else if(state.children){content=state.children.map(function(child){if(child._baseState.tag==="null_")return child._encode(null,reporter,data);if(child._baseState.key===null)return reporter.error("Child should have a key");var prevKey=reporter.enterKey(child._baseState.key);if(typeof data!=="object")return reporter.error("Child expected, but input is not object");var res=child._encode(data[child._baseState.key],reporter,data);reporter.leaveKey(prevKey);return res},this).filter(function(child){return child});content=this._createEncoderBuffer(content)}else{if(state.tag==="seqof"||state.tag==="setof"){if(!(state.args&&state.args.length===1))return reporter.error("Too many args for : "+state.tag);if(!Array.isArray(data))return reporter.error("seqof/setof, but data is not Array");var child=this.clone();child._baseState.implicit=null;content=this._createEncoderBuffer(data.map(function(item){var state=this._baseState; -return this._getUse(state.args[0],data)._encode(item,reporter)},child))}else if(state.use!==null){result=this._getUse(state.use,parent)._encode(data,reporter)}else{content=this._encodePrimitive(state.tag,data);primitive=true}}var result;if(!state.any&&state.choice===null){var tag=state.implicit!==null?state.implicit:state.tag;var cls=state.implicit===null?"universal":"context";if(tag===null){if(state.use===null)reporter.error("Tag could be ommited only for .use()")}else{if(state.use===null)result=this._encodeComposite(tag,primitive,cls,content)}}if(state.explicit!==null)result=this._encodeComposite(state.explicit,false,"context",result);return result};Node.prototype._encodeChoice=function encodeChoice(data,reporter){var state=this._baseState;var node=state.choice[data.type];if(!node){assert(false,data.type+" not found in "+JSON.stringify(Object.keys(state.choice)))}return node._encode(data.value,reporter)};Node.prototype._encodePrimitive=function encodePrimitive(tag,data){var state=this._baseState;if(/str$/.test(tag))return this._encodeStr(data,tag);else if(tag==="objid"&&state.args)return this._encodeObjid(data,state.reverseArgs[0],state.args[1]);else if(tag==="objid")return this._encodeObjid(data,null,null);else if(tag==="gentime"||tag==="utctime")return this._encodeTime(data,tag);else if(tag==="null_")return this._encodeNull();else if(tag==="int"||tag==="enum")return this._encodeInt(data,state.args&&state.reverseArgs[0]);else if(tag==="bool")return this._encodeBool(data);else if(tag==="objDesc")return this._encodeStr(data,tag);else throw new Error("Unsupported tag: "+tag)};Node.prototype._isNumstr=function isNumstr(str){return/^[0-9 ]*$/.test(str)};Node.prototype._isPrintstr=function isPrintstr(str){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str)}},{"../base":11,"minimalistic-assert":175}],13:[function(require,module,exports){var inherits=require("inherits");function Reporter(options){this._reporterState={obj:null,path:[],options:options||{},errors:[]}}exports.Reporter=Reporter;Reporter.prototype.isError=function isError(obj){return obj instanceof ReporterError};Reporter.prototype.save=function save(){var state=this._reporterState;return{obj:state.obj,pathLen:state.path.length}};Reporter.prototype.restore=function restore(data){var state=this._reporterState;state.obj=data.obj;state.path=state.path.slice(0,data.pathLen)};Reporter.prototype.enterKey=function enterKey(key){return this._reporterState.path.push(key)};Reporter.prototype.exitKey=function exitKey(index){var state=this._reporterState;state.path=state.path.slice(0,index-1)};Reporter.prototype.leaveKey=function leaveKey(index,key,value){var state=this._reporterState;this.exitKey(index);if(state.obj!==null)state.obj[key]=value};Reporter.prototype.path=function path(){return this._reporterState.path.join("/")};Reporter.prototype.enterObject=function enterObject(){var state=this._reporterState;var prev=state.obj;state.obj={};return prev};Reporter.prototype.leaveObject=function leaveObject(prev){var state=this._reporterState;var now=state.obj;state.obj=prev;return now};Reporter.prototype.error=function error(msg){var err;var state=this._reporterState;var inherited=msg instanceof ReporterError;if(inherited){err=msg}else{err=new ReporterError(state.path.map(function(elem){return"["+JSON.stringify(elem)+"]"}).join(""),msg.message||msg,msg.stack)}if(!state.options.partial)throw err;if(!inherited)state.errors.push(err);return err};Reporter.prototype.wrapResult=function wrapResult(result){var state=this._reporterState;if(!state.options.partial)return result;return{result:this.isError(result)?null:result,errors:state.errors}};function ReporterError(path,msg){this.path=path;this.rethrow(msg)}inherits(ReporterError,Error);ReporterError.prototype.rethrow=function rethrow(msg){this.message=msg+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,ReporterError);if(!this.stack){try{throw new Error(this.message)}catch(e){this.stack=e.stack}}return this}},{inherits:152}],14:[function(require,module,exports){var constants=require("../constants");exports.tagClass={0:"universal",1:"application",2:"context",3:"private"};exports.tagClassByName=constants._reverse(exports.tagClass);exports.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"};exports.tagByName=constants._reverse(exports.tag)},{"../constants":15}],15:[function(require,module,exports){var constants=exports;constants._reverse=function reverse(map){var res={};Object.keys(map).forEach(function(key){if((key|0)==key)key=key|0;var value=map[key];res[value]=key});return res};constants.der=require("./der")},{"./der":14}],16:[function(require,module,exports){var inherits=require("inherits");var asn1=require("../../asn1");var base=asn1.base;var bignum=asn1.bignum;var der=asn1.constants.der;function DERDecoder(entity){this.enc="der";this.name=entity.name;this.entity=entity;this.tree=new DERNode;this.tree._init(entity.body)}module.exports=DERDecoder;DERDecoder.prototype.decode=function decode(data,options){if(!(data instanceof base.DecoderBuffer))data=new base.DecoderBuffer(data,options);return this.tree._decode(data,options)};function DERNode(parent){base.Node.call(this,"der",parent)}inherits(DERNode,base.Node);DERNode.prototype._peekTag=function peekTag(buffer,tag,any){if(buffer.isEmpty())return false;var state=buffer.save();var decodedTag=derDecodeTag(buffer,'Failed to peek tag: "'+tag+'"');if(buffer.isError(decodedTag))return decodedTag;buffer.restore(state);return decodedTag.tag===tag||decodedTag.tagStr===tag||decodedTag.tagStr+"of"===tag||any};DERNode.prototype._decodeTag=function decodeTag(buffer,tag,any){var decodedTag=derDecodeTag(buffer,'Failed to decode tag of "'+tag+'"');if(buffer.isError(decodedTag))return decodedTag;var len=derDecodeLen(buffer,decodedTag.primitive,'Failed to get length of "'+tag+'"');if(buffer.isError(len))return len;if(!any&&decodedTag.tag!==tag&&decodedTag.tagStr!==tag&&decodedTag.tagStr+"of"!==tag){return buffer.error('Failed to match tag: "'+tag+'"')}if(decodedTag.primitive||len!==null)return buffer.skip(len,'Failed to match body of: "'+tag+'"');var state=buffer.save();var res=this._skipUntilEnd(buffer,'Failed to skip indefinite length body: "'+this.tag+'"');if(buffer.isError(res))return res;len=buffer.offset-state.offset;buffer.restore(state);return buffer.skip(len,'Failed to match body of: "'+tag+'"')};DERNode.prototype._skipUntilEnd=function skipUntilEnd(buffer,fail){while(true){var tag=derDecodeTag(buffer,fail);if(buffer.isError(tag))return tag;var len=derDecodeLen(buffer,tag.primitive,fail);if(buffer.isError(len))return len;var res;if(tag.primitive||len!==null)res=buffer.skip(len);else res=this._skipUntilEnd(buffer,fail);if(buffer.isError(res))return res;if(tag.tagStr==="end")break}};DERNode.prototype._decodeList=function decodeList(buffer,tag,decoder,options){var result=[];while(!buffer.isEmpty()){var possibleEnd=this._peekTag(buffer,"end");if(buffer.isError(possibleEnd))return possibleEnd;var res=decoder.decode(buffer,"der",options);if(buffer.isError(res)&&possibleEnd)break;result.push(res)}return result};DERNode.prototype._decodeStr=function decodeStr(buffer,tag){if(tag==="bitstr"){var unused=buffer.readUInt8();if(buffer.isError(unused))return unused;return{unused:unused,data:buffer.raw()}}else if(tag==="bmpstr"){var raw=buffer.raw();if(raw.length%2===1)return buffer.error("Decoding of string type: bmpstr length mismatch");var str="";for(var i=0;i>6];var primitive=(tag&32)===0;if((tag&31)===31){var oct=tag;tag=0;while((oct&128)===128){oct=buf.readUInt8(fail);if(buf.isError(oct))return oct;tag<<=7;tag|=oct&127}}else{tag&=31}var tagStr=der.tag[tag];return{cls:cls,primitive:primitive,tag:tag,tagStr:tagStr}}function derDecodeLen(buf,primitive,fail){var len=buf.readUInt8(fail);if(buf.isError(len))return len;if(!primitive&&len===128)return null;if((len&128)===0){return len}var num=len&127;if(num>4)return buf.error("length octect is too long");len=0;for(var i=0;i=256;i>>=8)lenOctets++;var header=new Buffer(1+1+lenOctets);header[0]=encodedTag;header[1]=128|lenOctets;for(var i=1+lenOctets,j=content.length;j>0;i--,j>>=8)header[i]=j&255;return this._createEncoderBuffer([header,content])};DERNode.prototype._encodeStr=function encodeStr(str,tag){if(tag==="bitstr"){return this._createEncoderBuffer([str.unused|0,str.data])}else if(tag==="bmpstr"){var buf=new Buffer(str.length*2);for(var i=0;i=40)return this.reporter.error("Second objid identifier OOB");id.splice(0,2,id[0]*40+id[1])}var size=0;for(var i=0;i=128;ident>>=7)size++}var objid=new Buffer(size);var offset=objid.length-1;for(var i=id.length-1;i>=0;i--){var ident=id[i];objid[offset--]=ident&127;while((ident>>=7)>0)objid[offset--]=128|ident&127}return this._createEncoderBuffer(objid)};function two(num){if(num<10)return"0"+num;else return num}DERNode.prototype._encodeTime=function encodeTime(time,tag){var str;var date=new Date(time);if(tag==="gentime"){str=[two(date.getFullYear()),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join("")}else if(tag==="utctime"){str=[two(date.getFullYear()%100),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+tag+" time is not supported yet")}return this._encodeStr(str,"octstr")};DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")};DERNode.prototype._encodeInt=function encodeInt(num,values){if(typeof num==="string"){if(!values)return this.reporter.error("String int or enum given, but no values map");if(!values.hasOwnProperty(num)){return this.reporter.error("Values map doesn't contain: "+JSON.stringify(num))}num=values[num]}if(typeof num!=="number"&&!Buffer.isBuffer(num)){var numArray=num.toArray();if(!num.sign&&numArray[0]&128){numArray.unshift(0)}num=new Buffer(numArray)}if(Buffer.isBuffer(num)){var size=num.length;if(num.length===0)size++;var out=new Buffer(size);num.copy(out);if(num.length===0)out[0]=0;return this._createEncoderBuffer(out)}if(num<128)return this._createEncoderBuffer(num);if(num<256)return this._createEncoderBuffer([0,num]);var size=1;for(var i=num;i>=256;i>>=8)size++;var out=new Array(size);for(var i=out.length-1;i>=0;i--){out[i]=num&255;num>>=8}if(out[0]&128){out.unshift(0)}return this._createEncoderBuffer(new Buffer(out))};DERNode.prototype._encodeBool=function encodeBool(value){return this._createEncoderBuffer(value?255:0)};DERNode.prototype._use=function use(entity,obj){if(typeof entity==="function")entity=entity(obj);return entity._getEncoder("der").tree};DERNode.prototype._skipDefault=function skipDefault(dataBuffer,reporter,parent){var state=this._baseState;var i;if(state["default"]===null)return false;var data=dataBuffer.join();if(state.defaultBuffer===undefined)state.defaultBuffer=this._encodeValue(state["default"],reporter,parent).join();if(data.length!==state.defaultBuffer.length)return false;for(i=0;i=31)return reporter.error("Multi-octet tag encoding unsupported");if(!primitive)res|=32;res|=der.tagClassByName[cls||"universal"]<<6;return res}},{"../../asn1":8,buffer:67,inherits:152}],20:[function(require,module,exports){var encoders=exports;encoders.der=require("./der");encoders.pem=require("./pem")},{"./der":19,"./pem":21}],21:[function(require,module,exports){var inherits=require("inherits");var DEREncoder=require("./der");function PEMEncoder(entity){DEREncoder.call(this,entity);this.enc="pem"}inherits(PEMEncoder,DEREncoder);module.exports=PEMEncoder;PEMEncoder.prototype.encode=function encode(data,options){var buf=DEREncoder.prototype.encode.call(this,data);var p=buf.toString("base64");var out=["-----BEGIN "+options.label+"-----"];for(var i=0;i=this._size)return null;var lenB=this._buf[offset++]&255;if(lenB===null)return null;if((lenB&128)==128){lenB&=127;if(lenB==0)throw newInvalidAsn1Error("Indefinite length not supported");if(lenB>4)throw newInvalidAsn1Error("encoding too long");if(this._size-offsetthis._size-o)return null;this._offset=o;if(this.length===0)return retbuf?new Buffer(0):"";var str=this._buf.slice(this._offset,this._offset+this.length);this._offset+=this.length;return retbuf?str:str.toString("utf8")};Reader.prototype.readOID=function(tag){if(!tag)tag=ASN1.OID;var b=this.readString(tag,true);if(b===null)return null;var values=[];var value=0;for(var i=0;i>0);return values.join(".")};Reader.prototype._readTag=function(tag){assert.ok(tag!==undefined);var b=this.peek();if(b===null)return null;if(b!==tag)throw newInvalidAsn1Error("Expected 0x"+tag.toString(16)+": got 0x"+b.toString(16));var o=this.readLength(this._offset+1);if(o===null)return null;if(this.length>4)throw newInvalidAsn1Error("Integer too long: "+this.length);if(this.length>this._size-o)return null;this._offset=o;var fb=this._buf[this._offset];var value=0;for(var i=0;i>0};module.exports=Reader}).call(this,require("buffer").Buffer)},{"./errors":22,"./types":25,assert:29,buffer:67}],25:[function(require,module,exports){module.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},{}],26:[function(require,module,exports){(function(Buffer){var assert=require("assert");var ASN1=require("./types");var errors=require("./errors");var newInvalidAsn1Error=errors.newInvalidAsn1Error;var DEFAULT_OPTS={size:1024,growthFactor:8};function merge(from,to){assert.ok(from);assert.equal(typeof from,"object");assert.ok(to);assert.equal(typeof to,"object");var keys=Object.getOwnPropertyNames(from);keys.forEach(function(key){if(to[key])return;var value=Object.getOwnPropertyDescriptor(from,key);Object.defineProperty(to,key,value)});return to}function Writer(options){options=merge(DEFAULT_OPTS,options||{});this._buf=new Buffer(options.size||1024);this._size=this._buf.length;this._offset=0;this._options=options;this._seq=[]}Object.defineProperty(Writer.prototype,"buffer",{get:function(){if(this._seq.length)throw new InvalidAsn1Error(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}});Writer.prototype.writeByte=function(b){if(typeof b!=="number")throw new TypeError("argument must be a Number");this._ensure(1);this._buf[this._offset++]=b};Writer.prototype.writeInt=function(i,tag){if(typeof i!=="number")throw new TypeError("argument must be a Number");if(typeof tag!=="number")tag=ASN1.Integer;var sz=4;while(((i&4286578688)===0||(i&4286578688)===4286578688>>0)&&sz>1){sz--;i<<=8}if(sz>4)throw new InvalidAsn1Error("BER ints cannot be > 0xffffffff");this._ensure(2+sz);this._buf[this._offset++]=tag;this._buf[this._offset++]=sz;while(sz-- >0){this._buf[this._offset++]=(i&4278190080)>>>24;i<<=8}};Writer.prototype.writeNull=function(){this.writeByte(ASN1.Null);this.writeByte(0)};Writer.prototype.writeEnumeration=function(i,tag){if(typeof i!=="number")throw new TypeError("argument must be a Number");if(typeof tag!=="number")tag=ASN1.Enumeration;return this.writeInt(i,tag)};Writer.prototype.writeBoolean=function(b,tag){if(typeof b!=="boolean")throw new TypeError("argument must be a Boolean");if(typeof tag!=="number")tag=ASN1.Boolean;this._ensure(3);this._buf[this._offset++]=tag;this._buf[this._offset++]=1;this._buf[this._offset++]=b?255:0};Writer.prototype.writeString=function(s,tag){if(typeof s!=="string")throw new TypeError("argument must be a string (was: "+typeof s+")");if(typeof tag!=="number")tag=ASN1.OctetString;var len=Buffer.byteLength(s);this.writeByte(tag);this.writeLength(len);if(len){this._ensure(len);this._buf.write(s,this._offset);this._offset+=len}};Writer.prototype.writeBuffer=function(buf,tag){if(typeof tag!=="number")throw new TypeError("tag must be a number");if(!Buffer.isBuffer(buf))throw new TypeError("argument must be a buffer");this.writeByte(tag);this.writeLength(buf.length);this._ensure(buf.length);buf.copy(this._buf,this._offset,0,buf.length);this._offset+=buf.length};Writer.prototype.writeStringArray=function(strings){if(!strings instanceof Array)throw new TypeError("argument must be an Array[String]");var self=this;strings.forEach(function(s){self.writeString(s)})};Writer.prototype.writeOID=function(s,tag){if(typeof s!=="string")throw new TypeError("argument must be a string");if(typeof tag!=="number")tag=ASN1.OID;if(!/^([0-9]+\.){3,}[0-9]+$/.test(s))throw new Error("argument is not a valid OID string");function encodeOctet(bytes,octet){if(octet<128){bytes.push(octet)}else if(octet<16384){bytes.push(octet>>>7|128);bytes.push(octet&127)}else if(octet<2097152){bytes.push(octet>>>14|128);bytes.push((octet>>>7|128)&255);bytes.push(octet&127)}else if(octet<268435456){bytes.push(octet>>>21|128);bytes.push((octet>>>14|128)&255);bytes.push((octet>>>7|128)&255);bytes.push(octet&127)}else{bytes.push((octet>>>28|128)&255);bytes.push((octet>>>21|128)&255);bytes.push((octet>>>14|128)&255);bytes.push((octet>>>7|128)&255);bytes.push(octet&127)}}var tmp=s.split(".");var bytes=[];bytes.push(parseInt(tmp[0],10)*40+parseInt(tmp[1],10));tmp.slice(2).forEach(function(b){encodeOctet(bytes,parseInt(b,10))});var self=this;this._ensure(2+bytes.length);this.writeByte(tag);this.writeLength(bytes.length);bytes.forEach(function(b){self.writeByte(b)})};Writer.prototype.writeLength=function(len){if(typeof len!=="number")throw new TypeError("argument must be a Number");this._ensure(4);if(len<=127){this._buf[this._offset++]=len}else if(len<=255){this._buf[this._offset++]=129;this._buf[this._offset++]=len}else if(len<=65535){this._buf[this._offset++]=130;this._buf[this._offset++]=len>>8;this._buf[this._offset++]=len}else if(len<=16777215){this._buf[this._offset++]=131;this._buf[this._offset++]=len>>16;this._buf[this._offset++]=len>>8;this._buf[this._offset++]=len}else{throw new InvalidAsn1ERror("Length too long (> 4 bytes)")}};Writer.prototype.startSequence=function(tag){if(typeof tag!=="number")tag=ASN1.Sequence|ASN1.Constructor;this.writeByte(tag);this._seq.push(this._offset);this._ensure(3);this._offset+=3};Writer.prototype.endSequence=function(){var seq=this._seq.pop();var start=seq+3;var len=this._offset-start;if(len<=127){this._shift(start,len,-2);this._buf[seq]=len}else if(len<=255){this._shift(start,len,-1);this._buf[seq]=129;this._buf[seq+1]=len}else if(len<=65535){this._buf[seq]=130;this._buf[seq+1]=len>>8;this._buf[seq+2]=len}else if(len<=16777215){this._shift(start,len,1);this._buf[seq]=131;this._buf[seq+1]=len>>16;this._buf[seq+2]=len>>8;this._buf[seq+3]=len}else{throw new InvalidAsn1Error("Sequence too long")}};Writer.prototype._shift=function(start,len,shift){assert.ok(start!==undefined);assert.ok(len!==undefined);assert.ok(shift);this._buf.copy(this._buf,start+shift,start,start+len);this._offset+=shift};Writer.prototype._ensure=function(len){assert.ok(len);if(this._size-this._offset=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function truncate(s,n){if(typeof s==="string"){return s.length=0;i--){if(ka[i]!==kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key],strict,actualVisitedObjects))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected,false)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.notDeepStrictEqual=notDeepStrictEqual;function notDeepStrictEqual(actual,expected,message){if(_deepEqual(actual,expected,true)){fail(actual,expected,message,"notDeepStrictEqual",notDeepStrictEqual)}}assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(Object.prototype.toString.call(expected)=="[object RegExp]"){return expected.test(actual)}try{if(actual instanceof expected){return true}}catch(e){}if(Error.isPrototypeOf(expected)){return false}return expected.call({},actual)===true}function _tryBlock(block){var error;try{block()}catch(e){error=e}return error}function _throws(shouldThrow,block,expected,message){var actual;if(typeof block!=="function"){throw new TypeError('"block" argument must be a function')}if(typeof expected==="string"){message=expected;expected=null}actual=_tryBlock(block);message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail(actual,expected,"Missing expected exception"+message)}var userProvidedMessage=typeof message==="string";var isUnwantedException=!shouldThrow&&util.isError(actual);var isUnexpectedException=!shouldThrow&&actual&&!expected;if(isUnwantedException&&userProvidedMessage&&expectedException(actual,expected)||isUnexpectedException){fail(actual,expected,"Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws(true,block,error,message)};assert.doesNotThrow=function(block,error,message){_throws(false,block,error,message)};assert.ifError=function(err){if(err)throw err};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){if(hasOwn.call(obj,key))keys.push(key)}return keys}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"util/":293}],30:[function(require,module,exports){var crypto=require("crypto"),parse=require("url").parse;var keys=["acl","location","logging","notification","partNumber","policy","requestPayment","torrent","uploadId","uploads","versionId","versioning","versions","website"];function authorization(options){return"AWS "+options.key+":"+sign(options)}module.exports=authorization;module.exports.authorization=authorization;function hmacSha1(options){return crypto.createHmac("sha1",options.secret).update(options.message).digest("base64")}module.exports.hmacSha1=hmacSha1;function sign(options){options.message=stringToSign(options);return hmacSha1(options)}module.exports.sign=sign;function signQuery(options){options.message=queryStringToSign(options);return hmacSha1(options)}module.exports.signQuery=signQuery;function stringToSign(options){var headers=options.amazonHeaders||"";if(headers)headers+="\n";var r=[options.verb,options.md5,options.contentType,options.date?options.date.toUTCString():"",headers+options.resource];return r.join("\n")}module.exports.queryStringToSign=stringToSign;function queryStringToSign(options){return"GET\n\n\n"+options.date+"\n"+options.resource}module.exports.queryStringToSign=queryStringToSign;function canonicalizeHeaders(headers){var buf=[],fields=Object.keys(headers);for(var i=0,len=fields.length;i=0&&this.region==="us-east-1")return true;return["cloudfront","ls","route53","iam","importexport","sts"].indexOf(this.service)>=0};RequestSigner.prototype.createHost=function(){var region=this.isSingleRegion()?"":(this.service==="s3"&&this.region!=="us-east-1"?"-":".")+this.region,service=this.service==="ses"?"email":this.service;return service+region+".amazonaws.com"};RequestSigner.prototype.prepareRequest=function(){this.parsePath();var request=this.request,headers=request.headers,query;if(request.signQuery){this.parsedPath.query=query=this.parsedPath.query||{};if(this.credentials.sessionToken)query["X-Amz-Security-Token"]=this.credentials.sessionToken;if(this.service==="s3"&&!query["X-Amz-Expires"])query["X-Amz-Expires"]=86400;if(query["X-Amz-Date"])this.datetime=query["X-Amz-Date"];else query["X-Amz-Date"]=this.getDateTime();query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256";query["X-Amz-Credential"]=this.credentials.accessKeyId+"/"+this.credentialString();query["X-Amz-SignedHeaders"]=this.signedHeaders()}else{if(!request.doNotModifyHeaders&&!this.isCodeCommitGit){if(request.body&&!headers["Content-Type"]&&!headers["content-type"])headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8";if(request.body&&!headers["Content-Length"]&&!headers["content-length"])headers["Content-Length"]=Buffer.byteLength(request.body);if(this.credentials.sessionToken)headers["X-Amz-Security-Token"]=this.credentials.sessionToken;if(this.service==="s3")headers["X-Amz-Content-Sha256"]=hash(this.request.body||"","hex");if(headers["X-Amz-Date"])this.datetime=headers["X-Amz-Date"];else headers["X-Amz-Date"]=this.getDateTime()}delete headers.Authorization;delete headers.authorization}};RequestSigner.prototype.sign=function(){if(!this.parsedPath)this.prepareRequest();if(this.request.signQuery){this.parsedPath.query["X-Amz-Signature"]=this.signature()}else{this.request.headers.Authorization=this.authHeader()}this.request.path=this.formatPath();return this.request};RequestSigner.prototype.getDateTime=function(){if(!this.datetime){var headers=this.request.headers,date=new Date(headers.Date||headers.date||new Date);this.datetime=date.toISOString().replace(/[:\-]|\.\d{3}/g,"");if(this.isCodeCommitGit)this.datetime=this.datetime.slice(0,-1)}return this.datetime};RequestSigner.prototype.getDate=function(){return this.getDateTime().substr(0,8)};RequestSigner.prototype.authHeader=function(){return["AWS4-HMAC-SHA256 Credential="+this.credentials.accessKeyId+"/"+this.credentialString(),"SignedHeaders="+this.signedHeaders(),"Signature="+this.signature()].join(", ")};RequestSigner.prototype.signature=function(){var date=this.getDate(),cacheKey=[this.credentials.secretAccessKey,date,this.region,this.service].join(),kDate,kRegion,kService,kCredentials=credentialsCache.get(cacheKey);if(!kCredentials){kDate=hmac("AWS4"+this.credentials.secretAccessKey,date);kRegion=hmac(kDate,this.region);kService=hmac(kRegion,this.service);kCredentials=hmac(kService,"aws4_request");credentialsCache.set(cacheKey,kCredentials)}return hmac(kCredentials,this.stringToSign(),"hex")};RequestSigner.prototype.stringToSign=function(){return["AWS4-HMAC-SHA256",this.getDateTime(),this.credentialString(),hash(this.canonicalString(),"hex")].join("\n")};RequestSigner.prototype.canonicalString=function(){if(!this.parsedPath)this.prepareRequest();var pathStr=this.parsedPath.path,query=this.parsedPath.query,queryStr="",normalizePath=this.service!=="s3",decodePath=this.service==="s3"||this.request.doNotEncodePath,decodeSlashesInPath=this.service==="s3",firstValOnly=this.service==="s3",bodyHash=this.service==="s3"&&this.request.signQuery?"UNSIGNED-PAYLOAD":this.isCodeCommitGit?"":hash(this.request.body||"","hex");if(query){queryStr=encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj,key){if(!key)return obj;obj[key]=!Array.isArray(query[key])?query[key]:firstValOnly?query[key][0]:query[key].slice().sort();return obj},{})))}if(pathStr!=="/"){if(normalizePath)pathStr=pathStr.replace(/\/{2,}/g,"/");pathStr=pathStr.split("/").reduce(function(path,piece){if(normalizePath&&piece===".."){path.pop()}else if(!normalizePath||piece!=="."){if(decodePath)piece=querystring.unescape(piece);path.push(encodeRfc3986(querystring.escape(piece)))}return path},[]).join("/");if(pathStr[0]!=="/")pathStr="/"+pathStr;if(decodeSlashesInPath)pathStr=pathStr.replace(/%2F/g,"/")}return[this.request.method||"GET",pathStr,queryStr,this.canonicalHeaders()+"\n",this.signedHeaders(),bodyHash].join("\n")};RequestSigner.prototype.canonicalHeaders=function(){var headers=this.request.headers;function trimAll(header){return header.toString().trim().replace(/\s+/g," ")}return Object.keys(headers).sort(function(a,b){return a.toLowerCase()=0){query=querystring.parse(path.slice(queryIx+1));path=path.slice(0,queryIx)}if(/[^0-9A-Za-z!'()*\-._~%\/]/.test(path)){path=path.split("/").map(function(piece){return querystring.escape(querystring.unescape(piece))}).join("/")}this.parsedPath={path:path,query:query}};RequestSigner.prototype.formatPath=function(){var path=this.parsedPath.path,query=this.parsedPath.query;if(!query)return path;if(query[""]!=null)delete query[""];return path+"?"+encodeRfc3986(querystring.stringify(query))};aws4.RequestSigner=RequestSigner;aws4.sign=function(request,credentials){return new RequestSigner(request,credentials).sign()}}).call(this,require("_process"),require("buffer").Buffer)},{"./lru":32,_process:198,buffer:67,crypto:78,querystring:213,url:288}],32:[function(require,module,exports){module.exports=function(size){return new LruCache(size)};function LruCache(size){this.capacity=size|0;this.map=Object.create(null);this.list=new DoublyLinkedList}LruCache.prototype.get=function(key){var node=this.map[key];if(node==null)return undefined;this.used(node);return node.val};LruCache.prototype.set=function(key,val){var node=this.map[key];if(node!=null){node.val=val}else{if(!this.capacity)this.prune();if(!this.capacity)return false;node=new DoublyLinkedNode(key,val);this.map[key]=node;this.capacity--}this.used(node);return true};LruCache.prototype.used=function(node){this.list.moveToFront(node)};LruCache.prototype.prune=function(){var node=this.list.pop();if(node!=null){delete this.map[node.key];this.capacity++}};function DoublyLinkedList(){this.firstNode=null;this.lastNode=null}DoublyLinkedList.prototype.moveToFront=function(node){if(this.firstNode==node)return;this.remove(node);if(this.firstNode==null){this.firstNode=node;this.lastNode=node;node.prev=null;node.next=null}else{node.prev=null;node.next=this.firstNode;node.next.prev=node;this.firstNode=node}};DoublyLinkedList.prototype.pop=function(){var lastNode=this.lastNode;if(lastNode!=null){this.remove(lastNode)}return lastNode};DoublyLinkedList.prototype.remove=function(node){if(this.firstNode==node){this.firstNode=node.next}else if(node.prev!=null){node.prev.next=node.next}if(this.lastNode==node){this.lastNode=node.prev}else if(node.next!=null){node.next.prev=node.prev}};function DoublyLinkedNode(key,val){this.key=key;this.val=val;this.prev=null;this.next=null}},{}],33:[function(require,module,exports){"use strict";exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i0){throw new Error("Invalid string. Length must be a multiple of 4")}return b64[len-2]==="="?2:b64[len-1]==="="?1:0}function byteLength(b64){return b64.length*3/4-placeHoldersCount(b64)}function toByteArray(b64){var i,j,l,tmp,placeHolders,arr;var len=b64.length;placeHolders=placeHoldersCount(b64);arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],34:[function(require,module,exports){"use strict";var crypto_hash_sha512=require("tweetnacl").lowlevel.crypto_hash;var BLF_J=0;var Blowfish=function(){this.S=[new Uint32Array([3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946]),new Uint32Array([1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055]),new Uint32Array([3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504]),new Uint32Array([976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462])]; -this.P=new Uint32Array([608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731])};function F(S,x8,i){return(S[0][x8[i+3]]+S[1][x8[i+2]]^S[2][x8[i+1]])+S[3][x8[i]]}Blowfish.prototype.encipher=function(x,x8){if(x8===undefined){x8=new Uint8Array(x.buffer);if(x.byteOffset!==0)x8=x8.subarray(x.byteOffset)}x[0]^=this.P[0];for(var i=1;i<16;i+=2){x[1]^=F(this.S,x8,0)^this.P[i];x[0]^=F(this.S,x8,4)^this.P[i+1]}var t=x[0];x[0]=x[1]^this.P[17];x[1]=t};Blowfish.prototype.decipher=function(x){var x8=new Uint8Array(x.buffer);if(x.byteOffset!==0)x8=x8.subarray(x.byteOffset);x[0]^=this.P[17];for(var i=16;i>0;i-=2){x[1]^=F(this.S,x8,0)^this.P[i];x[0]^=F(this.S,x8,4)^this.P[i-1]}var t=x[0];x[0]=x[1]^this.P[0];x[1]=t};function stream2word(data,databytes){var i,temp=0;for(i=0;i<4;i++,BLF_J++){if(BLF_J>=databytes)BLF_J=0;temp=temp<<8|data[BLF_J]}return temp}Blowfish.prototype.expand0state=function(key,keybytes){var d=new Uint32Array(2),i,k;var d8=new Uint8Array(d.buffer);for(i=0,BLF_J=0;i<18;i++){this.P[i]^=stream2word(key,keybytes)}BLF_J=0;for(i=0;i<18;i+=2){this.encipher(d,d8);this.P[i]=d[0];this.P[i+1]=d[1]}for(i=0;i<4;i++){for(k=0;k<256;k+=2){this.encipher(d,d8);this.S[i][k]=d[0];this.S[i][k+1]=d[1]}}};Blowfish.prototype.expandstate=function(data,databytes,key,keybytes){var d=new Uint32Array(2),i,k;for(i=0,BLF_J=0;i<18;i++){this.P[i]^=stream2word(key,keybytes)}for(i=0,BLF_J=0;i<18;i+=2){d[0]^=stream2word(data,databytes);d[1]^=stream2word(data,databytes);this.encipher(d);this.P[i]=d[0];this.P[i+1]=d[1]}for(i=0;i<4;i++){for(k=0;k<256;k+=2){d[0]^=stream2word(data,databytes);d[1]^=stream2word(data,databytes);this.encipher(d);this.S[i][k]=d[0];this.S[i][k+1]=d[1]}}BLF_J=0};Blowfish.prototype.enc=function(data,blocks){for(var i=0;i>>24;out[4*i+2]=cdata[i]>>>16;out[4*i+1]=cdata[i]>>>8;out[4*i+0]=cdata[i]}}function bcrypt_pbkdf(pass,passlen,salt,saltlen,key,keylen,rounds){var sha2pass=new Uint8Array(64),sha2salt=new Uint8Array(64),out=new Uint8Array(BCRYPT_HASHSIZE),tmpout=new Uint8Array(BCRYPT_HASHSIZE),countsalt=new Uint8Array(saltlen+4),i,j,amt,stride,dest,count,origkeylen=keylen;if(rounds<1)return-1;if(passlen===0||saltlen===0||keylen===0||keylen>out.byteLength*out.byteLength||saltlen>1<<20)return-1;stride=Math.floor((keylen+out.byteLength-1)/out.byteLength);amt=Math.floor((keylen+stride-1)/stride);for(i=0;i0;count++){countsalt[saltlen+0]=count>>>24;countsalt[saltlen+1]=count>>>16;countsalt[saltlen+2]=count>>>8;countsalt[saltlen+3]=count;crypto_hash_sha512(sha2salt,countsalt,saltlen+4);bcrypt_hash(sha2pass,sha2salt,tmpout);for(i=out.byteLength;i--;)out[i]=tmpout[i];for(i=1;i=origkeylen)break;key[dest]=out[i]}keylen-=i}return 0}module.exports={BLOCKS:BCRYPT_BLOCKS,HASHSIZE:BCRYPT_HASHSIZE,hash:bcrypt_hash,pbkdf:bcrypt_pbkdf}},{tweetnacl:287}],35:[function(require,module,exports){(function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number)){return number}this.negative=0;this.words=null;this.length=0;this.red=null;if(number!==null){if(base==="le"||base==="be"){endian=base;base=10}this._init(number||0,base||10,endian||"be")}}if(typeof module==="object"){module.exports=BN}else{exports.BN=BN}BN.BN=BN;BN.wordSize=26;var Buffer;try{Buffer=require("buf"+"fer").Buffer}catch(e){}BN.isBN=function isBN(num){if(num instanceof BN){return true}return num!==null&&typeof num==="object"&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)};BN.max=function max(left,right){if(left.cmp(right)>0)return left;return right};BN.min=function min(left,right){if(left.cmp(right)<0)return left;return right};BN.prototype._init=function init(number,base,endian){if(typeof number==="number"){return this._initNumber(number,base,endian)}if(typeof number==="object"){return this._initArray(number,base,endian)}if(base==="hex"){base=16}assert(base===(base|0)&&base>=2&&base<=36);number=number.toString().replace(/\s+/g,"");var start=0;if(number[0]==="-"){start++}if(base===16){this._parseHex(number,start)}else{this._parseBase(number,base,start)}if(number[0]==="-"){this.negative=1}this.strip();if(endian!=="le")return;this._initArray(this.toArray(),base,endian)};BN.prototype._initNumber=function _initNumber(number,base,endian){if(number<0){this.negative=1;number=-number}if(number<67108864){this.words=[number&67108863];this.length=1}else if(number<4503599627370496){this.words=[number&67108863,number/67108864&67108863];this.length=2}else{assert(number<9007199254740992);this.words=[number&67108863,number/67108864&67108863,1];this.length=3}if(endian!=="le")return;this._initArray(this.toArray(),base,endian)};BN.prototype._initArray=function _initArray(number,base,endian){assert(typeof number.length==="number");if(number.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(number.length/3);this.words=new Array(this.length);for(var i=0;i=0;i-=3){w=number[i]|number[i-1]<<8|number[i-2]<<16;this.words[j]|=w<>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}else if(endian==="le"){for(i=0,j=0;i>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}return this.strip()};function parseHex(str,start,end){var r=0;var len=Math.min(str.length,end);for(var i=start;i=49&&c<=54){r|=c-49+10}else if(c>=17&&c<=22){r|=c-17+10}else{r|=c&15}}return r}BN.prototype._parseHex=function _parseHex(number,start){this.length=Math.ceil((number.length-start)/6);this.words=new Array(this.length);for(var i=0;i=start;i-=6){w=parseHex(number,i,i+6);this.words[j]|=w<>>26-off&4194303;off+=24;if(off>=26){off-=26;j++}}if(i+6!==start){w=parseHex(number,start,i+6);this.words[j]|=w<>>26-off&4194303}this.strip()};function parseBase(str,start,end,mul){var r=0;var len=Math.min(str.length,end);for(var i=start;i=49){r+=c-49+10}else if(c>=17){r+=c-17+10}else{r+=c}}return r}BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0];this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base){limbLen++}limbLen--;limbPow=limbPow/base|0;var total=number.length-start;var mod=total%limbLen;var end=Math.min(total,total-mod)+start;var word=0;for(var i=start;i1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?""};var zeros=["","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"];var groupSizes=[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];var groupBases=[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];BN.prototype.toString=function toString(base,padding){base=base||10;padding=padding|0||1;var out;if(base===16||base==="hex"){out="";var off=0;var carry=0;for(var i=0;i>>24-off&16777215;if(carry!==0||i!==this.length-1){out=zeros[6-word.length]+word+out}else{out=word+out}off+=2;if(off>=26){off-=26;i--}}if(carry!==0){out=carry.toString(16)+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}if(base===(base|0)&&base>=2&&base<=36){var groupSize=groupSizes[base];var groupBase=groupBases[base];out="";var c=this.clone();c.negative=0;while(!c.isZero()){var r=c.modn(groupBase).toString(base);c=c.idivn(groupBase);if(!c.isZero()){out=zeros[groupSize-r.length]+r+out}else{out=r+out}}if(this.isZero()){out="0"+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var ret=this.words[0];if(this.length===2){ret+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){ret+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-ret:ret};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(endian,length){assert(typeof Buffer!=="undefined");return this.toArrayLike(Buffer,endian,length)};BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)};BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength();var reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length");assert(reqLength>0,"Requested array length <= 0");this.strip();var littleEndian=endian==="le";var res=new ArrayType(reqLength);var b,i;var q=this.clone();if(!littleEndian){for(i=0;i=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(w){if(w===0)return 26;var t=w;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1];var hi=this._countBits(w);return(this.length-1)*26+hi};function toBitArray(num){var w=new Array(num.bitLength());for(var bit=0;bit>>wbit}return w}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var r=0;for(var i=0;inum.length)return this.clone().ior(num);return num.clone().ior(this)};BN.prototype.uor=function uor(num){if(this.length>num.length)return this.clone().iuor(num);return num.clone().iuor(this)};BN.prototype.iuand=function iuand(num){var b;if(this.length>num.length){b=num}else{b=this}for(var i=0;inum.length)return this.clone().iand(num);return num.clone().iand(this)};BN.prototype.uand=function uand(num){if(this.length>num.length)return this.clone().iuand(num);return num.clone().iuand(this)};BN.prototype.iuxor=function iuxor(num){var a;var b;if(this.length>num.length){a=this;b=num}else{a=num;b=this}for(var i=0;inum.length)return this.clone().ixor(num);return num.clone().ixor(this)};BN.prototype.uxor=function uxor(num){if(this.length>num.length)return this.clone().iuxor(num);return num.clone().iuxor(this)};BN.prototype.inotn=function inotn(width){assert(typeof width==="number"&&width>=0);var bytesNeeded=Math.ceil(width/26)|0;var bitsLeft=width%26;this._expand(bytesNeeded);if(bitsLeft>0){bytesNeeded--}for(var i=0;i0){this.words[i]=~this.words[i]&67108863>>26-bitsLeft}return this.strip()};BN.prototype.notn=function notn(width){return this.clone().inotn(width)};BN.prototype.setn=function setn(bit,val){assert(typeof bit==="number"&&bit>=0);var off=bit/26|0;var wbit=bit%26;this._expand(off+1);if(val){this.words[off]=this.words[off]|1<num.length){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>>26}for(;carry!==0&&i>>26}this.length=a.length;if(carry!==0){this.words[this.length]=carry;this.length++}else if(a!==this){for(;inum.length)return this.clone().iadd(num);return num.clone().iadd(this)};BN.prototype.isub=function isub(num){if(num.negative!==0){num.negative=0;var r=this.iadd(num);num.negative=1;return r._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(num);this.negative=1;return this._normSign()}var cmp=this.cmp(num);if(cmp===0){this.negative=0;this.length=1;this.words[0]=0;return this}var a,b;if(cmp>0){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>26;this.words[i]=r&67108863}for(;carry!==0&&i>26;this.words[i]=r&67108863}if(carry===0&&i>>26;var rword=carry&67108863;var maxJ=Math.min(k,num.length-1);for(var j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;a=self.words[i]|0;b=num.words[j]|0;r=a*b+rword;ncarry+=r/67108864|0;rword=r&67108863}out.words[k]=rword|0;carry=ncarry|0}if(carry!==0){out.words[k]=carry|0}else{out.length--}return out.strip()}var comb10MulTo=function comb10MulTo(self,num,out){var a=self.words;var b=num.words;var o=out.words;var c=0;var lo;var mid;var hi;var a0=a[0]|0;var al0=a0&8191;var ah0=a0>>>13;var a1=a[1]|0;var al1=a1&8191;var ah1=a1>>>13;var a2=a[2]|0;var al2=a2&8191;var ah2=a2>>>13;var a3=a[3]|0;var al3=a3&8191;var ah3=a3>>>13;var a4=a[4]|0;var al4=a4&8191;var ah4=a4>>>13;var a5=a[5]|0;var al5=a5&8191;var ah5=a5>>>13;var a6=a[6]|0;var al6=a6&8191;var ah6=a6>>>13;var a7=a[7]|0;var al7=a7&8191;var ah7=a7>>>13;var a8=a[8]|0;var al8=a8&8191;var ah8=a8>>>13;var a9=a[9]|0;var al9=a9&8191;var ah9=a9>>>13;var b0=b[0]|0;var bl0=b0&8191;var bh0=b0>>>13;var b1=b[1]|0;var bl1=b1&8191;var bh1=b1>>>13;var b2=b[2]|0;var bl2=b2&8191;var bh2=b2>>>13;var b3=b[3]|0;var bl3=b3&8191;var bh3=b3>>>13;var b4=b[4]|0;var bl4=b4&8191;var bh4=b4>>>13;var b5=b[5]|0;var bl5=b5&8191;var bh5=b5>>>13;var b6=b[6]|0;var bl6=b6&8191;var bh6=b6>>>13;var b7=b[7]|0;var bl7=b7&8191;var bh7=b7>>>13;var b8=b[8]|0;var bl8=b8&8191;var bh8=b8>>>13;var b9=b[9]|0;var bl9=b9&8191;var bh9=b9>>>13;out.negative=self.negative^num.negative;out.length=19;lo=Math.imul(al0,bl0);mid=Math.imul(al0,bh0);mid=mid+Math.imul(ah0,bl0)|0;hi=Math.imul(ah0,bh0);var w0=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w0>>>26)|0;w0&=67108863;lo=Math.imul(al1,bl0);mid=Math.imul(al1,bh0);mid=mid+Math.imul(ah1,bl0)|0;hi=Math.imul(ah1,bh0);lo=lo+Math.imul(al0,bl1)|0;mid=mid+Math.imul(al0,bh1)|0;mid=mid+Math.imul(ah0,bl1)|0;hi=hi+Math.imul(ah0,bh1)|0;var w1=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w1>>>26)|0;w1&=67108863;lo=Math.imul(al2,bl0);mid=Math.imul(al2,bh0);mid=mid+Math.imul(ah2,bl0)|0;hi=Math.imul(ah2,bh0);lo=lo+Math.imul(al1,bl1)|0;mid=mid+Math.imul(al1,bh1)|0;mid=mid+Math.imul(ah1,bl1)|0;hi=hi+Math.imul(ah1,bh1)|0;lo=lo+Math.imul(al0,bl2)|0;mid=mid+Math.imul(al0,bh2)|0;mid=mid+Math.imul(ah0,bl2)|0;hi=hi+Math.imul(ah0,bh2)|0;var w2=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w2>>>26)|0;w2&=67108863;lo=Math.imul(al3,bl0);mid=Math.imul(al3,bh0);mid=mid+Math.imul(ah3,bl0)|0;hi=Math.imul(ah3,bh0);lo=lo+Math.imul(al2,bl1)|0;mid=mid+Math.imul(al2,bh1)|0;mid=mid+Math.imul(ah2,bl1)|0;hi=hi+Math.imul(ah2,bh1)|0;lo=lo+Math.imul(al1,bl2)|0;mid=mid+Math.imul(al1,bh2)|0;mid=mid+Math.imul(ah1,bl2)|0;hi=hi+Math.imul(ah1,bh2)|0;lo=lo+Math.imul(al0,bl3)|0;mid=mid+Math.imul(al0,bh3)|0;mid=mid+Math.imul(ah0,bl3)|0;hi=hi+Math.imul(ah0,bh3)|0;var w3=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w3>>>26)|0;w3&=67108863;lo=Math.imul(al4,bl0);mid=Math.imul(al4,bh0);mid=mid+Math.imul(ah4,bl0)|0;hi=Math.imul(ah4,bh0);lo=lo+Math.imul(al3,bl1)|0;mid=mid+Math.imul(al3,bh1)|0;mid=mid+Math.imul(ah3,bl1)|0;hi=hi+Math.imul(ah3,bh1)|0;lo=lo+Math.imul(al2,bl2)|0;mid=mid+Math.imul(al2,bh2)|0;mid=mid+Math.imul(ah2,bl2)|0;hi=hi+Math.imul(ah2,bh2)|0;lo=lo+Math.imul(al1,bl3)|0;mid=mid+Math.imul(al1,bh3)|0;mid=mid+Math.imul(ah1,bl3)|0;hi=hi+Math.imul(ah1,bh3)|0;lo=lo+Math.imul(al0,bl4)|0;mid=mid+Math.imul(al0,bh4)|0;mid=mid+Math.imul(ah0,bl4)|0;hi=hi+Math.imul(ah0,bh4)|0;var w4=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w4>>>26)|0;w4&=67108863;lo=Math.imul(al5,bl0);mid=Math.imul(al5,bh0);mid=mid+Math.imul(ah5,bl0)|0;hi=Math.imul(ah5,bh0);lo=lo+Math.imul(al4,bl1)|0;mid=mid+Math.imul(al4,bh1)|0;mid=mid+Math.imul(ah4,bl1)|0;hi=hi+Math.imul(ah4,bh1)|0;lo=lo+Math.imul(al3,bl2)|0;mid=mid+Math.imul(al3,bh2)|0;mid=mid+Math.imul(ah3,bl2)|0;hi=hi+Math.imul(ah3,bh2)|0;lo=lo+Math.imul(al2,bl3)|0;mid=mid+Math.imul(al2,bh3)|0;mid=mid+Math.imul(ah2,bl3)|0;hi=hi+Math.imul(ah2,bh3)|0;lo=lo+Math.imul(al1,bl4)|0;mid=mid+Math.imul(al1,bh4)|0;mid=mid+Math.imul(ah1,bl4)|0;hi=hi+Math.imul(ah1,bh4)|0;lo=lo+Math.imul(al0,bl5)|0;mid=mid+Math.imul(al0,bh5)|0;mid=mid+Math.imul(ah0,bl5)|0;hi=hi+Math.imul(ah0,bh5)|0;var w5=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w5>>>26)|0;w5&=67108863;lo=Math.imul(al6,bl0);mid=Math.imul(al6,bh0);mid=mid+Math.imul(ah6,bl0)|0;hi=Math.imul(ah6,bh0);lo=lo+Math.imul(al5,bl1)|0;mid=mid+Math.imul(al5,bh1)|0;mid=mid+Math.imul(ah5,bl1)|0;hi=hi+Math.imul(ah5,bh1)|0;lo=lo+Math.imul(al4,bl2)|0;mid=mid+Math.imul(al4,bh2)|0;mid=mid+Math.imul(ah4,bl2)|0;hi=hi+Math.imul(ah4,bh2)|0;lo=lo+Math.imul(al3,bl3)|0;mid=mid+Math.imul(al3,bh3)|0;mid=mid+Math.imul(ah3,bl3)|0;hi=hi+Math.imul(ah3,bh3)|0;lo=lo+Math.imul(al2,bl4)|0;mid=mid+Math.imul(al2,bh4)|0;mid=mid+Math.imul(ah2,bl4)|0;hi=hi+Math.imul(ah2,bh4)|0;lo=lo+Math.imul(al1,bl5)|0;mid=mid+Math.imul(al1,bh5)|0;mid=mid+Math.imul(ah1,bl5)|0;hi=hi+Math.imul(ah1,bh5)|0;lo=lo+Math.imul(al0,bl6)|0;mid=mid+Math.imul(al0,bh6)|0;mid=mid+Math.imul(ah0,bl6)|0;hi=hi+Math.imul(ah0,bh6)|0;var w6=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w6>>>26)|0;w6&=67108863;lo=Math.imul(al7,bl0);mid=Math.imul(al7,bh0);mid=mid+Math.imul(ah7,bl0)|0;hi=Math.imul(ah7,bh0);lo=lo+Math.imul(al6,bl1)|0;mid=mid+Math.imul(al6,bh1)|0;mid=mid+Math.imul(ah6,bl1)|0;hi=hi+Math.imul(ah6,bh1)|0;lo=lo+Math.imul(al5,bl2)|0;mid=mid+Math.imul(al5,bh2)|0;mid=mid+Math.imul(ah5,bl2)|0;hi=hi+Math.imul(ah5,bh2)|0;lo=lo+Math.imul(al4,bl3)|0;mid=mid+Math.imul(al4,bh3)|0;mid=mid+Math.imul(ah4,bl3)|0;hi=hi+Math.imul(ah4,bh3)|0;lo=lo+Math.imul(al3,bl4)|0;mid=mid+Math.imul(al3,bh4)|0;mid=mid+Math.imul(ah3,bl4)|0;hi=hi+Math.imul(ah3,bh4)|0;lo=lo+Math.imul(al2,bl5)|0;mid=mid+Math.imul(al2,bh5)|0;mid=mid+Math.imul(ah2,bl5)|0;hi=hi+Math.imul(ah2,bh5)|0;lo=lo+Math.imul(al1,bl6)|0;mid=mid+Math.imul(al1,bh6)|0;mid=mid+Math.imul(ah1,bl6)|0;hi=hi+Math.imul(ah1,bh6)|0;lo=lo+Math.imul(al0,bl7)|0;mid=mid+Math.imul(al0,bh7)|0;mid=mid+Math.imul(ah0,bl7)|0;hi=hi+Math.imul(ah0,bh7)|0;var w7=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w7>>>26)|0;w7&=67108863;lo=Math.imul(al8,bl0);mid=Math.imul(al8,bh0);mid=mid+Math.imul(ah8,bl0)|0;hi=Math.imul(ah8,bh0);lo=lo+Math.imul(al7,bl1)|0;mid=mid+Math.imul(al7,bh1)|0;mid=mid+Math.imul(ah7,bl1)|0;hi=hi+Math.imul(ah7,bh1)|0;lo=lo+Math.imul(al6,bl2)|0;mid=mid+Math.imul(al6,bh2)|0;mid=mid+Math.imul(ah6,bl2)|0;hi=hi+Math.imul(ah6,bh2)|0;lo=lo+Math.imul(al5,bl3)|0;mid=mid+Math.imul(al5,bh3)|0;mid=mid+Math.imul(ah5,bl3)|0;hi=hi+Math.imul(ah5,bh3)|0;lo=lo+Math.imul(al4,bl4)|0;mid=mid+Math.imul(al4,bh4)|0;mid=mid+Math.imul(ah4,bl4)|0;hi=hi+Math.imul(ah4,bh4)|0;lo=lo+Math.imul(al3,bl5)|0;mid=mid+Math.imul(al3,bh5)|0;mid=mid+Math.imul(ah3,bl5)|0;hi=hi+Math.imul(ah3,bh5)|0;lo=lo+Math.imul(al2,bl6)|0;mid=mid+Math.imul(al2,bh6)|0;mid=mid+Math.imul(ah2,bl6)|0;hi=hi+Math.imul(ah2,bh6)|0;lo=lo+Math.imul(al1,bl7)|0;mid=mid+Math.imul(al1,bh7)|0;mid=mid+Math.imul(ah1,bl7)|0;hi=hi+Math.imul(ah1,bh7)|0;lo=lo+Math.imul(al0,bl8)|0;mid=mid+Math.imul(al0,bh8)|0;mid=mid+Math.imul(ah0,bl8)|0;hi=hi+Math.imul(ah0,bh8)|0;var w8=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w8>>>26)|0;w8&=67108863;lo=Math.imul(al9,bl0);mid=Math.imul(al9,bh0);mid=mid+Math.imul(ah9,bl0)|0;hi=Math.imul(ah9,bh0);lo=lo+Math.imul(al8,bl1)|0;mid=mid+Math.imul(al8,bh1)|0;mid=mid+Math.imul(ah8,bl1)|0;hi=hi+Math.imul(ah8,bh1)|0;lo=lo+Math.imul(al7,bl2)|0;mid=mid+Math.imul(al7,bh2)|0;mid=mid+Math.imul(ah7,bl2)|0;hi=hi+Math.imul(ah7,bh2)|0;lo=lo+Math.imul(al6,bl3)|0;mid=mid+Math.imul(al6,bh3)|0;mid=mid+Math.imul(ah6,bl3)|0;hi=hi+Math.imul(ah6,bh3)|0;lo=lo+Math.imul(al5,bl4)|0;mid=mid+Math.imul(al5,bh4)|0;mid=mid+Math.imul(ah5,bl4)|0;hi=hi+Math.imul(ah5,bh4)|0;lo=lo+Math.imul(al4,bl5)|0;mid=mid+Math.imul(al4,bh5)|0;mid=mid+Math.imul(ah4,bl5)|0;hi=hi+Math.imul(ah4,bh5)|0;lo=lo+Math.imul(al3,bl6)|0;mid=mid+Math.imul(al3,bh6)|0;mid=mid+Math.imul(ah3,bl6)|0;hi=hi+Math.imul(ah3,bh6)|0;lo=lo+Math.imul(al2,bl7)|0;mid=mid+Math.imul(al2,bh7)|0;mid=mid+Math.imul(ah2,bl7)|0;hi=hi+Math.imul(ah2,bh7)|0;lo=lo+Math.imul(al1,bl8)|0;mid=mid+Math.imul(al1,bh8)|0;mid=mid+Math.imul(ah1,bl8)|0;hi=hi+Math.imul(ah1,bh8)|0;lo=lo+Math.imul(al0,bl9)|0;mid=mid+Math.imul(al0,bh9)|0;mid=mid+Math.imul(ah0,bl9)|0;hi=hi+Math.imul(ah0,bh9)|0;var w9=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w9>>>26)|0;w9&=67108863;lo=Math.imul(al9,bl1);mid=Math.imul(al9,bh1);mid=mid+Math.imul(ah9,bl1)|0;hi=Math.imul(ah9,bh1);lo=lo+Math.imul(al8,bl2)|0;mid=mid+Math.imul(al8,bh2)|0;mid=mid+Math.imul(ah8,bl2)|0;hi=hi+Math.imul(ah8,bh2)|0;lo=lo+Math.imul(al7,bl3)|0;mid=mid+Math.imul(al7,bh3)|0;mid=mid+Math.imul(ah7,bl3)|0;hi=hi+Math.imul(ah7,bh3)|0;lo=lo+Math.imul(al6,bl4)|0;mid=mid+Math.imul(al6,bh4)|0;mid=mid+Math.imul(ah6,bl4)|0;hi=hi+Math.imul(ah6,bh4)|0;lo=lo+Math.imul(al5,bl5)|0;mid=mid+Math.imul(al5,bh5)|0;mid=mid+Math.imul(ah5,bl5)|0;hi=hi+Math.imul(ah5,bh5)|0;lo=lo+Math.imul(al4,bl6)|0;mid=mid+Math.imul(al4,bh6)|0;mid=mid+Math.imul(ah4,bl6)|0;hi=hi+Math.imul(ah4,bh6)|0;lo=lo+Math.imul(al3,bl7)|0;mid=mid+Math.imul(al3,bh7)|0;mid=mid+Math.imul(ah3,bl7)|0;hi=hi+Math.imul(ah3,bh7)|0;lo=lo+Math.imul(al2,bl8)|0;mid=mid+Math.imul(al2,bh8)|0;mid=mid+Math.imul(ah2,bl8)|0;hi=hi+Math.imul(ah2,bh8)|0;lo=lo+Math.imul(al1,bl9)|0;mid=mid+Math.imul(al1,bh9)|0;mid=mid+Math.imul(ah1,bl9)|0;hi=hi+Math.imul(ah1,bh9)|0;var w10=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w10>>>26)|0;w10&=67108863;lo=Math.imul(al9,bl2);mid=Math.imul(al9,bh2);mid=mid+Math.imul(ah9,bl2)|0;hi=Math.imul(ah9,bh2);lo=lo+Math.imul(al8,bl3)|0;mid=mid+Math.imul(al8,bh3)|0;mid=mid+Math.imul(ah8,bl3)|0;hi=hi+Math.imul(ah8,bh3)|0;lo=lo+Math.imul(al7,bl4)|0;mid=mid+Math.imul(al7,bh4)|0;mid=mid+Math.imul(ah7,bl4)|0;hi=hi+Math.imul(ah7,bh4)|0;lo=lo+Math.imul(al6,bl5)|0;mid=mid+Math.imul(al6,bh5)|0;mid=mid+Math.imul(ah6,bl5)|0;hi=hi+Math.imul(ah6,bh5)|0;lo=lo+Math.imul(al5,bl6)|0;mid=mid+Math.imul(al5,bh6)|0;mid=mid+Math.imul(ah5,bl6)|0;hi=hi+Math.imul(ah5,bh6)|0;lo=lo+Math.imul(al4,bl7)|0;mid=mid+Math.imul(al4,bh7)|0;mid=mid+Math.imul(ah4,bl7)|0;hi=hi+Math.imul(ah4,bh7)|0;lo=lo+Math.imul(al3,bl8)|0;mid=mid+Math.imul(al3,bh8)|0;mid=mid+Math.imul(ah3,bl8)|0;hi=hi+Math.imul(ah3,bh8)|0;lo=lo+Math.imul(al2,bl9)|0;mid=mid+Math.imul(al2,bh9)|0;mid=mid+Math.imul(ah2,bl9)|0;hi=hi+Math.imul(ah2,bh9)|0;var w11=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w11>>>26)|0;w11&=67108863;lo=Math.imul(al9,bl3);mid=Math.imul(al9,bh3);mid=mid+Math.imul(ah9,bl3)|0;hi=Math.imul(ah9,bh3);lo=lo+Math.imul(al8,bl4)|0;mid=mid+Math.imul(al8,bh4)|0;mid=mid+Math.imul(ah8,bl4)|0;hi=hi+Math.imul(ah8,bh4)|0;lo=lo+Math.imul(al7,bl5)|0;mid=mid+Math.imul(al7,bh5)|0;mid=mid+Math.imul(ah7,bl5)|0;hi=hi+Math.imul(ah7,bh5)|0;lo=lo+Math.imul(al6,bl6)|0;mid=mid+Math.imul(al6,bh6)|0;mid=mid+Math.imul(ah6,bl6)|0;hi=hi+Math.imul(ah6,bh6)|0;lo=lo+Math.imul(al5,bl7)|0;mid=mid+Math.imul(al5,bh7)|0;mid=mid+Math.imul(ah5,bl7)|0;hi=hi+Math.imul(ah5,bh7)|0;lo=lo+Math.imul(al4,bl8)|0;mid=mid+Math.imul(al4,bh8)|0;mid=mid+Math.imul(ah4,bl8)|0;hi=hi+Math.imul(ah4,bh8)|0;lo=lo+Math.imul(al3,bl9)|0;mid=mid+Math.imul(al3,bh9)|0;mid=mid+Math.imul(ah3,bl9)|0;hi=hi+Math.imul(ah3,bh9)|0;var w12=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w12>>>26)|0;w12&=67108863;lo=Math.imul(al9,bl4);mid=Math.imul(al9,bh4);mid=mid+Math.imul(ah9,bl4)|0;hi=Math.imul(ah9,bh4);lo=lo+Math.imul(al8,bl5)|0;mid=mid+Math.imul(al8,bh5)|0;mid=mid+Math.imul(ah8,bl5)|0;hi=hi+Math.imul(ah8,bh5)|0;lo=lo+Math.imul(al7,bl6)|0;mid=mid+Math.imul(al7,bh6)|0;mid=mid+Math.imul(ah7,bl6)|0;hi=hi+Math.imul(ah7,bh6)|0;lo=lo+Math.imul(al6,bl7)|0;mid=mid+Math.imul(al6,bh7)|0;mid=mid+Math.imul(ah6,bl7)|0;hi=hi+Math.imul(ah6,bh7)|0;lo=lo+Math.imul(al5,bl8)|0;mid=mid+Math.imul(al5,bh8)|0;mid=mid+Math.imul(ah5,bl8)|0;hi=hi+Math.imul(ah5,bh8)|0;lo=lo+Math.imul(al4,bl9)|0;mid=mid+Math.imul(al4,bh9)|0;mid=mid+Math.imul(ah4,bl9)|0;hi=hi+Math.imul(ah4,bh9)|0;var w13=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w13>>>26)|0;w13&=67108863;lo=Math.imul(al9,bl5);mid=Math.imul(al9,bh5);mid=mid+Math.imul(ah9,bl5)|0;hi=Math.imul(ah9,bh5);lo=lo+Math.imul(al8,bl6)|0;mid=mid+Math.imul(al8,bh6)|0;mid=mid+Math.imul(ah8,bl6)|0;hi=hi+Math.imul(ah8,bh6)|0;lo=lo+Math.imul(al7,bl7)|0;mid=mid+Math.imul(al7,bh7)|0;mid=mid+Math.imul(ah7,bl7)|0;hi=hi+Math.imul(ah7,bh7)|0;lo=lo+Math.imul(al6,bl8)|0;mid=mid+Math.imul(al6,bh8)|0;mid=mid+Math.imul(ah6,bl8)|0;hi=hi+Math.imul(ah6,bh8)|0;lo=lo+Math.imul(al5,bl9)|0;mid=mid+Math.imul(al5,bh9)|0;mid=mid+Math.imul(ah5,bl9)|0;hi=hi+Math.imul(ah5,bh9)|0;var w14=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w14>>>26)|0;w14&=67108863;lo=Math.imul(al9,bl6);mid=Math.imul(al9,bh6);mid=mid+Math.imul(ah9,bl6)|0;hi=Math.imul(ah9,bh6);lo=lo+Math.imul(al8,bl7)|0;mid=mid+Math.imul(al8,bh7)|0;mid=mid+Math.imul(ah8,bl7)|0;hi=hi+Math.imul(ah8,bh7)|0;lo=lo+Math.imul(al7,bl8)|0;mid=mid+Math.imul(al7,bh8)|0;mid=mid+Math.imul(ah7,bl8)|0;hi=hi+Math.imul(ah7,bh8)|0;lo=lo+Math.imul(al6,bl9)|0;mid=mid+Math.imul(al6,bh9)|0;mid=mid+Math.imul(ah6,bl9)|0;hi=hi+Math.imul(ah6,bh9)|0;var w15=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w15>>>26)|0;w15&=67108863;lo=Math.imul(al9,bl7);mid=Math.imul(al9,bh7);mid=mid+Math.imul(ah9,bl7)|0;hi=Math.imul(ah9,bh7);lo=lo+Math.imul(al8,bl8)|0;mid=mid+Math.imul(al8,bh8)|0;mid=mid+Math.imul(ah8,bl8)|0;hi=hi+Math.imul(ah8,bh8)|0;lo=lo+Math.imul(al7,bl9)|0;mid=mid+Math.imul(al7,bh9)|0;mid=mid+Math.imul(ah7,bl9)|0;hi=hi+Math.imul(ah7,bh9)|0;var w16=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w16>>>26)|0;w16&=67108863;lo=Math.imul(al9,bl8);mid=Math.imul(al9,bh8);mid=mid+Math.imul(ah9,bl8)|0;hi=Math.imul(ah9,bh8);lo=lo+Math.imul(al8,bl9)|0;mid=mid+Math.imul(al8,bh9)|0;mid=mid+Math.imul(ah8,bl9)|0;hi=hi+Math.imul(ah8,bh9)|0;var w17=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w17>>>26)|0;w17&=67108863;lo=Math.imul(al9,bl9);mid=Math.imul(al9,bh9);mid=mid+Math.imul(ah9,bl9)|0;hi=Math.imul(ah9,bh9);var w18=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w18>>>26)|0;w18&=67108863;o[0]=w0;o[1]=w1; -o[2]=w2;o[3]=w3;o[4]=w4;o[5]=w5;o[6]=w6;o[7]=w7;o[8]=w8;o[9]=w9;o[10]=w10;o[11]=w11;o[12]=w12;o[13]=w13;o[14]=w14;o[15]=w15;o[16]=w16;o[17]=w17;o[18]=w18;if(c!==0){o[19]=c;out.length++}return out};if(!Math.imul){comb10MulTo=smallMulTo}function bigMulTo(self,num,out){out.negative=num.negative^self.negative;out.length=self.length+num.length;var carry=0;var hncarry=0;for(var k=0;k>>26)|0;hncarry+=ncarry>>>26;ncarry&=67108863}out.words[k]=rword;carry=ncarry;ncarry=hncarry}if(carry!==0){out.words[k]=carry}else{out.length--}return out.strip()}function jumboMulTo(self,num,out){var fftm=new FFTM;return fftm.mulp(self,num,out)}BN.prototype.mulTo=function mulTo(num,out){var res;var len=this.length+num.length;if(this.length===10&&num.length===10){res=comb10MulTo(this,num,out)}else if(len<63){res=smallMulTo(this,num,out)}else if(len<1024){res=bigMulTo(this,num,out)}else{res=jumboMulTo(this,num,out)}return res};function FFTM(x,y){this.x=x;this.y=y}FFTM.prototype.makeRBT=function makeRBT(N){var t=new Array(N);var l=BN.prototype._countBits(N)-1;for(var i=0;i>=1}return rb};FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i>>1){i++}return 1<>>13;rws[2*i+1]=carry&8191;carry=carry>>>13}for(i=2*len;i>=26;carry+=w/67108864|0;carry+=lo>>>26;this.words[i]=lo&67108863}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.muln=function muln(num){return this.clone().imuln(num)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(num){var w=toBitArray(num);if(w.length===0)return new BN(1);var res=this;for(var i=0;i=0);var r=bits%26;var s=(bits-r)/26;var carryMask=67108863>>>26-r<<26-r;var i;if(r!==0){var carry=0;for(i=0;i>>26-r}if(carry){this.words[i]=carry;this.length++}}if(s!==0){for(i=this.length-1;i>=0;i--){this.words[i+s]=this.words[i]}for(i=0;i=0);var h;if(hint){h=(hint-hint%26)/26}else{h=0}var r=bits%26;var s=Math.min((bits-r)/26,this.length);var mask=67108863^67108863>>>r<s){this.length-=s;for(i=0;i=0&&(carry!==0||i>=h);i--){var word=this.words[i]|0;this.words[i]=carry<<26-r|word>>>r;carry=word&mask}if(maskedWords&&carry!==0){maskedWords.words[maskedWords.length++]=carry}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};BN.prototype.ishrn=function ishrn(bits,hint,extended){assert(this.negative===0);return this.iushrn(bits,hint,extended)};BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)};BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)};BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)};BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)};BN.prototype.testn=function testn(bit){assert(typeof bit==="number"&&bit>=0);var r=bit%26;var s=(bit-r)/26;var q=1<=0);var r=bits%26;var s=(bits-r)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=s){return this}if(r!==0){s++}this.length=Math.min(s,this.length);if(r!==0){var mask=67108863^67108863>>>r<=67108864;i++){this.words[i]-=67108864;if(i===this.length-1){this.words[i+1]=1}else{this.words[i+1]++}}this.length=Math.max(this.length,i+1);return this};BN.prototype.isubn=function isubn(num){assert(typeof num==="number");assert(num<67108864);if(num<0)return this.iaddn(-num);if(this.negative!==0){this.negative=0;this.iaddn(num);this.negative=1;return this}this.words[0]-=num;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var i=0;i>26)-(right/67108864|0);this.words[i+shift]=w&67108863}for(;i>26;this.words[i+shift]=w&67108863}if(carry===0)return this.strip();assert(carry===-1);carry=0;for(i=0;i>26;this.words[i]=w&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=this.length-num.length;var a=this.clone();var b=num;var bhi=b.words[b.length-1]|0;var bhiBits=this._countBits(bhi);shift=26-bhiBits;if(shift!==0){b=b.ushln(shift);a.iushln(shift);bhi=b.words[b.length-1]|0}var m=a.length-b.length;var q;if(mode!=="mod"){q=new BN(null);q.length=m+1;q.words=new Array(q.length);for(var i=0;i=0;j--){var qj=(a.words[b.length+j]|0)*67108864+(a.words[b.length+j-1]|0);qj=Math.min(qj/bhi|0,67108863);a._ishlnsubmul(b,qj,j);while(a.negative!==0){qj--;a.negative=0;a._ishlnsubmul(b,1,j);if(!a.isZero()){a.negative^=1}}if(q){q.words[j]=qj}}if(q){q.strip()}a.strip();if(mode!=="div"&&shift!==0){a.iushrn(shift)}return{div:q||null,mod:a}};BN.prototype.divmod=function divmod(num,mode,positive){assert(!num.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var div,mod,res;if(this.negative!==0&&num.negative===0){res=this.neg().divmod(num,mode);if(mode!=="mod"){div=res.div.neg()}if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.iadd(num)}}return{div:div,mod:mod}}if(this.negative===0&&num.negative!==0){res=this.divmod(num.neg(),mode);if(mode!=="mod"){div=res.div.neg()}return{div:div,mod:res.mod}}if((this.negative&num.negative)!==0){res=this.neg().divmod(num.neg(),mode);if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.isub(num)}}return{div:res.div,mod:mod}}if(num.length>this.length||this.cmp(num)<0){return{div:new BN(0),mod:this}}if(num.length===1){if(mode==="div"){return{div:this.divn(num.words[0]),mod:null}}if(mode==="mod"){return{div:null,mod:new BN(this.modn(num.words[0]))}}return{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}}return this._wordDiv(num,mode)};BN.prototype.div=function div(num){return this.divmod(num,"div",false).div};BN.prototype.mod=function mod(num){return this.divmod(num,"mod",false).mod};BN.prototype.umod=function umod(num){return this.divmod(num,"mod",true).mod};BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=dm.div.negative!==0?dm.mod.isub(num):dm.mod;var half=num.ushrn(1);var r2=num.andln(1);var cmp=mod.cmp(half);if(cmp<0||r2===1&&cmp===0)return dm.div;return dm.div.negative!==0?dm.div.isubn(1):dm.div.iaddn(1)};BN.prototype.modn=function modn(num){assert(num<=67108863);var p=(1<<26)%num;var acc=0;for(var i=this.length-1;i>=0;i--){acc=(p*acc+(this.words[i]|0))%num}return acc};BN.prototype.idivn=function idivn(num){assert(num<=67108863);var carry=0;for(var i=this.length-1;i>=0;i--){var w=(this.words[i]|0)+carry*67108864;this.words[i]=w/num|0;carry=w%num}return this.strip()};BN.prototype.divn=function divn(num){return this.clone().idivn(num)};BN.prototype.egcd=function egcd(p){assert(p.negative===0);assert(!p.isZero());var x=this;var y=p.clone();if(x.negative!==0){x=x.umod(p)}else{x=x.clone()}var A=new BN(1);var B=new BN(0);var C=new BN(0);var D=new BN(1);var g=0;while(x.isEven()&&y.isEven()){x.iushrn(1);y.iushrn(1);++g}var yp=y.clone();var xp=x.clone();while(!x.isZero()){for(var i=0,im=1;(x.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){x.iushrn(i);while(i-- >0){if(A.isOdd()||B.isOdd()){A.iadd(yp);B.isub(xp)}A.iushrn(1);B.iushrn(1)}}for(var j=0,jm=1;(y.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){y.iushrn(j);while(j-- >0){if(C.isOdd()||D.isOdd()){C.iadd(yp);D.isub(xp)}C.iushrn(1);D.iushrn(1)}}if(x.cmp(y)>=0){x.isub(y);A.isub(C);B.isub(D)}else{y.isub(x);C.isub(A);D.isub(B)}}return{a:C,b:D,gcd:y.iushln(g)}};BN.prototype._invmp=function _invmp(p){assert(p.negative===0);assert(!p.isZero());var a=this;var b=p.clone();if(a.negative!==0){a=a.umod(p)}else{a=a.clone()}var x1=new BN(1);var x2=new BN(0);var delta=b.clone();while(a.cmpn(1)>0&&b.cmpn(1)>0){for(var i=0,im=1;(a.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){a.iushrn(i);while(i-- >0){if(x1.isOdd()){x1.iadd(delta)}x1.iushrn(1)}}for(var j=0,jm=1;(b.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){b.iushrn(j);while(j-- >0){if(x2.isOdd()){x2.iadd(delta)}x2.iushrn(1)}}if(a.cmp(b)>=0){a.isub(b);x1.isub(x2)}else{b.isub(a);x2.isub(x1)}}var res;if(a.cmpn(1)===0){res=x1}else{res=x2}if(res.cmpn(0)<0){res.iadd(p)}return res};BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone();var b=num.clone();a.negative=0;b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++){a.iushrn(1);b.iushrn(1)}do{while(a.isEven()){a.iushrn(1)}while(b.isEven()){b.iushrn(1)}var r=a.cmp(b);if(r<0){var t=a;a=b;b=t}else if(r===0||b.cmpn(1)===0){break}a.isub(b)}while(true);return b.iushln(shift)};BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(num){return this.words[0]&num};BN.prototype.bincn=function bincn(bit){assert(typeof bit==="number");var r=bit%26;var s=(bit-r)/26;var q=1<>>26;w&=67108863;this.words[i]=w}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(num){var negative=num<0;if(this.negative!==0&&!negative)return-1;if(this.negative===0&&negative)return 1;this.strip();var res;if(this.length>1){res=1}else{if(negative){num=-num}assert(num<=67108863,"Number is too big");var w=this.words[0]|0;res=w===num?0:wnum.length)return 1;if(this.length=0;i--){var a=this.words[i]|0;var b=num.words[i]|0;if(a===b)continue;if(ab){res=1}break}return res};BN.prototype.gtn=function gtn(num){return this.cmpn(num)===1};BN.prototype.gt=function gt(num){return this.cmp(num)===1};BN.prototype.gten=function gten(num){return this.cmpn(num)>=0};BN.prototype.gte=function gte(num){return this.cmp(num)>=0};BN.prototype.ltn=function ltn(num){return this.cmpn(num)===-1};BN.prototype.lt=function lt(num){return this.cmp(num)===-1};BN.prototype.lten=function lten(num){return this.cmpn(num)<=0};BN.prototype.lte=function lte(num){return this.cmp(num)<=0};BN.prototype.eqn=function eqn(num){return this.cmpn(num)===0};BN.prototype.eq=function eq(num){return this.cmp(num)===0};BN.red=function red(num){return new Red(num)};BN.prototype.toRed=function toRed(ctx){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return ctx.convertTo(this)._forceRed(ctx)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(ctx){this.red=ctx;return this};BN.prototype.forceRed=function forceRed(ctx){assert(!this.red,"Already a number in reduction context");return this._forceRed(ctx)};BN.prototype.redAdd=function redAdd(num){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,num)};BN.prototype.redIAdd=function redIAdd(num){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,num)};BN.prototype.redSub=function redSub(num){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,num)};BN.prototype.redISub=function redISub(num){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,num)};BN.prototype.redShl=function redShl(num){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,num)};BN.prototype.redMul=function redMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.mul(this,num)};BN.prototype.redIMul=function redIMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.imul(this,num)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(num){assert(this.red&&!num.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name;this.p=new BN(p,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);tmp.words=new Array(Math.ceil(this.n/13));return tmp};MPrime.prototype.ireduce=function ireduce(num){var r=num;var rlen;do{this.split(r,this.tmp);r=this.imulK(r);r=r.iadd(this.tmp);rlen=r.bitLength()}while(rlen>this.n);var cmp=rlen0){r.isub(this.p)}else{r.strip()}return r};MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)};MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(input,output){var mask=4194303;var outLen=Math.min(input.length,9);for(var i=0;i>>22;prev=next}prev>>>=22;input.words[i-10]=prev;if(prev===0&&input.length>10){input.length-=10}else{input.length-=9}};K256.prototype.imulK=function imulK(num){num.words[num.length]=0;num.words[num.length+1]=0;num.length+=2;var lo=0;for(var i=0;i>>=26;num.words[i]=lo;carry=hi}if(carry!==0){num.words[num.length++]=carry}return num};BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if(name==="k256"){prime=new K256}else if(name==="p224"){prime=new P224}else if(name==="p192"){prime=new P192}else if(name==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+name)}primes[name]=prime;return prime};function Red(m){if(typeof m==="string"){var prime=BN._prime(m);this.m=prime.p;this.prime=prime}else{assert(m.gtn(1),"modulus must be greater than 1");this.m=m;this.prime=null}}Red.prototype._verify1=function _verify1(a){assert(a.negative===0,"red works only with positives");assert(a.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(a,b){assert((a.negative|b.negative)===0,"red works only with positives");assert(a.red&&a.red===b.red,"red works only with red numbers")};Red.prototype.imod=function imod(a){if(this.prime)return this.prime.ireduce(a)._forceRed(this);return a.umod(this.m)._forceRed(this)};Red.prototype.neg=function neg(a){if(a.isZero()){return a.clone()}return this.m.sub(a)._forceRed(this)};Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res._forceRed(this)};Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res};Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res._forceRed(this)};Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res};Red.prototype.shl=function shl(a,num){this._verify1(a);return this.imod(a.ushln(num))};Red.prototype.imul=function imul(a,b){this._verify2(a,b);return this.imod(a.imul(b))};Red.prototype.mul=function mul(a,b){this._verify2(a,b);return this.imod(a.mul(b))};Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())};Red.prototype.sqr=function sqr(a){return this.mul(a,a)};Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);assert(mod3%2===1);if(mod3===3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}var q=this.m.subn(1);var s=0;while(!q.isZero()&&q.andln(1)===0){s++;q.iushrn(1)}assert(!q.isZero());var one=new BN(1).toRed(this);var nOne=one.redNeg();var lpow=this.m.subn(1).iushrn(1);var z=this.m.bitLength();z=new BN(2*z*z).toRed(this);while(this.pow(z,lpow).cmp(nOne)!==0){z.redIAdd(nOne)}var c=this.pow(z,q);var r=this.pow(a,q.addn(1).iushrn(1));var t=this.pow(a,q);var m=s;while(t.cmp(one)!==0){var tmp=t;for(var i=0;tmp.cmp(one)!==0;i++){tmp=tmp.redSqr()}assert(i=0;i--){var word=num.words[i];for(var j=start-1;j>=0;j--){var bit=word>>j&1;if(res!==wnd[0]){res=this.sqr(res)}if(bit===0&¤t===0){currentLen=0;continue}current<<=1;current|=bit;currentLen++;if(currentLen!==windowSize&&(i!==0||j!==0))continue;res=this.mul(res,wnd[current]);currentLen=0;current=0}start=26}return res};Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r};Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();res.red=null;return res};BN.mont=function mont(num){return new Mont(num)};function Mont(m){Red.call(this,m);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(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)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));r.red=null;return r};Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero()){a.words[0]=0;a.length=1;return a}var t=a.imul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.invm=function invm(a){var res=this.imod(a._invmp(this.m).mul(this.r2));return res._forceRed(this)}})(typeof module==="undefined"||module,this)},{}],36:[function(require,module,exports){var r;module.exports=function rand(len){if(!r)r=new Rand(null);return r.generate(len)};function Rand(rand){this.rand=rand}module.exports.Rand=Rand;Rand.prototype.generate=function generate(len){return this._rand(len)};if(typeof window==="object"){if(window.crypto&&window.crypto.getRandomValues){Rand.prototype._rand=function _rand(n){var arr=new Uint8Array(n);window.crypto.getRandomValues(arr);return arr}}else if(window.msCrypto&&window.msCrypto.getRandomValues){Rand.prototype._rand=function _rand(n){var arr=new Uint8Array(n);window.msCrypto.getRandomValues(arr);return arr}}else{Rand.prototype._rand=function(){throw new Error("Not implemented yet")}}}else{try{var crypto=require("crypto");Rand.prototype._rand=function _rand(n){return crypto.randomBytes(n)}}catch(e){Rand.prototype._rand=function _rand(n){var res=new Uint8Array(n);for(var i=0;iuint_max||x<0?(x_pos=Math.abs(x)%uint_max,x<0?uint_max-x_pos:x_pos):x;return ret}function scrub_vec(v){for(var i=0;i>>8^sx&255^99;this.SBOX[x]=sx;this.INV_SBOX[sx]=x;x2=d[x];x4=d[x2];x8=d[x4];t=d[sx]*257^sx*16843008;this.SUB_MIX[0][x]=t<<24|t>>>8;this.SUB_MIX[1][x]=t<<16|t>>>16;this.SUB_MIX[2][x]=t<<8|t>>>24;this.SUB_MIX[3][x]=t;t=x8*16843009^x4*65537^x2*257^x*16843008;this.INV_SUB_MIX[0][sx]=t<<24|t>>>8;this.INV_SUB_MIX[1][sx]=t<<16|t>>>16;this.INV_SUB_MIX[2][sx]=t<<8|t>>>24;this.INV_SUB_MIX[3][sx]=t;if(x===0){x=xi=1}else{x=x2^d[d[d[x8^x2]]];xi^=d[d[xi]]}}return true};var G=new Global;AES.blockSize=4*4;AES.prototype.blockSize=AES.blockSize;AES.keySize=256/8;AES.prototype.keySize=AES.keySize;function bufferToArray(buf){var len=buf.length/4;var out=new Array(len);var i=-1;while(++i>>24,t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[t&255],t^=G.RCON[ksRow/keySize|0]<<24):keySize>6&&ksRow%keySize===4?t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[t&255]:void 0,this._keySchedule[ksRow-keySize]^t)}this._invKeySchedule=[];for(invKsRow=0;invKsRow>>24]]^G.INV_SUB_MIX[1][G.SBOX[t>>>16&255]]^G.INV_SUB_MIX[2][G.SBOX[t>>>8&255]]^G.INV_SUB_MIX[3][G.SBOX[t&255]]}return true};AES.prototype.encryptBlock=function(M){M=bufferToArray(new Buffer(M));var out=this._doCryptBlock(M,this._keySchedule,G.SUB_MIX,G.SBOX);var buf=new Buffer(16);buf.writeUInt32BE(out[0],0);buf.writeUInt32BE(out[1],4);buf.writeUInt32BE(out[2],8);buf.writeUInt32BE(out[3],12);return buf};AES.prototype.decryptBlock=function(M){M=bufferToArray(new Buffer(M));var temp=[M[3],M[1]];M[1]=temp[0];M[3]=temp[1];var out=this._doCryptBlock(M,this._invKeySchedule,G.INV_SUB_MIX,G.INV_SBOX);var buf=new Buffer(16);buf.writeUInt32BE(out[0],0);buf.writeUInt32BE(out[3],4);buf.writeUInt32BE(out[2],8);buf.writeUInt32BE(out[1],12);return buf};AES.prototype.scrub=function(){scrub_vec(this._keySchedule);scrub_vec(this._invKeySchedule);scrub_vec(this._key)};AES.prototype._doCryptBlock=function(M,keySchedule,SUB_MIX,SBOX){var ksRow,s0,s1,s2,s3,t0,t1,t2,t3;s0=M[0]^keySchedule[0];s1=M[1]^keySchedule[1];s2=M[2]^keySchedule[2];s3=M[3]^keySchedule[3];ksRow=4;for(var round=1;round>>24]^SUB_MIX[1][s1>>>16&255]^SUB_MIX[2][s2>>>8&255]^SUB_MIX[3][s3&255]^keySchedule[ksRow++];t1=SUB_MIX[0][s1>>>24]^SUB_MIX[1][s2>>>16&255]^SUB_MIX[2][s3>>>8&255]^SUB_MIX[3][s0&255]^keySchedule[ksRow++];t2=SUB_MIX[0][s2>>>24]^SUB_MIX[1][s3>>>16&255]^SUB_MIX[2][s0>>>8&255]^SUB_MIX[3][s1&255]^keySchedule[ksRow++];t3=SUB_MIX[0][s3>>>24]^SUB_MIX[1][s0>>>16&255]^SUB_MIX[2][s1>>>8&255]^SUB_MIX[3][s2&255]^keySchedule[ksRow++];s0=t0;s1=t1;s2=t2;s3=t3}t0=(SBOX[s0>>>24]<<24|SBOX[s1>>>16&255]<<16|SBOX[s2>>>8&255]<<8|SBOX[s3&255])^keySchedule[ksRow++];t1=(SBOX[s1>>>24]<<24|SBOX[s2>>>16&255]<<16|SBOX[s3>>>8&255]<<8|SBOX[s0&255])^keySchedule[ksRow++];t2=(SBOX[s2>>>24]<<24|SBOX[s3>>>16&255]<<16|SBOX[s0>>>8&255]<<8|SBOX[s1&255])^keySchedule[ksRow++];t3=(SBOX[s3>>>24]<<24|SBOX[s0>>>16&255]<<16|SBOX[s1>>>8&255]<<8|SBOX[s2&255])^keySchedule[ksRow++];return[fixup_uint32(t0),fixup_uint32(t1),fixup_uint32(t2),fixup_uint32(t3)]};exports.AES=AES}).call(this,require("buffer").Buffer)},{buffer:67}],39:[function(require,module,exports){(function(Buffer){var aes=require("./aes");var Transform=require("cipher-base");var inherits=require("inherits");var GHASH=require("./ghash");var xor=require("buffer-xor");inherits(StreamCipher,Transform);module.exports=StreamCipher;function StreamCipher(mode,key,iv,decrypt){if(!(this instanceof StreamCipher)){return new StreamCipher(mode,key,iv)}Transform.call(this);this._finID=Buffer.concat([iv,new Buffer([0,0,0,1])]); -iv=Buffer.concat([iv,new Buffer([0,0,0,2])]);this._cipher=new aes.AES(key);this._prev=new Buffer(iv.length);this._cache=new Buffer("");this._secCache=new Buffer("");this._decrypt=decrypt;this._alen=0;this._len=0;iv.copy(this._prev);this._mode=mode;var h=new Buffer(4);h.fill(0);this._ghash=new GHASH(this._cipher.encryptBlock(h));this._authTag=null;this._called=false}StreamCipher.prototype._update=function(chunk){if(!this._called&&this._alen){var rump=16-this._alen%16;if(rump<16){rump=new Buffer(rump);rump.fill(0);this._ghash.update(rump)}}this._called=true;var out=this._mode.encrypt(this,chunk);if(this._decrypt){this._ghash.update(chunk)}else{this._ghash.update(out)}this._len+=chunk.length;return out};StreamCipher.prototype._final=function(){if(this._decrypt&&!this._authTag){throw new Error("Unsupported state or unable to authenticate data")}var tag=xor(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(xorTest(tag,this._authTag)){throw new Error("Unsupported state or unable to authenticate data")}}else{this._authTag=tag}this._cipher.scrub()};StreamCipher.prototype.getAuthTag=function getAuthTag(){if(!this._decrypt&&Buffer.isBuffer(this._authTag)){return this._authTag}else{throw new Error("Attempting to get auth tag in unsupported state")}};StreamCipher.prototype.setAuthTag=function setAuthTag(tag){if(this._decrypt){this._authTag=tag}else{throw new Error("Attempting to set auth tag in unsupported state")}};StreamCipher.prototype.setAAD=function setAAD(buf){if(!this._called){this._ghash.update(buf);this._alen+=buf.length}else{throw new Error("Attempting to set AAD in unsupported state")}};function xorTest(a,b){var out=0;if(a.length!==b.length){out++}var len=Math.min(a.length,b.length);var i=-1;while(++i16){out=this.cache.slice(0,16);this.cache=this.cache.slice(16);return out}}else{if(this.cache.length>=16){out=this.cache.slice(0,16);this.cache=this.cache.slice(16);return out}}return null};Splitter.prototype.flush=function(){if(this.cache.length){return this.cache}};function unpad(last){var padded=last[15];var i=-1;while(++i15){var out=this.cache.slice(0,16);this.cache=this.cache.slice(16);return out}return null};Splitter.prototype.flush=function(){var len=16-this.cache.length;var padBuff=new Buffer(len);var i=-1;while(++i0;j--){Vi[j]=Vi[j]>>>1|(Vi[j-1]&1)<<31}Vi[0]=Vi[0]>>>1;if(lsb_Vi){Vi[0]=Vi[0]^225<<24}}this.state=fromArray(Zi)};GHASH.prototype.update=function(buf){this.cache=Buffer.concat([this.cache,buf]);var chunk;while(this.cache.length>=16){chunk=this.cache.slice(0,16);this.cache=this.cache.slice(16);this.ghash(chunk)}};GHASH.prototype.final=function(abl,bl){if(this.cache.length){this.ghash(Buffer.concat([this.cache,zeros],16))}this.ghash(fromArray([0,abl,0,bl]));return this.state};function toArray(buf){return[buf.readUInt32BE(0),buf.readUInt32BE(4),buf.readUInt32BE(8),buf.readUInt32BE(12)]}function fromArray(out){out=out.map(fixup_uint32);var buf=new Buffer(16);buf.writeUInt32BE(out[0],0);buf.writeUInt32BE(out[1],4);buf.writeUInt32BE(out[2],8);buf.writeUInt32BE(out[3],12);return buf}var uint_max=Math.pow(2,32);function fixup_uint32(x){var ret,x_pos;ret=x>uint_max||x<0?(x_pos=Math.abs(x)%uint_max,x<0?uint_max-x_pos:x_pos):x;return ret}function xor(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}}).call(this,require("buffer").Buffer)},{buffer:67}],44:[function(require,module,exports){exports["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"};exports["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"};exports["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"};exports["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"};exports["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"};exports["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"};exports["aes128"]=exports["aes-128-cbc"];exports["aes192"]=exports["aes-192-cbc"];exports["aes256"]=exports["aes-256-cbc"];exports["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"};exports["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"};exports["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"};exports["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"};exports["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"};exports["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"};exports["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"};exports["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"};exports["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"};exports["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"};exports["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"};exports["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"};exports["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"};exports["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"};exports["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"};exports["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"};exports["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"};exports["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],45:[function(require,module,exports){var xor=require("buffer-xor");exports.encrypt=function(self,block){var data=xor(block,self._prev);self._prev=self._cipher.encryptBlock(data);return self._prev};exports.decrypt=function(self,block){var pad=self._prev;self._prev=block;var out=self._cipher.decryptBlock(block);return xor(out,pad)}},{"buffer-xor":66}],46:[function(require,module,exports){(function(Buffer){var xor=require("buffer-xor");exports.encrypt=function(self,data,decrypt){var out=new Buffer("");var len;while(data.length){if(self._cache.length===0){self._cache=self._cipher.encryptBlock(self._prev);self._prev=new Buffer("")}if(self._cache.length<=data.length){len=self._cache.length;out=Buffer.concat([out,encryptStart(self,data.slice(0,len),decrypt)]);data=data.slice(len)}else{out=Buffer.concat([out,encryptStart(self,data,decrypt)]);break}}return out};function encryptStart(self,data,decrypt){var len=data.length;var out=xor(data,self._cache);self._cache=self._cache.slice(len);self._prev=Buffer.concat([self._prev,decrypt?data:out]);return out}}).call(this,require("buffer").Buffer)},{buffer:67,"buffer-xor":66}],47:[function(require,module,exports){(function(Buffer){function encryptByte(self,byteParam,decrypt){var pad;var i=-1;var len=8;var out=0;var bit,value;while(++i>i%8;self._prev=shiftIn(self._prev,decrypt?bit:value)}return out}exports.encrypt=function(self,chunk,decrypt){var len=chunk.length;var out=new Buffer(len);var i=-1;while(++i>7}return out}}).call(this,require("buffer").Buffer)},{buffer:67}],48:[function(require,module,exports){(function(Buffer){function encryptByte(self,byteParam,decrypt){var pad=self._cipher.encryptBlock(self._prev);var out=pad[0]^byteParam;self._prev=Buffer.concat([self._prev.slice(1),new Buffer([decrypt?byteParam:out])]);return out}exports.encrypt=function(self,chunk,decrypt){var len=chunk.length;var out=new Buffer(len);var i=-1;while(++i=0||!r.umod(priv.prime1)||!r.umod(priv.prime2)){r=new bn(randomBytes(len))}return r}}).call(this,require("buffer").Buffer)},{"bn.js":35,buffer:67,randombytes:214}],57:[function(require,module,exports){(function(Buffer){"use strict";exports["RSA-SHA224"]=exports.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new Buffer("302d300d06096086480165030402040500041c","hex")};exports["RSA-SHA256"]=exports.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new Buffer("3031300d060960864801650304020105000420","hex")};exports["RSA-SHA384"]=exports.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new Buffer("3041300d060960864801650304020205000430","hex")};exports["RSA-SHA512"]=exports.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new Buffer("3051300d060960864801650304020305000440","hex")};exports["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new Buffer("3021300906052b0e03021a05000414","hex")};exports["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new Buffer("","hex")};exports.DSA=exports["DSA-SHA1"]=exports["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new Buffer("","hex")};exports["DSA-SHA224"]=exports["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new Buffer("","hex")};exports["DSA-SHA256"]=exports["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new Buffer("","hex")};exports["DSA-SHA384"]=exports["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new Buffer("","hex")};exports["DSA-SHA512"]=exports["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new Buffer("","hex")};exports["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new Buffer("","hex")};exports["RSA-RIPEMD160"]=exports.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new Buffer("3021300906052b2403020105000414","hex")};exports["RSA-MD5"]=exports.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new Buffer("3020300c06082a864886f70d020505000410","hex")}}).call(this,require("buffer").Buffer)},{buffer:67}],58:[function(require,module,exports){(function(Buffer){var _algos=require("./algos");var createHash=require("create-hash");var inherits=require("inherits");var sign=require("./sign");var stream=require("stream");var verify=require("./verify");var algos={};Object.keys(_algos).forEach(function(key){algos[key]=algos[key.toLowerCase()]=_algos[key]});function Sign(algorithm){stream.Writable.call(this);var data=algos[algorithm];if(!data){throw new Error("Unknown message digest")}this._hashType=data.hash;this._hash=createHash(data.hash);this._tag=data.id;this._signType=data.sign}inherits(Sign,stream.Writable);Sign.prototype._write=function _write(data,_,done){this._hash.update(data);done()};Sign.prototype.update=function update(data,enc){if(typeof data==="string"){data=new Buffer(data,enc)}this._hash.update(data);return this};Sign.prototype.sign=function signMethod(key,enc){this.end();var hash=this._hash.digest();var sig=sign(Buffer.concat([this._tag,hash]),key,this._hashType,this._signType);return enc?sig.toString(enc):sig};function Verify(algorithm){stream.Writable.call(this);var data=algos[algorithm];if(!data){throw new Error("Unknown message digest")}this._hash=createHash(data.hash);this._tag=data.id;this._signType=data.sign}inherits(Verify,stream.Writable);Verify.prototype._write=function _write(data,_,done){this._hash.update(data);done()};Verify.prototype.update=function update(data,enc){if(typeof data==="string"){data=new Buffer(data,enc)}this._hash.update(data);return this};Verify.prototype.verify=function verifyMethod(key,sig,enc){if(typeof sig==="string"){sig=new Buffer(sig,enc)}this.end();var hash=this._hash.digest();return verify(sig,Buffer.concat([this._tag,hash]),key,this._signType)};function createSign(algorithm){return new Sign(algorithm)}function createVerify(algorithm){return new Verify(algorithm)}module.exports={Sign:createSign,Verify:createVerify,createSign:createSign,createVerify:createVerify}}).call(this,require("buffer").Buffer)},{"./algos":57,"./sign":60,"./verify":61,buffer:67,"create-hash":74,inherits:152,stream:271}],59:[function(require,module,exports){"use strict";exports["1.3.132.0.10"]="secp256k1";exports["1.3.132.0.33"]="p224";exports["1.2.840.10045.3.1.1"]="p192";exports["1.2.840.10045.3.1.7"]="p256";exports["1.3.132.0.34"]="p384";exports["1.3.132.0.35"]="p521"},{}],60:[function(require,module,exports){(function(Buffer){var createHmac=require("create-hmac");var crt=require("browserify-rsa");var curves=require("./curves");var elliptic=require("elliptic");var parseKeys=require("parse-asn1");var BN=require("bn.js");var EC=elliptic.ec;function sign(hash,key,hashType,signType){var priv=parseKeys(key);if(priv.curve){if(signType!=="ecdsa")throw new Error("wrong private key type");return ecSign(hash,priv)}else if(priv.type==="dsa"){if(signType!=="dsa"){throw new Error("wrong private key type")}return dsaSign(hash,priv,hashType)}else{if(signType!=="rsa")throw new Error("wrong private key type")}var len=priv.modulus.byteLength();var pad=[0,1];while(hash.length+pad.length+10){bits.ishrn(shift)}return bits}function bits2octets(bits,q){bits=bits2int(bits,q);bits=bits.mod(q);var out=new Buffer(bits.toArray());if(out.length=q){throw new Error("invalid sig")}}module.exports=verify}).call(this,require("buffer").Buffer)},{"./curves":59,"bn.js":35,buffer:67,elliptic:93,"parse-asn1":191}],62:[function(require,module,exports){(function(process,Buffer){var msg=require("pako/lib/zlib/messages");var zstream=require("pako/lib/zlib/zstream");var zlib_deflate=require("pako/lib/zlib/deflate.js");var zlib_inflate=require("pako/lib/zlib/inflate.js");var constants=require("pako/lib/zlib/constants");for(var key in constants){exports[key]=constants[key]}exports.NONE=0;exports.DEFLATE=1;exports.INFLATE=2;exports.GZIP=3;exports.GUNZIP=4;exports.DEFLATERAW=5;exports.INFLATERAW=6;exports.UNZIP=7;function Zlib(mode){if(modeexports.UNZIP)throw new TypeError("Bad argument");this.mode=mode;this.init_done=false;this.write_in_progress=false;this.pending_close=false;this.windowBits=0;this.level=0;this.memLevel=0;this.strategy=0;this.dictionary=null}Zlib.prototype.init=function(windowBits,level,memLevel,strategy,dictionary){this.windowBits=windowBits;this.level=level;this.memLevel=memLevel;this.strategy=strategy;if(this.mode===exports.GZIP||this.mode===exports.GUNZIP)this.windowBits+=16;if(this.mode===exports.UNZIP)this.windowBits+=32;if(this.mode===exports.DEFLATERAW||this.mode===exports.INFLATERAW)this.windowBits=-this.windowBits;this.strm=new zstream;switch(this.mode){case exports.DEFLATE:case exports.GZIP: -case exports.DEFLATERAW:var status=zlib_deflate.deflateInit2(this.strm,this.level,exports.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case exports.INFLATE:case exports.GUNZIP:case exports.INFLATERAW:case exports.UNZIP:var status=zlib_inflate.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}if(status!==exports.Z_OK){this._error(status);return}this.write_in_progress=false;this.init_done=true};Zlib.prototype.params=function(){throw new Error("deflateParams Not supported")};Zlib.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===exports.NONE)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")};Zlib.prototype.write=function(flush,input,in_off,in_len,out,out_off,out_len){this._writeCheck();this.write_in_progress=true;var self=this;process.nextTick(function(){self.write_in_progress=false;var res=self._write(flush,input,in_off,in_len,out,out_off,out_len);self.callback(res[0],res[1]);if(self.pending_close)self.close()});return this};function bufferSet(data,offset){for(var i=0;iexports.Z_MAX_CHUNK){throw new Error("Invalid chunk size: "+opts.chunkSize)}}if(opts.windowBits){if(opts.windowBitsexports.Z_MAX_WINDOWBITS){throw new Error("Invalid windowBits: "+opts.windowBits)}}if(opts.level){if(opts.levelexports.Z_MAX_LEVEL){throw new Error("Invalid compression level: "+opts.level)}}if(opts.memLevel){if(opts.memLevelexports.Z_MAX_MEMLEVEL){throw new Error("Invalid memLevel: "+opts.memLevel)}}if(opts.strategy){if(opts.strategy!=exports.Z_FILTERED&&opts.strategy!=exports.Z_HUFFMAN_ONLY&&opts.strategy!=exports.Z_RLE&&opts.strategy!=exports.Z_FIXED&&opts.strategy!=exports.Z_DEFAULT_STRATEGY){throw new Error("Invalid strategy: "+opts.strategy)}}if(opts.dictionary){if(!Buffer.isBuffer(opts.dictionary)){throw new Error("Invalid dictionary: it should be a Buffer instance")}}this._binding=new binding.Zlib(mode);var self=this;this._hadError=false;this._binding.onerror=function(message,errno){self._binding=null;self._hadError=true;var error=new Error(message);error.errno=errno;error.code=exports.codes[errno];self.emit("error",error)};var level=exports.Z_DEFAULT_COMPRESSION;if(typeof opts.level==="number")level=opts.level;var strategy=exports.Z_DEFAULT_STRATEGY;if(typeof opts.strategy==="number")strategy=opts.strategy;this._binding.init(opts.windowBits||exports.Z_DEFAULT_WINDOWBITS,level,opts.memLevel||exports.Z_DEFAULT_MEMLEVEL,strategy,opts.dictionary);this._buffer=new Buffer(this._chunkSize);this._offset=0;this._closed=false;this._level=level;this._strategy=strategy;this.once("end",this.close)}util.inherits(Zlib,Transform);Zlib.prototype.params=function(level,strategy,callback){if(levelexports.Z_MAX_LEVEL){throw new RangeError("Invalid compression level: "+level)}if(strategy!=exports.Z_FILTERED&&strategy!=exports.Z_HUFFMAN_ONLY&&strategy!=exports.Z_RLE&&strategy!=exports.Z_FIXED&&strategy!=exports.Z_DEFAULT_STRATEGY){throw new TypeError("Invalid strategy: "+strategy)}if(this._level!==level||this._strategy!==strategy){var self=this;this.flush(binding.Z_SYNC_FLUSH,function(){self._binding.params(level,strategy);if(!self._hadError){self._level=level;self._strategy=strategy;if(callback)callback()}})}else{process.nextTick(callback)}};Zlib.prototype.reset=function(){return this._binding.reset()};Zlib.prototype._flush=function(callback){this._transform(new Buffer(0),"",callback)};Zlib.prototype.flush=function(kind,callback){var ws=this._writableState;if(typeof kind==="function"||kind===void 0&&!callback){callback=kind;kind=binding.Z_FULL_FLUSH}if(ws.ended){if(callback)process.nextTick(callback)}else if(ws.ending){if(callback)this.once("end",callback)}else if(ws.needDrain){var self=this;this.once("drain",function(){self.flush(callback)})}else{this._flushFlag=kind;this.write(new Buffer(0),"",callback)}};Zlib.prototype.close=function(callback){if(callback)process.nextTick(callback);if(this._closed)return;this._closed=true;this._binding.close();var self=this;process.nextTick(function(){self.emit("close")})};Zlib.prototype._transform=function(chunk,encoding,cb){var flushFlag;var ws=this._writableState;var ending=ws.ending||ws.ended;var last=ending&&(!chunk||ws.length===chunk.length);if(!chunk===null&&!Buffer.isBuffer(chunk))return cb(new Error("invalid input"));if(last)flushFlag=binding.Z_FINISH;else{flushFlag=this._flushFlag;if(chunk.length>=ws.length){this._flushFlag=this._opts.flush||binding.Z_NO_FLUSH}}var self=this;this._processChunk(chunk,flushFlag,cb)};Zlib.prototype._processChunk=function(chunk,flushFlag,cb){var availInBefore=chunk&&chunk.length;var availOutBefore=this._chunkSize-this._offset;var inOff=0;var self=this;var async=typeof cb==="function";if(!async){var buffers=[];var nread=0;var error;this.on("error",function(er){error=er});do{var res=this._binding.writeSync(flushFlag,chunk,inOff,availInBefore,this._buffer,this._offset,availOutBefore)}while(!this._hadError&&callback(res[0],res[1]));if(this._hadError){throw error}var buf=Buffer.concat(buffers,nread);this.close();return buf}var req=this._binding.write(flushFlag,chunk,inOff,availInBefore,this._buffer,this._offset,availOutBefore);req.buffer=chunk;req.callback=callback;function callback(availInAfter,availOutAfter){if(self._hadError)return;var have=availOutBefore-availOutAfter;assert(have>=0,"have should not go down");if(have>0){var out=self._buffer.slice(self._offset,self._offset+have);self._offset+=have;if(async){self.push(out)}else{buffers.push(out);nread+=out.length}}if(availOutAfter===0||self._offset>=self._chunkSize){availOutBefore=self._chunkSize;self._offset=0;self._buffer=new Buffer(self._chunkSize)}if(availOutAfter===0){inOff+=availInBefore-availInAfter;availInBefore=availInAfter;if(!async)return true;var newReq=self._binding.write(flushFlag,chunk,inOff,availInBefore,self._buffer,self._offset,self._chunkSize);newReq.callback=callback;newReq.buffer=chunk;return}if(!async)return false;cb()}};util.inherits(Deflate,Zlib);util.inherits(Inflate,Zlib);util.inherits(Gzip,Zlib);util.inherits(Gunzip,Zlib);util.inherits(DeflateRaw,Zlib);util.inherits(InflateRaw,Zlib);util.inherits(Unzip,Zlib)}).call(this,require("_process"),require("buffer").Buffer)},{"./binding":62,_process:198,_stream_transform:224,assert:29,buffer:67,util:293}],64:[function(require,module,exports){arguments[4][37][0].apply(exports,arguments)},{dup:37}],65:[function(require,module,exports){(function(global){"use strict";var buffer=require("buffer");var Buffer=buffer.Buffer;var SlowBuffer=buffer.SlowBuffer;var MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function alloc(size,fill,encoding){if(typeof Buffer.alloc==="function"){return Buffer.alloc(size,fill,encoding)}if(typeof encoding==="number"){throw new TypeError("encoding must not be number")}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>MAX_LEN){throw new RangeError("size is too large")}var enc=encoding;var _fill=fill;if(_fill===undefined){enc=undefined;_fill=0}var buf=new Buffer(size);if(typeof _fill==="string"){var fillBuf=new Buffer(_fill,enc);var flen=fillBuf.length;var i=-1;while(++iMAX_LEN){throw new RangeError("size is too large")}return new Buffer(size)};exports.from=function from(value,encodingOrOffset,length){if(typeof Buffer.from==="function"&&(!global.Uint8Array||Uint8Array.from!==Buffer.from)){return Buffer.from(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof value==="string"){return new Buffer(value,encodingOrOffset)}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(arguments.length===1){return new Buffer(value)}if(typeof offset==="undefined"){offset=0}var len=length;if(typeof len==="undefined"){len=value.byteLength-offset}if(offset>=value.byteLength){throw new RangeError("'offset' is out of bounds")}if(len>value.byteLength-offset){throw new RangeError("'length' is out of bounds")}return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);value.copy(out,0,0,value.length);return out}if(value){if(Array.isArray(value)||typeof ArrayBuffer!=="undefined"&&value.buffer instanceof ArrayBuffer||"length"in value){return new Buffer(value)}if(value.type==="Buffer"&&Array.isArray(value.data)){return new Buffer(value.data)}}throw new TypeError("First argument must be a string, Buffer, "+"ArrayBuffer, Array, or array-like object.")};exports.allocUnsafeSlow=function allocUnsafeSlow(size){if(typeof Buffer.allocUnsafeSlow==="function"){return Buffer.allocUnsafeSlow(size)}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>=MAX_LEN){throw new RangeError("size is too large")}return new SlowBuffer(size)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{buffer:67}],66:[function(require,module,exports){(function(Buffer){module.exports=function xor(a,b){var length=Math.min(a.length,b.length);var buffer=new Buffer(length);for(var i=0;i=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0) -}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":33,ieee754:150,isarray:158}],68:[function(require,module,exports){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],69:[function(require,module,exports){function Caseless(dict){this.dict=dict||{}}Caseless.prototype.set=function(name,value,clobber){if(typeof name==="object"){for(var i in name){this.set(i,name[i],value)}}else{if(typeof clobber==="undefined")clobber=true;var has=this.has(name);if(!clobber&&has)this.dict[has]=this.dict[has]+","+value;else this.dict[has||name]=value;return has}};Caseless.prototype.has=function(name){var keys=Object.keys(this.dict),name=name.toLowerCase();for(var i=0;i>5]|=128<>>9<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function bit_rol(num,cnt){return num<>>32-cnt}module.exports=function md5(buf){return helpers.hash(buf,core_md5,16)}},{"./helpers":75}],77:[function(require,module,exports){(function(Buffer){"use strict";var createHash=require("create-hash/browser");var inherits=require("inherits");var Transform=require("stream").Transform;var ZEROS=new Buffer(128);ZEROS.fill(0);function Hmac(alg,key){Transform.call(this);alg=alg.toLowerCase();if(typeof key==="string"){key=new Buffer(key)}var blocksize=alg==="sha512"||alg==="sha384"?128:64;this._alg=alg;this._key=key;if(key.length>blocksize){key=createHash(alg).update(key).digest()}else if(key.length0;count--){inputOff+=this._buffer(data,inputOff);outputOff+=this._flushBuffer(out,outputOff)}inputOff+=this._buffer(data,inputOff);return out};Cipher.prototype.final=function final(buffer){var first;if(buffer)first=this.update(buffer);var last;if(this.type==="encrypt")last=this._finalEncrypt();else last=this._finalDecrypt();if(first)return first.concat(last);else return last};Cipher.prototype._pad=function _pad(buffer,off){if(off===0)return false;while(off>>1];kL=utils.r28shl(kL,shift);kR=utils.r28shl(kR,shift);utils.pc2(kL,kR,state.keys,i)}};DES.prototype._update=function _update(inp,inOff,out,outOff){var state=this._desState;var l=utils.readUInt32BE(inp,inOff);var r=utils.readUInt32BE(inp,inOff+4);utils.ip(l,r,state.tmp,0);l=state.tmp[0];r=state.tmp[1];if(this.type==="encrypt")this._encrypt(state,l,r,state.tmp,0);else this._decrypt(state,l,r,state.tmp,0);l=state.tmp[0];r=state.tmp[1];utils.writeUInt32BE(out,l,outOff);utils.writeUInt32BE(out,r,outOff+4)};DES.prototype._pad=function _pad(buffer,off){var value=buffer.length-off;for(var i=off;i>>0;l=t}utils.rip(r,l,out,off)};DES.prototype._decrypt=function _decrypt(state,lStart,rStart,out,off){var l=rStart;var r=lStart;for(var i=state.keys.length-2;i>=0;i-=2){var keyL=state.keys[i];var keyR=state.keys[i+1];utils.expand(l,state.tmp,0);keyL^=state.tmp[0];keyR^=state.tmp[1];var s=utils.substitute(keyL,keyR);var f=utils.permute(s);var t=l;l=(r^f)>>>0;r=t}utils.rip(l,r,out,off)}},{"../des":80,inherits:152,"minimalistic-assert":175}],84:[function(require,module,exports){"use strict";var assert=require("minimalistic-assert");var inherits=require("inherits");var des=require("../des");var Cipher=des.Cipher;var DES=des.DES;function EDEState(type,key){assert.equal(key.length,24,"Invalid key length");var k1=key.slice(0,8);var k2=key.slice(8,16);var k3=key.slice(16,24);if(type==="encrypt"){this.ciphers=[DES.create({type:"encrypt",key:k1}),DES.create({type:"decrypt",key:k2}),DES.create({type:"encrypt",key:k3})]}else{this.ciphers=[DES.create({type:"decrypt",key:k3}),DES.create({type:"encrypt",key:k2}),DES.create({type:"decrypt",key:k1})]}}function EDE(options){Cipher.call(this,options);var state=new EDEState(this.type,this.options.key);this._edeState=state}inherits(EDE,Cipher);module.exports=EDE;EDE.create=function create(options){return new EDE(options)};EDE.prototype._update=function _update(inp,inOff,out,outOff){var state=this._edeState;state.ciphers[0]._update(inp,inOff,out,outOff);state.ciphers[1]._update(out,outOff,out,outOff);state.ciphers[2]._update(out,outOff,out,outOff)};EDE.prototype._pad=DES.prototype._pad;EDE.prototype._unpad=DES.prototype._unpad},{"../des":80,inherits:152,"minimalistic-assert":175}],85:[function(require,module,exports){"use strict";exports.readUInt32BE=function readUInt32BE(bytes,off){var res=bytes[0+off]<<24|bytes[1+off]<<16|bytes[2+off]<<8|bytes[3+off];return res>>>0};exports.writeUInt32BE=function writeUInt32BE(bytes,value,off){bytes[0+off]=value>>>24;bytes[1+off]=value>>>16&255;bytes[2+off]=value>>>8&255;bytes[3+off]=value&255};exports.ip=function ip(inL,inR,out,off){var outL=0;var outR=0;for(var i=6;i>=0;i-=2){for(var j=0;j<=24;j+=8){outL<<=1;outL|=inR>>>j+i&1}for(var j=0;j<=24;j+=8){outL<<=1;outL|=inL>>>j+i&1}}for(var i=6;i>=0;i-=2){for(var j=1;j<=25;j+=8){outR<<=1;outR|=inR>>>j+i&1}for(var j=1;j<=25;j+=8){outR<<=1;outR|=inL>>>j+i&1}}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.rip=function rip(inL,inR,out,off){var outL=0;var outR=0;for(var i=0;i<4;i++){for(var j=24;j>=0;j-=8){outL<<=1;outL|=inR>>>j+i&1;outL<<=1;outL|=inL>>>j+i&1}}for(var i=4;i<8;i++){for(var j=24;j>=0;j-=8){outR<<=1;outR|=inR>>>j+i&1;outR<<=1;outR|=inL>>>j+i&1}}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.pc1=function pc1(inL,inR,out,off){var outL=0;var outR=0;for(var i=7;i>=5;i--){for(var j=0;j<=24;j+=8){outL<<=1;outL|=inR>>j+i&1}for(var j=0;j<=24;j+=8){outL<<=1;outL|=inL>>j+i&1}}for(var j=0;j<=24;j+=8){outL<<=1;outL|=inR>>j+i&1}for(var i=1;i<=3;i++){for(var j=0;j<=24;j+=8){outR<<=1;outR|=inR>>j+i&1}for(var j=0;j<=24;j+=8){outR<<=1;outR|=inL>>j+i&1}}for(var j=0;j<=24;j+=8){outR<<=1;outR|=inL>>j+i&1}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.r28shl=function r28shl(num,shift){return num<>>28-shift};var pc2table=[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];exports.pc2=function pc2(inL,inR,out,off){var outL=0;var outR=0;var len=pc2table.length>>>1;for(var i=0;i>>pc2table[i]&1}for(var i=len;i>>pc2table[i]&1}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.expand=function expand(r,out,off){var outL=0;var outR=0;outL=(r&1)<<5|r>>>27;for(var i=23;i>=15;i-=4){outL<<=6;outL|=r>>>i&63}for(var i=11;i>=3;i-=4){outR|=r>>>i&63;outR<<=6}outR|=(r&31)<<1|r>>>31;out[off+0]=outL>>>0;out[off+1]=outR>>>0};var sTable=[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];exports.substitute=function substitute(inL,inR){var out=0;for(var i=0;i<4;i++){var b=inL>>>18-i*6&63;var sb=sTable[i*64+b];out<<=4;out|=sb}for(var i=0;i<4;i++){var b=inR>>>18-i*6&63;var sb=sTable[4*64+i*64+b];out<<=4;out|=sb}return out>>>0};var permuteTable=[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];exports.permute=function permute(num){var out=0;for(var i=0;i>>permuteTable[i]&1}return out>>>0};exports.padSplit=function padSplit(num,size,group){var str=num.toString(2);while(str.lengthbits){num.ishrn(1)}if(num.isEven()){num.iadd(ONE)}if(!num.testn(1)){num.iadd(TWO)}if(!gen.cmp(TWO)){while(num.mod(TWENTYFOUR).cmp(ELEVEN)){num.iadd(FOUR)}}else if(!gen.cmp(FIVE)){while(num.mod(TEN).cmp(THREE)){num.iadd(FOUR)}}n2=num.shrn(1);if(simpleSieve(n2)&&simpleSieve(num)&&fermatTest(n2)&&fermatTest(num)&&millerRabin.test(n2)&&millerRabin.test(num)){return num}}}},{"bn.js":35,"miller-rabin":171,randombytes:214}],89:[function(require,module,exports){module.exports={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" -}}},{}],90:[function(require,module,exports){(function(Buffer){var crypto=require("crypto");var BigInteger=require("jsbn").BigInteger;var ECPointFp=require("./lib/ec.js").ECPointFp;exports.ECCurves=require("./lib/sec.js");function unstupid(hex,len){return hex.length>=len?hex:unstupid("0"+hex,len)}exports.ECKey=function(curve,key,isPublic){var priv;var c=curve();var n=c.getN();var bytes=Math.floor(n.bitLength()/8);if(key){if(isPublic){var curve=c.getCurve();this.P=curve.decodePointHex(key.toString("hex"))}else{if(key.length!=bytes)return false;priv=new BigInteger(key.toString("hex"),16)}}else{var n1=n.subtract(BigInteger.ONE);var r=new BigInteger(crypto.randomBytes(n.bitLength()));priv=r.mod(n1).add(BigInteger.ONE);this.P=c.getG().multiply(priv)}if(this.P){this.PublicKey=new Buffer(c.getCurve().encodeCompressedPointHex(this.P),"hex")}if(priv){this.PrivateKey=new Buffer(unstupid(priv.toString(16),bytes*2),"hex");this.deriveSharedSecret=function(key){if(!key||!key.P)return false;var S=key.P.multiply(priv);return new Buffer(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex")}}}}).call(this,require("buffer").Buffer)},{"./lib/ec.js":91,"./lib/sec.js":92,buffer:67,crypto:78,jsbn:166}],91:[function(require,module,exports){var BigInteger=require("jsbn").BigInteger;var Barrett=BigInteger.prototype.Barrett;function ECFieldElementFp(q,x){this.x=x;this.q=q}function feFpEquals(other){if(other==this)return true;return this.q.equals(other.q)&&this.x.equals(other.x)}function feFpToBigInteger(){return this.x}function feFpNegate(){return new ECFieldElementFp(this.q,this.x.negate().mod(this.q))}function feFpAdd(b){return new ECFieldElementFp(this.q,this.x.add(b.toBigInteger()).mod(this.q))}function feFpSubtract(b){return new ECFieldElementFp(this.q,this.x.subtract(b.toBigInteger()).mod(this.q))}function feFpMultiply(b){return new ECFieldElementFp(this.q,this.x.multiply(b.toBigInteger()).mod(this.q))}function feFpSquare(){return new ECFieldElementFp(this.q,this.x.square().mod(this.q))}function feFpDivide(b){return new ECFieldElementFp(this.q,this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q))}ECFieldElementFp.prototype.equals=feFpEquals;ECFieldElementFp.prototype.toBigInteger=feFpToBigInteger;ECFieldElementFp.prototype.negate=feFpNegate;ECFieldElementFp.prototype.add=feFpAdd;ECFieldElementFp.prototype.subtract=feFpSubtract;ECFieldElementFp.prototype.multiply=feFpMultiply;ECFieldElementFp.prototype.square=feFpSquare;ECFieldElementFp.prototype.divide=feFpDivide;function ECPointFp(curve,x,y,z){this.curve=curve;this.x=x;this.y=y;if(z==null){this.z=BigInteger.ONE}else{this.z=z}this.zinv=null}function pointFpGetX(){if(this.zinv==null){this.zinv=this.z.modInverse(this.curve.q)}var r=this.x.toBigInteger().multiply(this.zinv);this.curve.reduce(r);return this.curve.fromBigInteger(r)}function pointFpGetY(){if(this.zinv==null){this.zinv=this.z.modInverse(this.curve.q)}var r=this.y.toBigInteger().multiply(this.zinv);this.curve.reduce(r);return this.curve.fromBigInteger(r)}function pointFpEquals(other){if(other==this)return true;if(this.isInfinity())return other.isInfinity();if(other.isInfinity())return this.isInfinity();var u,v;u=other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q);if(!u.equals(BigInteger.ZERO))return false;v=other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q);return v.equals(BigInteger.ZERO)}function pointFpIsInfinity(){if(this.x==null&&this.y==null)return true;return this.z.equals(BigInteger.ZERO)&&!this.y.toBigInteger().equals(BigInteger.ZERO)}function pointFpNegate(){return new ECPointFp(this.curve,this.x,this.y.negate(),this.z)}function pointFpAdd(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var u=b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q);var v=b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q);if(BigInteger.ZERO.equals(v)){if(BigInteger.ZERO.equals(u)){return this.twice()}return this.curve.getInfinity()}var THREE=new BigInteger("3");var x1=this.x.toBigInteger();var y1=this.y.toBigInteger();var x2=b.x.toBigInteger();var y2=b.y.toBigInteger();var v2=v.square();var v3=v2.multiply(v);var x1v2=x1.multiply(v2);var zu2=u.square().multiply(this.z);var x3=zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q);var y3=x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q);var z3=v3.multiply(this.z).multiply(b.z).mod(this.curve.q);return new ECPointFp(this.curve,this.curve.fromBigInteger(x3),this.curve.fromBigInteger(y3),z3)}function pointFpTwice(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var THREE=new BigInteger("3");var x1=this.x.toBigInteger();var y1=this.y.toBigInteger();var y1z1=y1.multiply(this.z);var y1sqz1=y1z1.multiply(y1).mod(this.curve.q);var a=this.curve.a.toBigInteger();var w=x1.square().multiply(THREE);if(!BigInteger.ZERO.equals(a)){w=w.add(this.z.square().multiply(a))}w=w.mod(this.curve.q);var x3=w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q);var y3=w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q);var z3=y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q);return new ECPointFp(this.curve,this.curve.fromBigInteger(x3),this.curve.fromBigInteger(y3),z3)}function pointFpMultiply(k){if(this.isInfinity())return this;if(k.signum()==0)return this.curve.getInfinity();var e=k;var h=e.multiply(new BigInteger("3"));var neg=this.negate();var R=this;var i;for(i=h.bitLength()-2;i>0;--i){R=R.twice();var hBit=h.testBit(i);var eBit=e.testBit(i);if(hBit!=eBit){R=R.add(hBit?this:neg)}}return R}function pointFpMultiplyTwo(j,x,k){var i;if(j.bitLength()>k.bitLength())i=j.bitLength()-1;else i=k.bitLength()-1;var R=this.curve.getInfinity();var both=this.add(x);while(i>=0){R=R.twice();if(j.testBit(i)){if(k.testBit(i)){R=R.add(both)}else{R=R.add(this)}}else{if(k.testBit(i)){R=R.add(x)}}--i}return R}ECPointFp.prototype.getX=pointFpGetX;ECPointFp.prototype.getY=pointFpGetY;ECPointFp.prototype.equals=pointFpEquals;ECPointFp.prototype.isInfinity=pointFpIsInfinity;ECPointFp.prototype.negate=pointFpNegate;ECPointFp.prototype.add=pointFpAdd;ECPointFp.prototype.twice=pointFpTwice;ECPointFp.prototype.multiply=pointFpMultiply;ECPointFp.prototype.multiplyTwo=pointFpMultiplyTwo;function ECCurveFp(q,a,b){this.q=q;this.a=this.fromBigInteger(a);this.b=this.fromBigInteger(b);this.infinity=new ECPointFp(this,null,null);this.reducer=new Barrett(this.q)}function curveFpGetQ(){return this.q}function curveFpGetA(){return this.a}function curveFpGetB(){return this.b}function curveFpEquals(other){if(other==this)return true;return this.q.equals(other.q)&&this.a.equals(other.a)&&this.b.equals(other.b)}function curveFpGetInfinity(){return this.infinity}function curveFpFromBigInteger(x){return new ECFieldElementFp(this.q,x)}function curveReduce(x){this.reducer.reduce(x)}function curveFpDecodePointHex(s){switch(parseInt(s.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var len=(s.length-2)/2;var xHex=s.substr(2,len);var yHex=s.substr(len+2,len);return new ECPointFp(this,this.fromBigInteger(new BigInteger(xHex,16)),this.fromBigInteger(new BigInteger(yHex,16)));default:return null}}function curveFpEncodePointHex(p){if(p.isInfinity())return"00";var xHex=p.getX().toBigInteger().toString(16);var yHex=p.getY().toBigInteger().toString(16);var oLen=this.getQ().toString(16).length;if(oLen%2!=0)oLen++;while(xHex.length128){var firstWord=this.q.shiftRight(bitLength-64);if(firstWord.intValue()==-1){this.r=BigInteger.ONE.shiftLeft(bitLength).subtract(this.q)}}return this.r};ECFieldElementFp.prototype.modMult=function(x1,x2){return this.modReduce(x1.multiply(x2))};ECFieldElementFp.prototype.modReduce=function(x){if(this.getR()!=null){var qLen=q.bitLength();while(x.bitLength()>qLen+1){var u=x.shiftRight(qLen);var v=x.subtract(u.shiftLeft(qLen));if(!this.getR().equals(BigInteger.ONE)){u=u.multiply(this.getR())}x=u.add(v)}while(x.compareTo(q)>=0){x=x.subtract(q)}}else{x=x.mod(q)}return x};ECFieldElementFp.prototype.sqrt=function(){if(!this.q.testBit(0))throw"unsupported";if(this.q.testBit(1)){var z=new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q));return z.square().equals(this)?z:null}var qMinusOne=this.q.subtract(BigInteger.ONE);var legendreExponent=qMinusOne.shiftRight(1);if(!this.x.modPow(legendreExponent,this.q).equals(BigInteger.ONE)){return null}var u=qMinusOne.shiftRight(2);var k=u.shiftLeft(1).add(BigInteger.ONE);var Q=this.x;var fourQ=modDouble(modDouble(Q));var U,V;do{var P;do{P=new BigInteger(this.q.bitLength(),new SecureRandom)}while(P.compareTo(this.q)>=0||!P.multiply(P).subtract(fourQ).modPow(legendreExponent,this.q).equals(qMinusOne));var result=this.lucasSequence(P,Q,k);U=result[0];V=result[1];if(this.modMult(V,V).equals(fourQ)){if(V.testBit(0)){V=V.add(q)}V=V.shiftRight(1);return new ECFieldElementFp(q,V)}}while(U.equals(BigInteger.ONE)||U.equals(qMinusOne));return null};ECFieldElementFp.prototype.lucasSequence=function(P,Q,k){var n=k.bitLength();var s=k.getLowestSetBit();var Uh=BigInteger.ONE;var Vl=BigInteger.TWO;var Vh=P;var Ql=BigInteger.ONE;var Qh=BigInteger.ONE;for(var j=n-1;j>=s+1;--j){Ql=this.modMult(Ql,Qh);if(k.testBit(j)){Qh=this.modMult(Ql,Q);Uh=this.modMult(Uh,Vh);Vl=this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));Vh=this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1)))}else{Qh=Ql;Uh=this.modReduce(Uh.multiply(Vl).subtract(Ql));Vh=this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));Vl=this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)))}}Ql=this.modMult(Ql,Qh);Qh=this.modMult(Ql,Q);Uh=this.modReduce(Uh.multiply(Vl).subtract(Ql));Vl=this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));Ql=this.modMult(Ql,Qh);for(var j=1;j<=s;++j){Uh=this.modMult(Uh,Vl);Vl=this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));Ql=this.modMult(Ql,Ql)}return[Uh,Vl]};var exports={ECCurveFp:ECCurveFp,ECPointFp:ECPointFp,ECFieldElementFp:ECFieldElementFp};module.exports=exports},{jsbn:166}],92:[function(require,module,exports){var BigInteger=require("jsbn").BigInteger;var ECCurveFp=require("./ec.js").ECCurveFp;function X9ECParameters(curve,g,n,h){this.curve=curve;this.g=g;this.n=n;this.h=h}function x9getCurve(){return this.curve}function x9getG(){return this.g}function x9getN(){return this.n}function x9getH(){return this.h}X9ECParameters.prototype.getCurve=x9getCurve;X9ECParameters.prototype.getG=x9getG;X9ECParameters.prototype.getN=x9getN;X9ECParameters.prototype.getH=x9getH;function fromHex(s){return new BigInteger(s,16)}function secp128r1(){var p=fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");var a=fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC");var b=fromHex("E87579C11079F43DD824993C2CEE5ED3");var n=fromHex("FFFFFFFE0000000075A30D1B9038A115");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"161FF7528B899B2D0C28607CA52C5B86"+"CF5AC8395BAFEB13C02DA292DDED7A83");return new X9ECParameters(curve,G,n,h)}function secp160k1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");var a=BigInteger.ZERO;var b=fromHex("7");var n=fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"+"938CF935318FDCED6BC28286531733C3F03C4FEE");return new X9ECParameters(curve,G,n,h)}function secp160r1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF");var a=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC");var b=fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45");var n=fromHex("0100000000000000000001F4C8F927AED3CA752257");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"4A96B5688EF573284664698968C38BB913CBFC82"+"23A628553168947D59DCC912042351377AC5FB32");return new X9ECParameters(curve,G,n,h)}function secp192k1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37");var a=BigInteger.ZERO;var b=fromHex("3");var n=fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"+"9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");return new X9ECParameters(curve,G,n,h)}function secp192r1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF");var a=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC");var b=fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1");var n=fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"+"07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");return new X9ECParameters(curve,G,n,h)}function secp224r1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");var a=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE");var b=fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4");var n=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"+"BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");return new X9ECParameters(curve,G,n,h)}function secp256r1(){var p=fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");var a=fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC");var b=fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B");var n=fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"+"4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");return new X9ECParameters(curve,G,n,h)}function getSECCurveByName(name){if(name=="secp128r1")return secp128r1();if(name=="secp160k1")return secp160k1();if(name=="secp160r1")return secp160r1();if(name=="secp192k1")return secp192k1();if(name=="secp192r1")return secp192r1();if(name=="secp224r1")return secp224r1();if(name=="secp256r1")return secp256r1();return null}module.exports={secp128r1:secp128r1,secp160k1:secp160k1,secp160r1:secp160r1,secp192k1:secp192k1,secp192r1:secp192r1,secp224r1:secp224r1,secp256r1:secp256r1}},{"./ec.js":91,jsbn:166}],93:[function(require,module,exports){"use strict";var elliptic=exports;elliptic.version=require("../package.json").version;elliptic.utils=require("./elliptic/utils");elliptic.rand=require("brorand");elliptic.hmacDRBG=require("./elliptic/hmac-drbg");elliptic.curve=require("./elliptic/curve");elliptic.curves=require("./elliptic/curves");elliptic.ec=require("./elliptic/ec");elliptic.eddsa=require("./elliptic/eddsa")},{"../package.json":109,"./elliptic/curve":96,"./elliptic/curves":99,"./elliptic/ec":100,"./elliptic/eddsa":103,"./elliptic/hmac-drbg":106,"./elliptic/utils":108,brorand:36}],94:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var getNAF=utils.getNAF;var getJSF=utils.getJSF;var assert=utils.assert;function BaseCurve(type,conf){this.type=type;this.p=new BN(conf.p,16);this.red=conf.prime?BN.red(conf.prime):BN.mont(this.p);this.zero=new BN(0).toRed(this.red);this.one=new BN(1).toRed(this.red);this.two=new BN(2).toRed(this.red);this.n=conf.n&&new BN(conf.n,16);this.g=conf.g&&this.pointFromJSON(conf.g,conf.gRed);this._wnafT1=new Array(4);this._wnafT2=new Array(4);this._wnafT3=new Array(4);this._wnafT4=new Array(4);var adjustCount=this.n&&this.p.div(this.n);if(!adjustCount||adjustCount.cmpn(100)>0){this.redN=null}else{this._maxwellTrick=true;this.redN=this.n.toRed(this.red)}}module.exports=BaseCurve;BaseCurve.prototype.point=function point(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function _fixedNafMul(p,k){assert(p.precomputed);var doubles=p._getDoubles();var naf=getNAF(k,1);var I=(1<=j;k--)nafW=(nafW<<1)+naf[k];repr.push(nafW)}var a=this.jpoint(null,null,null);var b=this.jpoint(null,null,null);for(var i=I;i>0;i--){for(var j=0;j=0;i--){for(var k=0;i>=0&&naf[i]===0;i--)k++;if(i>=0)k++;acc=acc.dblp(k);if(i<0)break;var z=naf[i];assert(z!==0);if(p.type==="affine"){if(z>0)acc=acc.mixedAdd(wnd[z-1>>1]);else acc=acc.mixedAdd(wnd[-z-1>>1].neg())}else{if(z>0)acc=acc.add(wnd[z-1>>1]);else acc=acc.add(wnd[-z-1>>1].neg())}}return p.type==="affine"?acc.toP():acc};BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(defW,points,coeffs,len,jacobianResult){var wndWidth=this._wnafT1;var wnd=this._wnafT2;var naf=this._wnafT3;var max=0;for(var i=0;i=1;i-=2){var a=i-1;var b=i;if(wndWidth[a]!==1||wndWidth[b]!==1){naf[a]=getNAF(coeffs[a],wndWidth[a]);naf[b]=getNAF(coeffs[b],wndWidth[b]);max=Math.max(naf[a].length,max);max=Math.max(naf[b].length,max);continue}var comb=[points[a],null,null,points[b]];if(points[a].y.cmp(points[b].y)===0){comb[1]=points[a].add(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}else if(points[a].y.cmp(points[b].y.redNeg())===0){comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].add(points[b].neg())}else{comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}var index=[-3,-1,-5,-7,0,7,5,1,3];var jsf=getJSF(coeffs[a],coeffs[b]);max=Math.max(jsf[0].length,max);naf[a]=new Array(max);naf[b]=new Array(max);for(var j=0;j=0;i--){var k=0;while(i>=0){var zero=true;for(var j=0;j=0)k++;acc=acc.dblp(k);if(i<0)break;for(var j=0;j0)p=wnd[j][z-1>>1];else if(z<0)p=wnd[j][-z-1>>1].neg();if(p.type==="affine")acc=acc.mixedAdd(p);else acc=acc.add(p)}}for(var i=0;i=Math.ceil((k.bitLength()+1)/doubles.step)};BasePoint.prototype._getDoubles=function _getDoubles(step,power){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var doubles=[this];var acc=this;for(var i=0;i";return""};Point.prototype.isInfinity=function isInfinity(){return this.x.cmpn(0)===0&&this.y.cmp(this.z)===0};Point.prototype._extDbl=function _extDbl(){var a=this.x.redSqr();var b=this.y.redSqr();var c=this.z.redSqr();c=c.redIAdd(c);var d=this.curve._mulA(a);var e=this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);var g=d.redAdd(b);var f=g.redSub(c);var h=d.redSub(b);var nx=e.redMul(f);var ny=g.redMul(h);var nt=e.redMul(h);var nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)};Point.prototype._projDbl=function _projDbl(){var b=this.x.redAdd(this.y).redSqr();var c=this.x.redSqr();var d=this.y.redSqr();var nx;var ny;var nz;if(this.curve.twisted){var e=this.curve._mulA(c);var f=e.redAdd(d);if(this.zOne){nx=b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));ny=f.redMul(e.redSub(d));nz=f.redSqr().redSub(f).redSub(f)}else{var h=this.z.redSqr();var j=f.redSub(h).redISub(h);nx=b.redSub(c).redISub(d).redMul(j);ny=f.redMul(e.redSub(d));nz=f.redMul(j)}}else{var e=c.redAdd(d);var h=this.curve._mulC(this.c.redMul(this.z)).redSqr();var j=e.redSub(h).redSub(h);nx=this.curve._mulC(b.redISub(e)).redMul(j);ny=this.curve._mulC(e).redMul(c.redISub(d));nz=e.redMul(j)}return this.curve.point(nx,ny,nz)};Point.prototype.dbl=function dbl(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()};Point.prototype._extAdd=function _extAdd(p){var a=this.y.redSub(this.x).redMul(p.y.redSub(p.x));var b=this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));var c=this.t.redMul(this.curve.dd).redMul(p.t);var d=this.z.redMul(p.z.redAdd(p.z));var e=b.redSub(a);var f=d.redSub(c);var g=d.redAdd(c);var h=b.redAdd(a);var nx=e.redMul(f);var ny=g.redMul(h);var nt=e.redMul(h);var nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)};Point.prototype._projAdd=function _projAdd(p){var a=this.z.redMul(p.z);var b=a.redSqr();var c=this.x.redMul(p.x);var d=this.y.redMul(p.y);var e=this.curve.d.redMul(c).redMul(d);var f=b.redSub(e);var g=b.redAdd(e);var tmp=this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);var nx=a.redMul(f).redMul(tmp);var ny;var nz;if(this.curve.twisted){ny=a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));nz=f.redMul(g)}else{ny=a.redMul(g).redMul(d.redSub(c));nz=this.curve._mulC(f).redMul(g)}return this.curve.point(nx,ny,nz)};Point.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;if(this.curve.extended)return this._extAdd(p);else return this._projAdd(p)};Point.prototype.mul=function mul(k){if(this._hasDoubles(k))return this.curve._fixedNafMul(this,k);else return this.curve._wnafMul(this,k)};Point.prototype.mulAdd=function mulAdd(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,false)};Point.prototype.jmulAdd=function jmulAdd(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,true)};Point.prototype.normalize=function normalize(){if(this.zOne)return this;var zi=this.z.redInvm();this.x=this.x.redMul(zi);this.y=this.y.redMul(zi);if(this.t)this.t=this.t.redMul(zi);this.z=this.curve.one;this.zOne=true;return this};Point.prototype.neg=function neg(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()};Point.prototype.getY=function getY(){this.normalize();return this.y.fromRed()};Point.prototype.eq=function eq(other){return this===other||this.getX().cmp(other.getX())===0&&this.getY().cmp(other.getY())===0};Point.prototype.eqXToP=function eqXToP(x){var rx=x.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(rx)===0)return true;var xc=x.clone();var t=this.curve.redN.redMul(this.z);for(;;){xc.iadd(this.curve.n);if(xc.cmp(this.curve.p)>=0)return false;rx.redIAdd(t);if(this.x.cmp(rx)===0)return true}return false};Point.prototype.toP=Point.prototype.normalize;Point.prototype.mixedAdd=Point.prototype.add},{"../../elliptic":93,"../curve":96,"bn.js":35,inherits:152}],96:[function(require,module,exports){"use strict";var curve=exports;curve.base=require("./base");curve.short=require("./short");curve.mont=require("./mont");curve.edwards=require("./edwards")},{"./base":94,"./edwards":95,"./mont":97,"./short":98}],97:[function(require,module,exports){"use strict";var curve=require("../curve");var BN=require("bn.js");var inherits=require("inherits");var Base=curve.base;var elliptic=require("../../elliptic");var utils=elliptic.utils;function MontCurve(conf){Base.call(this,"mont",conf);this.a=new BN(conf.a,16).toRed(this.red);this.b=new BN(conf.b,16).toRed(this.red);this.i4=new BN(4).toRed(this.red).redInvm();this.two=new BN(2).toRed(this.red);this.a24=this.i4.redMul(this.a.redAdd(this.two))}inherits(MontCurve,Base);module.exports=MontCurve;MontCurve.prototype.validate=function validate(point){var x=point.normalize().x;var x2=x.redSqr();var rhs=x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);var y=rhs.redSqrt();return y.redSqr().cmp(rhs)===0};function Point(curve,x,z){Base.BasePoint.call(this,curve,"projective");if(x===null&&z===null){this.x=this.curve.one;this.z=this.curve.zero}else{this.x=new BN(x,16);this.z=new BN(z,16); -if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}inherits(Point,Base.BasePoint);MontCurve.prototype.decodePoint=function decodePoint(bytes,enc){return this.point(utils.toArray(bytes,enc),1)};MontCurve.prototype.point=function point(x,z){return new Point(this,x,z)};MontCurve.prototype.pointFromJSON=function pointFromJSON(obj){return Point.fromJSON(this,obj)};Point.prototype.precompute=function precompute(){};Point.prototype._encode=function _encode(){return this.getX().toArray("be",this.curve.p.byteLength())};Point.fromJSON=function fromJSON(curve,obj){return new Point(curve,obj[0],obj[1]||curve.one)};Point.prototype.inspect=function inspect(){if(this.isInfinity())return"";return""};Point.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0};Point.prototype.dbl=function dbl(){var a=this.x.redAdd(this.z);var aa=a.redSqr();var b=this.x.redSub(this.z);var bb=b.redSqr();var c=aa.redSub(bb);var nx=aa.redMul(bb);var nz=c.redMul(bb.redAdd(this.curve.a24.redMul(c)));return this.curve.point(nx,nz)};Point.prototype.add=function add(){throw new Error("Not supported on Montgomery curve")};Point.prototype.diffAdd=function diffAdd(p,diff){var a=this.x.redAdd(this.z);var b=this.x.redSub(this.z);var c=p.x.redAdd(p.z);var d=p.x.redSub(p.z);var da=d.redMul(a);var cb=c.redMul(b);var nx=diff.z.redMul(da.redAdd(cb).redSqr());var nz=diff.x.redMul(da.redISub(cb).redSqr());return this.curve.point(nx,nz)};Point.prototype.mul=function mul(k){var t=k.clone();var a=this;var b=this.curve.point(null,null);var c=this;for(var bits=[];t.cmpn(0)!==0;t.iushrn(1))bits.push(t.andln(1));for(var i=bits.length-1;i>=0;i--){if(bits[i]===0){a=a.diffAdd(b,c);b=b.dbl()}else{b=a.diffAdd(b,c);a=a.dbl()}}return b};Point.prototype.mulAdd=function mulAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.jumlAdd=function jumlAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.eq=function eq(other){return this.getX().cmp(other.getX())===0};Point.prototype.normalize=function normalize(){this.x=this.x.redMul(this.z.redInvm());this.z=this.curve.one;return this};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()}},{"../../elliptic":93,"../curve":96,"bn.js":35,inherits:152}],98:[function(require,module,exports){"use strict";var curve=require("../curve");var elliptic=require("../../elliptic");var BN=require("bn.js");var inherits=require("inherits");var Base=curve.base;var assert=elliptic.utils.assert;function ShortCurve(conf){Base.call(this,"short",conf);this.a=new BN(conf.a,16).toRed(this.red);this.b=new BN(conf.b,16).toRed(this.red);this.tinv=this.two.redInvm();this.zeroA=this.a.fromRed().cmpn(0)===0;this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0;this.endo=this._getEndomorphism(conf);this._endoWnafT1=new Array(4);this._endoWnafT2=new Array(4)}inherits(ShortCurve,Base);module.exports=ShortCurve;ShortCurve.prototype._getEndomorphism=function _getEndomorphism(conf){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var beta;var lambda;if(conf.beta){beta=new BN(conf.beta,16).toRed(this.red)}else{var betas=this._getEndoRoots(this.p);beta=betas[0].cmp(betas[1])<0?betas[0]:betas[1];beta=beta.toRed(this.red)}if(conf.lambda){lambda=new BN(conf.lambda,16)}else{var lambdas=this._getEndoRoots(this.n);if(this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta))===0){lambda=lambdas[0]}else{lambda=lambdas[1];assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta))===0)}}var basis;if(conf.basis){basis=conf.basis.map(function(vec){return{a:new BN(vec.a,16),b:new BN(vec.b,16)}})}else{basis=this._getEndoBasis(lambda)}return{beta:beta,lambda:lambda,basis:basis}};ShortCurve.prototype._getEndoRoots=function _getEndoRoots(num){var red=num===this.p?this.red:BN.mont(num);var tinv=new BN(2).toRed(red).redInvm();var ntinv=tinv.redNeg();var s=new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);var l1=ntinv.redAdd(s).fromRed();var l2=ntinv.redSub(s).fromRed();return[l1,l2]};ShortCurve.prototype._getEndoBasis=function _getEndoBasis(lambda){var aprxSqrt=this.n.ushrn(Math.floor(this.n.bitLength()/2));var u=lambda;var v=this.n.clone();var x1=new BN(1);var y1=new BN(0);var x2=new BN(0);var y2=new BN(1);var a0;var b0;var a1;var b1;var a2;var b2;var prevR;var i=0;var r;var x;while(u.cmpn(0)!==0){var q=v.div(u);r=v.sub(q.mul(u));x=x2.sub(q.mul(x1));var y=y2.sub(q.mul(y1));if(!a1&&r.cmp(aprxSqrt)<0){a0=prevR.neg();b0=x1;a1=r.neg();b1=x}else if(a1&&++i===2){break}prevR=r;v=u;u=r;x2=x1;x1=x;y2=y1;y1=y}a2=r.neg();b2=x;var len1=a1.sqr().add(b1.sqr());var len2=a2.sqr().add(b2.sqr());if(len2.cmp(len1)>=0){a2=a0;b2=b0}if(a1.negative){a1=a1.neg();b1=b1.neg()}if(a2.negative){a2=a2.neg();b2=b2.neg()}return[{a:a1,b:b1},{a:a2,b:b2}]};ShortCurve.prototype._endoSplit=function _endoSplit(k){var basis=this.endo.basis;var v1=basis[0];var v2=basis[1];var c1=v2.b.mul(k).divRound(this.n);var c2=v1.b.neg().mul(k).divRound(this.n);var p1=c1.mul(v1.a);var p2=c2.mul(v2.a);var q1=c1.mul(v1.b);var q2=c2.mul(v2.b);var k1=k.sub(p1).sub(p2);var k2=q1.add(q2).neg();return{k1:k1,k2:k2}};ShortCurve.prototype.pointFromX=function pointFromX(x,odd){x=new BN(x,16);if(!x.red)x=x.toRed(this.red);var y2=x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);var y=y2.redSqrt();if(y.redSqr().redSub(y2).cmp(this.zero)!==0)throw new Error("invalid point");var isOdd=y.fromRed().isOdd();if(odd&&!isOdd||!odd&&isOdd)y=y.redNeg();return this.point(x,y)};ShortCurve.prototype.validate=function validate(point){if(point.inf)return true;var x=point.x;var y=point.y;var ax=this.a.redMul(x);var rhs=x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);return y.redSqr().redISub(rhs).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function _endoWnafMulAdd(points,coeffs,jacobianResult){var npoints=this._endoWnafT1;var ncoeffs=this._endoWnafT2;for(var i=0;i";return""};Point.prototype.isInfinity=function isInfinity(){return this.inf};Point.prototype.add=function add(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(this.x.cmp(p.x)===0)return this.curve.point(null,null);var c=this.y.redSub(p.y);if(c.cmpn(0)!==0)c=c.redMul(this.x.redSub(p.x).redInvm());var nx=c.redSqr().redISub(this.x).redISub(p.x);var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.dbl=function dbl(){if(this.inf)return this;var ys1=this.y.redAdd(this.y);if(ys1.cmpn(0)===0)return this.curve.point(null,null);var a=this.curve.a;var x2=this.x.redSqr();var dyinv=ys1.redInvm();var c=x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);var nx=c.redSqr().redISub(this.x.redAdd(this.x));var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.getX=function getX(){return this.x.fromRed()};Point.prototype.getY=function getY(){return this.y.fromRed()};Point.prototype.mul=function mul(k){k=new BN(k,16);if(this._hasDoubles(k))return this.curve._fixedNafMul(this,k);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[k]);else return this.curve._wnafMul(this,k)};Point.prototype.mulAdd=function mulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs);else return this.curve._wnafMulAdd(1,points,coeffs,2)};Point.prototype.jmulAdd=function jmulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs,true);else return this.curve._wnafMulAdd(1,points,coeffs,2,true)};Point.prototype.eq=function eq(p){return this===p||this.inf===p.inf&&(this.inf||this.x.cmp(p.x)===0&&this.y.cmp(p.y)===0)};Point.prototype.neg=function neg(_precompute){if(this.inf)return this;var res=this.curve.point(this.x,this.y.redNeg());if(_precompute&&this.precomputed){var pre=this.precomputed;var negate=function(p){return p.neg()};res.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(negate)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(negate)}}}return res};Point.prototype.toJ=function toJ(){if(this.inf)return this.curve.jpoint(null,null,null);var res=this.curve.jpoint(this.x,this.y,this.curve.one);return res};function JPoint(curve,x,y,z){Base.BasePoint.call(this,curve,"jacobian");if(x===null&&y===null&&z===null){this.x=this.curve.one;this.y=this.curve.one;this.z=new BN(0)}else{this.x=new BN(x,16);this.y=new BN(y,16);this.z=new BN(z,16)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}inherits(JPoint,Base.BasePoint);ShortCurve.prototype.jpoint=function jpoint(x,y,z){return new JPoint(this,x,y,z)};JPoint.prototype.toP=function toP(){if(this.isInfinity())return this.curve.point(null,null);var zinv=this.z.redInvm();var zinv2=zinv.redSqr();var ax=this.x.redMul(zinv2);var ay=this.y.redMul(zinv2).redMul(zinv);return this.curve.point(ax,ay)};JPoint.prototype.neg=function neg(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var pz2=p.z.redSqr();var z2=this.z.redSqr();var u1=this.x.redMul(pz2);var u2=p.x.redMul(z2);var s1=this.y.redMul(pz2.redMul(p.z));var s2=p.y.redMul(z2.redMul(this.z));var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(p.z).redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.mixedAdd=function mixedAdd(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var z2=this.z.redSqr();var u1=this.x;var u2=p.x.redMul(z2);var s1=this.y;var s2=p.y.redMul(z2).redMul(this.z);var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.dblp=function dblp(pow){if(pow===0)return this;if(this.isInfinity())return this;if(!pow)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var r=this;for(var i=0;i=0)return false;rx.redIAdd(t);if(this.x.cmp(rx)===0)return true}return false};JPoint.prototype.inspect=function inspect(){if(this.isInfinity())return"";return""};JPoint.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0}},{"../../elliptic":93,"../curve":96,"bn.js":35,inherits:152}],99:[function(require,module,exports){"use strict";var curves=exports;var hash=require("hash.js");var elliptic=require("../elliptic");var assert=elliptic.utils.assert;function PresetCurve(options){if(options.type==="short")this.curve=new elliptic.curve.short(options);else if(options.type==="edwards")this.curve=new elliptic.curve.edwards(options);else this.curve=new elliptic.curve.mont(options);this.g=this.curve.g;this.n=this.curve.n;this.hash=options.hash;assert(this.g.validate(),"Invalid curve");assert(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}curves.PresetCurve=PresetCurve;function defineCurve(name,options){Object.defineProperty(curves,name,{configurable:true,enumerable:true,get:function(){var curve=new PresetCurve(options);Object.defineProperty(curves,name,{configurable:true,enumerable:true,value:curve});return curve}})}defineCurve("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:hash.sha256,gRed:false,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});defineCurve("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:hash.sha256,gRed:false,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});defineCurve("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:hash.sha256,gRed:false,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});defineCurve("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f "+"5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 "+"f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:hash.sha384,gRed:false,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 "+"5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 "+"0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});defineCurve("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b "+"99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd "+"3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 "+"f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:hash.sha512,gRed:false,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 "+"053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 "+"a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 "+"579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 "+"3fad0761 353c7086 a272c240 88be9476 9fd16650"]});defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:false,g:["9"]});defineCurve("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:false,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var pre;try{pre=require("./precomputed/secp256k1")}catch(e){pre=undefined}defineCurve("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:hash.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:false,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]})},{"../elliptic":93,"./precomputed/secp256k1":107,"hash.js":137}],100:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;var KeyPair=require("./key");var Signature=require("./signature");function EC(options){if(!(this instanceof EC))return new EC(options);if(typeof options==="string"){assert(elliptic.curves.hasOwnProperty(options),"Unknown curve "+options);options=elliptic.curves[options]}if(options instanceof elliptic.curves.PresetCurve)options={curve:options};this.curve=options.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=options.curve.g;this.g.precompute(options.curve.n.bitLength()+1);this.hash=options.hash||options.curve.hash}module.exports=EC;EC.prototype.keyPair=function keyPair(options){return new KeyPair(this,options)};EC.prototype.keyFromPrivate=function keyFromPrivate(priv,enc){return KeyPair.fromPrivate(this,priv,enc)};EC.prototype.keyFromPublic=function keyFromPublic(pub,enc){return KeyPair.fromPublic(this,pub,enc)};EC.prototype.genKeyPair=function genKeyPair(options){if(!options)options={};var drbg=new elliptic.hmacDRBG({hash:this.hash,pers:options.pers,entropy:options.entropy||elliptic.rand(this.hash.hmacStrength),nonce:this.n.toArray()});var bytes=this.n.byteLength();var ns2=this.n.sub(new BN(2));do{var priv=new BN(drbg.generate(bytes));if(priv.cmp(ns2)>0)continue;priv.iaddn(1);return this.keyFromPrivate(priv)}while(true)};EC.prototype._truncateToN=function truncateToN(msg,truncOnly){var delta=msg.byteLength()*8-this.n.bitLength();if(delta>0)msg=msg.ushrn(delta);if(!truncOnly&&msg.cmp(this.n)>=0)return msg.sub(this.n);else return msg};EC.prototype.sign=function sign(msg,key,enc,options){if(typeof enc==="object"){options=enc;enc=null}if(!options)options={};key=this.keyFromPrivate(key,enc);msg=this._truncateToN(new BN(msg,16));var bytes=this.n.byteLength();var bkey=key.getPrivate().toArray("be",bytes);var nonce=msg.toArray("be",bytes);var drbg=new elliptic.hmacDRBG({hash:this.hash,entropy:bkey,nonce:nonce,pers:options.pers,persEnc:options.persEnc});var ns1=this.n.sub(new BN(1));for(var iter=0;true;iter++){var k=options.k?options.k(iter):new BN(drbg.generate(this.n.byteLength()));k=this._truncateToN(k,true);if(k.cmpn(1)<=0||k.cmp(ns1)>=0)continue;var kp=this.g.mul(k);if(kp.isInfinity())continue;var kpX=kp.getX();var r=kpX.umod(this.n);if(r.cmpn(0)===0)continue;var s=k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));s=s.umod(this.n);if(s.cmpn(0)===0)continue;var recoveryParam=(kp.getY().isOdd()?1:0)|(kpX.cmp(r)!==0?2:0);if(options.canonical&&s.cmp(this.nh)>0){s=this.n.sub(s);recoveryParam^=1}return new Signature({r:r,s:s,recoveryParam:recoveryParam})}};EC.prototype.verify=function verify(msg,signature,key,enc){msg=this._truncateToN(new BN(msg,16));key=this.keyFromPublic(key,enc);signature=new Signature(signature,"hex");var r=signature.r;var s=signature.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return false;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return false;var sinv=s.invm(this.n);var u1=sinv.mul(msg).umod(this.n);var u2=sinv.mul(r).umod(this.n);if(!this.curve._maxwellTrick){var p=this.g.mulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.getX().umod(this.n).cmp(r)===0}var p=this.g.jmulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.eqXToP(r)};EC.prototype.recoverPubKey=function(msg,signature,j,enc){assert((3&j)===j,"The recovery param is more than two bits");signature=new Signature(signature,enc);var n=this.n;var e=new BN(msg);var r=signature.r;var s=signature.s;var isYOdd=j&1;var isSecondKey=j>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&isSecondKey)throw new Error("Unable to find sencond key candinate");if(isSecondKey)r=this.curve.pointFromX(r.add(this.curve.n),isYOdd);else r=this.curve.pointFromX(r,isYOdd);var rInv=signature.r.invm(n);var s1=n.sub(e).mul(rInv).umod(n);var s2=s.mul(rInv).umod(n);return this.g.mulAdd(s1,r,s2)};EC.prototype.getKeyRecoveryParam=function(e,signature,Q,enc){signature=new Signature(signature,enc);if(signature.recoveryParam!==null)return signature.recoveryParam;for(var i=0;i<4;i++){var Qprime;try{Qprime=this.recoverPubKey(e,signature,i)}catch(e){continue}if(Qprime.eq(Q))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":93,"./key":101,"./signature":102,"bn.js":35}],101:[function(require,module,exports){"use strict";var BN=require("bn.js");function KeyPair(ec,options){this.ec=ec;this.priv=null;this.pub=null;if(options.priv)this._importPrivate(options.priv,options.privEnc);if(options.pub)this._importPublic(options.pub,options.pubEnc)}module.exports=KeyPair;KeyPair.fromPublic=function fromPublic(ec,pub,enc){if(pub instanceof KeyPair)return pub;return new KeyPair(ec,{pub:pub,pubEnc:enc})};KeyPair.fromPrivate=function fromPrivate(ec,priv,enc){if(priv instanceof KeyPair)return priv;return new KeyPair(ec,{priv:priv,privEnc:enc})};KeyPair.prototype.validate=function validate(){var pub=this.getPublic();if(pub.isInfinity())return{result:false,reason:"Invalid public key"};if(!pub.validate())return{result:false,reason:"Public key is not a point"};if(!pub.mul(this.ec.curve.n).isInfinity())return{result:false,reason:"Public key * N != O"};return{result:true,reason:null}};KeyPair.prototype.getPublic=function getPublic(compact,enc){if(typeof compact==="string"){enc=compact;compact=null}if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!enc)return this.pub;return this.pub.encode(enc,compact)};KeyPair.prototype.getPrivate=function getPrivate(enc){if(enc==="hex")return this.priv.toString(16,2);else return this.priv};KeyPair.prototype._importPrivate=function _importPrivate(key,enc){this.priv=new BN(key,enc||16);this.priv=this.priv.umod(this.ec.curve.n)};KeyPair.prototype._importPublic=function _importPublic(key,enc){if(key.x||key.y){this.pub=this.ec.curve.point(key.x,key.y);return}this.pub=this.ec.curve.decodePoint(key,enc)};KeyPair.prototype.derive=function derive(pub){return pub.mul(this.priv).getX()};KeyPair.prototype.sign=function sign(msg,enc,options){return this.ec.sign(msg,this,enc,options)};KeyPair.prototype.verify=function verify(msg,signature){return this.ec.verify(msg,signature,this)};KeyPair.prototype.inspect=function inspect(){return""}},{"bn.js":35}],102:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;function Signature(options,enc){if(options instanceof Signature)return options;if(this._importDER(options,enc))return;assert(options.r&&options.s,"Signature without r or s");this.r=new BN(options.r,16);this.s=new BN(options.s,16);if(options.recoveryParam===undefined)this.recoveryParam=null;else this.recoveryParam=options.recoveryParam}module.exports=Signature;function Position(){this.place=0}function getLength(buf,p){var initial=buf[p.place++];if(!(initial&128)){return initial}var octetLen=initial&15;var val=0;for(var i=0,off=p.place;i>>3);arr.push(octets|128);while(--octets){arr.push(len>>>(octets<<3)&255)}arr.push(len)}Signature.prototype.toDER=function toDER(enc){ -var r=this.r.toArray();var s=this.s.toArray();if(r[0]&128)r=[0].concat(r);if(s[0]&128)s=[0].concat(s);r=rmPadding(r);s=rmPadding(s);while(!s[0]&&!(s[1]&128)){s=s.slice(1)}var arr=[2];constructLength(arr,r.length);arr=arr.concat(r);arr.push(2);constructLength(arr,s.length);var backHalf=arr.concat(s);var res=[48];constructLength(res,backHalf.length);res=res.concat(backHalf);return utils.encode(res,enc)}},{"../../elliptic":93,"bn.js":35}],103:[function(require,module,exports){"use strict";var hash=require("hash.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;var parseBytes=utils.parseBytes;var KeyPair=require("./key");var Signature=require("./signature");function EDDSA(curve){assert(curve==="ed25519","only tested with ed25519 so far");if(!(this instanceof EDDSA))return new EDDSA(curve);var curve=elliptic.curves[curve].curve;this.curve=curve;this.g=curve.g;this.g.precompute(curve.n.bitLength()+1);this.pointClass=curve.point().constructor;this.encodingLength=Math.ceil(curve.n.bitLength()/8);this.hash=hash.sha512}module.exports=EDDSA;EDDSA.prototype.sign=function sign(message,secret){message=parseBytes(message);var key=this.keyFromSecret(secret);var r=this.hashInt(key.messagePrefix(),message);var R=this.g.mul(r);var Rencoded=this.encodePoint(R);var s_=this.hashInt(Rencoded,key.pubBytes(),message).mul(key.priv());var S=r.add(s_).umod(this.curve.n);return this.makeSignature({R:R,S:S,Rencoded:Rencoded})};EDDSA.prototype.verify=function verify(message,sig,pub){message=parseBytes(message);sig=this.makeSignature(sig);var key=this.keyFromPublic(pub);var h=this.hashInt(sig.Rencoded(),key.pubBytes(),message);var SG=this.g.mul(sig.S());var RplusAh=sig.R().add(key.pub().mul(h));return RplusAh.eq(SG)};EDDSA.prototype.hashInt=function hashInt(){var hash=this.hash();for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(entropy,nonce,pers)}module.exports=HmacDRBG;HmacDRBG.prototype._init=function init(entropy,nonce,pers){var seed=entropy.concat(nonce).concat(pers);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(entropy.concat(add||[]));this.reseed=1};HmacDRBG.prototype.generate=function generate(len,enc,add,addEnc){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof enc!=="string"){addEnc=add;add=enc;enc=null}if(add){add=utils.toArray(add,addEnc);this._update(add)}var temp=[];while(temp.length>8;var lo=c&255;if(hi)res.push(hi,lo);else res.push(lo)}}else if(enc==="hex"){msg=msg.replace(/[^a-z0-9]+/gi,"");if(msg.length%2!==0)msg="0"+msg;for(var i=0;i=0){var z;if(k.isOdd()){var mod=k.andln(ws-1);if(mod>(ws>>1)-1)z=(ws>>1)-mod;else z=mod;k.isubn(z)}else{z=0}naf.push(z);var shift=k.cmpn(0)!==0&&k.andln(ws-1)===0?w+1:1;for(var i=1;i0||k2.cmpn(-d2)>0){var m14=k1.andln(3)+d1&3;var m24=k2.andln(3)+d2&3;if(m14===3)m14=-1;if(m24===3)m24=-1;var u1;if((m14&1)===0){u1=0}else{var m8=k1.andln(7)+d1&7;if((m8===3||m8===5)&&m24===2)u1=-m14;else u1=m14}jsf[0].push(u1);var u2;if((m24&1)===0){u2=0}else{var m8=k2.andln(7)+d2&7;if((m8===3||m8===5)&&m14===2)u2=-m24;else u2=m24}jsf[1].push(u2);if(2*d1===u1+1)d1=1-d1;if(2*d2===u2+1)d2=1-d2;k1.iushrn(1);k2.iushrn(1)}return jsf}utils.getJSF=getJSF;function cachedProperty(obj,name,computer){var key="_"+name;obj.prototype[name]=function cachedProperty(){return this[key]!==undefined?this[key]:this[key]=computer.call(this)}}utils.cachedProperty=cachedProperty;function parseBytes(bytes){return typeof bytes==="string"?utils.toArray(bytes,"hex"):bytes}utils.parseBytes=parseBytes;function intFromLE(bytes){return new BN(bytes,"hex","le")}utils.intFromLE=intFromLE},{"bn.js":35}],109:[function(require,module,exports){module.exports={_args:[[{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},"/Users/jobi/Projects/eyevinn-labs/src/dash-validator/node_modules/browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.3.2",_inCache:true,_location:"/elliptic",_nodeVersion:"6.3.0",_npmOperationalInternal:{host:"packages-16-east.internal.npmjs.com",tmp:"tmp/elliptic-6.3.2.tgz_1473938837205_0.3108903462998569"},_npmUser:{name:"indutny",email:"fedor@indutny.com"},_npmVersion:"3.10.3",_phantomChildren:{},_requested:{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz",_shasum:"e4c81e0829cf0a65ab70e998b8232723b5c1bc48",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"/Users/jobi/Projects/eyevinn-labs/src/dash-validator/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"e4c81e0829cf0a65ab70e998b8232723b5c1bc48",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz"},files:["lib"],gitHead:"cbace4683a4a548dc0306ef36756151a20299cd5",homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.3.2"}},{}],110:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err}}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i=0;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-- >0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1)}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else if(listeners){while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],111:[function(require,module,exports){(function(Buffer){var md5=require("create-hash/md5");module.exports=EVP_BytesToKey;function EVP_BytesToKey(password,salt,keyLen,ivLen){if(!Buffer.isBuffer(password)){password=new Buffer(password,"binary")}if(salt&&!Buffer.isBuffer(salt)){salt=new Buffer(salt,"binary")}keyLen=keyLen/8;ivLen=ivLen||0;var ki=0;var ii=0;var key=new Buffer(keyLen);var iv=new Buffer(ivLen);var addmd=0;var md_buf;var i;var bufs=[];while(true){if(addmd++>0){bufs.push(md_buf)}bufs.push(password);if(salt){bufs.push(salt)}md_buf=md5(Buffer.concat(bufs));bufs=[];i=0;if(keyLen>0){while(true){if(keyLen===0){break}if(i===md_buf.length){break}key[ki++]=md_buf[i];keyLen--;i++}}if(ivLen>0&&i!==md_buf.length){while(true){if(ivLen===0){break}if(i===md_buf.length){break}iv[ii++]=md_buf[i];ivLen--;i++}}if(keyLen===0&&ivLen===0){break}}for(i=0;i0)throw new Error("non-zero precision not supported");if(flags.match(/-/))left=true;if(flags.match(/0/))pad="0";if(flags.match(/\+/))sign=true;switch(conversion){case"s":if(arg===undefined||arg===null)throw new Error("argument "+argn+": attempted to print undefined or null "+"as a string");ret+=doPad(pad,width,left,arg.toString());break;case"d":arg=Math.floor(arg);case"f":sign=sign&&arg>0?"+":"";ret+=sign+doPad(pad,width,left,arg.toString());break;case"j":if(width===0)width=10;ret+=mod_util.inspect(arg,false,width);break;case"r":ret+=dumpException(arg);break;default:throw new Error("unsupported conversion: "+conversion)}}ret+=fmt;return ret}function doPad(chr,width,left,str){var ret=str;while(ret.length0&&!req.useChunkedEncodingByDefault){var idleSocket=this.freeSockets[name].pop();idleSocket.removeListener("error",idleSocket._onIdleError);delete idleSocket._onIdleError;req._reusedSocket=true;req.onSocket(idleSocket)}else{this.addRequestNoreuse(req,host,port)}};ForeverAgent.prototype.removeSocket=function(s,name,host,port){if(this.sockets[name]){var index=this.sockets[name].indexOf(s);if(index!==-1){this.sockets[name].splice(index,1)}}else if(this.sockets[name]&&this.sockets[name].length===0){delete this.sockets[name];delete this.requests[name]}if(this.freeSockets[name]){var index=this.freeSockets[name].indexOf(s);if(index!==-1){this.freeSockets[name].splice(index,1);if(this.freeSockets[name].length===0){delete this.freeSockets[name]}}}if(this.requests[name]&&this.requests[name].length){this.createSocket(name,host,port).emit("free")}};function ForeverAgentSSL(options){ForeverAgent.call(this,options)}util.inherits(ForeverAgentSSL,ForeverAgent);ForeverAgentSSL.prototype.createConnection=createConnectionSSL;ForeverAgentSSL.prototype.addRequestNoreuse=AgentSSL.prototype.addRequest;function createConnectionSSL(port,host,options){if(typeof port==="object"){options=port}else if(typeof host==="object"){options=host}else if(typeof options==="object"){options=options}else{options={}}if(typeof port==="number"){options.port=port}if(typeof host==="string"){options.host=host}return tls.connect(options)}},{http:272,https:149,net:64,tls:64,util:293}],115:[function(require,module,exports){module.exports=typeof self=="object"?self.FormData:window.FormData},{}],116:[function(require,module,exports){var util=require("util");var INDENT_START=/[\{\[]/;var INDENT_END=/[\}\]]/;module.exports=function(){var lines=[];var indent=0;var push=function(str){var spaces="";while(spaces.length=this._delta8){msg=this.pending;var r=msg.length%this._delta8;this.pending=msg.slice(msg.length-r,msg.length);if(this.pending.length===0)this.pending=null;msg=utils.join32(msg,0,msg.length-r,this.endian);for(var i=0;i>>24&255;res[i++]=len>>>16&255;res[i++]=len>>>8&255;res[i++]=len&255}else{res[i++]=len&255;res[i++]=len>>>8&255;res[i++]=len>>>16&255;res[i++]=len>>>24&255;res[i++]=0;res[i++]=0;res[i++]=0;res[i++]=0;for(var t=8;tthis.blockSize)key=(new this.Hash).update(key).digest();assert(key.length<=this.blockSize);for(var i=key.length;i>>3}function g1_256(x){return rotr32(x,17)^rotr32(x,19)^x>>>10}function ft_1(s,x,y,z){if(s===0)return ch32(x,y,z);if(s===1||s===3)return p32(x,y,z);if(s===2)return maj32(x,y,z)}function ch64_hi(xh,xl,yh,yl,zh,zl){var r=xh&yh^~xh&zh;if(r<0)r+=4294967296;return r}function ch64_lo(xh,xl,yh,yl,zh,zl){var r=xl&yl^~xl&zl;if(r<0)r+=4294967296;return r}function maj64_hi(xh,xl,yh,yl,zh,zl){var r=xh&yh^xh&zh^yh&zh;if(r<0)r+=4294967296;return r}function maj64_lo(xh,xl,yh,yl,zh,zl){var r=xl&yl^xl&zl^yl&zl;if(r<0)r+=4294967296;return r}function s0_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,28);var c1_hi=rotr64_hi(xl,xh,2);var c2_hi=rotr64_hi(xl,xh,7);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function s0_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,28);var c1_lo=rotr64_lo(xl,xh,2);var c2_lo=rotr64_lo(xl,xh,7);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}function s1_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,14);var c1_hi=rotr64_hi(xh,xl,18);var c2_hi=rotr64_hi(xl,xh,9);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function s1_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,14);var c1_lo=rotr64_lo(xh,xl,18);var c2_lo=rotr64_lo(xl,xh,9);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}function g0_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,1);var c1_hi=rotr64_hi(xh,xl,8);var c2_hi=shr64_hi(xh,xl,7);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function g0_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,1);var c1_lo=rotr64_lo(xh,xl,8);var c2_lo=shr64_lo(xh,xl,7);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}function g1_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,19);var c1_hi=rotr64_hi(xl,xh,29);var c2_hi=shr64_hi(xh,xl,6);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function g1_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,19);var c1_lo=rotr64_lo(xl,xh,29);var c2_lo=shr64_lo(xh,xl,6);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}},{"../hash":137}],142:[function(require,module,exports){var utils=exports;var inherits=require("inherits");function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if(typeof msg==="string"){if(!enc){for(var i=0;i>8;var lo=c&255;if(hi)res.push(hi,lo);else res.push(lo)}}else if(enc==="hex"){msg=msg.replace(/[^a-z0-9]+/gi,"");if(msg.length%2!==0)msg="0"+msg;for(var i=0;i>>24|w>>>8&65280|w<<8&16711680|(w&255)<<24;return res>>>0}utils.htonl=htonl;function toHex32(msg,endian){var res="";for(var i=0;i>>0}return res}utils.join32=join32;function split32(msg,endian){var res=new Array(msg.length*4);for(var i=0,k=0;i>>24;res[k+1]=m>>>16&255;res[k+2]=m>>>8&255;res[k+3]=m&255}else{res[k+3]=m>>>24;res[k+2]=m>>>16&255;res[k+1]=m>>>8&255;res[k]=m&255}}return res}utils.split32=split32;function rotr32(w,b){return w>>>b|w<<32-b}utils.rotr32=rotr32;function rotl32(w,b){return w<>>32-b}utils.rotl32=rotl32;function sum32(a,b){return a+b>>>0}utils.sum32=sum32;function sum32_3(a,b,c){return a+b+c>>>0}utils.sum32_3=sum32_3;function sum32_4(a,b,c,d){return a+b+c+d>>>0}utils.sum32_4=sum32_4;function sum32_5(a,b,c,d,e){return a+b+c+d+e>>>0}utils.sum32_5=sum32_5;function assert(cond,msg){if(!cond)throw new Error(msg||"Assertion failed")}utils.assert=assert;utils.inherits=inherits;function sum64(buf,pos,ah,al){var bh=buf[pos];var bl=buf[pos+1];var lo=al+bl>>>0;var hi=(lo>>0;buf[pos+1]=lo}exports.sum64=sum64;function sum64_hi(ah,al,bh,bl){var lo=al+bl>>>0;var hi=(lo>>0}exports.sum64_hi=sum64_hi;function sum64_lo(ah,al,bh,bl){var lo=al+bl;return lo>>>0}exports.sum64_lo=sum64_lo;function sum64_4_hi(ah,al,bh,bl,ch,cl,dh,dl){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0}exports.sum64_4_hi=sum64_4_hi;function sum64_4_lo(ah,al,bh,bl,ch,cl,dh,dl){var lo=al+bl+cl+dl;return lo>>>0}exports.sum64_4_lo=sum64_4_lo;function sum64_5_hi(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0}exports.sum64_5_hi=sum64_5_hi;function sum64_5_lo(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var lo=al+bl+cl+dl+el;return lo>>>0}exports.sum64_5_lo=sum64_5_lo;function rotr64_hi(ah,al,num){var r=al<<32-num|ah>>>num;return r>>>0}exports.rotr64_hi=rotr64_hi;function rotr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}exports.rotr64_lo=rotr64_lo;function shr64_hi(ah,al,num){return ah>>>num}exports.shr64_hi=shr64_hi;function shr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}exports.shr64_lo=shr64_lo},{inherits:152}],143:[function(require,module,exports){var hawk={internals:{}};hawk.client={header:function(uri,method,options){var result={field:"",artifacts:{}};if(!uri||typeof uri!=="string"&&typeof uri!=="object"||!method||typeof method!=="string"||!options||typeof options!=="object"){result.err="Invalid argument type";return result}var timestamp=options.timestamp||hawk.utils.now(options.localtimeOffsetMsec);var credentials=options.credentials;if(!credentials||!credentials.id||!credentials.key||!credentials.algorithm){result.err="Invalid credentials object";return result}if(hawk.crypto.algorithms.indexOf(credentials.algorithm)===-1){result.err="Unknown algorithm";return result}if(typeof uri==="string"){uri=hawk.utils.parseUri(uri)}var artifacts={ts:timestamp,nonce:options.nonce||hawk.utils.randomString(6),method:method,resource:uri.resource,host:uri.host,port:uri.port,hash:options.hash,ext:options.ext,app:options.app,dlg:options.dlg};result.artifacts=artifacts;if(!artifacts.hash&&(options.payload||options.payload==="")){artifacts.hash=hawk.crypto.calculatePayloadHash(options.payload,credentials.algorithm,options.contentType)}var mac=hawk.crypto.calculateMac("header",credentials,artifacts);var hasExt=artifacts.ext!==null&&artifacts.ext!==undefined&&artifacts.ext!=="";var header='Hawk id="'+credentials.id+'", ts="'+artifacts.ts+'", nonce="'+artifacts.nonce+(artifacts.hash?'", hash="'+artifacts.hash:"")+(hasExt?'", ext="'+hawk.utils.escapeHeaderAttribute(artifacts.ext):"")+'", mac="'+mac+'"';if(artifacts.app){header+=', app="'+artifacts.app+(artifacts.dlg?'", dlg="'+artifacts.dlg:"")+'"'}result.field=header;return result},bewit:function(uri,options){if(!uri||typeof uri!=="string"||!options||typeof options!=="object"||!options.ttlSec){return""}options.ext=options.ext===null||options.ext===undefined?"":options.ext;var now=hawk.utils.now(options.localtimeOffsetMsec);var credentials=options.credentials;if(!credentials||!credentials.id||!credentials.key||!credentials.algorithm){return""}if(hawk.crypto.algorithms.indexOf(credentials.algorithm)===-1){return""}uri=hawk.utils.parseUri(uri);var exp=now+options.ttlSec;var mac=hawk.crypto.calculateMac("bewit",credentials,{ts:exp,nonce:"",method:"GET",resource:uri.resource,host:uri.host,port:uri.port,ext:options.ext});var bewit=credentials.id+"\\"+exp+"\\"+mac+"\\"+options.ext;return hawk.utils.base64urlEncode(bewit)},authenticate:function(request,credentials,artifacts,options){options=options||{};var getHeader=function(name){return request.getResponseHeader?request.getResponseHeader(name):request.getHeader(name)};var wwwAuthenticate=getHeader("www-authenticate");if(wwwAuthenticate){var wwwAttributes=hawk.utils.parseAuthorizationHeader(wwwAuthenticate,["ts","tsm","error"]);if(!wwwAttributes){return false}if(wwwAttributes.ts){var tsm=hawk.crypto.calculateTsMac(wwwAttributes.ts,credentials);if(tsm!==wwwAttributes.tsm){return false}hawk.utils.setNtpOffset(wwwAttributes.ts-Math.floor((new Date).getTime()/1e3))}}var serverAuthorization=getHeader("server-authorization");if(!serverAuthorization&&!options.required){return true}var attributes=hawk.utils.parseAuthorizationHeader(serverAuthorization,["mac","ext","hash"]);if(!attributes){return false}var modArtifacts={ts:artifacts.ts,nonce:artifacts.nonce,method:artifacts.method,resource:artifacts.resource,host:artifacts.host,port:artifacts.port,hash:attributes.hash,ext:attributes.ext,app:artifacts.app,dlg:artifacts.dlg};var mac=hawk.crypto.calculateMac("response",credentials,modArtifacts);if(mac!==attributes.mac){return false}if(!options.payload&&options.payload!==""){return true}if(!attributes.hash){return false}var calculatedHash=hawk.crypto.calculatePayloadHash(options.payload,credentials.algorithm,getHeader("content-type"));return calculatedHash===attributes.hash},message:function(host,port,message,options){if(!host||typeof host!=="string"||!port||typeof port!=="number"||message===null||message===undefined||typeof message!=="string"||!options||typeof options!=="object"){return null}var timestamp=options.timestamp||hawk.utils.now(options.localtimeOffsetMsec);var credentials=options.credentials;if(!credentials||!credentials.id||!credentials.key||!credentials.algorithm){return null}if(hawk.crypto.algorithms.indexOf(credentials.algorithm)===-1){return null}var artifacts={ts:timestamp,nonce:options.nonce||hawk.utils.randomString(6),host:host,port:port,hash:hawk.crypto.calculatePayloadHash(message,credentials.algorithm)};var result={id:credentials.id,ts:artifacts.ts,nonce:artifacts.nonce,hash:artifacts.hash,mac:hawk.crypto.calculateMac("message",credentials,artifacts)};return result},authenticateTimestamp:function(message,credentials,updateClock){var tsm=hawk.crypto.calculateTsMac(message.ts,credentials);if(tsm!==message.tsm){return false}if(updateClock!==false){hawk.utils.setNtpOffset(message.ts-Math.floor((new Date).getTime()/1e3))}return true}};hawk.crypto={headerVersion:"1",algorithms:["sha1","sha256"],calculateMac:function(type,credentials,options){var normalized=hawk.crypto.generateNormalizedString(type,options);var hmac=CryptoJS["Hmac"+credentials.algorithm.toUpperCase()](normalized,credentials.key);return hmac.toString(CryptoJS.enc.Base64)},generateNormalizedString:function(type,options){var normalized="hawk."+hawk.crypto.headerVersion+"."+type+"\n"+options.ts+"\n"+options.nonce+"\n"+(options.method||"").toUpperCase()+"\n"+(options.resource||"")+"\n"+options.host.toLowerCase()+"\n"+options.port+"\n"+(options.hash||"")+"\n";if(options.ext){normalized+=options.ext.replace("\\","\\\\").replace("\n","\\n")}normalized+="\n";if(options.app){normalized+=options.app+"\n"+(options.dlg||"")+"\n"}return normalized},calculatePayloadHash:function(payload,algorithm,contentType){var hash=CryptoJS.algo[algorithm.toUpperCase()].create();hash.update("hawk."+hawk.crypto.headerVersion+".payload\n");hash.update(hawk.utils.parseContentType(contentType)+"\n");hash.update(payload);hash.update("\n");return hash.finalize().toString(CryptoJS.enc.Base64)},calculateTsMac:function(ts,credentials){var hash=CryptoJS["Hmac"+credentials.algorithm.toUpperCase()]("hawk."+hawk.crypto.headerVersion+".ts\n"+ts+"\n",credentials.key);return hash.toString(CryptoJS.enc.Base64)}};hawk.internals.LocalStorage=function(){this._cache={};this.length=0;this.getItem=function(key){return this._cache.hasOwnProperty(key)?String(this._cache[key]):null};this.setItem=function(key,value){this._cache[key]=String(value);this.length=Object.keys(this._cache).length};this.removeItem=function(key){delete this._cache[key];this.length=Object.keys(this._cache).length};this.clear=function(){this._cache={};this.length=0};this.key=function(i){return Object.keys(this._cache)[i||0]}};hawk.utils={storage:new hawk.internals.LocalStorage,setStorage:function(storage){var ntpOffset=hawk.utils.storage.getItem("hawk_ntp_offset");hawk.utils.storage=storage;if(ntpOffset){hawk.utils.setNtpOffset(ntpOffset)}},setNtpOffset:function(offset){try{hawk.utils.storage.setItem("hawk_ntp_offset",offset)}catch(err){console.error("[hawk] could not write to storage.");console.error(err)}},getNtpOffset:function(){var offset=hawk.utils.storage.getItem("hawk_ntp_offset");if(!offset){return 0}return parseInt(offset,10)},now:function(localtimeOffsetMsec){return Math.floor(((new Date).getTime()+(localtimeOffsetMsec||0))/1e3)+hawk.utils.getNtpOffset()},escapeHeaderAttribute:function(attribute){return attribute.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')},parseContentType:function(header){if(!header){return""}return header.split(";")[0].replace(/^\s+|\s+$/g,"").toLowerCase()},parseAuthorizationHeader:function(header,keys){if(!header){return null}var headerParts=header.match(/^(\w+)(?:\s+(.*))?$/);if(!headerParts){return null}var scheme=headerParts[1];if(scheme.toLowerCase()!=="hawk"){return null}var attributesString=headerParts[2];if(!attributesString){return null}var attributes={};var verify=attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g,function($0,$1,$2){if(keys.indexOf($1)===-1){return}if($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/)===null){return}if(attributes.hasOwnProperty($1)){return}attributes[$1]=$2;return""});if(verify!==""){return null}return attributes},randomString:function(size){var randomSource="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var len=randomSource.length;var result=[];for(var i=0;i>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535>>2]=d[e>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<<32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c,2),16)<<24-4*(c%8);return new j.init(d,b/2)}},p=m.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new j.init(d,b)}},t=m.Utf8={stringify:function(a){try{return decodeURIComponent(escape(p.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return p.parse(unescape(encodeURIComponent(a)))}},q=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new j.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,c=b.sigBytes,e=this.blockSize,f=c/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;c=h.min(4*a,c);if(a){for(var g=0;gc;c++){if(16>c)d[c]=n[p+c]|0;else{var g=d[c-3]^d[c-8]^d[c-14]^d[c-16];d[c]=g<<1|g>>>31}g=(e<<5|e>>>27)+b+d[c];g=20>c?g+((f&h|~f&j)+1518500249):40>c?g+((f^h^j)+1859775393):60>c?g+((f&h|f&j|h&j)-1894007588):g+((f^h^j)-899497514);b=j;j=h;h=f<<30|f>>>2;f=e;e=g}a[0]=a[0]+e|0;a[1]=a[1]+f|0;a[2]=a[2]+h|0;a[3]=a[3]+j|0;a[4]=a[4]+b|0},_doFinalize:function(){var b=this._data,d=b.words,a=8*this._nDataBytes,e=8*b.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=Math.floor(a/4294967296);d[(e+64>>>9<<4)+15]=a;b.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var b=l.clone.call(this);b._hash=this._hash.clone();return b}});k.SHA1=l._createHelper(b);k.HmacSHA1=l._createHmacHelper(b)})();(function(k){for(var g=CryptoJS,h=g.lib,v=h.WordArray,j=h.Hasher,h=g.algo,s=[],t=[],u=function(q){return 4294967296*(q-(q|0))|0},l=2,b=0;64>b;){var d;a:{d=l;for(var w=k.sqrt(d),r=2;r<=w;r++)if(!(d%r)){d=!1;break a}d=!0}d&&(8>b&&(s[b]=u(k.pow(l,.5))),t[b]=u(k.pow(l,1/3)),b++);l++}var n=[],h=h.SHA256=j.extend({_doReset:function(){this._hash=new v.init(s.slice(0))},_doProcessBlock:function(q,h){for(var a=this._hash.words,c=a[0],d=a[1],b=a[2],k=a[3],f=a[4],g=a[5],j=a[6],l=a[7],e=0;64>e;e++){if(16>e)n[e]=q[h+e]|0;else{var m=n[e-15],p=n[e-2];n[e]=((m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3)+n[e-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[e-16]}m=l+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&g^~f&j)+t[e]+n[e];p=((c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22))+(c&d^c&b^d&b);l=j;j=g;g=f;f=k+m|0;k=b;b=d;d=c;c=m+p|0}a[0]=a[0]+c|0;a[1]=a[1]+d|0;a[2]=a[2]+b|0;a[3]=a[3]+k|0;a[4]=a[4]+f|0;a[5]=a[5]+g|0;a[6]=a[6]+j|0;a[7]=a[7]+l|0},_doFinalize:function(){var d=this._data,b=d.words,a=8*this._nDataBytes,c=8*d.sigBytes;b[c>>>5]|=128<<24-c%32;b[(c+64>>>9<<4)+14]=k.floor(a/4294967296);b[(c+64>>>9<<4)+15]=a;d.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var b=j.clone.call(this);b._hash=this._hash.clone();return b}});g.SHA256=j._createHelper(h);g.HmacSHA256=j._createHmacHelper(h)})(Math);(function(){var c=CryptoJS,k=c.enc.Utf8;c.algo.HMAC=c.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=k.parse(b));var c=a.blockSize,e=4*c;b.sigBytes>e&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+.75*g>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();hawk.crypto.internals=CryptoJS;if(typeof module!=="undefined"&&module.exports){module.exports=hawk}},{}],144:[function(require,module,exports){var parser=require("./parser");var signer=require("./signer");var verify=require("./verify");var utils=require("./utils");module.exports={parse:parser.parseRequest,parseRequest:parser.parseRequest,sign:signer.signRequest,signRequest:signer.signRequest,createSigner:signer.createSigner,isSigner:signer.isSigner,sshKeyToPEM:utils.sshKeyToPEM,sshKeyFingerprint:utils.fingerprint,pemToRsaSSHKey:utils.pemToRsaSSHKey,verify:verify.verifySignature,verifySignature:verify.verifySignature,verifyHMAC:verify.verifyHMAC}},{"./parser":145,"./signer":146,"./utils":147,"./verify":148}],145:[function(require,module,exports){var assert=require("assert-plus");var util=require("util");var utils=require("./utils");var HASH_ALGOS=utils.HASH_ALGOS;var PK_ALGOS=utils.PK_ALGOS;var HttpSignatureError=utils.HttpSignatureError;var InvalidAlgorithmError=utils.InvalidAlgorithmError;var validateAlgorithm=utils.validateAlgorithm;var State={New:0,Params:1};var ParamsState={Name:0,Quote:1,Value:2,Comma:3};function ExpiredRequestError(message){HttpSignatureError.call(this,message,ExpiredRequestError); -}util.inherits(ExpiredRequestError,HttpSignatureError);function InvalidHeaderError(message){HttpSignatureError.call(this,message,InvalidHeaderError)}util.inherits(InvalidHeaderError,HttpSignatureError);function InvalidParamsError(message){HttpSignatureError.call(this,message,InvalidParamsError)}util.inherits(InvalidParamsError,HttpSignatureError);function MissingHeaderError(message){HttpSignatureError.call(this,message,MissingHeaderError)}util.inherits(MissingHeaderError,HttpSignatureError);function StrictParsingError(message){HttpSignatureError.call(this,message,StrictParsingError)}util.inherits(StrictParsingError,HttpSignatureError);module.exports={parseRequest:function parseRequest(request,options){assert.object(request,"request");assert.object(request.headers,"request.headers");if(options===undefined){options={}}if(options.headers===undefined){options.headers=[request.headers["x-date"]?"x-date":"date"]}assert.object(options,"options");assert.arrayOfString(options.headers,"options.headers");assert.optionalNumber(options.clockSkew,"options.clockSkew");if(!request.headers.authorization)throw new MissingHeaderError("no authorization header present in "+"the request");options.clockSkew=options.clockSkew||300;var i=0;var state=State.New;var substate=ParamsState.Name;var tmpName="";var tmpValue="";var parsed={scheme:"",params:{},signingString:"",get algorithm(){return this.params.algorithm.toUpperCase()},get keyId(){return this.params.keyId}};var authz=request.headers.authorization;for(i=0;i=65&&code<=90||code>=97&&code<=122){tmpName+=c}else if(c==="="){if(tmpName.length===0)throw new InvalidHeaderError("bad param format");substate=ParamsState.Quote}else{throw new InvalidHeaderError("bad param format")}break;case ParamsState.Quote:if(c==='"'){tmpValue="";substate=ParamsState.Value}else{throw new InvalidHeaderError("bad param format")}break;case ParamsState.Value:if(c==='"'){parsed.params[tmpName]=tmpValue;substate=ParamsState.Comma}else{tmpValue+=c}break;case ParamsState.Comma:if(c===","){tmpName="";substate=ParamsState.Name}else{throw new InvalidHeaderError("bad param format")}break;default:throw new Error("Invalid substate")}break;default:throw new Error("Invalid substate")}}if(!parsed.params.headers||parsed.params.headers===""){if(request.headers["x-date"]){parsed.params.headers=["x-date"]}else{parsed.params.headers=["date"]}}else{parsed.params.headers=parsed.params.headers.split(" ")}if(!parsed.scheme||parsed.scheme!=="Signature")throw new InvalidHeaderError('scheme was not "Signature"');if(!parsed.params.keyId)throw new InvalidHeaderError("keyId was not specified");if(!parsed.params.algorithm)throw new InvalidHeaderError("algorithm was not specified");if(!parsed.params.signature)throw new InvalidHeaderError("signature was not specified");parsed.params.algorithm=parsed.params.algorithm.toLowerCase();try{validateAlgorithm(parsed.params.algorithm)}catch(e){if(e instanceof InvalidAlgorithmError)throw new InvalidParamsError(parsed.params.algorithm+" is not "+"supported");else throw e}for(i=0;ioptions.clockSkew*1e3){throw new ExpiredRequestError("clock skew of "+skew/1e3+"s was greater than "+options.clockSkew+"s")}}options.headers.forEach(function(hdr){if(parsed.params.headers.indexOf(hdr)<0)throw new MissingHeaderError(hdr+" was not a signed header")});if(options.algorithms){if(options.algorithms.indexOf(parsed.params.algorithm)===-1)throw new InvalidParamsError(parsed.params.algorithm+" is not a supported algorithm")}return parsed}}},{"./utils":147,"assert-plus":28,util:293}],146:[function(require,module,exports){(function(Buffer){var assert=require("assert-plus");var crypto=require("crypto");var http=require("http");var util=require("util");var sshpk=require("sshpk");var jsprim=require("jsprim");var utils=require("./utils");var sprintf=require("util").format;var HASH_ALGOS=utils.HASH_ALGOS;var PK_ALGOS=utils.PK_ALGOS;var InvalidAlgorithmError=utils.InvalidAlgorithmError;var HttpSignatureError=utils.HttpSignatureError;var validateAlgorithm=utils.validateAlgorithm;var AUTHZ_FMT='Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"';function MissingHeaderError(message){HttpSignatureError.call(this,message,MissingHeaderError)}util.inherits(MissingHeaderError,HttpSignatureError);function StrictParsingError(message){HttpSignatureError.call(this,message,StrictParsingError)}util.inherits(StrictParsingError,HttpSignatureError);function RequestSigner(options){assert.object(options,"options");var alg=[];if(options.algorithm!==undefined){assert.string(options.algorithm,"options.algorithm");alg=validateAlgorithm(options.algorithm)}this.rs_alg=alg;if(options.sign!==undefined){assert.func(options.sign,"options.sign");this.rs_signFunc=options.sign}else if(alg[0]==="hmac"&&options.key!==undefined){assert.string(options.keyId,"options.keyId");this.rs_keyId=options.keyId;if(typeof options.key!=="string"&&!Buffer.isBuffer(options.key))throw new TypeError("options.key for HMAC must be a string or Buffer");this.rs_signer=crypto.createHmac(alg[1].toUpperCase(),options.key);this.rs_signer.sign=function(){var digest=this.digest("base64");return{hashAlgorithm:alg[1],toString:function(){return digest}}}}else if(options.key!==undefined){var key=options.key;if(typeof key==="string"||Buffer.isBuffer(key))key=sshpk.parsePrivateKey(key);assert.ok(sshpk.PrivateKey.isPrivateKey(key,[1,2]),"options.key must be a sshpk.PrivateKey");this.rs_key=key;assert.string(options.keyId,"options.keyId");this.rs_keyId=options.keyId;if(!PK_ALGOS[key.type]){throw new InvalidAlgorithmError(key.type.toUpperCase()+" type "+"keys are not supported")}if(alg[0]!==undefined&&key.type!==alg[0]){throw new InvalidAlgorithmError("options.key must be a "+alg[0].toUpperCase()+" key, was given a "+key.type.toUpperCase()+" key instead")}this.rs_signer=key.createSign(alg[1])}else{throw new TypeError("options.sign (func) or options.key is required")}this.rs_headers=[];this.rs_lines=[]}RequestSigner.prototype.writeHeader=function(header,value){assert.string(header,"header");header=header.toLowerCase();assert.string(value,"value");this.rs_headers.push(header);if(this.rs_signFunc){this.rs_lines.push(header+": "+value)}else{var line=header+": "+value;if(this.rs_headers.length>0)line="\n"+line;this.rs_signer.update(line)}return value};RequestSigner.prototype.writeDateHeader=function(){return this.writeHeader("date",jsprim.rfc1123(new Date))};RequestSigner.prototype.writeTarget=function(method,path){assert.string(method,"method");assert.string(path,"path");method=method.toLowerCase();this.writeHeader("(request-target)",method+" "+path)};RequestSigner.prototype.sign=function(cb){assert.func(cb,"callback");if(this.rs_headers.length<1)throw new Error("At least one header must be signed");var alg,authz;if(this.rs_signFunc){var data=this.rs_lines.join("\n");var self=this;this.rs_signFunc(data,function(err,sig){if(err){cb(err);return}try{assert.object(sig,"signature");assert.string(sig.keyId,"signature.keyId");assert.string(sig.algorithm,"signature.algorithm");assert.string(sig.signature,"signature.signature");alg=validateAlgorithm(sig.algorithm);authz=sprintf(AUTHZ_FMT,sig.keyId,sig.algorithm,self.rs_headers.join(" "),sig.signature)}catch(e){cb(e);return}cb(null,authz)})}else{try{var sigObj=this.rs_signer.sign()}catch(e){cb(e);return}alg=(this.rs_alg[0]||this.rs_key.type)+"-"+sigObj.hashAlgorithm;var signature=sigObj.toString();authz=sprintf(AUTHZ_FMT,this.rs_keyId,alg,this.rs_headers.join(" "),signature);cb(null,authz)}};module.exports={isSigner:function(obj){if(typeof obj==="object"&&obj instanceof RequestSigner)return true;return false},createSigner:function createSigner(options){return new RequestSigner(options)},signRequest:function signRequest(request,options){assert.object(request,"request");assert.object(options,"options");assert.optionalString(options.algorithm,"options.algorithm");assert.string(options.keyId,"options.keyId");assert.optionalArrayOfString(options.headers,"options.headers");assert.optionalString(options.httpVersion,"options.httpVersion");if(!request.getHeader("Date"))request.setHeader("Date",jsprim.rfc1123(new Date));if(!options.headers)options.headers=["date"];if(!options.httpVersion)options.httpVersion="1.1";var alg=[];if(options.algorithm){options.algorithm=options.algorithm.toLowerCase();alg=validateAlgorithm(options.algorithm)}var i;var stringToSign="";for(i=0;i>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],151:[function(require,module,exports){var indexOf=[].indexOf;module.exports=function(arr,obj){if(indexOf)return arr.indexOf(obj);for(var i=0;i 9007199254740992 || "+name+" < -9007199254740992)"};types.string=function(name){return"typeof "+name+' === "string"'};var unique=function(array){var list=[];for(var i=0;i1){var factorName=(name|0)!==name?Math.pow(10,name.toString().split(".").pop().length):1;if(factorName>factor)res=true;else res=Math.round(factor*name)%(factor*multipleOf)}else res=name%multipleOf;return!res};var toType=function(node){return node.type};var compile=function(schema,cache,root,reporter,opts){var fmts=opts?xtend(formats,opts.formats):formats;var scope={unique:unique,formats:fmts,isMultipleOf:isMultipleOf};var verbose=opts?!!opts.verbose:false;var greedy=opts&&opts.greedy!==undefined?opts.greedy:false;var syms={};var gensym=function(name){return name+(syms[name]=(syms[name]||0)+1)};var reversePatterns={};var patterns=function(p){if(reversePatterns[p])return reversePatterns[p];var n=gensym("pattern");scope[n]=new RegExp(p);reversePatterns[p]=n;return n};var vars=["i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","y","z"];var genloop=function(){var v=vars.shift();vars.push(v+v[0]);return v};var visit=function(name,node,reporter,filter){var properties=node.properties;var type=node.type;var tuple=false;if(Array.isArray(node.items)){properties={};node.items.forEach(function(item,i){properties[i]=item});type="array";tuple=true}var indent=0;var error=function(msg,prop,value){validate("errors++");if(reporter===true){validate("if (validate.errors === null) validate.errors = []");if(verbose){validate("validate.errors.push({field:%s,message:%s,value:%s,type:%s})",formatName(prop||name),JSON.stringify(msg),value||name,JSON.stringify(type))}else{validate("validate.errors.push({field:%s,message:%s})",formatName(prop||name),JSON.stringify(msg))}}};if(node.required===true){indent++;validate("if (%s === undefined) {",name);error("is required");validate("} else {")}else{indent++;validate("if (%s !== undefined) {",name)}var valid=[].concat(type).map(function(t){return types[t||"any"](name)}).join(" || ")||"true";if(valid!=="true"){indent++;validate("if (!(%s)) {",valid);error("is the wrong type");validate("} else {")}if(tuple){if(node.additionalItems===false){validate("if (%s.length > %d) {",name,node.items.length);error("has additional items");validate("}")}else if(node.additionalItems){var i=genloop();validate("for (var %s = %d; %s < %s.length; %s++) {",i,node.items.length,i,name,i);visit(name+"["+i+"]",node.additionalItems,reporter,filter);validate("}")}}if(node.format&&fmts[node.format]){if(type!=="string"&&formats[node.format])validate("if (%s) {",types.string(name));var n=gensym("format");scope[n]=fmts[node.format];if(typeof scope[n]==="function")validate("if (!%s(%s)) {",n,name);else validate("if (!%s.test(%s)) {",n,name);error("must be "+node.format+" format");validate("}");if(type!=="string"&&formats[node.format])validate("}")}if(Array.isArray(node.required)){var isUndefined=function(req){return genobj(name,req)+" === undefined"};var checkRequired=function(req){var prop=genobj(name,req);validate("if (%s === undefined) {",prop);error("is required",prop);validate("missing++");validate("}")};validate("if ((%s)) {",type!=="object"?types.object(name):"true");validate("var missing = 0");node.required.map(checkRequired);validate("}");if(!greedy){validate("if (missing === 0) {");indent++}}if(node.uniqueItems){if(type!=="array")validate("if (%s) {",types.array(name));validate("if (!(unique(%s))) {",name);error("must be unique");validate("}");if(type!=="array")validate("}")}if(node.enum){var complex=node.enum.some(function(e){return typeof e==="object"});var compare=complex?function(e){return"JSON.stringify("+name+")"+" !== JSON.stringify("+JSON.stringify(e)+")"}:function(e){return name+" !== "+JSON.stringify(e)};validate("if (%s) {",node.enum.map(compare).join(" && ")||"false");error("must be an enum value");validate("}")}if(node.dependencies){if(type!=="object")validate("if (%s) {",types.object(name));Object.keys(node.dependencies).forEach(function(key){var deps=node.dependencies[key];if(typeof deps==="string")deps=[deps];var exists=function(k){return genobj(name,k)+" !== undefined"};if(Array.isArray(deps)){validate("if (%s !== undefined && !(%s)) {",genobj(name,key),deps.map(exists).join(" && ")||"true");error("dependencies not set");validate("}")}if(typeof deps==="object"){validate("if (%s !== undefined) {",genobj(name,key));visit(name,deps,reporter,filter);validate("}")}});if(type!=="object")validate("}")}if(node.additionalProperties||node.additionalProperties===false){if(type!=="object")validate("if (%s) {",types.object(name));var i=genloop();var keys=gensym("keys");var toCompare=function(p){return keys+"["+i+"] !== "+JSON.stringify(p)};var toTest=function(p){return"!"+patterns(p)+".test("+keys+"["+i+"])"};var additionalProp=Object.keys(properties||{}).map(toCompare).concat(Object.keys(node.patternProperties||{}).map(toTest)).join(" && ")||"true";validate("var %s = Object.keys(%s)",keys,name)("for (var %s = 0; %s < %s.length; %s++) {",i,i,keys,i)("if (%s) {",additionalProp);if(node.additionalProperties===false){if(filter)validate("delete %s",name+"["+keys+"["+i+"]]");error("has additional properties",null,JSON.stringify(name+".")+" + "+keys+"["+i+"]")}else{visit(name+"["+keys+"["+i+"]]",node.additionalProperties,reporter,filter)}validate("}")("}");if(type!=="object")validate("}")}if(node.$ref){var sub=get(root,opts&&opts.schemas||{},node.$ref);if(sub){var fn=cache[node.$ref];if(!fn){cache[node.$ref]=function proxy(data){return fn(data)};fn=compile(sub,cache,root,false,opts)}var n=gensym("ref");scope[n]=fn;validate("if (!(%s(%s))) {",n,name);error("referenced schema does not match");validate("}")}}if(node.not){var prev=gensym("prev");validate("var %s = errors",prev);visit(name,node.not,false,filter);validate("if (%s === errors) {",prev);error("negative schema matches");validate("} else {")("errors = %s",prev)("}")}if(node.items&&!tuple){if(type!=="array")validate("if (%s) {",types.array(name));var i=genloop();validate("for (var %s = 0; %s < %s.length; %s++) {",i,i,name,i);visit(name+"["+i+"]",node.items,reporter,filter);validate("}");if(type!=="array")validate("}")}if(node.patternProperties){if(type!=="object")validate("if (%s) {",types.object(name));var keys=gensym("keys");var i=genloop();validate("var %s = Object.keys(%s)",keys,name)("for (var %s = 0; %s < %s.length; %s++) {",i,i,keys,i);Object.keys(node.patternProperties).forEach(function(key){var p=patterns(key);validate("if (%s.test(%s)) {",p,keys+"["+i+"]");visit(name+"["+keys+"["+i+"]]",node.patternProperties[key],reporter,filter);validate("}")});validate("}");if(type!=="object")validate("}")}if(node.pattern){var p=patterns(node.pattern);if(type!=="string")validate("if (%s) {",types.string(name));validate("if (!(%s.test(%s))) {",p,name);error("pattern mismatch");validate("}");if(type!=="string")validate("}")}if(node.allOf){node.allOf.forEach(function(sch){visit(name,sch,reporter,filter)})}if(node.anyOf&&node.anyOf.length){var prev=gensym("prev");node.anyOf.forEach(function(sch,i){if(i===0){validate("var %s = errors",prev)}else{validate("if (errors !== %s) {",prev)("errors = %s",prev)}visit(name,sch,false,false)});node.anyOf.forEach(function(sch,i){if(i)validate("}")});validate("if (%s !== errors) {",prev);error("no schemas match");validate("}")}if(node.oneOf&&node.oneOf.length){var prev=gensym("prev");var passes=gensym("passes");validate("var %s = errors",prev)("var %s = 0",passes);node.oneOf.forEach(function(sch,i){visit(name,sch,false,false);validate("if (%s === errors) {",prev)("%s++",passes)("} else {")("errors = %s",prev)("}")});validate("if (%s !== 1) {",passes);error("no (or more than one) schemas match");validate("}")}if(node.multipleOf!==undefined){if(type!=="number"&&type!=="integer")validate("if (%s) {",types.number(name));validate("if (!isMultipleOf(%s, %d)) {",name,node.multipleOf);error("has a remainder");validate("}");if(type!=="number"&&type!=="integer")validate("}")}if(node.maxProperties!==undefined){if(type!=="object")validate("if (%s) {",types.object(name));validate("if (Object.keys(%s).length > %d) {",name,node.maxProperties);error("has more properties than allowed");validate("}");if(type!=="object")validate("}")}if(node.minProperties!==undefined){if(type!=="object")validate("if (%s) {",types.object(name));validate("if (Object.keys(%s).length < %d) {",name,node.minProperties);error("has less properties than allowed");validate("}");if(type!=="object")validate("}")}if(node.maxItems!==undefined){if(type!=="array")validate("if (%s) {",types.array(name));validate("if (%s.length > %d) {",name,node.maxItems);error("has more items than allowed");validate("}");if(type!=="array")validate("}")}if(node.minItems!==undefined){if(type!=="array")validate("if (%s) {",types.array(name));validate("if (%s.length < %d) {",name,node.minItems);error("has less items than allowed");validate("}");if(type!=="array")validate("}")}if(node.maxLength!==undefined){if(type!=="string")validate("if (%s) {",types.string(name));validate("if (%s.length > %d) {",name,node.maxLength);error("has longer length than allowed");validate("}");if(type!=="string")validate("}")}if(node.minLength!==undefined){if(type!=="string")validate("if (%s) {",types.string(name));validate("if (%s.length < %d) {",name,node.minLength);error("has less length than allowed");validate("}");if(type!=="string")validate("}")}if(node.minimum!==undefined){if(type!=="number"&&type!=="integer")validate("if (%s) {",types.number(name));validate("if (%s %s %d) {",name,node.exclusiveMinimum?"<=":"<",node.minimum);error("is less than minimum");validate("}");if(type!=="number"&&type!=="integer")validate("}")}if(node.maximum!==undefined){if(type!=="number"&&type!=="integer")validate("if (%s) {",types.number(name)); -validate("if (%s %s %d) {",name,node.exclusiveMaximum?">=":">",node.maximum);error("is more than maximum");validate("}");if(type!=="number"&&type!=="integer")validate("}")}if(properties){Object.keys(properties).forEach(function(p){if(Array.isArray(type)&&type.indexOf("null")!==-1)validate("if (%s !== null) {",name);visit(genobj(name,p),properties[p],reporter,filter);if(Array.isArray(type)&&type.indexOf("null")!==-1)validate("}")})}while(indent--)validate("}")};var validate=genfun("function validate(data) {")("if (data === undefined) data = null")("validate.errors = null")("var errors = 0");visit("data",schema,reporter,opts&&opts.filter);validate("return errors === 0")("}");validate=validate.toFunction(scope);validate.errors=null;if(Object.defineProperty){Object.defineProperty(validate,"error",{get:function(){if(!validate.errors)return"";return validate.errors.map(function(err){return err.field+" "+err.message}).join("\n")}})}validate.toJSON=function(){return schema};return validate};module.exports=function(schema,opts){if(typeof schema==="string")schema=JSON.parse(schema);return compile(schema,{},schema,true,opts)};module.exports.filter=function(schema,opts){var validate=module.exports(schema,xtend(opts,{filter:true}));return function(sch){validate(sch);return sch}}},{"./formats":154,"generate-function":116,"generate-object-property":117,jsonpointer:169,xtend:304}],156:[function(require,module,exports){"use strict";function isProperty(str){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(str)}module.exports=isProperty},{}],157:[function(require,module,exports){module.exports=isTypedArray;isTypedArray.strict=isStrictTypedArray;isTypedArray.loose=isLooseTypedArray;var toString=Object.prototype.toString;var names={"[object Int8Array]":true,"[object Int16Array]":true,"[object Int32Array]":true,"[object Uint8Array]":true,"[object Uint8ClampedArray]":true,"[object Uint16Array]":true,"[object Uint32Array]":true,"[object Float32Array]":true,"[object Float64Array]":true};function isTypedArray(arr){return isStrictTypedArray(arr)||isLooseTypedArray(arr)}function isStrictTypedArray(arr){return arr instanceof Int8Array||arr instanceof Int16Array||arr instanceof Int32Array||arr instanceof Uint8Array||arr instanceof Uint8ClampedArray||arr instanceof Uint16Array||arr instanceof Uint32Array||arr instanceof Float32Array||arr instanceof Float64Array}function isLooseTypedArray(arr){return names[toString.call(arr)]}},{}],158:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],159:[function(require,module,exports){var stream=require("stream");function isStream(obj){return obj instanceof stream.Stream}function isReadable(obj){return isStream(obj)&&typeof obj._read=="function"&&typeof obj._readableState=="object"}function isWritable(obj){return isStream(obj)&&typeof obj._write=="function"&&typeof obj._writableState=="object"}function isDuplex(obj){return isReadable(obj)&&isWritable(obj)}module.exports=isStream;module.exports.isReadable=isReadable;module.exports.isWritable=isWritable;module.exports.isDuplex=isDuplex},{stream:271}],160:[function(require,module,exports){"use strict";var dh=require("./lib/dh");var eddsa=require("./lib/eddsa");var curve255=require("./lib/curve255");var utils=require("./lib/utils");var ns={};ns.VERSION="0.7.1";ns.dh=dh;ns.eddsa=eddsa;ns.curve255=curve255;ns.utils=utils;module.exports=ns},{"./lib/curve255":162,"./lib/dh":163,"./lib/eddsa":164,"./lib/utils":165}],161:[function(require,module,exports){"use strict";var crypto=require("crypto");var ns={};function _setbit(n,c,v){var i=c>>4;var a=n[i];a=a+(1<<(c&15))*v;n[i]=a}function _getbit(n,c){return n[c>>4]>>(c&15)&1}function _ZERO(){return[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function _ONE(){return[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function _BASE(){return[9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function _bigintcmp(a,b){var c,abs_r,mask;var r=0;for(c=15;c>=0;c--){var x=a[c];var y=b[c];r=r+(x-y)*(1-r*r);mask=r>>31;abs_r=r+mask^mask;r=~~((r<<1)/(abs_r+1))}return r}function _bigintadd(a,b){var r=[];var v;r[0]=(v=a[0]+b[0])&65535;r[1]=(v=(v>>>16)+a[1]+b[1])&65535;r[2]=(v=(v>>>16)+a[2]+b[2])&65535;r[3]=(v=(v>>>16)+a[3]+b[3])&65535;r[4]=(v=(v>>>16)+a[4]+b[4])&65535;r[5]=(v=(v>>>16)+a[5]+b[5])&65535;r[6]=(v=(v>>>16)+a[6]+b[6])&65535;r[7]=(v=(v>>>16)+a[7]+b[7])&65535;r[8]=(v=(v>>>16)+a[8]+b[8])&65535;r[9]=(v=(v>>>16)+a[9]+b[9])&65535;r[10]=(v=(v>>>16)+a[10]+b[10])&65535;r[11]=(v=(v>>>16)+a[11]+b[11])&65535;r[12]=(v=(v>>>16)+a[12]+b[12])&65535;r[13]=(v=(v>>>16)+a[13]+b[13])&65535;r[14]=(v=(v>>>16)+a[14]+b[14])&65535;r[15]=(v>>>16)+a[15]+b[15];return r}function _bigintsub(a,b){var r=[];var v;r[0]=(v=524288+a[0]-b[0])&65535;r[1]=(v=(v>>>16)+524280+a[1]-b[1])&65535;r[2]=(v=(v>>>16)+524280+a[2]-b[2])&65535;r[3]=(v=(v>>>16)+524280+a[3]-b[3])&65535;r[4]=(v=(v>>>16)+524280+a[4]-b[4])&65535;r[5]=(v=(v>>>16)+524280+a[5]-b[5])&65535;r[6]=(v=(v>>>16)+524280+a[6]-b[6])&65535;r[7]=(v=(v>>>16)+524280+a[7]-b[7])&65535;r[8]=(v=(v>>>16)+524280+a[8]-b[8])&65535;r[9]=(v=(v>>>16)+524280+a[9]-b[9])&65535;r[10]=(v=(v>>>16)+524280+a[10]-b[10])&65535;r[11]=(v=(v>>>16)+524280+a[11]-b[11])&65535;r[12]=(v=(v>>>16)+524280+a[12]-b[12])&65535;r[13]=(v=(v>>>16)+524280+a[13]-b[13])&65535;r[14]=(v=(v>>>16)+524280+a[14]-b[14])&65535;r[15]=(v>>>16)-8+a[15]-b[15];return r}function _sqr8h(a7,a6,a5,a4,a3,a2,a1,a0){var r=[];var v;r[0]=(v=a0*a0)&65535;r[1]=(v=(0|v/65536)+2*a0*a1)&65535;r[2]=(v=(0|v/65536)+2*a0*a2+a1*a1)&65535;r[3]=(v=(0|v/65536)+2*a0*a3+2*a1*a2)&65535;r[4]=(v=(0|v/65536)+2*a0*a4+2*a1*a3+a2*a2)&65535;r[5]=(v=(0|v/65536)+2*a0*a5+2*a1*a4+2*a2*a3)&65535;r[6]=(v=(0|v/65536)+2*a0*a6+2*a1*a5+2*a2*a4+a3*a3)&65535;r[7]=(v=(0|v/65536)+2*a0*a7+2*a1*a6+2*a2*a5+2*a3*a4)&65535;r[8]=(v=(0|v/65536)+2*a1*a7+2*a2*a6+2*a3*a5+a4*a4)&65535;r[9]=(v=(0|v/65536)+2*a2*a7+2*a3*a6+2*a4*a5)&65535;r[10]=(v=(0|v/65536)+2*a3*a7+2*a4*a6+a5*a5)&65535;r[11]=(v=(0|v/65536)+2*a4*a7+2*a5*a6)&65535;r[12]=(v=(0|v/65536)+2*a5*a7+a6*a6)&65535;r[13]=(v=(0|v/65536)+2*a6*a7)&65535;r[14]=(v=(0|v/65536)+a7*a7)&65535;r[15]=0|v/65536;return r}function _sqrmodp(a){var x=_sqr8h(a[15],a[14],a[13],a[12],a[11],a[10],a[9],a[8]);var z=_sqr8h(a[7],a[6],a[5],a[4],a[3],a[2],a[1],a[0]);var y=_sqr8h(a[15]+a[7],a[14]+a[6],a[13]+a[5],a[12]+a[4],a[11]+a[3],a[10]+a[2],a[9]+a[1],a[8]+a[0]);var r=[];var v;r[0]=(v=8388608+z[0]+(y[8]-x[8]-z[8]+x[0]-128)*38)&65535;r[1]=(v=8388480+(v>>>16)+z[1]+(y[9]-x[9]-z[9]+x[1])*38)&65535;r[2]=(v=8388480+(v>>>16)+z[2]+(y[10]-x[10]-z[10]+x[2])*38)&65535;r[3]=(v=8388480+(v>>>16)+z[3]+(y[11]-x[11]-z[11]+x[3])*38)&65535;r[4]=(v=8388480+(v>>>16)+z[4]+(y[12]-x[12]-z[12]+x[4])*38)&65535;r[5]=(v=8388480+(v>>>16)+z[5]+(y[13]-x[13]-z[13]+x[5])*38)&65535;r[6]=(v=8388480+(v>>>16)+z[6]+(y[14]-x[14]-z[14]+x[6])*38)&65535;r[7]=(v=8388480+(v>>>16)+z[7]+(y[15]-x[15]-z[15]+x[7])*38)&65535;r[8]=(v=8388480+(v>>>16)+z[8]+y[0]-x[0]-z[0]+x[8]*38)&65535;r[9]=(v=8388480+(v>>>16)+z[9]+y[1]-x[1]-z[1]+x[9]*38)&65535;r[10]=(v=8388480+(v>>>16)+z[10]+y[2]-x[2]-z[2]+x[10]*38)&65535;r[11]=(v=8388480+(v>>>16)+z[11]+y[3]-x[3]-z[3]+x[11]*38)&65535;r[12]=(v=8388480+(v>>>16)+z[12]+y[4]-x[4]-z[4]+x[12]*38)&65535;r[13]=(v=8388480+(v>>>16)+z[13]+y[5]-x[5]-z[5]+x[13]*38)&65535;r[14]=(v=8388480+(v>>>16)+z[14]+y[6]-x[6]-z[6]+x[14]*38)&65535;r[15]=8388480+(v>>>16)+z[15]+y[7]-x[7]-z[7]+x[15]*38;_reduce(r);return r}function _mul8h(a7,a6,a5,a4,a3,a2,a1,a0,b7,b6,b5,b4,b3,b2,b1,b0){var r=[];var v;r[0]=(v=a0*b0)&65535;r[1]=(v=(0|v/65536)+a0*b1+a1*b0)&65535;r[2]=(v=(0|v/65536)+a0*b2+a1*b1+a2*b0)&65535;r[3]=(v=(0|v/65536)+a0*b3+a1*b2+a2*b1+a3*b0)&65535;r[4]=(v=(0|v/65536)+a0*b4+a1*b3+a2*b2+a3*b1+a4*b0)&65535;r[5]=(v=(0|v/65536)+a0*b5+a1*b4+a2*b3+a3*b2+a4*b1+a5*b0)&65535;r[6]=(v=(0|v/65536)+a0*b6+a1*b5+a2*b4+a3*b3+a4*b2+a5*b1+a6*b0)&65535;r[7]=(v=(0|v/65536)+a0*b7+a1*b6+a2*b5+a3*b4+a4*b3+a5*b2+a6*b1+a7*b0)&65535;r[8]=(v=(0|v/65536)+a1*b7+a2*b6+a3*b5+a4*b4+a5*b3+a6*b2+a7*b1)&65535;r[9]=(v=(0|v/65536)+a2*b7+a3*b6+a4*b5+a5*b4+a6*b3+a7*b2)&65535;r[10]=(v=(0|v/65536)+a3*b7+a4*b6+a5*b5+a6*b4+a7*b3)&65535;r[11]=(v=(0|v/65536)+a4*b7+a5*b6+a6*b5+a7*b4)&65535;r[12]=(v=(0|v/65536)+a5*b7+a6*b6+a7*b5)&65535;r[13]=(v=(0|v/65536)+a6*b7+a7*b6)&65535;r[14]=(v=(0|v/65536)+a7*b7)&65535;r[15]=0|v/65536;return r}function _mulmodp(a,b){var x=_mul8h(a[15],a[14],a[13],a[12],a[11],a[10],a[9],a[8],b[15],b[14],b[13],b[12],b[11],b[10],b[9],b[8]);var z=_mul8h(a[7],a[6],a[5],a[4],a[3],a[2],a[1],a[0],b[7],b[6],b[5],b[4],b[3],b[2],b[1],b[0]);var y=_mul8h(a[15]+a[7],a[14]+a[6],a[13]+a[5],a[12]+a[4],a[11]+a[3],a[10]+a[2],a[9]+a[1],a[8]+a[0],b[15]+b[7],b[14]+b[6],b[13]+b[5],b[12]+b[4],b[11]+b[3],b[10]+b[2],b[9]+b[1],b[8]+b[0]);var r=[];var v;r[0]=(v=8388608+z[0]+(y[8]-x[8]-z[8]+x[0]-128)*38)&65535;r[1]=(v=8388480+(v>>>16)+z[1]+(y[9]-x[9]-z[9]+x[1])*38)&65535;r[2]=(v=8388480+(v>>>16)+z[2]+(y[10]-x[10]-z[10]+x[2])*38)&65535;r[3]=(v=8388480+(v>>>16)+z[3]+(y[11]-x[11]-z[11]+x[3])*38)&65535;r[4]=(v=8388480+(v>>>16)+z[4]+(y[12]-x[12]-z[12]+x[4])*38)&65535;r[5]=(v=8388480+(v>>>16)+z[5]+(y[13]-x[13]-z[13]+x[5])*38)&65535;r[6]=(v=8388480+(v>>>16)+z[6]+(y[14]-x[14]-z[14]+x[6])*38)&65535;r[7]=(v=8388480+(v>>>16)+z[7]+(y[15]-x[15]-z[15]+x[7])*38)&65535;r[8]=(v=8388480+(v>>>16)+z[8]+y[0]-x[0]-z[0]+x[8]*38)&65535;r[9]=(v=8388480+(v>>>16)+z[9]+y[1]-x[1]-z[1]+x[9]*38)&65535;r[10]=(v=8388480+(v>>>16)+z[10]+y[2]-x[2]-z[2]+x[10]*38)&65535;r[11]=(v=8388480+(v>>>16)+z[11]+y[3]-x[3]-z[3]+x[11]*38)&65535;r[12]=(v=8388480+(v>>>16)+z[12]+y[4]-x[4]-z[4]+x[12]*38)&65535;r[13]=(v=8388480+(v>>>16)+z[13]+y[5]-x[5]-z[5]+x[13]*38)&65535;r[14]=(v=8388480+(v>>>16)+z[14]+y[6]-x[6]-z[6]+x[14]*38)&65535;r[15]=8388480+(v>>>16)+z[15]+y[7]-x[7]-z[7]+x[15]*38;_reduce(r);return r}function _reduce(arr){var aCopy=arr.slice(0);var choice=[arr,aCopy];var v=arr[15];var a=choice[v<32768&1];a[15]=v&32767;v=(0|v/32768)*19;a[0]=(v+=a[0])&65535;v=v>>>16;a[1]=(v+=a[1])&65535;v=v>>>16;a[2]=(v+=a[2])&65535;v=v>>>16;a[3]=(v+=a[3])&65535;v=v>>>16;a[4]=(v+=a[4])&65535;v=v>>>16;a[5]=(v+=a[5])&65535;v=v>>>16;a[6]=(v+=a[6])&65535;v=v>>>16;a[7]=(v+=a[7])&65535;v=v>>>16;a[8]=(v+=a[8])&65535;v=v>>>16;a[9]=(v+=a[9])&65535;v=v>>>16;a[10]=(v+=a[10])&65535;v=v>>>16;a[11]=(v+=a[11])&65535;v=v>>>16;a[12]=(v+=a[12])&65535;v=v>>>16;a[13]=(v+=a[13])&65535;v=v>>>16;a[14]=(v+=a[14])&65535;v=v>>>16;a[15]+=v}function _addmodp(a,b){var r=[];var v;r[0]=(v=((0|a[15]>>>15)+(0|b[15]>>>15))*19+a[0]+b[0])&65535;r[1]=(v=(v>>>16)+a[1]+b[1])&65535;r[2]=(v=(v>>>16)+a[2]+b[2])&65535;r[3]=(v=(v>>>16)+a[3]+b[3])&65535;r[4]=(v=(v>>>16)+a[4]+b[4])&65535;r[5]=(v=(v>>>16)+a[5]+b[5])&65535;r[6]=(v=(v>>>16)+a[6]+b[6])&65535;r[7]=(v=(v>>>16)+a[7]+b[7])&65535;r[8]=(v=(v>>>16)+a[8]+b[8])&65535;r[9]=(v=(v>>>16)+a[9]+b[9])&65535;r[10]=(v=(v>>>16)+a[10]+b[10])&65535;r[11]=(v=(v>>>16)+a[11]+b[11])&65535;r[12]=(v=(v>>>16)+a[12]+b[12])&65535;r[13]=(v=(v>>>16)+a[13]+b[13])&65535;r[14]=(v=(v>>>16)+a[14]+b[14])&65535;r[15]=(v>>>16)+(a[15]&32767)+(b[15]&32767);return r}function _submodp(a,b){var r=[];var v;r[0]=(v=524288+((0|a[15]>>>15)-(0|b[15]>>>15)-1)*19+a[0]-b[0])&65535;r[1]=(v=(v>>>16)+524280+a[1]-b[1])&65535;r[2]=(v=(v>>>16)+524280+a[2]-b[2])&65535;r[3]=(v=(v>>>16)+524280+a[3]-b[3])&65535;r[4]=(v=(v>>>16)+524280+a[4]-b[4])&65535;r[5]=(v=(v>>>16)+524280+a[5]-b[5])&65535;r[6]=(v=(v>>>16)+524280+a[6]-b[6])&65535;r[7]=(v=(v>>>16)+524280+a[7]-b[7])&65535;r[8]=(v=(v>>>16)+524280+a[8]-b[8])&65535;r[9]=(v=(v>>>16)+524280+a[9]-b[9])&65535;r[10]=(v=(v>>>16)+524280+a[10]-b[10])&65535;r[11]=(v=(v>>>16)+524280+a[11]-b[11])&65535;r[12]=(v=(v>>>16)+524280+a[12]-b[12])&65535;r[13]=(v=(v>>>16)+524280+a[13]-b[13])&65535;r[14]=(v=(v>>>16)+524280+a[14]-b[14])&65535;r[15]=(v>>>16)+32760+(a[15]&32767)-(b[15]&32767);return r}function _invmodp(a){var c=a;var i=250;while(--i){a=_sqrmodp(a);a=_mulmodp(a,c)}a=_sqrmodp(a);a=_sqrmodp(a);a=_mulmodp(a,c);a=_sqrmodp(a);a=_sqrmodp(a);a=_mulmodp(a,c);a=_sqrmodp(a);a=_mulmodp(a,c);return a}function _mulasmall(a){var m=121665;var r=[];var v;r[0]=(v=a[0]*m)&65535;r[1]=(v=(0|v/65536)+a[1]*m)&65535;r[2]=(v=(0|v/65536)+a[2]*m)&65535;r[3]=(v=(0|v/65536)+a[3]*m)&65535;r[4]=(v=(0|v/65536)+a[4]*m)&65535;r[5]=(v=(0|v/65536)+a[5]*m)&65535;r[6]=(v=(0|v/65536)+a[6]*m)&65535;r[7]=(v=(0|v/65536)+a[7]*m)&65535;r[8]=(v=(0|v/65536)+a[8]*m)&65535;r[9]=(v=(0|v/65536)+a[9]*m)&65535;r[10]=(v=(0|v/65536)+a[10]*m)&65535;r[11]=(v=(0|v/65536)+a[11]*m)&65535;r[12]=(v=(0|v/65536)+a[12]*m)&65535;r[13]=(v=(0|v/65536)+a[13]*m)&65535;r[14]=(v=(0|v/65536)+a[14]*m)&65535;r[15]=(0|v/65536)+a[15]*m;_reduce(r);return r}function _dbl(x,z){var x_2,z_2,m,n,o;m=_sqrmodp(_addmodp(x,z));n=_sqrmodp(_submodp(x,z));o=_submodp(m,n);x_2=_mulmodp(n,m);z_2=_mulmodp(_addmodp(_mulasmall(o),m),o);return[x_2,z_2]}function _sum(x,z,x_p,z_p,x_1){var x_3,z_3,p,q;p=_mulmodp(_submodp(x,z),_addmodp(x_p,z_p));q=_mulmodp(_addmodp(x,z),_submodp(x_p,z_p));x_3=_sqrmodp(_addmodp(p,q));z_3=_mulmodp(_sqrmodp(_submodp(p,q)),x_1);return[x_3,z_3]}function _generateKey(curve25519){var buffer=crypto.randomBytes(32);if(curve25519===true){buffer[0]&=248;buffer[31]=buffer[31]&127|64}var result=[];for(var i=0;i=0){var r,s;var b=core.getbit(f,n);r=core.sum(aq[0][0],aq[0][1],aq[1][0],aq[1][1],x_1);s=core.dbl(aq[1-b][0],aq[1-b][1]);aq[1-b]=s;aq[b]=r;n--}q=aq[1];q[1]=core.invmodp(q[1]);q[0]=core.mulmodp(q[0],q[1]);core.reduce(q[0]);return q[0]}function curve25519b32(a,b){return _base32encode(curve25519(_base32decode(a),_base32decode(b)))}function curve25519(f,c){if(!c){c=core.BASE()}f[0]&=65528;f[15]=f[15]&32767|16384;return curve25519_raw(f,c)}function _hexEncodeVector(k){var hexKey=utils.hexEncode(k);hexKey=new Array(64+1-hexKey.length).join("0")+hexKey;return hexKey.split(/(..)/).reverse().join("")}function _hexDecodeVector(v){var hexKey=v.split(/(..)/).reverse().join("");return utils.hexDecode(hexKey)}ns.curve25519=curve25519;ns.curve25519_raw=curve25519_raw;ns.hexEncodeVector=_hexEncodeVector;ns.hexDecodeVector=_hexDecodeVector;ns.hexencode=utils.hexEncode;ns.hexdecode=utils.hexDecode;ns.base32encode=utils.base32encode;ns.base32decode=utils.base32decode;module.exports=ns},{"./core":161,"./utils":165}],163:[function(require,module,exports){(function(Buffer){"use strict";var core=require("./core");var utils=require("./utils");var curve255=require("./curve255");var ns={};function _toString(vector){var u=new Uint16Array(vector);return new Buffer(new Uint8Array(u.buffer))}function _fromString(vector){if(Buffer.isBuffer(vector)){var u=new Uint8Array(vector);return new Uint16Array(u.buffer)}var result=new Array(16);for(var i=0,l=0;i>16,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}else if(value instanceof _bi255){this.n=value.n.slice(0)}else{throw"Bad argument for bignum: "+value}}_bi255.prototype={toString:function(){return utils.hexEncode(this.n)},toSource:function(){return"_"+utils.hexEncode(this.n)},plus:function(n1){return _bi255(core.bigintadd(this.n,n1.n))},minus:function(n1){return _bi255(core.bigintsub(this.n,n1.n)).modq()},times:function(n1){return _bi255(core.mulmodp(this.n,n1.n))},divide:function(n1){return this.times(n1.inv())},sqr:function(){return _bi255(core.sqrmodp(this.n))},cmp:function(n1){return core.bigintcmp(this.n,n1.n)},equals:function(n1){return this.cmp(n1)===0},isOdd:function(){return(this.n[0]&1)===1},shiftLeft:function(cnt){_shiftL(this.n,cnt);return this},shiftRight:function(cnt){_shiftR(this.n,cnt);return this},inv:function(){return _bi255(core.invmodp(this.n))},pow:function(e){return _bi255(_pow(this.n,e.n))},modq:function(){return _modq(this)},bytes:function(){return _bi255_bytes(this)}};function _shiftL(n,cnt){var lastcarry=0;for(var i=0;i<16;i++){var carry=n[i]>>16-cnt;n[i]=n[i]<=0;i--){var carry=n[i]<<16-cnt&65535;n[i]=n[i]>>cnt|lastcarry;lastcarry=carry}return n}function _bi255_bytes(n){n=_bi255(n);var a=new Array(32);for(var i=31;i>=0;i--){a[i]=n.n[0]&255;n.shiftRight(8)}return a}function _bytes2bi255(a){var n=_ZERO;for(var i=0;i<32;i++){n.shiftLeft(8);n=n.plus(_bi255(a[i]))}return n}function _pow(n,e){var result=core.ONE();for(var i=0;i<256;i++){if(core.getbit(e,i)===1){result=core.mulmodp(result,n)}n=core.sqrmodp(n)}return result}var _ZERO=_bi255(0);var _ONE=_bi255(1);var _TWO=_bi255(2);var _Q=_bi255([65535-18,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,32767]);function _modq(n){core.reduce(n.n);if(n.cmp(_Q)>=0){return _modq(n.minus(_Q))}if(n.cmp(_ZERO)===-1){return _modq(n.plus(_Q))}else{return n}}var _RECOVERY_EXPONENT=_bi255("0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe");var _D=_bi255("52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3");var _I=_bi255("2b8324804fc1df0b2b4d00993dfbd7a72f431806ad2fe478c4ee1b274a0ea0b0");var _L=_bi255("1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed");var _L_BI=_bi("1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed",16);function _isoncurve(p){var x=p[0];var y=p[1];var xsqr=x.sqr();var ysqr=y.sqr();var v=_D.times(xsqr).times(ysqr);return ysqr.minus(xsqr).minus(_ONE).minus(v).modq().equals(_ZERO)}function _xrecover(y){var ysquared=y.sqr();var xx=ysquared.minus(_ONE).divide(_ONE.plus(_D.times(ysquared)));var x=xx.pow(_RECOVERY_EXPONENT);if(!x.times(x).minus(xx).equals(_ZERO)){x=x.times(_I)}if(x.isOdd()){x=_Q.minus(x)}return x}function _x_pt_add(pt1,pt2){var x1=pt1[0];var y1=pt1[1];var z1=pt1[2];var t1=pt1[3];var x2=pt2[0];var y2=pt2[1];var z2=pt2[2];var t2=pt2[3];var A=y1.minus(x1).times(y2.plus(x2));var B=y1.plus(x1).times(y2.minus(x2));var C=z1.times(_TWO).times(t2);var D=t1.times(_TWO).times(z2);var E=D.plus(C);var F=B.minus(A);var G=B.plus(A);var H=D.minus(C);return[E.times(F),G.times(H),F.times(G),E.times(H)]}function _xpt_double(pt1){var x1=pt1[0];var y1=pt1[1];var z1=pt1[2];var A=x1.times(x1);var B=y1.times(y1);var C=_TWO.times(z1).times(z1);var D=_Q.minus(A);var J=x1.plus(y1);var E=J.times(J).minus(A).minus(B);var G=D.plus(B);var F=G.minus(C);var H=D.minus(B);return[E.times(F),G.times(H),F.times(G),E.times(H)]}function _xpt_mult(pt,n){if(n.equals(_ZERO)){return[_ZERO,_ONE,_ONE,_ZERO]}var odd=n.isOdd();n.shiftRight(1);var value=_xpt_double(_xpt_mult(pt,n));return odd?_x_pt_add(value,pt):value}function _pt_xform(pt){var x=pt[0];var y=pt[1];return[x,y,_ONE,x.times(y)]}function _pt_unxform(pt){var x=pt[0];var y=pt[1];var z=pt[2];var invz=z.inv();return[x.times(invz),y.times(invz)]}function _scalarmult(pt,n){return _pt_unxform(_xpt_mult(_pt_xform(pt),n))}function _bytesgetbit(bytes,n){return bytes[bytes.length-(n>>>3)-1]>>(n&7)&1}function _xpt_mult_bytes(pt,bytes){var r=[_ZERO,_ONE,_ONE,_ZERO];for(var i=(bytes.length<<3)-1;i>=0;i--){r=_xpt_double(r);if(_bytesgetbit(bytes,i)===1){r=_x_pt_add(r,pt)}}return r}function _scalarmultBytes(pt,bytes){return _pt_unxform(_xpt_mult_bytes(_pt_xform(pt),bytes))}var _by=_bi255(4).divide(_bi255(5));var _bx=_xrecover(_by);var _bp=[_bx,_by];function _encodeint(n){return n.bytes(32).reverse()}function _decodeint(b){return _bi255(b.slice(0).reverse())}function _encodepoint(p){var v=_encodeint(p[1]);if(p[0].isOdd()){v[31]|=128}return v}function _decodepoint(v){ -v=v.slice(0);var signbit=v[31]>>7;v[31]&=127;var y=_decodeint(v);var x=_xrecover(y);if((x.n[0]&1)!==signbit){x=_Q.minus(x)}var p=[x,y];if(!_isoncurve(p)){throw"Point is not on curve"}return p}function _bi(value,base){if(base!==undefined){if(base===256){return _bi(utils.string2bytes(value))}return new BigInteger(value,base)}else if(typeof value==="string"){return new BigInteger(value,10)}else if(value instanceof Array||value instanceof Uint8Array||Buffer.isBuffer(value)){return new BigInteger(value)}else if(typeof value==="number"){return new BigInteger(value.toString(),10)}else{throw"Can't convert "+value+" to BigInteger"}}function _bi2bytes(n,cnt){if(cnt===undefined){cnt=n.bitLength()+7>>>3}var bytes=new Array(cnt);for(var i=cnt-1;i>=0;i--){bytes[i]=n[0]&255;n=n.shiftRight(8)}return bytes}BigInteger.prototype.bytes=function(n){return _bi2bytes(this,n)};function _bytehash(s){var sha=crypto.createHash("sha512").update(s).digest();return _bi2bytes(_bi(sha),64).reverse()}function _stringhash(s){var sha=crypto.createHash("sha512").update(s).digest();return _map(_chr,_bi2bytes(_bi(sha),64)).join("")}function _inthash(s){return _bi([0].concat(_bytehash(s)))}function _inthash_lo(s){return _bi255(_bytehash(s).slice(32,64))}function _inthash_mod_l(s){return _inthash(s).mod(_L_BI)}function _get_a(sk){var a=_inthash_lo(sk);a.n[0]&=65528;a.n[15]&=16383;a.n[15]|=16384;return a}function _publickey(sk){return _encodepoint(_scalarmult(_bp,_get_a(sk)))}function _map(f,l){var result=new Array(l.length);for(var i=0;i=0;i--){var value=vector[i];result.push(_HEXCHARS.substr(value>>>12&15,1));result.push(_HEXCHARS.substr(value>>>8&15,1));result.push(_HEXCHARS.substr(value>>>4&15,1));result.push(_HEXCHARS.substr(value&15,1))}return result.join("")}function _hexdecode(vector){var result=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(var i=vector.length-1,l=0;i>=0;i-=4){result[l]=_HEXCHARS.indexOf(vector.charAt(i))|_HEXCHARS.indexOf(vector.charAt(i-1))<<4|_HEXCHARS.indexOf(vector.charAt(i-2))<<8|_HEXCHARS.indexOf(vector.charAt(i-3))<<12;l++}return result}var _BASE32CHARS="abcdefghijklmnopqrstuvwxyz234567";var _BASE32VALUES=function(){var result={};for(var i=0;i<_BASE32CHARS.length;i++){result[_BASE32CHARS.charAt(i)]=i}return result}();function _base32encode(n){var c;var r="";for(c=0;c<255;c+=5){r=_BASE32CHARS.substr(core.getbit(n,c)+(core.getbit(n,c+1)<<1)+(core.getbit(n,c+2)<<2)+(core.getbit(n,c+3)<<3)+(core.getbit(n,c+4)<<4),1)+r}return r}function _base32decode(n){var c=0;var r=core.ZERO();var l=n.length;for(c=0;l>0&&c<255;c+=5){l--;var v=_BASE32VALUES[n.substr(l,1)];core.setbit(r,c,v&1);v>>=1;core.setbit(r,c+1,v&1);v>>=1;core.setbit(r,c+2,v&1);v>>=1;core.setbit(r,c+3,v&1);v>>=1;core.setbit(r,c+4,v&1)}return r}function _map(f,l){var result=new Array(l.length);for(var i=0;i=0){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864);w[j++]=v&67108863}return c}function am2(i,x,w,j,c,n){var xl=x&32767,xh=x>>15;while(--n>=0){var l=this[i]&32767;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&32767)<<15)+w[j]+(c&1073741823);c=(l>>>30)+(m>>>15)+xh*h+(c>>>30);w[j++]=l&1073741823}return c}function am3(i,x,w,j,c,n){var xl=x&16383,xh=x>>14;while(--n>=0){var l=this[i]&16383;var h=this[i++]>>14;var m=xh*l+h*xl;l=xl*l+((m&16383)<<14)+w[j]+c;c=(l>>28)+(m>>14)+xh*h;w[j++]=l&268435455}return c}var inBrowser=typeof navigator!=="undefined";if(inBrowser&&j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(inBrowser&&j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<=0;--i)r[i]=this[i];r.t=this.t;r.s=this.s}function bnpFromInt(x){this.t=1;this.s=x<0?-1:0;if(x>0)this[0]=x;else if(x<-1)this[0]=x+this.DV;else this.t=0}function nbv(i){var r=nbi();r.fromInt(i);return r}function bnpFromString(s,b){var k;if(b==16)k=4;else if(b==8)k=3;else if(b==256)k=8;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else{this.fromRadix(s,b);return}this.t=0;this.s=0;var i=s.length,mi=false,sh=0;while(--i>=0){var x=k==8?s[i]&255:intAt(s,i);if(x<0){if(s.charAt(i)=="-")mi=true;continue}mi=false;if(sh==0)this[this.t++]=x;else if(sh+k>this.DB){this[this.t-1]|=(x&(1<>this.DB-sh}else this[this.t-1]|=x<=this.DB)sh-=this.DB}if(k==8&&(s[0]&128)!=0){this.s=-1;if(sh>0)this[this.t-1]|=(1<0&&this[this.t-1]==c)--this.t}function bnToString(b){if(this.s<0)return"-"+this.negate().toString(b);var k;if(b==16)k=4;else if(b==8)k=3;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else return this.toRadix(b);var km=(1<0){if(p>p)>0){m=true;r=int2char(d)}while(i>=0){if(p>(p+=this.DB-k)}else{d=this[i]>>(p-=k)&km;if(p<=0){p+=this.DB;--i}}if(d>0)m=true;if(m)r+=int2char(d)}}return m?r:"0"}function bnNegate(){var r=nbi();BigInteger.ZERO.subTo(this,r);return r}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var r=this.s-a.s;if(r!=0)return r;var i=this.t;r=i-a.t;if(r!=0)return this.s<0?-r:r;while(--i>=0)if((r=this[i]-a[i])!=0)return r;return 0}function nbits(x){var r=1,t;if((t=x>>>16)!=0){x=t;r+=16}if((t=x>>8)!=0){x=t;r+=8}if((t=x>>4)!=0){x=t;r+=4}if((t=x>>2)!=0){x=t;r+=2}if((t=x>>1)!=0){x=t;r+=1}return r}function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(n,r){var i;for(i=this.t-1;i>=0;--i)r[i+n]=this[i];for(i=n-1;i>=0;--i)r[i]=0;r.t=this.t+n;r.s=this.s}function bnpDRShiftTo(n,r){for(var i=n;i=0;--i){r[i+ds+1]=this[i]>>cbs|c;c=(this[i]&bm)<=0;--i)r[i]=0;r[ds]=c;r.t=this.t+ds+1;r.s=this.s;r.clamp()}function bnpRShiftTo(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t){r.t=0;return}var bs=n%this.DB;var cbs=this.DB-bs;var bm=(1<>bs;for(var i=ds+1;i>bs}if(bs>0)r[this.t-ds-1]|=(this.s&bm)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c-=a.s}r.s=c<0?-1:0;if(c<-1)r[i++]=this.DV+c;else if(c>0)r[i++]=c;r.t=i;r.clamp()}function bnpMultiplyTo(a,r){var x=this.abs(),y=a.abs();var i=x.t;r.t=i+y.t;while(--i>=0)r[i]=0;for(i=0;i=0)r[i]=0;for(i=0;i=x.DV){r[i+x.t]-=x.DV;r[i+x.t+1]=1}}if(r.t>0)r[r.t-1]+=x.am(i,x[i],r,2*i,0,1);r.s=0;r.clamp()}function bnpDivRemTo(m,q,r){var pm=m.abs();if(pm.t<=0)return;var pt=this.abs();if(pt.t0){pm.lShiftTo(nsh,y);pt.lShiftTo(nsh,r)}else{pm.copyTo(y);pt.copyTo(r)}var ys=y.t;var y0=y[ys-1];if(y0==0)return;var yt=y0*(1<1?y[ys-2]>>this.F2:0);var d1=this.FV/yt,d2=(1<=0){r[r.t++]=1;r.subTo(t,r)}BigInteger.ONE.dlShiftTo(ys,t);t.subTo(y,y);while(y.t=0){var qd=r[--i]==y0?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))0)r.rShiftTo(nsh,r);if(ts<0)BigInteger.ZERO.subTo(r,r)}function bnMod(a){var r=nbi();this.abs().divRemTo(a,null,r);if(this.s<0&&r.compareTo(BigInteger.ZERO)>0)a.subTo(r,r);return r}function Classic(m){this.m=m}function cConvert(x){if(x.s<0||x.compareTo(this.m)>=0)return x.mod(this.m);else return x}function cRevert(x){return x}function cReduce(x){x.divRemTo(this.m,null,x)}function cMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}function cSqrTo(x,r){x.squareTo(r);this.reduce(r)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1)return 0;var x=this[0];if((x&1)==0)return 0;var y=x&3;y=y*(2-(x&15)*y)&15;y=y*(2-(x&255)*y)&255;y=y*(2-((x&65535)*y&65535))&65535;y=y*(2-x*y%this.DV)%this.DV;return y>0?this.DV-y:-y}function Montgomery(m){this.m=m;this.mp=m.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<0)this.m.subTo(r,r);return r}function montRevert(x){var r=nbi();x.copyTo(r);this.reduce(r);return r}function montReduce(x){while(x.t<=this.mt2)x[x.t++]=0;for(var i=0;i>15)*this.mpl&this.um)<<15)&x.DM;j=i+this.m.t;x[j]+=this.m.am(0,u0,x,i,0,this.m.t);while(x[j]>=x.DV){x[j]-=x.DV;x[++j]++}}x.clamp();x.drShiftTo(this.m.t,x);if(x.compareTo(this.m)>=0)x.subTo(this.m,x)}function montSqrTo(x,r){x.squareTo(r);this.reduce(r)}function montMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(e,z){if(e>4294967295||e<1)return BigInteger.ONE;var r=nbi(),r2=nbi(),g=z.convert(this),i=nbits(e)-1;g.copyTo(r);while(--i>=0){z.sqrTo(r,r2);if((e&1<0)z.mulTo(r2,g,r);else{var t=r;r=r2;r2=t}}return z.revert(r)}function bnModPowInt(e,m){var z;if(e<256||m.isEven())z=new Classic(m);else z=new Montgomery(m);return this.exp(e,z)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnClone(){var r=nbi();this.copyTo(r);return r}function bnIntValue(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<>24}function bnShortValue(){return this.t==0?this.s:this[0]<<16>>16}function bnpChunkSize(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}function bnSigNum(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function bnpToRadix(b){if(b==null)b=10;if(this.signum()==0||b<2||b>36)return"0";var cs=this.chunkSize(b);var a=Math.pow(b,cs);var d=nbv(a),y=nbi(),z=nbi(),r="";this.divRemTo(d,y,z);while(y.signum()>0){r=(a+z.intValue()).toString(b).substr(1)+r;y.divRemTo(d,y,z)}return z.intValue().toString(b)+r}function bnpFromRadix(s,b){this.fromInt(0);if(b==null)b=10;var cs=this.chunkSize(b);var d=Math.pow(b,cs),mi=false,j=0,w=0;for(var i=0;i=cs){this.dMultiply(d);this.dAddOffset(w,0);j=0;w=0}}if(j>0){this.dMultiply(Math.pow(b,j));this.dAddOffset(w,0)}if(mi)BigInteger.ZERO.subTo(this,this)}function bnpFromNumber(a,b,c){if("number"==typeof b){if(a<2)this.fromInt(1);else{this.fromNumber(a,c);if(!this.testBit(a-1))this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(b)){this.dAddOffset(2,0);if(this.bitLength()>a)this.subTo(BigInteger.ONE.shiftLeft(a-1),this)}}}else{var x=new Array,t=a&7;x.length=(a>>3)+1;b.nextBytes(x);if(t>0)x[0]&=(1<0){if(p>p)!=(this.s&this.DM)>>p)r[k++]=d|this.s<=0){if(p<8){d=(this[i]&(1<>(p+=this.DB-8)}else{d=this[i]>>(p-=8)&255;if(p<=0){p+=this.DB;--i}}if((d&128)!=0)d|=-256;if(k==0&&(this.s&128)!=(d&128))++k;if(k>0||d!=this.s)r[k++]=d}}return r}function bnEquals(a){return this.compareTo(a)==0}function bnMin(a){return this.compareTo(a)<0?this:a}function bnMax(a){return this.compareTo(a)>0?this:a}function bnpBitwiseTo(a,op,r){var i,f,m=Math.min(a.t,this.t);for(i=0;i>=16;r+=16}if((x&255)==0){x>>=8;r+=8}if((x&15)==0){x>>=4;r+=4}if((x&3)==0){x>>=2;r+=2}if((x&1)==0)++r;return r}function bnGetLowestSetBit(){for(var i=0;i=this.t)return this.s!=0;return(this[j]&1<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c+=a.s}r.s=c<0?-1:0;if(c>0)r[i++]=c;else if(c<-1)r[i++]=this.DV+c;r.t=i;r.clamp()}function bnAdd(a){var r=nbi();this.addTo(a,r);return r}function bnSubtract(a){var r=nbi();this.subTo(a,r);return r}function bnMultiply(a){var r=nbi();this.multiplyTo(a,r);return r}function bnSquare(){var r=nbi();this.squareTo(r);return r}function bnDivide(a){var r=nbi();this.divRemTo(a,r,null);return r}function bnRemainder(a){var r=nbi();this.divRemTo(a,null,r);return r}function bnDivideAndRemainder(a){var q=nbi(),r=nbi();this.divRemTo(a,q,r);return new Array(q,r)}function bnpDMultiply(n){this[this.t]=this.am(0,n-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(n,w){if(n==0)return;while(this.t<=w)this[this.t++]=0;this[w]+=n;while(this[w]>=this.DV){this[w]-=this.DV;if(++w>=this.t)this[this.t++]=0;++this[w]}}function NullExp(){}function nNop(x){return x}function nMulTo(x,y,r){x.multiplyTo(y,r)}function nSqrTo(x,r){x.squareTo(r)}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(e){return this.exp(e,new NullExp)}function bnpMultiplyLowerTo(a,n,r){var i=Math.min(this.t+a.t,n);r.s=0;r.t=i;while(i>0)r[--i]=0;var j;for(j=r.t-this.t;i=0)r[i]=0;for(i=Math.max(n-this.t,0);i2*this.m.t)return x.mod(this.m);else if(x.compareTo(this.m)<0)return x;else{var r=nbi();x.copyTo(r);this.reduce(r);return r}}function barrettRevert(x){return x}function barrettReduce(x){x.drShiftTo(this.m.t-1,this.r2);if(x.t>this.m.t+1){x.t=this.m.t+1;x.clamp()}this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(x.compareTo(this.r2)<0)x.dAddOffset(1,this.m.t+1);x.subTo(this.r2,x);while(x.compareTo(this.m)>=0)x.subTo(this.m,x)}function barrettSqrTo(x,r){x.squareTo(r);this.reduce(r)}function barrettMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Barrett.prototype.convert=barrettConvert;Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;function bnModPow(e,m){var i=e.bitLength(),k,r=nbv(1),z;if(i<=0)return r;else if(i<18)k=1;else if(i<48)k=3;else if(i<144)k=4;else if(i<768)k=5;else k=6;if(i<8)z=new Classic(m);else if(m.isEven())z=new Barrett(m);else z=new Montgomery(m);var g=new Array,n=3,k1=k-1,km=(1<1){var g2=nbi();z.sqrTo(g[1],g2);while(n<=km){g[n]=nbi();z.mulTo(g2,g[n-2],g[n]);n+=2}}var j=e.t-1,w,is1=true,r2=nbi(),t;i=nbits(e[j])-1;while(j>=0){if(i>=k1)w=e[j]>>i-k1&km;else{w=(e[j]&(1<0)w|=e[j-1]>>this.DB+i-k1}n=k;while((w&1)==0){w>>=1;--n}if((i-=n)<0){i+=this.DB;--j}if(is1){g[w].copyTo(r);is1=false}else{while(n>1){z.sqrTo(r,r2);z.sqrTo(r2,r);n-=2}if(n>0)z.sqrTo(r,r2);else{t=r;r=r2;r2=t}z.mulTo(r2,g[w],r)}while(j>=0&&(e[j]&1<0){x.rShiftTo(g,x);y.rShiftTo(g,y)}while(x.signum()>0){if((i=x.getLowestSetBit())>0)x.rShiftTo(i,x);if((i=y.getLowestSetBit())>0)y.rShiftTo(i,y);if(x.compareTo(y)>=0){x.subTo(y,x);x.rShiftTo(1,x)}else{y.subTo(x,y);y.rShiftTo(1,y)}}if(g>0)y.lShiftTo(g,y);return y}function bnpModInt(n){if(n<=0)return 0;var d=this.DV%n,r=this.s<0?n-1:0;if(this.t>0)if(d==0)r=this[0]%n;else for(var i=this.t-1;i>=0;--i)r=(d*r+this[i])%n;return r}function bnModInverse(m){var ac=m.isEven();if(this.isEven()&&ac||m.signum()==0)return BigInteger.ZERO;var u=m.clone(),v=this.clone();var a=nbv(1),b=nbv(0),c=nbv(0),d=nbv(1);while(u.signum()!=0){while(u.isEven()){u.rShiftTo(1,u);if(ac){if(!a.isEven()||!b.isEven()){a.addTo(this,a);b.subTo(m,b)}a.rShiftTo(1,a)}else if(!b.isEven())b.subTo(m,b);b.rShiftTo(1,b)}while(v.isEven()){v.rShiftTo(1,v);if(ac){if(!c.isEven()||!d.isEven()){c.addTo(this,c);d.subTo(m,d)}c.rShiftTo(1,c)}else if(!d.isEven())d.subTo(m,d);d.rShiftTo(1,d)}if(u.compareTo(v)>=0){u.subTo(v,u);if(ac)a.subTo(c,a);b.subTo(d,b)}else{v.subTo(u,v);if(ac)c.subTo(a,c);d.subTo(b,d)}}if(v.compareTo(BigInteger.ONE)!=0)return BigInteger.ZERO;if(d.compareTo(m)>=0)return d.subtract(m);if(d.signum()<0)d.addTo(m,d);else return d;if(d.signum()<0)return d.add(m);else return d}var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];var lplim=(1<<26)/lowprimes[lowprimes.length-1];function bnIsProbablePrime(t){var i,x=this.abs();if(x.t==1&&x[0]<=lowprimes[lowprimes.length-1]){for(i=0;i>1;if(t>lowprimes.length)t=lowprimes.length;var a=nbi();for(var i=0;i>8&255;rng_pool[rng_pptr++]^=x>>16&255;rng_pool[rng_pptr++]^=x>>24&255;if(rng_pptr>=rng_psize)rng_pptr-=rng_psize}function rng_seed_time(){rng_seed_int((new Date).getTime())}if(rng_pool==null){rng_pool=new Array;rng_pptr=0;var t;if(typeof window!=="undefined"&&window.crypto){if(window.crypto.getRandomValues){var ua=new Uint8Array(32);window.crypto.getRandomValues(ua);for(t=0;t<32;++t)rng_pool[rng_pptr++]=ua[t]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var z=window.crypto.random(32);for(t=0;t>>8;rng_pool[rng_pptr++]=t&255}rng_pptr=0;rng_seed_time()}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptrschema.maxItems){addError("There must be a maximum of "+schema.maxItems+" in the array")}}else if(schema.properties||schema.additionalProperties){errors.concat(checkObj(value,schema.properties,path,schema.additionalProperties))}if(schema.pattern&&typeof value=="string"&&!value.match(schema.pattern)){addError("does not match the regex pattern "+schema.pattern)}if(schema.maxLength&&typeof value=="string"&&value.length>schema.maxLength){addError("may only be "+schema.maxLength+" characters long")}if(schema.minLength&&typeof value=="string"&&value.lengthvalue){addError("must have a minimum value of "+schema.minimum)}if(typeof schema.maximum!==undefined&&typeof value==typeof schema.maximum&&schema.maximum0){var thisPos=stack.indexOf(this);~thisPos?stack.splice(thisPos+1):stack.push(this);~thisPos?keys.splice(thisPos,Infinity,key):keys.push(key);if(~stack.indexOf(value))value=cycleReplacer.call(this,key,value)}else stack.push(value);return replacer==null?value:replacer.call(this,key,value)}}},{}],169:[function(require,module,exports){var hasExcape=/~/;var escapeMatcher=/~[01]/g;function escapeReplacer(m){switch(m){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+m)}function untilde(str){if(!hasExcape.test(str))return str;return str.replace(escapeMatcher,escapeReplacer)}function setter(obj,pointer,value){var part;var hasNextPart;for(var p=1,len=pointer.length;pp;if(typeof obj[part]==="undefined"){if(Array.isArray(obj)&&part==="-"){part=obj.length}if(hasNextPart){if(pointer[p]!==""&&pointer[p]=0);for(key in data){each=accum.slice(0);each.push(key);doFlattenIter(data[key],depth-1,each,callback)}}function flattenObject(data,depth){if(depth===0)return[data];mod_assert.ok(data!==null);mod_assert.equal(typeof data,"object");mod_assert.equal(typeof depth,"number");mod_assert.ok(depth>=0);var rv=[];var key;for(key in data){flattenObject(data[key],depth-1).forEach(function(p){rv.push([key].concat(p))})}return rv}function startsWith(str,prefix){return str.substr(0,prefix.length)==prefix}function endsWith(str,suffix){return str.substr(str.length-suffix.length,suffix.length)==suffix}function iso8601(d){if(typeof d=="number")d=new Date(d);mod_assert.ok(d.constructor===Date);return mod_extsprintf.sprintf("%4d-%02d-%02dT%02d:%02d:%02d.%03dZ",d.getUTCFullYear(),d.getUTCMonth()+1,d.getUTCDate(),d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds())}var RFC1123_MONTHS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var RFC1123_DAYS=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function rfc1123(date){return mod_extsprintf.sprintf("%s, %02d %s %04d %02d:%02d:%02d GMT",RFC1123_DAYS[date.getUTCDay()],date.getUTCDate(),RFC1123_MONTHS[date.getUTCMonth()],date.getUTCFullYear(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds())}function parseDateTime(str){var numeric=+str;if(!isNaN(numeric)){return new Date(numeric)}else{return new Date(str)}}function validateJsonObjectJS(schema,input){var report=mod_jsonschema.validate(input,schema);if(report.errors.length===0)return null;var error=report.errors[0];var propname=error["property"];var reason=error["message"].toLowerCase();var i,j;if((i=reason.indexOf("the property "))!=-1&&(j=reason.indexOf(" is not defined in the schema and the "+"schema does not allow additional properties"))!=-1){i+="the property ".length;if(propname==="")propname=reason.substr(i,j-i);else propname=propname+"."+reason.substr(i,j-i);reason="unsupported property"}var rv=new mod_verror.VError('property "%s": %s',propname,reason);rv.jsv_details=error;return rv}function randElt(arr){mod_assert.ok(Array.isArray(arr)&&arr.length>0,"randElt argument must be a non-empty array");return arr[Math.floor(Math.random()*arr.length)]}function assertHrtime(a){mod_assert.ok(a[0]>=0&&a[1]>=0,"negative numbers not allowed in hrtimes");mod_assert.ok(a[1]<1e9,"nanoseconds column overflow")}function hrtimeDiff(a,b){assertHrtime(a);assertHrtime(b);mod_assert.ok(a[0]>b[0]||a[0]==b[0]&&a[1]>=b[1],"negative differences not allowed");var rv=[a[0]-b[0],0];if(a[1]>=b[1]){rv[1]=a[1]-b[1]}else{rv[0]--;rv[1]=1e9-(b[1]-a[1])}return rv}function hrtimeNanosec(a){assertHrtime(a);return Math.floor(a[0]*1e9+a[1])}function hrtimeMicrosec(a){assertHrtime(a);return Math.floor(a[0]*1e6+a[1]/1e3)}function hrtimeMillisec(a){assertHrtime(a);return Math.floor(a[0]*1e3+a[1]/1e6)}function hrtimeAccum(a,b){assertHrtime(a);assertHrtime(b);a[1]+=b[1];if(a[1]>=1e9){a[0]++;a[1]-=1e9}a[0]+=b[0];return a}function hrtimeAdd(a,b){assertHrtime(a);var rv=[a[0],a[1]];return hrtimeAccum(rv,b)}function extraProperties(obj,allowed){mod_assert.ok(typeof obj==="object"&&obj!==null,"obj argument must be a non-null object");mod_assert.ok(Array.isArray(allowed),"allowed argument must be an array of strings");for(var i=0;i>=7-mask;return new bn(buf)};MillerRabin.prototype.test=function test(n,k,cb){var len=n.bitLength();var red=bn.mont(n);var rone=new bn(1).toRed(red);if(!k)k=Math.max(1,len/48|0);var n1=n.subn(1);var n2=n1.subn(1);for(var s=0;!n1.testn(s);s++){}var d=n.shrn(s);var rn1=n1.toRed(red);var prime=true;for(;k>0;k--){var a=this._rand(n2);if(cb)cb(a);var x=a.toRed(red).redPow(d);if(x.cmp(rone)===0||x.cmp(rn1)===0)continue;for(var i=1;i0;k--){var a=this._rand(n2);var g=n.gcd(a);if(g.cmpn(1)!==0)return g;var x=a.toRed(red).redPow(d);if(x.cmp(rone)===0||x.cmp(rn1)===0)continue;for(var i=1;ito||from===to&&types[extension].substr(0,12)==="application/"){continue}}types[extension]=type}})}},{"mime-db":173,path:192}],175:[function(require,module,exports){module.exports=assert;function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}assert.equal=function assertEqual(l,r,msg){if(l!=r)throw new Error(msg||"Assertion failed: "+l+" != "+r)}},{}],176:[function(require,module,exports){var crypto=require("crypto"),qs=require("querystring");function sha1(key,body){return crypto.createHmac("sha1",key).update(body).digest("base64")}function rsa(key,body){return crypto.createSign("RSA-SHA1").update(body).sign(key,"base64")}function rfc3986(str){return encodeURIComponent(str).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}function map(obj){var key,val,arr=[];for(key in obj){val=obj[key];if(Array.isArray(val))for(var i=0;ib?1:a>>16&65535|0,n=0;while(len!==0){n=len>2e3?2e3:len;len-=n;do{s1=s1+buf[pos++]|0;s2=s2+s1|0}while(--n);s1%=65521;s2%=65521}return s1|s2<<16|0}module.exports=adler32},{}],179:[function(require,module,exports){"use strict";module.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],180:[function(require,module,exports){"use strict";function makeTable(){var c,table=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++){c=c&1?3988292384^c>>>1:c>>>1}table[n]=c}return table}var crcTable=makeTable();function crc32(crc,buf,len,pos){var t=crcTable,end=pos+len;crc^=-1;for(var i=pos;i>>8^t[(crc^buf[i])&255]}return crc^-1}module.exports=crc32},{}],181:[function(require,module,exports){"use strict";var utils=require("../utils/common");var trees=require("./trees");var adler32=require("./adler32");var crc32=require("./crc32");var msg=require("./messages");var Z_NO_FLUSH=0;var Z_PARTIAL_FLUSH=1;var Z_FULL_FLUSH=3;var Z_FINISH=4;var Z_BLOCK=5;var Z_OK=0;var Z_STREAM_END=1;var Z_STREAM_ERROR=-2;var Z_DATA_ERROR=-3;var Z_BUF_ERROR=-5;var Z_DEFAULT_COMPRESSION=-1;var Z_FILTERED=1;var Z_HUFFMAN_ONLY=2;var Z_RLE=3;var Z_FIXED=4;var Z_DEFAULT_STRATEGY=0;var Z_UNKNOWN=2;var Z_DEFLATED=8;var MAX_MEM_LEVEL=9;var MAX_WBITS=15;var DEF_MEM_LEVEL=8;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var MIN_MATCH=3;var MAX_MATCH=258;var MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1;var PRESET_DICT=32;var INIT_STATE=42;var EXTRA_STATE=69;var NAME_STATE=73;var COMMENT_STATE=91;var HCRC_STATE=103;var BUSY_STATE=113;var FINISH_STATE=666;var BS_NEED_MORE=1;var BS_BLOCK_DONE=2;var BS_FINISH_STARTED=3;var BS_FINISH_DONE=4;var OS_CODE=3;function err(strm,errorCode){strm.msg=msg[errorCode];return errorCode}function rank(f){return(f<<1)-(f>4?9:0)}function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}function flush_pending(strm){var s=strm.state;var len=s.pending;if(len>strm.avail_out){len=strm.avail_out}if(len===0){return}utils.arraySet(strm.output,s.pending_buf,s.pending_out,len,strm.next_out);strm.next_out+=len;s.pending_out+=len;strm.total_out+=len;strm.avail_out-=len;s.pending-=len;if(s.pending===0){s.pending_out=0}}function flush_block_only(s,last){trees._tr_flush_block(s,s.block_start>=0?s.block_start:-1,s.strstart-s.block_start,last);s.block_start=s.strstart;flush_pending(s.strm)}function put_byte(s,b){s.pending_buf[s.pending++]=b}function putShortMSB(s,b){s.pending_buf[s.pending++]=b>>>8&255;s.pending_buf[s.pending++]=b&255}function read_buf(strm,buf,start,size){var len=strm.avail_in;if(len>size){len=size}if(len===0){return 0}strm.avail_in-=len;utils.arraySet(buf,strm.input,strm.next_in,len,start);if(strm.state.wrap===1){strm.adler=adler32(strm.adler,buf,len,start)}else if(strm.state.wrap===2){strm.adler=crc32(strm.adler,buf,len,start)}strm.next_in+=len;strm.total_in+=len;return len}function longest_match(s,cur_match){var chain_length=s.max_chain_length;var scan=s.strstart;var match;var len;var best_len=s.prev_length;var nice_match=s.nice_match;var limit=s.strstart>s.w_size-MIN_LOOKAHEAD?s.strstart-(s.w_size-MIN_LOOKAHEAD):0;var _win=s.window;var wmask=s.w_mask;var prev=s.prev;var strend=s.strstart+MAX_MATCH;var scan_end1=_win[scan+best_len-1];var scan_end=_win[scan+best_len];if(s.prev_length>=s.good_match){chain_length>>=2}if(nice_match>s.lookahead){nice_match=s.lookahead}do{match=cur_match;if(_win[match+best_len]!==scan_end||_win[match+best_len-1]!==scan_end1||_win[match]!==_win[scan]||_win[++match]!==_win[scan+1]){continue}scan+=2;match++;do{}while(_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&scanbest_len){s.match_start=cur_match;best_len=len;if(len>=nice_match){break}scan_end1=_win[scan+best_len-1];scan_end=_win[scan+best_len]}}while((cur_match=prev[cur_match&wmask])>limit&&--chain_length!==0);if(best_len<=s.lookahead){return best_len}return s.lookahead}function fill_window(s){var _w_size=s.w_size;var p,n,m,more,str;do{more=s.window_size-s.lookahead-s.strstart;if(s.strstart>=_w_size+(_w_size-MIN_LOOKAHEAD)){utils.arraySet(s.window,s.window,_w_size,_w_size,0);s.match_start-=_w_size;s.strstart-=_w_size;s.block_start-=_w_size;n=s.hash_size;p=n;do{m=s.head[--p];s.head[p]=m>=_w_size?m-_w_size:0}while(--n);n=_w_size;p=n;do{m=s.prev[--p];s.prev[p]=m>=_w_size?m-_w_size:0}while(--n);more+=_w_size}if(s.strm.avail_in===0){break}n=read_buf(s.strm,s.window,s.strstart+s.lookahead,more);s.lookahead+=n;if(s.lookahead+s.insert>=MIN_MATCH){str=s.strstart-s.insert;s.ins_h=s.window[str];s.ins_h=(s.ins_h<s.pending_buf_size-5){max_block_size=s.pending_buf_size-5}for(;;){if(s.lookahead<=1){fill_window(s);if(s.lookahead===0&&flush===Z_NO_FLUSH){return BS_NEED_MORE}if(s.lookahead===0){break}}s.strstart+=s.lookahead;s.lookahead=0;var max_start=s.block_start+max_block_size;if(s.strstart===0||s.strstart>=max_start){s.lookahead=s.strstart-max_start;s.strstart=max_start;flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}if(s.strstart-s.block_start>=s.w_size-MIN_LOOKAHEAD){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.strstart>s.block_start){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_NEED_MORE}function deflate_fast(s,flush){var hash_head;var bflush;for(;;){if(s.lookahead=MIN_MATCH){s.ins_h=(s.ins_h<=MIN_MATCH){bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;if(s.match_length<=s.max_lazy_match&&s.lookahead>=MIN_MATCH){s.match_length--;do{s.strstart++;s.ins_h=(s.ins_h<=MIN_MATCH){s.ins_h=(s.ins_h<4096)){s.match_length=MIN_MATCH-1}}if(s.prev_length>=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH;bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH);s.lookahead-=s.prev_length-1;s.prev_length-=2;do{if(++s.strstart<=max_insert){s.ins_h=(s.ins_h<=MIN_MATCH&&s.strstart>0){scan=s.strstart-1;prev=_win[scan];if(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]){strend=s.strstart+MAX_MATCH;do{}while(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&scans.lookahead){s.match_length=s.lookahead}}}if(s.match_length>=MIN_MATCH){bflush=trees._tr_tally(s,1,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;s.strstart+=s.match_length;s.match_length=0}else{bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++}if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function deflate_huff(s,flush){var bflush;for(;;){if(s.lookahead===0){fill_window(s);if(s.lookahead===0){if(flush===Z_NO_FLUSH){return BS_NEED_MORE}break}}s.match_length=0;bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function Config(good_length,max_lazy,nice_length,max_chain,func){this.good_length=good_length;this.max_lazy=max_lazy;this.nice_length=nice_length;this.max_chain=max_chain;this.func=func}var configuration_table;configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];function lm_init(s){s.window_size=2*s.w_size;zero(s.head);s.max_lazy_match=configuration_table[s.level].max_lazy;s.good_match=configuration_table[s.level].good_length;s.nice_match=configuration_table[s.level].nice_length;s.max_chain_length=configuration_table[s.level].max_chain;s.strstart=0;s.block_start=0;s.lookahead=0;s.insert=0;s.match_length=s.prev_length=MIN_MATCH-1;s.match_available=0;s.ins_h=0}function DeflateState(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=Z_DEFLATED;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new utils.Buf16(HEAP_SIZE*2);this.dyn_dtree=new utils.Buf16((2*D_CODES+1)*2);this.bl_tree=new utils.Buf16((2*BL_CODES+1)*2);zero(this.dyn_ltree);zero(this.dyn_dtree);zero(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new utils.Buf16(MAX_BITS+1);this.heap=new utils.Buf16(2*L_CODES+1);zero(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new utils.Buf16(2*L_CODES+1);zero(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function deflateResetKeep(strm){var s;if(!strm||!strm.state){return err(strm,Z_STREAM_ERROR)}strm.total_in=strm.total_out=0;strm.data_type=Z_UNKNOWN;s=strm.state;s.pending=0;s.pending_out=0;if(s.wrap<0){s.wrap=-s.wrap}s.status=s.wrap?INIT_STATE:BUSY_STATE;strm.adler=s.wrap===2?0:1;s.last_flush=Z_NO_FLUSH;trees._tr_init(s);return Z_OK}function deflateReset(strm){var ret=deflateResetKeep(strm);if(ret===Z_OK){lm_init(strm.state)}return ret}function deflateSetHeader(strm,head){if(!strm||!strm.state){return Z_STREAM_ERROR}if(strm.state.wrap!==2){return Z_STREAM_ERROR}strm.state.gzhead=head;return Z_OK}function deflateInit2(strm,level,method,windowBits,memLevel,strategy){if(!strm){return Z_STREAM_ERROR}var wrap=1;if(level===Z_DEFAULT_COMPRESSION){level=6}if(windowBits<0){wrap=0;windowBits=-windowBits}else if(windowBits>15){wrap=2;windowBits-=16}if(memLevel<1||memLevel>MAX_MEM_LEVEL||method!==Z_DEFLATED||windowBits<8||windowBits>15||level<0||level>9||strategy<0||strategy>Z_FIXED){return err(strm,Z_STREAM_ERROR)}if(windowBits===8){windowBits=9}var s=new DeflateState;strm.state=s;s.strm=strm;s.wrap=wrap;s.gzhead=null;s.w_bits=windowBits;s.w_size=1<Z_BLOCK||flush<0){return strm?err(strm,Z_STREAM_ERROR):Z_STREAM_ERROR}s=strm.state;if(!strm.output||!strm.input&&strm.avail_in!==0||s.status===FINISH_STATE&&flush!==Z_FINISH){return err(strm,strm.avail_out===0?Z_BUF_ERROR:Z_STREAM_ERROR)}s.strm=strm;old_flush=s.last_flush;s.last_flush=flush;if(s.status===INIT_STATE){if(s.wrap===2){strm.adler=0;put_byte(s,31);put_byte(s,139);put_byte(s,8);if(!s.gzhead){put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,OS_CODE);s.status=BUSY_STATE}else{put_byte(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(!s.gzhead.extra?0:4)+(!s.gzhead.name?0:8)+(!s.gzhead.comment?0:16));put_byte(s,s.gzhead.time&255);put_byte(s,s.gzhead.time>>8&255);put_byte(s,s.gzhead.time>>16&255);put_byte(s,s.gzhead.time>>24&255);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,s.gzhead.os&255);if(s.gzhead.extra&&s.gzhead.extra.length){put_byte(s,s.gzhead.extra.length&255);put_byte(s,s.gzhead.extra.length>>8&255)}if(s.gzhead.hcrc){strm.adler=crc32(strm.adler,s.pending_buf,s.pending,0)}s.gzindex=0;s.status=EXTRA_STATE}}else{var header=Z_DEFLATED+(s.w_bits-8<<4)<<8;var level_flags=-1;if(s.strategy>=Z_HUFFMAN_ONLY||s.level<2){level_flags=0}else if(s.level<6){level_flags=1}else if(s.level===6){level_flags=2}else{level_flags=3}header|=level_flags<<6;if(s.strstart!==0){header|=PRESET_DICT}header+=31-header%31;s.status=BUSY_STATE;putShortMSB(s,header);if(s.strstart!==0){putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}strm.adler=1}}if(s.status===EXTRA_STATE){if(s.gzhead.extra){beg=s.pending;while(s.gzindex<(s.gzhead.extra.length&65535)){if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){break}}put_byte(s,s.gzhead.extra[s.gzindex]&255);s.gzindex++}if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(s.gzindex===s.gzhead.extra.length){s.gzindex=0;s.status=NAME_STATE}}else{s.status=NAME_STATE}}if(s.status===NAME_STATE){if(s.gzhead.name){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindexbeg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.gzindex=0;s.status=COMMENT_STATE}}else{s.status=COMMENT_STATE}}if(s.status===COMMENT_STATE){if(s.gzhead.comment){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindexbeg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.status=HCRC_STATE}}else{s.status=HCRC_STATE}}if(s.status===HCRC_STATE){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size){flush_pending(strm)}if(s.pending+2<=s.pending_buf_size){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);strm.adler=0;s.status=BUSY_STATE}}else{s.status=BUSY_STATE}}if(s.pending!==0){flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}else if(strm.avail_in===0&&rank(flush)<=rank(old_flush)&&flush!==Z_FINISH){return err(strm,Z_BUF_ERROR)}if(s.status===FINISH_STATE&&strm.avail_in!==0){return err(strm,Z_BUF_ERROR)}if(strm.avail_in!==0||s.lookahead!==0||flush!==Z_NO_FLUSH&&s.status!==FINISH_STATE){var bstate=s.strategy===Z_HUFFMAN_ONLY?deflate_huff(s,flush):s.strategy===Z_RLE?deflate_rle(s,flush):configuration_table[s.level].func(s,flush);if(bstate===BS_FINISH_STARTED||bstate===BS_FINISH_DONE){s.status=FINISH_STATE}if(bstate===BS_NEED_MORE||bstate===BS_FINISH_STARTED){if(strm.avail_out===0){s.last_flush=-1}return Z_OK}if(bstate===BS_BLOCK_DONE){if(flush===Z_PARTIAL_FLUSH){trees._tr_align(s)}else if(flush!==Z_BLOCK){trees._tr_stored_block(s,0,0,false);if(flush===Z_FULL_FLUSH){zero(s.head);if(s.lookahead===0){s.strstart=0;s.block_start=0;s.insert=0}}}flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}}if(flush!==Z_FINISH){return Z_OK}if(s.wrap<=0){return Z_STREAM_END}if(s.wrap===2){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);put_byte(s,strm.adler>>16&255);put_byte(s,strm.adler>>24&255);put_byte(s,strm.total_in&255);put_byte(s,strm.total_in>>8&255);put_byte(s,strm.total_in>>16&255);put_byte(s,strm.total_in>>24&255)}else{putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}flush_pending(strm);if(s.wrap>0){s.wrap=-s.wrap}return s.pending!==0?Z_OK:Z_STREAM_END}function deflateEnd(strm){var status;if(!strm||!strm.state){return Z_STREAM_ERROR}status=strm.state.status;if(status!==INIT_STATE&&status!==EXTRA_STATE&&status!==NAME_STATE&&status!==COMMENT_STATE&&status!==HCRC_STATE&&status!==BUSY_STATE&&status!==FINISH_STATE){return err(strm,Z_STREAM_ERROR)}strm.state=null;return status===BUSY_STATE?err(strm,Z_DATA_ERROR):Z_OK}function deflateSetDictionary(strm,dictionary){var dictLength=dictionary.length;var s;var str,n;var wrap;var avail;var next;var input;var tmpDict;if(!strm||!strm.state){return Z_STREAM_ERROR}s=strm.state;wrap=s.wrap;if(wrap===2||wrap===1&&s.status!==INIT_STATE||s.lookahead){return Z_STREAM_ERROR}if(wrap===1){strm.adler=adler32(strm.adler,dictionary,dictLength,0)}s.wrap=0;if(dictLength>=s.w_size){if(wrap===0){zero(s.head);s.strstart=0;s.block_start=0;s.insert=0}tmpDict=new utils.Buf8(s.w_size);utils.arraySet(tmpDict,dictionary,dictLength-s.w_size,s.w_size,0);dictionary=tmpDict;dictLength=s.w_size}avail=strm.avail_in;next=strm.next_in;input=strm.input;strm.avail_in=dictLength;strm.next_in=0;strm.input=dictionary;fill_window(s);while(s.lookahead>=MIN_MATCH){str=s.strstart;n=s.lookahead-(MIN_MATCH-1);do{s.ins_h=(s.ins_h<>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op===0){output[_out++]=here&65535}else if(op&16){len=here&65535;op&=15;if(op){if(bits>>=op;bits-=op}if(bits<15){hold+=input[_in++]<>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op&16){dist=here&65535;op&=15;if(bitsdmax){strm.msg="invalid distance too far back";state.mode=BAD;break top}hold>>>=op;bits-=op;op=_out-beg;if(dist>op){op=dist-op;if(op>whave){if(state.sane){strm.msg="invalid distance too far back";state.mode=BAD;break top}}from=0;from_source=s_window;if(wnext===0){from+=wsize-op;if(op2){output[_out++]=from_source[from++];output[_out++]=from_source[from++];output[_out++]=from_source[from++];len-=3}if(len){output[_out++]=from_source[from++];if(len>1){output[_out++]=from_source[from++]}}}else{from=_out-dist;do{output[_out++]=output[from++];output[_out++]=output[from++];output[_out++]=output[from++];len-=3}while(len>2);if(len){output[_out++]=output[from++];if(len>1){output[_out++]=output[from++]}}}}else if((op&64)===0){here=dcode[(here&65535)+(hold&(1<>3;_in-=len;bits-=len<<3;hold&=(1<>>24&255)+(q>>>8&65280)+((q&65280)<<8)+((q&255)<<24)}function InflateState(){this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new utils.Buf16(320);this.work=new utils.Buf16(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function inflateResetKeep(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;strm.total_in=strm.total_out=state.total=0;strm.msg="";if(state.wrap){strm.adler=state.wrap&1}state.mode=HEAD;state.last=0;state.havedict=0;state.dmax=32768;state.head=null;state.hold=0;state.bits=0;state.lencode=state.lendyn=new utils.Buf32(ENOUGH_LENS);state.distcode=state.distdyn=new utils.Buf32(ENOUGH_DISTS);state.sane=1;state.back=-1;return Z_OK}function inflateReset(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;state.wsize=0;state.whave=0;state.wnext=0;return inflateResetKeep(strm)}function inflateReset2(strm,windowBits){var wrap;var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;if(windowBits<0){wrap=0;windowBits=-windowBits}else{wrap=(windowBits>>4)+1;if(windowBits<48){windowBits&=15}}if(windowBits&&(windowBits<8||windowBits>15)){return Z_STREAM_ERROR}if(state.window!==null&&state.wbits!==windowBits){state.window=null}state.wrap=wrap;state.wbits=windowBits;return inflateReset(strm)}function inflateInit2(strm,windowBits){var ret;var state;if(!strm){return Z_STREAM_ERROR}state=new InflateState;strm.state=state;state.window=null;ret=inflateReset2(strm,windowBits);if(ret!==Z_OK){strm.state=null}return ret}function inflateInit(strm){return inflateInit2(strm,DEF_WBITS)}var virgin=true;var lenfix,distfix;function fixedtables(state){if(virgin){var sym;lenfix=new utils.Buf32(512);distfix=new utils.Buf32(32);sym=0;while(sym<144){state.lens[sym++]=8}while(sym<256){state.lens[sym++]=9}while(sym<280){state.lens[sym++]=7}while(sym<288){state.lens[sym++]=8}inflate_table(LENS,state.lens,0,288,lenfix,0,state.work,{bits:9});sym=0;while(sym<32){state.lens[sym++]=5}inflate_table(DISTS,state.lens,0,32,distfix,0,state.work,{bits:5});virgin=false}state.lencode=lenfix;state.lenbits=9;state.distcode=distfix;state.distbits=5}function updatewindow(strm,src,end,copy){var dist;var state=strm.state;if(state.window===null){state.wsize=1<=state.wsize){utils.arraySet(state.window,src,end-state.wsize,state.wsize,0);state.wnext=0;state.whave=state.wsize}else{dist=state.wsize-state.wnext;if(dist>copy){dist=copy}utils.arraySet(state.window,src,end-copy,dist,state.wnext); -copy-=dist;if(copy){utils.arraySet(state.window,src,end-copy,copy,0);state.wnext=copy;state.whave=state.wsize}else{state.wnext+=dist;if(state.wnext===state.wsize){state.wnext=0}if(state.whave>>8&255;state.check=crc32(state.check,hbuf,2,0);hold=0;bits=0;state.mode=FLAGS;break}state.flags=0;if(state.head){state.head.done=false}if(!(state.wrap&1)||(((hold&255)<<8)+(hold>>8))%31){strm.msg="incorrect header check";state.mode=BAD;break}if((hold&15)!==Z_DEFLATED){strm.msg="unknown compression method";state.mode=BAD;break}hold>>>=4;bits-=4;len=(hold&15)+8;if(state.wbits===0){state.wbits=len}else if(len>state.wbits){strm.msg="invalid window size";state.mode=BAD;break}state.dmax=1<>8&1}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=TIME;case TIME:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>8&255;hbuf[2]=hold>>>16&255;hbuf[3]=hold>>>24&255;state.check=crc32(state.check,hbuf,4,0)}hold=0;bits=0;state.mode=OS;case OS:while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<>8}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=EXLEN;case EXLEN:if(state.flags&1024){while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0}else if(state.head){state.head.extra=null}state.mode=EXTRA;case EXTRA:if(state.flags&1024){copy=state.length;if(copy>have){copy=have}if(copy){if(state.head){len=state.head.extra_len-state.length;if(!state.head.extra){state.head.extra=new Array(state.head.extra_len)}utils.arraySet(state.head.extra,input,next,copy,len)}if(state.flags&512){state.check=crc32(state.check,input,copy,next)}have-=copy;next+=copy;state.length-=copy}if(state.length){break inf_leave}}state.length=0;state.mode=NAME;case NAME:if(state.flags&2048){if(have===0){break inf_leave}copy=0;do{len=input[next+copy++];if(state.head&&len&&state.length<65536){state.head.name+=String.fromCharCode(len)}}while(len&©>9&1;state.head.done=true}strm.adler=state.check=0;state.mode=TYPE;break;case DICTID:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=bits&7;bits-=bits&7;state.mode=CHECK;break}while(bits<3){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=1;bits-=1;switch(hold&3){case 0:state.mode=STORED;break;case 1:fixedtables(state);state.mode=LEN_;if(flush===Z_TREES){hold>>>=2;bits-=2;break inf_leave}break;case 2:state.mode=TABLE;break;case 3:strm.msg="invalid block type";state.mode=BAD}hold>>>=2;bits-=2;break;case STORED:hold>>>=bits&7;bits-=bits&7;while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>16^65535)){strm.msg="invalid stored block lengths";state.mode=BAD;break}state.length=hold&65535;hold=0;bits=0;state.mode=COPY_;if(flush===Z_TREES){break inf_leave}case COPY_:state.mode=COPY;case COPY:copy=state.length;if(copy){if(copy>have){copy=have}if(copy>left){copy=left}if(copy===0){break inf_leave}utils.arraySet(output,input,next,copy,put);have-=copy;next+=copy;left-=copy;put+=copy;state.length-=copy;break}state.mode=TYPE;break;case TABLE:while(bits<14){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=5;bits-=5;state.ndist=(hold&31)+1;hold>>>=5;bits-=5;state.ncode=(hold&15)+4;hold>>>=4;bits-=4;if(state.nlen>286||state.ndist>30){strm.msg="too many length or distance symbols";state.mode=BAD;break}state.have=0;state.mode=LENLENS;case LENLENS:while(state.have>>=3;bits-=3}while(state.have<19){state.lens[order[state.have++]]=0}state.lencode=state.lendyn;state.lenbits=7;opts={bits:state.lenbits};ret=inflate_table(CODES,state.lens,0,19,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg="invalid code lengths set";state.mode=BAD;break}state.have=0;state.mode=CODELENS;case CODELENS:while(state.have>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=here_bits;bits-=here_bits;state.lens[state.have++]=here_val}else{if(here_val===16){n=here_bits+2;while(bits>>=here_bits;bits-=here_bits;if(state.have===0){strm.msg="invalid bit length repeat";state.mode=BAD;break}len=state.lens[state.have-1];copy=3+(hold&3);hold>>>=2;bits-=2}else if(here_val===17){n=here_bits+3;while(bits>>=here_bits;bits-=here_bits;len=0;copy=3+(hold&7);hold>>>=3;bits-=3}else{n=here_bits+7;while(bits>>=here_bits;bits-=here_bits;len=0;copy=11+(hold&127);hold>>>=7;bits-=7}if(state.have+copy>state.nlen+state.ndist){strm.msg="invalid bit length repeat";state.mode=BAD;break}while(copy--){state.lens[state.have++]=len}}}if(state.mode===BAD){break}if(state.lens[256]===0){strm.msg="invalid code -- missing end-of-block";state.mode=BAD;break}state.lenbits=9;opts={bits:state.lenbits};ret=inflate_table(LENS,state.lens,0,state.nlen,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg="invalid literal/lengths set";state.mode=BAD;break}state.distbits=6;state.distcode=state.distdyn;opts={bits:state.distbits};ret=inflate_table(DISTS,state.lens,state.nlen,state.ndist,state.distcode,0,state.work,opts);state.distbits=opts.bits;if(ret){strm.msg="invalid distances set";state.mode=BAD;break}state.mode=LEN_;if(flush===Z_TREES){break inf_leave}case LEN_:state.mode=LEN;case LEN:if(have>=6&&left>=258){strm.next_out=put;strm.avail_out=left;strm.next_in=next;strm.avail_in=have;state.hold=hold;state.bits=bits;inflate_fast(strm,_out);put=strm.next_out;output=strm.output;left=strm.avail_out;next=strm.next_in;input=strm.input;have=strm.avail_in;hold=state.hold;bits=state.bits;if(state.mode===TYPE){state.back=-1}break}state.back=0;for(;;){here=state.lencode[hold&(1<>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;state.length=here_val;if(here_op===0){state.mode=LIT;break}if(here_op&32){state.back=-1;state.mode=TYPE;break}if(here_op&64){strm.msg="invalid literal/length code";state.mode=BAD;break}state.extra=here_op&15;state.mode=LENEXT;case LENEXT:if(state.extra){n=state.extra;while(bits>>=state.extra;bits-=state.extra;state.back+=state.extra}state.was=state.length;state.mode=DIST;case DIST:for(;;){here=state.distcode[hold&(1<>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;if(here_op&64){strm.msg="invalid distance code";state.mode=BAD;break}state.offset=here_val;state.extra=here_op&15;state.mode=DISTEXT;case DISTEXT:if(state.extra){n=state.extra;while(bits>>=state.extra;bits-=state.extra;state.back+=state.extra}if(state.offset>state.dmax){strm.msg="invalid distance too far back";state.mode=BAD;break}state.mode=MATCH;case MATCH:if(left===0){break inf_leave}copy=_out-left;if(state.offset>copy){copy=state.offset-copy;if(copy>state.whave){if(state.sane){strm.msg="invalid distance too far back";state.mode=BAD;break}}if(copy>state.wnext){copy-=state.wnext;from=state.wsize-copy}else{from=state.wnext-copy}if(copy>state.length){copy=state.length}from_source=state.window}else{from_source=output;from=put-state.offset;copy=state.length}if(copy>left){copy=left}left-=copy;state.length-=copy;do{output[put++]=from_source[from++]}while(--copy);if(state.length===0){state.mode=LEN}break;case LIT:if(left===0){break inf_leave}output[put++]=state.length;left--;state.mode=LEN;break;case CHECK:if(state.wrap){while(bits<32){if(have===0){break inf_leave}have--;hold|=input[next++]<=1;max--){if(count[max]!==0){break}}if(root>max){root=max}if(max===0){table[table_index++]=1<<24|64<<16|0;table[table_index++]=1<<24|64<<16|0;opts.bits=1;return 0}for(min=1;min0&&(type===CODES||max!==1)){return-1}offs[1]=0;for(len=1;lenENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}var i=0;for(;;){i++;here_bits=len-drop;if(work[sym]end){here_op=extra[extra_index+work[sym]];here_val=base[base_index+work[sym]]}else{here_op=32+64;here_val=0}incr=1<>drop)+fill]=here_bits<<24|here_op<<16|here_val|0}while(fill!==0);incr=1<>=1}if(incr!==0){huff&=incr-1;huff+=incr}else{huff=0}sym++;if(--count[len]===0){if(len===max){break}len=lens[lens_index+work[sym]]}if(len>root&&(huff&mask)!==low){if(drop===0){drop=root}next+=min;curr=len-drop;left=1<ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}low=huff&mask;table[low]=root<<24|curr<<16|next-table_index|0}}if(huff!==0){table[next+huff]=len-drop<<24|64<<16|0}opts.bits=root;return 0}},{"../utils/common":177}],185:[function(require,module,exports){"use strict";module.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],186:[function(require,module,exports){"use strict";var utils=require("../utils/common");var Z_FIXED=4;var Z_BINARY=0;var Z_TEXT=1;var Z_UNKNOWN=2;function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}var STORED_BLOCK=0;var STATIC_TREES=1;var DYN_TREES=2;var MIN_MATCH=3;var MAX_MATCH=258;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var Buf_size=16;var MAX_BL_BITS=7;var END_BLOCK=256;var REP_3_6=16;var REPZ_3_10=17;var REPZ_11_138=18;var extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var DIST_CODE_LEN=512;var static_ltree=new Array((L_CODES+2)*2);zero(static_ltree);var static_dtree=new Array(D_CODES*2);zero(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero(_dist_code);var _length_code=new Array(MAX_MATCH-MIN_MATCH+1);zero(_length_code);var base_length=new Array(LENGTH_CODES);zero(base_length);var base_dist=new Array(D_CODES);zero(base_dist);function StaticTreeDesc(static_tree,extra_bits,extra_base,elems,max_length){this.static_tree=static_tree;this.extra_bits=extra_bits;this.extra_base=extra_base;this.elems=elems;this.max_length=max_length;this.has_stree=static_tree&&static_tree.length}var static_l_desc;var static_d_desc;var static_bl_desc;function TreeDesc(dyn_tree,stat_desc){this.dyn_tree=dyn_tree;this.max_code=0;this.stat_desc=stat_desc}function d_code(dist){return dist<256?_dist_code[dist]:_dist_code[256+(dist>>>7)]}function put_short(s,w){s.pending_buf[s.pending++]=w&255;s.pending_buf[s.pending++]=w>>>8&255}function send_bits(s,value,length){if(s.bi_valid>Buf_size-length){s.bi_buf|=value<>Buf_size-s.bi_valid;s.bi_valid+=length-Buf_size}else{s.bi_buf|=value<>>=1;res<<=1}while(--len>0);return res>>>1}function bi_flush(s){if(s.bi_valid===16){put_short(s,s.bi_buf);s.bi_buf=0;s.bi_valid=0}else if(s.bi_valid>=8){s.pending_buf[s.pending++]=s.bi_buf&255;s.bi_buf>>=8;s.bi_valid-=8}}function gen_bitlen(s,desc){var tree=desc.dyn_tree;var max_code=desc.max_code;var stree=desc.stat_desc.static_tree;var has_stree=desc.stat_desc.has_stree;var extra=desc.stat_desc.extra_bits;var base=desc.stat_desc.extra_base;var max_length=desc.stat_desc.max_length;var h;var n,m;var bits;var xbits;var f;var overflow=0;for(bits=0;bits<=MAX_BITS;bits++){s.bl_count[bits]=0}tree[s.heap[s.heap_max]*2+1]=0;for(h=s.heap_max+1;hmax_length){bits=max_length;overflow++}tree[n*2+1]=bits;if(n>max_code){continue}s.bl_count[bits]++;xbits=0;if(n>=base){xbits=extra[n-base]}f=tree[n*2];s.opt_len+=f*(bits+xbits);if(has_stree){s.static_len+=f*(stree[n*2+1]+xbits)}}if(overflow===0){return}do{bits=max_length-1;while(s.bl_count[bits]===0){bits--}s.bl_count[bits]--;s.bl_count[bits+1]+=2;s.bl_count[max_length]--;overflow-=2}while(overflow>0);for(bits=max_length;bits!==0;bits--){n=s.bl_count[bits];while(n!==0){m=s.heap[--h];if(m>max_code){continue}if(tree[m*2+1]!==bits){s.opt_len+=(bits-tree[m*2+1])*tree[m*2];tree[m*2+1]=bits}n--}}}function gen_codes(tree,max_code,bl_count){var next_code=new Array(MAX_BITS+1);var code=0;var bits;var n;for(bits=1;bits<=MAX_BITS;bits++){next_code[bits]=code=code+bl_count[bits-1]<<1}for(n=0;n<=max_code;n++){var len=tree[n*2+1];if(len===0){continue}tree[n*2]=bi_reverse(next_code[len]++,len)}}function tr_static_init(){var n;var bits;var length;var code;var dist;var bl_count=new Array(MAX_BITS+1);length=0;for(code=0;code>=7;for(;code8){put_short(s,s.bi_buf)}else if(s.bi_valid>0){s.pending_buf[s.pending++]=s.bi_buf}s.bi_buf=0;s.bi_valid=0}function copy_block(s,buf,len,header){bi_windup(s);if(header){put_short(s,len);put_short(s,~len)}utils.arraySet(s.pending_buf,s.window,buf,len,s.pending);s.pending+=len}function smaller(tree,n,m,depth){var _n2=n*2;var _m2=m*2;return tree[_n2]>1;n>=1;n--){pqdownheap(s,tree,n)}node=elems;do{n=s.heap[1];s.heap[1]=s.heap[s.heap_len--];pqdownheap(s,tree,1);m=s.heap[1];s.heap[--s.heap_max]=n;s.heap[--s.heap_max]=m;tree[node*2]=tree[n*2]+tree[m*2];s.depth[node]=(s.depth[n]>=s.depth[m]?s.depth[n]:s.depth[m])+1;tree[n*2+1]=tree[m*2+1]=node;s.heap[1]=node++;pqdownheap(s,tree,1)}while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1];gen_bitlen(s,desc);gen_codes(tree,max_code,s.bl_count)}function scan_tree(s,tree,max_code){var n;var prevlen=-1;var curlen;var nextlen=tree[0*2+1];var count=0;var max_count=7;var min_count=4;if(nextlen===0){max_count=138;min_count=3}tree[(max_code+1)*2+1]=65535;for(n=0;n<=max_code;n++){curlen=nextlen;nextlen=tree[(n+1)*2+1];if(++count=3;max_blindex--){if(s.bl_tree[bl_order[max_blindex]*2+1]!==0){break}}s.opt_len+=3*(max_blindex+1)+5+5+4;return max_blindex}function send_all_trees(s,lcodes,dcodes,blcodes){var rank;send_bits(s,lcodes-257,5);send_bits(s,dcodes-1,5);send_bits(s,blcodes-4,4);for(rank=0;rank>>=1){if(black_mask&1&&s.dyn_ltree[n*2]!==0){return Z_BINARY}}if(s.dyn_ltree[9*2]!==0||s.dyn_ltree[10*2]!==0||s.dyn_ltree[13*2]!==0){return Z_TEXT}for(n=32;n0){if(s.strm.data_type===Z_UNKNOWN){s.strm.data_type=detect_data_type(s)}build_tree(s,s.l_desc);build_tree(s,s.d_desc);max_blindex=build_bl_tree(s);opt_lenb=s.opt_len+3+7>>>3;static_lenb=s.static_len+3+7>>>3;if(static_lenb<=opt_lenb){opt_lenb=static_lenb}}else{opt_lenb=static_lenb=stored_len+5}if(stored_len+4<=opt_lenb&&buf!==-1){_tr_stored_block(s,buf,stored_len,last)}else if(s.strategy===Z_FIXED||static_lenb===opt_lenb){send_bits(s,(STATIC_TREES<<1)+(last?1:0),3);compress_block(s,static_ltree,static_dtree)}else{send_bits(s,(DYN_TREES<<1)+(last?1:0),3);send_all_trees(s,s.l_desc.max_code+1,s.d_desc.max_code+1,max_blindex+1);compress_block(s,s.dyn_ltree,s.dyn_dtree)}init_block(s);if(last){bi_windup(s)}}function _tr_tally(s,dist,lc){s.pending_buf[s.d_buf+s.last_lit*2]=dist>>>8&255;s.pending_buf[s.d_buf+s.last_lit*2+1]=dist&255;s.pending_buf[s.l_buf+s.last_lit]=lc&255;s.last_lit++;if(dist===0){s.dyn_ltree[lc*2]++}else{s.matches++;dist--;s.dyn_ltree[(_length_code[lc]+LITERALS+1)*2]++;s.dyn_dtree[d_code(dist)*2]++}return s.last_lit===s.lit_bufsize-1}exports._tr_init=_tr_init;exports._tr_stored_block=_tr_stored_block;exports._tr_flush_block=_tr_flush_block;exports._tr_tally=_tr_tally;exports._tr_align=_tr_align},{"../utils/common":177}],187:[function(require,module,exports){"use strict";function ZStream(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}module.exports=ZStream},{}],188:[function(require,module,exports){module.exports={"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"}},{}],189:[function(require,module,exports){var asn1=require("asn1.js");var RSAPrivateKey=asn1.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())});exports.RSAPrivateKey=RSAPrivateKey;var RSAPublicKey=asn1.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});exports.RSAPublicKey=RSAPublicKey;var PublicKey=asn1.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPublicKey").bitstr())});exports.PublicKey=PublicKey;var AlgorithmIdentifier=asn1.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())});var PrivateKeyInfo=asn1.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPrivateKey").octstr())});exports.PrivateKey=PrivateKeyInfo;var EncryptedPrivateKeyInfo=asn1.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())});exports.EncryptedPrivateKey=EncryptedPrivateKeyInfo;var DSAPrivateKey=asn1.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())});exports.DSAPrivateKey=DSAPrivateKey;exports.DSAparam=asn1.define("DSAparam",function(){this.int()});var ECPrivateKey=asn1.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(ECParameters),this.key("publicKey").optional().explicit(1).bitstr())});exports.ECPrivateKey=ECPrivateKey;var ECParameters=asn1.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});exports.signature=asn1.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"asn1.js":8}],190:[function(require,module,exports){(function(Buffer){var findProc=/Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m;var startRegex=/^-----BEGIN (.*) KEY-----\r?\n/m;var fullRegex=/^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m;var evp=require("evp_bytestokey");var ciphers=require("browserify-aes");module.exports=function(okey,password){var key=okey.toString();var match=key.match(findProc);var decrypted;if(!match){var match2=key.match(fullRegex);decrypted=new Buffer(match2[2].replace(/\r?\n/g,""),"base64")}else{var suite="aes"+match[1];var iv=new Buffer(match[2],"hex");var cipherText=new Buffer(match[3].replace(/\r?\n/g,""),"base64");var cipherKey=evp(password,iv.slice(0,8),parseInt(match[1],10)).key;var out=[];var cipher=ciphers.createDecipheriv(suite,cipherKey,iv);out.push(cipher.update(cipherText));out.push(cipher.final());decrypted=Buffer.concat(out)}var tag=key.match(startRegex)[1]+" KEY";return{tag:tag,data:decrypted}}}).call(this,require("buffer").Buffer)},{"browserify-aes":40,buffer:67,evp_bytestokey:111}],191:[function(require,module,exports){(function(Buffer){var asn1=require("./asn1");var aesid=require("./aesid.json");var fixProc=require("./fixProc");var ciphers=require("browserify-aes");var compat=require("pbkdf2");module.exports=parseKeys;function parseKeys(buffer){var password;if(typeof buffer==="object"&&!Buffer.isBuffer(buffer)){password=buffer.passphrase;buffer=buffer.key}if(typeof buffer==="string"){buffer=new Buffer(buffer)}var stripped=fixProc(buffer,password);var type=stripped.tag;var data=stripped.data;var subtype,ndata;switch(type){case"PUBLIC KEY":ndata=asn1.PublicKey.decode(data,"der");subtype=ndata.algorithm.algorithm.join(".");switch(subtype){case"1.2.840.113549.1.1.1":return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":ndata.subjectPrivateKey=ndata.subjectPublicKey;return{type:"ec",data:ndata};case"1.2.840.10040.4.1":ndata.algorithm.params.pub_key=asn1.DSAparam.decode(ndata.subjectPublicKey.data,"der");return{type:"dsa",data:ndata.algorithm.params};default:throw new Error("unknown key id "+subtype)}throw new Error("unknown key type "+type);case"ENCRYPTED PRIVATE KEY":data=asn1.EncryptedPrivateKey.decode(data,"der");data=decrypt(data,password);case"PRIVATE KEY":ndata=asn1.PrivateKey.decode(data,"der");subtype=ndata.algorithm.algorithm.join(".");switch(subtype){case"1.2.840.113549.1.1.1":return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:ndata.algorithm.curve,privateKey:asn1.ECPrivateKey.decode(ndata.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":ndata.algorithm.params.priv_key=asn1.DSAparam.decode(ndata.subjectPrivateKey,"der");return{type:"dsa",params:ndata.algorithm.params};default:throw new Error("unknown key id "+subtype)}throw new Error("unknown key type "+type);case"RSA PUBLIC KEY":return asn1.RSAPublicKey.decode(data,"der");case"RSA PRIVATE KEY":return asn1.RSAPrivateKey.decode(data,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:asn1.DSAPrivateKey.decode(data,"der")};case"EC PRIVATE KEY":data=asn1.ECPrivateKey.decode(data,"der");return{curve:data.parameters.value,privateKey:data.privateKey};default:throw new Error("unknown key type "+type)}}parseKeys.signature=asn1.signature;function decrypt(data,password){var salt=data.algorithm.decrypt.kde.kdeparams.salt;var iters=parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(),10);var algo=aesid[data.algorithm.decrypt.cipher.algo.join(".")];var iv=data.algorithm.decrypt.cipher.iv;var cipherText=data.subjectPrivateKey;var keylen=parseInt(algo.split("-")[1],10)/8;var key=compat.pbkdf2Sync(password,salt,iters,keylen);var cipher=ciphers.createDecipheriv(algo,key,iv);var out=[];out.push(cipher.update(cipherText));out.push(cipher.final());return Buffer.concat(out)}}).call(this,require("buffer").Buffer)},{"./aesid.json":188,"./asn1":189,"./fixProc":190,"browserify-aes":40,buffer:67,pbkdf2:193}],192:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=6?"utf-8":"binary"}exports.pbkdf2Sync=function(password,salt,iterations,keylen,digest){if(!Buffer.isBuffer(password))password=new Buffer(password,defaultEncoding);if(!Buffer.isBuffer(salt))salt=new Buffer(salt,defaultEncoding);checkParameters(iterations,keylen);digest=digest||"sha1";var hLen;var l=1;var DK=new Buffer(keylen);var block1=new Buffer(salt.length+4);salt.copy(block1,0,0,salt.length);var r;var T;for(var i=1;i<=l;i++){block1.writeUInt32BE(i,salt.length);var U=createHmac(digest,password).update(block1).digest();if(!hLen){hLen=U.length;T=new Buffer(hLen);l=Math.ceil(keylen/hLen);r=keylen-(l-1)*hLen}U.copy(T,0,0,hLen);for(var j=1;jMAX_ALLOC||keylen!==keylen){throw new TypeError("Bad key length")}}},{}],195:[function(require,module,exports){"use strict";module.exports=typeof Promise==="function"?Promise:require("pinkie")},{pinkie:196}],196:[function(require,module,exports){(function(global){"use strict";var PENDING="pending";var SETTLED="settled";var FULFILLED="fulfilled";var REJECTED="rejected";var NOOP=function(){};var isNode=typeof global!=="undefined"&&typeof global.process!=="undefined"&&typeof global.process.emit==="function";var asyncSetTimer=typeof setImmediate==="undefined"?setTimeout:setImmediate;var asyncQueue=[];var asyncTimer;function asyncFlush(){for(var i=0;i1){for(var i=1;ik||new bn(enc).cmp(key.modulus)>=0){throw new Error("decryption error")}var msg;if(reverse){msg=withPublic(new bn(enc),key)}else{msg=crt(enc,key)}var zBuffer=new Buffer(k-msg.length);zBuffer.fill(0);msg=Buffer.concat([zBuffer,msg],k);if(padding===4){return oaep(key,msg)}else if(padding===1){return pkcs1(key,msg,reverse)}else if(padding===3){return msg}else{throw new Error("unknown padding")}};function oaep(key,msg){var n=key.modulus;var k=key.modulus.byteLength();var mLen=msg.length;var iHash=createHash("sha1").update(new Buffer("")).digest();var hLen=iHash.length;var hLen2=2*hLen;if(msg[0]!==0){throw new Error("decryption error")}var maskedSeed=msg.slice(1,hLen+1);var maskedDb=msg.slice(hLen+1);var seed=xor(maskedSeed,mgf(maskedDb,hLen));var db=xor(maskedDb,mgf(seed,k-hLen-1));if(compare(iHash,db.slice(0,hLen))){throw new Error("decryption error")}var i=hLen;while(db[i]===0){i++}if(db[i++]!==1){throw new Error("decryption error")}return db.slice(i)}function pkcs1(key,msg,reverse){var p1=msg.slice(0,2);var i=2;var status=0;while(msg[i++]!==0){if(i>=msg.length){status++;break}}var ps=msg.slice(2,i-1);var p2=msg.slice(i-1,i);if(p1.toString("hex")!=="0002"&&!reverse||p1.toString("hex")!=="0001"&&reverse){status++}if(ps.length<8){status++}if(status){throw new Error("decryption error")}return msg.slice(i)}function compare(a,b){a=new Buffer(a);b=new Buffer(b);var dif=0;var len=a.length;if(a.length!==b.length){dif++;len=Math.min(a.length,b.length)}var i=-1;while(++i=0){throw new Error("data too long for modulus")}}else{throw new Error("unknown padding")}if(reverse){return crt(paddedMsg,key)}else{return withPublic(paddedMsg,key)}};function oaep(key,msg){var k=key.modulus.byteLength();var mLen=msg.length;var iHash=createHash("sha1").update(new Buffer("")).digest();var hLen=iHash.length;var hLen2=2*hLen;if(mLen>k-hLen2-2){throw new Error("message too long")}var ps=new Buffer(k-mLen-hLen2-2);ps.fill(0);var dblen=k-hLen-1;var seed=randomBytes(hLen);var maskedDb=xor(Buffer.concat([iHash,ps,new Buffer([1]),msg],dblen),mgf(seed,dblen));var maskedSeed=xor(seed,mgf(maskedDb,hLen));return new bn(Buffer.concat([new Buffer([0]),maskedSeed,maskedDb],k))}function pkcs1(key,msg,reverse){var mLen=msg.length;var k=key.modulus.byteLength();if(mLen>k-11){throw new Error("message too long")}var ps;if(reverse){ps=new Buffer(k-mLen-3);ps.fill(255)}else{ps=nonZero(k-mLen-3)}return new bn(Buffer.concat([new Buffer([0,reverse?1:2]),ps,new Buffer([0]),msg],k))}function nonZero(len,crypto){var out=new Buffer(len);var i=0;var cache=randomBytes(len*2);var cur=0;var num;while(i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw new RangeError(errors[type])}function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter=55296&&value<=56319&&counter65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(j=0;j=128){error("not-basic")}output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index=inputLength){error("invalid-input")}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error("overflow")}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digitfloor(maxInt/baseMinusT)){error("overflow")}w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)){error("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;jmaxInt){error("overflow")}if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q=0&&(options.parseArrays&&index<=options.arrayLimit)){ -obj=[];obj[index]=parseObject(chain,val,options)}else{obj[cleanRoot]=parseObject(chain,val,options)}}return obj};var parseKeys=function parseKeys(givenKey,val,options){if(!givenKey){return}var key=options.allowDots?givenKey.replace(/\.([^\.\[]+)/g,"[$1]"):givenKey;var parent=/^([^\[\]]*)/;var child=/(\[[^\[\]]*\])/g;var segment=parent.exec(key);var keys=[];if(segment[1]){if(!options.plainObjects&&has.call(Object.prototype,segment[1])){if(!options.allowPrototypes){return}}keys.push(segment[1])}var i=0;while((segment=child.exec(key))!==null&&i=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122){out+=string.charAt(i);continue}if(c<128){out=out+hexTable[c];continue}if(c<2048){out=out+(hexTable[192|c>>6]+hexTable[128|c&63]);continue}if(c<55296||c>=57344){out=out+(hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|c&63]);continue}i+=1;c=65536+((c&1023)<<10|string.charCodeAt(i)&1023);out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|c&63]}return out};exports.compact=function(obj,references){if(typeof obj!=="object"||obj===null){return obj}var refs=references||[];var lookup=refs.indexOf(obj);if(lookup!==-1){return refs[lookup]}refs.push(obj);if(Array.isArray(obj)){var compacted=[];for(var i=0;i0&&len>maxKeys){len=maxKeys}for(var i=0;i=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1)}else{kstr=x;vstr=""}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v}else if(isArray(obj[k])){obj[k].push(v)}else{obj[k]=[obj[k],v]}}return obj};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},{}],212:[function(require,module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){sep=sep||"&";eq=eq||"=";if(obj===null){obj=undefined}if(typeof obj==="object"){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep)}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]))}}).join(sep)}if(!name)return"";return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj))};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i65536)throw new Error("requested too many random bytes");var rawBytes=new global.Uint8Array(size);if(size>0){crypto.getRandomValues(rawBytes)}var bytes=new Buffer(rawBytes.buffer);if(typeof cb==="function"){return process.nextTick(function(){cb(null,bytes)})}return bytes}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer)},{_process:198,buffer:67}],215:[function(require,module,exports){module.exports=require("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":216}],216:[function(require,module,exports){"use strict";var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){keys.push(key)}return keys};module.exports=Duplex;var processNextTick=require("process-nextick-args");var util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable");var Writable=require("./_stream_writable");util.inherits(Duplex,Readable);var keys=objectKeys(Writable.prototype);for(var v=0;v0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;if(state.decoder&&!addToFront&&!encoding){chunk=state.decoder.write(chunk);skipAdd=!state.objectMode&&chunk.length===0}if(!addToFront)state.reading=false;if(!skipAdd){if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}else{state.length-=n}if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;increasedAwaitDrain=true}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)dest.emit("error",er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var i=0;i=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.head.data;else ret=state.buffer.concat(state.length);state.buffer.clear()}else{ret=fromListPartial(n,state.buffer,state.decoder)}return ret}function fromListPartial(n,list,hasStrings){var ret;if(nstr.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=str.slice(nb)}break}++c}list.length-=c;return ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n);var p=list.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=buf.slice(nb)}break}++c}list.length-=c;return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i-1?setImmediate:processNextTick;var Duplex;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")};var Stream; -(function(){try{Stream=require("st"+"ream")}catch(_){}finally{if(!Stream)Stream=require("events").EventEmitter}})();var Buffer=require("buffer").Buffer;var bufferShim=require("buffer-shims");util.inherits(Writable,Stream);function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null}function WritableState(options,stream){Duplex=Duplex||require("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var current=this.bufferedRequest;var out=[];while(current){out.push(current);current=current.next}return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(_){}})();var realHasInstance;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){realHasInstance=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){if(realHasInstance.call(this,object))return true;return object&&object._writableState instanceof WritableState}})}else{realHasInstance=function(object){return object instanceof this}}function Writable(options){Duplex=Duplex||require("./_stream_duplex");if(!realHasInstance.call(Writable,this)&&!(this instanceof Duplex)){return new Writable(options)}this._writableState=new WritableState(options,this);this.writable=true;if(options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev}Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er);processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError("May not write null values to stream")}else if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}if(er){stream.emit("error",er);processNextTick(cb,er);valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(typeof encoding==="function"){cb=encoding;encoding=null}if(Buffer.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(validChunk(this,state,chunk,cb)){state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if(typeof encoding==="string")encoding=encoding.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding;return this};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=bufferShim.from(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length};BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length};BufferList.prototype.shift=function(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret};BufferList.prototype.clear=function(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next){ret+=s+p.data}return ret};BufferList.prototype.concat=function(n){if(this.length===0)return bufferShim.alloc(0);if(this.length===1)return this.head.data;var ret=bufferShim.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){p.data.copy(ret,i);i+=p.data.length;p=p.next}return ret}},{buffer:67,"buffer-shims":65}],222:[function(require,module,exports){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":217}],223:[function(require,module,exports){(function(process){var Stream=function(){try{return require("st"+"ream")}catch(_){}}();exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=Stream||exports;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");if(!process.browser&&process.env.READABLE_STREAM==="disable"&&Stream){module.exports=Stream}}).call(this,require("_process"))},{"./lib/_stream_duplex.js":216,"./lib/_stream_passthrough.js":217,"./lib/_stream_readable.js":218,"./lib/_stream_transform.js":219,"./lib/_stream_writable.js":220,_process:198}],224:[function(require,module,exports){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":219}],225:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":220}],226:[function(require,module,exports){"use strict";var extend=require("extend"),cookies=require("./lib/cookies"),helpers=require("./lib/helpers");var paramsHaveRequestBody=helpers.paramsHaveRequestBody;function initParams(uri,options,callback){if(typeof options==="function"){callback=options}var params={};if(typeof options==="object"){extend(params,options,{uri:uri})}else if(typeof uri==="string"){extend(params,{uri:uri})}else{extend(params,uri)}params.callback=callback||params.callback;return params}function request(uri,options,callback){if(typeof uri==="undefined"){throw new Error("undefined is not a valid uri or options object.")}var params=initParams(uri,options,callback);if(params.method==="HEAD"&¶msHaveRequestBody(params)){throw new Error("HTTP HEAD requests MUST NOT include a request body.")}return new request.Request(params)}function verbFunc(verb){var method=verb.toUpperCase();return function(uri,options,callback){var params=initParams(uri,options,callback);params.method=method;return request(params,params.callback)}}request.get=verbFunc("get");request.head=verbFunc("head");request.post=verbFunc("post");request.put=verbFunc("put");request.patch=verbFunc("patch");request.del=verbFunc("delete");request["delete"]=verbFunc("delete");request.jar=function(store){return cookies.jar(store)};request.cookie=function(str){return cookies.parse(str)};function wrapRequestMethod(method,options,requester,verb){return function(uri,opts,callback){var params=initParams(uri,opts,callback);var target={};extend(true,target,options,params);target.pool=params.pool||options.pool;if(verb){target.method=verb.toUpperCase()}if(typeof requester==="function"){method=requester}return method(target,target.callback)}}request.defaults=function(options,requester){var self=this;options=options||{};if(typeof options==="function"){requester=options;options={}}var defaults=wrapRequestMethod(self,options,requester);var verbs=["get","head","post","put","patch","del","delete"];verbs.forEach(function(verb){defaults[verb]=wrapRequestMethod(self[verb],options,requester,verb)});defaults.cookie=wrapRequestMethod(self.cookie,options,requester);defaults.jar=self.jar;defaults.defaults=self.defaults;return defaults};request.forever=function(agentOptions,optionsArg){var options={};if(optionsArg){extend(options,optionsArg)}if(agentOptions){options.agentOptions=agentOptions}options.forever=true;return request.defaults(options)};module.exports=request;request.Request=require("./request");request.initParams=initParams;Object.defineProperty(request,"debug",{enumerable:true,get:function(){return request.Request.debug},set:function(debug){request.Request.debug=debug}})},{"./lib/cookies":228,"./lib/helpers":231,"./request":237,extend:112}],227:[function(require,module,exports){"use strict";var caseless=require("caseless"),uuid=require("uuid"),helpers=require("./helpers");var md5=helpers.md5,toBase64=helpers.toBase64;function Auth(request){this.request=request;this.hasAuth=false;this.sentAuth=false;this.bearerToken=null;this.user=null;this.pass=null}Auth.prototype.basic=function(user,pass,sendImmediately){var self=this;if(typeof user!=="string"||pass!==undefined&&typeof pass!=="string"){self.request.emit("error",new Error("auth() received invalid user or password"))}self.user=user;self.pass=pass;self.hasAuth=true;var header=user+":"+(pass||"");if(sendImmediately||typeof sendImmediately==="undefined"){var authHeader="Basic "+toBase64(header);self.sentAuth=true;return authHeader}};Auth.prototype.bearer=function(bearer,sendImmediately){var self=this;self.bearerToken=bearer;self.hasAuth=true;if(sendImmediately||typeof sendImmediately==="undefined"){if(typeof bearer==="function"){bearer=bearer()}var authHeader="Bearer "+(bearer||"");self.sentAuth=true;return authHeader}};Auth.prototype.digest=function(method,path,authHeader){var self=this;var challenge={};var re=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){var match=re.exec(authHeader);if(!match){break}challenge[match[1]]=match[2]||match[3]}var ha1Compute=function(algorithm,user,realm,pass,nonce,cnonce){var ha1=md5(user+":"+realm+":"+pass);if(algorithm&&algorithm.toLowerCase()==="md5-sess"){return md5(ha1+":"+nonce+":"+cnonce)}else{return ha1}};var qop=/(^|,)\s*auth\s*($|,)/.test(challenge.qop)&&"auth";var nc=qop&&"00000001";var cnonce=qop&&uuid().replace(/-/g,"");var ha1=ha1Compute(challenge.algorithm,self.user,challenge.realm,self.pass,challenge.nonce,cnonce);var ha2=md5(method+":"+path);var digestResponse=qop?md5(ha1+":"+challenge.nonce+":"+nc+":"+cnonce+":"+qop+":"+ha2):md5(ha1+":"+challenge.nonce+":"+ha2);var authValues={username:self.user,realm:challenge.realm,nonce:challenge.nonce,uri:path,qop:qop,response:digestResponse,nc:nc,cnonce:cnonce,algorithm:challenge.algorithm,opaque:challenge.opaque};authHeader=[];for(var k in authValues){if(authValues[k]){if(k==="qop"||k==="nc"||k==="algorithm"){authHeader.push(k+"="+authValues[k])}else{authHeader.push(k+'="'+authValues[k]+'"')}}}authHeader="Digest "+authHeader.join(", ");self.sentAuth=true;return authHeader};Auth.prototype.onRequest=function(user,pass,sendImmediately,bearer){var self=this,request=self.request;var authHeader;if(bearer===undefined&&user===undefined){self.request.emit("error",new Error("no auth mechanism defined"))}else if(bearer!==undefined){authHeader=self.bearer(bearer,sendImmediately)}else{authHeader=self.basic(user,pass,sendImmediately)}if(authHeader){request.setHeader("authorization",authHeader)}};Auth.prototype.onResponse=function(response){var self=this,request=self.request;if(!self.hasAuth||self.sentAuth){return null}var c=caseless(response.headers);var authHeader=c.get("www-authenticate");var authVerb=authHeader&&authHeader.split(" ")[0].toLowerCase();request.debug("reauth",authVerb);switch(authVerb){case"basic":return self.basic(self.user,self.pass,true);case"bearer":return self.bearer(self.bearerToken,true);case"digest":return self.digest(request.method,request.path,authHeader)}};exports.Auth=Auth},{"./helpers":231,caseless:69,uuid:294}],228:[function(require,module,exports){"use strict";var tough=require("tough-cookie");var Cookie=tough.Cookie,CookieJar=tough.CookieJar;exports.parse=function(str){if(str&&str.uri){str=str.uri}if(typeof str!=="string"){throw new Error("The cookie function only accepts STRING as param")}return Cookie.parse(str,{loose:true})};function RequestJar(store){var self=this;self._jar=new CookieJar(store,{looseMode:true})}RequestJar.prototype.setCookie=function(cookieOrStr,uri,options){var self=this;return self._jar.setCookieSync(cookieOrStr,uri,options||{})};RequestJar.prototype.getCookieString=function(uri){var self=this;return self._jar.getCookieStringSync(uri)};RequestJar.prototype.getCookies=function(uri){var self=this;return self._jar.getCookiesSync(uri)};exports.jar=function(store){return new RequestJar(store)}},{"tough-cookie":279}],229:[function(require,module,exports){(function(process){"use strict";function formatHostname(hostname){return hostname.replace(/^\.*/,".").toLowerCase()}function parseNoProxyZone(zone){zone=zone.trim().toLowerCase();var zoneParts=zone.split(":",2),zoneHost=formatHostname(zoneParts[0]),zonePort=zoneParts[1],hasPort=zone.indexOf(":")>-1;return{hostname:zoneHost,port:zonePort,hasPort:hasPort}}function uriInNoProxy(uri,noProxy){var port=uri.port||(uri.protocol==="https:"?"443":"80"),hostname=formatHostname(uri.hostname),noProxyList=noProxy.split(",");return noProxyList.map(parseNoProxyZone).some(function(noProxyZone){var isMatchedAt=hostname.indexOf(noProxyZone.hostname),hostnameMatched=isMatchedAt>-1&&isMatchedAt===hostname.length-noProxyZone.hostname.length;if(noProxyZone.hasPort){return port===noProxyZone.port&&hostnameMatched}return hostnameMatched})}function getProxyFromURI(uri){var noProxy=process.env.NO_PROXY||process.env.no_proxy||"";if(noProxy==="*"){return null}if(noProxy!==""&&uriInNoProxy(uri,noProxy)){return null}if(uri.protocol==="http:"){return process.env.HTTP_PROXY||process.env.http_proxy||null}if(uri.protocol==="https:"){return process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||null}return null}module.exports=getProxyFromURI}).call(this,require("_process"))},{_process:198}],230:[function(require,module,exports){"use strict";var fs=require("fs");var qs=require("querystring");var validate=require("har-validator");var extend=require("extend");function Har(request){this.request=request}Har.prototype.reducer=function(obj,pair){if(obj[pair.name]===undefined){obj[pair.name]=pair.value;return obj}var arr=[obj[pair.name],pair.value];obj[pair.name]=arr;return obj};Har.prototype.prep=function(data){data.queryObj={};data.headersObj={};data.postData.jsonObj=false;data.postData.paramsObj=false;if(data.queryString&&data.queryString.length){data.queryObj=data.queryString.reduce(this.reducer,{})}if(data.headers&&data.headers.length){data.headersObj=data.headers.reduceRight(function(headers,header){headers[header.name]=header.value;return headers},{})}if(data.cookies&&data.cookies.length){var cookies=data.cookies.map(function(cookie){return cookie.name+"="+cookie.value});if(cookies.length){data.headersObj.cookie=cookies.join("; ")}}function some(arr){return arr.some(function(type){return data.postData.mimeType.indexOf(type)===0})}if(some(["multipart/mixed","multipart/related","multipart/form-data","multipart/alternative"])){data.postData.mimeType="multipart/form-data"}else if(some(["application/x-www-form-urlencoded"])){if(!data.postData.params){data.postData.text=""}else{data.postData.paramsObj=data.postData.params.reduce(this.reducer,{});data.postData.text=qs.stringify(data.postData.paramsObj)}}else if(some(["text/json","text/x-json","application/json","application/x-json"])){data.postData.mimeType="application/json";if(data.postData.text){try{data.postData.jsonObj=JSON.parse(data.postData.text)}catch(e){this.request.debug(e);data.postData.mimeType="text/plain"}}}return data};Har.prototype.options=function(options){if(!options.har){return options}var har={};extend(har,options.har);if(har.log&&har.log.entries){har=har.log.entries[0]}har.url=har.url||options.url||options.uri||options.baseUrl||"/";har.httpVersion=har.httpVersion||"HTTP/1.1";har.queryString=har.queryString||[];har.headers=har.headers||[];har.cookies=har.cookies||[];har.postData=har.postData||{};har.postData.mimeType=har.postData.mimeType||"application/octet-stream";har.bodySize=0;har.headersSize=0;har.postData.size=0;if(!validate.request(har)){return options}var req=this.prep(har);if(req.url){options.url=req.url}if(req.method){options.method=req.method}if(Object.keys(req.queryObj).length){options.qs=req.queryObj}if(Object.keys(req.headersObj).length){options.headers=req.headersObj}function test(type){return req.postData.mimeType.indexOf(type)===0}if(test("application/x-www-form-urlencoded")){options.form=req.postData.paramsObj}else if(test("application/json")){if(req.postData.jsonObj){options.body=req.postData.jsonObj;options.json=true}}else if(test("multipart/form-data")){options.formData={};req.postData.params.forEach(function(param){var attachment={};if(!param.fileName&&!param.fileName&&!param.contentType){options.formData[param.name]=param.value;return}if(param.fileName&&!param.value){attachment.value=fs.createReadStream(param.fileName)}else if(param.value){attachment.value=param.value}if(param.fileName){attachment.options={filename:param.fileName,contentType:param.contentType?param.contentType:null}}options.formData[param.name]=attachment})}else{if(req.postData.text){options.body=req.postData.text}}return options};exports.Har=Har},{extend:112,fs:64,"har-validator":119,querystring:213}],231:[function(require,module,exports){(function(process,Buffer){"use strict";var jsonSafeStringify=require("json-stringify-safe"),crypto=require("crypto");var defer=typeof setImmediate==="undefined"?process.nextTick:setImmediate;function paramsHaveRequestBody(params){return params.body||params.requestBodyStream||params.json&&typeof params.json!=="boolean"||params.multipart}function safeStringify(obj,replacer){var ret;try{ret=JSON.stringify(obj,replacer)}catch(e){ret=jsonSafeStringify(obj,replacer)}return ret}function md5(str){return crypto.createHash("md5").update(str).digest("hex")}function isReadStream(rs){return rs.readable&&rs.path&&rs.mode}function toBase64(str){return new Buffer(str||"","utf8").toString("base64")}function copy(obj){var o={};Object.keys(obj).forEach(function(i){o[i]=obj[i]});return o}function version(){var numbers=process.version.replace("v","").split(".");return{major:parseInt(numbers[0],10),minor:parseInt(numbers[1],10),patch:parseInt(numbers[2],10)}}exports.paramsHaveRequestBody=paramsHaveRequestBody;exports.safeStringify=safeStringify;exports.md5=md5;exports.isReadStream=isReadStream;exports.toBase64=toBase64;exports.copy=copy;exports.version=version;exports.defer=defer}).call(this,require("_process"),require("buffer").Buffer)},{_process:198,buffer:67,crypto:78,"json-stringify-safe":168}],232:[function(require,module,exports){(function(Buffer){"use strict";var uuid=require("uuid"),CombinedStream=require("combined-stream"),isstream=require("isstream");function Multipart(request){this.request=request;this.boundary=uuid();this.chunked=false;this.body=null}Multipart.prototype.isChunked=function(options){var self=this,chunked=false,parts=options.data||options;if(!parts.forEach){self.request.emit("error",new Error("Argument error, options.multipart."))}if(options.chunked!==undefined){chunked=options.chunked}if(self.request.getHeader("transfer-encoding")==="chunked"){chunked=true}if(!chunked){parts.forEach(function(part){if(typeof part.body==="undefined"){self.request.emit("error",new Error("Body attribute missing in multipart."))}if(isstream(part.body)){chunked=true}})}return chunked};Multipart.prototype.setHeaders=function(chunked){var self=this;if(chunked&&!self.request.hasHeader("transfer-encoding")){self.request.setHeader("transfer-encoding","chunked")}var header=self.request.getHeader("content-type");if(!header||header.indexOf("multipart")===-1){self.request.setHeader("content-type","multipart/related; boundary="+self.boundary)}else{if(header.indexOf("boundary")!==-1){self.boundary=header.replace(/.*boundary=([^\s;]+).*/,"$1")}else{self.request.setHeader("content-type",header+"; boundary="+self.boundary)}}};Multipart.prototype.build=function(parts,chunked){var self=this;var body=chunked?new CombinedStream:[];function add(part){if(typeof part==="number"){part=part.toString()}return chunked?body.append(part):body.push(new Buffer(part))}if(self.request.preambleCRLF){add("\r\n")}parts.forEach(function(part){var preamble="--"+self.boundary+"\r\n";Object.keys(part).forEach(function(key){if(key==="body"){return}preamble+=key+": "+part[key]+"\r\n"});preamble+="\r\n";add(preamble);add(part.body);add("\r\n")});add("--"+self.boundary+"--");if(self.request.postambleCRLF){add("\r\n")}return body};Multipart.prototype.onRequest=function(options){var self=this;var chunked=self.isChunked(options),parts=options.data||options;self.setHeaders(chunked);self.chunked=chunked;self.body=self.build(parts,chunked)};exports.Multipart=Multipart}).call(this,require("buffer").Buffer)},{buffer:67,"combined-stream":71,isstream:159,uuid:294}],233:[function(require,module,exports){(function(Buffer){"use strict";var url=require("url"),qs=require("qs"),caseless=require("caseless"),uuid=require("uuid"),oauth=require("oauth-sign"),crypto=require("crypto");function OAuth(request){this.request=request;this.params=null}OAuth.prototype.buildParams=function(_oauth,uri,method,query,form,qsLib){var oa={};for(var i in _oauth){oa["oauth_"+i]=_oauth[i]}if(!oa.oauth_version){oa.oauth_version="1.0"}if(!oa.oauth_timestamp){oa.oauth_timestamp=Math.floor(Date.now()/1e3).toString()}if(!oa.oauth_nonce){oa.oauth_nonce=uuid().replace(/-/g,"")}if(!oa.oauth_signature_method){oa.oauth_signature_method="HMAC-SHA1"}var consumer_secret_or_private_key=oa.oauth_consumer_secret||oa.oauth_private_key;delete oa.oauth_consumer_secret;delete oa.oauth_private_key;var token_secret=oa.oauth_token_secret;delete oa.oauth_token_secret;var realm=oa.oauth_realm;delete oa.oauth_realm;delete oa.oauth_transport_method;var baseurl=uri.protocol+"//"+uri.host+uri.pathname;var params=qsLib.parse([].concat(query,form,qsLib.stringify(oa)).join("&"));oa.oauth_signature=oauth.sign(oa.oauth_signature_method,method,baseurl,params,consumer_secret_or_private_key,token_secret);if(realm){oa.realm=realm}return oa};OAuth.prototype.buildBodyHash=function(_oauth,body){if(["HMAC-SHA1","RSA-SHA1"].indexOf(_oauth.signature_method||"HMAC-SHA1")<0){this.request.emit("error",new Error("oauth: "+_oauth.signature_method+" signature_method not supported with body_hash signing."))}var shasum=crypto.createHash("sha1");shasum.update(body||"");var sha1=shasum.digest("hex");return new Buffer(sha1).toString("base64")};OAuth.prototype.concatParams=function(oa,sep,wrap){wrap=wrap||"";var params=Object.keys(oa).filter(function(i){return i!=="realm"&&i!=="oauth_signature"}).sort();if(oa.realm){params.splice(0,0,"realm")}params.push("oauth_signature");return params.map(function(i){return i+"="+wrap+oauth.rfc3986(oa[i])+wrap}).join(sep)};OAuth.prototype.onRequest=function(_oauth){var self=this;self.params=_oauth;var uri=self.request.uri||{},method=self.request.method||"",headers=caseless(self.request.headers),body=self.request.body||"",qsLib=self.request.qsLib||qs;var form,query,contentType=headers.get("content-type")||"",formContentType="application/x-www-form-urlencoded",transport=_oauth.transport_method||"header";if(contentType.slice(0,formContentType.length)===formContentType){contentType=formContentType;form=body}if(uri.query){query=uri.query}if(transport==="body"&&(method!=="POST"||contentType!==formContentType)){self.request.emit("error",new Error("oauth: transport_method of body requires POST "+"and content-type "+formContentType))}if(!form&&typeof _oauth.body_hash==="boolean"){_oauth.body_hash=self.buildBodyHash(_oauth,self.request.body.toString())}var oa=self.buildParams(_oauth,uri,method,query,form,qsLib);switch(transport){case"header":self.request.setHeader("Authorization","OAuth "+self.concatParams(oa,",",'"'));break;case"query":var href=self.request.uri.href+=(query?"&":"?")+self.concatParams(oa,"&");self.request.uri=url.parse(href);self.request.path=self.request.uri.path;break;case"body":self.request.body=(form?form+"&":"")+self.concatParams(oa,"&");break;default:self.request.emit("error",new Error("oauth: transport_method invalid"))}};exports.OAuth=OAuth}).call(this,require("buffer").Buffer)},{buffer:67,caseless:69,crypto:78,"oauth-sign":176,qs:207,url:288,uuid:294}],234:[function(require,module,exports){"use strict";var qs=require("qs"),querystring=require("querystring");function Querystring(request){this.request=request;this.lib=null;this.useQuerystring=null;this.parseOptions=null;this.stringifyOptions=null}Querystring.prototype.init=function(options){if(this.lib){return}this.useQuerystring=options.useQuerystring;this.lib=this.useQuerystring?querystring:qs;this.parseOptions=options.qsParseOptions||{};this.stringifyOptions=options.qsStringifyOptions||{}};Querystring.prototype.stringify=function(obj){return this.useQuerystring?this.rfc3986(this.lib.stringify(obj,this.stringifyOptions.sep||null,this.stringifyOptions.eq||null,this.stringifyOptions)):this.lib.stringify(obj,this.stringifyOptions)};Querystring.prototype.parse=function(str){return this.useQuerystring?this.lib.parse(str,this.parseOptions.sep||null,this.parseOptions.eq||null,this.parseOptions):this.lib.parse(str,this.parseOptions)};Querystring.prototype.rfc3986=function(str){return str.replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()})};Querystring.prototype.unescape=querystring.unescape;exports.Querystring=Querystring},{qs:207,querystring:213}],235:[function(require,module,exports){"use strict";var url=require("url");var isUrl=/^https?:/;function Redirect(request){this.request=request;this.followRedirect=true;this.followRedirects=true;this.followAllRedirects=false;this.followOriginalHttpMethod=false;this.allowRedirect=function(){return true};this.maxRedirects=10;this.redirects=[];this.redirectsFollowed=0;this.removeRefererHeader=false}Redirect.prototype.onRequest=function(options){var self=this;if(options.maxRedirects!==undefined){self.maxRedirects=options.maxRedirects}if(typeof options.followRedirect==="function"){self.allowRedirect=options.followRedirect}if(options.followRedirect!==undefined){self.followRedirects=!!options.followRedirect}if(options.followAllRedirects!==undefined){self.followAllRedirects=options.followAllRedirects}if(self.followRedirects||self.followAllRedirects){self.redirects=self.redirects||[]}if(options.removeRefererHeader!==undefined){self.removeRefererHeader=options.removeRefererHeader}if(options.followOriginalHttpMethod!==undefined){ -self.followOriginalHttpMethod=options.followOriginalHttpMethod}};Redirect.prototype.redirectTo=function(response){var self=this,request=self.request;var redirectTo=null;if(response.statusCode>=300&&response.statusCode<400&&response.caseless.has("location")){var location=response.caseless.get("location");request.debug("redirect",location);if(self.followAllRedirects){redirectTo=location}else if(self.followRedirects){switch(request.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:redirectTo=location;break}}}else if(response.statusCode===401){var authHeader=request._auth.onResponse(response);if(authHeader){request.setHeader("authorization",authHeader);redirectTo=request.uri}}return redirectTo};Redirect.prototype.onResponse=function(response){var self=this,request=self.request;var redirectTo=self.redirectTo(response);if(!redirectTo||!self.allowRedirect.call(request,response)){return false}request.debug("redirect to",redirectTo);if(response.resume){response.resume()}if(self.redirectsFollowed>=self.maxRedirects){request.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+request.uri.href));return false}self.redirectsFollowed+=1;if(!isUrl.test(redirectTo)){redirectTo=url.resolve(request.uri.href,redirectTo)}var uriPrev=request.uri;request.uri=url.parse(redirectTo);if(request.uri.protocol!==uriPrev.protocol){delete request.agent}self.redirects.push({statusCode:response.statusCode,redirectUri:redirectTo});if(self.followAllRedirects&&request.method!=="HEAD"&&response.statusCode!==401&&response.statusCode!==307){request.method=self.followOriginalHttpMethod?request.method:"GET"}delete request.src;delete request.req;delete request._started;if(response.statusCode!==401&&response.statusCode!==307){delete request.body;delete request._form;if(request.headers){request.removeHeader("host");request.removeHeader("content-type");request.removeHeader("content-length");if(request.uri.hostname!==request.originalHost.split(":")[0]){request.removeHeader("authorization")}}}if(!self.removeRefererHeader){request.setHeader("referer",uriPrev.href)}request.emit("redirect");request.init();return true};exports.Redirect=Redirect},{url:288}],236:[function(require,module,exports){"use strict";var url=require("url"),tunnel=require("tunnel-agent");var defaultProxyHeaderWhiteList=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"];var defaultProxyHeaderExclusiveList=["proxy-authorization"];function constructProxyHost(uriObject){var port=uriObject.port,protocol=uriObject.protocol,proxyHost=uriObject.hostname+":";if(port){proxyHost+=port}else if(protocol==="https:"){proxyHost+="443"}else{proxyHost+="80"}return proxyHost}function constructProxyHeaderWhiteList(headers,proxyHeaderWhiteList){var whiteList=proxyHeaderWhiteList.reduce(function(set,header){set[header.toLowerCase()]=true;return set},{});return Object.keys(headers).filter(function(header){return whiteList[header.toLowerCase()]}).reduce(function(set,header){set[header]=headers[header];return set},{})}function constructTunnelOptions(request,proxyHeaders){var proxy=request.proxy;var tunnelOptions={proxy:{host:proxy.hostname,port:+proxy.port,proxyAuth:proxy.auth,headers:proxyHeaders},headers:request.headers,ca:request.ca,cert:request.cert,key:request.key,passphrase:request.passphrase,pfx:request.pfx,ciphers:request.ciphers,rejectUnauthorized:request.rejectUnauthorized,secureOptions:request.secureOptions,secureProtocol:request.secureProtocol};return tunnelOptions}function constructTunnelFnName(uri,proxy){var uriProtocol=uri.protocol==="https:"?"https":"http";var proxyProtocol=proxy.protocol==="https:"?"Https":"Http";return[uriProtocol,proxyProtocol].join("Over")}function getTunnelFn(request){var uri=request.uri;var proxy=request.proxy;var tunnelFnName=constructTunnelFnName(uri,proxy);return tunnel[tunnelFnName]}function Tunnel(request){this.request=request;this.proxyHeaderWhiteList=defaultProxyHeaderWhiteList;this.proxyHeaderExclusiveList=[];if(typeof request.tunnel!=="undefined"){this.tunnelOverride=request.tunnel}}Tunnel.prototype.isEnabled=function(){var self=this,request=self.request;if(typeof self.tunnelOverride!=="undefined"){return self.tunnelOverride}if(request.uri.protocol==="https:"){return true}return false};Tunnel.prototype.setup=function(options){var self=this,request=self.request;options=options||{};if(typeof request.proxy==="string"){request.proxy=url.parse(request.proxy)}if(!request.proxy||!request.tunnel){return false}if(options.proxyHeaderWhiteList){self.proxyHeaderWhiteList=options.proxyHeaderWhiteList}if(options.proxyHeaderExclusiveList){self.proxyHeaderExclusiveList=options.proxyHeaderExclusiveList}var proxyHeaderExclusiveList=self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList);var proxyHeaderWhiteList=self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList);var proxyHeaders=constructProxyHeaderWhiteList(request.headers,proxyHeaderWhiteList);proxyHeaders.host=constructProxyHost(request.uri);proxyHeaderExclusiveList.forEach(request.removeHeader,request);var tunnelFn=getTunnelFn(request);var tunnelOptions=constructTunnelOptions(request,proxyHeaders);request.agent=tunnelFn(tunnelOptions);return true};Tunnel.defaultProxyHeaderWhiteList=defaultProxyHeaderWhiteList;Tunnel.defaultProxyHeaderExclusiveList=defaultProxyHeaderExclusiveList;exports.Tunnel=Tunnel},{"tunnel-agent":286,url:288}],237:[function(require,module,exports){(function(process,Buffer){"use strict";var http=require("http"),https=require("https"),url=require("url"),util=require("util"),stream=require("stream"),zlib=require("zlib"),hawk=require("hawk"),aws2=require("aws-sign2"),aws4=require("aws4"),httpSignature=require("http-signature"),mime=require("mime-types"),stringstream=require("stringstream"),caseless=require("caseless"),ForeverAgent=require("forever-agent"),FormData=require("form-data"),extend=require("extend"),isstream=require("isstream"),isTypedArray=require("is-typedarray").strict,helpers=require("./lib/helpers"),cookies=require("./lib/cookies"),getProxyFromURI=require("./lib/getProxyFromURI"),Querystring=require("./lib/querystring").Querystring,Har=require("./lib/har").Har,Auth=require("./lib/auth").Auth,OAuth=require("./lib/oauth").OAuth,Multipart=require("./lib/multipart").Multipart,Redirect=require("./lib/redirect").Redirect,Tunnel=require("./lib/tunnel").Tunnel;var safeStringify=helpers.safeStringify,isReadStream=helpers.isReadStream,toBase64=helpers.toBase64,defer=helpers.defer,copy=helpers.copy,version=helpers.version,globalCookieJar=cookies.jar();var globalPool={};function filterForNonReserved(reserved,options){var object={};for(var i in options){var notReserved=reserved.indexOf(i)===-1;if(notReserved){object[i]=options[i]}}return object}function filterOutReservedFunctions(reserved,options){var object={};for(var i in options){var isReserved=!(reserved.indexOf(i)===-1);var isFunction=typeof options[i]==="function";if(!(isReserved&&isFunction)){object[i]=options[i]}}return object}function requestToJSON(){var self=this;return{uri:self.uri,method:self.method,headers:self.headers}}function responseToJSON(){var self=this;return{statusCode:self.statusCode,body:self.body,headers:self.headers,request:requestToJSON.call(self.request)}}function Request(options){var self=this;if(options.har){self._har=new Har(self);options=self._har.options(options)}stream.Stream.call(self);var reserved=Object.keys(Request.prototype);var nonReserved=filterForNonReserved(reserved,options);extend(self,nonReserved);options=filterOutReservedFunctions(reserved,options);self.readable=true;self.writable=true;if(options.method){self.explicitMethod=true}self._qs=new Querystring(self);self._auth=new Auth(self);self._oauth=new OAuth(self);self._multipart=new Multipart(self);self._redirect=new Redirect(self);self._tunnel=new Tunnel(self);self.init(options)}util.inherits(Request,stream.Stream);Request.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function debug(){if(Request.debug){console.error("REQUEST %s",util.format.apply(util,arguments))}}Request.prototype.debug=debug;Request.prototype.init=function(options){var self=this;if(!options){options={}}self.headers=self.headers?copy(self.headers):{};for(var headerName in self.headers){if(typeof self.headers[headerName]==="undefined"){delete self.headers[headerName]}}caseless.httpify(self,self.headers);if(!self.method){self.method=options.method||"GET"}if(!self.localAddress){self.localAddress=options.localAddress}self._qs.init(options);debug(options);if(!self.pool&&self.pool!==false){self.pool=globalPool}self.dests=self.dests||[];self.__isRequestRequest=true;if(!self._callback&&self.callback){self._callback=self.callback;self.callback=function(){if(self._callbackCalled){return}self._callbackCalled=true;self._callback.apply(self,arguments)};self.on("error",self.callback.bind());self.on("complete",self.callback.bind(self,null))}if(!self.uri&&self.url){self.uri=self.url;delete self.url}if(self.baseUrl){if(typeof self.baseUrl!=="string"){return self.emit("error",new Error("options.baseUrl must be a string"))}if(typeof self.uri!=="string"){return self.emit("error",new Error("options.uri must be a string when using options.baseUrl"))}if(self.uri.indexOf("//")===0||self.uri.indexOf("://")!==-1){return self.emit("error",new Error("options.uri must be a path when using options.baseUrl"))}var baseUrlEndsWithSlash=self.baseUrl.lastIndexOf("/")===self.baseUrl.length-1;var uriStartsWithSlash=self.uri.indexOf("/")===0;if(baseUrlEndsWithSlash&&uriStartsWithSlash){self.uri=self.baseUrl+self.uri.slice(1)}else if(baseUrlEndsWithSlash||uriStartsWithSlash){self.uri=self.baseUrl+self.uri}else if(self.uri===""){self.uri=self.baseUrl}else{self.uri=self.baseUrl+"/"+self.uri}delete self.baseUrl}if(!self.uri){return self.emit("error",new Error("options.uri is a required argument"))}if(typeof self.uri==="string"){self.uri=url.parse(self.uri)}if(!self.uri.href){self.uri.href=url.format(self.uri)}if(self.uri.protocol==="unix:"){return self.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"))}if(self.uri.host==="unix"){self.enableUnixSocket()}if(self.strictSSL===false){self.rejectUnauthorized=false}if(!self.uri.pathname){self.uri.pathname="/"}if(!(self.uri.host||self.uri.hostname&&self.uri.port)&&!self.uri.isUnix){var faultyUri=url.format(self.uri);var message='Invalid URI "'+faultyUri+'"';if(Object.keys(options).length===0){message+=". This can be caused by a crappy redirection."}self.abort();return self.emit("error",new Error(message))}if(!self.hasOwnProperty("proxy")){self.proxy=getProxyFromURI(self.uri)}self.tunnel=self._tunnel.isEnabled();if(self.proxy){self._tunnel.setup(options)}self._redirect.onRequest(options);self.setHost=false;if(!self.hasHeader("host")){var hostHeaderName=self.originalHostHeaderName||"host";self.setHeader(hostHeaderName,self.uri.hostname);if(self.uri.port){if(!(self.uri.port===80&&self.uri.protocol==="http:")&&!(self.uri.port===443&&self.uri.protocol==="https:")){self.setHeader(hostHeaderName,self.getHeader("host")+(":"+self.uri.port))}}self.setHost=true}self.jar(self._jar||options.jar);if(!self.uri.port){if(self.uri.protocol==="http:"){self.uri.port=80}else if(self.uri.protocol==="https:"){self.uri.port=443}}if(self.proxy&&!self.tunnel){self.port=self.proxy.port;self.host=self.proxy.hostname}else{self.port=self.uri.port;self.host=self.uri.hostname}if(options.form){self.form(options.form)}if(options.formData){var formData=options.formData;var requestForm=self.form();var appendFormValue=function(key,value){if(value&&value.hasOwnProperty("value")&&value.hasOwnProperty("options")){requestForm.append(key,value.value,value.options)}else{requestForm.append(key,value)}};for(var formKey in formData){if(formData.hasOwnProperty(formKey)){var formValue=formData[formKey];if(formValue instanceof Array){for(var j=0;j=100&&code<200||code===204||code===304};var responseContent;if(self.gzip&&!noBody(response.statusCode)){var contentEncoding=response.headers["content-encoding"]||"identity";contentEncoding=contentEncoding.trim().toLowerCase();if(contentEncoding==="gzip"){responseContent=zlib.createGunzip();response.pipe(responseContent)}else if(contentEncoding==="deflate"){responseContent=zlib.createInflate();response.pipe(responseContent)}else{if(contentEncoding!=="identity"){debug("ignoring unrecognized Content-Encoding "+contentEncoding)}responseContent=response}}else{responseContent=response}if(self.encoding){if(self.dests.length!==0){console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")}else if(responseContent.setEncoding){responseContent.setEncoding(self.encoding)}else{responseContent=responseContent.pipe(stringstream(self.encoding))}}if(self._paused){responseContent.pause()}self.responseContent=responseContent;self.emit("response",response);self.dests.forEach(function(dest){self.pipeDest(dest)});responseContent.on("data",function(chunk){if(self.timing&&!self.responseStarted){self.responseStartTime=(new Date).getTime();response.responseStartTime=self.responseStartTime}self._destdata=true;self.emit("data",chunk)});responseContent.once("end",function(chunk){self.emit("end",chunk)});responseContent.on("error",function(error){self.emit("error",error)});responseContent.on("close",function(){self.emit("close")});if(self.callback){self.readResponseBody(response)}else{self.on("end",function(){if(self._aborted){debug("aborted",self.uri.href);return}self.emit("complete",response)})}}debug("finish init function",self.uri.href)};Request.prototype.readResponseBody=function(response){var self=this;debug("reading response's body");var buffers=[],bufferLength=0,strings=[];self.on("data",function(chunk){if(!Buffer.isBuffer(chunk)){strings.push(chunk)}else if(chunk.length){bufferLength+=chunk.length;buffers.push(chunk)}});self.on("end",function(){debug("end event",self.uri.href);if(self._aborted){debug("aborted",self.uri.href);buffers=[];bufferLength=0;return}if(bufferLength){debug("has body",self.uri.href,bufferLength);response.body=Buffer.concat(buffers,bufferLength);if(self.encoding!==null){response.body=response.body.toString(self.encoding)}buffers=[];bufferLength=0}else if(strings.length){if(self.encoding==="utf8"&&strings[0].length>0&&strings[0][0]==="\ufeff"){strings[0]=strings[0].substring(1)}response.body=strings.join("")}if(self._json){try{response.body=JSON.parse(response.body,self._jsonReviver)}catch(e){debug("invalid JSON received",self.uri.href)}}debug("emitting complete",self.uri.href);if(typeof response.body==="undefined"&&!self._json){response.body=self.encoding===null?new Buffer(0):""}self.emit("complete",response,response.body)})};Request.prototype.abort=function(){var self=this;self._aborted=true;if(self.req){self.req.abort()}else if(self.response){self.response.destroy()}self.emit("abort")};Request.prototype.pipeDest=function(dest){var self=this;var response=self.response;if(dest.headers&&!dest.headersSent){if(response.caseless.has("content-type")){var ctname=response.caseless.has("content-type");if(dest.setHeader){dest.setHeader(ctname,response.headers[ctname])}else{dest.headers[ctname]=response.headers[ctname]}}if(response.caseless.has("content-length")){var clname=response.caseless.has("content-length");if(dest.setHeader){dest.setHeader(clname,response.headers[clname])}else{dest.headers[clname]=response.headers[clname]}}}if(dest.setHeader&&!dest.headersSent){for(var i in response.headers){if(!self.gzip||i!=="content-encoding"){dest.setHeader(i,response.headers[i])}}dest.statusCode=response.statusCode}if(self.pipefilter){self.pipefilter(response,dest)}};Request.prototype.qs=function(q,clobber){var self=this;var base;if(!clobber&&self.uri.query){base=self._qs.parse(self.uri.query)}else{base={}}for(var i in q){base[i]=q[i]}var qs=self._qs.stringify(base);if(qs===""){return self}self.uri=url.parse(self.uri.href.split("?")[0]+"?"+qs);self.url=self.uri;self.path=self.uri.path;if(self.uri.host==="unix"){self.enableUnixSocket()}return self};Request.prototype.form=function(form){var self=this;if(form){if(!/^application\/x-www-form-urlencoded\b/.test(self.getHeader("content-type"))){self.setHeader("content-type","application/x-www-form-urlencoded")}self.body=typeof form==="string"?self._qs.rfc3986(form.toString("utf8")):self._qs.stringify(form).toString("utf8");return self}self._form=new FormData;self._form.on("error",function(err){err.message="form-data: "+err.message;self.emit("error",err);self.abort()});return self._form};Request.prototype.multipart=function(multipart){var self=this;self._multipart.onRequest(multipart);if(!self._multipart.chunked){self.body=self._multipart.body}return self};Request.prototype.json=function(val){var self=this;if(!self.hasHeader("accept")){self.setHeader("accept","application/json")}if(typeof self.jsonReplacer==="function"){self._jsonReplacer=self.jsonReplacer}self._json=true;if(typeof val==="boolean"){if(self.body!==undefined){if(!/^application\/x-www-form-urlencoded\b/.test(self.getHeader("content-type"))){self.body=safeStringify(self.body,self._jsonReplacer)}else{self.body=self._qs.rfc3986(self.body)}if(!self.hasHeader("content-type")){self.setHeader("content-type","application/json")}}}else{self.body=safeStringify(val,self._jsonReplacer);if(!self.hasHeader("content-type")){self.setHeader("content-type","application/json")}}if(typeof self.jsonReviver==="function"){self._jsonReviver=self.jsonReviver}return self};Request.prototype.getHeader=function(name,headers){var self=this;var result,re,match;if(!headers){headers=self.headers}Object.keys(headers).forEach(function(key){if(key.length!==name.length){return}re=new RegExp(name,"i");match=key.match(re);if(match){result=headers[key]}});return result};Request.prototype.enableUnixSocket=function(){var unixParts=this.uri.path.split(":"),host=unixParts[0],path=unixParts[1];this.socketPath=host;this.uri.pathname=path;this.uri.path=path;this.uri.host=host;this.uri.hostname=host;this.uri.isUnix=true};Request.prototype.auth=function(user,pass,sendImmediately,bearer){var self=this;self._auth.onRequest(user,pass,sendImmediately,bearer);return self};Request.prototype.aws=function(opts,now){var self=this;if(!now){self._aws=opts;return self}if(opts.sign_version==4||opts.sign_version=="4"){var options={host:self.uri.host,path:self.uri.path,method:self.method,headers:{"content-type":self.getHeader("content-type")||""},body:self.body};var signRes=aws4.sign(options,{accessKeyId:opts.key,secretAccessKey:opts.secret,sessionToken:opts.session});self.setHeader("authorization",signRes.headers.Authorization);self.setHeader("x-amz-date",signRes.headers["X-Amz-Date"]);if(signRes.headers["X-Amz-Security-Token"]){self.setHeader("x-amz-security-token",signRes.headers["X-Amz-Security-Token"])}}else{var date=new Date;self.setHeader("date",date.toUTCString());var auth={key:opts.key,secret:opts.secret,verb:self.method.toUpperCase(),date:date,contentType:self.getHeader("content-type")||"",md5:self.getHeader("content-md5")||"",amazonHeaders:aws2.canonicalizeHeaders(self.headers)};var path=self.uri.path;if(opts.bucket&&path){auth.resource="/"+opts.bucket+path}else if(opts.bucket&&!path){auth.resource="/"+opts.bucket}else if(!opts.bucket&&path){auth.resource=path}else if(!opts.bucket&&!path){auth.resource="/"}auth.resource=aws2.canonicalizeResource(auth.resource);self.setHeader("authorization",aws2.authorization(auth))}return self};Request.prototype.httpSignature=function(opts){var self=this;httpSignature.signRequest({getHeader:function(header){return self.getHeader(header,self.headers)},setHeader:function(header,value){self.setHeader(header,value)},method:self.method,path:self.path},opts);debug("httpSignature authorization",self.getHeader("authorization"));return self};Request.prototype.hawk=function(opts){var self=this;self.setHeader("Authorization",hawk.client.header(self.uri,self.method,opts).field)};Request.prototype.oauth=function(_oauth){var self=this;self._oauth.onRequest(_oauth);return self};Request.prototype.jar=function(jar){var self=this;var cookies;if(self._redirect.redirectsFollowed===0){self.originalCookieHeader=self.getHeader("cookie")}if(!jar){cookies=false;self._disableCookies=true}else{var targetCookieJar=jar&&jar.getCookieString?jar:globalCookieJar;var urihref=self.uri.href;if(targetCookieJar){cookies=targetCookieJar.getCookieString(urihref)}}if(cookies&&cookies.length){if(self.originalCookieHeader){self.setHeader("cookie",self.originalCookieHeader+"; "+cookies)}else{self.setHeader("cookie",cookies)}}self._jar=jar;return self};Request.prototype.pipe=function(dest,opts){var self=this;if(self.response){if(self._destdata){self.emit("error",new Error("You cannot pipe after data has been emitted from the response."))}else if(self._ended){self.emit("error",new Error("You cannot pipe after the response has been ended."))}else{stream.Stream.prototype.pipe.call(self,dest,opts);self.pipeDest(dest);return dest}}else{self.dests.push(dest);stream.Stream.prototype.pipe.call(self,dest,opts);return dest}};Request.prototype.write=function(){var self=this;if(self._aborted){ -return}if(!self._started){self.start()}if(self.req){return self.req.write.apply(self.req,arguments)}};Request.prototype.end=function(chunk){var self=this;if(self._aborted){return}if(chunk){self.write(chunk)}if(!self._started){self.start()}if(self.req){self.req.end()}};Request.prototype.pause=function(){var self=this;if(!self.responseContent){self._paused=true}else{self.responseContent.pause.apply(self.responseContent,arguments)}};Request.prototype.resume=function(){var self=this;if(!self.responseContent){self._paused=false}else{self.responseContent.resume.apply(self.responseContent,arguments)}};Request.prototype.destroy=function(){var self=this;if(!self._ended){self.end()}else if(self.response){self.response.destroy()}};Request.defaultProxyHeaderWhiteList=Tunnel.defaultProxyHeaderWhiteList.slice();Request.defaultProxyHeaderExclusiveList=Tunnel.defaultProxyHeaderExclusiveList.slice();Request.prototype.toJSON=requestToJSON;module.exports=Request}).call(this,require("_process"),require("buffer").Buffer)},{"./lib/auth":227,"./lib/cookies":228,"./lib/getProxyFromURI":229,"./lib/har":230,"./lib/helpers":231,"./lib/multipart":232,"./lib/oauth":233,"./lib/querystring":234,"./lib/redirect":235,"./lib/tunnel":236,_process:198,"aws-sign2":30,aws4:31,buffer:67,caseless:69,extend:112,"forever-agent":114,"form-data":115,hawk:143,http:272,"http-signature":144,https:149,"is-typedarray":157,isstream:159,"mime-types":174,stream:271,stringstream:277,url:288,util:293,zlib:63}],238:[function(require,module,exports){(function(Buffer){var zl=[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];var zr=[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];var sl=[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];var sr=[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];var hl=[0,1518500249,1859775393,2400959708,2840853838];var hr=[1352829926,1548603684,1836072691,2053994217,0];function bytesToWords(bytes){var words=[];for(var i=0,b=0;i>>5]|=bytes[i]<<24-b%32}return words}function wordsToBytes(words){var bytes=[];for(var b=0;b>>5]>>>24-b%32&255)}return bytes}function processBlock(H,M,offset){for(var i=0;i<16;i++){var offset_i=offset+i;var M_offset_i=M[offset_i];M[offset_i]=(M_offset_i<<8|M_offset_i>>>24)&16711935|(M_offset_i<<24|M_offset_i>>>8)&4278255360}var al,bl,cl,dl,el;var ar,br,cr,dr,er;ar=al=H[0];br=bl=H[1];cr=cl=H[2];dr=dl=H[3];er=el=H[4];var t;for(i=0;i<80;i+=1){t=al+M[offset+zl[i]]|0;if(i<16){t+=f1(bl,cl,dl)+hl[0]}else if(i<32){t+=f2(bl,cl,dl)+hl[1]}else if(i<48){t+=f3(bl,cl,dl)+hl[2]}else if(i<64){t+=f4(bl,cl,dl)+hl[3]}else{t+=f5(bl,cl,dl)+hl[4]}t=t|0;t=rotl(t,sl[i]);t=t+el|0;al=el;el=dl;dl=rotl(cl,10);cl=bl;bl=t;t=ar+M[offset+zr[i]]|0;if(i<16){t+=f5(br,cr,dr)+hr[0]}else if(i<32){t+=f4(br,cr,dr)+hr[1]}else if(i<48){t+=f3(br,cr,dr)+hr[2]}else if(i<64){t+=f2(br,cr,dr)+hr[3]}else{t+=f1(br,cr,dr)+hr[4]}t=t|0;t=rotl(t,sr[i]);t=t+er|0;ar=er;er=dr;dr=rotl(cr,10);cr=br;br=t}t=H[1]+cl+dr|0;H[1]=H[2]+dl+er|0;H[2]=H[3]+el+ar|0;H[3]=H[4]+al+br|0;H[4]=H[0]+bl+cr|0;H[0]=t}function f1(x,y,z){return x^y^z}function f2(x,y,z){return x&y|~x&z}function f3(x,y,z){return(x|~y)^z}function f4(x,y,z){return x&z|y&~z}function f5(x,y,z){return x^(y|~z)}function rotl(x,n){return x<>>32-n}function ripemd160(message){var H=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof message==="string"){message=new Buffer(message,"utf8")}var m=bytesToWords(message);var nBitsLeft=message.length*8;var nBitsTotal=message.length*8;m[nBitsLeft>>>5]|=128<<24-nBitsLeft%32;m[(nBitsLeft+64>>>9<<4)+14]=(nBitsTotal<<8|nBitsTotal>>>24)&16711935|(nBitsTotal<<24|nBitsTotal>>>8)&4278255360;for(var i=0;i>>24)&16711935|(H_i<<24|H_i>>>8)&4278255360}var digestbytes=wordsToBytes(H);return new Buffer(digestbytes)}module.exports=ripemd160}).call(this,require("buffer").Buffer)},{buffer:67}],239:[function(require,module,exports){(function(Buffer){function Hash(blockSize,finalSize){this._block=new Buffer(blockSize);this._finalSize=finalSize;this._blockSize=blockSize;this._len=0;this._s=0}Hash.prototype.update=function(data,enc){if(typeof data==="string"){enc=enc||"utf8";data=new Buffer(data,enc)}var l=this._len+=data.length;var s=this._s||0;var f=0;var buffer=this._block;while(s=this._finalSize*8){this._update(this._block);this._block.fill(0)}this._block.writeInt32BE(l,this._blockSize-4);var hash=this._update(this._block)||this._hash();return enc?hash.toString(enc):hash};Hash.prototype._update=function(){throw new Error("_update must be implemented by subclass")};module.exports=Hash}).call(this,require("buffer").Buffer)},{buffer:67}],240:[function(require,module,exports){var exports=module.exports=function SHA(algorithm){algorithm=algorithm.toLowerCase();var Algorithm=exports[algorithm];if(!Algorithm)throw new Error(algorithm+" is not supported (we accept pull requests)");return new Algorithm};exports.sha=require("./sha");exports.sha1=require("./sha1");exports.sha224=require("./sha224");exports.sha256=require("./sha256");exports.sha384=require("./sha384");exports.sha512=require("./sha512")},{"./sha":241,"./sha1":242,"./sha224":243,"./sha256":244,"./sha384":245,"./sha512":246}],241:[function(require,module,exports){(function(Buffer){var inherits=require("inherits");var Hash=require("./hash");var K=[1518500249,1859775393,2400959708|0,3395469782|0];var W=new Array(80);function Sha(){this.init();this._w=W;Hash.call(this,64,56)}inherits(Sha,Hash);Sha.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function rotl5(num){return num<<5|num>>>27}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){if(s===0)return b&c|~b&d;if(s===2)return b&c|b&d|c&d;return b^c^d}Sha.prototype._update=function(M){var W=this._w;var a=this._a|0;var b=this._b|0;var c=this._c|0;var d=this._d|0;var e=this._e|0;for(var i=0;i<16;++i)W[i]=M.readInt32BE(i*4);for(;i<80;++i)W[i]=W[i-3]^W[i-8]^W[i-14]^W[i-16];for(var j=0;j<80;++j){var s=~~(j/20);var t=rotl5(a)+ft(s,b,c,d)+e+W[j]+K[s]|0;e=d;d=c;c=rotl30(b);b=a;a=t}this._a=a+this._a|0;this._b=b+this._b|0;this._c=c+this._c|0;this._d=d+this._d|0;this._e=e+this._e|0};Sha.prototype._hash=function(){var H=new Buffer(20);H.writeInt32BE(this._a|0,0);H.writeInt32BE(this._b|0,4);H.writeInt32BE(this._c|0,8);H.writeInt32BE(this._d|0,12);H.writeInt32BE(this._e|0,16);return H};module.exports=Sha}).call(this,require("buffer").Buffer)},{"./hash":239,buffer:67,inherits:152}],242:[function(require,module,exports){(function(Buffer){var inherits=require("inherits");var Hash=require("./hash");var K=[1518500249,1859775393,2400959708|0,3395469782|0];var W=new Array(80);function Sha1(){this.init();this._w=W;Hash.call(this,64,56)}inherits(Sha1,Hash);Sha1.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function rotl1(num){return num<<1|num>>>31}function rotl5(num){return num<<5|num>>>27}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){if(s===0)return b&c|~b&d;if(s===2)return b&c|b&d|c&d;return b^c^d}Sha1.prototype._update=function(M){var W=this._w;var a=this._a|0;var b=this._b|0;var c=this._c|0;var d=this._d|0;var e=this._e|0;for(var i=0;i<16;++i)W[i]=M.readInt32BE(i*4);for(;i<80;++i)W[i]=rotl1(W[i-3]^W[i-8]^W[i-14]^W[i-16]);for(var j=0;j<80;++j){var s=~~(j/20);var t=rotl5(a)+ft(s,b,c,d)+e+W[j]+K[s]|0;e=d;d=c;c=rotl30(b);b=a;a=t}this._a=a+this._a|0;this._b=b+this._b|0;this._c=c+this._c|0;this._d=d+this._d|0;this._e=e+this._e|0};Sha1.prototype._hash=function(){var H=new Buffer(20);H.writeInt32BE(this._a|0,0);H.writeInt32BE(this._b|0,4);H.writeInt32BE(this._c|0,8);H.writeInt32BE(this._d|0,12);H.writeInt32BE(this._e|0,16);return H};module.exports=Sha1}).call(this,require("buffer").Buffer)},{"./hash":239,buffer:67,inherits:152}],243:[function(require,module,exports){(function(Buffer){var inherits=require("inherits");var Sha256=require("./sha256");var Hash=require("./hash");var W=new Array(64);function Sha224(){this.init();this._w=W;Hash.call(this,64,56)}inherits(Sha224,Sha256);Sha224.prototype.init=function(){this._a=3238371032;this._b=914150663;this._c=812702999;this._d=4144912697;this._e=4290775857;this._f=1750603025;this._g=1694076839;this._h=3204075428;return this};Sha224.prototype._hash=function(){var H=new Buffer(28);H.writeInt32BE(this._a,0);H.writeInt32BE(this._b,4);H.writeInt32BE(this._c,8);H.writeInt32BE(this._d,12);H.writeInt32BE(this._e,16);H.writeInt32BE(this._f,20);H.writeInt32BE(this._g,24);return H};module.exports=Sha224}).call(this,require("buffer").Buffer)},{"./hash":239,"./sha256":244,buffer:67,inherits:152}],244:[function(require,module,exports){(function(Buffer){var inherits=require("inherits");var Hash=require("./hash");var K=[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];var W=new Array(64);function Sha256(){this.init();this._w=W;Hash.call(this,64,56)}inherits(Sha256,Hash);Sha256.prototype.init=function(){this._a=1779033703;this._b=3144134277;this._c=1013904242;this._d=2773480762;this._e=1359893119;this._f=2600822924;this._g=528734635;this._h=1541459225;return this};function ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function sigma1(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function gamma0(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}function gamma1(x){return(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10}Sha256.prototype._update=function(M){var W=this._w;var a=this._a|0;var b=this._b|0;var c=this._c|0;var d=this._d|0;var e=this._e|0;var f=this._f|0;var g=this._g|0;var h=this._h|0;for(var i=0;i<16;++i)W[i]=M.readInt32BE(i*4);for(;i<64;++i)W[i]=gamma1(W[i-2])+W[i-7]+gamma0(W[i-15])+W[i-16]|0;for(var j=0;j<64;++j){var T1=h+sigma1(e)+ch(e,f,g)+K[j]+W[j]|0;var T2=sigma0(a)+maj(a,b,c)|0;h=g;g=f;f=e;e=d+T1|0;d=c;c=b;b=a;a=T1+T2|0}this._a=a+this._a|0;this._b=b+this._b|0;this._c=c+this._c|0;this._d=d+this._d|0;this._e=e+this._e|0;this._f=f+this._f|0;this._g=g+this._g|0;this._h=h+this._h|0};Sha256.prototype._hash=function(){var H=new Buffer(32);H.writeInt32BE(this._a,0);H.writeInt32BE(this._b,4);H.writeInt32BE(this._c,8);H.writeInt32BE(this._d,12);H.writeInt32BE(this._e,16);H.writeInt32BE(this._f,20);H.writeInt32BE(this._g,24);H.writeInt32BE(this._h,28);return H};module.exports=Sha256}).call(this,require("buffer").Buffer)},{"./hash":239,buffer:67,inherits:152}],245:[function(require,module,exports){(function(Buffer){var inherits=require("inherits");var SHA512=require("./sha512");var Hash=require("./hash");var W=new Array(160);function Sha384(){this.init();this._w=W;Hash.call(this,128,112)}inherits(Sha384,SHA512);Sha384.prototype.init=function(){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;return this};Sha384.prototype._hash=function(){var H=new Buffer(48);function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset);H.writeInt32BE(l,offset+4)}writeInt64BE(this._ah,this._al,0);writeInt64BE(this._bh,this._bl,8);writeInt64BE(this._ch,this._cl,16);writeInt64BE(this._dh,this._dl,24);writeInt64BE(this._eh,this._el,32);writeInt64BE(this._fh,this._fl,40);return H};module.exports=Sha384}).call(this,require("buffer").Buffer)},{"./hash":239,"./sha512":246,buffer:67,inherits:152}],246:[function(require,module,exports){(function(Buffer){var inherits=require("inherits");var Hash=require("./hash");var K=[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];var W=new Array(160);function Sha512(){this.init();this._w=W;Hash.call(this,128,112)}inherits(Sha512,Hash);Sha512.prototype.init=function(){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;return this};function Ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x,xl){return(x>>>28|xl<<4)^(xl>>>2|x<<30)^(xl>>>7|x<<25)}function sigma1(x,xl){return(x>>>14|xl<<18)^(x>>>18|xl<<14)^(xl>>>9|x<<23)}function Gamma0(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^x>>>7}function Gamma0l(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^(x>>>7|xl<<25)}function Gamma1(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^x>>>6}function Gamma1l(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^(x>>>6|xl<<26)}function getCarry(a,b){return a>>>0>>0?1:0}Sha512.prototype._update=function(M){var W=this._w;var ah=this._ah|0;var bh=this._bh|0;var ch=this._ch|0;var dh=this._dh|0;var eh=this._eh|0;var fh=this._fh|0;var gh=this._gh|0;var hh=this._hh|0;var al=this._al|0;var bl=this._bl|0;var cl=this._cl|0;var dl=this._dl|0;var el=this._el|0;var fl=this._fl|0;var gl=this._gl|0;var hl=this._hl|0;for(var i=0;i<32;i+=2){W[i]=M.readInt32BE(i*4);W[i+1]=M.readInt32BE(i*4+4)}for(;i<160;i+=2){var xh=W[i-15*2];var xl=W[i-15*2+1];var gamma0=Gamma0(xh,xl);var gamma0l=Gamma0l(xl,xh);xh=W[i-2*2];xl=W[i-2*2+1];var gamma1=Gamma1(xh,xl);var gamma1l=Gamma1l(xl,xh);var Wi7h=W[i-7*2];var Wi7l=W[i-7*2+1];var Wi16h=W[i-16*2];var Wi16l=W[i-16*2+1];var Wil=gamma0l+Wi7l|0;var Wih=gamma0+Wi7h+getCarry(Wil,gamma0l)|0;Wil=Wil+gamma1l|0;Wih=Wih+gamma1+getCarry(Wil,gamma1l)|0;Wil=Wil+Wi16l|0;Wih=Wih+Wi16h+getCarry(Wil,Wi16l)|0;W[i]=Wih;W[i+1]=Wil}for(var j=0;j<160;j+=2){Wih=W[j];Wil=W[j+1];var majh=maj(ah,bh,ch);var majl=maj(al,bl,cl);var sigma0h=sigma0(ah,al);var sigma0l=sigma0(al,ah);var sigma1h=sigma1(eh,el);var sigma1l=sigma1(el,eh);var Kih=K[j];var Kil=K[j+1];var chh=Ch(eh,fh,gh);var chl=Ch(el,fl,gl);var t1l=hl+sigma1l|0;var t1h=hh+sigma1h+getCarry(t1l,hl)|0;t1l=t1l+chl|0;t1h=t1h+chh+getCarry(t1l,chl)|0;t1l=t1l+Kil|0;t1h=t1h+Kih+getCarry(t1l,Kil)|0;t1l=t1l+Wil|0;t1h=t1h+Wih+getCarry(t1l,Wil)|0;var t2l=sigma0l+majl|0;var t2h=sigma0h+majh+getCarry(t2l,sigma0l)|0;hh=gh;hl=gl;gh=fh;gl=fl;fh=eh;fl=el;el=dl+t1l|0;eh=dh+t1h+getCarry(el,dl)|0;dh=ch;dl=cl;ch=bh;cl=bl;bh=ah;bl=al;al=t1l+t2l|0;ah=t1h+t2h+getCarry(al,t1l)|0}this._al=this._al+al|0;this._bl=this._bl+bl|0;this._cl=this._cl+cl|0;this._dl=this._dl+dl|0;this._el=this._el+el|0;this._fl=this._fl+fl|0;this._gl=this._gl+gl|0;this._hl=this._hl+hl|0;this._ah=this._ah+ah+getCarry(this._al,al)|0;this._bh=this._bh+bh+getCarry(this._bl,bl)|0;this._ch=this._ch+ch+getCarry(this._cl,cl)|0;this._dh=this._dh+dh+getCarry(this._dl,dl)|0;this._eh=this._eh+eh+getCarry(this._el,el)|0;this._fh=this._fh+fh+getCarry(this._fl,fl)|0;this._gh=this._gh+gh+getCarry(this._gl,gl)|0;this._hh=this._hh+hh+getCarry(this._hl,hl)|0};Sha512.prototype._hash=function(){var H=new Buffer(64);function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset);H.writeInt32BE(l,offset+4)}writeInt64BE(this._ah,this._al,0);writeInt64BE(this._bh,this._bl,8);writeInt64BE(this._ch,this._cl,16);writeInt64BE(this._dh,this._dl,24);writeInt64BE(this._eh,this._el,32);writeInt64BE(this._fh,this._fl,40);writeInt64BE(this._gh,this._gl,48);writeInt64BE(this._hh,this._hl,56);return H};module.exports=Sha512}).call(this,require("buffer").Buffer)},{"./hash":239,buffer:67,inherits:152}],247:[function(require,module,exports){(function(Buffer){var algInfo={dsa:{parts:["p","q","g","y"],sizePart:"p"},rsa:{parts:["e","n"],sizePart:"n"},ecdsa:{parts:["curve","Q"],sizePart:"Q"},ed25519:{parts:["R"],normalize:false,sizePart:"R"}};algInfo["curve25519"]=algInfo["ed25519"];var algPrivInfo={dsa:{parts:["p","q","g","y","x"]},rsa:{parts:["n","e","d","iqmp","p","q"]},ecdsa:{parts:["curve","Q","d"]},ed25519:{parts:["R","r"],normalize:false}};algPrivInfo["curve25519"]=algPrivInfo["ed25519"];var hashAlgs={md5:true,sha1:true,sha256:true,sha384:true,sha512:true};var curves={nistp256:{size:256,pkcs8oid:"1.2.840.10045.3.1.7",p:new Buffer(("00"+"ffffffff 00000001 00000000 00000000"+"00000000 ffffffff ffffffff ffffffff").replace(/ /g,""),"hex"),a:new Buffer(("00"+"FFFFFFFF 00000001 00000000 00000000"+"00000000 FFFFFFFF FFFFFFFF FFFFFFFC").replace(/ /g,""),"hex"),b:new Buffer(("5ac635d8 aa3a93e7 b3ebbd55 769886bc"+"651d06b0 cc53b0f6 3bce3c3e 27d2604b").replace(/ /g,""),"hex"),s:new Buffer(("00"+"c49d3608 86e70493 6a6678e1 139d26b7"+"819f7e90").replace(/ /g,""),"hex"),n:new Buffer(("00"+"ffffffff 00000000 ffffffff ffffffff"+"bce6faad a7179e84 f3b9cac2 fc632551").replace(/ /g,""),"hex"),G:new Buffer(("04"+"6b17d1f2 e12c4247 f8bce6e5 63a440f2"+"77037d81 2deb33a0 f4a13945 d898c296"+"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16"+"2bce3357 6b315ece cbb64068 37bf51f5").replace(/ /g,""),"hex")},nistp384:{size:384,pkcs8oid:"1.3.132.0.34",p:new Buffer(("00"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff fffffffe"+"ffffffff 00000000 00000000 ffffffff").replace(/ /g,""),"hex"),a:new Buffer(("00"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE"+"FFFFFFFF 00000000 00000000 FFFFFFFC").replace(/ /g,""),"hex"),b:new Buffer(("b3312fa7 e23ee7e4 988e056b e3f82d19"+"181d9c6e fe814112 0314088f 5013875a"+"c656398d 8a2ed19d 2a85c8ed d3ec2aef").replace(/ /g,""),"hex"),s:new Buffer(("00"+"a335926a a319a27a 1d00896a 6773a482"+"7acdac73").replace(/ /g,""),"hex"),n:new Buffer(("00"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff c7634d81 f4372ddf"+"581a0db2 48b0a77a ecec196a ccc52973").replace(/ /g,""),"hex"),G:new Buffer(("04"+"aa87ca22 be8b0537 8eb1c71e f320ad74"+"6e1d3b62 8ba79b98 59f741e0 82542a38"+"5502f25d bf55296c 3a545e38 72760ab7"+"3617de4a 96262c6f 5d9e98bf 9292dc29"+"f8f41dbd 289a147c e9da3113 b5f0b8c0"+"0a60b1ce 1d7e819d 7a431d7c 90ea0e5f").replace(/ /g,""),"hex")},nistp521:{size:521,pkcs8oid:"1.3.132.0.35",p:new Buffer(("01ffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff ffffffff"+"ffff").replace(/ /g,""),"hex"),a:new Buffer(("01FF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC").replace(/ /g,""),"hex"),b:new Buffer(("51"+"953eb961 8e1c9a1f 929a21a0 b68540ee"+"a2da725b 99b315f3 b8b48991 8ef109e1"+"56193951 ec7e937b 1652c0bd 3bb1bf07"+"3573df88 3d2c34f1 ef451fd4 6b503f00").replace(/ /g,""),"hex"),s:new Buffer(("00"+"d09e8800 291cb853 96cc6717 393284aa"+"a0da64ba").replace(/ /g,""),"hex"),n:new Buffer(("01ff"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff fffffffa"+"51868783 bf2f966b 7fcc0148 f709a5d0"+"3bb5c9b8 899c47ae bb6fb71e 91386409").replace(/ /g,""),"hex"),G:new Buffer(("04"+"00c6 858e06b7 0404e9cd 9e3ecb66 2395b442"+"9c648139 053fb521 f828af60 6b4d3dba"+"a14b5e77 efe75928 fe1dc127 a2ffa8de"+"3348b3c1 856a429b f97e7e31 c2e5bd66"+"0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9"+"98f54449 579b4468 17afbd17 273e662c"+"97ee7299 5ef42640 c550b901 3fad0761"+"353c7086 a272c240 88be9476 9fd16650").replace(/ /g,""),"hex")}};module.exports={info:algInfo,privInfo:algPrivInfo,hashAlgs:hashAlgs,curves:curves}}).call(this,require("buffer").Buffer)},{buffer:67}],248:[function(require,module,exports){(function(Buffer){module.exports=Certificate;var assert=require("assert-plus");var algs=require("./algs");var crypto=require("crypto");var Fingerprint=require("./fingerprint");var Signature=require("./signature");var errs=require("./errors");var util=require("util");var utils=require("./utils");var Key=require("./key");var PrivateKey=require("./private-key");var Identity=require("./identity");var formats={};formats["openssh"]=require("./formats/openssh-cert");formats["x509"]=require("./formats/x509");formats["pem"]=require("./formats/x509-pem");var CertificateParseError=errs.CertificateParseError;var InvalidAlgorithmError=errs.InvalidAlgorithmError;function Certificate(opts){assert.object(opts,"options");assert.arrayOfObject(opts.subjects,"options.subjects");utils.assertCompatible(opts.subjects[0],Identity,[1,0],"options.subjects");utils.assertCompatible(opts.subjectKey,Key,[1,0],"options.subjectKey");utils.assertCompatible(opts.issuer,Identity,[1,0],"options.issuer");if(opts.issuerKey!==undefined){utils.assertCompatible(opts.issuerKey,Key,[1,0],"options.issuerKey")}assert.object(opts.signatures,"options.signatures");assert.buffer(opts.serial,"options.serial");assert.date(opts.validFrom,"options.validFrom");assert.date(opts.validUntil,"optons.validUntil");this._hashCache={};this.subjects=opts.subjects;this.issuer=opts.issuer;this.subjectKey=opts.subjectKey;this.issuerKey=opts.issuerKey;this.signatures=opts.signatures;this.serial=opts.serial;this.validFrom=opts.validFrom;this.validUntil=opts.validUntil}Certificate.formats=formats;Certificate.prototype.toBuffer=function(format,options){if(format===undefined)format="x509";assert.string(format,"format");assert.object(formats[format],"formats[format]");assert.optionalObject(options,"options");return formats[format].write(this,options)};Certificate.prototype.toString=function(format,options){if(format===undefined)format="pem";return this.toBuffer(format,options).toString()};Certificate.prototype.fingerprint=function(algo){if(algo===undefined)algo="sha256";assert.string(algo,"algorithm");var opts={type:"certificate",hash:this.hash(algo),algorithm:algo};return new Fingerprint(opts)};Certificate.prototype.hash=function(algo){assert.string(algo,"algorithm");algo=algo.toLowerCase();if(algs.hashAlgs[algo]===undefined)throw new InvalidAlgorithmError(algo);if(this._hashCache[algo])return this._hashCache[algo];var hash=crypto.createHash(algo).update(this.toBuffer("x509")).digest();this._hashCache[algo]=hash;return hash};Certificate.prototype.isExpired=function(when){if(when===undefined)when=new Date;return!(when.getTime()>=this.validFrom.getTime()&&when.getTime()2){alg="md5";if(parts[0].toLowerCase()==="md5")parts=parts.slice(1);parts=parts.join("");var md5RE=/^[a-fA-F0-9]+$/;if(!md5RE.test(parts))throw new FingerprintFormatError(fp);try{hash=new Buffer(parts,"hex")}catch(e){throw new FingerprintFormatError(fp)}}if(alg===undefined)throw new FingerprintFormatError(fp);if(algs.hashAlgs[alg]===undefined)throw new InvalidAlgorithmError(alg);if(enAlgs!==undefined){enAlgs=enAlgs.map(function(a){return a.toLowerCase()});if(enAlgs.indexOf(alg)===-1)throw new InvalidAlgorithmError(alg)}return new Fingerprint({algorithm:alg,hash:hash,type:options.type||"key"})};function addColons(s){return s.replace(/(.{2})(?=.)/g,"$1:")}function base64Strip(s){return s.replace(/=*$/,"")}function sshBase64Format(alg,h){return alg.toUpperCase()+":"+base64Strip(h)}Fingerprint.isFingerprint=function(obj,ver){return utils.isCompatible(obj,Fingerprint,ver)};Fingerprint.prototype._sshpkApiVersion=[1,1];Fingerprint._oldVersionDetect=function(obj){assert.func(obj.toString);assert.func(obj.matches);return[1,0]}}).call(this,require("buffer").Buffer)},{"./algs":247,"./certificate":248,"./errors":251,"./key":265,"./utils":269,"assert-plus":270,buffer:67,crypto:78}],253:[function(require,module,exports){(function(Buffer){module.exports={read:read,write:write};var assert=require("assert-plus");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var pem=require("./pem");var ssh=require("./ssh");var rfc4253=require("./rfc4253");function read(buf,options){if(typeof buf==="string"){if(buf.trim().match(/^[-]+[ ]*BEGIN/))return pem.read(buf,options);if(buf.match(/^\s*ssh-[a-z]/))return ssh.read(buf,options);if(buf.match(/^\s*ecdsa-/))return ssh.read(buf,options);buf=new Buffer(buf,"binary")}else{assert.buffer(buf);if(findPEMHeader(buf))return pem.read(buf,options);if(findSSHHeader(buf))return ssh.read(buf,options)}if(buf.readUInt32BE(0)buf.length||buf.slice(offset,offset+5).toString("ascii")!=="BEGIN")return false;return true}function write(key,options){throw new Error('"auto" format cannot be used for writing')}}).call(this,require("buffer").Buffer)},{"../key":265,"../private-key":266,"../utils":269,"./pem":255,"./rfc4253":258,"./ssh":260,"assert-plus":270,buffer:67}],254:[function(require,module,exports){(function(Buffer){module.exports={read:read,verify:verify,sign:sign,write:write,fromBuffer:fromBuffer,toBuffer:toBuffer};var assert=require("assert-plus");var SSHBuffer=require("../ssh-buffer");var crypto=require("crypto");var algs=require("../algs");var Key=require("../key");var PrivateKey=require("../private-key");var Identity=require("../identity");var rfc4253=require("./rfc4253");var Signature=require("../signature");var utils=require("../utils");var Certificate=require("../certificate");function verify(cert,key){return false}var TYPES={user:1,host:2};Object.keys(TYPES).forEach(function(k){TYPES[TYPES[k]]=k});var ECDSA_ALGO=/^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/;function read(buf,options){if(Buffer.isBuffer(buf))buf=buf.toString("ascii");var parts=buf.trim().split(/[ \t\n]+/g);if(parts.length<2||parts.length>3)throw new Error("Not a valid SSH certificate line");var algo=parts[0];var data=parts[1];data=new Buffer(data,"base64");return fromBuffer(data,algo)}function fromBuffer(data,algo,partial){var sshbuf=new SSHBuffer({buffer:data});var innerAlgo=sshbuf.readString();if(algo!==undefined&&innerAlgo!==algo)throw new Error("SSH certificate algorithm mismatch");if(algo===undefined)algo=innerAlgo;var cert={};cert.signatures={};cert.signatures.openssh={};cert.signatures.openssh.nonce=sshbuf.readBuffer();var key={};var parts=key.parts=[];key.type=getAlg(algo);var partCount=algs.info[key.type].parts.length;while(parts.length=1,"key must have at least one part");var algInfo=algs.info[key.type];if(key.type==="ecdsa"){var res=ECDSA_ALGO.exec(algo);assert.ok(res!==null);assert.strictEqual(res[1],parts[0].data.toString())}for(var i=0;itmp.length)limit=tmp.length;o+=buf.write(tmp.slice(i,limit),o);buf[o++]=10;i=limit}o+=buf.write("-----END "+header+"-----\n",o);return buf.slice(0,o)}}).call(this,require("buffer").Buffer)},{"../algs":247,"../errors":251,"../key":265,"../private-key":266,"../utils":269,"./pkcs1":256,"./pkcs8":257,"./rfc4253":258,"./ssh-private":259,asn1:27,"assert-plus":270,buffer:67,crypto:78}],256:[function(require,module,exports){(function(Buffer){module.exports={read:read,readPkcs1:readPkcs1,write:write,writePkcs1:writePkcs1};var assert=require("assert-plus");var asn1=require("asn1");var algs=require("../algs");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var pem=require("./pem");var pkcs8=require("./pkcs8");var readECDSACurve=pkcs8.readECDSACurve;function read(buf,options){return pem.read(buf,options,"pkcs1")}function write(key,options){return pem.write(key,options,"pkcs1")}function readMPInt(der,nm){assert.strictEqual(der.peek(),asn1.Ber.Integer,nm+" is not an Integer");return utils.mpNormalize(der.readString(asn1.Ber.Integer,true))}function readPkcs1(alg,type,der){switch(alg){case"RSA":if(type==="public")return readPkcs1RSAPublic(der);else if(type==="private")return readPkcs1RSAPrivate(der);throw new Error("Unknown key type: "+type);case"DSA":if(type==="public")return readPkcs1DSAPublic(der);else if(type==="private")return readPkcs1DSAPrivate(der);throw new Error("Unknown key type: "+type);case"EC":case"ECDSA":if(type==="private")return readPkcs1ECDSAPrivate(der);else if(type==="public")return readPkcs1ECDSAPublic(der);throw new Error("Unknown key type: "+type);default:throw new Error("Unknown key algo: "+alg)}}function readPkcs1RSAPublic(der){var n=readMPInt(der,"modulus");var e=readMPInt(der,"exponent");var key={type:"rsa",parts:[{name:"e",data:e},{name:"n",data:n}]};return new Key(key)}function readPkcs1RSAPrivate(der){var version=readMPInt(der,"version");assert.strictEqual(version[0],0);var n=readMPInt(der,"modulus");var e=readMPInt(der,"public exponent");var d=readMPInt(der,"private exponent");var p=readMPInt(der,"prime1");var q=readMPInt(der,"prime2");var dmodp=readMPInt(der,"exponent1");var dmodq=readMPInt(der,"exponent2");var iqmp=readMPInt(der,"iqmp");var key={type:"rsa",parts:[{name:"n",data:n},{name:"e",data:e},{name:"d",data:d},{name:"iqmp",data:iqmp},{name:"p",data:p},{name:"q",data:q},{name:"dmodp",data:dmodp},{name:"dmodq",data:dmodq}]};return new PrivateKey(key)}function readPkcs1DSAPrivate(der){var version=readMPInt(der,"version");assert.strictEqual(version.readUInt8(0),0);var p=readMPInt(der,"p");var q=readMPInt(der,"q");var g=readMPInt(der,"g");var y=readMPInt(der,"y");var x=readMPInt(der,"x");var key={type:"dsa",parts:[{name:"p",data:p},{name:"q",data:q},{name:"g",data:g},{name:"y",data:y},{name:"x",data:x}]};return new PrivateKey(key)}function readPkcs1DSAPublic(der){var y=readMPInt(der,"y");var p=readMPInt(der,"p");var q=readMPInt(der,"q");var g=readMPInt(der,"g");var key={type:"dsa",parts:[{name:"y",data:y},{name:"p",data:p},{name:"q",data:q},{name:"g",data:g}]};return new Key(key)}function readPkcs1ECDSAPublic(der){der.readSequence();var oid=der.readOID();assert.strictEqual(oid,"1.2.840.10045.2.1","must be ecPublicKey");var curveOid=der.readOID();var curve;var curves=Object.keys(algs.curves);for(var j=0;j=1,"key must have at least one part");assert.ok(partial||sshbuf.atEnd(),"leftover bytes at end of key");var Constructor=Key;var algInfo=algs.info[key.type];if(type==="private"||algInfo.parts.length!==parts.length){algInfo=algs.privInfo[key.type];Constructor=PrivateKey}assert.strictEqual(algInfo.parts.length,parts.length);if(key.type==="ecdsa"){var res=/^ecdsa-sha2-(.+)$/.exec(alg);assert.ok(res!==null);assert.strictEqual(res[1],parts[0].data.toString())}var normalized=true;for(var i=0;itmp.length)limit=tmp.length;o+=buf.write(tmp.slice(i,limit),o);buf[o++]=10;i=limit}o+=buf.write("-----END "+header+"-----\n",o);return buf.slice(0,o)}}).call(this,require("buffer").Buffer)},{"../algs":247,"../errors":251,"../key":265,"../private-key":266,"../ssh-buffer":268,"../utils":269,"./pem":255,"./rfc4253":258,asn1:27,"assert-plus":270,"bcrypt-pbkdf":34,buffer:67,crypto:78}],260:[function(require,module,exports){(function(Buffer){module.exports={read:read,write:write};var assert=require("assert-plus");var rfc4253=require("./rfc4253");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var sshpriv=require("./ssh-private");var SSHKEY_RE=/^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([\n \t]+([^\n]+))?$/;var SSHKEY_RE2=/^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/ \t\n]+[=]*)(.*)$/;function read(buf,options){if(typeof buf!=="string"){assert.buffer(buf,"buf");buf=buf.toString("ascii")}var trimmed=buf.trim().replace(/[\\\r]/g,"");var m=trimmed.match(SSHKEY_RE);if(!m)m=trimmed.match(SSHKEY_RE2);assert.ok(m,"key must match regex");var type=rfc4253.algToKeyType(m[1]);var kbuf=new Buffer(m[2],"base64");var key;var ret={};if(m[4]){try{key=rfc4253.read(kbuf)}catch(e){m=trimmed.match(SSHKEY_RE2);assert.ok(m,"key must match regex");kbuf=new Buffer(m[2],"base64");key=rfc4253.readInternal(ret,"public",kbuf)}}else{key=rfc4253.readInternal(ret,"public",kbuf)}assert.strictEqual(type,key.type);if(m[4]&&m[4].length>0){key.comment=m[4]}else if(ret.consumed){var data=m[2]+m[3];var realOffset=Math.ceil(ret.consumed/3)*4;data=data.slice(0,realOffset-2).replace(/[^a-zA-Z0-9+\/=]/g,"")+data.slice(realOffset-2);var padding=ret.consumed%3;if(padding>0&&data.slice(realOffset-1,realOffset)!=="=")realOffset--;while(data.slice(realOffset,realOffset+1)==="=")realOffset++;var trailer=data.slice(realOffset);trailer=trailer.replace(/[\r\n]/g," ").replace(/^\s+/,"");if(trailer.match(/^[a-zA-Z0-9]/))key.comment=trailer}return key}function write(key,options){assert.object(key);if(!Key.isKey(key))throw new Error("Must be a public key");var parts=[];var alg=rfc4253.keyTypeToAlg(key);parts.push(alg);var buf=rfc4253.write(key);parts.push(buf.toString("base64"));if(key.comment)parts.push(key.comment);return new Buffer(parts.join(" "))}}).call(this,require("buffer").Buffer)},{"../key":265,"../private-key":266,"../utils":269,"./rfc4253":258,"./ssh-private":259,"assert-plus":270,buffer:67}],261:[function(require,module,exports){(function(Buffer){var x509=require("./x509");module.exports={read:read,verify:x509.verify,sign:x509.sign,write:write};var assert=require("assert-plus");var asn1=require("asn1");var algs=require("../algs");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var pem=require("./pem");var Identity=require("../identity");var Signature=require("../signature");var Certificate=require("../certificate");function read(buf,options){if(typeof buf!=="string"){assert.buffer(buf,"buf");buf=buf.toString("ascii")}var lines=buf.trim().split(/[\r\n]+/g);var m=lines[0].match(/[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/);assert.ok(m,"invalid PEM header");var m2=lines[lines.length-1].match(/[-]+[ ]*END CERTIFICATE[ ]*[-]+/);assert.ok(m2,"invalid PEM footer");var headers={};while(true){lines=lines.slice(1);m=lines[0].match(/^([A-Za-z0-9-]+): (.+)$/);if(!m)break;headers[m[1].toLowerCase()]=m[2]}lines=lines.slice(0,-1).join("");buf=new Buffer(lines,"base64");return x509.read(buf,options)}function write(cert,options){var dbuf=x509.write(cert,options);var header="CERTIFICATE";var tmp=dbuf.toString("base64");var len=tmp.length+tmp.length/64+18+16+header.length*2+10;var buf=new Buffer(len);var o=0;o+=buf.write("-----BEGIN "+header+"-----\n",o);for(var i=0;itmp.length)limit=tmp.length;o+=buf.write(tmp.slice(i,limit),o);buf[o++]=10;i=limit}o+=buf.write("-----END "+header+"-----\n",o);return buf.slice(0,o)}}).call(this,require("buffer").Buffer)},{"../algs":247,"../certificate":248,"../identity":263,"../key":265,"../private-key":266,"../signature":267,"../utils":269,"./pem":255,"./x509":262,asn1:27,"assert-plus":270,buffer:67}],262:[function(require,module,exports){(function(Buffer){module.exports={read:read,verify:verify,sign:sign,write:write};var assert=require("assert-plus");var asn1=require("asn1");var algs=require("../algs");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var pem=require("./pem");var Identity=require("../identity");var Signature=require("../signature");var Certificate=require("../certificate");var pkcs8=require("./pkcs8");function readMPInt(der,nm){assert.strictEqual(der.peek(),asn1.Ber.Integer,nm+" is not an Integer");return utils.mpNormalize(der.readString(asn1.Ber.Integer,true))}function verify(cert,key){var sig=cert.signatures.x509;assert.object(sig,"x509 signature");var algParts=sig.algo.split("-");if(algParts[0]!==key.type)return false;var blob=sig.cache;if(blob===undefined){var der=new asn1.BerWriter;writeTBSCert(cert,der);blob=der.buffer}var verifier=key.createVerify(algParts[1]);verifier.write(blob);return verifier.verify(sig.signature)}function Local(i){return asn1.Ber.Context|asn1.Ber.Constructor|i}function Context(i){return asn1.Ber.Context|i}var SIGN_ALGS={"rsa-md5":"1.2.840.113549.1.1.4","rsa-sha1":"1.2.840.113549.1.1.5","rsa-sha256":"1.2.840.113549.1.1.11","rsa-sha384":"1.2.840.113549.1.1.12","rsa-sha512":"1.2.840.113549.1.1.13","dsa-sha1":"1.2.840.10040.4.3","dsa-sha256":"2.16.840.1.101.3.4.3.2","ecdsa-sha1":"1.2.840.10045.4.1","ecdsa-sha256":"1.2.840.10045.4.3.2","ecdsa-sha384":"1.2.840.10045.4.3.3","ecdsa-sha512":"1.2.840.10045.4.3.4"};Object.keys(SIGN_ALGS).forEach(function(k){SIGN_ALGS[SIGN_ALGS[k]]=k});SIGN_ALGS["1.3.14.3.2.3"]="rsa-md5";SIGN_ALGS["1.3.14.3.2.29"]="rsa-sha1";var EXTS={issuerKeyId:"2.5.29.35",altName:"2.5.29.17"};function read(buf,options){if(typeof buf==="string"){buf=new Buffer(buf,"binary")}assert.buffer(buf,"buf");var der=new asn1.BerReader(buf);der.readSequence();if(Math.abs(der.length-der.remain)>1){throw new Error("DER sequence does not contain whole byte "+"stream")}var tbsStart=der.offset;der.readSequence();var sigOffset=der.offset+der.length;var tbsEnd=sigOffset;if(der.peek()===Local(0)){der.readSequence(Local(0));var version=der.readInt();assert.ok(version<=3,"only x.509 versions up to v3 supported")}var cert={};cert.signatures={};var sig=cert.signatures.x509={};sig.extras={};cert.serial=readMPInt(der,"serial");der.readSequence();var after=der.offset+der.length;var certAlgOid=der.readOID();var certAlg=SIGN_ALGS[certAlgOid];if(certAlg===undefined)throw new Error("unknown signature algorithm "+certAlgOid);der._offset=after;cert.issuer=Identity.parseAsn1(der);der.readSequence();cert.validFrom=readDate(der);cert.validUntil=readDate(der);cert.subjects=[Identity.parseAsn1(der)];der.readSequence();after=der.offset+der.length;cert.subjectKey=pkcs8.readPkcs8(undefined,"public",der);der._offset=after;if(der.peek()===Local(1)){der.readSequence(Local(1));sig.extras.issuerUniqueID=buf.slice(der.offset,der.offset+der.length);der._offset+=der.length}if(der.peek()===Local(2)){der.readSequence(Local(2));sig.extras.subjectUniqueID=buf.slice(der.offset,der.offset+der.length);der._offset+=der.length}if(der.peek()===Local(3)){der.readSequence(Local(3));var extEnd=der.offset+der.length;der.readSequence();while(der.offset=60)year+=century-1;else year+=century;d.setUTCFullYear(year,parseInt(m[2],10)-1,parseInt(m[3],10));d.setUTCHours(parseInt(m[4],10),parseInt(m[5],10));if(m[6]&&m[6].length>0)d.setUTCSeconds(parseInt(m[6],10));return d}var GTIME_RE=/^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;function gTimeToDate(t){var m=t.match(GTIME_RE);assert.ok(m);var d=new Date;d.setUTCFullYear(parseInt(m[1],10),parseInt(m[2],10)-1,parseInt(m[3],10));d.setUTCHours(parseInt(m[4],10),parseInt(m[5],10));if(m[6]&&m[6].length>0)d.setUTCSeconds(parseInt(m[6],10));return d}function zeroPad(n){var s=""+n;while(s.length<2)s="0"+s;return s}function dateToUTCTime(d){var s="";s+=zeroPad(d.getUTCFullYear()%100);s+=zeroPad(d.getUTCMonth()+1);s+=zeroPad(d.getUTCDate());s+=zeroPad(d.getUTCHours());s+=zeroPad(d.getUTCMinutes());s+=zeroPad(d.getUTCSeconds());s+="Z";return s}function sign(cert,key){if(cert.signatures.x509===undefined)cert.signatures.x509={};var sig=cert.signatures.x509;sig.algo=key.type+"-"+key.defaultHashAlgorithm();if(SIGN_ALGS[sig.algo]===undefined)return false;var der=new asn1.BerWriter;writeTBSCert(cert,der);var blob=der.buffer;sig.cache=blob;var signer=key.createSign();signer.write(blob);cert.signatures.x509.signature=signer.sign();return true}function write(cert,options){var sig=cert.signatures.x509;assert.object(sig,"x509 signature");var der=new asn1.BerWriter;der.startSequence();if(sig.cache){der._ensure(sig.cache.length);sig.cache.copy(der._buf,der._offset);der._offset+=sig.cache.length}else{writeTBSCert(cert,der)}der.startSequence();der.writeOID(SIGN_ALGS[sig.algo]);if(sig.algo.match(/^rsa-/))der.writeNull();der.endSequence();var sigData=sig.signature.toBuffer("asn1");var data=new Buffer(sigData.length+1);data[0]=0;sigData.copy(data,1);der.writeBuffer(data,asn1.Ber.BitString);der.endSequence();return der.buffer}function writeTBSCert(cert,der){var sig=cert.signatures.x509;assert.object(sig,"x509 signature");der.startSequence();der.startSequence(Local(0));der.writeInt(2);der.endSequence();der.writeBuffer(utils.mpNormalize(cert.serial),asn1.Ber.Integer);der.startSequence();der.writeOID(SIGN_ALGS[sig.algo]);der.endSequence();cert.issuer.toAsn1(der);der.startSequence();der.writeString(dateToUTCTime(cert.validFrom),asn1.Ber.UTCTime);der.writeString(dateToUTCTime(cert.validUntil),asn1.Ber.UTCTime);der.endSequence();var subject=cert.subjects[0];var altNames=cert.subjects.slice(1);subject.toAsn1(der);pkcs8.writePkcs8(der,cert.subjectKey);if(sig.extras&&sig.extras.issuerUniqueID){der.writeBuffer(sig.extras.issuerUniqueID,Local(1))}if(sig.extras&&sig.extras.subjectUniqueID){der.writeBuffer(sig.extras.subjectUniqueID,Local(2))}if(altNames.length>0||subject.type==="host"||sig.extras&&sig.extras.exts){der.startSequence(Local(3));der.startSequence();var exts=[{oid:EXTS.altName}];if(sig.extras&&sig.extras.exts)exts=sig.extras.exts;for(var i=0;i0){this.cn=this.componentLookup.cn[0].value}assert.optionalString(opts.type,"options.type");if(opts.type===undefined){if(this.components.length===1&&this.componentLookup.cn&&this.componentLookup.cn.length===1&&this.componentLookup.cn[0].value.match(DNS_NAME_RE)){this.type="host";this.hostname=this.componentLookup.cn[0].value}else if(this.componentLookup.dc&&this.components.length===this.componentLookup.dc.length){this.type="host";this.hostname=this.componentLookup.dc.map(function(c){return c.value}).join(".")}else if(this.componentLookup.uid&&this.components.length===this.componentLookup.uid.length){this.type="user";this.uid=this.componentLookup.uid[0].value}else if(this.componentLookup.cn&&this.componentLookup.cn.length===1&&this.componentLookup.cn[0].value.match(DNS_NAME_RE)){this.type="host";this.hostname=this.componentLookup.cn[0].value}else if(this.componentLookup.uid&&this.componentLookup.uid.length===1){this.type="user";this.uid=this.componentLookup.uid[0].value}else if(this.componentLookup.mail&&this.componentLookup.mail.length===1){this.type="email";this.email=this.componentLookup.mail[0].value}else if(this.componentLookup.cn&&this.componentLookup.cn.length===1){this.type="user";this.uid=this.componentLookup.cn[0].value}else{this.type="unknown"}}else{this.type=opts.type;if(this.type==="host")this.hostname=opts.hostname;else if(this.type==="user")this.uid=opts.uid;else if(this.type==="email")this.email=opts.email;else throw new Error("Unknown type "+this.type)}}Identity.prototype.toString=function(){return this.components.map(function(c){return c.name.toUpperCase()+"="+c.value}).join(", ")};var NOT_PRINTABLE=/[^a-zA-Z0-9 '(),+.\/:=?-]/;var NOT_IA5=/[^\x00-\x7f]/;Identity.prototype.toAsn1=function(der,tag){der.startSequence(tag);this.components.forEach(function(c){der.startSequence(asn1.Ber.Constructor|asn1.Ber.Set);der.startSequence();der.writeOID(c.oid);if(c.value.match(NOT_IA5)){var v=new Buffer(c.value,"utf8");der.writeBuffer(v,asn1.Ber.Utf8String)}else if(c.value.match(NOT_PRINTABLE)){der.writeString(c.value,asn1.Ber.IA5String)}else{der.writeString(c.value,asn1.Ber.PrintableString)}der.endSequence();der.endSequence()});der.endSequence()};function globMatch(a,b){if(a==="**"||b==="**")return true;var aParts=a.split(".");var bParts=b.split(".");if(aParts.length!==bParts.length)return false;for(var i=0;i1024)hashAlgo="sha256";if(this.type==="ed25519")hashAlgo="sha512";if(this.type==="ecdsa"){if(this.size<=256)hashAlgo="sha256";else if(this.size<=384)hashAlgo="sha384";else hashAlgo="sha512"}return hashAlgo};Key.prototype.createVerify=function(hashAlgo){if(hashAlgo===undefined)hashAlgo=this.defaultHashAlgorithm();assert.string(hashAlgo,"hash algorithm");if(this.type==="ed25519"&&edCompat!==undefined)return new edCompat.Verifier(this,hashAlgo);if(this.type==="curve25519")throw new Error("Curve25519 keys are not suitable for "+"signing or verification");var v,nm,err;try{nm=hashAlgo.toUpperCase();v=crypto.createVerify(nm)}catch(e){err=e}if(v===undefined||err instanceof Error&&err.message.match(/Unknown message digest/)){nm="RSA-";nm+=hashAlgo.toUpperCase();v=crypto.createVerify(nm)}assert.ok(v,"failed to create verifier");var oldVerify=v.verify.bind(v);var key=this.toBuffer("pkcs8");var self=this;v.verify=function(signature,fmt){if(Signature.isSignature(signature,[2,0])){if(signature.type!==self.type)return false;if(signature.hashAlgorithm&&signature.hashAlgorithm!==hashAlgo)return false;return oldVerify(key,signature.toBuffer("asn1"))}else if(typeof signature==="string"||Buffer.isBuffer(signature)){return oldVerify(key,signature,fmt)}else if(Signature.isSignature(signature,[1,0])){throw new Error("signature was created by too old "+"a version of sshpk and cannot be verified")}else{throw new TypeError("signature must be a string, "+"Buffer, or Signature object")}};return v};Key.prototype.createDiffieHellman=function(){if(this.type==="rsa")throw new Error("RSA keys do not support Diffie-Hellman");return new DiffieHellman(this)};Key.prototype.createDH=Key.prototype.createDiffieHellman;Key.parse=function(data,format,options){if(typeof data!=="string")assert.buffer(data,"data");if(format===undefined)format="auto";assert.string(format,"format");if(typeof options==="string")options={filename:options};assert.optionalObject(options,"options");if(options===undefined)options={};assert.optionalString(options.filename,"options.filename");if(options.filename===undefined)options.filename="(unnamed)";assert.object(formats[format],"formats[format]");try{var k=formats[format].read(data,options);if(k instanceof PrivateKey)k=k.toPublic();if(!k.comment)k.comment=options.filename;return k}catch(e){if(e.name==="KeyEncryptedError")throw e;throw new KeyParseError(options.filename,format,e)}};Key.isKey=function(obj,ver){return utils.isCompatible(obj,Key,ver)};Key.prototype._sshpkApiVersion=[1,5];Key._oldVersionDetect=function(obj){assert.func(obj.toBuffer);assert.func(obj.fingerprint);if(obj.createDH)return[1,4];if(obj.defaultHashAlgorithm)return[1,3];if(obj.formats["auto"])return[1,2];if(obj.formats["pkcs1"])return[1,1];return[1,0]}}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":153,"./algs":247,"./dhe":249,"./ed-compat":250,"./errors":251,"./fingerprint":252,"./formats/auto":253,"./formats/pem":255,"./formats/pkcs1":256,"./formats/pkcs8":257,"./formats/rfc4253":258,"./formats/ssh":260,"./formats/ssh-private":259,"./private-key":266,"./signature":267,"./utils":269,"assert-plus":270,crypto:78}],266:[function(require,module,exports){(function(Buffer){module.exports=PrivateKey;var assert=require("assert-plus");var algs=require("./algs");var crypto=require("crypto");var Fingerprint=require("./fingerprint");var Signature=require("./signature");var errs=require("./errors");var util=require("util");var utils=require("./utils");var edCompat;var ed;try{edCompat=require("./ed-compat")}catch(e){}var Key=require("./key");var InvalidAlgorithmError=errs.InvalidAlgorithmError;var KeyParseError=errs.KeyParseError;var KeyEncryptedError=errs.KeyEncryptedError;var formats={};formats["auto"]=require("./formats/auto");formats["pem"]=require("./formats/pem");formats["pkcs1"]=require("./formats/pkcs1");formats["pkcs8"]=require("./formats/pkcs8");formats["rfc4253"]=require("./formats/rfc4253");formats["ssh-private"]=require("./formats/ssh-private");formats["openssh"]=formats["ssh-private"];formats["ssh"]=formats["ssh-private"];function PrivateKey(opts){assert.object(opts,"options");Key.call(this,opts);this._pubCache=undefined}util.inherits(PrivateKey,Key);PrivateKey.formats=formats;PrivateKey.prototype.toBuffer=function(format,options){if(format===undefined)format="pkcs1";assert.string(format,"format");assert.object(formats[format],"formats[format]");assert.optionalObject(options,"options");return formats[format].write(this,options)};PrivateKey.prototype.hash=function(algo){return this.toPublic().hash(algo)};PrivateKey.prototype.toPublic=function(){if(this._pubCache)return this._pubCache;var algInfo=algs.info[this.type];var pubParts=[];for(var i=0;i20&&r[0]===0)r=r.slice(1);s=this.part.s.data;if(s.length>20&&s[0]===0)s=s.slice(1);if(this.hashAlgorithm&&this.hashAlgorithm!=="sha1"||r.length+s.length!==40){throw new Error("OpenSSH only supports "+"DSA signatures with SHA1 hash")}buf.writeBuffer(Buffer.concat([r,s]));return buf.toBuffer()}else if(format==="ssh"&&this.type==="ecdsa"){var inner=new SSHBuffer({});r=this.part.r.data;inner.writeBuffer(r);inner.writePart(this.part.s);buf=new SSHBuffer({});var curve;if(r[0]===0)r=r.slice(1);var sz=r.length*8;if(sz===256)curve="nistp256";else if(sz===384)curve="nistp384";else if(sz===528)curve="nistp521";buf.writeString("ecdsa-sha2-"+curve);buf.writeBuffer(inner.toBuffer());return buf.toBuffer()}throw new Error("Invalid signature format");default:throw new Error("Invalid signature data")}};Signature.prototype.toString=function(format){assert.optionalString(format,"format");return this.toBuffer(format).toString("base64")};Signature.parse=function(data,type,format){if(typeof data==="string")data=new Buffer(data,"base64");assert.buffer(data,"data");assert.string(format,"format");assert.string(type,"type");var opts={};opts.type=type.toLowerCase();opts.parts=[];try{assert.ok(data.length>0,"signature must not be empty");switch(opts.type){case"rsa":return parseOneNum(data,type,format,opts,"ssh-rsa");case"ed25519":return parseOneNum(data,type,format,opts,"ssh-ed25519");case"dsa":case"ecdsa":if(format==="asn1")return parseDSAasn1(data,type,format,opts);else if(opts.type==="dsa")return parseDSA(data,type,format,opts);else return parseECDSA(data,type,format,opts);default:throw new InvalidAlgorithmError(type)}}catch(e){if(e instanceof InvalidAlgorithmError)throw e;throw new SignatureParseError(type,format,e)}};function parseOneNum(data,type,format,opts,headType){if(format==="ssh"){try{var buf=new SSHBuffer({buffer:data});var head=buf.readString()}catch(e){}if(head===headType){var sig=buf.readPart();assert.ok(buf.atEnd(),"extra trailing bytes");sig.name="sig";opts.parts.push(sig);return new Signature(opts)}}opts.parts.push({name:"sig",data:data});return new Signature(opts)}function parseDSAasn1(data,type,format,opts){var der=new asn1.BerReader(data);der.readSequence();var r=der.readString(asn1.Ber.Integer,true);var s=der.readString(asn1.Ber.Integer,true);opts.parts.push({name:"r",data:utils.mpNormalize(r)});opts.parts.push({name:"s",data:utils.mpNormalize(s)});return new Signature(opts)}function parseDSA(data,type,format,opts){if(data.length!=40){var buf=new SSHBuffer({buffer:data});var d=buf.readBuffer();if(d.toString("ascii")==="ssh-dss")d=buf.readBuffer();assert.ok(buf.atEnd(),"extra trailing bytes");assert.strictEqual(d.length,40,"invalid inner length");data=d}opts.parts.push({name:"r",data:data.slice(0,20)});opts.parts.push({name:"s",data:data.slice(20,40)});return new Signature(opts)}function parseECDSA(data,type,format,opts){var buf=new SSHBuffer({buffer:data});var r,s;var inner=buf.readBuffer();if(inner.toString("ascii").match(/^ecdsa-/)){inner=buf.readBuffer();assert.ok(buf.atEnd(),"extra trailing bytes on outer");buf=new SSHBuffer({buffer:inner});r=buf.readPart()}else{r={data:inner}}s=buf.readPart();assert.ok(buf.atEnd(),"extra trailing bytes");r.name="r";s.name="s";opts.parts.push(r);opts.parts.push(s);return new Signature(opts)}Signature.isSignature=function(obj,ver){return utils.isCompatible(obj,Signature,ver)};Signature.prototype._sshpkApiVersion=[2,1];Signature._oldVersionDetect=function(obj){assert.func(obj.toBuffer);if(obj.hasOwnProperty("hashAlgorithm"))return[2,0];return[1,0]}}).call(this,require("buffer").Buffer)},{"./algs":247,"./errors":251,"./ssh-buffer":268,"./utils":269,asn1:27,"assert-plus":270,buffer:67,crypto:78}],268:[function(require,module,exports){(function(Buffer){module.exports=SSHBuffer;var assert=require("assert-plus");function SSHBuffer(opts){assert.object(opts,"options");if(opts.buffer!==undefined)assert.buffer(opts.buffer,"options.buffer");this._size=opts.buffer?opts.buffer.length:1024;this._buffer=opts.buffer||new Buffer(this._size);this._offset=0}SSHBuffer.prototype.toBuffer=function(){return this._buffer.slice(0,this._offset)};SSHBuffer.prototype.atEnd=function(){return this._offset>=this._buffer.length};SSHBuffer.prototype.remainder=function(){return this._buffer.slice(this._offset)};SSHBuffer.prototype.skip=function(n){this._offset+=n};SSHBuffer.prototype.expand=function(){this._size*=2;var buf=new Buffer(this._size);this._buffer.copy(buf,0);this._buffer=buf};SSHBuffer.prototype.readPart=function(){return{data:this.readBuffer()}};SSHBuffer.prototype.readBuffer=function(){var len=this._buffer.readUInt32BE(this._offset);this._offset+=4;assert.ok(this._offset+len<=this._buffer.length,"length out of bounds at +0x"+this._offset.toString(16)+" (data truncated?)");var buf=this._buffer.slice(this._offset,this._offset+len);this._offset+=len;return buf};SSHBuffer.prototype.readString=function(){return this.readBuffer().toString()};SSHBuffer.prototype.readCString=function(){var offset=this._offset;while(offsetthis._size)this.expand();this._buffer.writeUInt32BE(buf.length,this._offset);this._offset+=4;buf.copy(this._buffer,this._offset);this._offset+=buf.length};SSHBuffer.prototype.writeString=function(str){this.writeBuffer(new Buffer(str,"utf8"))};SSHBuffer.prototype.writeCString=function(str){while(this._offset+1+str.length>this._size)this.expand();this._buffer.write(str,this._offset);this._offset+=str.length;this._buffer[this._offset++]=0};SSHBuffer.prototype.writeInt=function(v){while(this._offset+4>this._size)this.expand();this._buffer.writeUInt32BE(v,this._offset);this._offset+=4};SSHBuffer.prototype.writeInt64=function(v){assert.buffer(v,"value");if(v.length>8){var lead=v.slice(0,v.length-8);for(var i=0;ithis._size)this.expand();v.copy(this._buffer,this._offset);this._offset+=8};SSHBuffer.prototype.writeChar=function(v){while(this._offset+1>this._size)this.expand();this._buffer[this._offset++]=v};SSHBuffer.prototype.writePart=function(p){this.writeBuffer(p.data)};SSHBuffer.prototype.write=function(buf){while(this._offset+buf.length>this._size)this.expand();buf.copy(this._buffer,this._offset);this._offset+=buf.length}}).call(this,require("buffer").Buffer)},{"assert-plus":270,buffer:67}],269:[function(require,module,exports){(function(Buffer){module.exports={bufferSplit:bufferSplit,addRSAMissing:addRSAMissing,calculateDSAPublic:calculateDSAPublic,mpNormalize:mpNormalize,ecNormalize:ecNormalize,countZeros:countZeros,assertCompatible:assertCompatible,isCompatible:isCompatible,opensslKeyDeriv:opensslKeyDeriv,opensshCipherInfo:opensshCipherInfo};var assert=require("assert-plus");var PrivateKey=require("./private-key");var crypto=require("crypto");var MAX_CLASS_DEPTH=3;function isCompatible(obj,klass,needVer){if(obj===null||typeof obj!=="object")return false;if(needVer===undefined)needVer=klass.prototype._sshpkApiVersion;if(obj instanceof klass&&klass.prototype._sshpkApiVersion[0]==needVer[0])return true;var proto=Object.getPrototypeOf(obj);var depth=0;while(proto.constructor.name!==klass.name){proto=Object.getPrototypeOf(proto);if(!proto||++depth>MAX_CLASS_DEPTH)return false}if(proto.constructor.name!==klass.name)return false;var ver=proto._sshpkApiVersion;if(ver===undefined)ver=klass._oldVersionDetect(obj);if(ver[0]!=needVer[0]||ver[1]=needVer[1],name+" must be compatible with "+klass.name+" klass "+"version "+needVer[0]+"."+needVer[1])}var CIPHER_LEN={"des-ede3-cbc":{key:7,iv:8},"aes-128-cbc":{key:16,iv:16}};var PKCS5_SALT_LEN=8;function opensslKeyDeriv(cipher,salt,passphrase,count){assert.buffer(salt,"salt");assert.buffer(passphrase,"passphrase");assert.number(count,"iteration count");var clen=CIPHER_LEN[cipher];assert.object(clen,"supported cipher");salt=salt.slice(0,PKCS5_SALT_LEN);var D,D_prev,bufs;var material=new Buffer(0);while(material.length=chr.length){var newPart=i+1;parts.push(buf.slice(lastPart,newPart-matches));lastPart=newPart;matches=0}}if(lastPart<=buf.length)parts.push(buf.slice(lastPart,buf.length));return parts}function ecNormalize(buf,addZero){assert.buffer(buf);if(buf[0]===0&&buf[1]===4){if(addZero)return buf;return buf.slice(1)}else if(buf[0]===4){if(!addZero)return buf}else{while(buf[0]===0)buf=buf.slice(1);if(buf[0]===2||buf[0]===3)throw new Error("Compressed elliptic curve points "+"are not supported");if(buf[0]!==4)throw new Error("Not a valid elliptic curve point");if(!addZero)return buf}var b=new Buffer(buf.length+1);b[0]=0;buf.copy(b,1);return b}function mpNormalize(buf){assert.buffer(buf);while(buf.length>1&&buf[0]===0&&(buf[1]&128)===0)buf=buf.slice(1);if((buf[0]&128)===128){var b=new Buffer(buf.length+1);b[0]=0;buf.copy(b,1);buf=b}return buf}function bigintToMpBuf(bigint){var buf=new Buffer(bigint.toByteArray());buf=mpNormalize(buf);return buf}function calculateDSAPublic(g,p,x){assert.buffer(g);assert.buffer(p);assert.buffer(x);try{var bigInt=require("jsbn").BigInteger}catch(e){throw new Error("To load a PKCS#8 format DSA private key, "+"the node jsbn library is required.")}g=new bigInt(g);p=new bigInt(p);x=new bigInt(x);var y=g.modPow(x,p);var ybuf=bigintToMpBuf(y);return ybuf}function addRSAMissing(key){assert.object(key);assertCompatible(key,PrivateKey,[1,1]);try{var bigInt=require("jsbn").BigInteger}catch(e){throw new Error("To write a PEM private key from "+"this source, the node jsbn lib is required.")}var d=new bigInt(key.part.d.data);var buf;if(!key.part.dmodp){var p=new bigInt(key.part.p.data);var dmodp=d.mod(p.subtract(1));buf=bigintToMpBuf(dmodp);key.part.dmodp={name:"dmodp",data:buf};key.parts.push(key.part.dmodp)}if(!key.part.dmodq){var q=new bigInt(key.part.q.data);var dmodq=d.mod(q.subtract(1));buf=bigintToMpBuf(dmodq);key.part.dmodq={name:"dmodq",data:buf};key.parts.push(key.part.dmodq)}}function opensshCipherInfo(cipher){var inf={};switch(cipher){case"3des-cbc":inf.keySize=24;inf.blockSize=8;inf.opensslName="des-ede3-cbc";break;case"blowfish-cbc":inf.keySize=16;inf.blockSize=8;inf.opensslName="bf-cbc";break;case"aes128-cbc":case"aes128-ctr":case"aes128-gcm@openssh.com":inf.keySize=16;inf.blockSize=16;inf.opensslName="aes-128-"+cipher.slice(7,10);break;case"aes192-cbc":case"aes192-ctr":case"aes192-gcm@openssh.com":inf.keySize=24;inf.blockSize=16;inf.opensslName="aes-192-"+cipher.slice(7,10);break;case"aes256-cbc":case"aes256-ctr": -case"aes256-gcm@openssh.com":inf.keySize=32;inf.blockSize=16;inf.opensslName="aes-256-"+cipher.slice(7,10);break;default:throw new Error('Unsupported openssl cipher "'+cipher+'"')}return inf}}).call(this,require("buffer").Buffer)},{"./private-key":266,"assert-plus":270,buffer:67,crypto:78,jsbn:166}],270:[function(require,module,exports){(function(Buffer,process){var assert=require("assert");var Stream=require("stream").Stream;var util=require("util");var UUID_REGEXP=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function _capitalize(str){return str.charAt(0).toUpperCase()+str.slice(1)}function _toss(name,expected,oper,arg,actual){throw new assert.AssertionError({message:util.format("%s (%s) is required",name,expected),actual:actual===undefined?typeof arg:actual(arg),expected:expected,operator:oper||"===",stackStartFunction:_toss.caller})}function _getClass(arg){return Object.prototype.toString.call(arg).slice(8,-1)}function noop(){}var types={bool:{check:function(arg){return typeof arg==="boolean"}},func:{check:function(arg){return typeof arg==="function"}},string:{check:function(arg){return typeof arg==="string"}},object:{check:function(arg){return typeof arg==="object"&&arg!==null}},number:{check:function(arg){return typeof arg==="number"&&!isNaN(arg)}},finite:{check:function(arg){return typeof arg==="number"&&!isNaN(arg)&&isFinite(arg)}},buffer:{check:function(arg){return Buffer.isBuffer(arg)},operator:"Buffer.isBuffer"},array:{check:function(arg){return Array.isArray(arg)},operator:"Array.isArray"},stream:{check:function(arg){return arg instanceof Stream},operator:"instanceof",actual:_getClass},date:{check:function(arg){return arg instanceof Date},operator:"instanceof",actual:_getClass},regexp:{check:function(arg){return arg instanceof RegExp},operator:"instanceof",actual:_getClass},uuid:{check:function(arg){return typeof arg==="string"&&UUID_REGEXP.test(arg)},operator:"isUUID"}};function _setExports(ndebug){var keys=Object.keys(types);var out;if(process.env.NODE_NDEBUG){out=noop}else{out=function(arg,msg){if(!arg){_toss(msg,"true",arg)}}}keys.forEach(function(k){if(ndebug){out[k]=noop;return}var type=types[k];out[k]=function(arg,msg){if(!type.check(arg)){_toss(msg,k,type.operator,arg,type.actual)}}});keys.forEach(function(k){var name="optional"+_capitalize(k);if(ndebug){out[name]=noop;return}var type=types[k];out[name]=function(arg,msg){if(arg===undefined||arg===null){return}if(!type.check(arg)){_toss(msg,k,type.operator,arg,type.actual)}}});keys.forEach(function(k){var name="arrayOf"+_capitalize(k);if(ndebug){out[name]=noop;return}var type=types[k];var expected="["+k+"]";out[name]=function(arg,msg){if(!Array.isArray(arg)){_toss(msg,expected,type.operator,arg,type.actual)}var i;for(i=0;iself._pos){var newData=response.substr(self._pos);if(self._charset==="x-user-defined"){var buffer=new Buffer(newData.length);for(var i=0;iself._pos){self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos))));self._pos=reader.result.byteLength}};reader.onload=function(){self.push(null)};reader.readAsArrayBuffer(response);break}if(self._xhr.readyState===rStates.DONE&&self._mode!=="ms-stream"){self.push(null)}}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer)},{"./capability":273,_process:198,buffer:67,inherits:152,"readable-stream":223}],276:[function(require,module,exports){var Buffer=require("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding)){throw new Error("Unknown encoding: "+encoding)}}var StringDecoder=exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:67}],277:[function(require,module,exports){(function(Buffer){var util=require("util");var Stream=require("stream");var StringDecoder=require("string_decoder").StringDecoder;module.exports=StringStream;module.exports.AlignedStringDecoder=AlignedStringDecoder;function StringStream(from,to){if(!(this instanceof StringStream))return new StringStream(from,to);Stream.call(this);if(from==null)from="utf8";this.readable=this.writable=true;this.paused=false;this.toEncoding=to==null?from:to;this.fromEncoding=to==null?"":from;this.decoder=new AlignedStringDecoder(this.toEncoding)}util.inherits(StringStream,Stream);StringStream.prototype.write=function(data){if(!this.writable){var err=new Error("stream not writable");err.code="EPIPE";this.emit("error",err);return false}if(this.fromEncoding){if(Buffer.isBuffer(data))data=data.toString();data=new Buffer(data,this.fromEncoding)}var string=this.decoder.write(data);if(string.length)this.emit("data",string);return!this.paused};StringStream.prototype.flush=function(){if(this.decoder.flush){var string=this.decoder.flush();if(string.length)this.emit("data",string)}};StringStream.prototype.end=function(){if(!this.writable&&!this.readable)return;this.flush();this.emit("end");this.writable=this.readable=false;this.destroy()};StringStream.prototype.destroy=function(){this.decoder=null;this.writable=this.readable=false;this.emit("close")};StringStream.prototype.pause=function(){this.paused=true};StringStream.prototype.resume=function(){if(this.paused)this.emit("drain");this.paused=false};function AlignedStringDecoder(encoding){StringDecoder.call(this,encoding);switch(this.encoding){case"base64":this.write=alignedWrite;this.alignedBuffer=new Buffer(3);this.alignedBytes=0;break}}util.inherits(AlignedStringDecoder,StringDecoder);AlignedStringDecoder.prototype.flush=function(){if(!this.alignedBuffer||!this.alignedBytes)return"";var leftover=this.alignedBuffer.toString(this.encoding,0,this.alignedBytes);this.alignedBytes=0;return leftover};function alignedWrite(buffer){var rem=(this.alignedBytes+buffer.length)%this.alignedBuffer.length;if(!rem&&!this.alignedBytes)return buffer.toString(this.encoding);var returnBuffer=new Buffer(this.alignedBytes+buffer.length-rem);this.alignedBuffer.copy(returnBuffer,0,0,this.alignedBytes);buffer.copy(returnBuffer,this.alignedBytes,0,buffer.length-rem);buffer.copy(this.alignedBuffer,0,buffer.length-rem,buffer.length);this.alignedBytes=rem;return returnBuffer.toString(this.encoding)}}).call(this,require("buffer").Buffer)},{buffer:67,stream:271,string_decoder:276,util:293}],278:[function(require,module,exports){var Buffer=require("buffer").Buffer;module.exports=function(buf){if(buf instanceof Uint8Array){if(buf.byteOffset===0&&buf.byteLength===buf.buffer.byteLength){return buf.buffer}else if(typeof buf.buffer.slice==="function"){return buf.buffer.slice(buf.byteOffset,buf.byteOffset+buf.byteLength)}}if(Buffer.isBuffer(buf)){var arrayCopy=new Uint8Array(buf.length);var len=buf.length;for(var i=0;i23||minutes>59||seconds>59){return}continue}}if(day===null){result=DAY_OF_MONTH.exec(token);if(result){day=parseInt(result,10);if(day<1||day>31){return}continue}}if(month===null){result=MONTH.exec(token);if(result){month=MONTH_TO_NUM[result[1].toLowerCase()];continue}}if(year===null){result=YEAR.exec(token);if(result){year=parseInt(result[0],10);if(70<=year&&year<=99){year+=1900}else if(0<=year&&year<=69){year+=2e3}if(year<1601){return}}}}if(seconds===null||day===null||month===null||year===null){return}return new Date(Date.UTC(year,month,day,hour,minutes,seconds))}function formatDate(date){var d=date.getUTCDate();d=d>=10?d:"0"+d;var h=date.getUTCHours();h=h>=10?h:"0"+h;var m=date.getUTCMinutes();m=m>=10?m:"0"+m;var s=date.getUTCSeconds();s=s>=10?s:"0"+s;return NUM_TO_DAY[date.getUTCDay()]+", "+d+" "+NUM_TO_MONTH[date.getUTCMonth()]+" "+date.getUTCFullYear()+" "+h+":"+m+":"+s+" GMT"}function canonicalDomain(str){if(str==null){return null}str=str.trim().replace(/^\./,"");if(punycode&&/[^\u0001-\u007f]/.test(str)){str=punycode.toASCII(str)}return str.toLowerCase()}function domainMatch(str,domStr,canonicalize){if(str==null||domStr==null){return null}if(canonicalize!==false){str=canonicalDomain(str);domStr=canonicalDomain(domStr)}if(str==domStr){return true}if(net.isIP(str)){return false}var idx=str.indexOf(domStr);if(idx<=0){return false}if(str.length!==domStr.length+idx){return false}if(str.substr(idx-1,1)!=="."){return false}return true}function defaultPath(path){if(!path||path.substr(0,1)!=="/"){return"/"}if(path==="/"){return path}var rightSlash=path.lastIndexOf("/");if(rightSlash===0){return"/"}return path.slice(0,rightSlash)}function parse(str,options){if(!options||typeof options!=="object"){options={}}str=str.trim();var firstSemi=str.indexOf(";");var pairRe=options.loose?LOOSE_COOKIE_PAIR:COOKIE_PAIR;var result=pairRe.exec(firstSemi===-1?str:str.substr(0,firstSemi));if(!result){return}var c=new Cookie;if(result[1]){c.key=result[2].trim()}else{c.key=""}c.value=result[3].trim();if(CONTROL_CHARS.test(c.key)||CONTROL_CHARS.test(c.value)){return}if(firstSemi===-1){return c}var unparsed=str.slice(firstSemi+1).trim();if(unparsed.length===0){return c}var cookie_avs=unparsed.split(";");while(cookie_avs.length){var av=cookie_avs.shift().trim();if(av.length===0){continue}var av_sep=av.indexOf("=");var av_key,av_value;if(av_sep===-1){av_key=av;av_value=null}else{av_key=av.substr(0,av_sep);av_value=av.substr(av_sep+1)}av_key=av_key.trim().toLowerCase();if(av_value){av_value=av_value.trim()}switch(av_key){case"expires":if(av_value){var exp=parseDate(av_value);if(exp){c.expires=exp}}break;case"max-age":if(av_value){if(/^-?[0-9]+$/.test(av_value)){var delta=parseInt(av_value,10);c.setMaxAge(delta)}}break;case"domain":if(av_value){var domain=av_value.trim().replace(/^\./,"");if(domain){c.domain=domain.toLowerCase()}}break;case"path":c.path=av_value&&av_value[0]==="/"?av_value:null;break;case"secure":c.secure=true;break;case"httponly":c.httpOnly=true;break;default:c.extensions=c.extensions||[];c.extensions.push(av);break}}return c}function jsonParse(str){var obj;try{obj=JSON.parse(str)}catch(e){return e}return obj}function fromJSON(str){if(!str){return null}var obj;if(typeof str==="string"){obj=jsonParse(str);if(obj instanceof Error){return null}}else{obj=str}var c=new Cookie;for(var i=0;i1){var lindex=path.lastIndexOf("/");if(lindex===0){break}path=path.substr(0,lindex);permutations.push(path)}permutations.push("/");return permutations}function getCookieContext(url){if(url instanceof Object){return url}try{url=decodeURI(url)}catch(err){}return urlParse(url)}function Cookie(options){options=options||{};Object.keys(options).forEach(function(prop){if(Cookie.prototype.hasOwnProperty(prop)&&Cookie.prototype[prop]!==options[prop]&&prop.substr(0,1)!=="_"){this[prop]=options[prop]}},this);this.creation=this.creation||new Date;Object.defineProperty(this,"creationIndex",{configurable:false,enumerable:false,writable:true,value:++Cookie.cookiesCreated})}Cookie.cookiesCreated=0;Cookie.parse=parse;Cookie.fromJSON=fromJSON;Cookie.prototype.key="";Cookie.prototype.value="";Cookie.prototype.expires="Infinity";Cookie.prototype.maxAge=null;Cookie.prototype.domain=null;Cookie.prototype.path=null;Cookie.prototype.secure=false;Cookie.prototype.httpOnly=false;Cookie.prototype.extensions=null;Cookie.prototype.hostOnly=null;Cookie.prototype.pathIsDefault=null;Cookie.prototype.creation=null;Cookie.prototype.lastAccessed=null;Object.defineProperty(Cookie.prototype,"creationIndex",{configurable:true,enumerable:false,writable:true,value:0});Cookie.serializableProperties=Object.keys(Cookie.prototype).filter(function(prop){return!(Cookie.prototype[prop]instanceof Function||prop==="creationIndex"||prop.substr(0,1)==="_")});Cookie.prototype.inspect=function inspect(){var now=Date.now();return'Cookie="'+this.toString()+"; hostOnly="+(this.hostOnly!=null?this.hostOnly:"?")+"; aAge="+(this.lastAccessed?now-this.lastAccessed.getTime()+"ms":"?")+"; cAge="+(this.creation?now-this.creation.getTime()+"ms":"?")+'"'};Cookie.prototype.toJSON=function(){var obj={};var props=Cookie.serializableProperties;for(var i=0;isuffixLen){var publicSuffix=parts.slice(0,suffixLen+1).reverse().join(".");return converted?punycode.toUnicode(publicSuffix):publicSuffix}return null};var index=module.exports.index=Object.freeze({ac:true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,ad:true,"nom.ad":true,ae:true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,aero:true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,af:true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,ag:true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,ai:true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,al:true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,am:true,an:true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,ao:true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,aq:true,ar:true,"com.ar":true,"edu.ar":true,"gob.ar":true,"gov.ar":true,"int.ar":true,"mil.ar":true,"net.ar":true,"org.ar":true,"tur.ar":true,arpa:true,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,as:true,"gov.as":true,asia:true,at:true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,au:true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,aw:true,"com.aw":true,ax:true,az:true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,ba:true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,bb:true,"biz.bb":true,"co.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"tv.bb":true,"*.bd":true,be:true,"ac.be":true,bf:true,"gov.bf":true,bg:true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,bh:true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,bi:true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,biz:true,bj:true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,bm:true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,bo:true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,br:true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"eco.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"leg.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mp.br":true,"mus.br":true,"net.br":true,"*.nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,bs:true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,bt:true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,bv:true,bw:true,"co.bw":true,"org.bw":true,by:true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,bz:true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,ca:true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,cat:true,cc:true,cd:true,"gov.cd":true,cf:true,cg:true,ch:true,ci:true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,cl:true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,cm:true,"co.cm":true,"com.cm":true,"gov.cm":true,"net.cm":true,cn:true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,co:true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,com:true,coop:true,cr:true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,cu:true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,cv:true,cw:true,"com.cw":true,"edu.cw":true,"net.cw":true,"org.cw":true,cx:true,"gov.cx":true,"ac.cy":true,"biz.cy":true,"com.cy":true,"ekloges.cy":true,"gov.cy":true,"ltd.cy":true,"name.cy":true,"net.cy":true,"org.cy":true,"parliament.cy":true,"press.cy":true,"pro.cy":true,"tm.cy":true,cz:true,de:true,dj:true,dk:true,dm:true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,do:true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,dz:true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,ec:true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,edu:true,ee:true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,eg:true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,es:true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,et:true,"com.et":true,"gov.et":true,"org.et":true,"edu.et":true,"biz.et":true,"name.et":true,"info.et":true,"net.et":true,eu:true,fi:true,"aland.fi":true,"*.fj":true,"*.fk":true,fm:true,fo:true,fr:true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,ga:true,gb:true,gd:true,ge:true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,gf:true,gg:true,"co.gg":true,"net.gg":true,"org.gg":true,gh:true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,gi:true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,gl:true,"co.gl":true,"com.gl":true,"edu.gl":true,"net.gl":true,"org.gl":true,gm:true,gn:true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,gov:true,gp:true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,gq:true,gr:true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,gs:true,gt:true,"com.gt":true,"edu.gt":true,"gob.gt":true,"ind.gt":true,"mil.gt":true,"net.gt":true,"org.gt":true,"*.gu":true,gw:true,gy:true,"co.gy":true,"com.gy":true,"net.gy":true,hk:true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,hm:true,hn:true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,hr:true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,ht:true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,hu:true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,id:true,"ac.id":true,"biz.id":true,"co.id":true,"desa.id":true,"go.id":true,"mil.id":true,"my.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,ie:true,"gov.ie":true,il:true,"ac.il":true,"co.il":true,"gov.il":true,"idf.il":true,"k12.il":true,"muni.il":true,"net.il":true,"org.il":true,im:true,"ac.im":true,"co.im":true,"com.im":true,"ltd.co.im":true,"net.im":true,"org.im":true,"plc.co.im":true,"tt.im":true,"tv.im":true,in:true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,info:true,int:true,"eu.int":true,io:true,"com.io":true,iq:true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,ir:true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,is:true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,it:true,"gov.it":true,"edu.it":true,"abr.it":true,"abruzzo.it":true,"aosta-valley.it":true,"aostavalley.it":true,"bas.it":true,"basilicata.it":true,"cal.it":true,"calabria.it":true,"cam.it":true,"campania.it":true,"emilia-romagna.it":true,"emiliaromagna.it":true,"emr.it":true,"friuli-v-giulia.it":true,"friuli-ve-giulia.it":true,"friuli-vegiulia.it":true,"friuli-venezia-giulia.it":true,"friuli-veneziagiulia.it":true,"friuli-vgiulia.it":true,"friuliv-giulia.it":true,"friulive-giulia.it":true,"friulivegiulia.it":true,"friulivenezia-giulia.it":true,"friuliveneziagiulia.it":true,"friulivgiulia.it":true,"fvg.it":true,"laz.it":true,"lazio.it":true,"lig.it":true,"liguria.it":true,"lom.it":true,"lombardia.it":true,"lombardy.it":true,"lucania.it":true,"mar.it":true,"marche.it":true,"mol.it":true,"molise.it":true,"piedmont.it":true,"piemonte.it":true,"pmn.it":true,"pug.it":true,"puglia.it":true,"sar.it":true,"sardegna.it":true,"sardinia.it":true,"sic.it":true,"sicilia.it":true,"sicily.it":true,"taa.it":true,"tos.it":true,"toscana.it":true,"trentino-a-adige.it":true,"trentino-aadige.it":true,"trentino-alto-adige.it":true,"trentino-altoadige.it":true,"trentino-s-tirol.it":true,"trentino-stirol.it":true,"trentino-sud-tirol.it":true,"trentino-sudtirol.it":true,"trentino-sued-tirol.it":true,"trentino-suedtirol.it":true,"trentinoa-adige.it":true,"trentinoaadige.it":true,"trentinoalto-adige.it":true,"trentinoaltoadige.it":true,"trentinos-tirol.it":true,"trentinostirol.it":true,"trentinosud-tirol.it":true,"trentinosudtirol.it":true,"trentinosued-tirol.it":true,"trentinosuedtirol.it":true,"tuscany.it":true,"umb.it":true,"umbria.it":true,"val-d-aosta.it":true,"val-daosta.it":true,"vald-aosta.it":true,"valdaosta.it":true,"valle-aosta.it":true,"valle-d-aosta.it":true,"valle-daosta.it":true,"valleaosta.it":true,"valled-aosta.it":true,"valledaosta.it":true,"vallee-aoste.it":true,"valleeaoste.it":true,"vao.it":true,"vda.it":true,"ven.it":true,"veneto.it":true,"ag.it":true,"agrigento.it":true,"al.it":true,"alessandria.it":true,"alto-adige.it":true,"altoadige.it":true,"an.it":true,"ancona.it":true,"andria-barletta-trani.it":true,"andria-trani-barletta.it":true,"andriabarlettatrani.it":true,"andriatranibarletta.it":true,"ao.it":true,"aosta.it":true,"aoste.it":true,"ap.it":true,"aq.it":true,"aquila.it":true,"ar.it":true,"arezzo.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"asti.it":true,"at.it":true,"av.it":true,"avellino.it":true,"ba.it":true,"balsan.it":true,"bari.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"belluno.it":true,"benevento.it":true,"bergamo.it":true,"bg.it":true,"bi.it":true,"biella.it":true,"bl.it":true,"bn.it":true,"bo.it":true,"bologna.it":true,"bolzano.it":true,"bozen.it":true,"br.it":true,"brescia.it":true,"brindisi.it":true,"bs.it":true,"bt.it":true,"bz.it":true,"ca.it":true,"cagliari.it":true,"caltanissetta.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"campobasso.it":true,"carbonia-iglesias.it":true,"carboniaiglesias.it":true,"carrara-massa.it":true,"carraramassa.it":true,"caserta.it":true,"catania.it":true,"catanzaro.it":true,"cb.it":true,"ce.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"ch.it":true,"chieti.it":true,"ci.it":true,"cl.it":true,"cn.it":true,"co.it":true,"como.it":true,"cosenza.it":true,"cr.it":true,"cremona.it":true,"crotone.it":true,"cs.it":true,"ct.it":true,"cuneo.it":true,"cz.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"en.it":true,"enna.it":true,"fc.it":true,"fe.it":true,"fermo.it":true,"ferrara.it":true,"fg.it":true,"fi.it":true,"firenze.it":true,"florence.it":true,"fm.it":true,"foggia.it":true,"forli-cesena.it":true,"forlicesena.it":true,"fr.it":true,"frosinone.it":true,"ge.it":true,"genoa.it":true,"genova.it":true,"go.it":true,"gorizia.it":true,"gr.it":true,"grosseto.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"im.it":true,"imperia.it":true,"is.it":true,"isernia.it":true,"kr.it":true,"la-spezia.it":true,"laquila.it":true,"laspezia.it":true,"latina.it":true,"lc.it":true,"le.it":true,"lecce.it":true,"lecco.it":true,"li.it":true,"livorno.it":true,"lo.it":true,"lodi.it":true,"lt.it":true,"lu.it":true,"lucca.it":true,"macerata.it":true,"mantova.it":true,"massa-carrara.it":true,"massacarrara.it":true,"matera.it":true,"mb.it":true,"mc.it":true,"me.it":true,"medio-campidano.it":true,"mediocampidano.it":true, -"messina.it":true,"mi.it":true,"milan.it":true,"milano.it":true,"mn.it":true,"mo.it":true,"modena.it":true,"monza-brianza.it":true,"monza-e-della-brianza.it":true,"monza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"ms.it":true,"mt.it":true,"na.it":true,"naples.it":true,"napoli.it":true,"no.it":true,"novara.it":true,"nu.it":true,"nuoro.it":true,"og.it":true,"ogliastra.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"or.it":true,"oristano.it":true,"ot.it":true,"pa.it":true,"padova.it":true,"padua.it":true,"palermo.it":true,"parma.it":true,"pavia.it":true,"pc.it":true,"pd.it":true,"pe.it":true,"perugia.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"pescara.it":true,"pg.it":true,"pi.it":true,"piacenza.it":true,"pisa.it":true,"pistoia.it":true,"pn.it":true,"po.it":true,"pordenone.it":true,"potenza.it":true,"pr.it":true,"prato.it":true,"pt.it":true,"pu.it":true,"pv.it":true,"pz.it":true,"ra.it":true,"ragusa.it":true,"ravenna.it":true,"rc.it":true,"re.it":true,"reggio-calabria.it":true,"reggio-emilia.it":true,"reggiocalabria.it":true,"reggioemilia.it":true,"rg.it":true,"ri.it":true,"rieti.it":true,"rimini.it":true,"rm.it":true,"rn.it":true,"ro.it":true,"roma.it":true,"rome.it":true,"rovigo.it":true,"sa.it":true,"salerno.it":true,"sassari.it":true,"savona.it":true,"si.it":true,"siena.it":true,"siracusa.it":true,"so.it":true,"sondrio.it":true,"sp.it":true,"sr.it":true,"ss.it":true,"suedtirol.it":true,"sv.it":true,"ta.it":true,"taranto.it":true,"te.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"teramo.it":true,"terni.it":true,"tn.it":true,"to.it":true,"torino.it":true,"tp.it":true,"tr.it":true,"trani-andria-barletta.it":true,"trani-barletta-andria.it":true,"traniandriabarletta.it":true,"tranibarlettaandria.it":true,"trapani.it":true,"trentino.it":true,"trento.it":true,"treviso.it":true,"trieste.it":true,"ts.it":true,"turin.it":true,"tv.it":true,"ud.it":true,"udine.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"va.it":true,"varese.it":true,"vb.it":true,"vc.it":true,"ve.it":true,"venezia.it":true,"venice.it":true,"verbania.it":true,"vercelli.it":true,"verona.it":true,"vi.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vicenza.it":true,"viterbo.it":true,"vr.it":true,"vs.it":true,"vt.it":true,"vv.it":true,je:true,"co.je":true,"net.je":true,"org.je":true,"*.jm":true,jo:true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,jobs:true,jp:true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"aichi.jp":true,"akita.jp":true,"aomori.jp":true,"chiba.jp":true,"ehime.jp":true,"fukui.jp":true,"fukuoka.jp":true,"fukushima.jp":true,"gifu.jp":true,"gunma.jp":true,"hiroshima.jp":true,"hokkaido.jp":true,"hyogo.jp":true,"ibaraki.jp":true,"ishikawa.jp":true,"iwate.jp":true,"kagawa.jp":true,"kagoshima.jp":true,"kanagawa.jp":true,"kochi.jp":true,"kumamoto.jp":true,"kyoto.jp":true,"mie.jp":true,"miyagi.jp":true,"miyazaki.jp":true,"nagano.jp":true,"nagasaki.jp":true,"nara.jp":true,"niigata.jp":true,"oita.jp":true,"okayama.jp":true,"okinawa.jp":true,"osaka.jp":true,"saga.jp":true,"saitama.jp":true,"shiga.jp":true,"shimane.jp":true,"shizuoka.jp":true,"tochigi.jp":true,"tokushima.jp":true,"tokyo.jp":true,"tottori.jp":true,"toyama.jp":true,"wakayama.jp":true,"yamagata.jp":true,"yamaguchi.jp":true,"yamanashi.jp":true,"xn--4pvxs.jp":true,"xn--vgu402c.jp":true,"xn--c3s14m.jp":true,"xn--f6qx53a.jp":true,"xn--8pvr4u.jp":true,"xn--uist22h.jp":true,"xn--djrs72d6uy.jp":true,"xn--mkru45i.jp":true,"xn--0trq7p7nn.jp":true,"xn--8ltr62k.jp":true,"xn--2m4a15e.jp":true,"xn--efvn9s.jp":true,"xn--32vp30h.jp":true,"xn--4it797k.jp":true,"xn--1lqs71d.jp":true,"xn--5rtp49c.jp":true,"xn--5js045d.jp":true,"xn--ehqz56n.jp":true,"xn--1lqs03n.jp":true,"xn--qqqt11m.jp":true,"xn--kbrq7o.jp":true,"xn--pssu33l.jp":true,"xn--ntsq17g.jp":true,"xn--uisz3g.jp":true,"xn--6btw5a.jp":true,"xn--1ctwo.jp":true,"xn--6orx2r.jp":true,"xn--rht61e.jp":true,"xn--rht27z.jp":true,"xn--djty4k.jp":true,"xn--nit225k.jp":true,"xn--rht3d.jp":true,"xn--klty5x.jp":true,"xn--kltx9a.jp":true,"xn--kltp7d.jp":true,"xn--uuwu58a.jp":true,"xn--zbx025d.jp":true,"xn--ntso0iqx3a.jp":true,"xn--elqq16h.jp":true,"xn--4it168d.jp":true,"xn--klt787d.jp":true,"xn--rny31h.jp":true,"xn--7t0a264c.jp":true,"xn--5rtq34k.jp":true,"xn--k7yn95e.jp":true,"xn--tor131o.jp":true,"xn--d5qv7z876c.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.nagoya.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.yokohama.jp":true,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.nagoya.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.yokohama.jp":false,"aisai.aichi.jp":true,"ama.aichi.jp":true,"anjo.aichi.jp":true,"asuke.aichi.jp":true,"chiryu.aichi.jp":true,"chita.aichi.jp":true,"fuso.aichi.jp":true,"gamagori.aichi.jp":true,"handa.aichi.jp":true,"hazu.aichi.jp":true,"hekinan.aichi.jp":true,"higashiura.aichi.jp":true,"ichinomiya.aichi.jp":true,"inazawa.aichi.jp":true,"inuyama.aichi.jp":true,"isshiki.aichi.jp":true,"iwakura.aichi.jp":true,"kanie.aichi.jp":true,"kariya.aichi.jp":true,"kasugai.aichi.jp":true,"kira.aichi.jp":true,"kiyosu.aichi.jp":true,"komaki.aichi.jp":true,"konan.aichi.jp":true,"kota.aichi.jp":true,"mihama.aichi.jp":true,"miyoshi.aichi.jp":true,"nishio.aichi.jp":true,"nisshin.aichi.jp":true,"obu.aichi.jp":true,"oguchi.aichi.jp":true,"oharu.aichi.jp":true,"okazaki.aichi.jp":true,"owariasahi.aichi.jp":true,"seto.aichi.jp":true,"shikatsu.aichi.jp":true,"shinshiro.aichi.jp":true,"shitara.aichi.jp":true,"tahara.aichi.jp":true,"takahama.aichi.jp":true,"tobishima.aichi.jp":true,"toei.aichi.jp":true,"togo.aichi.jp":true,"tokai.aichi.jp":true,"tokoname.aichi.jp":true,"toyoake.aichi.jp":true,"toyohashi.aichi.jp":true,"toyokawa.aichi.jp":true,"toyone.aichi.jp":true,"toyota.aichi.jp":true,"tsushima.aichi.jp":true,"yatomi.aichi.jp":true,"akita.akita.jp":true,"daisen.akita.jp":true,"fujisato.akita.jp":true,"gojome.akita.jp":true,"hachirogata.akita.jp":true,"happou.akita.jp":true,"higashinaruse.akita.jp":true,"honjo.akita.jp":true,"honjyo.akita.jp":true,"ikawa.akita.jp":true,"kamikoani.akita.jp":true,"kamioka.akita.jp":true,"katagami.akita.jp":true,"kazuno.akita.jp":true,"kitaakita.akita.jp":true,"kosaka.akita.jp":true,"kyowa.akita.jp":true,"misato.akita.jp":true,"mitane.akita.jp":true,"moriyoshi.akita.jp":true,"nikaho.akita.jp":true,"noshiro.akita.jp":true,"odate.akita.jp":true,"oga.akita.jp":true,"ogata.akita.jp":true,"semboku.akita.jp":true,"yokote.akita.jp":true,"yurihonjo.akita.jp":true,"aomori.aomori.jp":true,"gonohe.aomori.jp":true,"hachinohe.aomori.jp":true,"hashikami.aomori.jp":true,"hiranai.aomori.jp":true,"hirosaki.aomori.jp":true,"itayanagi.aomori.jp":true,"kuroishi.aomori.jp":true,"misawa.aomori.jp":true,"mutsu.aomori.jp":true,"nakadomari.aomori.jp":true,"noheji.aomori.jp":true,"oirase.aomori.jp":true,"owani.aomori.jp":true,"rokunohe.aomori.jp":true,"sannohe.aomori.jp":true,"shichinohe.aomori.jp":true,"shingo.aomori.jp":true,"takko.aomori.jp":true,"towada.aomori.jp":true,"tsugaru.aomori.jp":true,"tsuruta.aomori.jp":true,"abiko.chiba.jp":true,"asahi.chiba.jp":true,"chonan.chiba.jp":true,"chosei.chiba.jp":true,"choshi.chiba.jp":true,"chuo.chiba.jp":true,"funabashi.chiba.jp":true,"futtsu.chiba.jp":true,"hanamigawa.chiba.jp":true,"ichihara.chiba.jp":true,"ichikawa.chiba.jp":true,"ichinomiya.chiba.jp":true,"inzai.chiba.jp":true,"isumi.chiba.jp":true,"kamagaya.chiba.jp":true,"kamogawa.chiba.jp":true,"kashiwa.chiba.jp":true,"katori.chiba.jp":true,"katsuura.chiba.jp":true,"kimitsu.chiba.jp":true,"kisarazu.chiba.jp":true,"kozaki.chiba.jp":true,"kujukuri.chiba.jp":true,"kyonan.chiba.jp":true,"matsudo.chiba.jp":true,"midori.chiba.jp":true,"mihama.chiba.jp":true,"minamiboso.chiba.jp":true,"mobara.chiba.jp":true,"mutsuzawa.chiba.jp":true,"nagara.chiba.jp":true,"nagareyama.chiba.jp":true,"narashino.chiba.jp":true,"narita.chiba.jp":true,"noda.chiba.jp":true,"oamishirasato.chiba.jp":true,"omigawa.chiba.jp":true,"onjuku.chiba.jp":true,"otaki.chiba.jp":true,"sakae.chiba.jp":true,"sakura.chiba.jp":true,"shimofusa.chiba.jp":true,"shirako.chiba.jp":true,"shiroi.chiba.jp":true,"shisui.chiba.jp":true,"sodegaura.chiba.jp":true,"sosa.chiba.jp":true,"tako.chiba.jp":true,"tateyama.chiba.jp":true,"togane.chiba.jp":true,"tohnosho.chiba.jp":true,"tomisato.chiba.jp":true,"urayasu.chiba.jp":true,"yachimata.chiba.jp":true,"yachiyo.chiba.jp":true,"yokaichiba.chiba.jp":true,"yokoshibahikari.chiba.jp":true,"yotsukaido.chiba.jp":true,"ainan.ehime.jp":true,"honai.ehime.jp":true,"ikata.ehime.jp":true,"imabari.ehime.jp":true,"iyo.ehime.jp":true,"kamijima.ehime.jp":true,"kihoku.ehime.jp":true,"kumakogen.ehime.jp":true,"masaki.ehime.jp":true,"matsuno.ehime.jp":true,"matsuyama.ehime.jp":true,"namikata.ehime.jp":true,"niihama.ehime.jp":true,"ozu.ehime.jp":true,"saijo.ehime.jp":true,"seiyo.ehime.jp":true,"shikokuchuo.ehime.jp":true,"tobe.ehime.jp":true,"toon.ehime.jp":true,"uchiko.ehime.jp":true,"uwajima.ehime.jp":true,"yawatahama.ehime.jp":true,"echizen.fukui.jp":true,"eiheiji.fukui.jp":true,"fukui.fukui.jp":true,"ikeda.fukui.jp":true,"katsuyama.fukui.jp":true,"mihama.fukui.jp":true,"minamiechizen.fukui.jp":true,"obama.fukui.jp":true,"ohi.fukui.jp":true,"ono.fukui.jp":true,"sabae.fukui.jp":true,"sakai.fukui.jp":true,"takahama.fukui.jp":true,"tsuruga.fukui.jp":true,"wakasa.fukui.jp":true,"ashiya.fukuoka.jp":true,"buzen.fukuoka.jp":true,"chikugo.fukuoka.jp":true,"chikuho.fukuoka.jp":true,"chikujo.fukuoka.jp":true,"chikushino.fukuoka.jp":true,"chikuzen.fukuoka.jp":true,"chuo.fukuoka.jp":true,"dazaifu.fukuoka.jp":true,"fukuchi.fukuoka.jp":true,"hakata.fukuoka.jp":true,"higashi.fukuoka.jp":true,"hirokawa.fukuoka.jp":true,"hisayama.fukuoka.jp":true,"iizuka.fukuoka.jp":true,"inatsuki.fukuoka.jp":true,"kaho.fukuoka.jp":true,"kasuga.fukuoka.jp":true,"kasuya.fukuoka.jp":true,"kawara.fukuoka.jp":true,"keisen.fukuoka.jp":true,"koga.fukuoka.jp":true,"kurate.fukuoka.jp":true,"kurogi.fukuoka.jp":true,"kurume.fukuoka.jp":true,"minami.fukuoka.jp":true,"miyako.fukuoka.jp":true,"miyama.fukuoka.jp":true,"miyawaka.fukuoka.jp":true,"mizumaki.fukuoka.jp":true,"munakata.fukuoka.jp":true,"nakagawa.fukuoka.jp":true,"nakama.fukuoka.jp":true,"nishi.fukuoka.jp":true,"nogata.fukuoka.jp":true,"ogori.fukuoka.jp":true,"okagaki.fukuoka.jp":true,"okawa.fukuoka.jp":true,"oki.fukuoka.jp":true,"omuta.fukuoka.jp":true,"onga.fukuoka.jp":true,"onojo.fukuoka.jp":true,"oto.fukuoka.jp":true,"saigawa.fukuoka.jp":true,"sasaguri.fukuoka.jp":true,"shingu.fukuoka.jp":true,"shinyoshitomi.fukuoka.jp":true,"shonai.fukuoka.jp":true,"soeda.fukuoka.jp":true,"sue.fukuoka.jp":true,"tachiarai.fukuoka.jp":true,"tagawa.fukuoka.jp":true,"takata.fukuoka.jp":true,"toho.fukuoka.jp":true,"toyotsu.fukuoka.jp":true,"tsuiki.fukuoka.jp":true,"ukiha.fukuoka.jp":true,"umi.fukuoka.jp":true,"usui.fukuoka.jp":true,"yamada.fukuoka.jp":true,"yame.fukuoka.jp":true,"yanagawa.fukuoka.jp":true,"yukuhashi.fukuoka.jp":true,"aizubange.fukushima.jp":true,"aizumisato.fukushima.jp":true,"aizuwakamatsu.fukushima.jp":true,"asakawa.fukushima.jp":true,"bandai.fukushima.jp":true,"date.fukushima.jp":true,"fukushima.fukushima.jp":true,"furudono.fukushima.jp":true,"futaba.fukushima.jp":true,"hanawa.fukushima.jp":true,"higashi.fukushima.jp":true,"hirata.fukushima.jp":true,"hirono.fukushima.jp":true,"iitate.fukushima.jp":true,"inawashiro.fukushima.jp":true,"ishikawa.fukushima.jp":true,"iwaki.fukushima.jp":true,"izumizaki.fukushima.jp":true,"kagamiishi.fukushima.jp":true,"kaneyama.fukushima.jp":true,"kawamata.fukushima.jp":true,"kitakata.fukushima.jp":true,"kitashiobara.fukushima.jp":true,"koori.fukushima.jp":true,"koriyama.fukushima.jp":true,"kunimi.fukushima.jp":true,"miharu.fukushima.jp":true,"mishima.fukushima.jp":true,"namie.fukushima.jp":true,"nango.fukushima.jp":true,"nishiaizu.fukushima.jp":true,"nishigo.fukushima.jp":true,"okuma.fukushima.jp":true,"omotego.fukushima.jp":true,"ono.fukushima.jp":true,"otama.fukushima.jp":true,"samegawa.fukushima.jp":true,"shimogo.fukushima.jp":true,"shirakawa.fukushima.jp":true,"showa.fukushima.jp":true,"soma.fukushima.jp":true,"sukagawa.fukushima.jp":true,"taishin.fukushima.jp":true,"tamakawa.fukushima.jp":true,"tanagura.fukushima.jp":true,"tenei.fukushima.jp":true,"yabuki.fukushima.jp":true,"yamato.fukushima.jp":true,"yamatsuri.fukushima.jp":true,"yanaizu.fukushima.jp":true,"yugawa.fukushima.jp":true,"anpachi.gifu.jp":true,"ena.gifu.jp":true,"gifu.gifu.jp":true,"ginan.gifu.jp":true,"godo.gifu.jp":true,"gujo.gifu.jp":true,"hashima.gifu.jp":true,"hichiso.gifu.jp":true,"hida.gifu.jp":true,"higashishirakawa.gifu.jp":true,"ibigawa.gifu.jp":true,"ikeda.gifu.jp":true,"kakamigahara.gifu.jp":true,"kani.gifu.jp":true,"kasahara.gifu.jp":true,"kasamatsu.gifu.jp":true,"kawaue.gifu.jp":true,"kitagata.gifu.jp":true,"mino.gifu.jp":true,"minokamo.gifu.jp":true,"mitake.gifu.jp":true,"mizunami.gifu.jp":true,"motosu.gifu.jp":true,"nakatsugawa.gifu.jp":true,"ogaki.gifu.jp":true,"sakahogi.gifu.jp":true,"seki.gifu.jp":true,"sekigahara.gifu.jp":true,"shirakawa.gifu.jp":true,"tajimi.gifu.jp":true,"takayama.gifu.jp":true,"tarui.gifu.jp":true,"toki.gifu.jp":true,"tomika.gifu.jp":true,"wanouchi.gifu.jp":true,"yamagata.gifu.jp":true,"yaotsu.gifu.jp":true,"yoro.gifu.jp":true,"annaka.gunma.jp":true,"chiyoda.gunma.jp":true,"fujioka.gunma.jp":true,"higashiagatsuma.gunma.jp":true,"isesaki.gunma.jp":true,"itakura.gunma.jp":true,"kanna.gunma.jp":true,"kanra.gunma.jp":true,"katashina.gunma.jp":true,"kawaba.gunma.jp":true,"kiryu.gunma.jp":true,"kusatsu.gunma.jp":true,"maebashi.gunma.jp":true,"meiwa.gunma.jp":true,"midori.gunma.jp":true,"minakami.gunma.jp":true,"naganohara.gunma.jp":true,"nakanojo.gunma.jp":true,"nanmoku.gunma.jp":true,"numata.gunma.jp":true,"oizumi.gunma.jp":true,"ora.gunma.jp":true,"ota.gunma.jp":true,"shibukawa.gunma.jp":true,"shimonita.gunma.jp":true,"shinto.gunma.jp":true,"showa.gunma.jp":true,"takasaki.gunma.jp":true,"takayama.gunma.jp":true,"tamamura.gunma.jp":true,"tatebayashi.gunma.jp":true,"tomioka.gunma.jp":true,"tsukiyono.gunma.jp":true,"tsumagoi.gunma.jp":true,"ueno.gunma.jp":true,"yoshioka.gunma.jp":true,"asaminami.hiroshima.jp":true,"daiwa.hiroshima.jp":true,"etajima.hiroshima.jp":true,"fuchu.hiroshima.jp":true,"fukuyama.hiroshima.jp":true,"hatsukaichi.hiroshima.jp":true,"higashihiroshima.hiroshima.jp":true,"hongo.hiroshima.jp":true,"jinsekikogen.hiroshima.jp":true,"kaita.hiroshima.jp":true,"kui.hiroshima.jp":true,"kumano.hiroshima.jp":true,"kure.hiroshima.jp":true,"mihara.hiroshima.jp":true,"miyoshi.hiroshima.jp":true,"naka.hiroshima.jp":true,"onomichi.hiroshima.jp":true,"osakikamijima.hiroshima.jp":true,"otake.hiroshima.jp":true,"saka.hiroshima.jp":true,"sera.hiroshima.jp":true,"seranishi.hiroshima.jp":true,"shinichi.hiroshima.jp":true,"shobara.hiroshima.jp":true,"takehara.hiroshima.jp":true,"abashiri.hokkaido.jp":true,"abira.hokkaido.jp":true,"aibetsu.hokkaido.jp":true,"akabira.hokkaido.jp":true,"akkeshi.hokkaido.jp":true,"asahikawa.hokkaido.jp":true,"ashibetsu.hokkaido.jp":true,"ashoro.hokkaido.jp":true,"assabu.hokkaido.jp":true,"atsuma.hokkaido.jp":true,"bibai.hokkaido.jp":true,"biei.hokkaido.jp":true,"bifuka.hokkaido.jp":true,"bihoro.hokkaido.jp":true,"biratori.hokkaido.jp":true,"chippubetsu.hokkaido.jp":true,"chitose.hokkaido.jp":true,"date.hokkaido.jp":true,"ebetsu.hokkaido.jp":true,"embetsu.hokkaido.jp":true,"eniwa.hokkaido.jp":true,"erimo.hokkaido.jp":true,"esan.hokkaido.jp":true,"esashi.hokkaido.jp":true,"fukagawa.hokkaido.jp":true,"fukushima.hokkaido.jp":true,"furano.hokkaido.jp":true,"furubira.hokkaido.jp":true,"haboro.hokkaido.jp":true,"hakodate.hokkaido.jp":true,"hamatonbetsu.hokkaido.jp":true,"hidaka.hokkaido.jp":true,"higashikagura.hokkaido.jp":true,"higashikawa.hokkaido.jp":true,"hiroo.hokkaido.jp":true,"hokuryu.hokkaido.jp":true,"hokuto.hokkaido.jp":true,"honbetsu.hokkaido.jp":true,"horokanai.hokkaido.jp":true,"horonobe.hokkaido.jp":true,"ikeda.hokkaido.jp":true,"imakane.hokkaido.jp":true,"ishikari.hokkaido.jp":true,"iwamizawa.hokkaido.jp":true,"iwanai.hokkaido.jp":true,"kamifurano.hokkaido.jp":true,"kamikawa.hokkaido.jp":true,"kamishihoro.hokkaido.jp":true,"kamisunagawa.hokkaido.jp":true,"kamoenai.hokkaido.jp":true,"kayabe.hokkaido.jp":true,"kembuchi.hokkaido.jp":true,"kikonai.hokkaido.jp":true,"kimobetsu.hokkaido.jp":true,"kitahiroshima.hokkaido.jp":true,"kitami.hokkaido.jp":true,"kiyosato.hokkaido.jp":true,"koshimizu.hokkaido.jp":true,"kunneppu.hokkaido.jp":true,"kuriyama.hokkaido.jp":true,"kuromatsunai.hokkaido.jp":true,"kushiro.hokkaido.jp":true,"kutchan.hokkaido.jp":true,"kyowa.hokkaido.jp":true,"mashike.hokkaido.jp":true,"matsumae.hokkaido.jp":true,"mikasa.hokkaido.jp":true,"minamifurano.hokkaido.jp":true,"mombetsu.hokkaido.jp":true,"moseushi.hokkaido.jp":true,"mukawa.hokkaido.jp":true,"muroran.hokkaido.jp":true,"naie.hokkaido.jp":true,"nakagawa.hokkaido.jp":true,"nakasatsunai.hokkaido.jp":true,"nakatombetsu.hokkaido.jp":true,"nanae.hokkaido.jp":true,"nanporo.hokkaido.jp":true,"nayoro.hokkaido.jp":true,"nemuro.hokkaido.jp":true,"niikappu.hokkaido.jp":true,"niki.hokkaido.jp":true,"nishiokoppe.hokkaido.jp":true,"noboribetsu.hokkaido.jp":true,"numata.hokkaido.jp":true,"obihiro.hokkaido.jp":true,"obira.hokkaido.jp":true,"oketo.hokkaido.jp":true,"okoppe.hokkaido.jp":true,"otaru.hokkaido.jp":true,"otobe.hokkaido.jp":true,"otofuke.hokkaido.jp":true,"otoineppu.hokkaido.jp":true,"oumu.hokkaido.jp":true,"ozora.hokkaido.jp":true,"pippu.hokkaido.jp":true,"rankoshi.hokkaido.jp":true,"rebun.hokkaido.jp":true,"rikubetsu.hokkaido.jp":true,"rishiri.hokkaido.jp":true,"rishirifuji.hokkaido.jp":true,"saroma.hokkaido.jp":true,"sarufutsu.hokkaido.jp":true,"shakotan.hokkaido.jp":true,"shari.hokkaido.jp":true,"shibecha.hokkaido.jp":true,"shibetsu.hokkaido.jp":true,"shikabe.hokkaido.jp":true,"shikaoi.hokkaido.jp":true,"shimamaki.hokkaido.jp":true,"shimizu.hokkaido.jp":true,"shimokawa.hokkaido.jp":true,"shinshinotsu.hokkaido.jp":true,"shintoku.hokkaido.jp":true,"shiranuka.hokkaido.jp":true,"shiraoi.hokkaido.jp":true,"shiriuchi.hokkaido.jp":true,"sobetsu.hokkaido.jp":true,"sunagawa.hokkaido.jp":true,"taiki.hokkaido.jp":true,"takasu.hokkaido.jp":true,"takikawa.hokkaido.jp":true,"takinoue.hokkaido.jp":true,"teshikaga.hokkaido.jp":true,"tobetsu.hokkaido.jp":true,"tohma.hokkaido.jp":true,"tomakomai.hokkaido.jp":true,"tomari.hokkaido.jp":true,"toya.hokkaido.jp":true,"toyako.hokkaido.jp":true,"toyotomi.hokkaido.jp":true,"toyoura.hokkaido.jp":true,"tsubetsu.hokkaido.jp":true,"tsukigata.hokkaido.jp":true,"urakawa.hokkaido.jp":true,"urausu.hokkaido.jp":true,"uryu.hokkaido.jp":true,"utashinai.hokkaido.jp":true,"wakkanai.hokkaido.jp":true,"wassamu.hokkaido.jp":true,"yakumo.hokkaido.jp":true,"yoichi.hokkaido.jp":true,"aioi.hyogo.jp":true,"akashi.hyogo.jp":true,"ako.hyogo.jp":true,"amagasaki.hyogo.jp":true,"aogaki.hyogo.jp":true,"asago.hyogo.jp":true,"ashiya.hyogo.jp":true,"awaji.hyogo.jp":true,"fukusaki.hyogo.jp":true,"goshiki.hyogo.jp":true,"harima.hyogo.jp":true,"himeji.hyogo.jp":true,"ichikawa.hyogo.jp":true,"inagawa.hyogo.jp":true,"itami.hyogo.jp":true,"kakogawa.hyogo.jp":true,"kamigori.hyogo.jp":true,"kamikawa.hyogo.jp":true,"kasai.hyogo.jp":true,"kasuga.hyogo.jp":true,"kawanishi.hyogo.jp":true,"miki.hyogo.jp":true,"minamiawaji.hyogo.jp":true,"nishinomiya.hyogo.jp":true,"nishiwaki.hyogo.jp":true,"ono.hyogo.jp":true,"sanda.hyogo.jp":true,"sannan.hyogo.jp":true,"sasayama.hyogo.jp":true,"sayo.hyogo.jp":true,"shingu.hyogo.jp":true,"shinonsen.hyogo.jp":true,"shiso.hyogo.jp":true,"sumoto.hyogo.jp":true,"taishi.hyogo.jp":true,"taka.hyogo.jp":true,"takarazuka.hyogo.jp":true,"takasago.hyogo.jp":true,"takino.hyogo.jp":true,"tamba.hyogo.jp":true,"tatsuno.hyogo.jp":true,"toyooka.hyogo.jp":true,"yabu.hyogo.jp":true,"yashiro.hyogo.jp":true,"yoka.hyogo.jp":true,"yokawa.hyogo.jp":true,"ami.ibaraki.jp":true,"asahi.ibaraki.jp":true,"bando.ibaraki.jp":true,"chikusei.ibaraki.jp":true,"daigo.ibaraki.jp":true,"fujishiro.ibaraki.jp":true,"hitachi.ibaraki.jp":true,"hitachinaka.ibaraki.jp":true,"hitachiomiya.ibaraki.jp":true,"hitachiota.ibaraki.jp":true,"ibaraki.ibaraki.jp":true,"ina.ibaraki.jp":true,"inashiki.ibaraki.jp":true,"itako.ibaraki.jp":true,"iwama.ibaraki.jp":true,"joso.ibaraki.jp":true,"kamisu.ibaraki.jp":true,"kasama.ibaraki.jp":true,"kashima.ibaraki.jp":true,"kasumigaura.ibaraki.jp":true,"koga.ibaraki.jp":true,"miho.ibaraki.jp":true,"mito.ibaraki.jp":true,"moriya.ibaraki.jp":true,"naka.ibaraki.jp":true,"namegata.ibaraki.jp":true,"oarai.ibaraki.jp":true,"ogawa.ibaraki.jp":true,"omitama.ibaraki.jp":true,"ryugasaki.ibaraki.jp":true,"sakai.ibaraki.jp":true,"sakuragawa.ibaraki.jp":true,"shimodate.ibaraki.jp":true,"shimotsuma.ibaraki.jp":true,"shirosato.ibaraki.jp":true,"sowa.ibaraki.jp":true,"suifu.ibaraki.jp":true,"takahagi.ibaraki.jp":true,"tamatsukuri.ibaraki.jp":true,"tokai.ibaraki.jp":true,"tomobe.ibaraki.jp":true,"tone.ibaraki.jp":true,"toride.ibaraki.jp":true,"tsuchiura.ibaraki.jp":true,"tsukuba.ibaraki.jp":true,"uchihara.ibaraki.jp":true,"ushiku.ibaraki.jp":true,"yachiyo.ibaraki.jp":true,"yamagata.ibaraki.jp":true,"yawara.ibaraki.jp":true,"yuki.ibaraki.jp":true,"anamizu.ishikawa.jp":true,"hakui.ishikawa.jp":true,"hakusan.ishikawa.jp":true,"kaga.ishikawa.jp":true,"kahoku.ishikawa.jp":true,"kanazawa.ishikawa.jp":true,"kawakita.ishikawa.jp":true,"komatsu.ishikawa.jp":true,"nakanoto.ishikawa.jp":true,"nanao.ishikawa.jp":true,"nomi.ishikawa.jp":true,"nonoichi.ishikawa.jp":true,"noto.ishikawa.jp":true,"shika.ishikawa.jp":true,"suzu.ishikawa.jp":true,"tsubata.ishikawa.jp":true,"tsurugi.ishikawa.jp":true,"uchinada.ishikawa.jp":true,"wajima.ishikawa.jp":true,"fudai.iwate.jp":true,"fujisawa.iwate.jp":true,"hanamaki.iwate.jp":true,"hiraizumi.iwate.jp":true,"hirono.iwate.jp":true,"ichinohe.iwate.jp":true,"ichinoseki.iwate.jp":true,"iwaizumi.iwate.jp":true,"iwate.iwate.jp":true,"joboji.iwate.jp":true,"kamaishi.iwate.jp":true,"kanegasaki.iwate.jp":true,"karumai.iwate.jp":true,"kawai.iwate.jp":true,"kitakami.iwate.jp":true,"kuji.iwate.jp":true,"kunohe.iwate.jp":true,"kuzumaki.iwate.jp":true,"miyako.iwate.jp":true,"mizusawa.iwate.jp":true,"morioka.iwate.jp":true,"ninohe.iwate.jp":true,"noda.iwate.jp":true,"ofunato.iwate.jp":true,"oshu.iwate.jp":true,"otsuchi.iwate.jp":true,"rikuzentakata.iwate.jp":true,"shiwa.iwate.jp":true,"shizukuishi.iwate.jp":true,"sumita.iwate.jp":true,"tanohata.iwate.jp":true,"tono.iwate.jp":true,"yahaba.iwate.jp":true,"yamada.iwate.jp":true,"ayagawa.kagawa.jp":true,"higashikagawa.kagawa.jp":true,"kanonji.kagawa.jp":true,"kotohira.kagawa.jp":true,"manno.kagawa.jp":true,"marugame.kagawa.jp":true,"mitoyo.kagawa.jp":true,"naoshima.kagawa.jp":true,"sanuki.kagawa.jp":true,"tadotsu.kagawa.jp":true,"takamatsu.kagawa.jp":true,"tonosho.kagawa.jp":true,"uchinomi.kagawa.jp":true,"utazu.kagawa.jp":true,"zentsuji.kagawa.jp":true,"akune.kagoshima.jp":true,"amami.kagoshima.jp":true,"hioki.kagoshima.jp":true,"isa.kagoshima.jp":true,"isen.kagoshima.jp":true,"izumi.kagoshima.jp":true,"kagoshima.kagoshima.jp":true,"kanoya.kagoshima.jp":true,"kawanabe.kagoshima.jp":true,"kinko.kagoshima.jp":true,"kouyama.kagoshima.jp":true,"makurazaki.kagoshima.jp":true,"matsumoto.kagoshima.jp":true,"minamitane.kagoshima.jp":true,"nakatane.kagoshima.jp":true,"nishinoomote.kagoshima.jp":true,"satsumasendai.kagoshima.jp":true,"soo.kagoshima.jp":true,"tarumizu.kagoshima.jp":true,"yusui.kagoshima.jp":true,"aikawa.kanagawa.jp":true,"atsugi.kanagawa.jp":true,"ayase.kanagawa.jp":true,"chigasaki.kanagawa.jp":true,"ebina.kanagawa.jp":true,"fujisawa.kanagawa.jp":true,"hadano.kanagawa.jp":true,"hakone.kanagawa.jp":true,"hiratsuka.kanagawa.jp":true,"isehara.kanagawa.jp":true,"kaisei.kanagawa.jp":true,"kamakura.kanagawa.jp":true,"kiyokawa.kanagawa.jp":true,"matsuda.kanagawa.jp":true,"minamiashigara.kanagawa.jp":true,"miura.kanagawa.jp":true,"nakai.kanagawa.jp":true,"ninomiya.kanagawa.jp":true,"odawara.kanagawa.jp":true,"oi.kanagawa.jp":true,"oiso.kanagawa.jp":true,"sagamihara.kanagawa.jp":true,"samukawa.kanagawa.jp":true,"tsukui.kanagawa.jp":true,"yamakita.kanagawa.jp":true,"yamato.kanagawa.jp":true,"yokosuka.kanagawa.jp":true,"yugawara.kanagawa.jp":true,"zama.kanagawa.jp":true,"zushi.kanagawa.jp":true,"aki.kochi.jp":true,"geisei.kochi.jp":true,"hidaka.kochi.jp":true,"higashitsuno.kochi.jp":true,"ino.kochi.jp":true,"kagami.kochi.jp":true,"kami.kochi.jp":true,"kitagawa.kochi.jp":true,"kochi.kochi.jp":true,"mihara.kochi.jp":true,"motoyama.kochi.jp":true,"muroto.kochi.jp":true,"nahari.kochi.jp":true,"nakamura.kochi.jp":true,"nankoku.kochi.jp":true,"nishitosa.kochi.jp":true,"niyodogawa.kochi.jp":true,"ochi.kochi.jp":true,"okawa.kochi.jp":true,"otoyo.kochi.jp":true,"otsuki.kochi.jp":true,"sakawa.kochi.jp":true,"sukumo.kochi.jp":true,"susaki.kochi.jp":true,"tosa.kochi.jp":true,"tosashimizu.kochi.jp":true,"toyo.kochi.jp":true,"tsuno.kochi.jp":true,"umaji.kochi.jp":true,"yasuda.kochi.jp":true,"yusuhara.kochi.jp":true,"amakusa.kumamoto.jp":true,"arao.kumamoto.jp":true,"aso.kumamoto.jp":true,"choyo.kumamoto.jp":true,"gyokuto.kumamoto.jp":true,"hitoyoshi.kumamoto.jp":true,"kamiamakusa.kumamoto.jp":true,"kashima.kumamoto.jp":true,"kikuchi.kumamoto.jp":true,"kosa.kumamoto.jp":true,"kumamoto.kumamoto.jp":true,"mashiki.kumamoto.jp":true,"mifune.kumamoto.jp":true,"minamata.kumamoto.jp":true,"minamioguni.kumamoto.jp":true,"nagasu.kumamoto.jp":true,"nishihara.kumamoto.jp":true,"oguni.kumamoto.jp":true,"ozu.kumamoto.jp":true,"sumoto.kumamoto.jp":true,"takamori.kumamoto.jp":true,"uki.kumamoto.jp":true,"uto.kumamoto.jp":true,"yamaga.kumamoto.jp":true,"yamato.kumamoto.jp":true,"yatsushiro.kumamoto.jp":true,"ayabe.kyoto.jp":true,"fukuchiyama.kyoto.jp":true,"higashiyama.kyoto.jp":true,"ide.kyoto.jp":true,"ine.kyoto.jp":true,"joyo.kyoto.jp":true,"kameoka.kyoto.jp":true,"kamo.kyoto.jp":true,"kita.kyoto.jp":true,"kizu.kyoto.jp":true,"kumiyama.kyoto.jp":true,"kyotamba.kyoto.jp":true,"kyotanabe.kyoto.jp":true,"kyotango.kyoto.jp":true,"maizuru.kyoto.jp":true,"minami.kyoto.jp":true,"minamiyamashiro.kyoto.jp":true,"miyazu.kyoto.jp":true,"muko.kyoto.jp":true,"nagaokakyo.kyoto.jp":true,"nakagyo.kyoto.jp":true,"nantan.kyoto.jp":true,"oyamazaki.kyoto.jp":true,"sakyo.kyoto.jp":true,"seika.kyoto.jp":true,"tanabe.kyoto.jp":true,"uji.kyoto.jp":true,"ujitawara.kyoto.jp":true,"wazuka.kyoto.jp":true,"yamashina.kyoto.jp":true,"yawata.kyoto.jp":true,"asahi.mie.jp":true,"inabe.mie.jp":true,"ise.mie.jp":true,"kameyama.mie.jp":true,"kawagoe.mie.jp":true,"kiho.mie.jp":true,"kisosaki.mie.jp":true,"kiwa.mie.jp":true,"komono.mie.jp":true,"kumano.mie.jp":true,"kuwana.mie.jp":true,"matsusaka.mie.jp":true,"meiwa.mie.jp":true,"mihama.mie.jp":true,"minamiise.mie.jp":true,"misugi.mie.jp":true,"miyama.mie.jp":true,"nabari.mie.jp":true,"shima.mie.jp":true,"suzuka.mie.jp":true,"tado.mie.jp":true,"taiki.mie.jp":true,"taki.mie.jp":true,"tamaki.mie.jp":true,"toba.mie.jp":true,"tsu.mie.jp":true,"udono.mie.jp":true,"ureshino.mie.jp":true,"watarai.mie.jp":true,"yokkaichi.mie.jp":true,"furukawa.miyagi.jp":true,"higashimatsushima.miyagi.jp":true,"ishinomaki.miyagi.jp":true,"iwanuma.miyagi.jp":true,"kakuda.miyagi.jp":true,"kami.miyagi.jp":true,"kawasaki.miyagi.jp":true,"kesennuma.miyagi.jp":true,"marumori.miyagi.jp":true,"matsushima.miyagi.jp":true,"minamisanriku.miyagi.jp":true,"misato.miyagi.jp":true,"murata.miyagi.jp":true,"natori.miyagi.jp":true,"ogawara.miyagi.jp":true,"ohira.miyagi.jp":true,"onagawa.miyagi.jp":true,"osaki.miyagi.jp":true,"rifu.miyagi.jp":true,"semine.miyagi.jp":true,"shibata.miyagi.jp":true,"shichikashuku.miyagi.jp":true,"shikama.miyagi.jp":true,"shiogama.miyagi.jp":true,"shiroishi.miyagi.jp":true,"tagajo.miyagi.jp":true,"taiwa.miyagi.jp":true,"tome.miyagi.jp":true,"tomiya.miyagi.jp":true,"wakuya.miyagi.jp":true,"watari.miyagi.jp":true,"yamamoto.miyagi.jp":true,"zao.miyagi.jp":true,"aya.miyazaki.jp":true,"ebino.miyazaki.jp":true,"gokase.miyazaki.jp":true,"hyuga.miyazaki.jp":true,"kadogawa.miyazaki.jp":true,"kawaminami.miyazaki.jp":true,"kijo.miyazaki.jp":true,"kitagawa.miyazaki.jp":true,"kitakata.miyazaki.jp":true,"kitaura.miyazaki.jp":true,"kobayashi.miyazaki.jp":true,"kunitomi.miyazaki.jp":true,"kushima.miyazaki.jp":true,"mimata.miyazaki.jp":true,"miyakonojo.miyazaki.jp":true,"miyazaki.miyazaki.jp":true,"morotsuka.miyazaki.jp":true,"nichinan.miyazaki.jp":true,"nishimera.miyazaki.jp":true,"nobeoka.miyazaki.jp":true,"saito.miyazaki.jp":true,"shiiba.miyazaki.jp":true,"shintomi.miyazaki.jp":true,"takaharu.miyazaki.jp":true,"takanabe.miyazaki.jp":true,"takazaki.miyazaki.jp":true,"tsuno.miyazaki.jp":true,"achi.nagano.jp":true,"agematsu.nagano.jp":true,"anan.nagano.jp":true,"aoki.nagano.jp":true,"asahi.nagano.jp":true,"azumino.nagano.jp":true,"chikuhoku.nagano.jp":true,"chikuma.nagano.jp":true,"chino.nagano.jp":true,"fujimi.nagano.jp":true,"hakuba.nagano.jp":true,"hara.nagano.jp":true,"hiraya.nagano.jp":true,"iida.nagano.jp":true,"iijima.nagano.jp":true,"iiyama.nagano.jp":true,"iizuna.nagano.jp":true,"ikeda.nagano.jp":true,"ikusaka.nagano.jp":true,"ina.nagano.jp":true,"karuizawa.nagano.jp":true,"kawakami.nagano.jp":true,"kiso.nagano.jp":true,"kisofukushima.nagano.jp":true,"kitaaiki.nagano.jp":true,"komagane.nagano.jp":true,"komoro.nagano.jp":true,"matsukawa.nagano.jp":true,"matsumoto.nagano.jp":true,"miasa.nagano.jp":true,"minamiaiki.nagano.jp":true,"minamimaki.nagano.jp":true,"minamiminowa.nagano.jp":true,"minowa.nagano.jp":true,"miyada.nagano.jp":true,"miyota.nagano.jp":true,"mochizuki.nagano.jp":true,"nagano.nagano.jp":true,"nagawa.nagano.jp":true,"nagiso.nagano.jp":true,"nakagawa.nagano.jp":true,"nakano.nagano.jp":true,"nozawaonsen.nagano.jp":true,"obuse.nagano.jp":true,"ogawa.nagano.jp":true,"okaya.nagano.jp":true,"omachi.nagano.jp":true,"omi.nagano.jp":true,"ookuwa.nagano.jp":true,"ooshika.nagano.jp":true,"otaki.nagano.jp":true,"otari.nagano.jp":true,"sakae.nagano.jp":true,"sakaki.nagano.jp":true,"saku.nagano.jp":true,"sakuho.nagano.jp":true,"shimosuwa.nagano.jp":true,"shinanomachi.nagano.jp":true,"shiojiri.nagano.jp":true,"suwa.nagano.jp":true,"suzaka.nagano.jp":true,"takagi.nagano.jp":true,"takamori.nagano.jp":true,"takayama.nagano.jp":true,"tateshina.nagano.jp":true,"tatsuno.nagano.jp":true,"togakushi.nagano.jp":true,"togura.nagano.jp":true,"tomi.nagano.jp":true,"ueda.nagano.jp":true,"wada.nagano.jp":true,"yamagata.nagano.jp":true,"yamanouchi.nagano.jp":true,"yasaka.nagano.jp":true,"yasuoka.nagano.jp":true,"chijiwa.nagasaki.jp":true,"futsu.nagasaki.jp":true,"goto.nagasaki.jp":true,"hasami.nagasaki.jp":true,"hirado.nagasaki.jp":true,"iki.nagasaki.jp":true,"isahaya.nagasaki.jp":true,"kawatana.nagasaki.jp":true,"kuchinotsu.nagasaki.jp":true,"matsuura.nagasaki.jp":true,"nagasaki.nagasaki.jp":true,"obama.nagasaki.jp":true,"omura.nagasaki.jp":true,"oseto.nagasaki.jp":true,"saikai.nagasaki.jp":true,"sasebo.nagasaki.jp":true,"seihi.nagasaki.jp":true,"shimabara.nagasaki.jp":true,"shinkamigoto.nagasaki.jp":true,"togitsu.nagasaki.jp":true,"tsushima.nagasaki.jp":true,"unzen.nagasaki.jp":true,"ando.nara.jp":true,"gose.nara.jp":true,"heguri.nara.jp":true,"higashiyoshino.nara.jp":true,"ikaruga.nara.jp":true,"ikoma.nara.jp":true,"kamikitayama.nara.jp":true,"kanmaki.nara.jp":true,"kashiba.nara.jp":true,"kashihara.nara.jp":true,"katsuragi.nara.jp":true,"kawai.nara.jp":true,"kawakami.nara.jp":true,"kawanishi.nara.jp":true,"koryo.nara.jp":true,"kurotaki.nara.jp":true,"mitsue.nara.jp":true,"miyake.nara.jp":true,"nara.nara.jp":true,"nosegawa.nara.jp":true,"oji.nara.jp":true,"ouda.nara.jp":true,"oyodo.nara.jp":true,"sakurai.nara.jp":true,"sango.nara.jp":true,"shimoichi.nara.jp":true,"shimokitayama.nara.jp":true,"shinjo.nara.jp":true,"soni.nara.jp":true,"takatori.nara.jp":true,"tawaramoto.nara.jp":true,"tenkawa.nara.jp":true,"tenri.nara.jp":true,"uda.nara.jp":true,"yamatokoriyama.nara.jp":true,"yamatotakada.nara.jp":true,"yamazoe.nara.jp":true,"yoshino.nara.jp":true,"aga.niigata.jp":true,"agano.niigata.jp":true,"gosen.niigata.jp":true,"itoigawa.niigata.jp":true, -"izumozaki.niigata.jp":true,"joetsu.niigata.jp":true,"kamo.niigata.jp":true,"kariwa.niigata.jp":true,"kashiwazaki.niigata.jp":true,"minamiuonuma.niigata.jp":true,"mitsuke.niigata.jp":true,"muika.niigata.jp":true,"murakami.niigata.jp":true,"myoko.niigata.jp":true,"nagaoka.niigata.jp":true,"niigata.niigata.jp":true,"ojiya.niigata.jp":true,"omi.niigata.jp":true,"sado.niigata.jp":true,"sanjo.niigata.jp":true,"seiro.niigata.jp":true,"seirou.niigata.jp":true,"sekikawa.niigata.jp":true,"shibata.niigata.jp":true,"tagami.niigata.jp":true,"tainai.niigata.jp":true,"tochio.niigata.jp":true,"tokamachi.niigata.jp":true,"tsubame.niigata.jp":true,"tsunan.niigata.jp":true,"uonuma.niigata.jp":true,"yahiko.niigata.jp":true,"yoita.niigata.jp":true,"yuzawa.niigata.jp":true,"beppu.oita.jp":true,"bungoono.oita.jp":true,"bungotakada.oita.jp":true,"hasama.oita.jp":true,"hiji.oita.jp":true,"himeshima.oita.jp":true,"hita.oita.jp":true,"kamitsue.oita.jp":true,"kokonoe.oita.jp":true,"kuju.oita.jp":true,"kunisaki.oita.jp":true,"kusu.oita.jp":true,"oita.oita.jp":true,"saiki.oita.jp":true,"taketa.oita.jp":true,"tsukumi.oita.jp":true,"usa.oita.jp":true,"usuki.oita.jp":true,"yufu.oita.jp":true,"akaiwa.okayama.jp":true,"asakuchi.okayama.jp":true,"bizen.okayama.jp":true,"hayashima.okayama.jp":true,"ibara.okayama.jp":true,"kagamino.okayama.jp":true,"kasaoka.okayama.jp":true,"kibichuo.okayama.jp":true,"kumenan.okayama.jp":true,"kurashiki.okayama.jp":true,"maniwa.okayama.jp":true,"misaki.okayama.jp":true,"nagi.okayama.jp":true,"niimi.okayama.jp":true,"nishiawakura.okayama.jp":true,"okayama.okayama.jp":true,"satosho.okayama.jp":true,"setouchi.okayama.jp":true,"shinjo.okayama.jp":true,"shoo.okayama.jp":true,"soja.okayama.jp":true,"takahashi.okayama.jp":true,"tamano.okayama.jp":true,"tsuyama.okayama.jp":true,"wake.okayama.jp":true,"yakage.okayama.jp":true,"aguni.okinawa.jp":true,"ginowan.okinawa.jp":true,"ginoza.okinawa.jp":true,"gushikami.okinawa.jp":true,"haebaru.okinawa.jp":true,"higashi.okinawa.jp":true,"hirara.okinawa.jp":true,"iheya.okinawa.jp":true,"ishigaki.okinawa.jp":true,"ishikawa.okinawa.jp":true,"itoman.okinawa.jp":true,"izena.okinawa.jp":true,"kadena.okinawa.jp":true,"kin.okinawa.jp":true,"kitadaito.okinawa.jp":true,"kitanakagusuku.okinawa.jp":true,"kumejima.okinawa.jp":true,"kunigami.okinawa.jp":true,"minamidaito.okinawa.jp":true,"motobu.okinawa.jp":true,"nago.okinawa.jp":true,"naha.okinawa.jp":true,"nakagusuku.okinawa.jp":true,"nakijin.okinawa.jp":true,"nanjo.okinawa.jp":true,"nishihara.okinawa.jp":true,"ogimi.okinawa.jp":true,"okinawa.okinawa.jp":true,"onna.okinawa.jp":true,"shimoji.okinawa.jp":true,"taketomi.okinawa.jp":true,"tarama.okinawa.jp":true,"tokashiki.okinawa.jp":true,"tomigusuku.okinawa.jp":true,"tonaki.okinawa.jp":true,"urasoe.okinawa.jp":true,"uruma.okinawa.jp":true,"yaese.okinawa.jp":true,"yomitan.okinawa.jp":true,"yonabaru.okinawa.jp":true,"yonaguni.okinawa.jp":true,"zamami.okinawa.jp":true,"abeno.osaka.jp":true,"chihayaakasaka.osaka.jp":true,"chuo.osaka.jp":true,"daito.osaka.jp":true,"fujiidera.osaka.jp":true,"habikino.osaka.jp":true,"hannan.osaka.jp":true,"higashiosaka.osaka.jp":true,"higashisumiyoshi.osaka.jp":true,"higashiyodogawa.osaka.jp":true,"hirakata.osaka.jp":true,"ibaraki.osaka.jp":true,"ikeda.osaka.jp":true,"izumi.osaka.jp":true,"izumiotsu.osaka.jp":true,"izumisano.osaka.jp":true,"kadoma.osaka.jp":true,"kaizuka.osaka.jp":true,"kanan.osaka.jp":true,"kashiwara.osaka.jp":true,"katano.osaka.jp":true,"kawachinagano.osaka.jp":true,"kishiwada.osaka.jp":true,"kita.osaka.jp":true,"kumatori.osaka.jp":true,"matsubara.osaka.jp":true,"minato.osaka.jp":true,"minoh.osaka.jp":true,"misaki.osaka.jp":true,"moriguchi.osaka.jp":true,"neyagawa.osaka.jp":true,"nishi.osaka.jp":true,"nose.osaka.jp":true,"osakasayama.osaka.jp":true,"sakai.osaka.jp":true,"sayama.osaka.jp":true,"sennan.osaka.jp":true,"settsu.osaka.jp":true,"shijonawate.osaka.jp":true,"shimamoto.osaka.jp":true,"suita.osaka.jp":true,"tadaoka.osaka.jp":true,"taishi.osaka.jp":true,"tajiri.osaka.jp":true,"takaishi.osaka.jp":true,"takatsuki.osaka.jp":true,"tondabayashi.osaka.jp":true,"toyonaka.osaka.jp":true,"toyono.osaka.jp":true,"yao.osaka.jp":true,"ariake.saga.jp":true,"arita.saga.jp":true,"fukudomi.saga.jp":true,"genkai.saga.jp":true,"hamatama.saga.jp":true,"hizen.saga.jp":true,"imari.saga.jp":true,"kamimine.saga.jp":true,"kanzaki.saga.jp":true,"karatsu.saga.jp":true,"kashima.saga.jp":true,"kitagata.saga.jp":true,"kitahata.saga.jp":true,"kiyama.saga.jp":true,"kouhoku.saga.jp":true,"kyuragi.saga.jp":true,"nishiarita.saga.jp":true,"ogi.saga.jp":true,"omachi.saga.jp":true,"ouchi.saga.jp":true,"saga.saga.jp":true,"shiroishi.saga.jp":true,"taku.saga.jp":true,"tara.saga.jp":true,"tosu.saga.jp":true,"yoshinogari.saga.jp":true,"arakawa.saitama.jp":true,"asaka.saitama.jp":true,"chichibu.saitama.jp":true,"fujimi.saitama.jp":true,"fujimino.saitama.jp":true,"fukaya.saitama.jp":true,"hanno.saitama.jp":true,"hanyu.saitama.jp":true,"hasuda.saitama.jp":true,"hatogaya.saitama.jp":true,"hatoyama.saitama.jp":true,"hidaka.saitama.jp":true,"higashichichibu.saitama.jp":true,"higashimatsuyama.saitama.jp":true,"honjo.saitama.jp":true,"ina.saitama.jp":true,"iruma.saitama.jp":true,"iwatsuki.saitama.jp":true,"kamiizumi.saitama.jp":true,"kamikawa.saitama.jp":true,"kamisato.saitama.jp":true,"kasukabe.saitama.jp":true,"kawagoe.saitama.jp":true,"kawaguchi.saitama.jp":true,"kawajima.saitama.jp":true,"kazo.saitama.jp":true,"kitamoto.saitama.jp":true,"koshigaya.saitama.jp":true,"kounosu.saitama.jp":true,"kuki.saitama.jp":true,"kumagaya.saitama.jp":true,"matsubushi.saitama.jp":true,"minano.saitama.jp":true,"misato.saitama.jp":true,"miyashiro.saitama.jp":true,"miyoshi.saitama.jp":true,"moroyama.saitama.jp":true,"nagatoro.saitama.jp":true,"namegawa.saitama.jp":true,"niiza.saitama.jp":true,"ogano.saitama.jp":true,"ogawa.saitama.jp":true,"ogose.saitama.jp":true,"okegawa.saitama.jp":true,"omiya.saitama.jp":true,"otaki.saitama.jp":true,"ranzan.saitama.jp":true,"ryokami.saitama.jp":true,"saitama.saitama.jp":true,"sakado.saitama.jp":true,"satte.saitama.jp":true,"sayama.saitama.jp":true,"shiki.saitama.jp":true,"shiraoka.saitama.jp":true,"soka.saitama.jp":true,"sugito.saitama.jp":true,"toda.saitama.jp":true,"tokigawa.saitama.jp":true,"tokorozawa.saitama.jp":true,"tsurugashima.saitama.jp":true,"urawa.saitama.jp":true,"warabi.saitama.jp":true,"yashio.saitama.jp":true,"yokoze.saitama.jp":true,"yono.saitama.jp":true,"yorii.saitama.jp":true,"yoshida.saitama.jp":true,"yoshikawa.saitama.jp":true,"yoshimi.saitama.jp":true,"aisho.shiga.jp":true,"gamo.shiga.jp":true,"higashiomi.shiga.jp":true,"hikone.shiga.jp":true,"koka.shiga.jp":true,"konan.shiga.jp":true,"kosei.shiga.jp":true,"koto.shiga.jp":true,"kusatsu.shiga.jp":true,"maibara.shiga.jp":true,"moriyama.shiga.jp":true,"nagahama.shiga.jp":true,"nishiazai.shiga.jp":true,"notogawa.shiga.jp":true,"omihachiman.shiga.jp":true,"otsu.shiga.jp":true,"ritto.shiga.jp":true,"ryuoh.shiga.jp":true,"takashima.shiga.jp":true,"takatsuki.shiga.jp":true,"torahime.shiga.jp":true,"toyosato.shiga.jp":true,"yasu.shiga.jp":true,"akagi.shimane.jp":true,"ama.shimane.jp":true,"gotsu.shimane.jp":true,"hamada.shimane.jp":true,"higashiizumo.shimane.jp":true,"hikawa.shimane.jp":true,"hikimi.shimane.jp":true,"izumo.shimane.jp":true,"kakinoki.shimane.jp":true,"masuda.shimane.jp":true,"matsue.shimane.jp":true,"misato.shimane.jp":true,"nishinoshima.shimane.jp":true,"ohda.shimane.jp":true,"okinoshima.shimane.jp":true,"okuizumo.shimane.jp":true,"shimane.shimane.jp":true,"tamayu.shimane.jp":true,"tsuwano.shimane.jp":true,"unnan.shimane.jp":true,"yakumo.shimane.jp":true,"yasugi.shimane.jp":true,"yatsuka.shimane.jp":true,"arai.shizuoka.jp":true,"atami.shizuoka.jp":true,"fuji.shizuoka.jp":true,"fujieda.shizuoka.jp":true,"fujikawa.shizuoka.jp":true,"fujinomiya.shizuoka.jp":true,"fukuroi.shizuoka.jp":true,"gotemba.shizuoka.jp":true,"haibara.shizuoka.jp":true,"hamamatsu.shizuoka.jp":true,"higashiizu.shizuoka.jp":true,"ito.shizuoka.jp":true,"iwata.shizuoka.jp":true,"izu.shizuoka.jp":true,"izunokuni.shizuoka.jp":true,"kakegawa.shizuoka.jp":true,"kannami.shizuoka.jp":true,"kawanehon.shizuoka.jp":true,"kawazu.shizuoka.jp":true,"kikugawa.shizuoka.jp":true,"kosai.shizuoka.jp":true,"makinohara.shizuoka.jp":true,"matsuzaki.shizuoka.jp":true,"minamiizu.shizuoka.jp":true,"mishima.shizuoka.jp":true,"morimachi.shizuoka.jp":true,"nishiizu.shizuoka.jp":true,"numazu.shizuoka.jp":true,"omaezaki.shizuoka.jp":true,"shimada.shizuoka.jp":true,"shimizu.shizuoka.jp":true,"shimoda.shizuoka.jp":true,"shizuoka.shizuoka.jp":true,"susono.shizuoka.jp":true,"yaizu.shizuoka.jp":true,"yoshida.shizuoka.jp":true,"ashikaga.tochigi.jp":true,"bato.tochigi.jp":true,"haga.tochigi.jp":true,"ichikai.tochigi.jp":true,"iwafune.tochigi.jp":true,"kaminokawa.tochigi.jp":true,"kanuma.tochigi.jp":true,"karasuyama.tochigi.jp":true,"kuroiso.tochigi.jp":true,"mashiko.tochigi.jp":true,"mibu.tochigi.jp":true,"moka.tochigi.jp":true,"motegi.tochigi.jp":true,"nasu.tochigi.jp":true,"nasushiobara.tochigi.jp":true,"nikko.tochigi.jp":true,"nishikata.tochigi.jp":true,"nogi.tochigi.jp":true,"ohira.tochigi.jp":true,"ohtawara.tochigi.jp":true,"oyama.tochigi.jp":true,"sakura.tochigi.jp":true,"sano.tochigi.jp":true,"shimotsuke.tochigi.jp":true,"shioya.tochigi.jp":true,"takanezawa.tochigi.jp":true,"tochigi.tochigi.jp":true,"tsuga.tochigi.jp":true,"ujiie.tochigi.jp":true,"utsunomiya.tochigi.jp":true,"yaita.tochigi.jp":true,"aizumi.tokushima.jp":true,"anan.tokushima.jp":true,"ichiba.tokushima.jp":true,"itano.tokushima.jp":true,"kainan.tokushima.jp":true,"komatsushima.tokushima.jp":true,"matsushige.tokushima.jp":true,"mima.tokushima.jp":true,"minami.tokushima.jp":true,"miyoshi.tokushima.jp":true,"mugi.tokushima.jp":true,"nakagawa.tokushima.jp":true,"naruto.tokushima.jp":true,"sanagochi.tokushima.jp":true,"shishikui.tokushima.jp":true,"tokushima.tokushima.jp":true,"wajiki.tokushima.jp":true,"adachi.tokyo.jp":true,"akiruno.tokyo.jp":true,"akishima.tokyo.jp":true,"aogashima.tokyo.jp":true,"arakawa.tokyo.jp":true,"bunkyo.tokyo.jp":true,"chiyoda.tokyo.jp":true,"chofu.tokyo.jp":true,"chuo.tokyo.jp":true,"edogawa.tokyo.jp":true,"fuchu.tokyo.jp":true,"fussa.tokyo.jp":true,"hachijo.tokyo.jp":true,"hachioji.tokyo.jp":true,"hamura.tokyo.jp":true,"higashikurume.tokyo.jp":true,"higashimurayama.tokyo.jp":true,"higashiyamato.tokyo.jp":true,"hino.tokyo.jp":true,"hinode.tokyo.jp":true,"hinohara.tokyo.jp":true,"inagi.tokyo.jp":true,"itabashi.tokyo.jp":true,"katsushika.tokyo.jp":true,"kita.tokyo.jp":true,"kiyose.tokyo.jp":true,"kodaira.tokyo.jp":true,"koganei.tokyo.jp":true,"kokubunji.tokyo.jp":true,"komae.tokyo.jp":true,"koto.tokyo.jp":true,"kouzushima.tokyo.jp":true,"kunitachi.tokyo.jp":true,"machida.tokyo.jp":true,"meguro.tokyo.jp":true,"minato.tokyo.jp":true,"mitaka.tokyo.jp":true,"mizuho.tokyo.jp":true,"musashimurayama.tokyo.jp":true,"musashino.tokyo.jp":true,"nakano.tokyo.jp":true,"nerima.tokyo.jp":true,"ogasawara.tokyo.jp":true,"okutama.tokyo.jp":true,"ome.tokyo.jp":true,"oshima.tokyo.jp":true,"ota.tokyo.jp":true,"setagaya.tokyo.jp":true,"shibuya.tokyo.jp":true,"shinagawa.tokyo.jp":true,"shinjuku.tokyo.jp":true,"suginami.tokyo.jp":true,"sumida.tokyo.jp":true,"tachikawa.tokyo.jp":true,"taito.tokyo.jp":true,"tama.tokyo.jp":true,"toshima.tokyo.jp":true,"chizu.tottori.jp":true,"hino.tottori.jp":true,"kawahara.tottori.jp":true,"koge.tottori.jp":true,"kotoura.tottori.jp":true,"misasa.tottori.jp":true,"nanbu.tottori.jp":true,"nichinan.tottori.jp":true,"sakaiminato.tottori.jp":true,"tottori.tottori.jp":true,"wakasa.tottori.jp":true,"yazu.tottori.jp":true,"yonago.tottori.jp":true,"asahi.toyama.jp":true,"fuchu.toyama.jp":true,"fukumitsu.toyama.jp":true,"funahashi.toyama.jp":true,"himi.toyama.jp":true,"imizu.toyama.jp":true,"inami.toyama.jp":true,"johana.toyama.jp":true,"kamiichi.toyama.jp":true,"kurobe.toyama.jp":true,"nakaniikawa.toyama.jp":true,"namerikawa.toyama.jp":true,"nanto.toyama.jp":true,"nyuzen.toyama.jp":true,"oyabe.toyama.jp":true,"taira.toyama.jp":true,"takaoka.toyama.jp":true,"tateyama.toyama.jp":true,"toga.toyama.jp":true,"tonami.toyama.jp":true,"toyama.toyama.jp":true,"unazuki.toyama.jp":true,"uozu.toyama.jp":true,"yamada.toyama.jp":true,"arida.wakayama.jp":true,"aridagawa.wakayama.jp":true,"gobo.wakayama.jp":true,"hashimoto.wakayama.jp":true,"hidaka.wakayama.jp":true,"hirogawa.wakayama.jp":true,"inami.wakayama.jp":true,"iwade.wakayama.jp":true,"kainan.wakayama.jp":true,"kamitonda.wakayama.jp":true,"katsuragi.wakayama.jp":true,"kimino.wakayama.jp":true,"kinokawa.wakayama.jp":true,"kitayama.wakayama.jp":true,"koya.wakayama.jp":true,"koza.wakayama.jp":true,"kozagawa.wakayama.jp":true,"kudoyama.wakayama.jp":true,"kushimoto.wakayama.jp":true,"mihama.wakayama.jp":true,"misato.wakayama.jp":true,"nachikatsuura.wakayama.jp":true,"shingu.wakayama.jp":true,"shirahama.wakayama.jp":true,"taiji.wakayama.jp":true,"tanabe.wakayama.jp":true,"wakayama.wakayama.jp":true,"yuasa.wakayama.jp":true,"yura.wakayama.jp":true,"asahi.yamagata.jp":true,"funagata.yamagata.jp":true,"higashine.yamagata.jp":true,"iide.yamagata.jp":true,"kahoku.yamagata.jp":true,"kaminoyama.yamagata.jp":true,"kaneyama.yamagata.jp":true,"kawanishi.yamagata.jp":true,"mamurogawa.yamagata.jp":true,"mikawa.yamagata.jp":true,"murayama.yamagata.jp":true,"nagai.yamagata.jp":true,"nakayama.yamagata.jp":true,"nanyo.yamagata.jp":true,"nishikawa.yamagata.jp":true,"obanazawa.yamagata.jp":true,"oe.yamagata.jp":true,"oguni.yamagata.jp":true,"ohkura.yamagata.jp":true,"oishida.yamagata.jp":true,"sagae.yamagata.jp":true,"sakata.yamagata.jp":true,"sakegawa.yamagata.jp":true,"shinjo.yamagata.jp":true,"shirataka.yamagata.jp":true,"shonai.yamagata.jp":true,"takahata.yamagata.jp":true,"tendo.yamagata.jp":true,"tozawa.yamagata.jp":true,"tsuruoka.yamagata.jp":true,"yamagata.yamagata.jp":true,"yamanobe.yamagata.jp":true,"yonezawa.yamagata.jp":true,"yuza.yamagata.jp":true,"abu.yamaguchi.jp":true,"hagi.yamaguchi.jp":true,"hikari.yamaguchi.jp":true,"hofu.yamaguchi.jp":true,"iwakuni.yamaguchi.jp":true,"kudamatsu.yamaguchi.jp":true,"mitou.yamaguchi.jp":true,"nagato.yamaguchi.jp":true,"oshima.yamaguchi.jp":true,"shimonoseki.yamaguchi.jp":true,"shunan.yamaguchi.jp":true,"tabuse.yamaguchi.jp":true,"tokuyama.yamaguchi.jp":true,"toyota.yamaguchi.jp":true,"ube.yamaguchi.jp":true,"yuu.yamaguchi.jp":true,"chuo.yamanashi.jp":true,"doshi.yamanashi.jp":true,"fuefuki.yamanashi.jp":true,"fujikawa.yamanashi.jp":true,"fujikawaguchiko.yamanashi.jp":true,"fujiyoshida.yamanashi.jp":true,"hayakawa.yamanashi.jp":true,"hokuto.yamanashi.jp":true,"ichikawamisato.yamanashi.jp":true,"kai.yamanashi.jp":true,"kofu.yamanashi.jp":true,"koshu.yamanashi.jp":true,"kosuge.yamanashi.jp":true,"minami-alps.yamanashi.jp":true,"minobu.yamanashi.jp":true,"nakamichi.yamanashi.jp":true,"nanbu.yamanashi.jp":true,"narusawa.yamanashi.jp":true,"nirasaki.yamanashi.jp":true,"nishikatsura.yamanashi.jp":true,"oshino.yamanashi.jp":true,"otsuki.yamanashi.jp":true,"showa.yamanashi.jp":true,"tabayama.yamanashi.jp":true,"tsuru.yamanashi.jp":true,"uenohara.yamanashi.jp":true,"yamanakako.yamanashi.jp":true,"yamanashi.yamanashi.jp":true,"*.ke":true,kg:true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,ki:true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,km:true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,kn:true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,kp:true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,kr:true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,ky:true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,kz:true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,la:true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,lb:true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,lc:true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,li:true,lk:true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"ac.lk":true,lr:true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,ls:true,"co.ls":true,"org.ls":true,lt:true,"gov.lt":true,lu:true,lv:true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,ly:true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,ma:true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,mc:true,"tm.mc":true,"asso.mc":true,md:true,me:true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,mg:true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"co.mg":true,mh:true,mil:true,mk:true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,ml:true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,mn:true,"gov.mn":true,"edu.mn":true,"org.mn":true,mo:true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,mobi:true,mp:true,mq:true,mr:true,"gov.mr":true,ms:true,"com.ms":true,"edu.ms":true,"gov.ms":true,"net.ms":true,"org.ms":true,mt:true,"com.mt":true,"edu.mt":true,"net.mt":true,"org.mt":true,mu:true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,museum:true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,mv:true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,mw:true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,mx:true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,my:true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"teledata.mz":false,na:true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true, -"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,name:true,nc:true,"asso.nc":true,ne:true,net:true,nf:true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,ng:true,"com.ng":true,"edu.ng":true,"name.ng":true,"net.ng":true,"org.ng":true,"sch.ng":true,"gov.ng":true,"mil.ng":true,"mobi.ng":true,"*.ni":true,nl:true,"bv.nl":true,no:true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,nr:true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,nu:true,nz:true,"ac.nz":true,"co.nz":true,"cri.nz":true,"geek.nz":true,"gen.nz":true,"govt.nz":true,"health.nz":true,"iwi.nz":true,"kiwi.nz":true,"maori.nz":true,"mil.nz":true,"xn--mori-qsa.nz":true,"net.nz":true,"org.nz":true,"parliament.nz":true,"school.nz":true,om:true,"co.om":true,"com.om":true,"edu.om":true,"gov.om":true,"med.om":true,"museum.om":true,"net.om":true,"org.om":true,"pro.om":true,org:true,pa:true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,pe:true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,pf:true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,ph:true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,pk:true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,pl:true,"com.pl":true,"net.pl":true,"org.pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"gov.pl":true,"ap.gov.pl":true,"ic.gov.pl":true,"is.gov.pl":true,"us.gov.pl":true,"kmpsp.gov.pl":true,"kppsp.gov.pl":true,"kwpsp.gov.pl":true,"psp.gov.pl":true,"wskr.gov.pl":true,"kwp.gov.pl":true,"mw.gov.pl":true,"ug.gov.pl":true,"um.gov.pl":true,"umig.gov.pl":true,"ugim.gov.pl":true,"upow.gov.pl":true,"uw.gov.pl":true,"starostwo.gov.pl":true,"pa.gov.pl":true,"po.gov.pl":true,"psse.gov.pl":true,"pup.gov.pl":true,"rzgw.gov.pl":true,"sa.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"wsa.gov.pl":true,"sko.gov.pl":true,"uzs.gov.pl":true,"wiih.gov.pl":true,"winb.gov.pl":true,"pinb.gov.pl":true,"wios.gov.pl":true,"witd.gov.pl":true,"wzmiuw.gov.pl":true,"piw.gov.pl":true,"wiw.gov.pl":true,"griw.gov.pl":true,"wif.gov.pl":true,"oum.gov.pl":true,"sdn.gov.pl":true,"zp.gov.pl":true,"uppo.gov.pl":true,"mup.gov.pl":true,"wuoz.gov.pl":true,"konsulat.gov.pl":true,"oirm.gov.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,pm:true,pn:true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,post:true,pr:true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,pro:true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,ps:true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,pt:true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,pw:true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,py:true,"com.py":true,"coop.py":true,"edu.py":true,"gov.py":true,"mil.py":true,"net.py":true,"org.py":true,qa:true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,re:true,"com.re":true,"asso.re":true,"nom.re":true,ro:true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,rs:true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,ru:true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,rw:true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,sa:true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,sb:true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,sc:true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,sd:true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"tv.sd":true,"gov.sd":true,"info.sd":true,se:true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,sg:true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,sh:true,"com.sh":true,"net.sh":true,"gov.sh":true,"org.sh":true,"mil.sh":true,si:true,sj:true,sk:true,sl:true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,sm:true,sn:true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,so:true,"com.so":true,"net.so":true,"org.so":true,sr:true,st:true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,su:true,"adygeya.su":true,"arkhangelsk.su":true,"balashov.su":true,"bashkiria.su":true,"bryansk.su":true,"dagestan.su":true,"grozny.su":true,"ivanovo.su":true,"kalmykia.su":true,"kaluga.su":true,"karelia.su":true,"khakassia.su":true,"krasnodar.su":true,"kurgan.su":true,"lenug.su":true,"mordovia.su":true,"msk.su":true,"murmansk.su":true,"nalchik.su":true,"nov.su":true,"obninsk.su":true,"penza.su":true,"pokrovsk.su":true,"sochi.su":true,"spb.su":true,"togliatti.su":true,"troitsk.su":true,"tula.su":true,"tuva.su":true,"vladikavkaz.su":true,"vladimir.su":true,"vologda.su":true,sv:true,"com.sv":true,"edu.sv":true,"gob.sv":true,"org.sv":true,"red.sv":true,sx:true,"gov.sx":true,sy:true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,sz:true,"co.sz":true,"ac.sz":true,"org.sz":true,tc:true,td:true,tel:true,tf:true,tg:true,th:true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,tj:true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,tk:true,tl:true,"gov.tl":true,tm:true,"com.tm":true,"co.tm":true,"org.tm":true,"net.tm":true,"nom.tm":true,"gov.tm":true,"mil.tm":true,"edu.tm":true,tn:true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,to:true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,tp:true,tr:true,"com.tr":true,"info.tr":true,"biz.tr":true,"net.tr":true,"org.tr":true,"web.tr":true,"gen.tr":true,"tv.tr":true,"av.tr":true,"dr.tr":true,"bbs.tr":true,"name.tr":true,"tel.tr":true,"gov.tr":true,"bel.tr":true,"pol.tr":true,"mil.tr":true,"k12.tr":true,"edu.tr":true,"kep.tr":true,"nc.tr":true,"gov.nc.tr":true,travel:true,tt:true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,tv:true,tw:true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,tz:true,"ac.tz":true,"co.tz":true,"go.tz":true,"hotel.tz":true,"info.tz":true,"me.tz":true,"mil.tz":true,"mobi.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"tv.tz":true,ua:true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"cherkasy.ua":true,"chernigov.ua":true,"chernihiv.ua":true,"chernivtsi.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"cr.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"dnipropetrovsk.ua":true,"dominic.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkiv.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"khmelnytskyi.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"krym.ua":true,"ks.ua":true,"kv.ua":true,"kyiv.ua":true,"lg.ua":true,"lt.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lv.ua":true,"lviv.ua":true,"mk.ua":true,"mykolaiv.ua":true,"nikolaev.ua":true,"od.ua":true,"odesa.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rivne.ua":true,"rovno.ua":true,"rv.ua":true,"sb.ua":true,"sebastopol.ua":true,"sevastopol.ua":true,"sm.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uz.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vinnytsia.ua":true,"vn.ua":true,"volyn.ua":true,"yalta.ua":true,"zaporizhzhe.ua":true,"zaporizhzhia.ua":true,"zhitomir.ua":true,"zhytomyr.ua":true,"zp.ua":true,"zt.ua":true,ug:true,"co.ug":true,"or.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"com.ug":true,"org.ug":true,uk:true,"ac.uk":true,"co.uk":true,"gov.uk":true,"ltd.uk":true,"me.uk":true,"net.uk":true,"nhs.uk":true,"org.uk":true,"plc.uk":true,"police.uk":true,"*.sch.uk":true,us:true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true, -"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,uy:true,"com.uy":true,"edu.uy":true,"gub.uy":true,"mil.uy":true,"net.uy":true,"org.uy":true,uz:true,"co.uz":true,"com.uz":true,"net.uz":true,"org.uz":true,va:true,vc:true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,ve:true,"arts.ve":true,"co.ve":true,"com.ve":true,"e12.ve":true,"edu.ve":true,"firm.ve":true,"gob.ve":true,"gov.ve":true,"info.ve":true,"int.ve":true,"mil.ve":true,"net.ve":true,"org.ve":true,"rec.ve":true,"store.ve":true,"tec.ve":true,"web.ve":true,vg:true,vi:true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,vn:true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,vu:true,"com.vu":true,"edu.vu":true,"net.vu":true,"org.vu":true,wf:true,ws:true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,yt:true,"xn--mgbaam7a8h":true,"xn--y9a3aq":true,"xn--54b7fta0cc":true,"xn--90ais":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--qxam":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbtx2b":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--80ao21a":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--d1alf":true,"xn--l1acc":true,"xn--mix891f":true,"xn--mix082f":true,"xn--mgbx4cd0ab":true,"xn--mgb9awbf":true,"xn--mgbai9azgqp6j":true,"xn--mgbai9a5eva00b":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--o1ac.xn--90a3ac":true,"xn--c1avg.xn--90a3ac":true,"xn--90azh.xn--90a3ac":true,"xn--d1at.xn--90a3ac":true,"xn--o1ach.xn--90a3ac":true,"xn--80au.xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--mgbpl2fh":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,xxx:true,"*.ye":true,"ac.za":true,"agrica.za":true,"alt.za":true,"co.za":true,"edu.za":true,"gov.za":true,"grondar.za":true,"law.za":true,"mil.za":true,"net.za":true,"ngo.za":true,"nis.za":true,"nom.za":true,"org.za":true,"school.za":true,"tm.za":true,"web.za":true,"*.zm":true,"*.zw":true,aaa:true,aarp:true,abarth:true,abb:true,abbott:true,abbvie:true,abc:true,able:true,abogado:true,abudhabi:true,academy:true,accenture:true,accountant:true,accountants:true,aco:true,active:true,actor:true,adac:true,ads:true,adult:true,aeg:true,aetna:true,afamilycompany:true,afl:true,africa:true,africamagic:true,agakhan:true,agency:true,aig:true,aigo:true,airbus:true,airforce:true,airtel:true,akdn:true,alfaromeo:true,alibaba:true,alipay:true,allfinanz:true,allstate:true,ally:true,alsace:true,alstom:true,americanexpress:true,americanfamily:true,amex:true,amfam:true,amica:true,amsterdam:true,analytics:true,android:true,anquan:true,anz:true,aol:true,apartments:true,app:true,apple:true,aquarelle:true,aramco:true,archi:true,army:true,arte:true,asda:true,associates:true,athleta:true,attorney:true,auction:true,audi:true,audible:true,audio:true,auspost:true,author:true,auto:true,autos:true,avianca:true,aws:true,axa:true,azure:true,baby:true,baidu:true,banamex:true,bananarepublic:true,band:true,bank:true,bar:true,barcelona:true,barclaycard:true,barclays:true,barefoot:true,bargains:true,basketball:true,bauhaus:true,bayern:true,bbc:true,bbt:true,bbva:true,bcg:true,bcn:true,beats:true,beer:true,bentley:true,berlin:true,best:true,bestbuy:true,bet:true,bharti:true,bible:true,bid:true,bike:true,bing:true,bingo:true,bio:true,black:true,blackfriday:true,blanco:true,blockbuster:true,blog:true,bloomberg:true,blue:true,bms:true,bmw:true,bnl:true,bnpparibas:true,boats:true,boehringer:true,bofa:true,bom:true,bond:true,boo:true,book:true,booking:true,boots:true,bosch:true,bostik:true,bot:true,boutique:true,bradesco:true,bridgestone:true,broadway:true,broker:true,brother:true,brussels:true,budapest:true,bugatti:true,build:true,builders:true,business:true,buy:true,buzz:true,bzh:true,cab:true,cafe:true,cal:true,call:true,calvinklein:true,camera:true,camp:true,cancerresearch:true,canon:true,capetown:true,capital:true,capitalone:true,car:true,caravan:true,cards:true,care:true,career:true,careers:true,cars:true,cartier:true,casa:true,case:true,caseih:true,cash:true,casino:true,catering:true,cba:true,cbn:true,cbre:true,cbs:true,ceb:true,center:true,ceo:true,cern:true,cfa:true,cfd:true,chanel:true,channel:true,chase:true,chat:true,cheap:true,chintai:true,chloe:true,christmas:true,chrome:true,chrysler:true,church:true,cipriani:true,circle:true,cisco:true,citadel:true,citi:true,citic:true,city:true,cityeats:true,claims:true,cleaning:true,click:true,clinic:true,clothing:true,cloud:true,club:true,clubmed:true,coach:true,codes:true,coffee:true,college:true,cologne:true,comcast:true,commbank:true,community:true,company:true,computer:true,comsec:true,condos:true,construction:true,consulting:true,contact:true,contractors:true,cooking:true,cookingchannel:true,cool:true,corsica:true,country:true,coupon:true,coupons:true,courses:true,credit:true,creditcard:true,creditunion:true,cricket:true,crown:true,crs:true,cruises:true,csc:true,cuisinella:true,cymru:true,cyou:true,dabur:true,dad:true,dance:true,date:true,dating:true,datsun:true,day:true,dclk:true,dds:true,deal:true,dealer:true,deals:true,degree:true,delivery:true,dell:true,deloitte:true,delta:true,democrat:true,dental:true,dentist:true,desi:true,design:true,dev:true,dhl:true,diamonds:true,diet:true,digital:true,direct:true,directory:true,discount:true,discover:true,dish:true,dnp:true,docs:true,dodge:true,dog:true,doha:true,domains:true,doosan:true,dot:true,download:true,drive:true,dstv:true,dtv:true,dubai:true,duck:true,dunlop:true,duns:true,dupont:true,durban:true,dvag:true,dwg:true,earth:true,eat:true,edeka:true,education:true,email:true,emerck:true,emerson:true,energy:true,engineer:true,engineering:true,enterprises:true,epost:true,epson:true,equipment:true,ericsson:true,erni:true,esq:true,estate:true,esurance:true,etisalat:true,eurovision:true,eus:true,events:true,everbank:true,exchange:true,expert:true,exposed:true,express:true,extraspace:true,fage:true,fail:true,fairwinds:true,faith:true,family:true,fan:true,fans:true,farm:true,farmers:true,fashion:true,fast:true,fedex:true,feedback:true,ferrari:true,ferrero:true,fiat:true,fidelity:true,fido:true,film:true,final:true,finance:true,financial:true,fire:true,firestone:true,firmdale:true,fish:true,fishing:true,fit:true,fitness:true,flickr:true,flights:true,flir:true,florist:true,flowers:true,flsmidth:true,fly:true,foo:true,foodnetwork:true,football:true,ford:true,forex:true,forsale:true,forum:true,foundation:true,fox:true,fresenius:true,frl:true,frogans:true,frontdoor:true,frontier:true,ftr:true,fujitsu:true,fujixerox:true,fund:true,furniture:true,futbol:true,fyi:true,gal:true,gallery:true,gallo:true,gallup:true,game:true,games:true,gap:true,garden:true,gbiz:true,gdn:true,gea:true,gent:true,genting:true,george:true,ggee:true,gift:true,gifts:true,gives:true,giving:true,glade:true,glass:true,gle:true,global:true,globo:true,gmail:true,gmo:true,gmx:true,godaddy:true,gold:true,goldpoint:true,golf:true,goo:true,goodhands:true,goodyear:true,goog:true,google:true,gop:true,got:true,gotv:true,grainger:true,graphics:true,gratis:true,green:true,gripe:true,group:true,guardian:true,gucci:true,guge:true,guide:true,guitars:true,guru:true,hamburg:true,hangout:true,haus:true,hbo:true,hdfc:true,hdfcbank:true,health:true,healthcare:true,help:true,helsinki:true,here:true,hermes:true,hgtv:true,hiphop:true,hisamitsu:true,hitachi:true,hiv:true,hkt:true,hockey:true,holdings:true,holiday:true,homedepot:true,homegoods:true,homes:true,homesense:true,honda:true,honeywell:true,horse:true,host:true,hosting:true,hot:true,hoteles:true,hotmail:true,house:true,how:true,hsbc:true,htc:true,hughes:true,hyatt:true,hyundai:true,ibm:true,icbc:true,ice:true,icu:true,ieee:true,ifm:true,iinet:true,ikano:true,imamat:true,imdb:true,immo:true,immobilien:true,industries:true,infiniti:true,ing:true,ink:true,institute:true,insurance:true,insure:true,intel:true,international:true,intuit:true,investments:true,ipiranga:true,irish:true,iselect:true,ismaili:true,ist:true,istanbul:true,itau:true,itv:true,iveco:true,iwc:true,jaguar:true,java:true,jcb:true,jcp:true,jeep:true,jetzt:true,jewelry:true,jio:true,jlc:true,jll:true,jmp:true,jnj:true,joburg:true,jot:true,joy:true,jpmorgan:true,jprs:true,juegos:true,juniper:true,kaufen:true,kddi:true,kerryhotels:true,kerrylogistics:true,kerryproperties:true,kfh:true,kia:true,kim:true,kinder:true,kindle:true,kitchen:true,kiwi:true,koeln:true,komatsu:true,kosher:true,kpmg:true,kpn:true,krd:true,kred:true,kuokgroup:true,kyknet:true,kyoto:true,lacaixa:true,ladbrokes:true,lamborghini:true,lancaster:true,lancia:true,lancome:true,land:true,landrover:true,lanxess:true,lasalle:true,lat:true,latino:true,latrobe:true,law:true,lawyer:true,lds:true,lease:true,leclerc:true,lefrak:true,legal:true,lego:true,lexus:true,lgbt:true,liaison:true,lidl:true,life:true,lifeinsurance:true,lifestyle:true,lighting:true,like:true,lilly:true,limited:true,limo:true,lincoln:true,linde:true,link:true,lipsy:true,live:true,living:true,lixil:true,loan:true,loans:true,locker:true,locus:true,loft:true,lol:true,london:true,lotte:true,lotto:true,love:true,lpl:true,lplfinancial:true,ltd:true,ltda:true,lundbeck:true,lupin:true,luxe:true,luxury:true,macys:true,madrid:true,maif:true,maison:true,makeup:true,man:true,management:true,mango:true,market:true,marketing:true,markets:true,marriott:true,marshalls:true,maserati:true,mattel:true,mba:true,mcd:true,mcdonalds:true,mckinsey:true,med:true,media:true,meet:true,melbourne:true,meme:true,memorial:true,men:true,menu:true,meo:true,metlife:true,miami:true,microsoft:true,mini:true,mint:true,mit:true,mitsubishi:true,mlb:true,mls:true,mma:true,mnet:true,mobily:true,moda:true,moe:true,moi:true,mom:true,monash:true,money:true,monster:true,montblanc:true,mopar:true,mormon:true,mortgage:true,moscow:true,moto:true,motorcycles:true,mov:true,movie:true,movistar:true,msd:true,mtn:true,mtpc:true,mtr:true,multichoice:true,mutual:true,mutuelle:true,mzansimagic:true,nab:true,nadex:true,nagoya:true,naspers:true,nationwide:true,natura:true,navy:true,nba:true,nec:true,netbank:true,netflix:true,network:true,neustar:true,new:true,newholland:true,news:true,next:true,nextdirect:true,nexus:true,nfl:true,ngo:true,nhk:true,nico:true,nike:true,nikon:true,ninja:true,nissan:true,nokia:true,northwesternmutual:true,norton:true,now:true,nowruz:true,nowtv:true,nra:true,nrw:true,ntt:true,nyc:true,obi:true,observer:true,off:true,office:true,okinawa:true,olayan:true,olayangroup:true,oldnavy:true,ollo:true,omega:true,one:true,ong:true,onl:true,online:true,onyourside:true,ooo:true,open:true,oracle:true,orange:true,organic:true,orientexpress:true,osaka:true,otsuka:true,ott:true,ovh:true,page:true,pamperedchef:true,panasonic:true,panerai:true,paris:true,pars:true,partners:true,parts:true,party:true,passagens:true,pay:true,payu:true,pccw:true,pet:true,pfizer:true,pharmacy:true,philips:true,photo:true,photography:true,photos:true,physio:true,piaget:true,pics:true,pictet:true,pictures:true,pid:true,pin:true,ping:true,pink:true,pioneer:true,pizza:true,place:true,play:true,playstation:true,plumbing:true,plus:true,pnc:true,pohl:true,poker:true,politie:true,porn:true,pramerica:true,praxi:true,press:true,prime:true,prod:true,productions:true,prof:true,progressive:true,promo:true,properties:true,property:true,protection:true,pru:true,prudential:true,pub:true,qpon:true,quebec:true,quest:true,qvc:true,racing:true,raid:true,read:true,realestate:true,realtor:true,realty:true,recipes:true,red:true,redstone:true,redumbrella:true,rehab:true,reise:true,reisen:true,reit:true,reliance:true,ren:true,rent:true,rentals:true,repair:true,report:true,republican:true,rest:true,restaurant:true,review:true,reviews:true,rexroth:true,rich:true,richardli:true,ricoh:true,rightathome:true,ril:true,rio:true,rip:true,rocher:true,rocks:true,rodeo:true,rogers:true,room:true,rsvp:true,ruhr:true,run:true,rwe:true,ryukyu:true,saarland:true,safe:true,safety:true,sakura:true,sale:true,salon:true,samsclub:true,samsung:true,sandvik:true,sandvikcoromant:true,sanofi:true,sap:true,sapo:true,sarl:true,sas:true,save:true,saxo:true,sbi:true,sbs:true,sca:true,scb:true,schaeffler:true,schmidt:true,scholarships:true,school:true,schule:true,schwarz:true,science:true,scjohnson:true,scor:true,scot:true,seat:true,secure:true,security:true,seek:true,sener:true,services:true,ses:true,seven:true,sew:true,sex:true,sexy:true,sfr:true,shangrila:true,sharp:true,shaw:true,shell:true,shia:true,shiksha:true,shoes:true,shouji:true,show:true,showtime:true,shriram:true,silk:true,sina:true,singles:true,site:true,ski:true,skin:true,sky:true,skype:true,sling:true,smart:true,smile:true,sncf:true,soccer:true,social:true,softbank:true,software:true,sohu:true,solar:true,solutions:true,song:true,sony:true,soy:true,space:true,spiegel:true,spot:true,spreadbetting:true,srl:true,srt:true,stada:true,staples:true,star:true,starhub:true,statebank:true,statefarm:true,statoil:true,stc:true,stcgroup:true,stockholm:true,storage:true,store:true,studio:true,study:true,style:true,sucks:true,supersport:true,supplies:true,supply:true,support:true,surf:true,surgery:true,suzuki:true,swatch:true,swiftcover:true,swiss:true,sydney:true,symantec:true,systems:true,tab:true,taipei:true,talk:true,taobao:true,target:true,tatamotors:true,tatar:true,tattoo:true,tax:true,taxi:true,tci:true,tdk:true,team:true,tech:true,technology:true,telecity:true,telefonica:true,temasek:true,tennis:true,teva:true,thd:true,theater:true,theatre:true,theguardian:true,tiaa:true,tickets:true,tienda:true,tiffany:true,tips:true,tires:true,tirol:true,tjmaxx:true,tjx:true,tkmaxx:true,tmall:true,today:true,tokyo:true,tools:true,top:true,toray:true,toshiba:true,total:true,tours:true,town:true,toyota:true,toys:true,trade:true,trading:true,training:true,travelchannel:true,travelers:true,travelersinsurance:true,trust:true,trv:true,tube:true,tui:true,tunes:true,tushu:true,tvs:true,ubank:true,ubs:true,uconnect:true,university:true,uno:true,uol:true,ups:true,vacations:true,vana:true,vanguard:true,vegas:true,ventures:true,verisign:true,versicherung:true,vet:true,viajes:true,video:true,vig:true,viking:true,villas:true,vin:true,vip:true,virgin:true,visa:true,vision:true,vista:true,vistaprint:true,viva:true,vivo:true,vlaanderen:true,vodka:true,volkswagen:true,vote:true,voting:true,voto:true,voyage:true,vuelos:true,wales:true,walmart:true,walter:true,wang:true,wanggou:true,warman:true,watch:true,watches:true,weather:true,weatherchannel:true,webcam:true,weber:true,website:true,wed:true,wedding:true,weibo:true,weir:true,whoswho:true,wien:true,wiki:true,williamhill:true,win:true,windows:true,wine:true,winners:true,wme:true,wolterskluwer:true,woodside:true,work:true,works:true,world:true,wtc:true,wtf:true,xbox:true,xerox:true,xfinity:true,xihuan:true,xin:true,"xn--11b4c3d":true,"xn--1ck2e1b":true,"xn--1qqw23a":true,"xn--30rr7y":true,"xn--3bst00m":true,"xn--3ds443g":true,"xn--3oq18vl8pn36a":true,"xn--3pxu8k":true,"xn--42c2d9a":true,"xn--45q11c":true,"xn--4gbrim":true,"xn--4gq48lf9j":true,"xn--55qw42g":true,"xn--55qx5d":true,"xn--5su34j936bgsg":true,"xn--5tzm5g":true,"xn--6frz82g":true,"xn--6qq986b3xl":true,"xn--80adxhks":true,"xn--80asehdb":true,"xn--80aswg":true,"xn--8y0a063a":true,"xn--9dbq2a":true,"xn--9et52u":true,"xn--9krt00a":true,"xn--b4w605ferd":true,"xn--bck1b9a5dre4c":true,"xn--c1avg":true,"xn--c2br7g":true,"xn--cck2b3b":true,"xn--cg4bki":true,"xn--czr694b":true,"xn--czrs0t":true,"xn--czru2d":true,"xn--d1acj3b":true,"xn--eckvdtc9d":true,"xn--efvy88h":true,"xn--estv75g":true,"xn--fct429k":true,"xn--fhbei":true,"xn--fiq228c5hs":true,"xn--fiq64b":true,"xn--fjq720a":true,"xn--flw351e":true,"xn--fzys8d69uvgm":true,"xn--g2xx48c":true,"xn--gckr3f0f":true,"xn--hxt814e":true,"xn--i1b6b1a6a2e":true,"xn--imr513n":true,"xn--io0a7i":true,"xn--j1aef":true,"xn--jlq61u9w7b":true,"xn--jvr189m":true,"xn--kcrx77d1x4a":true,"xn--kpu716f":true,"xn--kput3i":true,"xn--mgba3a3ejt":true,"xn--mgba7c0bbn0a":true,"xn--mgbaakc7dvf":true,"xn--mgbab2bd":true,"xn--mgbb9fbpob":true,"xn--mgbca7dzdo":true,"xn--mgbt3dhd":true,"xn--mk1bu44c":true,"xn--mxtq1m":true,"xn--ngbc5azd":true,"xn--ngbe9e0a":true,"xn--nqv7f":true,"xn--nqv7fs00ema":true,"xn--nyqy26a":true,"xn--p1acf":true,"xn--pbt977c":true,"xn--pssy2u":true,"xn--q9jyb4c":true,"xn--qcka1pmc":true,"xn--rhqv96g":true,"xn--rovu88b":true,"xn--ses554g":true,"xn--t60b56a":true,"xn--tckwe":true,"xn--unup4y":true,"xn--vermgensberater-ctb":true,"xn--vermgensberatung-pwb":true,"xn--vhquv":true,"xn--vuq861b":true,"xn--w4r85el8fhu5dnra":true,"xn--w4rs40l":true,"xn--xhq521b":true,"xn--zfr164b":true,xperia:true,xyz:true,yachts:true,yahoo:true,yamaxun:true,yandex:true,yodobashi:true,yoga:true,yokohama:true,you:true,youtube:true,yun:true,zappos:true,zara:true,zero:true,zip:true,zippo:true,zone:true,zuerich:true,"cloudfront.net":true,"ap-northeast-1.compute.amazonaws.com":true,"ap-southeast-1.compute.amazonaws.com":true,"ap-southeast-2.compute.amazonaws.com":true,"cn-north-1.compute.amazonaws.cn":true,"compute.amazonaws.cn":true,"compute.amazonaws.com":true,"compute-1.amazonaws.com":true,"eu-west-1.compute.amazonaws.com":true,"eu-central-1.compute.amazonaws.com":true,"sa-east-1.compute.amazonaws.com":true,"us-east-1.amazonaws.com":true,"us-gov-west-1.compute.amazonaws.com":true,"us-west-1.compute.amazonaws.com":true,"us-west-2.compute.amazonaws.com":true,"z-1.compute-1.amazonaws.com":true,"z-2.compute-1.amazonaws.com":true,"elasticbeanstalk.com":true,"elb.amazonaws.com":true,"s3.amazonaws.com":true,"s3-ap-northeast-1.amazonaws.com":true,"s3-ap-southeast-1.amazonaws.com":true,"s3-ap-southeast-2.amazonaws.com":true,"s3-external-1.amazonaws.com":true,"s3-external-2.amazonaws.com":true,"s3-fips-us-gov-west-1.amazonaws.com":true,"s3-eu-central-1.amazonaws.com":true,"s3-eu-west-1.amazonaws.com":true,"s3-sa-east-1.amazonaws.com":true,"s3-us-gov-west-1.amazonaws.com":true,"s3-us-west-1.amazonaws.com":true,"s3-us-west-2.amazonaws.com":true,"s3.cn-north-1.amazonaws.com.cn":true,"s3.eu-central-1.amazonaws.com":true,"betainabox.com":true,"ae.org":true,"ar.com":true,"br.com":true,"cn.com":true,"com.de":true,"com.se":true,"de.com":true,"eu.com":true,"gb.com":true,"gb.net":true,"hu.com":true,"hu.net":true,"jp.net":true,"jpn.com":true,"kr.com":true,"mex.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"se.net":true,"uk.com":true,"uk.net":true,"us.com":true,"uy.com":true,"za.bz":true,"za.com":true,"africa.com":true,"gr.com":true,"in.net":true,"us.org":true,"co.com":true,"c.la":true,"cloudcontrolled.com":true,"cloudcontrolapp.com":true,"co.ca":true,"c.cdn77.org":true,"cdn77-ssl.net":true,"r.cdn77.net":true,"rsc.cdn77.org":true,"ssl.origin.cdn77-secure.org":true,"co.nl":true,"co.no":true,"*.platform.sh":true,"cupcake.is":true,"dreamhosters.com":true,"duckdns.org":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true,"eu.org":true,"al.eu.org":true,"asso.eu.org":true,"at.eu.org":true,"au.eu.org":true,"be.eu.org":true,"bg.eu.org":true,"ca.eu.org":true,"cd.eu.org":true,"ch.eu.org":true,"cn.eu.org":true,"cy.eu.org":true,"cz.eu.org":true,"de.eu.org":true,"dk.eu.org":true,"edu.eu.org":true,"ee.eu.org":true,"es.eu.org":true,"fi.eu.org":true,"fr.eu.org":true,"gr.eu.org":true,"hr.eu.org":true,"hu.eu.org":true,"ie.eu.org":true,"il.eu.org":true,"in.eu.org":true,"int.eu.org":true,"is.eu.org":true,"it.eu.org":true,"jp.eu.org":true,"kr.eu.org":true,"lt.eu.org":true,"lu.eu.org":true,"lv.eu.org":true,"mc.eu.org":true,"me.eu.org":true,"mk.eu.org":true,"mt.eu.org":true,"my.eu.org":true,"net.eu.org":true,"ng.eu.org":true,"nl.eu.org":true,"no.eu.org":true,"nz.eu.org":true,"paris.eu.org":true,"pl.eu.org":true,"pt.eu.org":true,"q-a.eu.org":true,"ro.eu.org":true,"ru.eu.org":true,"se.eu.org":true,"si.eu.org":true,"sk.eu.org":true,"tr.eu.org":true,"uk.eu.org":true,"us.eu.org":true,"a.ssl.fastly.net":true,"b.ssl.fastly.net":true,"global.ssl.fastly.net":true,"a.prod.fastly.net":true,"global.prod.fastly.net":true,"firebaseapp.com":true,"flynnhub.com":true,"service.gov.uk":true,"github.io":true,"githubusercontent.com":true,"ro.com":true,"appspot.com":true,"blogspot.ae":true,"blogspot.al":true,"blogspot.am":true,"blogspot.ba":true,"blogspot.be":true,"blogspot.bg":true,"blogspot.bj":true,"blogspot.ca":true,"blogspot.cf":true,"blogspot.ch":true,"blogspot.cl":true,"blogspot.co.at":true,"blogspot.co.id":true,"blogspot.co.il":true,"blogspot.co.ke":true,"blogspot.co.nz":true,"blogspot.co.uk":true,"blogspot.co.za":true,"blogspot.com":true,"blogspot.com.ar":true,"blogspot.com.au":true,"blogspot.com.br":true,"blogspot.com.by":true,"blogspot.com.co":true,"blogspot.com.cy":true,"blogspot.com.ee":true,"blogspot.com.eg":true,"blogspot.com.es":true,"blogspot.com.mt":true,"blogspot.com.ng":true,"blogspot.com.tr":true,"blogspot.com.uy":true,"blogspot.cv":true,"blogspot.cz":true,"blogspot.de":true,"blogspot.dk":true,"blogspot.fi":true,"blogspot.fr":true,"blogspot.gr":true,"blogspot.hk":true,"blogspot.hr":true,"blogspot.hu":true,"blogspot.ie":true,"blogspot.in":true,"blogspot.is":true,"blogspot.it":true,"blogspot.jp":true,"blogspot.kr":true,"blogspot.li":true,"blogspot.lt":true,"blogspot.lu":true,"blogspot.md":true,"blogspot.mk":true,"blogspot.mr":true,"blogspot.mx":true,"blogspot.my":true,"blogspot.nl":true,"blogspot.no":true,"blogspot.pe":true,"blogspot.pt":true,"blogspot.qa":true,"blogspot.re":true,"blogspot.ro":true,"blogspot.rs":true,"blogspot.ru":true,"blogspot.se":true,"blogspot.sg":true,"blogspot.si":true,"blogspot.sk":true,"blogspot.sn":true,"blogspot.td":true,"blogspot.tw":true,"blogspot.ug":true,"blogspot.vn":true,"codespot.com":true,"googleapis.com":true,"googlecode.com":true,"pagespeedmobilizer.com":true,"withgoogle.com":true,"withyoutube.com":true,"herokuapp.com":true,"herokussl.com":true,"iki.fi":true,"biz.at":true,"info.at":true,"co.pl":true,"azurewebsites.net":true,"azure-mobile.net":true,"cloudapp.net":true,"bmoattachments.org":true,"4u.com":true,"nfshost.com":true,"nyc.mn":true,"nid.io":true,"operaunite.com":true,"outsystemscloud.com":true,"art.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pantheon.io":true,"gotpantheon.com":true,"priv.at":true,"qa2.com":true,"rhcloud.com":true,"sandcats.io":true,"biz.ua":true,"co.ua":true,"pp.ua":true,"sinaapp.com":true,"vipsinaapp.com":true,"1kapp.com":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"hk.com":true,"hk.org":true,"ltd.hk":true,"inc.hk":true,"yolasite.com":true,"za.net":true,"za.org":true})},{punycode:205}],284:[function(require,module,exports){"use strict";function Store(){}exports.Store=Store;Store.prototype.synchronous=false;Store.prototype.findCookie=function(domain,path,key,cb){throw new Error("findCookie is not implemented")};Store.prototype.findCookies=function(domain,path,cb){throw new Error("findCookies is not implemented")};Store.prototype.putCookie=function(cookie,cb){throw new Error("putCookie is not implemented")};Store.prototype.updateCookie=function(oldCookie,newCookie,cb){throw new Error("updateCookie is not implemented")};Store.prototype.removeCookie=function(domain,path,key,cb){throw new Error("removeCookie is not implemented")};Store.prototype.removeCookies=function(domain,path,cb){throw new Error("removeCookies is not implemented")};Store.prototype.getAllCookies=function(cb){throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)")}},{}],285:[function(require,module,exports){module.exports={_args:[[{raw:"tough-cookie@~2.3.0",scope:null,escapedName:"tough-cookie",name:"tough-cookie",rawSpec:"~2.3.0",spec:">=2.3.0 <2.4.0",type:"range"},"/Users/jobi/Projects/eyevinn-labs/src/dash-validator/node_modules/request"]],_from:"tough-cookie@>=2.3.0 <2.4.0",_id:"tough-cookie@2.3.2",_inCache:true,_location:"/tough-cookie",_nodeVersion:"7.0.0",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/tough-cookie-2.3.2.tgz_1477415232912_0.6133609430398792"},_npmUser:{name:"jstash",email:"jstash@gmail.com"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"tough-cookie@~2.3.0",scope:null,escapedName:"tough-cookie",name:"tough-cookie",rawSpec:"~2.3.0",spec:">=2.3.0 <2.4.0",type:"range"},_requiredBy:["/bower-installer/request","/bower-registry-client/request","/request"],_resolved:"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",_shasum:"f081f76e4c85720e6c37a5faced737150d84072a", -_shrinkwrap:null,_spec:"tough-cookie@~2.3.0",_where:"/Users/jobi/Projects/eyevinn-labs/src/dash-validator/node_modules/request",author:{name:"Jeremy Stashewsky",email:"jstashewsky@salesforce.com"},bugs:{url:"https://github.com/salesforce/tough-cookie/issues"},contributors:[{name:"Alexander Savin"},{name:"Ian Livingstone"},{name:"Ivan Nikulin"},{name:"Lalit Kapoor"},{name:"Sam Thompson"},{name:"Sebastian Mayr"}],dependencies:{punycode:"^1.4.1"},description:"RFC6265 Cookies and Cookie Jar for node.js",devDependencies:{async:"^1.4.2","string.prototype.repeat":"^0.2.0",vows:"^0.8.1"},directories:{},dist:{shasum:"f081f76e4c85720e6c37a5faced737150d84072a",tarball:"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz"},engines:{node:">=0.8"},files:["lib"],gitHead:"2610df5dc8ef7373a483d509006e5887572a4076",homepage:"https://github.com/salesforce/tough-cookie",keywords:["HTTP","cookie","cookies","set-cookie","cookiejar","jar","RFC6265","RFC2965"],license:"BSD-3-Clause",main:"./lib/cookie",maintainers:[{name:"awaterma",email:"awaterma@awaterma.net"},{name:"jstash",email:"jstash@gmail.com"},{name:"nexxy",email:"emily@contactvibe.com"}],name:"tough-cookie",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/salesforce/tough-cookie.git"},scripts:{suffixup:"curl -o public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat && ./generate-pubsuffix.js",test:"vows test/*_test.js"},version:"2.3.2"}},{}],286:[function(require,module,exports){(function(process,Buffer){"use strict";var net=require("net"),tls=require("tls"),http=require("http"),https=require("https"),events=require("events"),assert=require("assert"),util=require("util");exports.httpOverHttp=httpOverHttp;exports.httpsOverHttp=httpsOverHttp;exports.httpOverHttps=httpOverHttps;exports.httpsOverHttps=httpsOverHttps;function httpOverHttp(options){var agent=new TunnelingAgent(options);agent.request=http.request;return agent}function httpsOverHttp(options){var agent=new TunnelingAgent(options);agent.request=http.request;agent.createSocket=createSecureSocket;agent.defaultPort=443;return agent}function httpOverHttps(options){var agent=new TunnelingAgent(options);agent.request=https.request;return agent}function httpsOverHttps(options){var agent=new TunnelingAgent(options);agent.request=https.request;agent.createSocket=createSecureSocket;agent.defaultPort=443;return agent}function TunnelingAgent(options){var self=this;self.options=options||{};self.proxyOptions=self.options.proxy||{};self.maxSockets=self.options.maxSockets||http.Agent.defaultMaxSockets;self.requests=[];self.sockets=[];self.on("free",function onFree(socket,host,port){for(var i=0,len=self.requests.length;i=this.maxSockets){self.requests.push({host:options.host,port:options.port,request:req});return}self.createConnection({host:options.host,port:options.port,request:req})};TunnelingAgent.prototype.createConnection=function createConnection(pending){var self=this;self.createSocket(pending,function(socket){socket.on("free",onFree);socket.on("close",onCloseOrRemove);socket.on("agentRemove",onCloseOrRemove);pending.request.onSocket(socket);function onFree(){self.emit("free",socket,pending.host,pending.port)}function onCloseOrRemove(err){self.removeSocket(socket);socket.removeListener("free",onFree);socket.removeListener("close",onCloseOrRemove);socket.removeListener("agentRemove",onCloseOrRemove)}})};TunnelingAgent.prototype.createSocket=function createSocket(options,cb){var self=this;var placeholder={};self.sockets.push(placeholder);var connectOptions=mergeOptions({},self.proxyOptions,{method:"CONNECT",path:options.host+":"+options.port,agent:false});if(connectOptions.proxyAuth){connectOptions.headers=connectOptions.headers||{};connectOptions.headers["Proxy-Authorization"]="Basic "+new Buffer(connectOptions.proxyAuth).toString("base64")}debug("making CONNECT request");var connectReq=self.request(connectOptions);connectReq.useChunkedEncodingByDefault=false;connectReq.once("response",onResponse);connectReq.once("upgrade",onUpgrade);connectReq.once("connect",onConnect);connectReq.once("error",onError);connectReq.end();function onResponse(res){res.upgrade=true}function onUpgrade(res,socket,head){process.nextTick(function(){onConnect(res,socket,head)})}function onConnect(res,socket,head){connectReq.removeAllListeners();socket.removeAllListeners();if(res.statusCode===200){assert.equal(head.length,0);debug("tunneling connection has established");self.sockets[self.sockets.indexOf(placeholder)]=socket;cb(socket)}else{debug("tunneling socket could not be established, statusCode=%d",res.statusCode);var error=new Error("tunneling socket could not be established, "+"statusCode="+res.statusCode);error.code="ECONNRESET";options.request.emit("error",error);self.removeSocket(placeholder)}}function onError(cause){connectReq.removeAllListeners();debug("tunneling socket could not be established, cause=%s\n",cause.message,cause.stack);var error=new Error("tunneling socket could not be established, "+"cause="+cause.message);error.code="ECONNRESET";options.request.emit("error",error);self.removeSocket(placeholder)}};TunnelingAgent.prototype.removeSocket=function removeSocket(socket){var pos=this.sockets.indexOf(socket);if(pos===-1)return;this.sockets.splice(pos,1);var pending=this.requests.shift();if(pending){this.createConnection(pending)}};function createSecureSocket(options,cb){var self=this;TunnelingAgent.prototype.createSocket.call(self,options,function(socket){var secureSocket=tls.connect(0,mergeOptions({},self.options,{servername:options.host,socket:socket}));self.sockets[self.sockets.indexOf(socket)]=secureSocket;cb(secureSocket)})}function mergeOptions(target){for(var i=1,len=arguments.length;i>24&255;x[i+1]=h>>16&255;x[i+2]=h>>8&255;x[i+3]=h&255;x[i+4]=l>>24&255;x[i+5]=l>>16&255;x[i+6]=l>>8&255;x[i+7]=l&255}function vn(x,xi,y,yi,n){var i,d=0;for(i=0;i>>8)-1}function crypto_verify_16(x,xi,y,yi){return vn(x,xi,y,yi,16)}function crypto_verify_32(x,xi,y,yi){return vn(x,xi,y,yi,32)}function core_salsa20(o,p,k,c){var j0=c[0]&255|(c[1]&255)<<8|(c[2]&255)<<16|(c[3]&255)<<24,j1=k[0]&255|(k[1]&255)<<8|(k[2]&255)<<16|(k[3]&255)<<24,j2=k[4]&255|(k[5]&255)<<8|(k[6]&255)<<16|(k[7]&255)<<24,j3=k[8]&255|(k[9]&255)<<8|(k[10]&255)<<16|(k[11]&255)<<24,j4=k[12]&255|(k[13]&255)<<8|(k[14]&255)<<16|(k[15]&255)<<24,j5=c[4]&255|(c[5]&255)<<8|(c[6]&255)<<16|(c[7]&255)<<24,j6=p[0]&255|(p[1]&255)<<8|(p[2]&255)<<16|(p[3]&255)<<24,j7=p[4]&255|(p[5]&255)<<8|(p[6]&255)<<16|(p[7]&255)<<24,j8=p[8]&255|(p[9]&255)<<8|(p[10]&255)<<16|(p[11]&255)<<24,j9=p[12]&255|(p[13]&255)<<8|(p[14]&255)<<16|(p[15]&255)<<24,j10=c[8]&255|(c[9]&255)<<8|(c[10]&255)<<16|(c[11]&255)<<24,j11=k[16]&255|(k[17]&255)<<8|(k[18]&255)<<16|(k[19]&255)<<24,j12=k[20]&255|(k[21]&255)<<8|(k[22]&255)<<16|(k[23]&255)<<24,j13=k[24]&255|(k[25]&255)<<8|(k[26]&255)<<16|(k[27]&255)<<24,j14=k[28]&255|(k[29]&255)<<8|(k[30]&255)<<16|(k[31]&255)<<24,j15=c[12]&255|(c[13]&255)<<8|(c[14]&255)<<16|(c[15]&255)<<24;var x0=j0,x1=j1,x2=j2,x3=j3,x4=j4,x5=j5,x6=j6,x7=j7,x8=j8,x9=j9,x10=j10,x11=j11,x12=j12,x13=j13,x14=j14,x15=j15,u;for(var i=0;i<20;i+=2){u=x0+x12|0;x4^=u<<7|u>>>32-7;u=x4+x0|0;x8^=u<<9|u>>>32-9;u=x8+x4|0;x12^=u<<13|u>>>32-13;u=x12+x8|0;x0^=u<<18|u>>>32-18;u=x5+x1|0;x9^=u<<7|u>>>32-7;u=x9+x5|0;x13^=u<<9|u>>>32-9;u=x13+x9|0;x1^=u<<13|u>>>32-13;u=x1+x13|0;x5^=u<<18|u>>>32-18;u=x10+x6|0;x14^=u<<7|u>>>32-7;u=x14+x10|0;x2^=u<<9|u>>>32-9;u=x2+x14|0;x6^=u<<13|u>>>32-13;u=x6+x2|0;x10^=u<<18|u>>>32-18;u=x15+x11|0;x3^=u<<7|u>>>32-7;u=x3+x15|0;x7^=u<<9|u>>>32-9;u=x7+x3|0;x11^=u<<13|u>>>32-13;u=x11+x7|0;x15^=u<<18|u>>>32-18;u=x0+x3|0;x1^=u<<7|u>>>32-7;u=x1+x0|0;x2^=u<<9|u>>>32-9;u=x2+x1|0;x3^=u<<13|u>>>32-13;u=x3+x2|0;x0^=u<<18|u>>>32-18;u=x5+x4|0;x6^=u<<7|u>>>32-7;u=x6+x5|0;x7^=u<<9|u>>>32-9;u=x7+x6|0;x4^=u<<13|u>>>32-13;u=x4+x7|0;x5^=u<<18|u>>>32-18;u=x10+x9|0;x11^=u<<7|u>>>32-7;u=x11+x10|0;x8^=u<<9|u>>>32-9;u=x8+x11|0;x9^=u<<13|u>>>32-13;u=x9+x8|0;x10^=u<<18|u>>>32-18;u=x15+x14|0;x12^=u<<7|u>>>32-7;u=x12+x15|0;x13^=u<<9|u>>>32-9;u=x13+x12|0;x14^=u<<13|u>>>32-13;u=x14+x13|0;x15^=u<<18|u>>>32-18}x0=x0+j0|0;x1=x1+j1|0;x2=x2+j2|0;x3=x3+j3|0;x4=x4+j4|0;x5=x5+j5|0;x6=x6+j6|0;x7=x7+j7|0;x8=x8+j8|0;x9=x9+j9|0;x10=x10+j10|0;x11=x11+j11|0;x12=x12+j12|0;x13=x13+j13|0;x14=x14+j14|0;x15=x15+j15|0;o[0]=x0>>>0&255;o[1]=x0>>>8&255;o[2]=x0>>>16&255;o[3]=x0>>>24&255;o[4]=x1>>>0&255;o[5]=x1>>>8&255;o[6]=x1>>>16&255;o[7]=x1>>>24&255;o[8]=x2>>>0&255;o[9]=x2>>>8&255;o[10]=x2>>>16&255;o[11]=x2>>>24&255;o[12]=x3>>>0&255;o[13]=x3>>>8&255;o[14]=x3>>>16&255;o[15]=x3>>>24&255;o[16]=x4>>>0&255;o[17]=x4>>>8&255;o[18]=x4>>>16&255;o[19]=x4>>>24&255;o[20]=x5>>>0&255;o[21]=x5>>>8&255;o[22]=x5>>>16&255;o[23]=x5>>>24&255;o[24]=x6>>>0&255;o[25]=x6>>>8&255;o[26]=x6>>>16&255;o[27]=x6>>>24&255;o[28]=x7>>>0&255;o[29]=x7>>>8&255;o[30]=x7>>>16&255;o[31]=x7>>>24&255;o[32]=x8>>>0&255;o[33]=x8>>>8&255;o[34]=x8>>>16&255;o[35]=x8>>>24&255;o[36]=x9>>>0&255;o[37]=x9>>>8&255;o[38]=x9>>>16&255;o[39]=x9>>>24&255;o[40]=x10>>>0&255;o[41]=x10>>>8&255;o[42]=x10>>>16&255;o[43]=x10>>>24&255;o[44]=x11>>>0&255;o[45]=x11>>>8&255;o[46]=x11>>>16&255;o[47]=x11>>>24&255;o[48]=x12>>>0&255;o[49]=x12>>>8&255;o[50]=x12>>>16&255;o[51]=x12>>>24&255;o[52]=x13>>>0&255;o[53]=x13>>>8&255;o[54]=x13>>>16&255;o[55]=x13>>>24&255;o[56]=x14>>>0&255;o[57]=x14>>>8&255;o[58]=x14>>>16&255;o[59]=x14>>>24&255;o[60]=x15>>>0&255;o[61]=x15>>>8&255;o[62]=x15>>>16&255;o[63]=x15>>>24&255}function core_hsalsa20(o,p,k,c){var j0=c[0]&255|(c[1]&255)<<8|(c[2]&255)<<16|(c[3]&255)<<24,j1=k[0]&255|(k[1]&255)<<8|(k[2]&255)<<16|(k[3]&255)<<24,j2=k[4]&255|(k[5]&255)<<8|(k[6]&255)<<16|(k[7]&255)<<24,j3=k[8]&255|(k[9]&255)<<8|(k[10]&255)<<16|(k[11]&255)<<24,j4=k[12]&255|(k[13]&255)<<8|(k[14]&255)<<16|(k[15]&255)<<24,j5=c[4]&255|(c[5]&255)<<8|(c[6]&255)<<16|(c[7]&255)<<24,j6=p[0]&255|(p[1]&255)<<8|(p[2]&255)<<16|(p[3]&255)<<24,j7=p[4]&255|(p[5]&255)<<8|(p[6]&255)<<16|(p[7]&255)<<24,j8=p[8]&255|(p[9]&255)<<8|(p[10]&255)<<16|(p[11]&255)<<24,j9=p[12]&255|(p[13]&255)<<8|(p[14]&255)<<16|(p[15]&255)<<24,j10=c[8]&255|(c[9]&255)<<8|(c[10]&255)<<16|(c[11]&255)<<24,j11=k[16]&255|(k[17]&255)<<8|(k[18]&255)<<16|(k[19]&255)<<24,j12=k[20]&255|(k[21]&255)<<8|(k[22]&255)<<16|(k[23]&255)<<24,j13=k[24]&255|(k[25]&255)<<8|(k[26]&255)<<16|(k[27]&255)<<24,j14=k[28]&255|(k[29]&255)<<8|(k[30]&255)<<16|(k[31]&255)<<24,j15=c[12]&255|(c[13]&255)<<8|(c[14]&255)<<16|(c[15]&255)<<24;var x0=j0,x1=j1,x2=j2,x3=j3,x4=j4,x5=j5,x6=j6,x7=j7,x8=j8,x9=j9,x10=j10,x11=j11,x12=j12,x13=j13,x14=j14,x15=j15,u;for(var i=0;i<20;i+=2){u=x0+x12|0;x4^=u<<7|u>>>32-7;u=x4+x0|0;x8^=u<<9|u>>>32-9;u=x8+x4|0;x12^=u<<13|u>>>32-13;u=x12+x8|0;x0^=u<<18|u>>>32-18;u=x5+x1|0;x9^=u<<7|u>>>32-7;u=x9+x5|0;x13^=u<<9|u>>>32-9;u=x13+x9|0;x1^=u<<13|u>>>32-13;u=x1+x13|0;x5^=u<<18|u>>>32-18;u=x10+x6|0;x14^=u<<7|u>>>32-7;u=x14+x10|0;x2^=u<<9|u>>>32-9;u=x2+x14|0;x6^=u<<13|u>>>32-13;u=x6+x2|0;x10^=u<<18|u>>>32-18;u=x15+x11|0;x3^=u<<7|u>>>32-7;u=x3+x15|0;x7^=u<<9|u>>>32-9;u=x7+x3|0;x11^=u<<13|u>>>32-13;u=x11+x7|0;x15^=u<<18|u>>>32-18;u=x0+x3|0;x1^=u<<7|u>>>32-7;u=x1+x0|0;x2^=u<<9|u>>>32-9;u=x2+x1|0;x3^=u<<13|u>>>32-13;u=x3+x2|0;x0^=u<<18|u>>>32-18;u=x5+x4|0;x6^=u<<7|u>>>32-7;u=x6+x5|0;x7^=u<<9|u>>>32-9;u=x7+x6|0;x4^=u<<13|u>>>32-13;u=x4+x7|0;x5^=u<<18|u>>>32-18;u=x10+x9|0;x11^=u<<7|u>>>32-7;u=x11+x10|0;x8^=u<<9|u>>>32-9;u=x8+x11|0;x9^=u<<13|u>>>32-13;u=x9+x8|0;x10^=u<<18|u>>>32-18;u=x15+x14|0;x12^=u<<7|u>>>32-7;u=x12+x15|0;x13^=u<<9|u>>>32-9;u=x13+x12|0;x14^=u<<13|u>>>32-13;u=x14+x13|0;x15^=u<<18|u>>>32-18}o[0]=x0>>>0&255;o[1]=x0>>>8&255;o[2]=x0>>>16&255;o[3]=x0>>>24&255;o[4]=x5>>>0&255;o[5]=x5>>>8&255;o[6]=x5>>>16&255;o[7]=x5>>>24&255;o[8]=x10>>>0&255;o[9]=x10>>>8&255;o[10]=x10>>>16&255;o[11]=x10>>>24&255;o[12]=x15>>>0&255;o[13]=x15>>>8&255;o[14]=x15>>>16&255;o[15]=x15>>>24&255;o[16]=x6>>>0&255;o[17]=x6>>>8&255;o[18]=x6>>>16&255;o[19]=x6>>>24&255;o[20]=x7>>>0&255;o[21]=x7>>>8&255;o[22]=x7>>>16&255;o[23]=x7>>>24&255;o[24]=x8>>>0&255;o[25]=x8>>>8&255;o[26]=x8>>>16&255;o[27]=x8>>>24&255;o[28]=x9>>>0&255;o[29]=x9>>>8&255;o[30]=x9>>>16&255;o[31]=x9>>>24&255}function crypto_core_salsa20(out,inp,k,c){core_salsa20(out,inp,k,c)}function crypto_core_hsalsa20(out,inp,k,c){core_hsalsa20(out,inp,k,c)}var sigma=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k){var z=new Uint8Array(16),x=new Uint8Array(64);var u,i;for(i=0;i<16;i++)z[i]=0;for(i=0;i<8;i++)z[i]=n[i];while(b>=64){crypto_core_salsa20(x,z,k,sigma);for(i=0;i<64;i++)c[cpos+i]=m[mpos+i]^x[i];u=1;for(i=8;i<16;i++){u=u+(z[i]&255)|0;z[i]=u&255;u>>>=8}b-=64;cpos+=64;mpos+=64}if(b>0){crypto_core_salsa20(x,z,k,sigma);for(i=0;i=64){crypto_core_salsa20(x,z,k,sigma);for(i=0;i<64;i++)c[cpos+i]=x[i];u=1;for(i=8;i<16;i++){u=u+(z[i]&255)|0;z[i]=u&255;u>>>=8}b-=64;cpos+=64}if(b>0){crypto_core_salsa20(x,z,k,sigma);for(i=0;i>>13|t1<<3)&8191;t2=key[4]&255|(key[5]&255)<<8;this.r[2]=(t1>>>10|t2<<6)&7939;t3=key[6]&255|(key[7]&255)<<8;this.r[3]=(t2>>>7|t3<<9)&8191;t4=key[8]&255|(key[9]&255)<<8;this.r[4]=(t3>>>4|t4<<12)&255;this.r[5]=t4>>>1&8190;t5=key[10]&255|(key[11]&255)<<8;this.r[6]=(t4>>>14|t5<<2)&8191;t6=key[12]&255|(key[13]&255)<<8;this.r[7]=(t5>>>11|t6<<5)&8065;t7=key[14]&255|(key[15]&255)<<8;this.r[8]=(t6>>>8|t7<<8)&8191;this.r[9]=t7>>>5&127;this.pad[0]=key[16]&255|(key[17]&255)<<8;this.pad[1]=key[18]&255|(key[19]&255)<<8;this.pad[2]=key[20]&255|(key[21]&255)<<8;this.pad[3]=key[22]&255|(key[23]&255)<<8;this.pad[4]=key[24]&255|(key[25]&255)<<8;this.pad[5]=key[26]&255|(key[27]&255)<<8;this.pad[6]=key[28]&255|(key[29]&255)<<8;this.pad[7]=key[30]&255|(key[31]&255)<<8};poly1305.prototype.blocks=function(m,mpos,bytes){var hibit=this.fin?0:1<<11;var t0,t1,t2,t3,t4,t5,t6,t7,c;var d0,d1,d2,d3,d4,d5,d6,d7,d8,d9;var h0=this.h[0],h1=this.h[1],h2=this.h[2],h3=this.h[3],h4=this.h[4],h5=this.h[5],h6=this.h[6],h7=this.h[7],h8=this.h[8],h9=this.h[9];var r0=this.r[0],r1=this.r[1],r2=this.r[2],r3=this.r[3],r4=this.r[4],r5=this.r[5],r6=this.r[6],r7=this.r[7],r8=this.r[8],r9=this.r[9];while(bytes>=16){t0=m[mpos+0]&255|(m[mpos+1]&255)<<8;h0+=t0&8191;t1=m[mpos+2]&255|(m[mpos+3]&255)<<8;h1+=(t0>>>13|t1<<3)&8191;t2=m[mpos+4]&255|(m[mpos+5]&255)<<8;h2+=(t1>>>10|t2<<6)&8191;t3=m[mpos+6]&255|(m[mpos+7]&255)<<8;h3+=(t2>>>7|t3<<9)&8191;t4=m[mpos+8]&255|(m[mpos+9]&255)<<8;h4+=(t3>>>4|t4<<12)&8191;h5+=t4>>>1&8191;t5=m[mpos+10]&255|(m[mpos+11]&255)<<8;h6+=(t4>>>14|t5<<2)&8191;t6=m[mpos+12]&255|(m[mpos+13]&255)<<8;h7+=(t5>>>11|t6<<5)&8191;t7=m[mpos+14]&255|(m[mpos+15]&255)<<8;h8+=(t6>>>8|t7<<8)&8191;h9+=t7>>>5|hibit;c=0;d0=c;d0+=h0*r0;d0+=h1*(5*r9);d0+=h2*(5*r8);d0+=h3*(5*r7);d0+=h4*(5*r6);c=d0>>>13;d0&=8191;d0+=h5*(5*r5);d0+=h6*(5*r4);d0+=h7*(5*r3);d0+=h8*(5*r2);d0+=h9*(5*r1);c+=d0>>>13;d0&=8191;d1=c;d1+=h0*r1;d1+=h1*r0;d1+=h2*(5*r9);d1+=h3*(5*r8);d1+=h4*(5*r7);c=d1>>>13;d1&=8191;d1+=h5*(5*r6);d1+=h6*(5*r5);d1+=h7*(5*r4);d1+=h8*(5*r3);d1+=h9*(5*r2);c+=d1>>>13;d1&=8191;d2=c;d2+=h0*r2;d2+=h1*r1;d2+=h2*r0;d2+=h3*(5*r9);d2+=h4*(5*r8);c=d2>>>13;d2&=8191;d2+=h5*(5*r7);d2+=h6*(5*r6);d2+=h7*(5*r5);d2+=h8*(5*r4);d2+=h9*(5*r3);c+=d2>>>13;d2&=8191;d3=c;d3+=h0*r3;d3+=h1*r2;d3+=h2*r1;d3+=h3*r0;d3+=h4*(5*r9);c=d3>>>13;d3&=8191;d3+=h5*(5*r8);d3+=h6*(5*r7);d3+=h7*(5*r6);d3+=h8*(5*r5);d3+=h9*(5*r4);c+=d3>>>13;d3&=8191;d4=c;d4+=h0*r4;d4+=h1*r3;d4+=h2*r2;d4+=h3*r1;d4+=h4*r0;c=d4>>>13;d4&=8191;d4+=h5*(5*r9);d4+=h6*(5*r8);d4+=h7*(5*r7);d4+=h8*(5*r6);d4+=h9*(5*r5);c+=d4>>>13;d4&=8191;d5=c;d5+=h0*r5;d5+=h1*r4;d5+=h2*r3;d5+=h3*r2;d5+=h4*r1;c=d5>>>13;d5&=8191;d5+=h5*r0;d5+=h6*(5*r9);d5+=h7*(5*r8);d5+=h8*(5*r7);d5+=h9*(5*r6);c+=d5>>>13;d5&=8191;d6=c;d6+=h0*r6;d6+=h1*r5;d6+=h2*r4;d6+=h3*r3;d6+=h4*r2;c=d6>>>13;d6&=8191;d6+=h5*r1;d6+=h6*r0;d6+=h7*(5*r9);d6+=h8*(5*r8);d6+=h9*(5*r7);c+=d6>>>13;d6&=8191;d7=c;d7+=h0*r7;d7+=h1*r6;d7+=h2*r5;d7+=h3*r4;d7+=h4*r3;c=d7>>>13;d7&=8191;d7+=h5*r2;d7+=h6*r1;d7+=h7*r0;d7+=h8*(5*r9);d7+=h9*(5*r8);c+=d7>>>13;d7&=8191;d8=c;d8+=h0*r8;d8+=h1*r7;d8+=h2*r6;d8+=h3*r5;d8+=h4*r4;c=d8>>>13;d8&=8191;d8+=h5*r3;d8+=h6*r2;d8+=h7*r1;d8+=h8*r0;d8+=h9*(5*r9);c+=d8>>>13;d8&=8191;d9=c;d9+=h0*r9;d9+=h1*r8;d9+=h2*r7;d9+=h3*r6;d9+=h4*r5;c=d9>>>13;d9&=8191;d9+=h5*r4;d9+=h6*r3;d9+=h7*r2;d9+=h8*r1;d9+=h9*r0;c+=d9>>>13;d9&=8191;c=(c<<2)+c|0;c=c+d0|0;d0=c&8191;c=c>>>13;d1+=c;h0=d0;h1=d1;h2=d2;h3=d3;h4=d4;h5=d5;h6=d6;h7=d7;h8=d8;h9=d9;mpos+=16;bytes-=16}this.h[0]=h0;this.h[1]=h1;this.h[2]=h2;this.h[3]=h3;this.h[4]=h4;this.h[5]=h5;this.h[6]=h6;this.h[7]=h7;this.h[8]=h8;this.h[9]=h9};poly1305.prototype.finish=function(mac,macpos){var g=new Uint16Array(10);var c,mask,f,i;if(this.leftover){i=this.leftover;this.buffer[i++]=1;for(;i<16;i++)this.buffer[i]=0;this.fin=1;this.blocks(this.buffer,0,16)}c=this.h[1]>>>13;this.h[1]&=8191;for(i=2;i<10;i++){this.h[i]+=c;c=this.h[i]>>>13;this.h[i]&=8191}this.h[0]+=c*5;c=this.h[0]>>>13;this.h[0]&=8191;this.h[1]+=c;c=this.h[1]>>>13;this.h[1]&=8191;this.h[2]+=c;g[0]=this.h[0]+5;c=g[0]>>>13;g[0]&=8191;for(i=1;i<10;i++){g[i]=this.h[i]+c;c=g[i]>>>13;g[i]&=8191}g[9]-=1<<13;mask=(c^1)-1;for(i=0;i<10;i++)g[i]&=mask;mask=~mask;for(i=0;i<10;i++)this.h[i]=this.h[i]&mask|g[i];this.h[0]=(this.h[0]|this.h[1]<<13)&65535;this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535;this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535;this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535;this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535;this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535;this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535;this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535;f=this.h[0]+this.pad[0];this.h[0]=f&65535;for(i=1;i<8;i++){f=(this.h[i]+this.pad[i]|0)+(f>>>16)|0;this.h[i]=f&65535}mac[macpos+0]=this.h[0]>>>0&255;mac[macpos+1]=this.h[0]>>>8&255;mac[macpos+2]=this.h[1]>>>0&255;mac[macpos+3]=this.h[1]>>>8&255;mac[macpos+4]=this.h[2]>>>0&255;mac[macpos+5]=this.h[2]>>>8&255;mac[macpos+6]=this.h[3]>>>0&255;mac[macpos+7]=this.h[3]>>>8&255;mac[macpos+8]=this.h[4]>>>0&255;mac[macpos+9]=this.h[4]>>>8&255;mac[macpos+10]=this.h[5]>>>0&255;mac[macpos+11]=this.h[5]>>>8&255;mac[macpos+12]=this.h[6]>>>0&255;mac[macpos+13]=this.h[6]>>>8&255;mac[macpos+14]=this.h[7]>>>0&255;mac[macpos+15]=this.h[7]>>>8&255};poly1305.prototype.update=function(m,mpos,bytes){var i,want;if(this.leftover){want=16-this.leftover;if(want>bytes)want=bytes;for(i=0;i=16){want=bytes-bytes%16;this.blocks(m,mpos,want);mpos+=want;bytes-=want}if(bytes){for(i=0;i>16&1);m[i-1]&=65535}m[15]=t[15]-32767-(m[14]>>16&1);b=m[15]>>16&1;m[14]&=65535;sel25519(t,m,1-b)}for(i=0;i<16;i++){o[2*i]=t[i]&255;o[2*i+1]=t[i]>>8}}function neq25519(a,b){var c=new Uint8Array(32),d=new Uint8Array(32);pack25519(c,a);pack25519(d,b);return crypto_verify_32(c,0,d,0)}function par25519(a){var d=new Uint8Array(32);pack25519(d,a);return d[0]&1}function unpack25519(o,n){var i;for(i=0;i<16;i++)o[i]=n[2*i]+(n[2*i+1]<<8);o[15]&=32767}function A(o,a,b){for(var i=0;i<16;i++)o[i]=a[i]+b[i]}function Z(o,a,b){for(var i=0;i<16;i++)o[i]=a[i]-b[i]}function M(o,a,b){var v,c,t0=0,t1=0,t2=0,t3=0,t4=0,t5=0,t6=0,t7=0,t8=0,t9=0,t10=0,t11=0,t12=0,t13=0,t14=0,t15=0,t16=0,t17=0,t18=0,t19=0,t20=0,t21=0,t22=0,t23=0,t24=0,t25=0,t26=0,t27=0,t28=0,t29=0,t30=0,b0=b[0],b1=b[1],b2=b[2],b3=b[3],b4=b[4],b5=b[5],b6=b[6],b7=b[7],b8=b[8],b9=b[9],b10=b[10],b11=b[11],b12=b[12],b13=b[13],b14=b[14],b15=b[15];v=a[0];t0+=v*b0;t1+=v*b1;t2+=v*b2;t3+=v*b3;t4+=v*b4;t5+=v*b5;t6+=v*b6;t7+=v*b7;t8+=v*b8;t9+=v*b9;t10+=v*b10;t11+=v*b11;t12+=v*b12;t13+=v*b13;t14+=v*b14;t15+=v*b15;v=a[1];t1+=v*b0;t2+=v*b1;t3+=v*b2;t4+=v*b3;t5+=v*b4;t6+=v*b5;t7+=v*b6;t8+=v*b7;t9+=v*b8;t10+=v*b9;t11+=v*b10;t12+=v*b11;t13+=v*b12;t14+=v*b13;t15+=v*b14;t16+=v*b15;v=a[2];t2+=v*b0;t3+=v*b1;t4+=v*b2;t5+=v*b3;t6+=v*b4;t7+=v*b5;t8+=v*b6;t9+=v*b7;t10+=v*b8;t11+=v*b9;t12+=v*b10;t13+=v*b11;t14+=v*b12;t15+=v*b13;t16+=v*b14;t17+=v*b15;v=a[3];t3+=v*b0;t4+=v*b1;t5+=v*b2;t6+=v*b3;t7+=v*b4;t8+=v*b5;t9+=v*b6;t10+=v*b7;t11+=v*b8;t12+=v*b9;t13+=v*b10;t14+=v*b11;t15+=v*b12;t16+=v*b13;t17+=v*b14;t18+=v*b15;v=a[4];t4+=v*b0;t5+=v*b1;t6+=v*b2;t7+=v*b3;t8+=v*b4;t9+=v*b5;t10+=v*b6;t11+=v*b7;t12+=v*b8;t13+=v*b9;t14+=v*b10;t15+=v*b11;t16+=v*b12;t17+=v*b13;t18+=v*b14;t19+=v*b15;v=a[5];t5+=v*b0;t6+=v*b1;t7+=v*b2;t8+=v*b3;t9+=v*b4;t10+=v*b5;t11+=v*b6;t12+=v*b7;t13+=v*b8;t14+=v*b9;t15+=v*b10;t16+=v*b11;t17+=v*b12;t18+=v*b13;t19+=v*b14;t20+=v*b15;v=a[6];t6+=v*b0;t7+=v*b1;t8+=v*b2;t9+=v*b3;t10+=v*b4;t11+=v*b5;t12+=v*b6;t13+=v*b7;t14+=v*b8;t15+=v*b9;t16+=v*b10;t17+=v*b11;t18+=v*b12;t19+=v*b13;t20+=v*b14;t21+=v*b15;v=a[7];t7+=v*b0;t8+=v*b1;t9+=v*b2;t10+=v*b3;t11+=v*b4;t12+=v*b5;t13+=v*b6;t14+=v*b7;t15+=v*b8;t16+=v*b9;t17+=v*b10;t18+=v*b11;t19+=v*b12;t20+=v*b13;t21+=v*b14;t22+=v*b15;v=a[8];t8+=v*b0;t9+=v*b1;t10+=v*b2;t11+=v*b3;t12+=v*b4;t13+=v*b5;t14+=v*b6;t15+=v*b7;t16+=v*b8;t17+=v*b9;t18+=v*b10;t19+=v*b11;t20+=v*b12;t21+=v*b13;t22+=v*b14;t23+=v*b15;v=a[9];t9+=v*b0;t10+=v*b1;t11+=v*b2;t12+=v*b3;t13+=v*b4;t14+=v*b5;t15+=v*b6;t16+=v*b7;t17+=v*b8;t18+=v*b9;t19+=v*b10;t20+=v*b11;t21+=v*b12;t22+=v*b13;t23+=v*b14;t24+=v*b15;v=a[10];t10+=v*b0;t11+=v*b1;t12+=v*b2;t13+=v*b3;t14+=v*b4;t15+=v*b5;t16+=v*b6;t17+=v*b7;t18+=v*b8;t19+=v*b9;t20+=v*b10;t21+=v*b11;t22+=v*b12;t23+=v*b13;t24+=v*b14;t25+=v*b15;v=a[11];t11+=v*b0;t12+=v*b1;t13+=v*b2;t14+=v*b3;t15+=v*b4;t16+=v*b5;t17+=v*b6;t18+=v*b7;t19+=v*b8;t20+=v*b9;t21+=v*b10;t22+=v*b11;t23+=v*b12;t24+=v*b13;t25+=v*b14;t26+=v*b15;v=a[12];t12+=v*b0;t13+=v*b1;t14+=v*b2;t15+=v*b3;t16+=v*b4;t17+=v*b5;t18+=v*b6;t19+=v*b7;t20+=v*b8;t21+=v*b9;t22+=v*b10;t23+=v*b11;t24+=v*b12;t25+=v*b13;t26+=v*b14;t27+=v*b15;v=a[13];t13+=v*b0;t14+=v*b1;t15+=v*b2;t16+=v*b3;t17+=v*b4;t18+=v*b5;t19+=v*b6;t20+=v*b7;t21+=v*b8;t22+=v*b9;t23+=v*b10;t24+=v*b11;t25+=v*b12;t26+=v*b13;t27+=v*b14;t28+=v*b15;v=a[14];t14+=v*b0;t15+=v*b1;t16+=v*b2;t17+=v*b3;t18+=v*b4;t19+=v*b5;t20+=v*b6;t21+=v*b7;t22+=v*b8;t23+=v*b9;t24+=v*b10;t25+=v*b11;t26+=v*b12;t27+=v*b13;t28+=v*b14;t29+=v*b15;v=a[15];t15+=v*b0;t16+=v*b1;t17+=v*b2;t18+=v*b3;t19+=v*b4;t20+=v*b5;t21+=v*b6;t22+=v*b7;t23+=v*b8;t24+=v*b9;t25+=v*b10;t26+=v*b11;t27+=v*b12;t28+=v*b13;t29+=v*b14;t30+=v*b15;t0+=38*t16;t1+=38*t17;t2+=38*t18;t3+=38*t19;t4+=38*t20;t5+=38*t21;t6+=38*t22;t7+=38*t23;t8+=38*t24;t9+=38*t25;t10+=38*t26;t11+=38*t27;t12+=38*t28;t13+=38*t29;t14+=38*t30;c=1;v=t0+c+65535;c=Math.floor(v/65536);t0=v-c*65536;v=t1+c+65535;c=Math.floor(v/65536);t1=v-c*65536;v=t2+c+65535;c=Math.floor(v/65536);t2=v-c*65536;v=t3+c+65535;c=Math.floor(v/65536);t3=v-c*65536;v=t4+c+65535;c=Math.floor(v/65536);t4=v-c*65536;v=t5+c+65535;c=Math.floor(v/65536);t5=v-c*65536;v=t6+c+65535;c=Math.floor(v/65536);t6=v-c*65536;v=t7+c+65535;c=Math.floor(v/65536);t7=v-c*65536;v=t8+c+65535;c=Math.floor(v/65536);t8=v-c*65536;v=t9+c+65535;c=Math.floor(v/65536);t9=v-c*65536;v=t10+c+65535;c=Math.floor(v/65536);t10=v-c*65536;v=t11+c+65535;c=Math.floor(v/65536);t11=v-c*65536;v=t12+c+65535;c=Math.floor(v/65536);t12=v-c*65536;v=t13+c+65535;c=Math.floor(v/65536);t13=v-c*65536;v=t14+c+65535;c=Math.floor(v/65536);t14=v-c*65536;v=t15+c+65535;c=Math.floor(v/65536);t15=v-c*65536;t0+=c-1+37*(c-1);c=1;v=t0+c+65535;c=Math.floor(v/65536);t0=v-c*65536;v=t1+c+65535;c=Math.floor(v/65536);t1=v-c*65536;v=t2+c+65535;c=Math.floor(v/65536);t2=v-c*65536;v=t3+c+65535;c=Math.floor(v/65536);t3=v-c*65536;v=t4+c+65535;c=Math.floor(v/65536);t4=v-c*65536;v=t5+c+65535;c=Math.floor(v/65536);t5=v-c*65536;v=t6+c+65535;c=Math.floor(v/65536);t6=v-c*65536;v=t7+c+65535;c=Math.floor(v/65536);t7=v-c*65536;v=t8+c+65535;c=Math.floor(v/65536);t8=v-c*65536;v=t9+c+65535;c=Math.floor(v/65536);t9=v-c*65536;v=t10+c+65535;c=Math.floor(v/65536);t10=v-c*65536;v=t11+c+65535;c=Math.floor(v/65536);t11=v-c*65536;v=t12+c+65535;c=Math.floor(v/65536);t12=v-c*65536;v=t13+c+65535;c=Math.floor(v/65536);t13=v-c*65536;v=t14+c+65535;c=Math.floor(v/65536);t14=v-c*65536;v=t15+c+65535;c=Math.floor(v/65536);t15=v-c*65536;t0+=c-1+37*(c-1);o[0]=t0;o[1]=t1;o[2]=t2;o[3]=t3;o[4]=t4;o[5]=t5;o[6]=t6;o[7]=t7;o[8]=t8;o[9]=t9;o[10]=t10;o[11]=t11;o[12]=t12;o[13]=t13;o[14]=t14;o[15]=t15}function S(o,a){M(o,a,a)}function inv25519(o,i){var c=gf();var a;for(a=0;a<16;a++)c[a]=i[a];for(a=253;a>=0;a--){S(c,c);if(a!==2&&a!==4)M(c,c,i)}for(a=0;a<16;a++)o[a]=c[a]}function pow2523(o,i){var c=gf();var a;for(a=0;a<16;a++)c[a]=i[a];for(a=250;a>=0;a--){S(c,c);if(a!==1)M(c,c,i)}for(a=0;a<16;a++)o[a]=c[a]}function crypto_scalarmult(q,n,p){var z=new Uint8Array(32);var x=new Float64Array(80),r,i;var a=gf(),b=gf(),c=gf(),d=gf(),e=gf(),f=gf();for(i=0;i<31;i++)z[i]=n[i];z[31]=n[31]&127|64;z[0]&=248;unpack25519(x,p);for(i=0;i<16;i++){b[i]=x[i];d[i]=a[i]=c[i]=0}a[0]=d[0]=1;for(i=254;i>=0;--i){r=z[i>>>3]>>>(i&7)&1;sel25519(a,b,r);sel25519(c,d,r);A(e,a,c);Z(a,a,c);A(c,b,d);Z(b,b,d);S(d,e);S(f,a);M(a,c,a);M(c,b,e);A(e,a,c);Z(a,a,c);S(b,a);Z(c,d,f);M(a,c,_121665);A(a,a,d);M(c,c,a);M(a,d,f);M(d,b,x);S(b,e);sel25519(a,b,r);sel25519(c,d,r)}for(i=0;i<16;i++){x[i+16]=a[i];x[i+32]=c[i];x[i+48]=b[i];x[i+64]=d[i]}var x32=x.subarray(32);var x16=x.subarray(16);inv25519(x32,x32);M(x16,x16,x32);pack25519(q,x16);return 0}function crypto_scalarmult_base(q,n){return crypto_scalarmult(q,n,_9)}function crypto_box_keypair(y,x){randombytes(x,32);return crypto_scalarmult_base(y,x)}function crypto_box_beforenm(k,y,x){var s=new Uint8Array(32);crypto_scalarmult(s,x,y);return crypto_core_hsalsa20(k,_0,s,sigma)}var crypto_box_afternm=crypto_secretbox;var crypto_box_open_afternm=crypto_secretbox_open;function crypto_box(c,m,d,n,y,x){var k=new Uint8Array(32);crypto_box_beforenm(k,y,x);return crypto_box_afternm(c,m,d,n,k)}function crypto_box_open(m,c,d,n,y,x){var k=new Uint8Array(32);crypto_box_beforenm(k,y,x);return crypto_box_open_afternm(m,c,d,n,k)}var K=[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 crypto_hashblocks_hl(hh,hl,m,n){var wh=new Int32Array(16),wl=new Int32Array(16),bh0,bh1,bh2,bh3,bh4,bh5,bh6,bh7,bl0,bl1,bl2,bl3,bl4,bl5,bl6,bl7,th,tl,i,j,h,l,a,b,c,d;var ah0=hh[0],ah1=hh[1],ah2=hh[2],ah3=hh[3],ah4=hh[4],ah5=hh[5],ah6=hh[6],ah7=hh[7],al0=hl[0],al1=hl[1],al2=hl[2],al3=hl[3],al4=hl[4],al5=hl[5],al6=hl[6],al7=hl[7];var pos=0;while(n>=128){for(i=0;i<16;i++){j=8*i+pos;wh[i]=m[j+0]<<24|m[j+1]<<16|m[j+2]<<8|m[j+3]; -wl[i]=m[j+4]<<24|m[j+5]<<16|m[j+6]<<8|m[j+7]}for(i=0;i<80;i++){bh0=ah0;bh1=ah1;bh2=ah2;bh3=ah3;bh4=ah4;bh5=ah5;bh6=ah6;bh7=ah7;bl0=al0;bl1=al1;bl2=al2;bl3=al3;bl4=al4;bl5=al5;bl6=al6;bl7=al7;h=ah7;l=al7;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=(ah4>>>14|al4<<32-14)^(ah4>>>18|al4<<32-18)^(al4>>>41-32|ah4<<32-(41-32));l=(al4>>>14|ah4<<32-14)^(al4>>>18|ah4<<32-18)^(ah4>>>41-32|al4<<32-(41-32));a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;h=ah4&ah5^~ah4&ah6;l=al4&al5^~al4&al6;a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;h=K[i*2];l=K[i*2+1];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;h=wh[i%16];l=wl[i%16];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;th=c&65535|d<<16;tl=a&65535|b<<16;h=th;l=tl;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=(ah0>>>28|al0<<32-28)^(al0>>>34-32|ah0<<32-(34-32))^(al0>>>39-32|ah0<<32-(39-32));l=(al0>>>28|ah0<<32-28)^(ah0>>>34-32|al0<<32-(34-32))^(ah0>>>39-32|al0<<32-(39-32));a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;h=ah0&ah1^ah0&ah2^ah1&ah2;l=al0&al1^al0&al2^al1&al2;a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;bh7=c&65535|d<<16;bl7=a&65535|b<<16;h=bh3;l=bl3;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=th;l=tl;a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;bh3=c&65535|d<<16;bl3=a&65535|b<<16;ah1=bh0;ah2=bh1;ah3=bh2;ah4=bh3;ah5=bh4;ah6=bh5;ah7=bh6;ah0=bh7;al1=bl0;al2=bl1;al3=bl2;al4=bl3;al5=bl4;al6=bl5;al7=bl6;al0=bl7;if(i%16===15){for(j=0;j<16;j++){h=wh[j];l=wl[j];a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=wh[(j+9)%16];l=wl[(j+9)%16];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;th=wh[(j+1)%16];tl=wl[(j+1)%16];h=(th>>>1|tl<<32-1)^(th>>>8|tl<<32-8)^th>>>7;l=(tl>>>1|th<<32-1)^(tl>>>8|th<<32-8)^(tl>>>7|th<<32-7);a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;th=wh[(j+14)%16];tl=wl[(j+14)%16];h=(th>>>19|tl<<32-19)^(tl>>>61-32|th<<32-(61-32))^th>>>6;l=(tl>>>19|th<<32-19)^(th>>>61-32|tl<<32-(61-32))^(tl>>>6|th<<32-6);a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;wh[j]=c&65535|d<<16;wl[j]=a&65535|b<<16}}}h=ah0;l=al0;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[0];l=hl[0];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[0]=ah0=c&65535|d<<16;hl[0]=al0=a&65535|b<<16;h=ah1;l=al1;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[1];l=hl[1];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[1]=ah1=c&65535|d<<16;hl[1]=al1=a&65535|b<<16;h=ah2;l=al2;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[2];l=hl[2];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[2]=ah2=c&65535|d<<16;hl[2]=al2=a&65535|b<<16;h=ah3;l=al3;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[3];l=hl[3];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[3]=ah3=c&65535|d<<16;hl[3]=al3=a&65535|b<<16;h=ah4;l=al4;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[4];l=hl[4];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[4]=ah4=c&65535|d<<16;hl[4]=al4=a&65535|b<<16;h=ah5;l=al5;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[5];l=hl[5];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[5]=ah5=c&65535|d<<16;hl[5]=al5=a&65535|b<<16;h=ah6;l=al6;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[6];l=hl[6];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[6]=ah6=c&65535|d<<16;hl[6]=al6=a&65535|b<<16;h=ah7;l=al7;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[7];l=hl[7];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[7]=ah7=c&65535|d<<16;hl[7]=al7=a&65535|b<<16;pos+=128;n-=128}return n}function crypto_hash(out,m,n){var hh=new Int32Array(8),hl=new Int32Array(8),x=new Uint8Array(256),i,b=n;hh[0]=1779033703;hh[1]=3144134277;hh[2]=1013904242;hh[3]=2773480762;hh[4]=1359893119;hh[5]=2600822924;hh[6]=528734635;hh[7]=1541459225;hl[0]=4089235720;hl[1]=2227873595;hl[2]=4271175723;hl[3]=1595750129;hl[4]=2917565137;hl[5]=725511199;hl[6]=4215389547;hl[7]=327033209;crypto_hashblocks_hl(hh,hl,m,n);n%=128;for(i=0;i=0;--i){b=s[i/8|0]>>(i&7)&1;cswap(p,q,b);add(q,p);add(p,p);cswap(p,q,b)}}function scalarbase(p,s){var q=[gf(),gf(),gf(),gf()];set25519(q[0],X);set25519(q[1],Y);set25519(q[2],gf1);M(q[3],X,Y);scalarmult(p,q,s)}function crypto_sign_keypair(pk,sk,seeded){var d=new Uint8Array(64);var p=[gf(),gf(),gf(),gf()];var i;if(!seeded)randombytes(sk,32);crypto_hash(d,sk,32);d[0]&=248;d[31]&=127;d[31]|=64;scalarbase(p,d);pack(pk,p);for(i=0;i<32;i++)sk[i+32]=pk[i];return 0}var L=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function modL(r,x){var carry,i,j,k;for(i=63;i>=32;--i){carry=0;for(j=i-32,k=i-12;j>8;x[j]-=carry*256}x[j]+=carry;x[i]=0}carry=0;for(j=0;j<32;j++){x[j]+=carry-(x[31]>>4)*L[j];carry=x[j]>>8;x[j]&=255}for(j=0;j<32;j++)x[j]-=carry*L[j];for(i=0;i<32;i++){x[i+1]+=x[i]>>8;r[i]=x[i]&255}}function reduce(r){var x=new Float64Array(64),i;for(i=0;i<64;i++)x[i]=r[i];for(i=0;i<64;i++)r[i]=0;modL(r,x)}function crypto_sign(sm,m,n,sk){var d=new Uint8Array(64),h=new Uint8Array(64),r=new Uint8Array(64);var i,j,x=new Float64Array(64);var p=[gf(),gf(),gf(),gf()];crypto_hash(d,sk,32);d[0]&=248;d[31]&=127;d[31]|=64;var smlen=n+64;for(i=0;i>7)Z(r[0],gf0,r[0]);M(r[3],r[0],r[1]);return 0}function crypto_sign_open(m,sm,n,pk){var i,mlen;var t=new Uint8Array(32),h=new Uint8Array(64);var p=[gf(),gf(),gf(),gf()],q=[gf(),gf(),gf(),gf()];mlen=-1;if(n<64)return-1;if(unpackneg(q,pk))return-1;for(i=0;i=0};nacl.sign.keyPair=function(){var pk=new Uint8Array(crypto_sign_PUBLICKEYBYTES);var sk=new Uint8Array(crypto_sign_SECRETKEYBYTES);crypto_sign_keypair(pk,sk);return{publicKey:pk,secretKey:sk}};nacl.sign.keyPair.fromSecretKey=function(secretKey){checkArrayTypes(secretKey);if(secretKey.length!==crypto_sign_SECRETKEYBYTES)throw new Error("bad secret key size");var pk=new Uint8Array(crypto_sign_PUBLICKEYBYTES);for(var i=0;i",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=require("querystring");function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url)){throw new TypeError("Parameter 'url' must be a string, not "+typeof url)}var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex127){newpart+="x"}else{newpart+=part[j]}}if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length){rest="/"+notHost.join(".")+rest}this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!ipv6Hostname){this.hostname=punycode.toASCII(this.hostname)}var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/"){rest="/"+rest}}}if(!unsafeProtocol[lowerProto]){for(var i=0,l=autoEscape.length;i0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}result.search=relative.search;result.query=relative.query;if(!util.isNull(result.pathname)||!util.isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search){result.path="/"+result.search}else{result.path=null}result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&(last==="."||last==="..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last==="."){srcPath.splice(i,1)}else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots){for(;up--;up){srcPath.unshift("..")}}if(mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")){srcPath.unshift("")}if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"){srcPath.push("")}var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift("")}if(!srcPath.length){result.pathname=null;result.path=null}else{result.pathname=srcPath.join("/")}if(!util.isNull(result.pathname)||!util.isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==":"){this.port=port.substr(1)}host=host.substr(0,host.length-port.length)}if(host)this.hostname=host}},{"./util":289,punycode:205,querystring:213}],289:[function(require,module,exports){"use strict";module.exports={isString:function(arg){return typeof arg==="string"},isObject:function(arg){return typeof arg==="object"&&arg!==null},isNull:function(arg){return arg===null},isNullOrUndefined:function(arg){return arg==null}}},{}],290:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],291:[function(require,module,exports){arguments[4][152][0].apply(exports,arguments)},{dup:152}],292:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],293:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39], -grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":292,_process:198,inherits:291}],294:[function(require,module,exports){var v1=require("./v1");var v4=require("./v4");var uuid=v4;uuid.v1=v1;uuid.v4=v4;module.exports=uuid},{"./v1":297,"./v4":298}],295:[function(require,module,exports){var byteToHex=[];for(var i=0;i<256;++i){byteToHex[i]=(i+256).toString(16).substr(1)}function bytesToUuid(buf,offset){var i=offset||0;var bth=byteToHex;return bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]}module.exports=bytesToUuid},{}],296:[function(require,module,exports){(function(global){var rng;var crypto=global.crypto||global.msCrypto;if(crypto&&crypto.getRandomValues){var rnds8=new Uint8Array(16);rng=function whatwgRNG(){crypto.getRandomValues(rnds8);return rnds8}}if(!rng){var rnds=new Array(16);rng=function(){for(var i=0,r;i<16;i++){if((i&3)===0)r=Math.random()*4294967296;rnds[i]=r>>>((i&3)<<3)&255}return rnds}}module.exports=rng}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],297:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");var _seedBytes=rng();var _nodeId=[_seedBytes[0]|1,_seedBytes[1],_seedBytes[2],_seedBytes[3],_seedBytes[4],_seedBytes[5]];var _clockseq=(_seedBytes[6]<<8|_seedBytes[7])&16383;var _lastMSecs=0,_lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||[];options=options||{};var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;var msecs=options.msecs!==undefined?options.msecs:(new Date).getTime();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;var node=options.node||_nodeId;for(var n=0;n<6;++n){b[i+n]=node[n]}return buf?buf:bytesToUuid(b)}module.exports=v1},{"./lib/bytesToUuid":295,"./lib/rng":296}],298:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");function v4(options,buf,offset){var i=buf&&offset||0;if(typeof options=="string"){buf=options=="binary"?new Array(16):null;options=null}options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){for(var ii=0;ii<16;++ii){buf[i+ii]=rnds[ii]}}return buf||bytesToUuid(rnds)}module.exports=v4},{"./lib/bytesToUuid":295,"./lib/rng":296}],299:[function(require,module,exports){var mod_assert=require("assert");var mod_util=require("util");var mod_extsprintf=require("extsprintf");exports.VError=VError;exports.WError=WError;exports.MultiError=MultiError;function VError(options){var args,causedBy,ctor,tailmsg;if(options instanceof Error||typeof options==="object"){args=Array.prototype.slice.call(arguments,1)}else{args=Array.prototype.slice.call(arguments,0);options=undefined}tailmsg=args.length>0?mod_extsprintf.sprintf.apply(null,args):"";this.jse_shortmsg=tailmsg;this.jse_summary=tailmsg;if(options){causedBy=options.cause;if(!causedBy||!(options.cause instanceof Error))causedBy=options;if(causedBy&&causedBy instanceof Error){this.jse_cause=causedBy;this.jse_summary+=": "+causedBy.message}}this.message=this.jse_summary;Error.call(this,this.jse_summary);if(Error.captureStackTrace){ctor=options?options.constructorOpt:undefined;ctor=ctor||arguments.callee;Error.captureStackTrace(this,ctor)}}mod_util.inherits(VError,Error);VError.prototype.name="VError";VError.prototype.toString=function ve_toString(){var str=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;if(this.message)str+=": "+this.message;return str};VError.prototype.cause=function ve_cause(){return this.jse_cause};function MultiError(errors){mod_assert.ok(errors.length>0);this.ase_errors=errors;VError.call(this,errors[0],"first of %d error%s",errors.length,errors.length==1?"":"s")}mod_util.inherits(MultiError,VError);function WError(options){Error.call(this);var args,cause,ctor;if(typeof options==="object"){args=Array.prototype.slice.call(arguments,1)}else{args=Array.prototype.slice.call(arguments,0);options=undefined}if(args.length>0){this.message=mod_extsprintf.sprintf.apply(null,args)}else{this.message=""}if(options){if(options instanceof Error){cause=options}else{cause=options.cause;ctor=options.constructorOpt}}Error.captureStackTrace(this,ctor||this.constructor);if(cause)this.cause(cause)}mod_util.inherits(WError,Error);WError.prototype.name="WError";WError.prototype.toString=function we_toString(){var str=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;if(this.message)str+=": "+this.message;if(this.we_cause&&this.we_cause.message)str+="; caused by "+this.we_cause.toString();return str};WError.prototype.cause=function we_cause(c){if(c instanceof Error)this.we_cause=c;return this.we_cause}},{assert:29,extsprintf:113,util:293}],300:[function(require,module,exports){var indexOf=require("indexof");var Object_keys=function(obj){if(Object.keys)return Object.keys(obj);else{var res=[];for(var key in obj)res.push(key);return res}};var forEach=function(xs,fn){if(xs.forEach)return xs.forEach(fn);else for(var i=0;i",amp:"&",quot:'"',apos:"'"};if(locator){domBuilder.setDocumentLocator(locator)}sax.errorHandler=buildErrorHandler(errorHandler,domBuilder,locator);sax.domBuilder=options.domBuilder||domBuilder;if(/\/x?html?$/.test(mimeType)){entityMap.nbsp=" ";entityMap.copy="©";defaultNSMap[""]="http://www.w3.org/1999/xhtml"}defaultNSMap.xml=defaultNSMap.xml||"http://www.w3.org/XML/1998/namespace";if(source){sax.parse(source,defaultNSMap,entityMap)}else{sax.errorHandler.error("invalid doc source")}return domBuilder.doc};function buildErrorHandler(errorImpl,domBuilder,locator){if(!errorImpl){if(domBuilder instanceof DOMHandler){return domBuilder}errorImpl=domBuilder}var errorHandler={};var isCallback=errorImpl instanceof Function;locator=locator||{};function build(key){var fn=errorImpl[key];if(!fn&&isCallback){fn=errorImpl.length==2?function(msg){errorImpl(key,msg)}:errorImpl}errorHandler[key]=fn&&function(msg){fn("[xmldom "+key+"]\t"+msg+_locator(locator))}||function(){}}build("warning");build("error");build("fatalError");return errorHandler}function DOMHandler(){this.cdata=false}function position(locator,node){node.lineNumber=locator.lineNumber;node.columnNumber=locator.columnNumber}DOMHandler.prototype={startDocument:function(){this.doc=(new DOMImplementation).createDocument(null,null,null);if(this.locator){this.doc.documentURI=this.locator.systemId}},startElement:function(namespaceURI,localName,qName,attrs){var doc=this.doc;var el=doc.createElementNS(namespaceURI,qName||localName);var len=attrs.length;appendElement(this,el);this.currentElement=el;this.locator&&position(this.locator,el);for(var i=0;i=start+length||start){return new java.lang.String(chars,start,length)+""}return chars}}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){DOMHandler.prototype[key]=function(){return null}});function appendElement(hander,node){if(!hander.currentElement){hander.doc.appendChild(node)}else{hander.currentElement.appendChild(node)}}var XMLReader=require("./sax").XMLReader;var DOMImplementation=exports.DOMImplementation=require("./dom").DOMImplementation;exports.XMLSerializer=require("./dom").XMLSerializer;exports.DOMParser=DOMParser},{"./dom":302,"./sax":303}],302:[function(require,module,exports){function copy(src,dest){for(var p in src){dest[p]=src[p]}}function _extends(Class,Super){var pt=Class.prototype;if(Object.create){var ppt=Object.create(Super.prototype);pt.__proto__=ppt}if(!(pt instanceof Super)){function t(){}t.prototype=Super.prototype;t=new t;copy(pt,t);Class.prototype=pt=t}if(pt.constructor!=Class){if(typeof Class!="function"){console.error("unknow Class:"+Class)}pt.constructor=Class}}var htmlns="http://www.w3.org/1999/xhtml";var NodeType={};var ELEMENT_NODE=NodeType.ELEMENT_NODE=1;var ATTRIBUTE_NODE=NodeType.ATTRIBUTE_NODE=2;var TEXT_NODE=NodeType.TEXT_NODE=3;var CDATA_SECTION_NODE=NodeType.CDATA_SECTION_NODE=4;var ENTITY_REFERENCE_NODE=NodeType.ENTITY_REFERENCE_NODE=5;var ENTITY_NODE=NodeType.ENTITY_NODE=6;var PROCESSING_INSTRUCTION_NODE=NodeType.PROCESSING_INSTRUCTION_NODE=7;var COMMENT_NODE=NodeType.COMMENT_NODE=8;var DOCUMENT_NODE=NodeType.DOCUMENT_NODE=9;var DOCUMENT_TYPE_NODE=NodeType.DOCUMENT_TYPE_NODE=10;var DOCUMENT_FRAGMENT_NODE=NodeType.DOCUMENT_FRAGMENT_NODE=11;var NOTATION_NODE=NodeType.NOTATION_NODE=12;var ExceptionCode={};var ExceptionMessage={};var INDEX_SIZE_ERR=ExceptionCode.INDEX_SIZE_ERR=(ExceptionMessage[1]="Index size error",1);var DOMSTRING_SIZE_ERR=ExceptionCode.DOMSTRING_SIZE_ERR=(ExceptionMessage[2]="DOMString size error",2);var HIERARCHY_REQUEST_ERR=ExceptionCode.HIERARCHY_REQUEST_ERR=(ExceptionMessage[3]="Hierarchy request error",3);var WRONG_DOCUMENT_ERR=ExceptionCode.WRONG_DOCUMENT_ERR=(ExceptionMessage[4]="Wrong document",4);var INVALID_CHARACTER_ERR=ExceptionCode.INVALID_CHARACTER_ERR=(ExceptionMessage[5]="Invalid character",5);var NO_DATA_ALLOWED_ERR=ExceptionCode.NO_DATA_ALLOWED_ERR=(ExceptionMessage[6]="No data allowed",6);var NO_MODIFICATION_ALLOWED_ERR=ExceptionCode.NO_MODIFICATION_ALLOWED_ERR=(ExceptionMessage[7]="No modification allowed",7);var NOT_FOUND_ERR=ExceptionCode.NOT_FOUND_ERR=(ExceptionMessage[8]="Not found",8);var NOT_SUPPORTED_ERR=ExceptionCode.NOT_SUPPORTED_ERR=(ExceptionMessage[9]="Not supported",9);var INUSE_ATTRIBUTE_ERR=ExceptionCode.INUSE_ATTRIBUTE_ERR=(ExceptionMessage[10]="Attribute in use",10);var INVALID_STATE_ERR=ExceptionCode.INVALID_STATE_ERR=(ExceptionMessage[11]="Invalid state",11);var SYNTAX_ERR=ExceptionCode.SYNTAX_ERR=(ExceptionMessage[12]="Syntax error",12);var INVALID_MODIFICATION_ERR=ExceptionCode.INVALID_MODIFICATION_ERR=(ExceptionMessage[13]="Invalid modification",13);var NAMESPACE_ERR=ExceptionCode.NAMESPACE_ERR=(ExceptionMessage[14]="Invalid namespace",14);var INVALID_ACCESS_ERR=ExceptionCode.INVALID_ACCESS_ERR=(ExceptionMessage[15]="Invalid access",15);function DOMException(code,message){if(message instanceof Error){var error=message}else{error=this;Error.call(this,ExceptionMessage[code]);this.message=ExceptionMessage[code];if(Error.captureStackTrace)Error.captureStackTrace(this,DOMException)}error.code=code;if(message)this.message=this.message+": "+message;return error}DOMException.prototype=Error.prototype;copy(ExceptionCode,DOMException);function NodeList(){}NodeList.prototype={length:0,item:function(index){return this[index]||null},toString:function(isHTML,nodeFilter){for(var buf=[],i=0;i=0){var lastIndex=list.length-1;while(i0},lookupPrefix:function(namespaceURI){var el=this;while(el){var map=el._nsMap;if(map){for(var n in map){if(map[n]==namespaceURI){return n}}}el=el.nodeType==ATTRIBUTE_NODE?el.ownerDocument:el.parentNode}return null},lookupNamespaceURI:function(prefix){var el=this;while(el){var map=el._nsMap;if(map){if(prefix in map){return map[prefix]}}el=el.nodeType==ATTRIBUTE_NODE?el.ownerDocument:el.parentNode}return null},isDefaultNamespace:function(namespaceURI){var prefix=this.lookupPrefix(namespaceURI);return prefix==null}};function _xmlEncoder(c){return c=="<"&&"<"||c==">"&&">"||c=="&"&&"&"||c=='"'&&"""||"&#"+c.charCodeAt()+";"}copy(NodeType,Node);copy(NodeType,Node.prototype);function _visitNode(node,callback){if(callback(node)){return true}if(node=node.firstChild){do{if(_visitNode(node,callback)){return true}}while(node=node.nextSibling)}}function Document(){}function _onAddAttribute(doc,el,newAttr){doc&&doc._inc++;var ns=newAttr.namespaceURI;if(ns=="http://www.w3.org/2000/xmlns/"){el._nsMap[newAttr.prefix?newAttr.localName:""]=newAttr.value}}function _onRemoveAttribute(doc,el,newAttr,remove){doc&&doc._inc++;var ns=newAttr.namespaceURI;if(ns=="http://www.w3.org/2000/xmlns/"){delete el._nsMap[newAttr.prefix?newAttr.localName:""]}}function _onUpdateChild(doc,el,newChild){if(doc&&doc._inc){doc._inc++;var cs=el.childNodes;if(newChild){cs[cs.length++]=newChild}else{var child=el.firstChild;var i=0;while(child){cs[i++]=child;child=child.nextSibling}cs.length=i}}}function _removeChild(parentNode,child){var previous=child.previousSibling;var next=child.nextSibling;if(previous){previous.nextSibling=next}else{parentNode.firstChild=next}if(next){next.previousSibling=previous}else{parentNode.lastChild=previous}_onUpdateChild(parentNode.ownerDocument,parentNode);return child}function _insertBefore(parentNode,newChild,nextChild){var cp=newChild.parentNode;if(cp){cp.removeChild(newChild)}if(newChild.nodeType===DOCUMENT_FRAGMENT_NODE){var newFirst=newChild.firstChild;if(newFirst==null){return newChild}var newLast=newChild.lastChild}else{newFirst=newLast=newChild}var pre=nextChild?nextChild.previousSibling:parentNode.lastChild;newFirst.previousSibling=pre;newLast.nextSibling=nextChild;if(pre){pre.nextSibling=newFirst}else{parentNode.firstChild=newFirst}if(nextChild==null){parentNode.lastChild=newLast}else{nextChild.previousSibling=newLast}do{newFirst.parentNode=parentNode}while(newFirst!==newLast&&(newFirst=newFirst.nextSibling));_onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);if(newChild.nodeType==DOCUMENT_FRAGMENT_NODE){newChild.firstChild=newChild.lastChild=null}return newChild}function _appendSingleChild(parentNode,newChild){var cp=newChild.parentNode;if(cp){var pre=parentNode.lastChild;cp.removeChild(newChild);var pre=parentNode.lastChild}var pre=parentNode.lastChild;newChild.parentNode=parentNode;newChild.previousSibling=pre;newChild.nextSibling=null;if(pre){pre.nextSibling=newChild}else{parentNode.firstChild=newChild}parentNode.lastChild=newChild;_onUpdateChild(parentNode.ownerDocument,parentNode,newChild);return newChild}Document.prototype={nodeName:"#document",nodeType:DOCUMENT_NODE,doctype:null,documentElement:null,_inc:1,insertBefore:function(newChild,refChild){if(newChild.nodeType==DOCUMENT_FRAGMENT_NODE){var child=newChild.firstChild;while(child){var next=child.nextSibling;this.insertBefore(child,refChild);child=next}return newChild}if(this.documentElement==null&&newChild.nodeType==ELEMENT_NODE){this.documentElement=newChild}return _insertBefore(this,newChild,refChild),newChild.ownerDocument=this,newChild},removeChild:function(oldChild){if(this.documentElement==oldChild){this.documentElement=null}return _removeChild(this,oldChild)},importNode:function(importedNode,deep){return importNode(this,importedNode,deep)},getElementById:function(id){var rtv=null;_visitNode(this.documentElement,function(node){if(node.nodeType==ELEMENT_NODE){if(node.getAttribute("id")==id){rtv=node;return true}}});return rtv},createElement:function(tagName){var node=new Element;node.ownerDocument=this;node.nodeName=tagName;node.tagName=tagName;node.childNodes=new NodeList;var attrs=node.attributes=new NamedNodeMap;attrs._ownerElement=node;return node},createDocumentFragment:function(){var node=new DocumentFragment;node.ownerDocument=this; -node.childNodes=new NodeList;return node},createTextNode:function(data){var node=new Text;node.ownerDocument=this;node.appendData(data);return node},createComment:function(data){var node=new Comment;node.ownerDocument=this;node.appendData(data);return node},createCDATASection:function(data){var node=new CDATASection;node.ownerDocument=this;node.appendData(data);return node},createProcessingInstruction:function(target,data){var node=new ProcessingInstruction;node.ownerDocument=this;node.tagName=node.target=target;node.nodeValue=node.data=data;return node},createAttribute:function(name){var node=new Attr;node.ownerDocument=this;node.name=name;node.nodeName=name;node.localName=name;node.specified=true;return node},createEntityReference:function(name){var node=new EntityReference;node.ownerDocument=this;node.nodeName=name;return node},createElementNS:function(namespaceURI,qualifiedName){var node=new Element;var pl=qualifiedName.split(":");var attrs=node.attributes=new NamedNodeMap;node.childNodes=new NodeList;node.ownerDocument=this;node.nodeName=qualifiedName;node.tagName=qualifiedName;node.namespaceURI=namespaceURI;if(pl.length==2){node.prefix=pl[0];node.localName=pl[1]}else{node.localName=qualifiedName}attrs._ownerElement=node;return node},createAttributeNS:function(namespaceURI,qualifiedName){var node=new Attr;var pl=qualifiedName.split(":");node.ownerDocument=this;node.nodeName=qualifiedName;node.name=qualifiedName;node.namespaceURI=namespaceURI;node.specified=true;if(pl.length==2){node.prefix=pl[0];node.localName=pl[1]}else{node.localName=qualifiedName}return node}};_extends(Document,Node);function Element(){this._nsMap={}}Element.prototype={nodeType:ELEMENT_NODE,hasAttribute:function(name){return this.getAttributeNode(name)!=null},getAttribute:function(name){var attr=this.getAttributeNode(name);return attr&&attr.value||""},getAttributeNode:function(name){return this.attributes.getNamedItem(name)},setAttribute:function(name,value){var attr=this.ownerDocument.createAttribute(name);attr.value=attr.nodeValue=""+value;this.setAttributeNode(attr)},removeAttribute:function(name){var attr=this.getAttributeNode(name);attr&&this.removeAttributeNode(attr)},appendChild:function(newChild){if(newChild.nodeType===DOCUMENT_FRAGMENT_NODE){return this.insertBefore(newChild,null)}else{return _appendSingleChild(this,newChild)}},setAttributeNode:function(newAttr){return this.attributes.setNamedItem(newAttr)},setAttributeNodeNS:function(newAttr){return this.attributes.setNamedItemNS(newAttr)},removeAttributeNode:function(oldAttr){return this.attributes.removeNamedItem(oldAttr.nodeName)},removeAttributeNS:function(namespaceURI,localName){var old=this.getAttributeNodeNS(namespaceURI,localName);old&&this.removeAttributeNode(old)},hasAttributeNS:function(namespaceURI,localName){return this.getAttributeNodeNS(namespaceURI,localName)!=null},getAttributeNS:function(namespaceURI,localName){var attr=this.getAttributeNodeNS(namespaceURI,localName);return attr&&attr.value||""},setAttributeNS:function(namespaceURI,qualifiedName,value){var attr=this.ownerDocument.createAttributeNS(namespaceURI,qualifiedName);attr.value=attr.nodeValue=""+value;this.setAttributeNode(attr)},getAttributeNodeNS:function(namespaceURI,localName){return this.attributes.getNamedItemNS(namespaceURI,localName)},getElementsByTagName:function(tagName){return new LiveNodeList(this,function(base){var ls=[];_visitNode(base,function(node){if(node!==base&&node.nodeType==ELEMENT_NODE&&(tagName==="*"||node.tagName==tagName)){ls.push(node)}});return ls})},getElementsByTagNameNS:function(namespaceURI,localName){return new LiveNodeList(this,function(base){var ls=[];_visitNode(base,function(node){if(node!==base&&node.nodeType===ELEMENT_NODE&&(namespaceURI==="*"||node.namespaceURI===namespaceURI)&&(localName==="*"||node.localName==localName)){ls.push(node)}});return ls})}};Document.prototype.getElementsByTagName=Element.prototype.getElementsByTagName;Document.prototype.getElementsByTagNameNS=Element.prototype.getElementsByTagNameNS;_extends(Element,Node);function Attr(){}Attr.prototype.nodeType=ATTRIBUTE_NODE;_extends(Attr,Node);function CharacterData(){}CharacterData.prototype={data:"",substringData:function(offset,count){return this.data.substring(offset,offset+count)},appendData:function(text){text=this.data+text;this.nodeValue=this.data=text;this.length=text.length},insertData:function(offset,text){this.replaceData(offset,0,text)},appendChild:function(newChild){throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])},deleteData:function(offset,count){this.replaceData(offset,count,"")},replaceData:function(offset,count,text){var start=this.data.substring(0,offset);var end=this.data.substring(offset+count);text=start+text+end;this.nodeValue=this.data=text;this.length=text.length}};_extends(CharacterData,Node);function Text(){}Text.prototype={nodeName:"#text",nodeType:TEXT_NODE,splitText:function(offset){var text=this.data;var newText=text.substring(offset);text=text.substring(0,offset);this.data=this.nodeValue=text;this.length=text.length;var newNode=this.ownerDocument.createTextNode(newText);if(this.parentNode){this.parentNode.insertBefore(newNode,this.nextSibling)}return newNode}};_extends(Text,CharacterData);function Comment(){}Comment.prototype={nodeName:"#comment",nodeType:COMMENT_NODE};_extends(Comment,CharacterData);function CDATASection(){}CDATASection.prototype={nodeName:"#cdata-section",nodeType:CDATA_SECTION_NODE};_extends(CDATASection,CharacterData);function DocumentType(){}DocumentType.prototype.nodeType=DOCUMENT_TYPE_NODE;_extends(DocumentType,Node);function Notation(){}Notation.prototype.nodeType=NOTATION_NODE;_extends(Notation,Node);function Entity(){}Entity.prototype.nodeType=ENTITY_NODE;_extends(Entity,Node);function EntityReference(){}EntityReference.prototype.nodeType=ENTITY_REFERENCE_NODE;_extends(EntityReference,Node);function DocumentFragment(){}DocumentFragment.prototype.nodeName="#document-fragment";DocumentFragment.prototype.nodeType=DOCUMENT_FRAGMENT_NODE;_extends(DocumentFragment,Node);function ProcessingInstruction(){}ProcessingInstruction.prototype.nodeType=PROCESSING_INSTRUCTION_NODE;_extends(ProcessingInstruction,Node);function XMLSerializer(){}XMLSerializer.prototype.serializeToString=function(node,isHtml,nodeFilter){return nodeSerializeToString.call(node,isHtml,nodeFilter)};Node.prototype.toString=nodeSerializeToString;function nodeSerializeToString(isHtml,nodeFilter){var buf=[];var refNode=this.nodeType==9?this.documentElement:this;var prefix=refNode.prefix;var uri=refNode.namespaceURI;if(uri&&prefix==null){var prefix=refNode.lookupPrefix(uri);if(prefix==null){var visibleNamespaces=[{namespace:uri,prefix:null}]}}serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);return buf.join("")}function needNamespaceDefine(node,isHTML,visibleNamespaces){var prefix=node.prefix||"";var uri=node.namespaceURI;if(!prefix&&!uri){return false}if(prefix==="xml"&&uri==="http://www.w3.org/XML/1998/namespace"||uri=="http://www.w3.org/2000/xmlns/"){return false}var i=visibleNamespaces.length;while(i--){var ns=visibleNamespaces[i];if(ns.prefix==prefix){return ns.namespace!=uri}}return true}function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){if(nodeFilter){node=nodeFilter(node);if(node){if(typeof node=="string"){buf.push(node);return}}else{return}}switch(node.nodeType){case ELEMENT_NODE:if(!visibleNamespaces)visibleNamespaces=[];var startVisibleNamespaces=visibleNamespaces.length;var attrs=node.attributes;var len=attrs.length;var child=node.firstChild;var nodeName=node.tagName;isHTML=htmlns===node.namespaceURI||isHTML;buf.push("<",nodeName);for(var i=0;i");if(isHTML&&/^script$/i.test(nodeName)){while(child){if(child.data){buf.push(child.data)}else{serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces)}child=child.nextSibling}}else{while(child){serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);child=child.nextSibling}}buf.push("")}else{buf.push("/>")}return;case DOCUMENT_NODE:case DOCUMENT_FRAGMENT_NODE:var child=node.firstChild;while(child){serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);child=child.nextSibling}return;case ATTRIBUTE_NODE:return buf.push(" ",node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');case TEXT_NODE:return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));case CDATA_SECTION_NODE:return buf.push("");case COMMENT_NODE:return buf.push("");case DOCUMENT_TYPE_NODE:var pubid=node.publicId;var sysid=node.systemId;buf.push("')}else if(sysid&&sysid!="."){buf.push(' SYSTEM "',sysid,'">')}else{var sub=node.internalSubset;if(sub){buf.push(" [",sub,"]")}buf.push(">")}return;case PROCESSING_INSTRUCTION_NODE:return buf.push("");case ENTITY_REFERENCE_NODE:return buf.push("&",node.nodeName,";");default:buf.push("??",node.nodeName)}}function importNode(doc,node,deep){var node2;switch(node.nodeType){case ELEMENT_NODE:node2=node.cloneNode(false);node2.ownerDocument=doc;case DOCUMENT_FRAGMENT_NODE:break;case ATTRIBUTE_NODE:deep=true;break}if(!node2){node2=node.cloneNode(false)}node2.ownerDocument=doc;node2.parentNode=null;if(deep){var child=node.firstChild;while(child){node2.appendChild(importNode(doc,child,deep));child=child.nextSibling}}return node2}function cloneNode(doc,node,deep){var node2=new node.constructor;for(var n in node){var v=node[n];if(typeof v!="object"){if(v!=node2[n]){node2[n]=v}}}if(node.childNodes){node2.childNodes=new NodeList}node2.ownerDocument=doc;switch(node2.nodeType){case ELEMENT_NODE:var attrs=node.attributes;var attrs2=node2.attributes=new NamedNodeMap;var len=attrs.length;attrs2._ownerElement=node2;for(var i=0;i65535){code-=65536;var surrogate1=55296+(code>>10),surrogate2=56320+(code&1023);return String.fromCharCode(surrogate1,surrogate2)}else{return String.fromCharCode(code)}}function entityReplacer(a){var k=a.slice(1,-1);if(k in entityMap){return entityMap[k]}else if(k.charAt(0)==="#"){return fixedFromCharCode(parseInt(k.substr(1).replace("x","0x")))}else{errorHandler.error("entity not found:"+a);return a}}function appendText(end){if(end>start){var xt=source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);locator&&position(start);domBuilder.characters(xt,0,end-start);start=end}}function position(p,m){while(p>=lineEnd&&(m=linePattern.exec(source))){lineStart=m.index;lineEnd=lineStart+m[0].length;locator.lineNumber++}locator.columnNumber=p-lineStart+1}var lineStart=0;var lineEnd=0;var linePattern=/.*(?:\r\n?|\n)|.*$/g;var locator=domBuilder.locator;var parseStack=[{currentNSMap:defaultNSMapCopy}];var closeMap={};var start=0;while(true){try{var tagStart=source.indexOf("<",start);if(tagStart<0){if(!source.substr(start).match(/^\s*$/)){var doc=domBuilder.doc;var text=doc.createTextNode(source.substr(start));doc.appendChild(text);domBuilder.currentElement=text}return}if(tagStart>start){appendText(tagStart)}switch(source.charAt(tagStart+1)){case"/":var end=source.indexOf(">",tagStart+3);var tagName=source.substring(tagStart+2,end);var config=parseStack.pop();if(end<0){tagName=source.substring(tagStart+2).replace(/[\s<].*/,"");errorHandler.error("end tag name: "+tagName+" is not complete:"+config.tagName);end=tagStart+1+tagName.length}else if(tagName.match(/\sstart){start=end}else{appendText(Math.max(tagStart,start)+1)}}}function copyLocator(f,t){t.lineNumber=f.lineNumber;t.columnNumber=f.columnNumber;return t}function parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){var attrName;var value;var p=++start;var s=S_TAG;while(true){var c=source.charAt(p);switch(c){case"=":if(s===S_ATTR){attrName=source.slice(start,p);s=S_EQ}else if(s===S_ATTR_SPACE){s=S_EQ}else{throw new Error("attribute equal must after attrName")}break;case"'":case'"':if(s===S_EQ||s===S_ATTR){if(s===S_ATTR){errorHandler.warning('attribute value must after "="');attrName=source.slice(start,p)}start=p+1;p=source.indexOf(c,start);if(p>0){value=source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);el.add(attrName,value,start-1);s=S_ATTR_END}else{throw new Error("attribute value no end '"+c+"' match")}}else if(s==S_ATTR_NOQUOT_VALUE){value=source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);el.add(attrName,value,start);errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+")!!");start=p+1;s=S_ATTR_END}else{throw new Error('attribute value must after "="')}break;case"/":switch(s){case S_TAG:el.setTagName(source.slice(start,p));case S_ATTR_END:case S_TAG_SPACE:case S_TAG_CLOSE:s=S_TAG_CLOSE;el.closed=true;case S_ATTR_NOQUOT_VALUE:case S_ATTR:case S_ATTR_SPACE:break;default:throw new Error("attribute invalid close char('/')")}break;case"":errorHandler.error("unexpected end of input");if(s==S_TAG){el.setTagName(source.slice(start,p))}return p;case">":switch(s){case S_TAG:el.setTagName(source.slice(start,p));case S_ATTR_END:case S_TAG_SPACE:case S_TAG_CLOSE:break;case S_ATTR_NOQUOT_VALUE:case S_ATTR:value=source.slice(start,p);if(value.slice(-1)==="/"){el.closed=true;value=value.slice(0,-1)}case S_ATTR_SPACE:if(s===S_ATTR_SPACE){value=attrName}if(s==S_ATTR_NOQUOT_VALUE){errorHandler.warning('attribute "'+value+'" missed quot(")!!');el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start)}else{if(currentNSMap[""]!=="http://www.w3.org/1999/xhtml"||!value.match(/^(?:disabled|checked|selected)$/i)){errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')}el.add(value,value,start)}break;case S_EQ:throw new Error("attribute value missed!!")}return p;case"€":c=" ";default:if(c<=" "){switch(s){case S_TAG:el.setTagName(source.slice(start,p));s=S_TAG_SPACE;break;case S_ATTR:attrName=source.slice(start,p);s=S_ATTR_SPACE;break;case S_ATTR_NOQUOT_VALUE:var value=source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);errorHandler.warning('attribute "'+value+'" missed quot(")!!');el.add(attrName,value,start);case S_ATTR_END:s=S_TAG_SPACE;break}}else{switch(s){case S_ATTR_SPACE:var tagName=el.tagName;if(currentNSMap[""]!=="http://www.w3.org/1999/xhtml"||!attrName.match(/^(?:disabled|checked|selected)$/i)){errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead2!!')}el.add(attrName,attrName,start);start=p;s=S_ATTR;break;case S_ATTR_END:errorHandler.warning('attribute space is required"'+attrName+'"!!');case S_TAG_SPACE:s=S_ATTR;start=p;break;case S_EQ:s=S_ATTR_NOQUOT_VALUE;start=p;break;case S_TAG_CLOSE:throw new Error("elements closed character '/' and '>' must be connected to")}}}p++}}function appendElement(el,domBuilder,currentNSMap){var tagName=el.tagName;var localNSMap=null;var i=el.length;while(i--){var a=el[i];var qName=a.qName;var value=a.value;var nsp=qName.indexOf(":");if(nsp>0){var prefix=a.prefix=qName.slice(0,nsp);var localName=qName.slice(nsp+1);var nsPrefix=prefix==="xmlns"&&localName}else{localName=qName;prefix=null;nsPrefix=qName==="xmlns"&&""}a.localName=localName;if(nsPrefix!==false){if(localNSMap==null){localNSMap={};_copy(currentNSMap,currentNSMap={})}currentNSMap[nsPrefix]=localNSMap[nsPrefix]=value;a.uri="http://www.w3.org/2000/xmlns/";domBuilder.startPrefixMapping(nsPrefix,value)}}var i=el.length;while(i--){a=el[i];var prefix=a.prefix;if(prefix){if(prefix==="xml"){a.uri="http://www.w3.org/XML/1998/namespace"}if(prefix!=="xmlns"){a.uri=currentNSMap[prefix||""]}}}var nsp=tagName.indexOf(":");if(nsp>0){prefix=el.prefix=tagName.slice(0,nsp);localName=el.localName=tagName.slice(nsp+1)}else{prefix=null;localName=el.localName=tagName}var ns=el.uri=currentNSMap[prefix||""];domBuilder.startElement(ns,localName,tagName,el);if(el.closed){domBuilder.endElement(ns,localName,tagName);if(localNSMap){for(prefix in localNSMap){domBuilder.endPrefixMapping(prefix)}}}else{el.currentNSMap=currentNSMap;el.localNSMap=localNSMap;return true}}function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){if(/^(?:script|textarea)$/i.test(tagName)){var elEndStart=source.indexOf("",elStartEnd);var text=source.substring(elStartEnd+1,elEndStart);if(/[&<]/.test(text)){if(/^script$/i.test(tagName)){domBuilder.characters(text,0,text.length);return elEndStart}text=text.replace(/&#?\w+;/g,entityReplacer);domBuilder.characters(text,0,text.length);return elEndStart}}return elStartEnd+1}function fixSelfClosed(source,elStartEnd,tagName,closeMap){var pos=closeMap[tagName];if(pos==null){pos=source.lastIndexOf("");if(pos",start+4);if(end>start){domBuilder.comment(source,start+4,end-start-4);return end+3}else{errorHandler.error("Unclosed comment");return-1}}else{return-1}default:if(source.substr(start+3,6)=="CDATA["){var end=source.indexOf("]]>",start+9);domBuilder.startCDATA();domBuilder.characters(source,start+9,end-start-9);domBuilder.endCDATA();return end+3}var matchs=split(source,start);var len=matchs.length;if(len>1&&/!doctype/i.test(matchs[0][0])){var name=matchs[1][0];var pubid=len>3&&/^public$/i.test(matchs[2][0])&&matchs[3][0];var sysid=len>4&&matchs[4][0];var lastMatch=matchs[len-1];domBuilder.startDTD(name,pubid&&pubid.replace(/^(['"])(.*?)\1$/,"$2"),sysid&&sysid.replace(/^(['"])(.*?)\1$/,"$2"));domBuilder.endDTD();return lastMatch.index+lastMatch[0].length}}return-1}function parseInstruction(source,start,domBuilder){var end=source.indexOf("?>",start);if(end){var match=source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(match){var len=match[0].length;domBuilder.processingInstruction(match[1],match[2]);return end+2}else{return-1}}return-1}function ElementAttributes(source){}ElementAttributes.prototype={setTagName:function(tagName){if(!tagNamePattern.test(tagName)){throw new Error("invalid tagName:"+tagName)}this.tagName=tagName},add:function(qName,value,offset){if(!tagNamePattern.test(qName)){throw new Error("invalid attribute:"+qName)}this[this.length++]={qName:qName,value:value,offset:offset}},length:0,getLocalName:function(i){return this[i].localName},getLocator:function(i){return this[i].locator},getQName:function(i){return this[i].qName},getURI:function(i){return this[i].uri},getValue:function(i){return this[i].value}};function _set_proto_(thiz,parent){thiz.__proto__=parent;return thiz}if(!(_set_proto_({},_set_proto_.prototype)instanceof _set_proto_)){_set_proto_=function(thiz,parent){function p(){}p.prototype=parent;p=new p;for(parent in thiz){p[parent]=thiz[parent]}return p}}function split(source,start){var match;var buf=[];var reg=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;reg.lastIndex=start;reg.exec(source);while(match=reg.exec(source)){buf.push(match);if(match[1])return buf}}exports.XMLReader=XMLReader},{}],304:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;idiffCriteria){result.clock="BAD";result.clockOffset=Math.abs(timeAtHead-d)}else{result.clock="OK";result.clockOffset=Math.abs(timeAtHead-d)}}resolve(result)})};DashValidator.prototype.verifySegments=function verifySegments(verifyFn,segments,doDownload){var _this3=this;return new Promise(function(resolve,reject){var failed=[];var ok=[];var it=util.iteratorFromArray(segments);var base=_this3._base;function checkSegment(doneCb){var iter=it.next();if(iter.done){doneCb()}else{!function(){var segmentUrl=iter.value;verifySegment(verifyFn||defaultVerifyFn,base+segmentUrl,doDownload).then(function(result){if(result.ok){ok.push({uri:segmentUrl})}else{failed.push({uri:segmentUrl,reason:result.reason,headers:result.headers})}util.sleep(50);checkSegment(doneCb)}).catch(function(error){console.error(error)})}()}}checkSegment(function(){resolve({failed:failed,ok:ok})})})};DashValidator.prototype.verifyManifest=function verifyManifest(verifyFn){var _this4=this;return new Promise(function(resolve,reject){var verify=verifyFn||defaultManifestVerifyFn;var result={};result.ok=verify(_this4._manifestHeaders,_this4._manifest.type);result.headers=_this4._manifestHeaders;resolve(result)})};DashValidator.prototype.verifyAllSegments=function verifyAllSegments(verifyFn,doDownload){var segments=this._manifest.segments;return this.verifySegments(verifyFn,segments,doDownload)};DashValidator.prototype.validateDynamicManifest=function validateDynamicManifest(iterations,_optIterator){var _this5=this;return new Promise(function(resolve,reject){_this5._runner.start(iterations,function(){return new Promise(function(resolveUpdateMpd){util.requestXml(_this5._src).then(function(resp){var parser=new DashParser;parser.parse(resp.xml).then(function(manifest){_this5._manifest=manifest;_this5._runner.updateMpd(_this5._manifest,resp.headers);resolveUpdateMpd()})})})},_optIterator).then(function(result){resolve(result)}).catch(reject)})};DashValidator.prototype.on=function on(eventName,fn){if(["invalidplayhead","invalidheaders","checking"].indexOf(eventName)!=-1){this._runner.on(eventName,fn)}};DashValidator.prototype.duration=function duration(){return this._manifest.totalDuration};DashValidator.prototype.segmentUrls=function segmentUrls(){return this._manifest.segments};DashValidator.prototype.isLive=function isLive(){return this._manifest.type==="dynamic"};function defaultVerifyFn(headers){var headersOk=true;if(typeof headers["cache-control"]==="undefined"||headers["access-control-expose-headers"].split(",").indexOf("Date")==-1||headers["access-control-allow-headers"].split(",").indexOf("origin")==-1){headersOk=false}return headersOk}function defaultManifestVerifyFn(headers,type){if(type=="dynamic"){if(!headers["cache-control"]){return false}var m=headers["cache-control"].match(/max-age=(\d+)/);if(!m){return false}if(m[1]>10){return false}}return true}function verifySegment(verifyFn,segmentUrl,doDownload){return new Promise(function(resolve,reject){var result={};var reqFn=void 0;if(!doDownload){reqFn=util.requestHeaders}else{reqFn=util.requestCacheFill}reqFn(segmentUrl).then(function(headers){result.ok=verifyFn(headers);result.headers=headers;resolve(result)}).catch(function(err){result.ok=false;result.reason=err;resolve(result)})})}module.exports=DashValidator},{"./lib/dash_parser.js":3,"./lib/dash_validator_runner.js":6,"./lib/util.js":7}],2:[function(require,module,exports){"use strict";var util=require("./util.js");var DashManifest=function constructor(internalMpd){var self={mpd:internalMpd,get type(){return this.mpd.type},get availabilityStartTime(){return util.dateInSeconds(this.mpd.availabilityStartTime)},get publishTime(){return util.dateInSeconds(this.mpd.publishTime)},get timeShiftBufferDepth(){return util.durationInSeconds(this.mpd.timeShiftBufferDepth)},get periods(){return this.mpd.periods},get segments(){var segmentUrls=[];defaultFilterFn=function defaultFilterFn(as){return as.mimeType=="video/mp4"};filterFn=defaultFilterFn;this.mpd.periods.forEach(function(p){p.adaptationSets.filter(filterFn).forEach(function(as){as.representations.forEach(function(r){r.segments.forEach(function(seg){segmentUrls.push(p.baseUrl+seg.uri)})})})});return segmentUrls},get totalDuration(){var duration=0;if(this.mpd.type==="dynamic"){return undefined}this.mpd.periods.forEach(function(p){p.adaptationSets.filter(function(as){return as.mimeType=="video/mp4"}).forEach(function(as){duration+=as.representations[0].segments.map(function(s){return s.durationInSeconds}).reduce(function(total,value){return total+value})})});return duration},get timeAtHead(){var lastPeriod=this.mpd.periods[this.mpd.periods.length-1];var as=lastPeriod.adaptationSets.filter(function(as){return as.mimeType=="video/mp4"})[0];var segments=as.representations[0].segments;var lastSegment=segments[segments.length-1];return lastSegment.end*1e3}};return self};module.exports=DashManifest},{"./util.js":7}],3:[function(require,module,exports){"use strict";var DOMParser=require("xmldom").DOMParser;var DashManifest=require("./dash_manifest.js");var DashSegmentList=require("./dash_segmentlist.js");var DashRepresentation=require("./dash_representation.js");var util=require("./util.js");function parsePeriods(xml){var periods=[];var children=util.findChildren(xml,"Period");for(var i=0;i0){var segmentTemplateXml=segmentTemplateXmlChildren[0];var timescale=segmentTemplateXml.getAttribute("timescale");var media=segmentTemplateXml.getAttribute("media");var segmentXmlChildren=util.findChildren(segmentTemplateXml,"SegmentTimeline");var segmentListXmlChildren=util.findChildren(segmentXmlChildren[0],"S");var timeline=[];for(var j=0;j=iterations){resolve(_this.result)}else{setTimeout(timerFn.bind(_this),_this.updateTime*1e3)}})}setTimeout(timerFn.bind(_this2),_this2.updateTime*1e3);if(_optIterator){_optIterator()}})};DashValidatorRunner.prototype.updateMpd=function updateMpd(mpd,headers){this.mpd=mpd;this.headers=headers};DashValidatorRunner.prototype.on=function on(runnerEvent,fn){var listener={eventName:runnerEvent,fn:fn};this.listeners.push(listener)};DashValidatorRunner.prototype.trigger=function trigger(runnerEvent){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}this.listeners.filter(function(l){return l.eventName==runnerEvent}).forEach(function(l){if(l.fn){if(args.length==1){l.fn(args[0])}else{l.fn(args)}}})};function hasValidPlayhead(mpd){var now=Date.now();if(Math.abs(mpd.timeAtHead-now)>2e4){return false}return true}function hasValidHeaders(lastHeaders,currentHeaders){var lastDate=new Date(lastHeaders["date"]);var currentDate=new Date(currentHeaders["date"]);var lastModifiedDate=new Date(lastHeaders["last-modified"]);var currentModifiedDate=new Date(currentHeaders["last-modified"]);if(lastModifiedDate>=currentModifiedDate){return false}if(lastDate>=currentDate){return false}return true}module.exports=DashValidatorRunner},{"./util.js":7}],7:[function(require,module,exports){"use strict";var request=require("request");var URL=require("url");var http=require("http");var fs=require("fs");var dateInSeconds=function dateInSeconds(dateString){if(!dateString)return null;var result=Date.parse(dateString);return!isNaN(result)?Math.floor(result/1e3):null};var durationInSeconds=function durationInSeconds(durationString){if(!durationString)return null;var re="^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?"+"(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$";var matches=new RegExp(re).exec(durationString);if(!matches){return null}var years=Number(matches[1]||null);var months=Number(matches[2]||null);var days=Number(matches[3]||null);var hours=Number(matches[4]||null);var minutes=Number(matches[5]||null);var seconds=Number(matches[6]||null);var d=60*60*24*365*years+60*60*24*30*months+60*60*24*days+60*60*hours+60*minutes+seconds;return isFinite(d)?d:null};var findChildren=function findChildren(elem,name){var children=Array.prototype.filter.call(elem.childNodes,function(child){return child.tagName===name});return children};var toNumber=function toNumber(xmlattr){if(typeof xmlattr!=="undefined"&&xmlattr!==""){return Number(xmlattr)}return undefined};var getBaseUrl=function getBaseUrl(uri){var sp=uri.split("/");var baseUrl=sp.slice(0,-1).join("/");return baseUrl};var requestXml=function requestXml(uri){return new Promise(function(resolve,reject){request(uri,function(error,response,body){if(!error&&response.statusCode==200){resolve({xml:body,headers:response.headers})}reject(error)})})};var requestCacheFill=function requestCacheFill(uri){return new Promise(function(resolve,reject){var headers=void 0;var statusCode=void 0;var f=fs.createWriteStream("/dev/null");f.on("error",function(error){reject(error)});request.get(uri).on("response",function(response){headers=response.headers;statusCode=response.statusCode;if(statusCode!=200){reject("HTTP error "+statusCode)}}).pipe(f).on("error",function(error){reject(error)}).on("finish",function(){resolve(headers)})})};var requestHeaders=function requestHeaders(uri){return new Promise(function(resolve,reject){var url=URL.parse(uri);var options={method:"HEAD",host:url.host,path:url.path};var req=http.request(options,function(response){if(response.statusCode==200){resolve(response.headers)}reject(response.statusCode)});req.end()})};var iteratorFromArray=function iteratorFromArray(arr){var nextIndex=0;return{next:function next(){return nextIndex1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}if(args.length>0){console.log(str,args)}else{console.log(str)}};module.exports={durationInSeconds:durationInSeconds,dateInSeconds:dateInSeconds,findChildren:findChildren,toNumber:toNumber,requestXml:requestXml,requestHeaders:requestHeaders,requestCacheFill:requestCacheFill,iteratorFromArray:iteratorFromArray,getBaseUrl:getBaseUrl,sleep:sleep,log:log}},{fs:64,http:272,request:226,url:288}],8:[function(require,module,exports){var asn1=exports;asn1.bignum=require("bn.js");asn1.define=require("./asn1/api").define;asn1.base=require("./asn1/base");asn1.constants=require("./asn1/constants");asn1.decoders=require("./asn1/decoders");asn1.encoders=require("./asn1/encoders")},{"./asn1/api":9,"./asn1/base":11,"./asn1/constants":15,"./asn1/decoders":17,"./asn1/encoders":20,"bn.js":35}],9:[function(require,module,exports){var asn1=require("../asn1");var inherits=require("inherits");var api=exports;api.define=function define(name,body){return new Entity(name,body)};function Entity(name,body){this.name=name;this.body=body;this.decoders={};this.encoders={}}Entity.prototype._createNamed=function createNamed(base){var named;try{named=require("vm").runInThisContext("(function "+this.name+"(entity) {\n"+" this._initNamed(entity);\n"+"})")}catch(e){named=function(entity){this._initNamed(entity)}}inherits(named,base);named.prototype._initNamed=function initnamed(entity){base.call(this,entity)};return new named(this)};Entity.prototype._getDecoder=function _getDecoder(enc){enc=enc||"der";if(!this.decoders.hasOwnProperty(enc))this.decoders[enc]=this._createNamed(asn1.decoders[enc]);return this.decoders[enc]};Entity.prototype.decode=function decode(data,enc,options){return this._getDecoder(enc).decode(data,options)};Entity.prototype._getEncoder=function _getEncoder(enc){enc=enc||"der";if(!this.encoders.hasOwnProperty(enc))this.encoders[enc]=this._createNamed(asn1.encoders[enc]);return this.encoders[enc]};Entity.prototype.encode=function encode(data,enc,reporter){return this._getEncoder(enc).encode(data,reporter)}},{"../asn1":8,inherits:152,vm:300}],10:[function(require,module,exports){var inherits=require("inherits");var Reporter=require("../base").Reporter;var Buffer=require("buffer").Buffer;function DecoderBuffer(base,options){Reporter.call(this,options);if(!Buffer.isBuffer(base)){this.error("Input not Buffer");return}this.base=base;this.offset=0;this.length=base.length}inherits(DecoderBuffer,Reporter);exports.DecoderBuffer=DecoderBuffer;DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:Reporter.prototype.save.call(this)}};DecoderBuffer.prototype.restore=function restore(save){var res=new DecoderBuffer(this.base);res.offset=save.offset;res.length=this.offset;this.offset=save.offset;Reporter.prototype.restore.call(this,save.reporter);return res};DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length};DecoderBuffer.prototype.readUInt8=function readUInt8(fail){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(fail||"DecoderBuffer overrun")};DecoderBuffer.prototype.skip=function skip(bytes,fail){if(!(this.offset+bytes<=this.length))return this.error(fail||"DecoderBuffer overrun");var res=new DecoderBuffer(this.base);res._reporterState=this._reporterState;res.offset=this.offset;res.length=this.offset+bytes;this.offset+=bytes;return res};DecoderBuffer.prototype.raw=function raw(save){return this.base.slice(save?save.offset:this.offset,this.length)};function EncoderBuffer(value,reporter){if(Array.isArray(value)){this.length=0;this.value=value.map(function(item){if(!(item instanceof EncoderBuffer))item=new EncoderBuffer(item,reporter);this.length+=item.length;return item},this)}else if(typeof value==="number"){if(!(0<=value&&value<=255))return reporter.error("non-byte EncoderBuffer value");this.value=value;this.length=1}else if(typeof value==="string"){this.value=value;this.length=Buffer.byteLength(value)}else if(Buffer.isBuffer(value)){this.value=value;this.length=value.length}else{return reporter.error("Unsupported type: "+typeof value)}}exports.EncoderBuffer=EncoderBuffer;EncoderBuffer.prototype.join=function join(out,offset){if(!out)out=new Buffer(this.length);if(!offset)offset=0;if(this.length===0)return out;if(Array.isArray(this.value)){this.value.forEach(function(item){item.join(out,offset);offset+=item.length})}else{if(typeof this.value==="number")out[offset]=this.value;else if(typeof this.value==="string")out.write(this.value,offset);else if(Buffer.isBuffer(this.value))this.value.copy(out,offset);offset+=this.length}return out}},{"../base":11,buffer:67,inherits:152}],11:[function(require,module,exports){var base=exports;base.Reporter=require("./reporter").Reporter;base.DecoderBuffer=require("./buffer").DecoderBuffer;base.EncoderBuffer=require("./buffer").EncoderBuffer;base.Node=require("./node")},{"./buffer":10,"./node":12,"./reporter":13}],12:[function(require,module,exports){var Reporter=require("../base").Reporter;var EncoderBuffer=require("../base").EncoderBuffer;var DecoderBuffer=require("../base").DecoderBuffer;var assert=require("minimalistic-assert");var tags=["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"];var methods=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(tags);var overrided=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Node(enc,parent){var state={};this._baseState=state;state.enc=enc;state.parent=parent||null;state.children=null;state.tag=null;state.args=null;state.reverseArgs=null;state.choice=null;state.optional=false;state.any=false;state.obj=false;state.use=null;state.useDecoder=null;state.key=null;state["default"]=null;state.explicit=null;state.implicit=null;state.contains=null;if(!state.parent){state.children=[];this._wrap()}}module.exports=Node;var stateProps=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){var state=this._baseState;var cstate={};stateProps.forEach(function(prop){cstate[prop]=state[prop]});var res=new this.constructor(cstate.parent);res._baseState=cstate;return res};Node.prototype._wrap=function wrap(){var state=this._baseState;methods.forEach(function(method){this[method]=function _wrappedMethod(){var clone=new this.constructor(this);state.children.push(clone);return clone[method].apply(clone,arguments)}},this)};Node.prototype._init=function init(body){var state=this._baseState;assert(state.parent===null);body.call(this);state.children=state.children.filter(function(child){return child._baseState.parent===this},this);assert.equal(state.children.length,1,"Root node can have only one child")};Node.prototype._useArgs=function useArgs(args){var state=this._baseState;var children=args.filter(function(arg){return arg instanceof this.constructor},this);args=args.filter(function(arg){return!(arg instanceof this.constructor)},this);if(children.length!==0){assert(state.children===null);state.children=children;children.forEach(function(child){child._baseState.parent=this},this)}if(args.length!==0){assert(state.args===null);state.args=args;state.reverseArgs=args.map(function(arg){if(typeof arg!=="object"||arg.constructor!==Object)return arg;var res={};Object.keys(arg).forEach(function(key){if(key==(key|0))key|=0;var value=arg[key];res[value]=key});return res})}};overrided.forEach(function(method){Node.prototype[method]=function _overrided(){var state=this._baseState;throw new Error(method+" not implemented for encoding: "+state.enc)}});tags.forEach(function(tag){Node.prototype[tag]=function _tagMethod(){var state=this._baseState;var args=Array.prototype.slice.call(arguments);assert(state.tag===null);state.tag=tag;this._useArgs(args);return this}});Node.prototype.use=function use(item){assert(item);var state=this._baseState;assert(state.use===null);state.use=item;return this};Node.prototype.optional=function optional(){var state=this._baseState;state.optional=true;return this};Node.prototype.def=function def(val){var state=this._baseState;assert(state["default"]===null);state["default"]=val;state.optional=true;return this};Node.prototype.explicit=function explicit(num){var state=this._baseState;assert(state.explicit===null&&state.implicit===null);state.explicit=num;return this};Node.prototype.implicit=function implicit(num){var state=this._baseState;assert(state.explicit===null&&state.implicit===null);state.implicit=num;return this};Node.prototype.obj=function obj(){var state=this._baseState;var args=Array.prototype.slice.call(arguments);state.obj=true;if(args.length!==0)this._useArgs(args);return this};Node.prototype.key=function key(newKey){var state=this._baseState;assert(state.key===null);state.key=newKey;return this};Node.prototype.any=function any(){var state=this._baseState;state.any=true;return this};Node.prototype.choice=function choice(obj){var state=this._baseState;assert(state.choice===null);state.choice=obj;this._useArgs(Object.keys(obj).map(function(key){return obj[key]}));return this};Node.prototype.contains=function contains(item){var state=this._baseState;assert(state.use===null);state.contains=item;return this};Node.prototype._decode=function decode(input,options){var state=this._baseState;if(state.parent===null)return input.wrapResult(state.children[0]._decode(input,options));var result=state["default"];var present=true;var prevKey=null;if(state.key!==null)prevKey=input.enterKey(state.key);if(state.optional){var tag=null;if(state.explicit!==null)tag=state.explicit;else if(state.implicit!==null)tag=state.implicit;else if(state.tag!==null)tag=state.tag;if(tag===null&&!state.any){var save=input.save();try{if(state.choice===null)this._decodeGeneric(state.tag,input,options);else this._decodeChoice(input,options);present=true}catch(e){present=false}input.restore(save)}else{present=this._peekTag(input,tag,state.any);if(input.isError(present))return present}}var prevObj;if(state.obj&&present)prevObj=input.enterObject();if(present){if(state.explicit!==null){var explicit=this._decodeTag(input,state.explicit);if(input.isError(explicit))return explicit;input=explicit}var start=input.offset;if(state.use===null&&state.choice===null){if(state.any)var save=input.save();var body=this._decodeTag(input,state.implicit!==null?state.implicit:state.tag,state.any);if(input.isError(body))return body;if(state.any)result=input.raw(save);else input=body}if(options&&options.track&&state.tag!==null)options.track(input.path(),start,input.length,"tagged");if(options&&options.track&&state.tag!==null)options.track(input.path(),input.offset,input.length,"content");if(state.any)result=result;else if(state.choice===null)result=this._decodeGeneric(state.tag,input,options);else result=this._decodeChoice(input,options);if(input.isError(result))return result;if(!state.any&&state.choice===null&&state.children!==null){state.children.forEach(function decodeChildren(child){child._decode(input,options)})}if(state.contains&&(state.tag==="octstr"||state.tag==="bitstr")){var data=new DecoderBuffer(result);result=this._getUse(state.contains,input._reporterState.obj)._decode(data,options)}}if(state.obj&&present)result=input.leaveObject(prevObj);if(state.key!==null&&(result!==null||present===true))input.leaveKey(prevKey,state.key,result);else if(prevKey!==null)input.exitKey(prevKey);return result};Node.prototype._decodeGeneric=function decodeGeneric(tag,input,options){var state=this._baseState;if(tag==="seq"||tag==="set")return null;if(tag==="seqof"||tag==="setof")return this._decodeList(input,tag,state.args[0],options);else if(/str$/.test(tag))return this._decodeStr(input,tag,options);else if(tag==="objid"&&state.args)return this._decodeObjid(input,state.args[0],state.args[1],options);else if(tag==="objid")return this._decodeObjid(input,null,null,options);else if(tag==="gentime"||tag==="utctime")return this._decodeTime(input,tag,options);else if(tag==="null_")return this._decodeNull(input,options);else if(tag==="bool")return this._decodeBool(input,options);else if(tag==="objDesc")return this._decodeStr(input,tag,options);else if(tag==="int"||tag==="enum")return this._decodeInt(input,state.args&&state.args[0],options);if(state.use!==null){return this._getUse(state.use,input._reporterState.obj)._decode(input,options)}else{return input.error("unknown tag: "+tag)}};Node.prototype._getUse=function _getUse(entity,obj){var state=this._baseState;state.useDecoder=this._use(entity,obj);assert(state.useDecoder._baseState.parent===null);state.useDecoder=state.useDecoder._baseState.children[0];if(state.implicit!==state.useDecoder._baseState.implicit){state.useDecoder=state.useDecoder.clone();state.useDecoder._baseState.implicit=state.implicit}return state.useDecoder};Node.prototype._decodeChoice=function decodeChoice(input,options){var state=this._baseState;var result=null;var match=false;Object.keys(state.choice).some(function(key){var save=input.save();var node=state.choice[key];try{var value=node._decode(input,options);if(input.isError(value))return false;result={type:key,value:value};match=true}catch(e){input.restore(save);return false}return true},this);if(!match)return input.error("Choice not matched");return result};Node.prototype._createEncoderBuffer=function createEncoderBuffer(data){return new EncoderBuffer(data,this.reporter)};Node.prototype._encode=function encode(data,reporter,parent){var state=this._baseState;if(state["default"]!==null&&state["default"]===data)return;var result=this._encodeValue(data,reporter,parent);if(result===undefined)return;if(this._skipDefault(result,reporter,parent))return;return result};Node.prototype._encodeValue=function encode(data,reporter,parent){var state=this._baseState;if(state.parent===null)return state.children[0]._encode(data,reporter||new Reporter);var result=null;this.reporter=reporter;if(state.optional&&data===undefined){if(state["default"]!==null)data=state["default"];else return}var content=null;var primitive=false;if(state.any){result=this._createEncoderBuffer(data)}else if(state.choice){result=this._encodeChoice(data,reporter)}else if(state.contains){content=this._getUse(state.contains,parent)._encode(data,reporter);primitive=true}else if(state.children){content=state.children.map(function(child){if(child._baseState.tag==="null_")return child._encode(null,reporter,data);if(child._baseState.key===null)return reporter.error("Child should have a key");var prevKey=reporter.enterKey(child._baseState.key);if(typeof data!=="object")return reporter.error("Child expected, but input is not object");var res=child._encode(data[child._baseState.key],reporter,data);reporter.leaveKey(prevKey);return res},this).filter(function(child){return child});content=this._createEncoderBuffer(content)}else{if(state.tag==="seqof"||state.tag==="setof"){if(!(state.args&&state.args.length===1))return reporter.error("Too many args for : "+state.tag); +if(!Array.isArray(data))return reporter.error("seqof/setof, but data is not Array");var child=this.clone();child._baseState.implicit=null;content=this._createEncoderBuffer(data.map(function(item){var state=this._baseState;return this._getUse(state.args[0],data)._encode(item,reporter)},child))}else if(state.use!==null){result=this._getUse(state.use,parent)._encode(data,reporter)}else{content=this._encodePrimitive(state.tag,data);primitive=true}}var result;if(!state.any&&state.choice===null){var tag=state.implicit!==null?state.implicit:state.tag;var cls=state.implicit===null?"universal":"context";if(tag===null){if(state.use===null)reporter.error("Tag could be ommited only for .use()")}else{if(state.use===null)result=this._encodeComposite(tag,primitive,cls,content)}}if(state.explicit!==null)result=this._encodeComposite(state.explicit,false,"context",result);return result};Node.prototype._encodeChoice=function encodeChoice(data,reporter){var state=this._baseState;var node=state.choice[data.type];if(!node){assert(false,data.type+" not found in "+JSON.stringify(Object.keys(state.choice)))}return node._encode(data.value,reporter)};Node.prototype._encodePrimitive=function encodePrimitive(tag,data){var state=this._baseState;if(/str$/.test(tag))return this._encodeStr(data,tag);else if(tag==="objid"&&state.args)return this._encodeObjid(data,state.reverseArgs[0],state.args[1]);else if(tag==="objid")return this._encodeObjid(data,null,null);else if(tag==="gentime"||tag==="utctime")return this._encodeTime(data,tag);else if(tag==="null_")return this._encodeNull();else if(tag==="int"||tag==="enum")return this._encodeInt(data,state.args&&state.reverseArgs[0]);else if(tag==="bool")return this._encodeBool(data);else if(tag==="objDesc")return this._encodeStr(data,tag);else throw new Error("Unsupported tag: "+tag)};Node.prototype._isNumstr=function isNumstr(str){return/^[0-9 ]*$/.test(str)};Node.prototype._isPrintstr=function isPrintstr(str){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str)}},{"../base":11,"minimalistic-assert":175}],13:[function(require,module,exports){var inherits=require("inherits");function Reporter(options){this._reporterState={obj:null,path:[],options:options||{},errors:[]}}exports.Reporter=Reporter;Reporter.prototype.isError=function isError(obj){return obj instanceof ReporterError};Reporter.prototype.save=function save(){var state=this._reporterState;return{obj:state.obj,pathLen:state.path.length}};Reporter.prototype.restore=function restore(data){var state=this._reporterState;state.obj=data.obj;state.path=state.path.slice(0,data.pathLen)};Reporter.prototype.enterKey=function enterKey(key){return this._reporterState.path.push(key)};Reporter.prototype.exitKey=function exitKey(index){var state=this._reporterState;state.path=state.path.slice(0,index-1)};Reporter.prototype.leaveKey=function leaveKey(index,key,value){var state=this._reporterState;this.exitKey(index);if(state.obj!==null)state.obj[key]=value};Reporter.prototype.path=function path(){return this._reporterState.path.join("/")};Reporter.prototype.enterObject=function enterObject(){var state=this._reporterState;var prev=state.obj;state.obj={};return prev};Reporter.prototype.leaveObject=function leaveObject(prev){var state=this._reporterState;var now=state.obj;state.obj=prev;return now};Reporter.prototype.error=function error(msg){var err;var state=this._reporterState;var inherited=msg instanceof ReporterError;if(inherited){err=msg}else{err=new ReporterError(state.path.map(function(elem){return"["+JSON.stringify(elem)+"]"}).join(""),msg.message||msg,msg.stack)}if(!state.options.partial)throw err;if(!inherited)state.errors.push(err);return err};Reporter.prototype.wrapResult=function wrapResult(result){var state=this._reporterState;if(!state.options.partial)return result;return{result:this.isError(result)?null:result,errors:state.errors}};function ReporterError(path,msg){this.path=path;this.rethrow(msg)}inherits(ReporterError,Error);ReporterError.prototype.rethrow=function rethrow(msg){this.message=msg+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,ReporterError);if(!this.stack){try{throw new Error(this.message)}catch(e){this.stack=e.stack}}return this}},{inherits:152}],14:[function(require,module,exports){var constants=require("../constants");exports.tagClass={0:"universal",1:"application",2:"context",3:"private"};exports.tagClassByName=constants._reverse(exports.tagClass);exports.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"};exports.tagByName=constants._reverse(exports.tag)},{"../constants":15}],15:[function(require,module,exports){var constants=exports;constants._reverse=function reverse(map){var res={};Object.keys(map).forEach(function(key){if((key|0)==key)key=key|0;var value=map[key];res[value]=key});return res};constants.der=require("./der")},{"./der":14}],16:[function(require,module,exports){var inherits=require("inherits");var asn1=require("../../asn1");var base=asn1.base;var bignum=asn1.bignum;var der=asn1.constants.der;function DERDecoder(entity){this.enc="der";this.name=entity.name;this.entity=entity;this.tree=new DERNode;this.tree._init(entity.body)}module.exports=DERDecoder;DERDecoder.prototype.decode=function decode(data,options){if(!(data instanceof base.DecoderBuffer))data=new base.DecoderBuffer(data,options);return this.tree._decode(data,options)};function DERNode(parent){base.Node.call(this,"der",parent)}inherits(DERNode,base.Node);DERNode.prototype._peekTag=function peekTag(buffer,tag,any){if(buffer.isEmpty())return false;var state=buffer.save();var decodedTag=derDecodeTag(buffer,'Failed to peek tag: "'+tag+'"');if(buffer.isError(decodedTag))return decodedTag;buffer.restore(state);return decodedTag.tag===tag||decodedTag.tagStr===tag||decodedTag.tagStr+"of"===tag||any};DERNode.prototype._decodeTag=function decodeTag(buffer,tag,any){var decodedTag=derDecodeTag(buffer,'Failed to decode tag of "'+tag+'"');if(buffer.isError(decodedTag))return decodedTag;var len=derDecodeLen(buffer,decodedTag.primitive,'Failed to get length of "'+tag+'"');if(buffer.isError(len))return len;if(!any&&decodedTag.tag!==tag&&decodedTag.tagStr!==tag&&decodedTag.tagStr+"of"!==tag){return buffer.error('Failed to match tag: "'+tag+'"')}if(decodedTag.primitive||len!==null)return buffer.skip(len,'Failed to match body of: "'+tag+'"');var state=buffer.save();var res=this._skipUntilEnd(buffer,'Failed to skip indefinite length body: "'+this.tag+'"');if(buffer.isError(res))return res;len=buffer.offset-state.offset;buffer.restore(state);return buffer.skip(len,'Failed to match body of: "'+tag+'"')};DERNode.prototype._skipUntilEnd=function skipUntilEnd(buffer,fail){while(true){var tag=derDecodeTag(buffer,fail);if(buffer.isError(tag))return tag;var len=derDecodeLen(buffer,tag.primitive,fail);if(buffer.isError(len))return len;var res;if(tag.primitive||len!==null)res=buffer.skip(len);else res=this._skipUntilEnd(buffer,fail);if(buffer.isError(res))return res;if(tag.tagStr==="end")break}};DERNode.prototype._decodeList=function decodeList(buffer,tag,decoder,options){var result=[];while(!buffer.isEmpty()){var possibleEnd=this._peekTag(buffer,"end");if(buffer.isError(possibleEnd))return possibleEnd;var res=decoder.decode(buffer,"der",options);if(buffer.isError(res)&&possibleEnd)break;result.push(res)}return result};DERNode.prototype._decodeStr=function decodeStr(buffer,tag){if(tag==="bitstr"){var unused=buffer.readUInt8();if(buffer.isError(unused))return unused;return{unused:unused,data:buffer.raw()}}else if(tag==="bmpstr"){var raw=buffer.raw();if(raw.length%2===1)return buffer.error("Decoding of string type: bmpstr length mismatch");var str="";for(var i=0;i>6];var primitive=(tag&32)===0;if((tag&31)===31){var oct=tag;tag=0;while((oct&128)===128){oct=buf.readUInt8(fail);if(buf.isError(oct))return oct;tag<<=7;tag|=oct&127}}else{tag&=31}var tagStr=der.tag[tag];return{cls:cls,primitive:primitive,tag:tag,tagStr:tagStr}}function derDecodeLen(buf,primitive,fail){var len=buf.readUInt8(fail);if(buf.isError(len))return len;if(!primitive&&len===128)return null;if((len&128)===0){return len}var num=len&127;if(num>4)return buf.error("length octect is too long");len=0;for(var i=0;i=256;i>>=8)lenOctets++;var header=new Buffer(1+1+lenOctets);header[0]=encodedTag;header[1]=128|lenOctets;for(var i=1+lenOctets,j=content.length;j>0;i--,j>>=8)header[i]=j&255;return this._createEncoderBuffer([header,content])};DERNode.prototype._encodeStr=function encodeStr(str,tag){if(tag==="bitstr"){return this._createEncoderBuffer([str.unused|0,str.data])}else if(tag==="bmpstr"){var buf=new Buffer(str.length*2);for(var i=0;i=40)return this.reporter.error("Second objid identifier OOB");id.splice(0,2,id[0]*40+id[1])}var size=0;for(var i=0;i=128;ident>>=7)size++}var objid=new Buffer(size);var offset=objid.length-1;for(var i=id.length-1;i>=0;i--){var ident=id[i];objid[offset--]=ident&127;while((ident>>=7)>0)objid[offset--]=128|ident&127}return this._createEncoderBuffer(objid)};function two(num){if(num<10)return"0"+num;else return num}DERNode.prototype._encodeTime=function encodeTime(time,tag){var str;var date=new Date(time);if(tag==="gentime"){str=[two(date.getFullYear()),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join("")}else if(tag==="utctime"){str=[two(date.getFullYear()%100),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+tag+" time is not supported yet")}return this._encodeStr(str,"octstr")};DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")};DERNode.prototype._encodeInt=function encodeInt(num,values){if(typeof num==="string"){if(!values)return this.reporter.error("String int or enum given, but no values map");if(!values.hasOwnProperty(num)){return this.reporter.error("Values map doesn't contain: "+JSON.stringify(num))}num=values[num]}if(typeof num!=="number"&&!Buffer.isBuffer(num)){var numArray=num.toArray();if(!num.sign&&numArray[0]&128){numArray.unshift(0)}num=new Buffer(numArray)}if(Buffer.isBuffer(num)){var size=num.length;if(num.length===0)size++;var out=new Buffer(size);num.copy(out);if(num.length===0)out[0]=0;return this._createEncoderBuffer(out)}if(num<128)return this._createEncoderBuffer(num);if(num<256)return this._createEncoderBuffer([0,num]);var size=1;for(var i=num;i>=256;i>>=8)size++;var out=new Array(size);for(var i=out.length-1;i>=0;i--){out[i]=num&255;num>>=8}if(out[0]&128){out.unshift(0)}return this._createEncoderBuffer(new Buffer(out))};DERNode.prototype._encodeBool=function encodeBool(value){return this._createEncoderBuffer(value?255:0)};DERNode.prototype._use=function use(entity,obj){if(typeof entity==="function")entity=entity(obj);return entity._getEncoder("der").tree};DERNode.prototype._skipDefault=function skipDefault(dataBuffer,reporter,parent){var state=this._baseState;var i;if(state["default"]===null)return false;var data=dataBuffer.join();if(state.defaultBuffer===undefined)state.defaultBuffer=this._encodeValue(state["default"],reporter,parent).join();if(data.length!==state.defaultBuffer.length)return false;for(i=0;i=31)return reporter.error("Multi-octet tag encoding unsupported");if(!primitive)res|=32;res|=der.tagClassByName[cls||"universal"]<<6;return res}},{"../../asn1":8,buffer:67,inherits:152}],20:[function(require,module,exports){var encoders=exports;encoders.der=require("./der");encoders.pem=require("./pem")},{"./der":19,"./pem":21}],21:[function(require,module,exports){var inherits=require("inherits");var DEREncoder=require("./der");function PEMEncoder(entity){DEREncoder.call(this,entity);this.enc="pem"}inherits(PEMEncoder,DEREncoder);module.exports=PEMEncoder;PEMEncoder.prototype.encode=function encode(data,options){var buf=DEREncoder.prototype.encode.call(this,data);var p=buf.toString("base64");var out=["-----BEGIN "+options.label+"-----"];for(var i=0;i=this._size)return null;var lenB=this._buf[offset++]&255;if(lenB===null)return null;if((lenB&128)==128){lenB&=127;if(lenB==0)throw newInvalidAsn1Error("Indefinite length not supported");if(lenB>4)throw newInvalidAsn1Error("encoding too long");if(this._size-offsetthis._size-o)return null;this._offset=o;if(this.length===0)return retbuf?new Buffer(0):"";var str=this._buf.slice(this._offset,this._offset+this.length);this._offset+=this.length;return retbuf?str:str.toString("utf8")};Reader.prototype.readOID=function(tag){if(!tag)tag=ASN1.OID;var b=this.readString(tag,true);if(b===null)return null;var values=[];var value=0;for(var i=0;i>0);return values.join(".")};Reader.prototype._readTag=function(tag){assert.ok(tag!==undefined);var b=this.peek();if(b===null)return null;if(b!==tag)throw newInvalidAsn1Error("Expected 0x"+tag.toString(16)+": got 0x"+b.toString(16));var o=this.readLength(this._offset+1);if(o===null)return null;if(this.length>4)throw newInvalidAsn1Error("Integer too long: "+this.length);if(this.length>this._size-o)return null;this._offset=o;var fb=this._buf[this._offset];var value=0;for(var i=0;i>0};module.exports=Reader}.call(this,require("buffer").Buffer)},{"./errors":22,"./types":25,assert:29,buffer:67}],25:[function(require,module,exports){module.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},{}],26:[function(require,module,exports){!function(Buffer){var assert=require("assert");var ASN1=require("./types");var errors=require("./errors");var newInvalidAsn1Error=errors.newInvalidAsn1Error;var DEFAULT_OPTS={size:1024,growthFactor:8};function merge(from,to){assert.ok(from);assert.equal(typeof from,"object");assert.ok(to);assert.equal(typeof to,"object");var keys=Object.getOwnPropertyNames(from);keys.forEach(function(key){if(to[key])return;var value=Object.getOwnPropertyDescriptor(from,key);Object.defineProperty(to,key,value)});return to}function Writer(options){options=merge(DEFAULT_OPTS,options||{});this._buf=new Buffer(options.size||1024);this._size=this._buf.length;this._offset=0;this._options=options;this._seq=[]}Object.defineProperty(Writer.prototype,"buffer",{get:function(){if(this._seq.length)throw new InvalidAsn1Error(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}});Writer.prototype.writeByte=function(b){if(typeof b!=="number")throw new TypeError("argument must be a Number");this._ensure(1);this._buf[this._offset++]=b};Writer.prototype.writeInt=function(i,tag){if(typeof i!=="number")throw new TypeError("argument must be a Number");if(typeof tag!=="number")tag=ASN1.Integer;var sz=4;while(((i&4286578688)===0||(i&4286578688)===4286578688>>0)&&sz>1){sz--;i<<=8}if(sz>4)throw new InvalidAsn1Error("BER ints cannot be > 0xffffffff");this._ensure(2+sz);this._buf[this._offset++]=tag;this._buf[this._offset++]=sz;while(sz-->0){this._buf[this._offset++]=(i&4278190080)>>>24;i<<=8}};Writer.prototype.writeNull=function(){this.writeByte(ASN1.Null);this.writeByte(0)};Writer.prototype.writeEnumeration=function(i,tag){if(typeof i!=="number")throw new TypeError("argument must be a Number");if(typeof tag!=="number")tag=ASN1.Enumeration;return this.writeInt(i,tag)};Writer.prototype.writeBoolean=function(b,tag){if(typeof b!=="boolean")throw new TypeError("argument must be a Boolean");if(typeof tag!=="number")tag=ASN1.Boolean;this._ensure(3);this._buf[this._offset++]=tag;this._buf[this._offset++]=1;this._buf[this._offset++]=b?255:0};Writer.prototype.writeString=function(s,tag){if(typeof s!=="string")throw new TypeError("argument must be a string (was: "+typeof s+")");if(typeof tag!=="number")tag=ASN1.OctetString;var len=Buffer.byteLength(s);this.writeByte(tag);this.writeLength(len);if(len){this._ensure(len);this._buf.write(s,this._offset);this._offset+=len}};Writer.prototype.writeBuffer=function(buf,tag){if(typeof tag!=="number")throw new TypeError("tag must be a number");if(!Buffer.isBuffer(buf))throw new TypeError("argument must be a buffer");this.writeByte(tag);this.writeLength(buf.length);this._ensure(buf.length);buf.copy(this._buf,this._offset,0,buf.length);this._offset+=buf.length};Writer.prototype.writeStringArray=function(strings){if(!strings instanceof Array)throw new TypeError("argument must be an Array[String]");var self=this;strings.forEach(function(s){self.writeString(s)})};Writer.prototype.writeOID=function(s,tag){if(typeof s!=="string")throw new TypeError("argument must be a string");if(typeof tag!=="number")tag=ASN1.OID;if(!/^([0-9]+\.){3,}[0-9]+$/.test(s))throw new Error("argument is not a valid OID string");function encodeOctet(bytes,octet){if(octet<128){bytes.push(octet)}else if(octet<16384){bytes.push(octet>>>7|128);bytes.push(octet&127)}else if(octet<2097152){bytes.push(octet>>>14|128);bytes.push((octet>>>7|128)&255);bytes.push(octet&127)}else if(octet<268435456){bytes.push(octet>>>21|128);bytes.push((octet>>>14|128)&255);bytes.push((octet>>>7|128)&255);bytes.push(octet&127)}else{bytes.push((octet>>>28|128)&255);bytes.push((octet>>>21|128)&255);bytes.push((octet>>>14|128)&255);bytes.push((octet>>>7|128)&255);bytes.push(octet&127)}}var tmp=s.split(".");var bytes=[];bytes.push(parseInt(tmp[0],10)*40+parseInt(tmp[1],10));tmp.slice(2).forEach(function(b){encodeOctet(bytes,parseInt(b,10))});var self=this;this._ensure(2+bytes.length);this.writeByte(tag);this.writeLength(bytes.length);bytes.forEach(function(b){self.writeByte(b)})};Writer.prototype.writeLength=function(len){if(typeof len!=="number")throw new TypeError("argument must be a Number");this._ensure(4);if(len<=127){this._buf[this._offset++]=len}else if(len<=255){this._buf[this._offset++]=129;this._buf[this._offset++]=len}else if(len<=65535){this._buf[this._offset++]=130;this._buf[this._offset++]=len>>8;this._buf[this._offset++]=len}else if(len<=16777215){this._buf[this._offset++]=131;this._buf[this._offset++]=len>>16;this._buf[this._offset++]=len>>8;this._buf[this._offset++]=len}else{throw new InvalidAsn1ERror("Length too long (> 4 bytes)")}};Writer.prototype.startSequence=function(tag){if(typeof tag!=="number")tag=ASN1.Sequence|ASN1.Constructor;this.writeByte(tag);this._seq.push(this._offset);this._ensure(3);this._offset+=3};Writer.prototype.endSequence=function(){var seq=this._seq.pop();var start=seq+3;var len=this._offset-start;if(len<=127){this._shift(start,len,-2);this._buf[seq]=len}else if(len<=255){this._shift(start,len,-1);this._buf[seq]=129;this._buf[seq+1]=len}else if(len<=65535){this._buf[seq]=130;this._buf[seq+1]=len>>8;this._buf[seq+2]=len}else if(len<=16777215){this._shift(start,len,1);this._buf[seq]=131;this._buf[seq+1]=len>>16;this._buf[seq+2]=len>>8;this._buf[seq+3]=len}else{throw new InvalidAsn1Error("Sequence too long")}};Writer.prototype._shift=function(start,len,shift){assert.ok(start!==undefined);assert.ok(len!==undefined);assert.ok(shift);this._buf.copy(this._buf,start+shift,start,start+len);this._offset+=shift};Writer.prototype._ensure=function(len){assert.ok(len);if(this._size-this._offset=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function truncate(s,n){if(typeof s==="string"){return s.length=0;i--){if(ka[i]!==kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key],strict,actualVisitedObjects))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected,false)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.notDeepStrictEqual=notDeepStrictEqual;function notDeepStrictEqual(actual,expected,message){if(_deepEqual(actual,expected,true)){fail(actual,expected,message,"notDeepStrictEqual",notDeepStrictEqual)}}assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(Object.prototype.toString.call(expected)=="[object RegExp]"){return expected.test(actual)}try{if(actual instanceof expected){return true}}catch(e){}if(Error.isPrototypeOf(expected)){return false}return expected.call({},actual)===true}function _tryBlock(block){var error;try{block()}catch(e){error=e}return error}function _throws(shouldThrow,block,expected,message){var actual;if(typeof block!=="function"){throw new TypeError('"block" argument must be a function')}if(typeof expected==="string"){message=expected;expected=null}actual=_tryBlock(block);message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail(actual,expected,"Missing expected exception"+message)}var userProvidedMessage=typeof message==="string";var isUnwantedException=!shouldThrow&&util.isError(actual);var isUnexpectedException=!shouldThrow&&actual&&!expected;if(isUnwantedException&&userProvidedMessage&&expectedException(actual,expected)||isUnexpectedException){fail(actual,expected,"Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws(true,block,error,message)};assert.doesNotThrow=function(block,error,message){_throws(false,block,error,message)};assert.ifError=function(err){if(err)throw err};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){if(hasOwn.call(obj,key))keys.push(key)}return keys}}.call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"util/":293}],30:[function(require,module,exports){var crypto=require("crypto"),parse=require("url").parse;var keys=["acl","location","logging","notification","partNumber","policy","requestPayment","torrent","uploadId","uploads","versionId","versioning","versions","website"];function authorization(options){return"AWS "+options.key+":"+sign(options)}module.exports=authorization;module.exports.authorization=authorization;function hmacSha1(options){return crypto.createHmac("sha1",options.secret).update(options.message).digest("base64")}module.exports.hmacSha1=hmacSha1;function sign(options){options.message=stringToSign(options);return hmacSha1(options)}module.exports.sign=sign;function signQuery(options){options.message=queryStringToSign(options);return hmacSha1(options)}module.exports.signQuery=signQuery;function stringToSign(options){var headers=options.amazonHeaders||"";if(headers)headers+="\n";var r=[options.verb,options.md5,options.contentType,options.date?options.date.toUTCString():"",headers+options.resource];return r.join("\n")}module.exports.queryStringToSign=stringToSign;function queryStringToSign(options){return"GET\n\n\n"+options.date+"\n"+options.resource}module.exports.queryStringToSign=queryStringToSign;function canonicalizeHeaders(headers){var buf=[],fields=Object.keys(headers);for(var i=0,len=fields.length;i=0&&this.region==="us-east-1")return true;return["cloudfront","ls","route53","iam","importexport","sts"].indexOf(this.service)>=0};RequestSigner.prototype.createHost=function(){var region=this.isSingleRegion()?"":(this.service==="s3"&&this.region!=="us-east-1"?"-":".")+this.region,service=this.service==="ses"?"email":this.service;return service+region+".amazonaws.com"};RequestSigner.prototype.prepareRequest=function(){this.parsePath();var request=this.request,headers=request.headers,query;if(request.signQuery){this.parsedPath.query=query=this.parsedPath.query||{};if(this.credentials.sessionToken)query["X-Amz-Security-Token"]=this.credentials.sessionToken;if(this.service==="s3"&&!query["X-Amz-Expires"])query["X-Amz-Expires"]=86400;if(query["X-Amz-Date"])this.datetime=query["X-Amz-Date"];else query["X-Amz-Date"]=this.getDateTime();query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256";query["X-Amz-Credential"]=this.credentials.accessKeyId+"/"+this.credentialString();query["X-Amz-SignedHeaders"]=this.signedHeaders()}else{if(!request.doNotModifyHeaders&&!this.isCodeCommitGit){if(request.body&&!headers["Content-Type"]&&!headers["content-type"])headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8";if(request.body&&!headers["Content-Length"]&&!headers["content-length"])headers["Content-Length"]=Buffer.byteLength(request.body);if(this.credentials.sessionToken)headers["X-Amz-Security-Token"]=this.credentials.sessionToken;if(this.service==="s3")headers["X-Amz-Content-Sha256"]=hash(this.request.body||"","hex");if(headers["X-Amz-Date"])this.datetime=headers["X-Amz-Date"];else headers["X-Amz-Date"]=this.getDateTime()}delete headers.Authorization;delete headers.authorization}};RequestSigner.prototype.sign=function(){if(!this.parsedPath)this.prepareRequest();if(this.request.signQuery){this.parsedPath.query["X-Amz-Signature"]=this.signature()}else{this.request.headers.Authorization=this.authHeader()}this.request.path=this.formatPath();return this.request};RequestSigner.prototype.getDateTime=function(){if(!this.datetime){var headers=this.request.headers,date=new Date(headers.Date||headers.date||new Date);this.datetime=date.toISOString().replace(/[:\-]|\.\d{3}/g,"");if(this.isCodeCommitGit)this.datetime=this.datetime.slice(0,-1)}return this.datetime};RequestSigner.prototype.getDate=function(){return this.getDateTime().substr(0,8)};RequestSigner.prototype.authHeader=function(){return["AWS4-HMAC-SHA256 Credential="+this.credentials.accessKeyId+"/"+this.credentialString(),"SignedHeaders="+this.signedHeaders(),"Signature="+this.signature()].join(", ")};RequestSigner.prototype.signature=function(){var date=this.getDate(),cacheKey=[this.credentials.secretAccessKey,date,this.region,this.service].join(),kDate,kRegion,kService,kCredentials=credentialsCache.get(cacheKey);if(!kCredentials){kDate=hmac("AWS4"+this.credentials.secretAccessKey,date);kRegion=hmac(kDate,this.region);kService=hmac(kRegion,this.service);kCredentials=hmac(kService,"aws4_request");credentialsCache.set(cacheKey,kCredentials)}return hmac(kCredentials,this.stringToSign(),"hex")};RequestSigner.prototype.stringToSign=function(){return["AWS4-HMAC-SHA256",this.getDateTime(),this.credentialString(),hash(this.canonicalString(),"hex")].join("\n")};RequestSigner.prototype.canonicalString=function(){if(!this.parsedPath)this.prepareRequest();var pathStr=this.parsedPath.path,query=this.parsedPath.query,queryStr="",normalizePath=this.service!=="s3",decodePath=this.service==="s3"||this.request.doNotEncodePath,decodeSlashesInPath=this.service==="s3",firstValOnly=this.service==="s3",bodyHash=this.service==="s3"&&this.request.signQuery?"UNSIGNED-PAYLOAD":this.isCodeCommitGit?"":hash(this.request.body||"","hex");if(query){queryStr=encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj,key){if(!key)return obj;obj[key]=!Array.isArray(query[key])?query[key]:firstValOnly?query[key][0]:query[key].slice().sort();return obj},{})))}if(pathStr!=="/"){if(normalizePath)pathStr=pathStr.replace(/\/{2,}/g,"/");pathStr=pathStr.split("/").reduce(function(path,piece){if(normalizePath&&piece===".."){path.pop()}else if(!normalizePath||piece!=="."){if(decodePath)piece=querystring.unescape(piece);path.push(encodeRfc3986(querystring.escape(piece)))}return path},[]).join("/");if(pathStr[0]!=="/")pathStr="/"+pathStr;if(decodeSlashesInPath)pathStr=pathStr.replace(/%2F/g,"/")}return[this.request.method||"GET",pathStr,queryStr,this.canonicalHeaders()+"\n",this.signedHeaders(),bodyHash].join("\n")};RequestSigner.prototype.canonicalHeaders=function(){var headers=this.request.headers;function trimAll(header){return header.toString().trim().replace(/\s+/g," ")}return Object.keys(headers).sort(function(a,b){return a.toLowerCase()=0){query=querystring.parse(path.slice(queryIx+1));path=path.slice(0,queryIx)}if(/[^0-9A-Za-z!'()*\-._~%\/]/.test(path)){path=path.split("/").map(function(piece){return querystring.escape(querystring.unescape(piece))}).join("/")}this.parsedPath={path:path,query:query}};RequestSigner.prototype.formatPath=function(){var path=this.parsedPath.path,query=this.parsedPath.query;if(!query)return path;if(query[""]!=null)delete query[""];return path+"?"+encodeRfc3986(querystring.stringify(query))};aws4.RequestSigner=RequestSigner;aws4.sign=function(request,credentials){return new RequestSigner(request,credentials).sign()}}.call(this,require("_process"),require("buffer").Buffer)},{"./lru":32,_process:198,buffer:67,crypto:78,querystring:213,url:288}],32:[function(require,module,exports){module.exports=function(size){return new LruCache(size)};function LruCache(size){this.capacity=size|0;this.map=Object.create(null);this.list=new DoublyLinkedList}LruCache.prototype.get=function(key){var node=this.map[key];if(node==null)return undefined;this.used(node);return node.val};LruCache.prototype.set=function(key,val){var node=this.map[key];if(node!=null){node.val=val}else{if(!this.capacity)this.prune();if(!this.capacity)return false;node=new DoublyLinkedNode(key,val);this.map[key]=node;this.capacity--}this.used(node);return true};LruCache.prototype.used=function(node){this.list.moveToFront(node)};LruCache.prototype.prune=function(){var node=this.list.pop();if(node!=null){delete this.map[node.key];this.capacity++}};function DoublyLinkedList(){this.firstNode=null;this.lastNode=null}DoublyLinkedList.prototype.moveToFront=function(node){if(this.firstNode==node)return;this.remove(node);if(this.firstNode==null){this.firstNode=node;this.lastNode=node;node.prev=null;node.next=null}else{node.prev=null;node.next=this.firstNode;node.next.prev=node;this.firstNode=node}};DoublyLinkedList.prototype.pop=function(){var lastNode=this.lastNode;if(lastNode!=null){this.remove(lastNode)}return lastNode};DoublyLinkedList.prototype.remove=function(node){if(this.firstNode==node){this.firstNode=node.next}else if(node.prev!=null){node.prev.next=node.next}if(this.lastNode==node){this.lastNode=node.prev}else if(node.next!=null){node.next.prev=node.prev}};function DoublyLinkedNode(key,val){this.key=key;this.val=val;this.prev=null;this.next=null}},{}],33:[function(require,module,exports){"use strict";exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i0){throw new Error("Invalid string. Length must be a multiple of 4")}return b64[len-2]==="="?2:b64[len-1]==="="?1:0}function byteLength(b64){return b64.length*3/4-placeHoldersCount(b64)}function toByteArray(b64){var i,j,l,tmp,placeHolders,arr;var len=b64.length;placeHolders=placeHoldersCount(b64);arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],34:[function(require,module,exports){"use strict";var crypto_hash_sha512=require("tweetnacl").lowlevel.crypto_hash;var BLF_J=0;var Blowfish=function(){this.S=[new Uint32Array([3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946]),new Uint32Array([1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055]),new Uint32Array([3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504]),new Uint32Array([976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462])]; +this.P=new Uint32Array([608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731])};function F(S,x8,i){return(S[0][x8[i+3]]+S[1][x8[i+2]]^S[2][x8[i+1]])+S[3][x8[i]]}Blowfish.prototype.encipher=function(x,x8){if(x8===undefined){x8=new Uint8Array(x.buffer);if(x.byteOffset!==0)x8=x8.subarray(x.byteOffset)}x[0]^=this.P[0];for(var i=1;i<16;i+=2){x[1]^=F(this.S,x8,0)^this.P[i];x[0]^=F(this.S,x8,4)^this.P[i+1]}var t=x[0];x[0]=x[1]^this.P[17];x[1]=t};Blowfish.prototype.decipher=function(x){var x8=new Uint8Array(x.buffer);if(x.byteOffset!==0)x8=x8.subarray(x.byteOffset);x[0]^=this.P[17];for(var i=16;i>0;i-=2){x[1]^=F(this.S,x8,0)^this.P[i];x[0]^=F(this.S,x8,4)^this.P[i-1]}var t=x[0];x[0]=x[1]^this.P[0];x[1]=t};function stream2word(data,databytes){var i,temp=0;for(i=0;i<4;i++,BLF_J++){if(BLF_J>=databytes)BLF_J=0;temp=temp<<8|data[BLF_J]}return temp}Blowfish.prototype.expand0state=function(key,keybytes){var d=new Uint32Array(2),i,k;var d8=new Uint8Array(d.buffer);for(i=0,BLF_J=0;i<18;i++){this.P[i]^=stream2word(key,keybytes)}BLF_J=0;for(i=0;i<18;i+=2){this.encipher(d,d8);this.P[i]=d[0];this.P[i+1]=d[1]}for(i=0;i<4;i++){for(k=0;k<256;k+=2){this.encipher(d,d8);this.S[i][k]=d[0];this.S[i][k+1]=d[1]}}};Blowfish.prototype.expandstate=function(data,databytes,key,keybytes){var d=new Uint32Array(2),i,k;for(i=0,BLF_J=0;i<18;i++){this.P[i]^=stream2word(key,keybytes)}for(i=0,BLF_J=0;i<18;i+=2){d[0]^=stream2word(data,databytes);d[1]^=stream2word(data,databytes);this.encipher(d);this.P[i]=d[0];this.P[i+1]=d[1]}for(i=0;i<4;i++){for(k=0;k<256;k+=2){d[0]^=stream2word(data,databytes);d[1]^=stream2word(data,databytes);this.encipher(d);this.S[i][k]=d[0];this.S[i][k+1]=d[1]}}BLF_J=0};Blowfish.prototype.enc=function(data,blocks){for(var i=0;i>>24;out[4*i+2]=cdata[i]>>>16;out[4*i+1]=cdata[i]>>>8;out[4*i+0]=cdata[i]}}function bcrypt_pbkdf(pass,passlen,salt,saltlen,key,keylen,rounds){var sha2pass=new Uint8Array(64),sha2salt=new Uint8Array(64),out=new Uint8Array(BCRYPT_HASHSIZE),tmpout=new Uint8Array(BCRYPT_HASHSIZE),countsalt=new Uint8Array(saltlen+4),i,j,amt,stride,dest,count,origkeylen=keylen;if(rounds<1)return-1;if(passlen===0||saltlen===0||keylen===0||keylen>out.byteLength*out.byteLength||saltlen>1<<20)return-1;stride=Math.floor((keylen+out.byteLength-1)/out.byteLength);amt=Math.floor((keylen+stride-1)/stride);for(i=0;i0;count++){countsalt[saltlen+0]=count>>>24;countsalt[saltlen+1]=count>>>16;countsalt[saltlen+2]=count>>>8;countsalt[saltlen+3]=count;crypto_hash_sha512(sha2salt,countsalt,saltlen+4);bcrypt_hash(sha2pass,sha2salt,tmpout);for(i=out.byteLength;i--;)out[i]=tmpout[i];for(i=1;i=origkeylen)break;key[dest]=out[i]}keylen-=i}return 0}module.exports={BLOCKS:BCRYPT_BLOCKS,HASHSIZE:BCRYPT_HASHSIZE,hash:bcrypt_hash,pbkdf:bcrypt_pbkdf}},{tweetnacl:287}],35:[function(require,module,exports){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number)){return number}this.negative=0;this.words=null;this.length=0;this.red=null;if(number!==null){if(base==="le"||base==="be"){endian=base;base=10}this._init(number||0,base||10,endian||"be")}}if(typeof module==="object"){module.exports=BN}else{exports.BN=BN}BN.BN=BN;BN.wordSize=26;var Buffer;try{Buffer=require("buf"+"fer").Buffer}catch(e){}BN.isBN=function isBN(num){if(num instanceof BN){return true}return num!==null&&typeof num==="object"&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)};BN.max=function max(left,right){if(left.cmp(right)>0)return left;return right};BN.min=function min(left,right){if(left.cmp(right)<0)return left;return right};BN.prototype._init=function init(number,base,endian){if(typeof number==="number"){return this._initNumber(number,base,endian)}if(typeof number==="object"){return this._initArray(number,base,endian)}if(base==="hex"){base=16}assert(base===(base|0)&&base>=2&&base<=36);number=number.toString().replace(/\s+/g,"");var start=0;if(number[0]==="-"){start++}if(base===16){this._parseHex(number,start)}else{this._parseBase(number,base,start)}if(number[0]==="-"){this.negative=1}this.strip();if(endian!=="le")return;this._initArray(this.toArray(),base,endian)};BN.prototype._initNumber=function _initNumber(number,base,endian){if(number<0){this.negative=1;number=-number}if(number<67108864){this.words=[number&67108863];this.length=1}else if(number<4503599627370496){this.words=[number&67108863,number/67108864&67108863];this.length=2}else{assert(number<9007199254740992);this.words=[number&67108863,number/67108864&67108863,1];this.length=3}if(endian!=="le")return;this._initArray(this.toArray(),base,endian)};BN.prototype._initArray=function _initArray(number,base,endian){assert(typeof number.length==="number");if(number.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(number.length/3);this.words=new Array(this.length);for(var i=0;i=0;i-=3){w=number[i]|number[i-1]<<8|number[i-2]<<16;this.words[j]|=w<>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}else if(endian==="le"){for(i=0,j=0;i>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}return this.strip()};function parseHex(str,start,end){var r=0;var len=Math.min(str.length,end);for(var i=start;i=49&&c<=54){r|=c-49+10}else if(c>=17&&c<=22){r|=c-17+10}else{r|=c&15}}return r}BN.prototype._parseHex=function _parseHex(number,start){this.length=Math.ceil((number.length-start)/6);this.words=new Array(this.length);for(var i=0;i=start;i-=6){w=parseHex(number,i,i+6);this.words[j]|=w<>>26-off&4194303;off+=24;if(off>=26){off-=26;j++}}if(i+6!==start){w=parseHex(number,start,i+6);this.words[j]|=w<>>26-off&4194303}this.strip()};function parseBase(str,start,end,mul){var r=0;var len=Math.min(str.length,end);for(var i=start;i=49){r+=c-49+10}else if(c>=17){r+=c-17+10}else{r+=c}}return r}BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0];this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base){limbLen++}limbLen--;limbPow=limbPow/base|0;var total=number.length-start;var mod=total%limbLen;var end=Math.min(total,total-mod)+start;var word=0;for(var i=start;i1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?""};var zeros=["","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"];var groupSizes=[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];var groupBases=[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];BN.prototype.toString=function toString(base,padding){base=base||10;padding=padding|0||1;var out;if(base===16||base==="hex"){out="";var off=0;var carry=0;for(var i=0;i>>24-off&16777215;if(carry!==0||i!==this.length-1){out=zeros[6-word.length]+word+out}else{out=word+out}off+=2;if(off>=26){off-=26;i--}}if(carry!==0){out=carry.toString(16)+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}if(base===(base|0)&&base>=2&&base<=36){var groupSize=groupSizes[base];var groupBase=groupBases[base];out="";var c=this.clone();c.negative=0;while(!c.isZero()){var r=c.modn(groupBase).toString(base);c=c.idivn(groupBase);if(!c.isZero()){out=zeros[groupSize-r.length]+r+out}else{out=r+out}}if(this.isZero()){out="0"+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var ret=this.words[0];if(this.length===2){ret+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){ret+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-ret:ret};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(endian,length){assert(typeof Buffer!=="undefined");return this.toArrayLike(Buffer,endian,length)};BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)};BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength();var reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length");assert(reqLength>0,"Requested array length <= 0");this.strip();var littleEndian=endian==="le";var res=new ArrayType(reqLength);var b,i;var q=this.clone();if(!littleEndian){for(i=0;i=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(w){if(w===0)return 26;var t=w;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1];var hi=this._countBits(w);return(this.length-1)*26+hi};function toBitArray(num){var w=new Array(num.bitLength());for(var bit=0;bit>>wbit}return w}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var r=0;for(var i=0;inum.length)return this.clone().ior(num);return num.clone().ior(this)};BN.prototype.uor=function uor(num){if(this.length>num.length)return this.clone().iuor(num);return num.clone().iuor(this)};BN.prototype.iuand=function iuand(num){var b;if(this.length>num.length){b=num}else{b=this}for(var i=0;inum.length)return this.clone().iand(num);return num.clone().iand(this)};BN.prototype.uand=function uand(num){if(this.length>num.length)return this.clone().iuand(num);return num.clone().iuand(this)};BN.prototype.iuxor=function iuxor(num){var a;var b;if(this.length>num.length){a=this;b=num}else{a=num;b=this}for(var i=0;inum.length)return this.clone().ixor(num);return num.clone().ixor(this)};BN.prototype.uxor=function uxor(num){if(this.length>num.length)return this.clone().iuxor(num);return num.clone().iuxor(this)};BN.prototype.inotn=function inotn(width){assert(typeof width==="number"&&width>=0);var bytesNeeded=Math.ceil(width/26)|0;var bitsLeft=width%26;this._expand(bytesNeeded);if(bitsLeft>0){bytesNeeded--}for(var i=0;i0){this.words[i]=~this.words[i]&67108863>>26-bitsLeft}return this.strip()};BN.prototype.notn=function notn(width){return this.clone().inotn(width)};BN.prototype.setn=function setn(bit,val){assert(typeof bit==="number"&&bit>=0);var off=bit/26|0;var wbit=bit%26;this._expand(off+1);if(val){this.words[off]=this.words[off]|1<num.length){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>>26}for(;carry!==0&&i>>26}this.length=a.length;if(carry!==0){this.words[this.length]=carry;this.length++}else if(a!==this){for(;inum.length)return this.clone().iadd(num);return num.clone().iadd(this)};BN.prototype.isub=function isub(num){if(num.negative!==0){num.negative=0;var r=this.iadd(num);num.negative=1;return r._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(num);this.negative=1;return this._normSign()}var cmp=this.cmp(num);if(cmp===0){this.negative=0;this.length=1;this.words[0]=0;return this}var a,b;if(cmp>0){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>26;this.words[i]=r&67108863}for(;carry!==0&&i>26;this.words[i]=r&67108863}if(carry===0&&i>>26;var rword=carry&67108863;var maxJ=Math.min(k,num.length-1);for(var j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;a=self.words[i]|0;b=num.words[j]|0;r=a*b+rword;ncarry+=r/67108864|0;rword=r&67108863}out.words[k]=rword|0;carry=ncarry|0}if(carry!==0){out.words[k]=carry|0}else{out.length--}return out.strip()}var comb10MulTo=function comb10MulTo(self,num,out){var a=self.words;var b=num.words;var o=out.words;var c=0;var lo;var mid;var hi;var a0=a[0]|0;var al0=a0&8191;var ah0=a0>>>13;var a1=a[1]|0;var al1=a1&8191;var ah1=a1>>>13;var a2=a[2]|0;var al2=a2&8191;var ah2=a2>>>13;var a3=a[3]|0;var al3=a3&8191;var ah3=a3>>>13;var a4=a[4]|0;var al4=a4&8191;var ah4=a4>>>13;var a5=a[5]|0;var al5=a5&8191;var ah5=a5>>>13;var a6=a[6]|0;var al6=a6&8191;var ah6=a6>>>13;var a7=a[7]|0;var al7=a7&8191;var ah7=a7>>>13;var a8=a[8]|0;var al8=a8&8191;var ah8=a8>>>13;var a9=a[9]|0;var al9=a9&8191;var ah9=a9>>>13;var b0=b[0]|0;var bl0=b0&8191;var bh0=b0>>>13;var b1=b[1]|0;var bl1=b1&8191;var bh1=b1>>>13;var b2=b[2]|0;var bl2=b2&8191;var bh2=b2>>>13;var b3=b[3]|0;var bl3=b3&8191;var bh3=b3>>>13;var b4=b[4]|0;var bl4=b4&8191;var bh4=b4>>>13;var b5=b[5]|0;var bl5=b5&8191;var bh5=b5>>>13;var b6=b[6]|0;var bl6=b6&8191;var bh6=b6>>>13;var b7=b[7]|0;var bl7=b7&8191;var bh7=b7>>>13;var b8=b[8]|0;var bl8=b8&8191;var bh8=b8>>>13;var b9=b[9]|0;var bl9=b9&8191;var bh9=b9>>>13;out.negative=self.negative^num.negative;out.length=19;lo=Math.imul(al0,bl0);mid=Math.imul(al0,bh0);mid=mid+Math.imul(ah0,bl0)|0;hi=Math.imul(ah0,bh0);var w0=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w0>>>26)|0;w0&=67108863;lo=Math.imul(al1,bl0);mid=Math.imul(al1,bh0);mid=mid+Math.imul(ah1,bl0)|0;hi=Math.imul(ah1,bh0);lo=lo+Math.imul(al0,bl1)|0;mid=mid+Math.imul(al0,bh1)|0;mid=mid+Math.imul(ah0,bl1)|0;hi=hi+Math.imul(ah0,bh1)|0;var w1=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w1>>>26)|0;w1&=67108863;lo=Math.imul(al2,bl0);mid=Math.imul(al2,bh0);mid=mid+Math.imul(ah2,bl0)|0;hi=Math.imul(ah2,bh0);lo=lo+Math.imul(al1,bl1)|0;mid=mid+Math.imul(al1,bh1)|0;mid=mid+Math.imul(ah1,bl1)|0;hi=hi+Math.imul(ah1,bh1)|0;lo=lo+Math.imul(al0,bl2)|0;mid=mid+Math.imul(al0,bh2)|0;mid=mid+Math.imul(ah0,bl2)|0;hi=hi+Math.imul(ah0,bh2)|0;var w2=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w2>>>26)|0;w2&=67108863;lo=Math.imul(al3,bl0);mid=Math.imul(al3,bh0);mid=mid+Math.imul(ah3,bl0)|0;hi=Math.imul(ah3,bh0);lo=lo+Math.imul(al2,bl1)|0;mid=mid+Math.imul(al2,bh1)|0;mid=mid+Math.imul(ah2,bl1)|0;hi=hi+Math.imul(ah2,bh1)|0;lo=lo+Math.imul(al1,bl2)|0;mid=mid+Math.imul(al1,bh2)|0;mid=mid+Math.imul(ah1,bl2)|0;hi=hi+Math.imul(ah1,bh2)|0;lo=lo+Math.imul(al0,bl3)|0;mid=mid+Math.imul(al0,bh3)|0;mid=mid+Math.imul(ah0,bl3)|0;hi=hi+Math.imul(ah0,bh3)|0;var w3=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w3>>>26)|0;w3&=67108863;lo=Math.imul(al4,bl0);mid=Math.imul(al4,bh0);mid=mid+Math.imul(ah4,bl0)|0;hi=Math.imul(ah4,bh0);lo=lo+Math.imul(al3,bl1)|0;mid=mid+Math.imul(al3,bh1)|0;mid=mid+Math.imul(ah3,bl1)|0;hi=hi+Math.imul(ah3,bh1)|0;lo=lo+Math.imul(al2,bl2)|0;mid=mid+Math.imul(al2,bh2)|0;mid=mid+Math.imul(ah2,bl2)|0;hi=hi+Math.imul(ah2,bh2)|0;lo=lo+Math.imul(al1,bl3)|0;mid=mid+Math.imul(al1,bh3)|0;mid=mid+Math.imul(ah1,bl3)|0;hi=hi+Math.imul(ah1,bh3)|0;lo=lo+Math.imul(al0,bl4)|0;mid=mid+Math.imul(al0,bh4)|0;mid=mid+Math.imul(ah0,bl4)|0;hi=hi+Math.imul(ah0,bh4)|0;var w4=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w4>>>26)|0;w4&=67108863;lo=Math.imul(al5,bl0);mid=Math.imul(al5,bh0);mid=mid+Math.imul(ah5,bl0)|0;hi=Math.imul(ah5,bh0);lo=lo+Math.imul(al4,bl1)|0;mid=mid+Math.imul(al4,bh1)|0;mid=mid+Math.imul(ah4,bl1)|0;hi=hi+Math.imul(ah4,bh1)|0;lo=lo+Math.imul(al3,bl2)|0;mid=mid+Math.imul(al3,bh2)|0;mid=mid+Math.imul(ah3,bl2)|0;hi=hi+Math.imul(ah3,bh2)|0;lo=lo+Math.imul(al2,bl3)|0;mid=mid+Math.imul(al2,bh3)|0;mid=mid+Math.imul(ah2,bl3)|0;hi=hi+Math.imul(ah2,bh3)|0;lo=lo+Math.imul(al1,bl4)|0;mid=mid+Math.imul(al1,bh4)|0;mid=mid+Math.imul(ah1,bl4)|0;hi=hi+Math.imul(ah1,bh4)|0;lo=lo+Math.imul(al0,bl5)|0;mid=mid+Math.imul(al0,bh5)|0;mid=mid+Math.imul(ah0,bl5)|0;hi=hi+Math.imul(ah0,bh5)|0;var w5=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w5>>>26)|0;w5&=67108863;lo=Math.imul(al6,bl0);mid=Math.imul(al6,bh0);mid=mid+Math.imul(ah6,bl0)|0;hi=Math.imul(ah6,bh0);lo=lo+Math.imul(al5,bl1)|0;mid=mid+Math.imul(al5,bh1)|0;mid=mid+Math.imul(ah5,bl1)|0;hi=hi+Math.imul(ah5,bh1)|0;lo=lo+Math.imul(al4,bl2)|0;mid=mid+Math.imul(al4,bh2)|0;mid=mid+Math.imul(ah4,bl2)|0;hi=hi+Math.imul(ah4,bh2)|0;lo=lo+Math.imul(al3,bl3)|0;mid=mid+Math.imul(al3,bh3)|0;mid=mid+Math.imul(ah3,bl3)|0;hi=hi+Math.imul(ah3,bh3)|0;lo=lo+Math.imul(al2,bl4)|0;mid=mid+Math.imul(al2,bh4)|0;mid=mid+Math.imul(ah2,bl4)|0;hi=hi+Math.imul(ah2,bh4)|0;lo=lo+Math.imul(al1,bl5)|0;mid=mid+Math.imul(al1,bh5)|0;mid=mid+Math.imul(ah1,bl5)|0;hi=hi+Math.imul(ah1,bh5)|0;lo=lo+Math.imul(al0,bl6)|0;mid=mid+Math.imul(al0,bh6)|0;mid=mid+Math.imul(ah0,bl6)|0;hi=hi+Math.imul(ah0,bh6)|0;var w6=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w6>>>26)|0;w6&=67108863;lo=Math.imul(al7,bl0);mid=Math.imul(al7,bh0);mid=mid+Math.imul(ah7,bl0)|0;hi=Math.imul(ah7,bh0);lo=lo+Math.imul(al6,bl1)|0;mid=mid+Math.imul(al6,bh1)|0;mid=mid+Math.imul(ah6,bl1)|0;hi=hi+Math.imul(ah6,bh1)|0;lo=lo+Math.imul(al5,bl2)|0;mid=mid+Math.imul(al5,bh2)|0;mid=mid+Math.imul(ah5,bl2)|0;hi=hi+Math.imul(ah5,bh2)|0;lo=lo+Math.imul(al4,bl3)|0;mid=mid+Math.imul(al4,bh3)|0;mid=mid+Math.imul(ah4,bl3)|0;hi=hi+Math.imul(ah4,bh3)|0;lo=lo+Math.imul(al3,bl4)|0;mid=mid+Math.imul(al3,bh4)|0;mid=mid+Math.imul(ah3,bl4)|0;hi=hi+Math.imul(ah3,bh4)|0;lo=lo+Math.imul(al2,bl5)|0;mid=mid+Math.imul(al2,bh5)|0;mid=mid+Math.imul(ah2,bl5)|0;hi=hi+Math.imul(ah2,bh5)|0;lo=lo+Math.imul(al1,bl6)|0;mid=mid+Math.imul(al1,bh6)|0;mid=mid+Math.imul(ah1,bl6)|0;hi=hi+Math.imul(ah1,bh6)|0;lo=lo+Math.imul(al0,bl7)|0;mid=mid+Math.imul(al0,bh7)|0;mid=mid+Math.imul(ah0,bl7)|0;hi=hi+Math.imul(ah0,bh7)|0;var w7=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w7>>>26)|0;w7&=67108863;lo=Math.imul(al8,bl0);mid=Math.imul(al8,bh0);mid=mid+Math.imul(ah8,bl0)|0;hi=Math.imul(ah8,bh0);lo=lo+Math.imul(al7,bl1)|0;mid=mid+Math.imul(al7,bh1)|0;mid=mid+Math.imul(ah7,bl1)|0;hi=hi+Math.imul(ah7,bh1)|0;lo=lo+Math.imul(al6,bl2)|0;mid=mid+Math.imul(al6,bh2)|0;mid=mid+Math.imul(ah6,bl2)|0;hi=hi+Math.imul(ah6,bh2)|0;lo=lo+Math.imul(al5,bl3)|0;mid=mid+Math.imul(al5,bh3)|0;mid=mid+Math.imul(ah5,bl3)|0;hi=hi+Math.imul(ah5,bh3)|0;lo=lo+Math.imul(al4,bl4)|0;mid=mid+Math.imul(al4,bh4)|0;mid=mid+Math.imul(ah4,bl4)|0;hi=hi+Math.imul(ah4,bh4)|0;lo=lo+Math.imul(al3,bl5)|0;mid=mid+Math.imul(al3,bh5)|0;mid=mid+Math.imul(ah3,bl5)|0;hi=hi+Math.imul(ah3,bh5)|0;lo=lo+Math.imul(al2,bl6)|0;mid=mid+Math.imul(al2,bh6)|0;mid=mid+Math.imul(ah2,bl6)|0;hi=hi+Math.imul(ah2,bh6)|0;lo=lo+Math.imul(al1,bl7)|0;mid=mid+Math.imul(al1,bh7)|0;mid=mid+Math.imul(ah1,bl7)|0;hi=hi+Math.imul(ah1,bh7)|0;lo=lo+Math.imul(al0,bl8)|0;mid=mid+Math.imul(al0,bh8)|0;mid=mid+Math.imul(ah0,bl8)|0;hi=hi+Math.imul(ah0,bh8)|0;var w8=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w8>>>26)|0;w8&=67108863;lo=Math.imul(al9,bl0);mid=Math.imul(al9,bh0);mid=mid+Math.imul(ah9,bl0)|0;hi=Math.imul(ah9,bh0);lo=lo+Math.imul(al8,bl1)|0;mid=mid+Math.imul(al8,bh1)|0;mid=mid+Math.imul(ah8,bl1)|0;hi=hi+Math.imul(ah8,bh1)|0;lo=lo+Math.imul(al7,bl2)|0;mid=mid+Math.imul(al7,bh2)|0;mid=mid+Math.imul(ah7,bl2)|0;hi=hi+Math.imul(ah7,bh2)|0;lo=lo+Math.imul(al6,bl3)|0;mid=mid+Math.imul(al6,bh3)|0;mid=mid+Math.imul(ah6,bl3)|0;hi=hi+Math.imul(ah6,bh3)|0;lo=lo+Math.imul(al5,bl4)|0;mid=mid+Math.imul(al5,bh4)|0;mid=mid+Math.imul(ah5,bl4)|0;hi=hi+Math.imul(ah5,bh4)|0;lo=lo+Math.imul(al4,bl5)|0;mid=mid+Math.imul(al4,bh5)|0;mid=mid+Math.imul(ah4,bl5)|0;hi=hi+Math.imul(ah4,bh5)|0;lo=lo+Math.imul(al3,bl6)|0;mid=mid+Math.imul(al3,bh6)|0;mid=mid+Math.imul(ah3,bl6)|0;hi=hi+Math.imul(ah3,bh6)|0;lo=lo+Math.imul(al2,bl7)|0;mid=mid+Math.imul(al2,bh7)|0;mid=mid+Math.imul(ah2,bl7)|0;hi=hi+Math.imul(ah2,bh7)|0;lo=lo+Math.imul(al1,bl8)|0;mid=mid+Math.imul(al1,bh8)|0;mid=mid+Math.imul(ah1,bl8)|0;hi=hi+Math.imul(ah1,bh8)|0;lo=lo+Math.imul(al0,bl9)|0;mid=mid+Math.imul(al0,bh9)|0;mid=mid+Math.imul(ah0,bl9)|0;hi=hi+Math.imul(ah0,bh9)|0;var w9=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w9>>>26)|0;w9&=67108863;lo=Math.imul(al9,bl1);mid=Math.imul(al9,bh1);mid=mid+Math.imul(ah9,bl1)|0;hi=Math.imul(ah9,bh1);lo=lo+Math.imul(al8,bl2)|0;mid=mid+Math.imul(al8,bh2)|0;mid=mid+Math.imul(ah8,bl2)|0;hi=hi+Math.imul(ah8,bh2)|0;lo=lo+Math.imul(al7,bl3)|0;mid=mid+Math.imul(al7,bh3)|0;mid=mid+Math.imul(ah7,bl3)|0;hi=hi+Math.imul(ah7,bh3)|0;lo=lo+Math.imul(al6,bl4)|0;mid=mid+Math.imul(al6,bh4)|0;mid=mid+Math.imul(ah6,bl4)|0;hi=hi+Math.imul(ah6,bh4)|0;lo=lo+Math.imul(al5,bl5)|0;mid=mid+Math.imul(al5,bh5)|0;mid=mid+Math.imul(ah5,bl5)|0;hi=hi+Math.imul(ah5,bh5)|0;lo=lo+Math.imul(al4,bl6)|0;mid=mid+Math.imul(al4,bh6)|0;mid=mid+Math.imul(ah4,bl6)|0;hi=hi+Math.imul(ah4,bh6)|0;lo=lo+Math.imul(al3,bl7)|0;mid=mid+Math.imul(al3,bh7)|0;mid=mid+Math.imul(ah3,bl7)|0;hi=hi+Math.imul(ah3,bh7)|0;lo=lo+Math.imul(al2,bl8)|0;mid=mid+Math.imul(al2,bh8)|0;mid=mid+Math.imul(ah2,bl8)|0;hi=hi+Math.imul(ah2,bh8)|0;lo=lo+Math.imul(al1,bl9)|0;mid=mid+Math.imul(al1,bh9)|0;mid=mid+Math.imul(ah1,bl9)|0;hi=hi+Math.imul(ah1,bh9)|0;var w10=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w10>>>26)|0;w10&=67108863;lo=Math.imul(al9,bl2);mid=Math.imul(al9,bh2);mid=mid+Math.imul(ah9,bl2)|0;hi=Math.imul(ah9,bh2);lo=lo+Math.imul(al8,bl3)|0;mid=mid+Math.imul(al8,bh3)|0;mid=mid+Math.imul(ah8,bl3)|0;hi=hi+Math.imul(ah8,bh3)|0;lo=lo+Math.imul(al7,bl4)|0;mid=mid+Math.imul(al7,bh4)|0;mid=mid+Math.imul(ah7,bl4)|0;hi=hi+Math.imul(ah7,bh4)|0;lo=lo+Math.imul(al6,bl5)|0;mid=mid+Math.imul(al6,bh5)|0;mid=mid+Math.imul(ah6,bl5)|0;hi=hi+Math.imul(ah6,bh5)|0;lo=lo+Math.imul(al5,bl6)|0;mid=mid+Math.imul(al5,bh6)|0;mid=mid+Math.imul(ah5,bl6)|0;hi=hi+Math.imul(ah5,bh6)|0;lo=lo+Math.imul(al4,bl7)|0;mid=mid+Math.imul(al4,bh7)|0;mid=mid+Math.imul(ah4,bl7)|0;hi=hi+Math.imul(ah4,bh7)|0;lo=lo+Math.imul(al3,bl8)|0;mid=mid+Math.imul(al3,bh8)|0;mid=mid+Math.imul(ah3,bl8)|0;hi=hi+Math.imul(ah3,bh8)|0;lo=lo+Math.imul(al2,bl9)|0;mid=mid+Math.imul(al2,bh9)|0;mid=mid+Math.imul(ah2,bl9)|0;hi=hi+Math.imul(ah2,bh9)|0;var w11=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w11>>>26)|0;w11&=67108863;lo=Math.imul(al9,bl3);mid=Math.imul(al9,bh3);mid=mid+Math.imul(ah9,bl3)|0;hi=Math.imul(ah9,bh3);lo=lo+Math.imul(al8,bl4)|0;mid=mid+Math.imul(al8,bh4)|0;mid=mid+Math.imul(ah8,bl4)|0;hi=hi+Math.imul(ah8,bh4)|0;lo=lo+Math.imul(al7,bl5)|0;mid=mid+Math.imul(al7,bh5)|0;mid=mid+Math.imul(ah7,bl5)|0;hi=hi+Math.imul(ah7,bh5)|0;lo=lo+Math.imul(al6,bl6)|0;mid=mid+Math.imul(al6,bh6)|0;mid=mid+Math.imul(ah6,bl6)|0;hi=hi+Math.imul(ah6,bh6)|0;lo=lo+Math.imul(al5,bl7)|0;mid=mid+Math.imul(al5,bh7)|0;mid=mid+Math.imul(ah5,bl7)|0;hi=hi+Math.imul(ah5,bh7)|0;lo=lo+Math.imul(al4,bl8)|0;mid=mid+Math.imul(al4,bh8)|0;mid=mid+Math.imul(ah4,bl8)|0;hi=hi+Math.imul(ah4,bh8)|0;lo=lo+Math.imul(al3,bl9)|0;mid=mid+Math.imul(al3,bh9)|0;mid=mid+Math.imul(ah3,bl9)|0;hi=hi+Math.imul(ah3,bh9)|0;var w12=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w12>>>26)|0;w12&=67108863;lo=Math.imul(al9,bl4);mid=Math.imul(al9,bh4);mid=mid+Math.imul(ah9,bl4)|0;hi=Math.imul(ah9,bh4);lo=lo+Math.imul(al8,bl5)|0;mid=mid+Math.imul(al8,bh5)|0;mid=mid+Math.imul(ah8,bl5)|0;hi=hi+Math.imul(ah8,bh5)|0;lo=lo+Math.imul(al7,bl6)|0;mid=mid+Math.imul(al7,bh6)|0;mid=mid+Math.imul(ah7,bl6)|0;hi=hi+Math.imul(ah7,bh6)|0;lo=lo+Math.imul(al6,bl7)|0;mid=mid+Math.imul(al6,bh7)|0;mid=mid+Math.imul(ah6,bl7)|0;hi=hi+Math.imul(ah6,bh7)|0;lo=lo+Math.imul(al5,bl8)|0;mid=mid+Math.imul(al5,bh8)|0;mid=mid+Math.imul(ah5,bl8)|0;hi=hi+Math.imul(ah5,bh8)|0;lo=lo+Math.imul(al4,bl9)|0;mid=mid+Math.imul(al4,bh9)|0;mid=mid+Math.imul(ah4,bl9)|0;hi=hi+Math.imul(ah4,bh9)|0;var w13=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w13>>>26)|0;w13&=67108863;lo=Math.imul(al9,bl5);mid=Math.imul(al9,bh5);mid=mid+Math.imul(ah9,bl5)|0;hi=Math.imul(ah9,bh5);lo=lo+Math.imul(al8,bl6)|0;mid=mid+Math.imul(al8,bh6)|0;mid=mid+Math.imul(ah8,bl6)|0;hi=hi+Math.imul(ah8,bh6)|0;lo=lo+Math.imul(al7,bl7)|0;mid=mid+Math.imul(al7,bh7)|0;mid=mid+Math.imul(ah7,bl7)|0;hi=hi+Math.imul(ah7,bh7)|0;lo=lo+Math.imul(al6,bl8)|0;mid=mid+Math.imul(al6,bh8)|0;mid=mid+Math.imul(ah6,bl8)|0;hi=hi+Math.imul(ah6,bh8)|0;lo=lo+Math.imul(al5,bl9)|0;mid=mid+Math.imul(al5,bh9)|0;mid=mid+Math.imul(ah5,bl9)|0;hi=hi+Math.imul(ah5,bh9)|0;var w14=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w14>>>26)|0;w14&=67108863;lo=Math.imul(al9,bl6);mid=Math.imul(al9,bh6);mid=mid+Math.imul(ah9,bl6)|0;hi=Math.imul(ah9,bh6);lo=lo+Math.imul(al8,bl7)|0;mid=mid+Math.imul(al8,bh7)|0;mid=mid+Math.imul(ah8,bl7)|0;hi=hi+Math.imul(ah8,bh7)|0;lo=lo+Math.imul(al7,bl8)|0;mid=mid+Math.imul(al7,bh8)|0;mid=mid+Math.imul(ah7,bl8)|0;hi=hi+Math.imul(ah7,bh8)|0;lo=lo+Math.imul(al6,bl9)|0;mid=mid+Math.imul(al6,bh9)|0;mid=mid+Math.imul(ah6,bl9)|0;hi=hi+Math.imul(ah6,bh9)|0;var w15=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w15>>>26)|0;w15&=67108863;lo=Math.imul(al9,bl7);mid=Math.imul(al9,bh7);mid=mid+Math.imul(ah9,bl7)|0;hi=Math.imul(ah9,bh7);lo=lo+Math.imul(al8,bl8)|0;mid=mid+Math.imul(al8,bh8)|0;mid=mid+Math.imul(ah8,bl8)|0;hi=hi+Math.imul(ah8,bh8)|0;lo=lo+Math.imul(al7,bl9)|0;mid=mid+Math.imul(al7,bh9)|0;mid=mid+Math.imul(ah7,bl9)|0;hi=hi+Math.imul(ah7,bh9)|0;var w16=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w16>>>26)|0;w16&=67108863;lo=Math.imul(al9,bl8);mid=Math.imul(al9,bh8);mid=mid+Math.imul(ah9,bl8)|0;hi=Math.imul(ah9,bh8);lo=lo+Math.imul(al8,bl9)|0;mid=mid+Math.imul(al8,bh9)|0;mid=mid+Math.imul(ah8,bl9)|0;hi=hi+Math.imul(ah8,bh9)|0;var w17=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w17>>>26)|0;w17&=67108863;lo=Math.imul(al9,bl9);mid=Math.imul(al9,bh9);mid=mid+Math.imul(ah9,bl9)|0;hi=Math.imul(ah9,bh9);var w18=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w18>>>26)|0;w18&=67108863;o[0]=w0;o[1]=w1; +o[2]=w2;o[3]=w3;o[4]=w4;o[5]=w5;o[6]=w6;o[7]=w7;o[8]=w8;o[9]=w9;o[10]=w10;o[11]=w11;o[12]=w12;o[13]=w13;o[14]=w14;o[15]=w15;o[16]=w16;o[17]=w17;o[18]=w18;if(c!==0){o[19]=c;out.length++}return out};if(!Math.imul){comb10MulTo=smallMulTo}function bigMulTo(self,num,out){out.negative=num.negative^self.negative;out.length=self.length+num.length;var carry=0;var hncarry=0;for(var k=0;k>>26)|0;hncarry+=ncarry>>>26;ncarry&=67108863}out.words[k]=rword;carry=ncarry;ncarry=hncarry}if(carry!==0){out.words[k]=carry}else{out.length--}return out.strip()}function jumboMulTo(self,num,out){var fftm=new FFTM;return fftm.mulp(self,num,out)}BN.prototype.mulTo=function mulTo(num,out){var res;var len=this.length+num.length;if(this.length===10&&num.length===10){res=comb10MulTo(this,num,out)}else if(len<63){res=smallMulTo(this,num,out)}else if(len<1024){res=bigMulTo(this,num,out)}else{res=jumboMulTo(this,num,out)}return res};function FFTM(x,y){this.x=x;this.y=y}FFTM.prototype.makeRBT=function makeRBT(N){var t=new Array(N);var l=BN.prototype._countBits(N)-1;for(var i=0;i>=1}return rb};FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i>>1){i++}return 1<>>13;rws[2*i+1]=carry&8191;carry=carry>>>13}for(i=2*len;i>=26;carry+=w/67108864|0;carry+=lo>>>26;this.words[i]=lo&67108863}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.muln=function muln(num){return this.clone().imuln(num)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(num){var w=toBitArray(num);if(w.length===0)return new BN(1);var res=this;for(var i=0;i=0);var r=bits%26;var s=(bits-r)/26;var carryMask=67108863>>>26-r<<26-r;var i;if(r!==0){var carry=0;for(i=0;i>>26-r}if(carry){this.words[i]=carry;this.length++}}if(s!==0){for(i=this.length-1;i>=0;i--){this.words[i+s]=this.words[i]}for(i=0;i=0);var h;if(hint){h=(hint-hint%26)/26}else{h=0}var r=bits%26;var s=Math.min((bits-r)/26,this.length);var mask=67108863^67108863>>>r<s){this.length-=s;for(i=0;i=0&&(carry!==0||i>=h);i--){var word=this.words[i]|0;this.words[i]=carry<<26-r|word>>>r;carry=word&mask}if(maskedWords&&carry!==0){maskedWords.words[maskedWords.length++]=carry}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};BN.prototype.ishrn=function ishrn(bits,hint,extended){assert(this.negative===0);return this.iushrn(bits,hint,extended)};BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)};BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)};BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)};BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)};BN.prototype.testn=function testn(bit){assert(typeof bit==="number"&&bit>=0);var r=bit%26;var s=(bit-r)/26;var q=1<=0);var r=bits%26;var s=(bits-r)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=s){return this}if(r!==0){s++}this.length=Math.min(s,this.length);if(r!==0){var mask=67108863^67108863>>>r<=67108864;i++){this.words[i]-=67108864;if(i===this.length-1){this.words[i+1]=1}else{this.words[i+1]++}}this.length=Math.max(this.length,i+1);return this};BN.prototype.isubn=function isubn(num){assert(typeof num==="number");assert(num<67108864);if(num<0)return this.iaddn(-num);if(this.negative!==0){this.negative=0;this.iaddn(num);this.negative=1;return this}this.words[0]-=num;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var i=0;i>26)-(right/67108864|0);this.words[i+shift]=w&67108863}for(;i>26;this.words[i+shift]=w&67108863}if(carry===0)return this.strip();assert(carry===-1);carry=0;for(i=0;i>26;this.words[i]=w&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=this.length-num.length;var a=this.clone();var b=num;var bhi=b.words[b.length-1]|0;var bhiBits=this._countBits(bhi);shift=26-bhiBits;if(shift!==0){b=b.ushln(shift);a.iushln(shift);bhi=b.words[b.length-1]|0}var m=a.length-b.length;var q;if(mode!=="mod"){q=new BN(null);q.length=m+1;q.words=new Array(q.length);for(var i=0;i=0;j--){var qj=(a.words[b.length+j]|0)*67108864+(a.words[b.length+j-1]|0);qj=Math.min(qj/bhi|0,67108863);a._ishlnsubmul(b,qj,j);while(a.negative!==0){qj--;a.negative=0;a._ishlnsubmul(b,1,j);if(!a.isZero()){a.negative^=1}}if(q){q.words[j]=qj}}if(q){q.strip()}a.strip();if(mode!=="div"&&shift!==0){a.iushrn(shift)}return{div:q||null,mod:a}};BN.prototype.divmod=function divmod(num,mode,positive){assert(!num.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var div,mod,res;if(this.negative!==0&&num.negative===0){res=this.neg().divmod(num,mode);if(mode!=="mod"){div=res.div.neg()}if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.iadd(num)}}return{div:div,mod:mod}}if(this.negative===0&&num.negative!==0){res=this.divmod(num.neg(),mode);if(mode!=="mod"){div=res.div.neg()}return{div:div,mod:res.mod}}if((this.negative&num.negative)!==0){res=this.neg().divmod(num.neg(),mode);if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.isub(num)}}return{div:res.div,mod:mod}}if(num.length>this.length||this.cmp(num)<0){return{div:new BN(0),mod:this}}if(num.length===1){if(mode==="div"){return{div:this.divn(num.words[0]),mod:null}}if(mode==="mod"){return{div:null,mod:new BN(this.modn(num.words[0]))}}return{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}}return this._wordDiv(num,mode)};BN.prototype.div=function div(num){return this.divmod(num,"div",false).div};BN.prototype.mod=function mod(num){return this.divmod(num,"mod",false).mod};BN.prototype.umod=function umod(num){return this.divmod(num,"mod",true).mod};BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=dm.div.negative!==0?dm.mod.isub(num):dm.mod;var half=num.ushrn(1);var r2=num.andln(1);var cmp=mod.cmp(half);if(cmp<0||r2===1&&cmp===0)return dm.div;return dm.div.negative!==0?dm.div.isubn(1):dm.div.iaddn(1)};BN.prototype.modn=function modn(num){assert(num<=67108863);var p=(1<<26)%num;var acc=0;for(var i=this.length-1;i>=0;i--){acc=(p*acc+(this.words[i]|0))%num}return acc};BN.prototype.idivn=function idivn(num){assert(num<=67108863);var carry=0;for(var i=this.length-1;i>=0;i--){var w=(this.words[i]|0)+carry*67108864;this.words[i]=w/num|0;carry=w%num}return this.strip()};BN.prototype.divn=function divn(num){return this.clone().idivn(num)};BN.prototype.egcd=function egcd(p){assert(p.negative===0);assert(!p.isZero());var x=this;var y=p.clone();if(x.negative!==0){x=x.umod(p)}else{x=x.clone()}var A=new BN(1);var B=new BN(0);var C=new BN(0);var D=new BN(1);var g=0;while(x.isEven()&&y.isEven()){x.iushrn(1);y.iushrn(1);++g}var yp=y.clone();var xp=x.clone();while(!x.isZero()){for(var i=0,im=1;(x.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){x.iushrn(i);while(i-->0){if(A.isOdd()||B.isOdd()){A.iadd(yp);B.isub(xp)}A.iushrn(1);B.iushrn(1)}}for(var j=0,jm=1;(y.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){y.iushrn(j);while(j-->0){if(C.isOdd()||D.isOdd()){C.iadd(yp);D.isub(xp)}C.iushrn(1);D.iushrn(1)}}if(x.cmp(y)>=0){x.isub(y);A.isub(C);B.isub(D)}else{y.isub(x);C.isub(A);D.isub(B)}}return{a:C,b:D,gcd:y.iushln(g)}};BN.prototype._invmp=function _invmp(p){assert(p.negative===0);assert(!p.isZero());var a=this;var b=p.clone();if(a.negative!==0){a=a.umod(p)}else{a=a.clone()}var x1=new BN(1);var x2=new BN(0);var delta=b.clone();while(a.cmpn(1)>0&&b.cmpn(1)>0){for(var i=0,im=1;(a.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){a.iushrn(i);while(i-->0){if(x1.isOdd()){x1.iadd(delta)}x1.iushrn(1)}}for(var j=0,jm=1;(b.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){b.iushrn(j);while(j-->0){if(x2.isOdd()){x2.iadd(delta)}x2.iushrn(1)}}if(a.cmp(b)>=0){a.isub(b);x1.isub(x2)}else{b.isub(a);x2.isub(x1)}}var res;if(a.cmpn(1)===0){res=x1}else{res=x2}if(res.cmpn(0)<0){res.iadd(p)}return res};BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone();var b=num.clone();a.negative=0;b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++){a.iushrn(1);b.iushrn(1)}do{while(a.isEven()){a.iushrn(1)}while(b.isEven()){b.iushrn(1)}var r=a.cmp(b);if(r<0){var t=a;a=b;b=t}else if(r===0||b.cmpn(1)===0){break}a.isub(b)}while(true);return b.iushln(shift)};BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(num){return this.words[0]&num};BN.prototype.bincn=function bincn(bit){assert(typeof bit==="number");var r=bit%26;var s=(bit-r)/26;var q=1<>>26;w&=67108863;this.words[i]=w}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(num){var negative=num<0;if(this.negative!==0&&!negative)return-1;if(this.negative===0&&negative)return 1;this.strip();var res;if(this.length>1){res=1}else{if(negative){num=-num}assert(num<=67108863,"Number is too big");var w=this.words[0]|0;res=w===num?0:wnum.length)return 1;if(this.length=0;i--){var a=this.words[i]|0;var b=num.words[i]|0;if(a===b)continue;if(ab){res=1}break}return res};BN.prototype.gtn=function gtn(num){return this.cmpn(num)===1};BN.prototype.gt=function gt(num){return this.cmp(num)===1};BN.prototype.gten=function gten(num){return this.cmpn(num)>=0};BN.prototype.gte=function gte(num){return this.cmp(num)>=0};BN.prototype.ltn=function ltn(num){return this.cmpn(num)===-1};BN.prototype.lt=function lt(num){return this.cmp(num)===-1};BN.prototype.lten=function lten(num){return this.cmpn(num)<=0};BN.prototype.lte=function lte(num){return this.cmp(num)<=0};BN.prototype.eqn=function eqn(num){return this.cmpn(num)===0};BN.prototype.eq=function eq(num){return this.cmp(num)===0};BN.red=function red(num){return new Red(num)};BN.prototype.toRed=function toRed(ctx){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return ctx.convertTo(this)._forceRed(ctx)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(ctx){this.red=ctx;return this};BN.prototype.forceRed=function forceRed(ctx){assert(!this.red,"Already a number in reduction context");return this._forceRed(ctx)};BN.prototype.redAdd=function redAdd(num){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,num)};BN.prototype.redIAdd=function redIAdd(num){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,num)};BN.prototype.redSub=function redSub(num){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,num)};BN.prototype.redISub=function redISub(num){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,num)};BN.prototype.redShl=function redShl(num){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,num)};BN.prototype.redMul=function redMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.mul(this,num)};BN.prototype.redIMul=function redIMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.imul(this,num)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(num){assert(this.red&&!num.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name;this.p=new BN(p,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);tmp.words=new Array(Math.ceil(this.n/13));return tmp};MPrime.prototype.ireduce=function ireduce(num){var r=num;var rlen;do{this.split(r,this.tmp);r=this.imulK(r);r=r.iadd(this.tmp);rlen=r.bitLength()}while(rlen>this.n);var cmp=rlen0){r.isub(this.p)}else{r.strip()}return r};MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)};MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(input,output){var mask=4194303;var outLen=Math.min(input.length,9);for(var i=0;i>>22;prev=next}prev>>>=22;input.words[i-10]=prev;if(prev===0&&input.length>10){input.length-=10}else{input.length-=9}};K256.prototype.imulK=function imulK(num){num.words[num.length]=0;num.words[num.length+1]=0;num.length+=2;var lo=0;for(var i=0;i>>=26;num.words[i]=lo;carry=hi}if(carry!==0){num.words[num.length++]=carry}return num};BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if(name==="k256"){prime=new K256}else if(name==="p224"){prime=new P224}else if(name==="p192"){prime=new P192}else if(name==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+name)}primes[name]=prime;return prime};function Red(m){if(typeof m==="string"){var prime=BN._prime(m);this.m=prime.p;this.prime=prime}else{assert(m.gtn(1),"modulus must be greater than 1");this.m=m;this.prime=null}}Red.prototype._verify1=function _verify1(a){assert(a.negative===0,"red works only with positives");assert(a.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(a,b){assert((a.negative|b.negative)===0,"red works only with positives");assert(a.red&&a.red===b.red,"red works only with red numbers")};Red.prototype.imod=function imod(a){if(this.prime)return this.prime.ireduce(a)._forceRed(this);return a.umod(this.m)._forceRed(this)};Red.prototype.neg=function neg(a){if(a.isZero()){return a.clone()}return this.m.sub(a)._forceRed(this)};Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res._forceRed(this)};Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res};Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res._forceRed(this)};Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res};Red.prototype.shl=function shl(a,num){this._verify1(a);return this.imod(a.ushln(num))};Red.prototype.imul=function imul(a,b){this._verify2(a,b);return this.imod(a.imul(b))};Red.prototype.mul=function mul(a,b){this._verify2(a,b);return this.imod(a.mul(b))};Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())};Red.prototype.sqr=function sqr(a){return this.mul(a,a)};Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);assert(mod3%2===1);if(mod3===3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}var q=this.m.subn(1);var s=0;while(!q.isZero()&&q.andln(1)===0){s++;q.iushrn(1)}assert(!q.isZero());var one=new BN(1).toRed(this);var nOne=one.redNeg();var lpow=this.m.subn(1).iushrn(1);var z=this.m.bitLength();z=new BN(2*z*z).toRed(this);while(this.pow(z,lpow).cmp(nOne)!==0){z.redIAdd(nOne)}var c=this.pow(z,q);var r=this.pow(a,q.addn(1).iushrn(1));var t=this.pow(a,q);var m=s;while(t.cmp(one)!==0){var tmp=t;for(var i=0;tmp.cmp(one)!==0;i++){tmp=tmp.redSqr()}assert(i=0;i--){var word=num.words[i];for(var j=start-1;j>=0;j--){var bit=word>>j&1;if(res!==wnd[0]){res=this.sqr(res)}if(bit===0&¤t===0){currentLen=0;continue}current<<=1;current|=bit;currentLen++;if(currentLen!==windowSize&&(i!==0||j!==0))continue;res=this.mul(res,wnd[current]);currentLen=0;current=0}start=26}return res};Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r};Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();res.red=null;return res};BN.mont=function mont(num){return new Mont(num)};function Mont(m){Red.call(this,m);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(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)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));r.red=null;return r};Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero()){a.words[0]=0;a.length=1;return a}var t=a.imul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.invm=function invm(a){var res=this.imod(a._invmp(this.m).mul(this.r2));return res._forceRed(this)}}(typeof module==="undefined"||module,this)},{}],36:[function(require,module,exports){var r;module.exports=function rand(len){if(!r)r=new Rand(null);return r.generate(len)};function Rand(rand){this.rand=rand}module.exports.Rand=Rand;Rand.prototype.generate=function generate(len){return this._rand(len)};if(typeof window==="object"){if(window.crypto&&window.crypto.getRandomValues){Rand.prototype._rand=function _rand(n){var arr=new Uint8Array(n);window.crypto.getRandomValues(arr);return arr}}else if(window.msCrypto&&window.msCrypto.getRandomValues){Rand.prototype._rand=function _rand(n){var arr=new Uint8Array(n);window.msCrypto.getRandomValues(arr);return arr}}else{Rand.prototype._rand=function(){throw new Error("Not implemented yet")}}}else{try{var crypto=require("crypto");Rand.prototype._rand=function _rand(n){return crypto.randomBytes(n)}}catch(e){Rand.prototype._rand=function _rand(n){var res=new Uint8Array(n);for(var i=0;iuint_max||x<0?(x_pos=Math.abs(x)%uint_max,x<0?uint_max-x_pos:x_pos):x;return ret}function scrub_vec(v){for(var i=0;i>>8^sx&255^99;this.SBOX[x]=sx;this.INV_SBOX[sx]=x;x2=d[x];x4=d[x2];x8=d[x4];t=d[sx]*257^sx*16843008;this.SUB_MIX[0][x]=t<<24|t>>>8;this.SUB_MIX[1][x]=t<<16|t>>>16;this.SUB_MIX[2][x]=t<<8|t>>>24;this.SUB_MIX[3][x]=t;t=x8*16843009^x4*65537^x2*257^x*16843008;this.INV_SUB_MIX[0][sx]=t<<24|t>>>8;this.INV_SUB_MIX[1][sx]=t<<16|t>>>16;this.INV_SUB_MIX[2][sx]=t<<8|t>>>24;this.INV_SUB_MIX[3][sx]=t;if(x===0){x=xi=1}else{x=x2^d[d[d[x8^x2]]];xi^=d[d[xi]]}}return true};var G=new Global;AES.blockSize=4*4;AES.prototype.blockSize=AES.blockSize;AES.keySize=256/8;AES.prototype.keySize=AES.keySize;function bufferToArray(buf){var len=buf.length/4;var out=new Array(len);var i=-1;while(++i>>24,t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[t&255],t^=G.RCON[ksRow/keySize|0]<<24):keySize>6&&ksRow%keySize===4?t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[t&255]:void 0,this._keySchedule[ksRow-keySize]^t)}this._invKeySchedule=[];for(invKsRow=0;invKsRow>>24]]^G.INV_SUB_MIX[1][G.SBOX[t>>>16&255]]^G.INV_SUB_MIX[2][G.SBOX[t>>>8&255]]^G.INV_SUB_MIX[3][G.SBOX[t&255]]}return true};AES.prototype.encryptBlock=function(M){M=bufferToArray(new Buffer(M));var out=this._doCryptBlock(M,this._keySchedule,G.SUB_MIX,G.SBOX);var buf=new Buffer(16);buf.writeUInt32BE(out[0],0);buf.writeUInt32BE(out[1],4);buf.writeUInt32BE(out[2],8);buf.writeUInt32BE(out[3],12);return buf};AES.prototype.decryptBlock=function(M){M=bufferToArray(new Buffer(M));var temp=[M[3],M[1]];M[1]=temp[0];M[3]=temp[1];var out=this._doCryptBlock(M,this._invKeySchedule,G.INV_SUB_MIX,G.INV_SBOX);var buf=new Buffer(16);buf.writeUInt32BE(out[0],0);buf.writeUInt32BE(out[3],4);buf.writeUInt32BE(out[2],8);buf.writeUInt32BE(out[1],12);return buf};AES.prototype.scrub=function(){scrub_vec(this._keySchedule);scrub_vec(this._invKeySchedule);scrub_vec(this._key)};AES.prototype._doCryptBlock=function(M,keySchedule,SUB_MIX,SBOX){var ksRow,s0,s1,s2,s3,t0,t1,t2,t3;s0=M[0]^keySchedule[0];s1=M[1]^keySchedule[1];s2=M[2]^keySchedule[2];s3=M[3]^keySchedule[3];ksRow=4;for(var round=1;round>>24]^SUB_MIX[1][s1>>>16&255]^SUB_MIX[2][s2>>>8&255]^SUB_MIX[3][s3&255]^keySchedule[ksRow++];t1=SUB_MIX[0][s1>>>24]^SUB_MIX[1][s2>>>16&255]^SUB_MIX[2][s3>>>8&255]^SUB_MIX[3][s0&255]^keySchedule[ksRow++];t2=SUB_MIX[0][s2>>>24]^SUB_MIX[1][s3>>>16&255]^SUB_MIX[2][s0>>>8&255]^SUB_MIX[3][s1&255]^keySchedule[ksRow++];t3=SUB_MIX[0][s3>>>24]^SUB_MIX[1][s0>>>16&255]^SUB_MIX[2][s1>>>8&255]^SUB_MIX[3][s2&255]^keySchedule[ksRow++];s0=t0;s1=t1;s2=t2;s3=t3}t0=(SBOX[s0>>>24]<<24|SBOX[s1>>>16&255]<<16|SBOX[s2>>>8&255]<<8|SBOX[s3&255])^keySchedule[ksRow++];t1=(SBOX[s1>>>24]<<24|SBOX[s2>>>16&255]<<16|SBOX[s3>>>8&255]<<8|SBOX[s0&255])^keySchedule[ksRow++];t2=(SBOX[s2>>>24]<<24|SBOX[s3>>>16&255]<<16|SBOX[s0>>>8&255]<<8|SBOX[s1&255])^keySchedule[ksRow++];t3=(SBOX[s3>>>24]<<24|SBOX[s0>>>16&255]<<16|SBOX[s1>>>8&255]<<8|SBOX[s2&255])^keySchedule[ksRow++];return[fixup_uint32(t0),fixup_uint32(t1),fixup_uint32(t2),fixup_uint32(t3)]};exports.AES=AES}.call(this,require("buffer").Buffer)},{buffer:67}],39:[function(require,module,exports){!function(Buffer){var aes=require("./aes");var Transform=require("cipher-base");var inherits=require("inherits");var GHASH=require("./ghash");var xor=require("buffer-xor");inherits(StreamCipher,Transform);module.exports=StreamCipher;function StreamCipher(mode,key,iv,decrypt){if(!(this instanceof StreamCipher)){return new StreamCipher(mode,key,iv)}Transform.call(this);this._finID=Buffer.concat([iv,new Buffer([0,0,0,1])]); +iv=Buffer.concat([iv,new Buffer([0,0,0,2])]);this._cipher=new aes.AES(key);this._prev=new Buffer(iv.length);this._cache=new Buffer("");this._secCache=new Buffer("");this._decrypt=decrypt;this._alen=0;this._len=0;iv.copy(this._prev);this._mode=mode;var h=new Buffer(4);h.fill(0);this._ghash=new GHASH(this._cipher.encryptBlock(h));this._authTag=null;this._called=false}StreamCipher.prototype._update=function(chunk){if(!this._called&&this._alen){var rump=16-this._alen%16;if(rump<16){rump=new Buffer(rump);rump.fill(0);this._ghash.update(rump)}}this._called=true;var out=this._mode.encrypt(this,chunk);if(this._decrypt){this._ghash.update(chunk)}else{this._ghash.update(out)}this._len+=chunk.length;return out};StreamCipher.prototype._final=function(){if(this._decrypt&&!this._authTag){throw new Error("Unsupported state or unable to authenticate data")}var tag=xor(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(xorTest(tag,this._authTag)){throw new Error("Unsupported state or unable to authenticate data")}}else{this._authTag=tag}this._cipher.scrub()};StreamCipher.prototype.getAuthTag=function getAuthTag(){if(!this._decrypt&&Buffer.isBuffer(this._authTag)){return this._authTag}else{throw new Error("Attempting to get auth tag in unsupported state")}};StreamCipher.prototype.setAuthTag=function setAuthTag(tag){if(this._decrypt){this._authTag=tag}else{throw new Error("Attempting to set auth tag in unsupported state")}};StreamCipher.prototype.setAAD=function setAAD(buf){if(!this._called){this._ghash.update(buf);this._alen+=buf.length}else{throw new Error("Attempting to set AAD in unsupported state")}};function xorTest(a,b){var out=0;if(a.length!==b.length){out++}var len=Math.min(a.length,b.length);var i=-1;while(++i16){out=this.cache.slice(0,16);this.cache=this.cache.slice(16);return out}}else{if(this.cache.length>=16){out=this.cache.slice(0,16);this.cache=this.cache.slice(16);return out}}return null};Splitter.prototype.flush=function(){if(this.cache.length){return this.cache}};function unpad(last){var padded=last[15];var i=-1;while(++i15){var out=this.cache.slice(0,16);this.cache=this.cache.slice(16);return out}return null};Splitter.prototype.flush=function(){var len=16-this.cache.length;var padBuff=new Buffer(len);var i=-1;while(++i0;j--){Vi[j]=Vi[j]>>>1|(Vi[j-1]&1)<<31}Vi[0]=Vi[0]>>>1;if(lsb_Vi){Vi[0]=Vi[0]^225<<24}}this.state=fromArray(Zi)};GHASH.prototype.update=function(buf){this.cache=Buffer.concat([this.cache,buf]);var chunk;while(this.cache.length>=16){chunk=this.cache.slice(0,16);this.cache=this.cache.slice(16);this.ghash(chunk)}};GHASH.prototype.final=function(abl,bl){if(this.cache.length){this.ghash(Buffer.concat([this.cache,zeros],16))}this.ghash(fromArray([0,abl,0,bl]));return this.state};function toArray(buf){return[buf.readUInt32BE(0),buf.readUInt32BE(4),buf.readUInt32BE(8),buf.readUInt32BE(12)]}function fromArray(out){out=out.map(fixup_uint32);var buf=new Buffer(16);buf.writeUInt32BE(out[0],0);buf.writeUInt32BE(out[1],4);buf.writeUInt32BE(out[2],8);buf.writeUInt32BE(out[3],12);return buf}var uint_max=Math.pow(2,32);function fixup_uint32(x){var ret,x_pos;ret=x>uint_max||x<0?(x_pos=Math.abs(x)%uint_max,x<0?uint_max-x_pos:x_pos):x;return ret}function xor(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}}.call(this,require("buffer").Buffer)},{buffer:67}],44:[function(require,module,exports){exports["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"};exports["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"};exports["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"};exports["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"};exports["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"};exports["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"};exports["aes128"]=exports["aes-128-cbc"];exports["aes192"]=exports["aes-192-cbc"];exports["aes256"]=exports["aes-256-cbc"];exports["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"};exports["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"};exports["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"};exports["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"};exports["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"};exports["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"};exports["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"};exports["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"};exports["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"};exports["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"};exports["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"};exports["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"};exports["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"};exports["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"};exports["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"};exports["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"};exports["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"};exports["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],45:[function(require,module,exports){var xor=require("buffer-xor");exports.encrypt=function(self,block){var data=xor(block,self._prev);self._prev=self._cipher.encryptBlock(data);return self._prev};exports.decrypt=function(self,block){var pad=self._prev;self._prev=block;var out=self._cipher.decryptBlock(block);return xor(out,pad)}},{"buffer-xor":66}],46:[function(require,module,exports){!function(Buffer){var xor=require("buffer-xor");exports.encrypt=function(self,data,decrypt){var out=new Buffer("");var len;while(data.length){if(self._cache.length===0){self._cache=self._cipher.encryptBlock(self._prev);self._prev=new Buffer("")}if(self._cache.length<=data.length){len=self._cache.length;out=Buffer.concat([out,encryptStart(self,data.slice(0,len),decrypt)]);data=data.slice(len)}else{out=Buffer.concat([out,encryptStart(self,data,decrypt)]);break}}return out};function encryptStart(self,data,decrypt){var len=data.length;var out=xor(data,self._cache);self._cache=self._cache.slice(len);self._prev=Buffer.concat([self._prev,decrypt?data:out]);return out}}.call(this,require("buffer").Buffer)},{buffer:67,"buffer-xor":66}],47:[function(require,module,exports){!function(Buffer){function encryptByte(self,byteParam,decrypt){var pad;var i=-1;var len=8;var out=0;var bit,value;while(++i>i%8;self._prev=shiftIn(self._prev,decrypt?bit:value)}return out}exports.encrypt=function(self,chunk,decrypt){var len=chunk.length;var out=new Buffer(len);var i=-1;while(++i>7}return out}}.call(this,require("buffer").Buffer)},{buffer:67}],48:[function(require,module,exports){!function(Buffer){function encryptByte(self,byteParam,decrypt){var pad=self._cipher.encryptBlock(self._prev);var out=pad[0]^byteParam;self._prev=Buffer.concat([self._prev.slice(1),new Buffer([decrypt?byteParam:out])]);return out}exports.encrypt=function(self,chunk,decrypt){var len=chunk.length;var out=new Buffer(len);var i=-1;while(++i=0||!r.umod(priv.prime1)||!r.umod(priv.prime2)){r=new bn(randomBytes(len))}return r}}.call(this,require("buffer").Buffer)},{"bn.js":35,buffer:67,randombytes:214}],57:[function(require,module,exports){!function(Buffer){"use strict";exports["RSA-SHA224"]=exports.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new Buffer("302d300d06096086480165030402040500041c","hex")};exports["RSA-SHA256"]=exports.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new Buffer("3031300d060960864801650304020105000420","hex")};exports["RSA-SHA384"]=exports.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new Buffer("3041300d060960864801650304020205000430","hex")};exports["RSA-SHA512"]=exports.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new Buffer("3051300d060960864801650304020305000440","hex")};exports["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new Buffer("3021300906052b0e03021a05000414","hex")};exports["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new Buffer("","hex")};exports.DSA=exports["DSA-SHA1"]=exports["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new Buffer("","hex")};exports["DSA-SHA224"]=exports["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new Buffer("","hex")};exports["DSA-SHA256"]=exports["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new Buffer("","hex")};exports["DSA-SHA384"]=exports["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new Buffer("","hex")};exports["DSA-SHA512"]=exports["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new Buffer("","hex")};exports["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new Buffer("","hex")};exports["RSA-RIPEMD160"]=exports.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new Buffer("3021300906052b2403020105000414","hex")};exports["RSA-MD5"]=exports.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new Buffer("3020300c06082a864886f70d020505000410","hex")}}.call(this,require("buffer").Buffer)},{buffer:67}],58:[function(require,module,exports){!function(Buffer){var _algos=require("./algos");var createHash=require("create-hash");var inherits=require("inherits");var sign=require("./sign");var stream=require("stream");var verify=require("./verify");var algos={};Object.keys(_algos).forEach(function(key){algos[key]=algos[key.toLowerCase()]=_algos[key]});function Sign(algorithm){stream.Writable.call(this);var data=algos[algorithm];if(!data){throw new Error("Unknown message digest")}this._hashType=data.hash;this._hash=createHash(data.hash);this._tag=data.id;this._signType=data.sign}inherits(Sign,stream.Writable);Sign.prototype._write=function _write(data,_,done){this._hash.update(data);done()};Sign.prototype.update=function update(data,enc){if(typeof data==="string"){data=new Buffer(data,enc)}this._hash.update(data);return this};Sign.prototype.sign=function signMethod(key,enc){this.end();var hash=this._hash.digest();var sig=sign(Buffer.concat([this._tag,hash]),key,this._hashType,this._signType);return enc?sig.toString(enc):sig};function Verify(algorithm){stream.Writable.call(this);var data=algos[algorithm];if(!data){throw new Error("Unknown message digest")}this._hash=createHash(data.hash);this._tag=data.id;this._signType=data.sign}inherits(Verify,stream.Writable);Verify.prototype._write=function _write(data,_,done){this._hash.update(data);done()};Verify.prototype.update=function update(data,enc){if(typeof data==="string"){data=new Buffer(data,enc)}this._hash.update(data);return this};Verify.prototype.verify=function verifyMethod(key,sig,enc){if(typeof sig==="string"){sig=new Buffer(sig,enc)}this.end();var hash=this._hash.digest();return verify(sig,Buffer.concat([this._tag,hash]),key,this._signType)};function createSign(algorithm){return new Sign(algorithm)}function createVerify(algorithm){return new Verify(algorithm)}module.exports={Sign:createSign,Verify:createVerify,createSign:createSign,createVerify:createVerify}}.call(this,require("buffer").Buffer)},{"./algos":57,"./sign":60,"./verify":61,buffer:67,"create-hash":74,inherits:152,stream:271}],59:[function(require,module,exports){"use strict";exports["1.3.132.0.10"]="secp256k1";exports["1.3.132.0.33"]="p224";exports["1.2.840.10045.3.1.1"]="p192";exports["1.2.840.10045.3.1.7"]="p256";exports["1.3.132.0.34"]="p384";exports["1.3.132.0.35"]="p521"},{}],60:[function(require,module,exports){!function(Buffer){var createHmac=require("create-hmac");var crt=require("browserify-rsa");var curves=require("./curves");var elliptic=require("elliptic");var parseKeys=require("parse-asn1");var BN=require("bn.js");var EC=elliptic.ec;function sign(hash,key,hashType,signType){var priv=parseKeys(key);if(priv.curve){if(signType!=="ecdsa")throw new Error("wrong private key type");return ecSign(hash,priv)}else if(priv.type==="dsa"){if(signType!=="dsa"){throw new Error("wrong private key type")}return dsaSign(hash,priv,hashType)}else{if(signType!=="rsa")throw new Error("wrong private key type")}var len=priv.modulus.byteLength();var pad=[0,1];while(hash.length+pad.length+10){bits.ishrn(shift)}return bits}function bits2octets(bits,q){bits=bits2int(bits,q);bits=bits.mod(q);var out=new Buffer(bits.toArray());if(out.length=q){throw new Error("invalid sig")}}module.exports=verify}.call(this,require("buffer").Buffer)},{"./curves":59,"bn.js":35,buffer:67,elliptic:93,"parse-asn1":191}],62:[function(require,module,exports){!function(process,Buffer){var msg=require("pako/lib/zlib/messages");var zstream=require("pako/lib/zlib/zstream");var zlib_deflate=require("pako/lib/zlib/deflate.js");var zlib_inflate=require("pako/lib/zlib/inflate.js");var constants=require("pako/lib/zlib/constants");for(var key in constants){exports[key]=constants[key]}exports.NONE=0;exports.DEFLATE=1;exports.INFLATE=2;exports.GZIP=3;exports.GUNZIP=4;exports.DEFLATERAW=5;exports.INFLATERAW=6;exports.UNZIP=7;function Zlib(mode){if(modeexports.UNZIP)throw new TypeError("Bad argument");this.mode=mode;this.init_done=false;this.write_in_progress=false;this.pending_close=false;this.windowBits=0;this.level=0;this.memLevel=0;this.strategy=0;this.dictionary=null}Zlib.prototype.init=function(windowBits,level,memLevel,strategy,dictionary){this.windowBits=windowBits;this.level=level;this.memLevel=memLevel;this.strategy=strategy;if(this.mode===exports.GZIP||this.mode===exports.GUNZIP)this.windowBits+=16;if(this.mode===exports.UNZIP)this.windowBits+=32;if(this.mode===exports.DEFLATERAW||this.mode===exports.INFLATERAW)this.windowBits=-this.windowBits;this.strm=new zstream;switch(this.mode){case exports.DEFLATE:case exports.GZIP:case exports.DEFLATERAW:var status=zlib_deflate.deflateInit2(this.strm,this.level,exports.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy); +break;case exports.INFLATE:case exports.GUNZIP:case exports.INFLATERAW:case exports.UNZIP:var status=zlib_inflate.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}if(status!==exports.Z_OK){this._error(status);return}this.write_in_progress=false;this.init_done=true};Zlib.prototype.params=function(){throw new Error("deflateParams Not supported")};Zlib.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===exports.NONE)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")};Zlib.prototype.write=function(flush,input,in_off,in_len,out,out_off,out_len){this._writeCheck();this.write_in_progress=true;var self=this;process.nextTick(function(){self.write_in_progress=false;var res=self._write(flush,input,in_off,in_len,out,out_off,out_len);self.callback(res[0],res[1]);if(self.pending_close)self.close()});return this};function bufferSet(data,offset){for(var i=0;iexports.Z_MAX_CHUNK){throw new Error("Invalid chunk size: "+opts.chunkSize)}}if(opts.windowBits){if(opts.windowBitsexports.Z_MAX_WINDOWBITS){throw new Error("Invalid windowBits: "+opts.windowBits)}}if(opts.level){if(opts.levelexports.Z_MAX_LEVEL){throw new Error("Invalid compression level: "+opts.level)}}if(opts.memLevel){if(opts.memLevelexports.Z_MAX_MEMLEVEL){throw new Error("Invalid memLevel: "+opts.memLevel)}}if(opts.strategy){if(opts.strategy!=exports.Z_FILTERED&&opts.strategy!=exports.Z_HUFFMAN_ONLY&&opts.strategy!=exports.Z_RLE&&opts.strategy!=exports.Z_FIXED&&opts.strategy!=exports.Z_DEFAULT_STRATEGY){throw new Error("Invalid strategy: "+opts.strategy)}}if(opts.dictionary){if(!Buffer.isBuffer(opts.dictionary)){throw new Error("Invalid dictionary: it should be a Buffer instance")}}this._binding=new binding.Zlib(mode);var self=this;this._hadError=false;this._binding.onerror=function(message,errno){self._binding=null;self._hadError=true;var error=new Error(message);error.errno=errno;error.code=exports.codes[errno];self.emit("error",error)};var level=exports.Z_DEFAULT_COMPRESSION;if(typeof opts.level==="number")level=opts.level;var strategy=exports.Z_DEFAULT_STRATEGY;if(typeof opts.strategy==="number")strategy=opts.strategy;this._binding.init(opts.windowBits||exports.Z_DEFAULT_WINDOWBITS,level,opts.memLevel||exports.Z_DEFAULT_MEMLEVEL,strategy,opts.dictionary);this._buffer=new Buffer(this._chunkSize);this._offset=0;this._closed=false;this._level=level;this._strategy=strategy;this.once("end",this.close)}util.inherits(Zlib,Transform);Zlib.prototype.params=function(level,strategy,callback){if(levelexports.Z_MAX_LEVEL){throw new RangeError("Invalid compression level: "+level)}if(strategy!=exports.Z_FILTERED&&strategy!=exports.Z_HUFFMAN_ONLY&&strategy!=exports.Z_RLE&&strategy!=exports.Z_FIXED&&strategy!=exports.Z_DEFAULT_STRATEGY){throw new TypeError("Invalid strategy: "+strategy)}if(this._level!==level||this._strategy!==strategy){var self=this;this.flush(binding.Z_SYNC_FLUSH,function(){self._binding.params(level,strategy);if(!self._hadError){self._level=level;self._strategy=strategy;if(callback)callback()}})}else{process.nextTick(callback)}};Zlib.prototype.reset=function(){return this._binding.reset()};Zlib.prototype._flush=function(callback){this._transform(new Buffer(0),"",callback)};Zlib.prototype.flush=function(kind,callback){var ws=this._writableState;if(typeof kind==="function"||kind===void 0&&!callback){callback=kind;kind=binding.Z_FULL_FLUSH}if(ws.ended){if(callback)process.nextTick(callback)}else if(ws.ending){if(callback)this.once("end",callback)}else if(ws.needDrain){var self=this;this.once("drain",function(){self.flush(callback)})}else{this._flushFlag=kind;this.write(new Buffer(0),"",callback)}};Zlib.prototype.close=function(callback){if(callback)process.nextTick(callback);if(this._closed)return;this._closed=true;this._binding.close();var self=this;process.nextTick(function(){self.emit("close")})};Zlib.prototype._transform=function(chunk,encoding,cb){var flushFlag;var ws=this._writableState;var ending=ws.ending||ws.ended;var last=ending&&(!chunk||ws.length===chunk.length);if(!chunk===null&&!Buffer.isBuffer(chunk))return cb(new Error("invalid input"));if(last)flushFlag=binding.Z_FINISH;else{flushFlag=this._flushFlag;if(chunk.length>=ws.length){this._flushFlag=this._opts.flush||binding.Z_NO_FLUSH}}var self=this;this._processChunk(chunk,flushFlag,cb)};Zlib.prototype._processChunk=function(chunk,flushFlag,cb){var availInBefore=chunk&&chunk.length;var availOutBefore=this._chunkSize-this._offset;var inOff=0;var self=this;var async=typeof cb==="function";if(!async){var buffers=[];var nread=0;var error;this.on("error",function(er){error=er});do{var res=this._binding.writeSync(flushFlag,chunk,inOff,availInBefore,this._buffer,this._offset,availOutBefore)}while(!this._hadError&&callback(res[0],res[1]));if(this._hadError){throw error}var buf=Buffer.concat(buffers,nread);this.close();return buf}var req=this._binding.write(flushFlag,chunk,inOff,availInBefore,this._buffer,this._offset,availOutBefore);req.buffer=chunk;req.callback=callback;function callback(availInAfter,availOutAfter){if(self._hadError)return;var have=availOutBefore-availOutAfter;assert(have>=0,"have should not go down");if(have>0){var out=self._buffer.slice(self._offset,self._offset+have);self._offset+=have;if(async){self.push(out)}else{buffers.push(out);nread+=out.length}}if(availOutAfter===0||self._offset>=self._chunkSize){availOutBefore=self._chunkSize;self._offset=0;self._buffer=new Buffer(self._chunkSize)}if(availOutAfter===0){inOff+=availInBefore-availInAfter;availInBefore=availInAfter;if(!async)return true;var newReq=self._binding.write(flushFlag,chunk,inOff,availInBefore,self._buffer,self._offset,self._chunkSize);newReq.callback=callback;newReq.buffer=chunk;return}if(!async)return false;cb()}};util.inherits(Deflate,Zlib);util.inherits(Inflate,Zlib);util.inherits(Gzip,Zlib);util.inherits(Gunzip,Zlib);util.inherits(DeflateRaw,Zlib);util.inherits(InflateRaw,Zlib);util.inherits(Unzip,Zlib)}.call(this,require("_process"),require("buffer").Buffer)},{"./binding":62,_process:198,_stream_transform:224,assert:29,buffer:67,util:293}],64:[function(require,module,exports){arguments[4][37][0].apply(exports,arguments)},{dup:37}],65:[function(require,module,exports){!function(global){"use strict";var buffer=require("buffer");var Buffer=buffer.Buffer;var SlowBuffer=buffer.SlowBuffer;var MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function alloc(size,fill,encoding){if(typeof Buffer.alloc==="function"){return Buffer.alloc(size,fill,encoding)}if(typeof encoding==="number"){throw new TypeError("encoding must not be number")}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>MAX_LEN){throw new RangeError("size is too large")}var enc=encoding;var _fill=fill;if(_fill===undefined){enc=undefined;_fill=0}var buf=new Buffer(size);if(typeof _fill==="string"){var fillBuf=new Buffer(_fill,enc);var flen=fillBuf.length;var i=-1;while(++iMAX_LEN){throw new RangeError("size is too large")}return new Buffer(size)};exports.from=function from(value,encodingOrOffset,length){if(typeof Buffer.from==="function"&&(!global.Uint8Array||Uint8Array.from!==Buffer.from)){return Buffer.from(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof value==="string"){return new Buffer(value,encodingOrOffset)}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(arguments.length===1){return new Buffer(value)}if(typeof offset==="undefined"){offset=0}var len=length;if(typeof len==="undefined"){len=value.byteLength-offset}if(offset>=value.byteLength){throw new RangeError("'offset' is out of bounds")}if(len>value.byteLength-offset){throw new RangeError("'length' is out of bounds")}return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);value.copy(out,0,0,value.length);return out}if(value){if(Array.isArray(value)||typeof ArrayBuffer!=="undefined"&&value.buffer instanceof ArrayBuffer||"length"in value){return new Buffer(value)}if(value.type==="Buffer"&&Array.isArray(value.data)){return new Buffer(value.data)}}throw new TypeError("First argument must be a string, Buffer, "+"ArrayBuffer, Array, or array-like object.")};exports.allocUnsafeSlow=function allocUnsafeSlow(size){if(typeof Buffer.allocUnsafeSlow==="function"){return Buffer.allocUnsafeSlow(size)}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>=MAX_LEN){throw new RangeError("size is too large")}return new SlowBuffer(size)}}.call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{buffer:67}],66:[function(require,module,exports){!function(Buffer){module.exports=function xor(a,b){var length=Math.min(a.length,b.length);var buffer=new Buffer(length);for(var i=0;i=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end)) +}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}.call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":33,ieee754:150,isarray:158}],68:[function(require,module,exports){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],69:[function(require,module,exports){function Caseless(dict){this.dict=dict||{}}Caseless.prototype.set=function(name,value,clobber){if(typeof name==="object"){for(var i in name){this.set(i,name[i],value)}}else{if(typeof clobber==="undefined")clobber=true;var has=this.has(name);if(!clobber&&has)this.dict[has]=this.dict[has]+","+value;else this.dict[has||name]=value;return has}};Caseless.prototype.has=function(name){var keys=Object.keys(this.dict),name=name.toLowerCase();for(var i=0;i>5]|=128<>>9<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878; +for(var i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function bit_rol(num,cnt){return num<>>32-cnt}module.exports=function md5(buf){return helpers.hash(buf,core_md5,16)}},{"./helpers":75}],77:[function(require,module,exports){!function(Buffer){"use strict";var createHash=require("create-hash/browser");var inherits=require("inherits");var Transform=require("stream").Transform;var ZEROS=new Buffer(128);ZEROS.fill(0);function Hmac(alg,key){Transform.call(this);alg=alg.toLowerCase();if(typeof key==="string"){key=new Buffer(key)}var blocksize=alg==="sha512"||alg==="sha384"?128:64;this._alg=alg;this._key=key;if(key.length>blocksize){key=createHash(alg).update(key).digest()}else if(key.length0;count--){inputOff+=this._buffer(data,inputOff);outputOff+=this._flushBuffer(out,outputOff)}inputOff+=this._buffer(data,inputOff);return out};Cipher.prototype.final=function final(buffer){var first;if(buffer)first=this.update(buffer);var last;if(this.type==="encrypt")last=this._finalEncrypt();else last=this._finalDecrypt();if(first)return first.concat(last);else return last};Cipher.prototype._pad=function _pad(buffer,off){if(off===0)return false;while(off>>1];kL=utils.r28shl(kL,shift);kR=utils.r28shl(kR,shift);utils.pc2(kL,kR,state.keys,i)}};DES.prototype._update=function _update(inp,inOff,out,outOff){var state=this._desState;var l=utils.readUInt32BE(inp,inOff);var r=utils.readUInt32BE(inp,inOff+4);utils.ip(l,r,state.tmp,0);l=state.tmp[0];r=state.tmp[1];if(this.type==="encrypt")this._encrypt(state,l,r,state.tmp,0);else this._decrypt(state,l,r,state.tmp,0);l=state.tmp[0];r=state.tmp[1];utils.writeUInt32BE(out,l,outOff);utils.writeUInt32BE(out,r,outOff+4)};DES.prototype._pad=function _pad(buffer,off){var value=buffer.length-off;for(var i=off;i>>0;l=t}utils.rip(r,l,out,off)};DES.prototype._decrypt=function _decrypt(state,lStart,rStart,out,off){var l=rStart;var r=lStart;for(var i=state.keys.length-2;i>=0;i-=2){var keyL=state.keys[i];var keyR=state.keys[i+1];utils.expand(l,state.tmp,0);keyL^=state.tmp[0];keyR^=state.tmp[1];var s=utils.substitute(keyL,keyR);var f=utils.permute(s);var t=l;l=(r^f)>>>0;r=t}utils.rip(l,r,out,off)}},{"../des":80,inherits:152,"minimalistic-assert":175}],84:[function(require,module,exports){"use strict";var assert=require("minimalistic-assert");var inherits=require("inherits");var des=require("../des");var Cipher=des.Cipher;var DES=des.DES;function EDEState(type,key){assert.equal(key.length,24,"Invalid key length");var k1=key.slice(0,8);var k2=key.slice(8,16);var k3=key.slice(16,24);if(type==="encrypt"){this.ciphers=[DES.create({type:"encrypt",key:k1}),DES.create({type:"decrypt",key:k2}),DES.create({type:"encrypt",key:k3})]}else{this.ciphers=[DES.create({type:"decrypt",key:k3}),DES.create({type:"encrypt",key:k2}),DES.create({type:"decrypt",key:k1})]}}function EDE(options){Cipher.call(this,options);var state=new EDEState(this.type,this.options.key);this._edeState=state}inherits(EDE,Cipher);module.exports=EDE;EDE.create=function create(options){return new EDE(options)};EDE.prototype._update=function _update(inp,inOff,out,outOff){var state=this._edeState;state.ciphers[0]._update(inp,inOff,out,outOff);state.ciphers[1]._update(out,outOff,out,outOff);state.ciphers[2]._update(out,outOff,out,outOff)};EDE.prototype._pad=DES.prototype._pad;EDE.prototype._unpad=DES.prototype._unpad},{"../des":80,inherits:152,"minimalistic-assert":175}],85:[function(require,module,exports){"use strict";exports.readUInt32BE=function readUInt32BE(bytes,off){var res=bytes[0+off]<<24|bytes[1+off]<<16|bytes[2+off]<<8|bytes[3+off];return res>>>0};exports.writeUInt32BE=function writeUInt32BE(bytes,value,off){bytes[0+off]=value>>>24;bytes[1+off]=value>>>16&255;bytes[2+off]=value>>>8&255;bytes[3+off]=value&255};exports.ip=function ip(inL,inR,out,off){var outL=0;var outR=0;for(var i=6;i>=0;i-=2){for(var j=0;j<=24;j+=8){outL<<=1;outL|=inR>>>j+i&1}for(var j=0;j<=24;j+=8){outL<<=1;outL|=inL>>>j+i&1}}for(var i=6;i>=0;i-=2){for(var j=1;j<=25;j+=8){outR<<=1;outR|=inR>>>j+i&1}for(var j=1;j<=25;j+=8){outR<<=1;outR|=inL>>>j+i&1}}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.rip=function rip(inL,inR,out,off){var outL=0;var outR=0;for(var i=0;i<4;i++){for(var j=24;j>=0;j-=8){outL<<=1;outL|=inR>>>j+i&1;outL<<=1;outL|=inL>>>j+i&1}}for(var i=4;i<8;i++){for(var j=24;j>=0;j-=8){outR<<=1;outR|=inR>>>j+i&1;outR<<=1;outR|=inL>>>j+i&1}}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.pc1=function pc1(inL,inR,out,off){var outL=0;var outR=0;for(var i=7;i>=5;i--){for(var j=0;j<=24;j+=8){outL<<=1;outL|=inR>>j+i&1}for(var j=0;j<=24;j+=8){outL<<=1;outL|=inL>>j+i&1}}for(var j=0;j<=24;j+=8){outL<<=1;outL|=inR>>j+i&1}for(var i=1;i<=3;i++){for(var j=0;j<=24;j+=8){outR<<=1;outR|=inR>>j+i&1}for(var j=0;j<=24;j+=8){outR<<=1;outR|=inL>>j+i&1}}for(var j=0;j<=24;j+=8){outR<<=1;outR|=inL>>j+i&1}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.r28shl=function r28shl(num,shift){return num<>>28-shift};var pc2table=[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];exports.pc2=function pc2(inL,inR,out,off){var outL=0;var outR=0;var len=pc2table.length>>>1;for(var i=0;i>>pc2table[i]&1}for(var i=len;i>>pc2table[i]&1}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.expand=function expand(r,out,off){var outL=0;var outR=0;outL=(r&1)<<5|r>>>27;for(var i=23;i>=15;i-=4){outL<<=6;outL|=r>>>i&63}for(var i=11;i>=3;i-=4){outR|=r>>>i&63;outR<<=6}outR|=(r&31)<<1|r>>>31;out[off+0]=outL>>>0;out[off+1]=outR>>>0};var sTable=[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];exports.substitute=function substitute(inL,inR){var out=0;for(var i=0;i<4;i++){var b=inL>>>18-i*6&63;var sb=sTable[i*64+b];out<<=4;out|=sb}for(var i=0;i<4;i++){var b=inR>>>18-i*6&63;var sb=sTable[4*64+i*64+b];out<<=4;out|=sb}return out>>>0};var permuteTable=[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];exports.permute=function permute(num){var out=0;for(var i=0;i>>permuteTable[i]&1}return out>>>0};exports.padSplit=function padSplit(num,size,group){var str=num.toString(2);while(str.lengthbits){num.ishrn(1)}if(num.isEven()){num.iadd(ONE)}if(!num.testn(1)){num.iadd(TWO)}if(!gen.cmp(TWO)){while(num.mod(TWENTYFOUR).cmp(ELEVEN)){num.iadd(FOUR)}}else if(!gen.cmp(FIVE)){while(num.mod(TEN).cmp(THREE)){num.iadd(FOUR)}}n2=num.shrn(1);if(simpleSieve(n2)&&simpleSieve(num)&&fermatTest(n2)&&fermatTest(num)&&millerRabin.test(n2)&&millerRabin.test(num)){return num}}}},{"bn.js":35,"miller-rabin":171,randombytes:214}],89:[function(require,module,exports){module.exports={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"}} +},{}],90:[function(require,module,exports){!function(Buffer){var crypto=require("crypto");var BigInteger=require("jsbn").BigInteger;var ECPointFp=require("./lib/ec.js").ECPointFp;exports.ECCurves=require("./lib/sec.js");function unstupid(hex,len){return hex.length>=len?hex:unstupid("0"+hex,len)}exports.ECKey=function(curve,key,isPublic){var priv;var c=curve();var n=c.getN();var bytes=Math.floor(n.bitLength()/8);if(key){if(isPublic){var curve=c.getCurve();this.P=curve.decodePointHex(key.toString("hex"))}else{if(key.length!=bytes)return false;priv=new BigInteger(key.toString("hex"),16)}}else{var n1=n.subtract(BigInteger.ONE);var r=new BigInteger(crypto.randomBytes(n.bitLength()));priv=r.mod(n1).add(BigInteger.ONE);this.P=c.getG().multiply(priv)}if(this.P){this.PublicKey=new Buffer(c.getCurve().encodeCompressedPointHex(this.P),"hex")}if(priv){this.PrivateKey=new Buffer(unstupid(priv.toString(16),bytes*2),"hex");this.deriveSharedSecret=function(key){if(!key||!key.P)return false;var S=key.P.multiply(priv);return new Buffer(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex")}}}}.call(this,require("buffer").Buffer)},{"./lib/ec.js":91,"./lib/sec.js":92,buffer:67,crypto:78,jsbn:166}],91:[function(require,module,exports){var BigInteger=require("jsbn").BigInteger;var Barrett=BigInteger.prototype.Barrett;function ECFieldElementFp(q,x){this.x=x;this.q=q}function feFpEquals(other){if(other==this)return true;return this.q.equals(other.q)&&this.x.equals(other.x)}function feFpToBigInteger(){return this.x}function feFpNegate(){return new ECFieldElementFp(this.q,this.x.negate().mod(this.q))}function feFpAdd(b){return new ECFieldElementFp(this.q,this.x.add(b.toBigInteger()).mod(this.q))}function feFpSubtract(b){return new ECFieldElementFp(this.q,this.x.subtract(b.toBigInteger()).mod(this.q))}function feFpMultiply(b){return new ECFieldElementFp(this.q,this.x.multiply(b.toBigInteger()).mod(this.q))}function feFpSquare(){return new ECFieldElementFp(this.q,this.x.square().mod(this.q))}function feFpDivide(b){return new ECFieldElementFp(this.q,this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q))}ECFieldElementFp.prototype.equals=feFpEquals;ECFieldElementFp.prototype.toBigInteger=feFpToBigInteger;ECFieldElementFp.prototype.negate=feFpNegate;ECFieldElementFp.prototype.add=feFpAdd;ECFieldElementFp.prototype.subtract=feFpSubtract;ECFieldElementFp.prototype.multiply=feFpMultiply;ECFieldElementFp.prototype.square=feFpSquare;ECFieldElementFp.prototype.divide=feFpDivide;function ECPointFp(curve,x,y,z){this.curve=curve;this.x=x;this.y=y;if(z==null){this.z=BigInteger.ONE}else{this.z=z}this.zinv=null}function pointFpGetX(){if(this.zinv==null){this.zinv=this.z.modInverse(this.curve.q)}var r=this.x.toBigInteger().multiply(this.zinv);this.curve.reduce(r);return this.curve.fromBigInteger(r)}function pointFpGetY(){if(this.zinv==null){this.zinv=this.z.modInverse(this.curve.q)}var r=this.y.toBigInteger().multiply(this.zinv);this.curve.reduce(r);return this.curve.fromBigInteger(r)}function pointFpEquals(other){if(other==this)return true;if(this.isInfinity())return other.isInfinity();if(other.isInfinity())return this.isInfinity();var u,v;u=other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q);if(!u.equals(BigInteger.ZERO))return false;v=other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q);return v.equals(BigInteger.ZERO)}function pointFpIsInfinity(){if(this.x==null&&this.y==null)return true;return this.z.equals(BigInteger.ZERO)&&!this.y.toBigInteger().equals(BigInteger.ZERO)}function pointFpNegate(){return new ECPointFp(this.curve,this.x,this.y.negate(),this.z)}function pointFpAdd(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var u=b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q);var v=b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q);if(BigInteger.ZERO.equals(v)){if(BigInteger.ZERO.equals(u)){return this.twice()}return this.curve.getInfinity()}var THREE=new BigInteger("3");var x1=this.x.toBigInteger();var y1=this.y.toBigInteger();var x2=b.x.toBigInteger();var y2=b.y.toBigInteger();var v2=v.square();var v3=v2.multiply(v);var x1v2=x1.multiply(v2);var zu2=u.square().multiply(this.z);var x3=zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q);var y3=x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q);var z3=v3.multiply(this.z).multiply(b.z).mod(this.curve.q);return new ECPointFp(this.curve,this.curve.fromBigInteger(x3),this.curve.fromBigInteger(y3),z3)}function pointFpTwice(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var THREE=new BigInteger("3");var x1=this.x.toBigInteger();var y1=this.y.toBigInteger();var y1z1=y1.multiply(this.z);var y1sqz1=y1z1.multiply(y1).mod(this.curve.q);var a=this.curve.a.toBigInteger();var w=x1.square().multiply(THREE);if(!BigInteger.ZERO.equals(a)){w=w.add(this.z.square().multiply(a))}w=w.mod(this.curve.q);var x3=w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q);var y3=w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q);var z3=y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q);return new ECPointFp(this.curve,this.curve.fromBigInteger(x3),this.curve.fromBigInteger(y3),z3)}function pointFpMultiply(k){if(this.isInfinity())return this;if(k.signum()==0)return this.curve.getInfinity();var e=k;var h=e.multiply(new BigInteger("3"));var neg=this.negate();var R=this;var i;for(i=h.bitLength()-2;i>0;--i){R=R.twice();var hBit=h.testBit(i);var eBit=e.testBit(i);if(hBit!=eBit){R=R.add(hBit?this:neg)}}return R}function pointFpMultiplyTwo(j,x,k){var i;if(j.bitLength()>k.bitLength())i=j.bitLength()-1;else i=k.bitLength()-1;var R=this.curve.getInfinity();var both=this.add(x);while(i>=0){R=R.twice();if(j.testBit(i)){if(k.testBit(i)){R=R.add(both)}else{R=R.add(this)}}else{if(k.testBit(i)){R=R.add(x)}}--i}return R}ECPointFp.prototype.getX=pointFpGetX;ECPointFp.prototype.getY=pointFpGetY;ECPointFp.prototype.equals=pointFpEquals;ECPointFp.prototype.isInfinity=pointFpIsInfinity;ECPointFp.prototype.negate=pointFpNegate;ECPointFp.prototype.add=pointFpAdd;ECPointFp.prototype.twice=pointFpTwice;ECPointFp.prototype.multiply=pointFpMultiply;ECPointFp.prototype.multiplyTwo=pointFpMultiplyTwo;function ECCurveFp(q,a,b){this.q=q;this.a=this.fromBigInteger(a);this.b=this.fromBigInteger(b);this.infinity=new ECPointFp(this,null,null);this.reducer=new Barrett(this.q)}function curveFpGetQ(){return this.q}function curveFpGetA(){return this.a}function curveFpGetB(){return this.b}function curveFpEquals(other){if(other==this)return true;return this.q.equals(other.q)&&this.a.equals(other.a)&&this.b.equals(other.b)}function curveFpGetInfinity(){return this.infinity}function curveFpFromBigInteger(x){return new ECFieldElementFp(this.q,x)}function curveReduce(x){this.reducer.reduce(x)}function curveFpDecodePointHex(s){switch(parseInt(s.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var len=(s.length-2)/2;var xHex=s.substr(2,len);var yHex=s.substr(len+2,len);return new ECPointFp(this,this.fromBigInteger(new BigInteger(xHex,16)),this.fromBigInteger(new BigInteger(yHex,16)));default:return null}}function curveFpEncodePointHex(p){if(p.isInfinity())return"00";var xHex=p.getX().toBigInteger().toString(16);var yHex=p.getY().toBigInteger().toString(16);var oLen=this.getQ().toString(16).length;if(oLen%2!=0)oLen++;while(xHex.length128){var firstWord=this.q.shiftRight(bitLength-64);if(firstWord.intValue()==-1){this.r=BigInteger.ONE.shiftLeft(bitLength).subtract(this.q)}}return this.r};ECFieldElementFp.prototype.modMult=function(x1,x2){return this.modReduce(x1.multiply(x2))};ECFieldElementFp.prototype.modReduce=function(x){if(this.getR()!=null){var qLen=q.bitLength();while(x.bitLength()>qLen+1){var u=x.shiftRight(qLen);var v=x.subtract(u.shiftLeft(qLen));if(!this.getR().equals(BigInteger.ONE)){u=u.multiply(this.getR())}x=u.add(v)}while(x.compareTo(q)>=0){x=x.subtract(q)}}else{x=x.mod(q)}return x};ECFieldElementFp.prototype.sqrt=function(){if(!this.q.testBit(0))throw"unsupported";if(this.q.testBit(1)){var z=new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q));return z.square().equals(this)?z:null}var qMinusOne=this.q.subtract(BigInteger.ONE);var legendreExponent=qMinusOne.shiftRight(1);if(!this.x.modPow(legendreExponent,this.q).equals(BigInteger.ONE)){return null}var u=qMinusOne.shiftRight(2);var k=u.shiftLeft(1).add(BigInteger.ONE);var Q=this.x;var fourQ=modDouble(modDouble(Q));var U,V;do{var P;do{P=new BigInteger(this.q.bitLength(),new SecureRandom)}while(P.compareTo(this.q)>=0||!P.multiply(P).subtract(fourQ).modPow(legendreExponent,this.q).equals(qMinusOne));var result=this.lucasSequence(P,Q,k);U=result[0];V=result[1];if(this.modMult(V,V).equals(fourQ)){if(V.testBit(0)){V=V.add(q)}V=V.shiftRight(1);return new ECFieldElementFp(q,V)}}while(U.equals(BigInteger.ONE)||U.equals(qMinusOne));return null};ECFieldElementFp.prototype.lucasSequence=function(P,Q,k){var n=k.bitLength();var s=k.getLowestSetBit();var Uh=BigInteger.ONE;var Vl=BigInteger.TWO;var Vh=P;var Ql=BigInteger.ONE;var Qh=BigInteger.ONE;for(var j=n-1;j>=s+1;--j){Ql=this.modMult(Ql,Qh);if(k.testBit(j)){Qh=this.modMult(Ql,Q);Uh=this.modMult(Uh,Vh);Vl=this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));Vh=this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1)))}else{Qh=Ql;Uh=this.modReduce(Uh.multiply(Vl).subtract(Ql));Vh=this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));Vl=this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)))}}Ql=this.modMult(Ql,Qh);Qh=this.modMult(Ql,Q);Uh=this.modReduce(Uh.multiply(Vl).subtract(Ql));Vl=this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));Ql=this.modMult(Ql,Qh);for(var j=1;j<=s;++j){Uh=this.modMult(Uh,Vl);Vl=this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));Ql=this.modMult(Ql,Ql)}return[Uh,Vl]};var exports={ECCurveFp:ECCurveFp,ECPointFp:ECPointFp,ECFieldElementFp:ECFieldElementFp};module.exports=exports},{jsbn:166}],92:[function(require,module,exports){var BigInteger=require("jsbn").BigInteger;var ECCurveFp=require("./ec.js").ECCurveFp;function X9ECParameters(curve,g,n,h){this.curve=curve;this.g=g;this.n=n;this.h=h}function x9getCurve(){return this.curve}function x9getG(){return this.g}function x9getN(){return this.n}function x9getH(){return this.h}X9ECParameters.prototype.getCurve=x9getCurve;X9ECParameters.prototype.getG=x9getG;X9ECParameters.prototype.getN=x9getN;X9ECParameters.prototype.getH=x9getH;function fromHex(s){return new BigInteger(s,16)}function secp128r1(){var p=fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");var a=fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC");var b=fromHex("E87579C11079F43DD824993C2CEE5ED3");var n=fromHex("FFFFFFFE0000000075A30D1B9038A115");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"161FF7528B899B2D0C28607CA52C5B86"+"CF5AC8395BAFEB13C02DA292DDED7A83");return new X9ECParameters(curve,G,n,h)}function secp160k1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");var a=BigInteger.ZERO;var b=fromHex("7");var n=fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"+"938CF935318FDCED6BC28286531733C3F03C4FEE");return new X9ECParameters(curve,G,n,h)}function secp160r1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF");var a=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC");var b=fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45");var n=fromHex("0100000000000000000001F4C8F927AED3CA752257");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"4A96B5688EF573284664698968C38BB913CBFC82"+"23A628553168947D59DCC912042351377AC5FB32");return new X9ECParameters(curve,G,n,h)}function secp192k1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37");var a=BigInteger.ZERO;var b=fromHex("3");var n=fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"+"9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");return new X9ECParameters(curve,G,n,h)}function secp192r1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF");var a=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC");var b=fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1");var n=fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"+"07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");return new X9ECParameters(curve,G,n,h)}function secp224r1(){var p=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");var a=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE");var b=fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4");var n=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"+"BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");return new X9ECParameters(curve,G,n,h)}function secp256r1(){var p=fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");var a=fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC");var b=fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B");var n=fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551");var h=BigInteger.ONE;var curve=new ECCurveFp(p,a,b);var G=curve.decodePointHex("04"+"6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"+"4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");return new X9ECParameters(curve,G,n,h)}function getSECCurveByName(name){if(name=="secp128r1")return secp128r1();if(name=="secp160k1")return secp160k1();if(name=="secp160r1")return secp160r1();if(name=="secp192k1")return secp192k1();if(name=="secp192r1")return secp192r1();if(name=="secp224r1")return secp224r1();if(name=="secp256r1")return secp256r1();return null}module.exports={secp128r1:secp128r1,secp160k1:secp160k1,secp160r1:secp160r1,secp192k1:secp192k1,secp192r1:secp192r1,secp224r1:secp224r1,secp256r1:secp256r1}},{"./ec.js":91,jsbn:166}],93:[function(require,module,exports){"use strict";var elliptic=exports;elliptic.version=require("../package.json").version;elliptic.utils=require("./elliptic/utils");elliptic.rand=require("brorand");elliptic.hmacDRBG=require("./elliptic/hmac-drbg");elliptic.curve=require("./elliptic/curve");elliptic.curves=require("./elliptic/curves");elliptic.ec=require("./elliptic/ec");elliptic.eddsa=require("./elliptic/eddsa")},{"../package.json":109,"./elliptic/curve":96,"./elliptic/curves":99,"./elliptic/ec":100,"./elliptic/eddsa":103,"./elliptic/hmac-drbg":106,"./elliptic/utils":108,brorand:36}],94:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var getNAF=utils.getNAF;var getJSF=utils.getJSF;var assert=utils.assert;function BaseCurve(type,conf){this.type=type;this.p=new BN(conf.p,16);this.red=conf.prime?BN.red(conf.prime):BN.mont(this.p);this.zero=new BN(0).toRed(this.red);this.one=new BN(1).toRed(this.red);this.two=new BN(2).toRed(this.red);this.n=conf.n&&new BN(conf.n,16);this.g=conf.g&&this.pointFromJSON(conf.g,conf.gRed);this._wnafT1=new Array(4);this._wnafT2=new Array(4);this._wnafT3=new Array(4);this._wnafT4=new Array(4);var adjustCount=this.n&&this.p.div(this.n);if(!adjustCount||adjustCount.cmpn(100)>0){this.redN=null}else{this._maxwellTrick=true;this.redN=this.n.toRed(this.red)}}module.exports=BaseCurve;BaseCurve.prototype.point=function point(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function _fixedNafMul(p,k){assert(p.precomputed);var doubles=p._getDoubles();var naf=getNAF(k,1);var I=(1<=j;k--)nafW=(nafW<<1)+naf[k];repr.push(nafW)}var a=this.jpoint(null,null,null);var b=this.jpoint(null,null,null);for(var i=I;i>0;i--){for(var j=0;j=0;i--){for(var k=0;i>=0&&naf[i]===0;i--)k++;if(i>=0)k++;acc=acc.dblp(k);if(i<0)break;var z=naf[i];assert(z!==0);if(p.type==="affine"){if(z>0)acc=acc.mixedAdd(wnd[z-1>>1]);else acc=acc.mixedAdd(wnd[-z-1>>1].neg())}else{if(z>0)acc=acc.add(wnd[z-1>>1]);else acc=acc.add(wnd[-z-1>>1].neg())}}return p.type==="affine"?acc.toP():acc};BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(defW,points,coeffs,len,jacobianResult){var wndWidth=this._wnafT1;var wnd=this._wnafT2;var naf=this._wnafT3;var max=0;for(var i=0;i=1;i-=2){var a=i-1;var b=i;if(wndWidth[a]!==1||wndWidth[b]!==1){naf[a]=getNAF(coeffs[a],wndWidth[a]);naf[b]=getNAF(coeffs[b],wndWidth[b]);max=Math.max(naf[a].length,max);max=Math.max(naf[b].length,max);continue}var comb=[points[a],null,null,points[b]];if(points[a].y.cmp(points[b].y)===0){comb[1]=points[a].add(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}else if(points[a].y.cmp(points[b].y.redNeg())===0){comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].add(points[b].neg())}else{comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}var index=[-3,-1,-5,-7,0,7,5,1,3];var jsf=getJSF(coeffs[a],coeffs[b]);max=Math.max(jsf[0].length,max);naf[a]=new Array(max);naf[b]=new Array(max);for(var j=0;j=0;i--){var k=0;while(i>=0){var zero=true;for(var j=0;j=0)k++;acc=acc.dblp(k);if(i<0)break;for(var j=0;j0)p=wnd[j][z-1>>1];else if(z<0)p=wnd[j][-z-1>>1].neg();if(p.type==="affine")acc=acc.mixedAdd(p);else acc=acc.add(p)}}for(var i=0;i=Math.ceil((k.bitLength()+1)/doubles.step)};BasePoint.prototype._getDoubles=function _getDoubles(step,power){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var doubles=[this];var acc=this;for(var i=0;i";return""};Point.prototype.isInfinity=function isInfinity(){return this.x.cmpn(0)===0&&this.y.cmp(this.z)===0};Point.prototype._extDbl=function _extDbl(){var a=this.x.redSqr();var b=this.y.redSqr();var c=this.z.redSqr();c=c.redIAdd(c);var d=this.curve._mulA(a);var e=this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);var g=d.redAdd(b);var f=g.redSub(c);var h=d.redSub(b);var nx=e.redMul(f);var ny=g.redMul(h);var nt=e.redMul(h);var nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)};Point.prototype._projDbl=function _projDbl(){var b=this.x.redAdd(this.y).redSqr();var c=this.x.redSqr();var d=this.y.redSqr();var nx;var ny;var nz;if(this.curve.twisted){var e=this.curve._mulA(c);var f=e.redAdd(d);if(this.zOne){nx=b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));ny=f.redMul(e.redSub(d));nz=f.redSqr().redSub(f).redSub(f)}else{var h=this.z.redSqr();var j=f.redSub(h).redISub(h);nx=b.redSub(c).redISub(d).redMul(j);ny=f.redMul(e.redSub(d));nz=f.redMul(j)}}else{var e=c.redAdd(d);var h=this.curve._mulC(this.c.redMul(this.z)).redSqr();var j=e.redSub(h).redSub(h);nx=this.curve._mulC(b.redISub(e)).redMul(j);ny=this.curve._mulC(e).redMul(c.redISub(d));nz=e.redMul(j)}return this.curve.point(nx,ny,nz)};Point.prototype.dbl=function dbl(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()};Point.prototype._extAdd=function _extAdd(p){var a=this.y.redSub(this.x).redMul(p.y.redSub(p.x));var b=this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));var c=this.t.redMul(this.curve.dd).redMul(p.t);var d=this.z.redMul(p.z.redAdd(p.z));var e=b.redSub(a);var f=d.redSub(c);var g=d.redAdd(c);var h=b.redAdd(a);var nx=e.redMul(f);var ny=g.redMul(h);var nt=e.redMul(h);var nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)};Point.prototype._projAdd=function _projAdd(p){var a=this.z.redMul(p.z);var b=a.redSqr();var c=this.x.redMul(p.x);var d=this.y.redMul(p.y);var e=this.curve.d.redMul(c).redMul(d);var f=b.redSub(e);var g=b.redAdd(e);var tmp=this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);var nx=a.redMul(f).redMul(tmp);var ny;var nz;if(this.curve.twisted){ny=a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));nz=f.redMul(g)}else{ny=a.redMul(g).redMul(d.redSub(c));nz=this.curve._mulC(f).redMul(g)}return this.curve.point(nx,ny,nz)};Point.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;if(this.curve.extended)return this._extAdd(p);else return this._projAdd(p)};Point.prototype.mul=function mul(k){if(this._hasDoubles(k))return this.curve._fixedNafMul(this,k);else return this.curve._wnafMul(this,k)};Point.prototype.mulAdd=function mulAdd(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,false)};Point.prototype.jmulAdd=function jmulAdd(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,true)};Point.prototype.normalize=function normalize(){if(this.zOne)return this;var zi=this.z.redInvm();this.x=this.x.redMul(zi);this.y=this.y.redMul(zi);if(this.t)this.t=this.t.redMul(zi);this.z=this.curve.one;this.zOne=true;return this};Point.prototype.neg=function neg(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()};Point.prototype.getY=function getY(){this.normalize();return this.y.fromRed()};Point.prototype.eq=function eq(other){return this===other||this.getX().cmp(other.getX())===0&&this.getY().cmp(other.getY())===0};Point.prototype.eqXToP=function eqXToP(x){var rx=x.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(rx)===0)return true;var xc=x.clone();var t=this.curve.redN.redMul(this.z);for(;;){xc.iadd(this.curve.n);if(xc.cmp(this.curve.p)>=0)return false;rx.redIAdd(t);if(this.x.cmp(rx)===0)return true}return false};Point.prototype.toP=Point.prototype.normalize;Point.prototype.mixedAdd=Point.prototype.add},{"../../elliptic":93,"../curve":96,"bn.js":35,inherits:152}],96:[function(require,module,exports){"use strict";var curve=exports;curve.base=require("./base");curve.short=require("./short");curve.mont=require("./mont");curve.edwards=require("./edwards")},{"./base":94,"./edwards":95,"./mont":97,"./short":98}],97:[function(require,module,exports){"use strict";var curve=require("../curve");var BN=require("bn.js");var inherits=require("inherits");var Base=curve.base;var elliptic=require("../../elliptic");var utils=elliptic.utils;function MontCurve(conf){Base.call(this,"mont",conf);this.a=new BN(conf.a,16).toRed(this.red);this.b=new BN(conf.b,16).toRed(this.red);this.i4=new BN(4).toRed(this.red).redInvm();this.two=new BN(2).toRed(this.red);this.a24=this.i4.redMul(this.a.redAdd(this.two))}inherits(MontCurve,Base);module.exports=MontCurve;MontCurve.prototype.validate=function validate(point){var x=point.normalize().x;var x2=x.redSqr();var rhs=x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);var y=rhs.redSqrt();return y.redSqr().cmp(rhs)===0};function Point(curve,x,z){Base.BasePoint.call(this,curve,"projective");if(x===null&&z===null){this.x=this.curve.one;this.z=this.curve.zero}else{this.x=new BN(x,16);this.z=new BN(z,16); +if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}inherits(Point,Base.BasePoint);MontCurve.prototype.decodePoint=function decodePoint(bytes,enc){return this.point(utils.toArray(bytes,enc),1)};MontCurve.prototype.point=function point(x,z){return new Point(this,x,z)};MontCurve.prototype.pointFromJSON=function pointFromJSON(obj){return Point.fromJSON(this,obj)};Point.prototype.precompute=function precompute(){};Point.prototype._encode=function _encode(){return this.getX().toArray("be",this.curve.p.byteLength())};Point.fromJSON=function fromJSON(curve,obj){return new Point(curve,obj[0],obj[1]||curve.one)};Point.prototype.inspect=function inspect(){if(this.isInfinity())return"";return""};Point.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0};Point.prototype.dbl=function dbl(){var a=this.x.redAdd(this.z);var aa=a.redSqr();var b=this.x.redSub(this.z);var bb=b.redSqr();var c=aa.redSub(bb);var nx=aa.redMul(bb);var nz=c.redMul(bb.redAdd(this.curve.a24.redMul(c)));return this.curve.point(nx,nz)};Point.prototype.add=function add(){throw new Error("Not supported on Montgomery curve")};Point.prototype.diffAdd=function diffAdd(p,diff){var a=this.x.redAdd(this.z);var b=this.x.redSub(this.z);var c=p.x.redAdd(p.z);var d=p.x.redSub(p.z);var da=d.redMul(a);var cb=c.redMul(b);var nx=diff.z.redMul(da.redAdd(cb).redSqr());var nz=diff.x.redMul(da.redISub(cb).redSqr());return this.curve.point(nx,nz)};Point.prototype.mul=function mul(k){var t=k.clone();var a=this;var b=this.curve.point(null,null);var c=this;for(var bits=[];t.cmpn(0)!==0;t.iushrn(1))bits.push(t.andln(1));for(var i=bits.length-1;i>=0;i--){if(bits[i]===0){a=a.diffAdd(b,c);b=b.dbl()}else{b=a.diffAdd(b,c);a=a.dbl()}}return b};Point.prototype.mulAdd=function mulAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.jumlAdd=function jumlAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.eq=function eq(other){return this.getX().cmp(other.getX())===0};Point.prototype.normalize=function normalize(){this.x=this.x.redMul(this.z.redInvm());this.z=this.curve.one;return this};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()}},{"../../elliptic":93,"../curve":96,"bn.js":35,inherits:152}],98:[function(require,module,exports){"use strict";var curve=require("../curve");var elliptic=require("../../elliptic");var BN=require("bn.js");var inherits=require("inherits");var Base=curve.base;var assert=elliptic.utils.assert;function ShortCurve(conf){Base.call(this,"short",conf);this.a=new BN(conf.a,16).toRed(this.red);this.b=new BN(conf.b,16).toRed(this.red);this.tinv=this.two.redInvm();this.zeroA=this.a.fromRed().cmpn(0)===0;this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0;this.endo=this._getEndomorphism(conf);this._endoWnafT1=new Array(4);this._endoWnafT2=new Array(4)}inherits(ShortCurve,Base);module.exports=ShortCurve;ShortCurve.prototype._getEndomorphism=function _getEndomorphism(conf){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var beta;var lambda;if(conf.beta){beta=new BN(conf.beta,16).toRed(this.red)}else{var betas=this._getEndoRoots(this.p);beta=betas[0].cmp(betas[1])<0?betas[0]:betas[1];beta=beta.toRed(this.red)}if(conf.lambda){lambda=new BN(conf.lambda,16)}else{var lambdas=this._getEndoRoots(this.n);if(this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta))===0){lambda=lambdas[0]}else{lambda=lambdas[1];assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta))===0)}}var basis;if(conf.basis){basis=conf.basis.map(function(vec){return{a:new BN(vec.a,16),b:new BN(vec.b,16)}})}else{basis=this._getEndoBasis(lambda)}return{beta:beta,lambda:lambda,basis:basis}};ShortCurve.prototype._getEndoRoots=function _getEndoRoots(num){var red=num===this.p?this.red:BN.mont(num);var tinv=new BN(2).toRed(red).redInvm();var ntinv=tinv.redNeg();var s=new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);var l1=ntinv.redAdd(s).fromRed();var l2=ntinv.redSub(s).fromRed();return[l1,l2]};ShortCurve.prototype._getEndoBasis=function _getEndoBasis(lambda){var aprxSqrt=this.n.ushrn(Math.floor(this.n.bitLength()/2));var u=lambda;var v=this.n.clone();var x1=new BN(1);var y1=new BN(0);var x2=new BN(0);var y2=new BN(1);var a0;var b0;var a1;var b1;var a2;var b2;var prevR;var i=0;var r;var x;while(u.cmpn(0)!==0){var q=v.div(u);r=v.sub(q.mul(u));x=x2.sub(q.mul(x1));var y=y2.sub(q.mul(y1));if(!a1&&r.cmp(aprxSqrt)<0){a0=prevR.neg();b0=x1;a1=r.neg();b1=x}else if(a1&&++i===2){break}prevR=r;v=u;u=r;x2=x1;x1=x;y2=y1;y1=y}a2=r.neg();b2=x;var len1=a1.sqr().add(b1.sqr());var len2=a2.sqr().add(b2.sqr());if(len2.cmp(len1)>=0){a2=a0;b2=b0}if(a1.negative){a1=a1.neg();b1=b1.neg()}if(a2.negative){a2=a2.neg();b2=b2.neg()}return[{a:a1,b:b1},{a:a2,b:b2}]};ShortCurve.prototype._endoSplit=function _endoSplit(k){var basis=this.endo.basis;var v1=basis[0];var v2=basis[1];var c1=v2.b.mul(k).divRound(this.n);var c2=v1.b.neg().mul(k).divRound(this.n);var p1=c1.mul(v1.a);var p2=c2.mul(v2.a);var q1=c1.mul(v1.b);var q2=c2.mul(v2.b);var k1=k.sub(p1).sub(p2);var k2=q1.add(q2).neg();return{k1:k1,k2:k2}};ShortCurve.prototype.pointFromX=function pointFromX(x,odd){x=new BN(x,16);if(!x.red)x=x.toRed(this.red);var y2=x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);var y=y2.redSqrt();if(y.redSqr().redSub(y2).cmp(this.zero)!==0)throw new Error("invalid point");var isOdd=y.fromRed().isOdd();if(odd&&!isOdd||!odd&&isOdd)y=y.redNeg();return this.point(x,y)};ShortCurve.prototype.validate=function validate(point){if(point.inf)return true;var x=point.x;var y=point.y;var ax=this.a.redMul(x);var rhs=x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);return y.redSqr().redISub(rhs).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function _endoWnafMulAdd(points,coeffs,jacobianResult){var npoints=this._endoWnafT1;var ncoeffs=this._endoWnafT2;for(var i=0;i";return""};Point.prototype.isInfinity=function isInfinity(){return this.inf};Point.prototype.add=function add(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(this.x.cmp(p.x)===0)return this.curve.point(null,null);var c=this.y.redSub(p.y);if(c.cmpn(0)!==0)c=c.redMul(this.x.redSub(p.x).redInvm());var nx=c.redSqr().redISub(this.x).redISub(p.x);var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.dbl=function dbl(){if(this.inf)return this;var ys1=this.y.redAdd(this.y);if(ys1.cmpn(0)===0)return this.curve.point(null,null);var a=this.curve.a;var x2=this.x.redSqr();var dyinv=ys1.redInvm();var c=x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);var nx=c.redSqr().redISub(this.x.redAdd(this.x));var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.getX=function getX(){return this.x.fromRed()};Point.prototype.getY=function getY(){return this.y.fromRed()};Point.prototype.mul=function mul(k){k=new BN(k,16);if(this._hasDoubles(k))return this.curve._fixedNafMul(this,k);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[k]);else return this.curve._wnafMul(this,k)};Point.prototype.mulAdd=function mulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs);else return this.curve._wnafMulAdd(1,points,coeffs,2)};Point.prototype.jmulAdd=function jmulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs,true);else return this.curve._wnafMulAdd(1,points,coeffs,2,true)};Point.prototype.eq=function eq(p){return this===p||this.inf===p.inf&&(this.inf||this.x.cmp(p.x)===0&&this.y.cmp(p.y)===0)};Point.prototype.neg=function neg(_precompute){if(this.inf)return this;var res=this.curve.point(this.x,this.y.redNeg());if(_precompute&&this.precomputed){var pre=this.precomputed;var negate=function(p){return p.neg()};res.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(negate)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(negate)}}}return res};Point.prototype.toJ=function toJ(){if(this.inf)return this.curve.jpoint(null,null,null);var res=this.curve.jpoint(this.x,this.y,this.curve.one);return res};function JPoint(curve,x,y,z){Base.BasePoint.call(this,curve,"jacobian");if(x===null&&y===null&&z===null){this.x=this.curve.one;this.y=this.curve.one;this.z=new BN(0)}else{this.x=new BN(x,16);this.y=new BN(y,16);this.z=new BN(z,16)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}inherits(JPoint,Base.BasePoint);ShortCurve.prototype.jpoint=function jpoint(x,y,z){return new JPoint(this,x,y,z)};JPoint.prototype.toP=function toP(){if(this.isInfinity())return this.curve.point(null,null);var zinv=this.z.redInvm();var zinv2=zinv.redSqr();var ax=this.x.redMul(zinv2);var ay=this.y.redMul(zinv2).redMul(zinv);return this.curve.point(ax,ay)};JPoint.prototype.neg=function neg(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var pz2=p.z.redSqr();var z2=this.z.redSqr();var u1=this.x.redMul(pz2);var u2=p.x.redMul(z2);var s1=this.y.redMul(pz2.redMul(p.z));var s2=p.y.redMul(z2.redMul(this.z));var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(p.z).redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.mixedAdd=function mixedAdd(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var z2=this.z.redSqr();var u1=this.x;var u2=p.x.redMul(z2);var s1=this.y;var s2=p.y.redMul(z2).redMul(this.z);var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.dblp=function dblp(pow){if(pow===0)return this;if(this.isInfinity())return this;if(!pow)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var r=this;for(var i=0;i=0)return false;rx.redIAdd(t);if(this.x.cmp(rx)===0)return true}return false};JPoint.prototype.inspect=function inspect(){if(this.isInfinity())return"";return""};JPoint.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0}},{"../../elliptic":93,"../curve":96,"bn.js":35,inherits:152}],99:[function(require,module,exports){"use strict";var curves=exports;var hash=require("hash.js");var elliptic=require("../elliptic");var assert=elliptic.utils.assert;function PresetCurve(options){if(options.type==="short")this.curve=new elliptic.curve.short(options);else if(options.type==="edwards")this.curve=new elliptic.curve.edwards(options);else this.curve=new elliptic.curve.mont(options);this.g=this.curve.g;this.n=this.curve.n;this.hash=options.hash;assert(this.g.validate(),"Invalid curve");assert(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}curves.PresetCurve=PresetCurve;function defineCurve(name,options){Object.defineProperty(curves,name,{configurable:true,enumerable:true,get:function(){var curve=new PresetCurve(options);Object.defineProperty(curves,name,{configurable:true,enumerable:true,value:curve});return curve}})}defineCurve("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:hash.sha256,gRed:false,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});defineCurve("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:hash.sha256,gRed:false,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});defineCurve("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:hash.sha256,gRed:false,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});defineCurve("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f "+"5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 "+"f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:hash.sha384,gRed:false,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 "+"5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 "+"0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});defineCurve("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b "+"99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd "+"3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 "+"f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:hash.sha512,gRed:false,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 "+"053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 "+"a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 "+"579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 "+"3fad0761 353c7086 a272c240 88be9476 9fd16650"]});defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:false,g:["9"]});defineCurve("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:false,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var pre;try{pre=require("./precomputed/secp256k1")}catch(e){pre=undefined}defineCurve("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:hash.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:false,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]})},{"../elliptic":93,"./precomputed/secp256k1":107,"hash.js":137}],100:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;var KeyPair=require("./key");var Signature=require("./signature");function EC(options){if(!(this instanceof EC))return new EC(options);if(typeof options==="string"){assert(elliptic.curves.hasOwnProperty(options),"Unknown curve "+options);options=elliptic.curves[options]}if(options instanceof elliptic.curves.PresetCurve)options={curve:options};this.curve=options.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=options.curve.g;this.g.precompute(options.curve.n.bitLength()+1);this.hash=options.hash||options.curve.hash}module.exports=EC;EC.prototype.keyPair=function keyPair(options){return new KeyPair(this,options)};EC.prototype.keyFromPrivate=function keyFromPrivate(priv,enc){return KeyPair.fromPrivate(this,priv,enc)};EC.prototype.keyFromPublic=function keyFromPublic(pub,enc){return KeyPair.fromPublic(this,pub,enc)};EC.prototype.genKeyPair=function genKeyPair(options){if(!options)options={};var drbg=new elliptic.hmacDRBG({hash:this.hash,pers:options.pers,entropy:options.entropy||elliptic.rand(this.hash.hmacStrength),nonce:this.n.toArray()});var bytes=this.n.byteLength();var ns2=this.n.sub(new BN(2));do{var priv=new BN(drbg.generate(bytes));if(priv.cmp(ns2)>0)continue;priv.iaddn(1);return this.keyFromPrivate(priv)}while(true)};EC.prototype._truncateToN=function truncateToN(msg,truncOnly){var delta=msg.byteLength()*8-this.n.bitLength();if(delta>0)msg=msg.ushrn(delta);if(!truncOnly&&msg.cmp(this.n)>=0)return msg.sub(this.n);else return msg};EC.prototype.sign=function sign(msg,key,enc,options){if(typeof enc==="object"){options=enc;enc=null}if(!options)options={};key=this.keyFromPrivate(key,enc);msg=this._truncateToN(new BN(msg,16));var bytes=this.n.byteLength();var bkey=key.getPrivate().toArray("be",bytes);var nonce=msg.toArray("be",bytes);var drbg=new elliptic.hmacDRBG({hash:this.hash,entropy:bkey,nonce:nonce,pers:options.pers,persEnc:options.persEnc});var ns1=this.n.sub(new BN(1));for(var iter=0;true;iter++){var k=options.k?options.k(iter):new BN(drbg.generate(this.n.byteLength()));k=this._truncateToN(k,true);if(k.cmpn(1)<=0||k.cmp(ns1)>=0)continue;var kp=this.g.mul(k);if(kp.isInfinity())continue;var kpX=kp.getX();var r=kpX.umod(this.n);if(r.cmpn(0)===0)continue;var s=k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));s=s.umod(this.n);if(s.cmpn(0)===0)continue;var recoveryParam=(kp.getY().isOdd()?1:0)|(kpX.cmp(r)!==0?2:0);if(options.canonical&&s.cmp(this.nh)>0){s=this.n.sub(s);recoveryParam^=1}return new Signature({r:r,s:s,recoveryParam:recoveryParam})}};EC.prototype.verify=function verify(msg,signature,key,enc){msg=this._truncateToN(new BN(msg,16));key=this.keyFromPublic(key,enc);signature=new Signature(signature,"hex");var r=signature.r;var s=signature.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return false;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return false;var sinv=s.invm(this.n);var u1=sinv.mul(msg).umod(this.n);var u2=sinv.mul(r).umod(this.n);if(!this.curve._maxwellTrick){var p=this.g.mulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.getX().umod(this.n).cmp(r)===0}var p=this.g.jmulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.eqXToP(r)};EC.prototype.recoverPubKey=function(msg,signature,j,enc){assert((3&j)===j,"The recovery param is more than two bits");signature=new Signature(signature,enc);var n=this.n;var e=new BN(msg);var r=signature.r;var s=signature.s;var isYOdd=j&1;var isSecondKey=j>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&isSecondKey)throw new Error("Unable to find sencond key candinate");if(isSecondKey)r=this.curve.pointFromX(r.add(this.curve.n),isYOdd);else r=this.curve.pointFromX(r,isYOdd);var rInv=signature.r.invm(n);var s1=n.sub(e).mul(rInv).umod(n);var s2=s.mul(rInv).umod(n);return this.g.mulAdd(s1,r,s2)};EC.prototype.getKeyRecoveryParam=function(e,signature,Q,enc){signature=new Signature(signature,enc);if(signature.recoveryParam!==null)return signature.recoveryParam;for(var i=0;i<4;i++){var Qprime;try{Qprime=this.recoverPubKey(e,signature,i)}catch(e){continue}if(Qprime.eq(Q))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":93,"./key":101,"./signature":102,"bn.js":35}],101:[function(require,module,exports){"use strict";var BN=require("bn.js");function KeyPair(ec,options){this.ec=ec;this.priv=null;this.pub=null;if(options.priv)this._importPrivate(options.priv,options.privEnc);if(options.pub)this._importPublic(options.pub,options.pubEnc)}module.exports=KeyPair;KeyPair.fromPublic=function fromPublic(ec,pub,enc){if(pub instanceof KeyPair)return pub;return new KeyPair(ec,{pub:pub,pubEnc:enc})};KeyPair.fromPrivate=function fromPrivate(ec,priv,enc){if(priv instanceof KeyPair)return priv;return new KeyPair(ec,{priv:priv,privEnc:enc})};KeyPair.prototype.validate=function validate(){var pub=this.getPublic();if(pub.isInfinity())return{result:false,reason:"Invalid public key"};if(!pub.validate())return{result:false,reason:"Public key is not a point"};if(!pub.mul(this.ec.curve.n).isInfinity())return{result:false,reason:"Public key * N != O"};return{result:true,reason:null}};KeyPair.prototype.getPublic=function getPublic(compact,enc){if(typeof compact==="string"){enc=compact;compact=null}if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!enc)return this.pub;return this.pub.encode(enc,compact)};KeyPair.prototype.getPrivate=function getPrivate(enc){if(enc==="hex")return this.priv.toString(16,2);else return this.priv};KeyPair.prototype._importPrivate=function _importPrivate(key,enc){this.priv=new BN(key,enc||16);this.priv=this.priv.umod(this.ec.curve.n)};KeyPair.prototype._importPublic=function _importPublic(key,enc){if(key.x||key.y){this.pub=this.ec.curve.point(key.x,key.y);return}this.pub=this.ec.curve.decodePoint(key,enc)};KeyPair.prototype.derive=function derive(pub){return pub.mul(this.priv).getX()};KeyPair.prototype.sign=function sign(msg,enc,options){return this.ec.sign(msg,this,enc,options)};KeyPair.prototype.verify=function verify(msg,signature){return this.ec.verify(msg,signature,this)};KeyPair.prototype.inspect=function inspect(){return""}},{"bn.js":35}],102:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;function Signature(options,enc){if(options instanceof Signature)return options;if(this._importDER(options,enc))return;assert(options.r&&options.s,"Signature without r or s");this.r=new BN(options.r,16);this.s=new BN(options.s,16);if(options.recoveryParam===undefined)this.recoveryParam=null;else this.recoveryParam=options.recoveryParam}module.exports=Signature;function Position(){this.place=0}function getLength(buf,p){var initial=buf[p.place++];if(!(initial&128)){return initial}var octetLen=initial&15;var val=0;for(var i=0,off=p.place;i>>3);arr.push(octets|128);while(--octets){arr.push(len>>>(octets<<3)&255)}arr.push(len)}Signature.prototype.toDER=function toDER(enc){var r=this.r.toArray(); +var s=this.s.toArray();if(r[0]&128)r=[0].concat(r);if(s[0]&128)s=[0].concat(s);r=rmPadding(r);s=rmPadding(s);while(!s[0]&&!(s[1]&128)){s=s.slice(1)}var arr=[2];constructLength(arr,r.length);arr=arr.concat(r);arr.push(2);constructLength(arr,s.length);var backHalf=arr.concat(s);var res=[48];constructLength(res,backHalf.length);res=res.concat(backHalf);return utils.encode(res,enc)}},{"../../elliptic":93,"bn.js":35}],103:[function(require,module,exports){"use strict";var hash=require("hash.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;var parseBytes=utils.parseBytes;var KeyPair=require("./key");var Signature=require("./signature");function EDDSA(curve){assert(curve==="ed25519","only tested with ed25519 so far");if(!(this instanceof EDDSA))return new EDDSA(curve);var curve=elliptic.curves[curve].curve;this.curve=curve;this.g=curve.g;this.g.precompute(curve.n.bitLength()+1);this.pointClass=curve.point().constructor;this.encodingLength=Math.ceil(curve.n.bitLength()/8);this.hash=hash.sha512}module.exports=EDDSA;EDDSA.prototype.sign=function sign(message,secret){message=parseBytes(message);var key=this.keyFromSecret(secret);var r=this.hashInt(key.messagePrefix(),message);var R=this.g.mul(r);var Rencoded=this.encodePoint(R);var s_=this.hashInt(Rencoded,key.pubBytes(),message).mul(key.priv());var S=r.add(s_).umod(this.curve.n);return this.makeSignature({R:R,S:S,Rencoded:Rencoded})};EDDSA.prototype.verify=function verify(message,sig,pub){message=parseBytes(message);sig=this.makeSignature(sig);var key=this.keyFromPublic(pub);var h=this.hashInt(sig.Rencoded(),key.pubBytes(),message);var SG=this.g.mul(sig.S());var RplusAh=sig.R().add(key.pub().mul(h));return RplusAh.eq(SG)};EDDSA.prototype.hashInt=function hashInt(){var hash=this.hash();for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(entropy,nonce,pers)}module.exports=HmacDRBG;HmacDRBG.prototype._init=function init(entropy,nonce,pers){var seed=entropy.concat(nonce).concat(pers);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(entropy.concat(add||[]));this.reseed=1};HmacDRBG.prototype.generate=function generate(len,enc,add,addEnc){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof enc!=="string"){addEnc=add;add=enc;enc=null}if(add){add=utils.toArray(add,addEnc);this._update(add)}var temp=[];while(temp.length>8;var lo=c&255;if(hi)res.push(hi,lo);else res.push(lo)}}else if(enc==="hex"){msg=msg.replace(/[^a-z0-9]+/gi,"");if(msg.length%2!==0)msg="0"+msg;for(var i=0;i=0){var z;if(k.isOdd()){var mod=k.andln(ws-1);if(mod>(ws>>1)-1)z=(ws>>1)-mod;else z=mod;k.isubn(z)}else{z=0}naf.push(z);var shift=k.cmpn(0)!==0&&k.andln(ws-1)===0?w+1:1;for(var i=1;i0||k2.cmpn(-d2)>0){var m14=k1.andln(3)+d1&3;var m24=k2.andln(3)+d2&3;if(m14===3)m14=-1;if(m24===3)m24=-1;var u1;if((m14&1)===0){u1=0}else{var m8=k1.andln(7)+d1&7;if((m8===3||m8===5)&&m24===2)u1=-m14;else u1=m14}jsf[0].push(u1);var u2;if((m24&1)===0){u2=0}else{var m8=k2.andln(7)+d2&7;if((m8===3||m8===5)&&m14===2)u2=-m24;else u2=m24}jsf[1].push(u2);if(2*d1===u1+1)d1=1-d1;if(2*d2===u2+1)d2=1-d2;k1.iushrn(1);k2.iushrn(1)}return jsf}utils.getJSF=getJSF;function cachedProperty(obj,name,computer){var key="_"+name;obj.prototype[name]=function cachedProperty(){return this[key]!==undefined?this[key]:this[key]=computer.call(this)}}utils.cachedProperty=cachedProperty;function parseBytes(bytes){return typeof bytes==="string"?utils.toArray(bytes,"hex"):bytes}utils.parseBytes=parseBytes;function intFromLE(bytes){return new BN(bytes,"hex","le")}utils.intFromLE=intFromLE},{"bn.js":35}],109:[function(require,module,exports){module.exports={_args:[[{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},"/Users/deejaybee/Code/eyevinn/dash-validator-js/node_modules/browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.3.2",_inCache:true,_location:"/elliptic",_nodeVersion:"6.3.0",_npmOperationalInternal:{host:"packages-16-east.internal.npmjs.com",tmp:"tmp/elliptic-6.3.2.tgz_1473938837205_0.3108903462998569"},_npmUser:{name:"indutny",email:"fedor@indutny.com"},_npmVersion:"3.10.3",_phantomChildren:{},_requested:{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz",_shasum:"e4c81e0829cf0a65ab70e998b8232723b5c1bc48",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"/Users/deejaybee/Code/eyevinn/dash-validator-js/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"e4c81e0829cf0a65ab70e998b8232723b5c1bc48",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz"},files:["lib"],gitHead:"cbace4683a4a548dc0306ef36756151a20299cd5",homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.3.2"}},{}],110:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err}}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i=0;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-->0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1)}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else if(listeners){while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],111:[function(require,module,exports){!function(Buffer){var md5=require("create-hash/md5");module.exports=EVP_BytesToKey;function EVP_BytesToKey(password,salt,keyLen,ivLen){if(!Buffer.isBuffer(password)){password=new Buffer(password,"binary")}if(salt&&!Buffer.isBuffer(salt)){salt=new Buffer(salt,"binary")}keyLen=keyLen/8;ivLen=ivLen||0;var ki=0;var ii=0;var key=new Buffer(keyLen);var iv=new Buffer(ivLen);var addmd=0;var md_buf;var i;var bufs=[];while(true){if(addmd++>0){bufs.push(md_buf)}bufs.push(password);if(salt){bufs.push(salt)}md_buf=md5(Buffer.concat(bufs));bufs=[];i=0;if(keyLen>0){while(true){if(keyLen===0){break}if(i===md_buf.length){break}key[ki++]=md_buf[i];keyLen--;i++}}if(ivLen>0&&i!==md_buf.length){while(true){if(ivLen===0){break}if(i===md_buf.length){break}iv[ii++]=md_buf[i];ivLen--;i++}}if(keyLen===0&&ivLen===0){break}}for(i=0;i0)throw new Error("non-zero precision not supported");if(flags.match(/-/))left=true;if(flags.match(/0/))pad="0";if(flags.match(/\+/))sign=true;switch(conversion){case"s":if(arg===undefined||arg===null)throw new Error("argument "+argn+": attempted to print undefined or null "+"as a string");ret+=doPad(pad,width,left,arg.toString());break;case"d":arg=Math.floor(arg);case"f":sign=sign&&arg>0?"+":"";ret+=sign+doPad(pad,width,left,arg.toString());break;case"j":if(width===0)width=10;ret+=mod_util.inspect(arg,false,width);break;case"r":ret+=dumpException(arg);break;default:throw new Error("unsupported conversion: "+conversion)}}ret+=fmt;return ret}function doPad(chr,width,left,str){var ret=str;while(ret.length0&&!req.useChunkedEncodingByDefault){var idleSocket=this.freeSockets[name].pop();idleSocket.removeListener("error",idleSocket._onIdleError);delete idleSocket._onIdleError;req._reusedSocket=true;req.onSocket(idleSocket)}else{this.addRequestNoreuse(req,host,port)}};ForeverAgent.prototype.removeSocket=function(s,name,host,port){if(this.sockets[name]){var index=this.sockets[name].indexOf(s);if(index!==-1){this.sockets[name].splice(index,1)}}else if(this.sockets[name]&&this.sockets[name].length===0){delete this.sockets[name];delete this.requests[name]}if(this.freeSockets[name]){var index=this.freeSockets[name].indexOf(s);if(index!==-1){this.freeSockets[name].splice(index,1);if(this.freeSockets[name].length===0){delete this.freeSockets[name]}}}if(this.requests[name]&&this.requests[name].length){this.createSocket(name,host,port).emit("free")}};function ForeverAgentSSL(options){ForeverAgent.call(this,options)}util.inherits(ForeverAgentSSL,ForeverAgent);ForeverAgentSSL.prototype.createConnection=createConnectionSSL;ForeverAgentSSL.prototype.addRequestNoreuse=AgentSSL.prototype.addRequest;function createConnectionSSL(port,host,options){if(typeof port==="object"){options=port}else if(typeof host==="object"){options=host}else if(typeof options==="object"){options=options}else{options={}}if(typeof port==="number"){options.port=port}if(typeof host==="string"){options.host=host}return tls.connect(options)}},{http:272,https:149,net:64,tls:64,util:293}],115:[function(require,module,exports){module.exports=typeof self=="object"?self.FormData:window.FormData},{}],116:[function(require,module,exports){var util=require("util");var INDENT_START=/[\{\[]/;var INDENT_END=/[\}\]]/;module.exports=function(){var lines=[];var indent=0;var push=function(str){var spaces="";while(spaces.length=this._delta8){msg=this.pending;var r=msg.length%this._delta8;this.pending=msg.slice(msg.length-r,msg.length);if(this.pending.length===0)this.pending=null;msg=utils.join32(msg,0,msg.length-r,this.endian);for(var i=0;i>>24&255;res[i++]=len>>>16&255;res[i++]=len>>>8&255;res[i++]=len&255}else{res[i++]=len&255;res[i++]=len>>>8&255;res[i++]=len>>>16&255;res[i++]=len>>>24&255;res[i++]=0;res[i++]=0;res[i++]=0;res[i++]=0;for(var t=8;tthis.blockSize)key=(new this.Hash).update(key).digest();assert(key.length<=this.blockSize);for(var i=key.length;i>>3}function g1_256(x){return rotr32(x,17)^rotr32(x,19)^x>>>10}function ft_1(s,x,y,z){if(s===0)return ch32(x,y,z);if(s===1||s===3)return p32(x,y,z);if(s===2)return maj32(x,y,z)}function ch64_hi(xh,xl,yh,yl,zh,zl){var r=xh&yh^~xh&zh;if(r<0)r+=4294967296;return r}function ch64_lo(xh,xl,yh,yl,zh,zl){var r=xl&yl^~xl&zl;if(r<0)r+=4294967296;return r}function maj64_hi(xh,xl,yh,yl,zh,zl){var r=xh&yh^xh&zh^yh&zh;if(r<0)r+=4294967296;return r}function maj64_lo(xh,xl,yh,yl,zh,zl){var r=xl&yl^xl&zl^yl&zl;if(r<0)r+=4294967296;return r}function s0_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,28);var c1_hi=rotr64_hi(xl,xh,2);var c2_hi=rotr64_hi(xl,xh,7);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function s0_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,28);var c1_lo=rotr64_lo(xl,xh,2);var c2_lo=rotr64_lo(xl,xh,7);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}function s1_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,14);var c1_hi=rotr64_hi(xh,xl,18);var c2_hi=rotr64_hi(xl,xh,9);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function s1_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,14);var c1_lo=rotr64_lo(xh,xl,18);var c2_lo=rotr64_lo(xl,xh,9);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}function g0_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,1);var c1_hi=rotr64_hi(xh,xl,8);var c2_hi=shr64_hi(xh,xl,7);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function g0_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,1);var c1_lo=rotr64_lo(xh,xl,8);var c2_lo=shr64_lo(xh,xl,7);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}function g1_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,19);var c1_hi=rotr64_hi(xl,xh,29);var c2_hi=shr64_hi(xh,xl,6);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function g1_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,19);var c1_lo=rotr64_lo(xl,xh,29);var c2_lo=shr64_lo(xh,xl,6);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}},{"../hash":137}],142:[function(require,module,exports){var utils=exports;var inherits=require("inherits");function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if(typeof msg==="string"){if(!enc){for(var i=0;i>8;var lo=c&255;if(hi)res.push(hi,lo);else res.push(lo)}}else if(enc==="hex"){msg=msg.replace(/[^a-z0-9]+/gi,"");if(msg.length%2!==0)msg="0"+msg;for(var i=0;i>>24|w>>>8&65280|w<<8&16711680|(w&255)<<24;return res>>>0}utils.htonl=htonl;function toHex32(msg,endian){var res="";for(var i=0;i>>0}return res}utils.join32=join32;function split32(msg,endian){var res=new Array(msg.length*4);for(var i=0,k=0;i>>24;res[k+1]=m>>>16&255;res[k+2]=m>>>8&255;res[k+3]=m&255}else{res[k+3]=m>>>24;res[k+2]=m>>>16&255;res[k+1]=m>>>8&255;res[k]=m&255}}return res}utils.split32=split32;function rotr32(w,b){return w>>>b|w<<32-b}utils.rotr32=rotr32;function rotl32(w,b){return w<>>32-b}utils.rotl32=rotl32;function sum32(a,b){return a+b>>>0}utils.sum32=sum32;function sum32_3(a,b,c){return a+b+c>>>0}utils.sum32_3=sum32_3;function sum32_4(a,b,c,d){return a+b+c+d>>>0}utils.sum32_4=sum32_4;function sum32_5(a,b,c,d,e){return a+b+c+d+e>>>0}utils.sum32_5=sum32_5;function assert(cond,msg){if(!cond)throw new Error(msg||"Assertion failed")}utils.assert=assert;utils.inherits=inherits;function sum64(buf,pos,ah,al){var bh=buf[pos];var bl=buf[pos+1];var lo=al+bl>>>0;var hi=(lo>>0;buf[pos+1]=lo}exports.sum64=sum64;function sum64_hi(ah,al,bh,bl){var lo=al+bl>>>0;var hi=(lo>>0}exports.sum64_hi=sum64_hi;function sum64_lo(ah,al,bh,bl){var lo=al+bl;return lo>>>0}exports.sum64_lo=sum64_lo;function sum64_4_hi(ah,al,bh,bl,ch,cl,dh,dl){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0}exports.sum64_4_hi=sum64_4_hi;function sum64_4_lo(ah,al,bh,bl,ch,cl,dh,dl){var lo=al+bl+cl+dl;return lo>>>0}exports.sum64_4_lo=sum64_4_lo;function sum64_5_hi(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0}exports.sum64_5_hi=sum64_5_hi;function sum64_5_lo(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var lo=al+bl+cl+dl+el;return lo>>>0}exports.sum64_5_lo=sum64_5_lo;function rotr64_hi(ah,al,num){var r=al<<32-num|ah>>>num;return r>>>0}exports.rotr64_hi=rotr64_hi;function rotr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}exports.rotr64_lo=rotr64_lo;function shr64_hi(ah,al,num){return ah>>>num}exports.shr64_hi=shr64_hi;function shr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}exports.shr64_lo=shr64_lo},{inherits:152}],143:[function(require,module,exports){var hawk={internals:{}};hawk.client={header:function(uri,method,options){var result={field:"",artifacts:{}};if(!uri||typeof uri!=="string"&&typeof uri!=="object"||!method||typeof method!=="string"||!options||typeof options!=="object"){result.err="Invalid argument type";return result}var timestamp=options.timestamp||hawk.utils.now(options.localtimeOffsetMsec);var credentials=options.credentials;if(!credentials||!credentials.id||!credentials.key||!credentials.algorithm){result.err="Invalid credentials object";return result}if(hawk.crypto.algorithms.indexOf(credentials.algorithm)===-1){result.err="Unknown algorithm";return result}if(typeof uri==="string"){uri=hawk.utils.parseUri(uri)}var artifacts={ts:timestamp,nonce:options.nonce||hawk.utils.randomString(6),method:method,resource:uri.resource,host:uri.host,port:uri.port,hash:options.hash,ext:options.ext,app:options.app,dlg:options.dlg};result.artifacts=artifacts;if(!artifacts.hash&&(options.payload||options.payload==="")){artifacts.hash=hawk.crypto.calculatePayloadHash(options.payload,credentials.algorithm,options.contentType)}var mac=hawk.crypto.calculateMac("header",credentials,artifacts);var hasExt=artifacts.ext!==null&&artifacts.ext!==undefined&&artifacts.ext!=="";var header='Hawk id="'+credentials.id+'", ts="'+artifacts.ts+'", nonce="'+artifacts.nonce+(artifacts.hash?'", hash="'+artifacts.hash:"")+(hasExt?'", ext="'+hawk.utils.escapeHeaderAttribute(artifacts.ext):"")+'", mac="'+mac+'"';if(artifacts.app){header+=', app="'+artifacts.app+(artifacts.dlg?'", dlg="'+artifacts.dlg:"")+'"'}result.field=header;return result},bewit:function(uri,options){if(!uri||typeof uri!=="string"||!options||typeof options!=="object"||!options.ttlSec){return""}options.ext=options.ext===null||options.ext===undefined?"":options.ext;var now=hawk.utils.now(options.localtimeOffsetMsec);var credentials=options.credentials;if(!credentials||!credentials.id||!credentials.key||!credentials.algorithm){return""}if(hawk.crypto.algorithms.indexOf(credentials.algorithm)===-1){return""}uri=hawk.utils.parseUri(uri);var exp=now+options.ttlSec;var mac=hawk.crypto.calculateMac("bewit",credentials,{ts:exp,nonce:"",method:"GET",resource:uri.resource,host:uri.host,port:uri.port,ext:options.ext});var bewit=credentials.id+"\\"+exp+"\\"+mac+"\\"+options.ext;return hawk.utils.base64urlEncode(bewit)},authenticate:function(request,credentials,artifacts,options){options=options||{};var getHeader=function(name){return request.getResponseHeader?request.getResponseHeader(name):request.getHeader(name)};var wwwAuthenticate=getHeader("www-authenticate");if(wwwAuthenticate){var wwwAttributes=hawk.utils.parseAuthorizationHeader(wwwAuthenticate,["ts","tsm","error"]);if(!wwwAttributes){return false}if(wwwAttributes.ts){var tsm=hawk.crypto.calculateTsMac(wwwAttributes.ts,credentials);if(tsm!==wwwAttributes.tsm){return false}hawk.utils.setNtpOffset(wwwAttributes.ts-Math.floor((new Date).getTime()/1e3))}}var serverAuthorization=getHeader("server-authorization");if(!serverAuthorization&&!options.required){return true}var attributes=hawk.utils.parseAuthorizationHeader(serverAuthorization,["mac","ext","hash"]);if(!attributes){return false}var modArtifacts={ts:artifacts.ts,nonce:artifacts.nonce,method:artifacts.method,resource:artifacts.resource,host:artifacts.host,port:artifacts.port,hash:attributes.hash,ext:attributes.ext,app:artifacts.app,dlg:artifacts.dlg};var mac=hawk.crypto.calculateMac("response",credentials,modArtifacts);if(mac!==attributes.mac){return false}if(!options.payload&&options.payload!==""){return true}if(!attributes.hash){return false}var calculatedHash=hawk.crypto.calculatePayloadHash(options.payload,credentials.algorithm,getHeader("content-type"));return calculatedHash===attributes.hash},message:function(host,port,message,options){if(!host||typeof host!=="string"||!port||typeof port!=="number"||message===null||message===undefined||typeof message!=="string"||!options||typeof options!=="object"){return null}var timestamp=options.timestamp||hawk.utils.now(options.localtimeOffsetMsec);var credentials=options.credentials;if(!credentials||!credentials.id||!credentials.key||!credentials.algorithm){return null}if(hawk.crypto.algorithms.indexOf(credentials.algorithm)===-1){return null}var artifacts={ts:timestamp,nonce:options.nonce||hawk.utils.randomString(6),host:host,port:port,hash:hawk.crypto.calculatePayloadHash(message,credentials.algorithm)};var result={id:credentials.id,ts:artifacts.ts,nonce:artifacts.nonce,hash:artifacts.hash,mac:hawk.crypto.calculateMac("message",credentials,artifacts)};return result},authenticateTimestamp:function(message,credentials,updateClock){var tsm=hawk.crypto.calculateTsMac(message.ts,credentials);if(tsm!==message.tsm){return false}if(updateClock!==false){hawk.utils.setNtpOffset(message.ts-Math.floor((new Date).getTime()/1e3))}return true}};hawk.crypto={headerVersion:"1",algorithms:["sha1","sha256"],calculateMac:function(type,credentials,options){var normalized=hawk.crypto.generateNormalizedString(type,options);var hmac=CryptoJS["Hmac"+credentials.algorithm.toUpperCase()](normalized,credentials.key);return hmac.toString(CryptoJS.enc.Base64)},generateNormalizedString:function(type,options){var normalized="hawk."+hawk.crypto.headerVersion+"."+type+"\n"+options.ts+"\n"+options.nonce+"\n"+(options.method||"").toUpperCase()+"\n"+(options.resource||"")+"\n"+options.host.toLowerCase()+"\n"+options.port+"\n"+(options.hash||"")+"\n";if(options.ext){normalized+=options.ext.replace("\\","\\\\").replace("\n","\\n")}normalized+="\n";if(options.app){normalized+=options.app+"\n"+(options.dlg||"")+"\n"}return normalized},calculatePayloadHash:function(payload,algorithm,contentType){var hash=CryptoJS.algo[algorithm.toUpperCase()].create();hash.update("hawk."+hawk.crypto.headerVersion+".payload\n");hash.update(hawk.utils.parseContentType(contentType)+"\n");hash.update(payload);hash.update("\n");return hash.finalize().toString(CryptoJS.enc.Base64)},calculateTsMac:function(ts,credentials){var hash=CryptoJS["Hmac"+credentials.algorithm.toUpperCase()]("hawk."+hawk.crypto.headerVersion+".ts\n"+ts+"\n",credentials.key);return hash.toString(CryptoJS.enc.Base64)}};hawk.internals.LocalStorage=function(){this._cache={};this.length=0;this.getItem=function(key){return this._cache.hasOwnProperty(key)?String(this._cache[key]):null};this.setItem=function(key,value){this._cache[key]=String(value);this.length=Object.keys(this._cache).length};this.removeItem=function(key){delete this._cache[key];this.length=Object.keys(this._cache).length};this.clear=function(){this._cache={};this.length=0};this.key=function(i){return Object.keys(this._cache)[i||0]}};hawk.utils={storage:new hawk.internals.LocalStorage,setStorage:function(storage){var ntpOffset=hawk.utils.storage.getItem("hawk_ntp_offset");hawk.utils.storage=storage;if(ntpOffset){hawk.utils.setNtpOffset(ntpOffset)}},setNtpOffset:function(offset){try{hawk.utils.storage.setItem("hawk_ntp_offset",offset)}catch(err){console.error("[hawk] could not write to storage.");console.error(err)}},getNtpOffset:function(){var offset=hawk.utils.storage.getItem("hawk_ntp_offset");if(!offset){return 0}return parseInt(offset,10)},now:function(localtimeOffsetMsec){return Math.floor(((new Date).getTime()+(localtimeOffsetMsec||0))/1e3)+hawk.utils.getNtpOffset()},escapeHeaderAttribute:function(attribute){return attribute.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')},parseContentType:function(header){if(!header){return""}return header.split(";")[0].replace(/^\s+|\s+$/g,"").toLowerCase()},parseAuthorizationHeader:function(header,keys){if(!header){return null}var headerParts=header.match(/^(\w+)(?:\s+(.*))?$/);if(!headerParts){return null}var scheme=headerParts[1];if(scheme.toLowerCase()!=="hawk"){return null}var attributesString=headerParts[2];if(!attributesString){return null}var attributes={};var verify=attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g,function($0,$1,$2){if(keys.indexOf($1)===-1){return}if($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/)===null){return}if(attributes.hasOwnProperty($1)){return}attributes[$1]=$2;return""});if(verify!==""){return null}return attributes},randomString:function(size){var randomSource="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var len=randomSource.length;var result=[];for(var i=0;i>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535>>2]=d[e>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<<32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c,2),16)<<24-4*(c%8);return new j.init(d,b/2)}},p=m.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new j.init(d,b)}},t=m.Utf8={stringify:function(a){try{return decodeURIComponent(escape(p.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return p.parse(unescape(encodeURIComponent(a)))}},q=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new j.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,c=b.sigBytes,e=this.blockSize,f=c/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;c=h.min(4*a,c);if(a){for(var g=0;gc;c++){if(16>c)d[c]=n[p+c]|0;else{var g=d[c-3]^d[c-8]^d[c-14]^d[c-16];d[c]=g<<1|g>>>31}g=(e<<5|e>>>27)+b+d[c];g=20>c?g+((f&h|~f&j)+1518500249):40>c?g+((f^h^j)+1859775393):60>c?g+((f&h|f&j|h&j)-1894007588):g+((f^h^j)-899497514);b=j;j=h;h=f<<30|f>>>2;f=e;e=g}a[0]=a[0]+e|0;a[1]=a[1]+f|0;a[2]=a[2]+h|0;a[3]=a[3]+j|0;a[4]=a[4]+b|0},_doFinalize:function(){var b=this._data,d=b.words,a=8*this._nDataBytes,e=8*b.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=Math.floor(a/4294967296);d[(e+64>>>9<<4)+15]=a;b.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var b=l.clone.call(this);b._hash=this._hash.clone();return b}});k.SHA1=l._createHelper(b);k.HmacSHA1=l._createHmacHelper(b)}();!function(k){for(var g=CryptoJS,h=g.lib,v=h.WordArray,j=h.Hasher,h=g.algo,s=[],t=[],u=function(q){return 4294967296*(q-(q|0))|0},l=2,b=0;64>b;){var d;a:{d=l;for(var w=k.sqrt(d),r=2;r<=w;r++)if(!(d%r)){d=!1;break a}d=!0}d&&(8>b&&(s[b]=u(k.pow(l,.5))),t[b]=u(k.pow(l,1/3)),b++);l++}var n=[],h=h.SHA256=j.extend({_doReset:function(){this._hash=new v.init(s.slice(0))},_doProcessBlock:function(q,h){for(var a=this._hash.words,c=a[0],d=a[1],b=a[2],k=a[3],f=a[4],g=a[5],j=a[6],l=a[7],e=0;64>e;e++){if(16>e)n[e]=q[h+e]|0;else{var m=n[e-15],p=n[e-2];n[e]=((m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3)+n[e-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[e-16]}m=l+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&g^~f&j)+t[e]+n[e];p=((c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22))+(c&d^c&b^d&b);l=j;j=g;g=f;f=k+m|0;k=b;b=d;d=c;c=m+p|0}a[0]=a[0]+c|0;a[1]=a[1]+d|0;a[2]=a[2]+b|0;a[3]=a[3]+k|0;a[4]=a[4]+f|0;a[5]=a[5]+g|0;a[6]=a[6]+j|0;a[7]=a[7]+l|0},_doFinalize:function(){var d=this._data,b=d.words,a=8*this._nDataBytes,c=8*d.sigBytes;b[c>>>5]|=128<<24-c%32;b[(c+64>>>9<<4)+14]=k.floor(a/4294967296);b[(c+64>>>9<<4)+15]=a;d.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var b=j.clone.call(this);b._hash=this._hash.clone();return b}});g.SHA256=j._createHelper(h);g.HmacSHA256=j._createHmacHelper(h)}(Math);!function(){var c=CryptoJS,k=c.enc.Utf8;c.algo.HMAC=c.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=k.parse(b));var c=a.blockSize,e=4*c;b.sigBytes>e&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+.75*g>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}();hawk.crypto.internals=CryptoJS;if(typeof module!=="undefined"&&module.exports){module.exports=hawk}},{}],144:[function(require,module,exports){var parser=require("./parser");var signer=require("./signer");var verify=require("./verify");var utils=require("./utils");module.exports={parse:parser.parseRequest,parseRequest:parser.parseRequest,sign:signer.signRequest,signRequest:signer.signRequest,createSigner:signer.createSigner,isSigner:signer.isSigner,sshKeyToPEM:utils.sshKeyToPEM,sshKeyFingerprint:utils.fingerprint,pemToRsaSSHKey:utils.pemToRsaSSHKey,verify:verify.verifySignature,verifySignature:verify.verifySignature,verifyHMAC:verify.verifyHMAC}},{"./parser":145,"./signer":146,"./utils":147,"./verify":148}],145:[function(require,module,exports){var assert=require("assert-plus");var util=require("util");var utils=require("./utils");var HASH_ALGOS=utils.HASH_ALGOS;var PK_ALGOS=utils.PK_ALGOS;var HttpSignatureError=utils.HttpSignatureError;var InvalidAlgorithmError=utils.InvalidAlgorithmError;var validateAlgorithm=utils.validateAlgorithm;var State={New:0,Params:1};var ParamsState={Name:0,Quote:1,Value:2,Comma:3};function ExpiredRequestError(message){HttpSignatureError.call(this,message,ExpiredRequestError) +}util.inherits(ExpiredRequestError,HttpSignatureError);function InvalidHeaderError(message){HttpSignatureError.call(this,message,InvalidHeaderError)}util.inherits(InvalidHeaderError,HttpSignatureError);function InvalidParamsError(message){HttpSignatureError.call(this,message,InvalidParamsError)}util.inherits(InvalidParamsError,HttpSignatureError);function MissingHeaderError(message){HttpSignatureError.call(this,message,MissingHeaderError)}util.inherits(MissingHeaderError,HttpSignatureError);function StrictParsingError(message){HttpSignatureError.call(this,message,StrictParsingError)}util.inherits(StrictParsingError,HttpSignatureError);module.exports={parseRequest:function parseRequest(request,options){assert.object(request,"request");assert.object(request.headers,"request.headers");if(options===undefined){options={}}if(options.headers===undefined){options.headers=[request.headers["x-date"]?"x-date":"date"]}assert.object(options,"options");assert.arrayOfString(options.headers,"options.headers");assert.optionalNumber(options.clockSkew,"options.clockSkew");if(!request.headers.authorization)throw new MissingHeaderError("no authorization header present in "+"the request");options.clockSkew=options.clockSkew||300;var i=0;var state=State.New;var substate=ParamsState.Name;var tmpName="";var tmpValue="";var parsed={scheme:"",params:{},signingString:"",get algorithm(){return this.params.algorithm.toUpperCase()},get keyId(){return this.params.keyId}};var authz=request.headers.authorization;for(i=0;i=65&&code<=90||code>=97&&code<=122){tmpName+=c}else if(c==="="){if(tmpName.length===0)throw new InvalidHeaderError("bad param format");substate=ParamsState.Quote}else{throw new InvalidHeaderError("bad param format")}break;case ParamsState.Quote:if(c==='"'){tmpValue="";substate=ParamsState.Value}else{throw new InvalidHeaderError("bad param format")}break;case ParamsState.Value:if(c==='"'){parsed.params[tmpName]=tmpValue;substate=ParamsState.Comma}else{tmpValue+=c}break;case ParamsState.Comma:if(c===","){tmpName="";substate=ParamsState.Name}else{throw new InvalidHeaderError("bad param format")}break;default:throw new Error("Invalid substate")}break;default:throw new Error("Invalid substate")}}if(!parsed.params.headers||parsed.params.headers===""){if(request.headers["x-date"]){parsed.params.headers=["x-date"]}else{parsed.params.headers=["date"]}}else{parsed.params.headers=parsed.params.headers.split(" ")}if(!parsed.scheme||parsed.scheme!=="Signature")throw new InvalidHeaderError('scheme was not "Signature"');if(!parsed.params.keyId)throw new InvalidHeaderError("keyId was not specified");if(!parsed.params.algorithm)throw new InvalidHeaderError("algorithm was not specified");if(!parsed.params.signature)throw new InvalidHeaderError("signature was not specified");parsed.params.algorithm=parsed.params.algorithm.toLowerCase();try{validateAlgorithm(parsed.params.algorithm)}catch(e){if(e instanceof InvalidAlgorithmError)throw new InvalidParamsError(parsed.params.algorithm+" is not "+"supported");else throw e}for(i=0;ioptions.clockSkew*1e3){throw new ExpiredRequestError("clock skew of "+skew/1e3+"s was greater than "+options.clockSkew+"s")}}options.headers.forEach(function(hdr){if(parsed.params.headers.indexOf(hdr)<0)throw new MissingHeaderError(hdr+" was not a signed header")});if(options.algorithms){if(options.algorithms.indexOf(parsed.params.algorithm)===-1)throw new InvalidParamsError(parsed.params.algorithm+" is not a supported algorithm")}return parsed}}},{"./utils":147,"assert-plus":28,util:293}],146:[function(require,module,exports){!function(Buffer){var assert=require("assert-plus");var crypto=require("crypto");var http=require("http");var util=require("util");var sshpk=require("sshpk");var jsprim=require("jsprim");var utils=require("./utils");var sprintf=require("util").format;var HASH_ALGOS=utils.HASH_ALGOS;var PK_ALGOS=utils.PK_ALGOS;var InvalidAlgorithmError=utils.InvalidAlgorithmError;var HttpSignatureError=utils.HttpSignatureError;var validateAlgorithm=utils.validateAlgorithm;var AUTHZ_FMT='Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"';function MissingHeaderError(message){HttpSignatureError.call(this,message,MissingHeaderError)}util.inherits(MissingHeaderError,HttpSignatureError);function StrictParsingError(message){HttpSignatureError.call(this,message,StrictParsingError)}util.inherits(StrictParsingError,HttpSignatureError);function RequestSigner(options){assert.object(options,"options");var alg=[];if(options.algorithm!==undefined){assert.string(options.algorithm,"options.algorithm");alg=validateAlgorithm(options.algorithm)}this.rs_alg=alg;if(options.sign!==undefined){assert.func(options.sign,"options.sign");this.rs_signFunc=options.sign}else if(alg[0]==="hmac"&&options.key!==undefined){assert.string(options.keyId,"options.keyId");this.rs_keyId=options.keyId;if(typeof options.key!=="string"&&!Buffer.isBuffer(options.key))throw new TypeError("options.key for HMAC must be a string or Buffer");this.rs_signer=crypto.createHmac(alg[1].toUpperCase(),options.key);this.rs_signer.sign=function(){var digest=this.digest("base64");return{hashAlgorithm:alg[1],toString:function(){return digest}}}}else if(options.key!==undefined){var key=options.key;if(typeof key==="string"||Buffer.isBuffer(key))key=sshpk.parsePrivateKey(key);assert.ok(sshpk.PrivateKey.isPrivateKey(key,[1,2]),"options.key must be a sshpk.PrivateKey");this.rs_key=key;assert.string(options.keyId,"options.keyId");this.rs_keyId=options.keyId;if(!PK_ALGOS[key.type]){throw new InvalidAlgorithmError(key.type.toUpperCase()+" type "+"keys are not supported")}if(alg[0]!==undefined&&key.type!==alg[0]){throw new InvalidAlgorithmError("options.key must be a "+alg[0].toUpperCase()+" key, was given a "+key.type.toUpperCase()+" key instead")}this.rs_signer=key.createSign(alg[1])}else{throw new TypeError("options.sign (func) or options.key is required")}this.rs_headers=[];this.rs_lines=[]}RequestSigner.prototype.writeHeader=function(header,value){assert.string(header,"header");header=header.toLowerCase();assert.string(value,"value");this.rs_headers.push(header);if(this.rs_signFunc){this.rs_lines.push(header+": "+value)}else{var line=header+": "+value;if(this.rs_headers.length>0)line="\n"+line;this.rs_signer.update(line)}return value};RequestSigner.prototype.writeDateHeader=function(){return this.writeHeader("date",jsprim.rfc1123(new Date))};RequestSigner.prototype.writeTarget=function(method,path){assert.string(method,"method");assert.string(path,"path");method=method.toLowerCase();this.writeHeader("(request-target)",method+" "+path)};RequestSigner.prototype.sign=function(cb){assert.func(cb,"callback");if(this.rs_headers.length<1)throw new Error("At least one header must be signed");var alg,authz;if(this.rs_signFunc){var data=this.rs_lines.join("\n");var self=this;this.rs_signFunc(data,function(err,sig){if(err){cb(err);return}try{assert.object(sig,"signature");assert.string(sig.keyId,"signature.keyId");assert.string(sig.algorithm,"signature.algorithm");assert.string(sig.signature,"signature.signature");alg=validateAlgorithm(sig.algorithm);authz=sprintf(AUTHZ_FMT,sig.keyId,sig.algorithm,self.rs_headers.join(" "),sig.signature)}catch(e){cb(e);return}cb(null,authz)})}else{try{var sigObj=this.rs_signer.sign()}catch(e){cb(e);return}alg=(this.rs_alg[0]||this.rs_key.type)+"-"+sigObj.hashAlgorithm;var signature=sigObj.toString();authz=sprintf(AUTHZ_FMT,this.rs_keyId,alg,this.rs_headers.join(" "),signature);cb(null,authz)}};module.exports={isSigner:function(obj){if(typeof obj==="object"&&obj instanceof RequestSigner)return true;return false},createSigner:function createSigner(options){return new RequestSigner(options)},signRequest:function signRequest(request,options){assert.object(request,"request");assert.object(options,"options");assert.optionalString(options.algorithm,"options.algorithm");assert.string(options.keyId,"options.keyId");assert.optionalArrayOfString(options.headers,"options.headers");assert.optionalString(options.httpVersion,"options.httpVersion");if(!request.getHeader("Date"))request.setHeader("Date",jsprim.rfc1123(new Date));if(!options.headers)options.headers=["date"];if(!options.httpVersion)options.httpVersion="1.1";var alg=[];if(options.algorithm){options.algorithm=options.algorithm.toLowerCase();alg=validateAlgorithm(options.algorithm)}var i;var stringToSign="";for(i=0;i>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],151:[function(require,module,exports){var indexOf=[].indexOf;module.exports=function(arr,obj){if(indexOf)return arr.indexOf(obj);for(var i=0;i 9007199254740992 || "+name+" < -9007199254740992)"};types.string=function(name){return"typeof "+name+' === "string"'};var unique=function(array){var list=[];for(var i=0;i1){var factorName=(name|0)!==name?Math.pow(10,name.toString().split(".").pop().length):1;if(factorName>factor)res=true;else res=Math.round(factor*name)%(factor*multipleOf)}else res=name%multipleOf;return!res};var toType=function(node){return node.type};var compile=function(schema,cache,root,reporter,opts){var fmts=opts?xtend(formats,opts.formats):formats;var scope={unique:unique,formats:fmts,isMultipleOf:isMultipleOf};var verbose=opts?!!opts.verbose:false;var greedy=opts&&opts.greedy!==undefined?opts.greedy:false;var syms={};var gensym=function(name){return name+(syms[name]=(syms[name]||0)+1)};var reversePatterns={};var patterns=function(p){if(reversePatterns[p])return reversePatterns[p];var n=gensym("pattern");scope[n]=new RegExp(p);reversePatterns[p]=n;return n};var vars=["i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","y","z"];var genloop=function(){var v=vars.shift();vars.push(v+v[0]);return v};var visit=function(name,node,reporter,filter){var properties=node.properties;var type=node.type;var tuple=false;if(Array.isArray(node.items)){properties={};node.items.forEach(function(item,i){properties[i]=item});type="array";tuple=true}var indent=0;var error=function(msg,prop,value){validate("errors++");if(reporter===true){validate("if (validate.errors === null) validate.errors = []");if(verbose){validate("validate.errors.push({field:%s,message:%s,value:%s,type:%s})",formatName(prop||name),JSON.stringify(msg),value||name,JSON.stringify(type))}else{validate("validate.errors.push({field:%s,message:%s})",formatName(prop||name),JSON.stringify(msg))}}};if(node.required===true){indent++;validate("if (%s === undefined) {",name);error("is required");validate("} else {")}else{indent++;validate("if (%s !== undefined) {",name)}var valid=[].concat(type).map(function(t){return types[t||"any"](name)}).join(" || ")||"true";if(valid!=="true"){indent++;validate("if (!(%s)) {",valid);error("is the wrong type");validate("} else {")}if(tuple){if(node.additionalItems===false){validate("if (%s.length > %d) {",name,node.items.length);error("has additional items");validate("}")}else if(node.additionalItems){var i=genloop();validate("for (var %s = %d; %s < %s.length; %s++) {",i,node.items.length,i,name,i);visit(name+"["+i+"]",node.additionalItems,reporter,filter);validate("}")}}if(node.format&&fmts[node.format]){if(type!=="string"&&formats[node.format])validate("if (%s) {",types.string(name));var n=gensym("format");scope[n]=fmts[node.format];if(typeof scope[n]==="function")validate("if (!%s(%s)) {",n,name);else validate("if (!%s.test(%s)) {",n,name);error("must be "+node.format+" format");validate("}");if(type!=="string"&&formats[node.format])validate("}")}if(Array.isArray(node.required)){var isUndefined=function(req){return genobj(name,req)+" === undefined"};var checkRequired=function(req){var prop=genobj(name,req);validate("if (%s === undefined) {",prop);error("is required",prop);validate("missing++");validate("}")};validate("if ((%s)) {",type!=="object"?types.object(name):"true");validate("var missing = 0");node.required.map(checkRequired);validate("}");if(!greedy){validate("if (missing === 0) {");indent++}}if(node.uniqueItems){if(type!=="array")validate("if (%s) {",types.array(name));validate("if (!(unique(%s))) {",name);error("must be unique");validate("}");if(type!=="array")validate("}")}if(node.enum){var complex=node.enum.some(function(e){return typeof e==="object"});var compare=complex?function(e){return"JSON.stringify("+name+")"+" !== JSON.stringify("+JSON.stringify(e)+")"}:function(e){return name+" !== "+JSON.stringify(e)};validate("if (%s) {",node.enum.map(compare).join(" && ")||"false");error("must be an enum value");validate("}")}if(node.dependencies){if(type!=="object")validate("if (%s) {",types.object(name));Object.keys(node.dependencies).forEach(function(key){var deps=node.dependencies[key];if(typeof deps==="string")deps=[deps];var exists=function(k){return genobj(name,k)+" !== undefined"};if(Array.isArray(deps)){validate("if (%s !== undefined && !(%s)) {",genobj(name,key),deps.map(exists).join(" && ")||"true");error("dependencies not set");validate("}")}if(typeof deps==="object"){validate("if (%s !== undefined) {",genobj(name,key));visit(name,deps,reporter,filter);validate("}")}});if(type!=="object")validate("}")}if(node.additionalProperties||node.additionalProperties===false){if(type!=="object")validate("if (%s) {",types.object(name));var i=genloop();var keys=gensym("keys");var toCompare=function(p){return keys+"["+i+"] !== "+JSON.stringify(p)};var toTest=function(p){return"!"+patterns(p)+".test("+keys+"["+i+"])"};var additionalProp=Object.keys(properties||{}).map(toCompare).concat(Object.keys(node.patternProperties||{}).map(toTest)).join(" && ")||"true";validate("var %s = Object.keys(%s)",keys,name)("for (var %s = 0; %s < %s.length; %s++) {",i,i,keys,i)("if (%s) {",additionalProp);if(node.additionalProperties===false){if(filter)validate("delete %s",name+"["+keys+"["+i+"]]");error("has additional properties",null,JSON.stringify(name+".")+" + "+keys+"["+i+"]")}else{visit(name+"["+keys+"["+i+"]]",node.additionalProperties,reporter,filter)}validate("}")("}");if(type!=="object")validate("}")}if(node.$ref){var sub=get(root,opts&&opts.schemas||{},node.$ref);if(sub){var fn=cache[node.$ref];if(!fn){cache[node.$ref]=function proxy(data){return fn(data)};fn=compile(sub,cache,root,false,opts)}var n=gensym("ref");scope[n]=fn;validate("if (!(%s(%s))) {",n,name);error("referenced schema does not match");validate("}")}}if(node.not){var prev=gensym("prev");validate("var %s = errors",prev);visit(name,node.not,false,filter);validate("if (%s === errors) {",prev);error("negative schema matches");validate("} else {")("errors = %s",prev)("}")}if(node.items&&!tuple){if(type!=="array")validate("if (%s) {",types.array(name));var i=genloop();validate("for (var %s = 0; %s < %s.length; %s++) {",i,i,name,i);visit(name+"["+i+"]",node.items,reporter,filter);validate("}");if(type!=="array")validate("}")}if(node.patternProperties){if(type!=="object")validate("if (%s) {",types.object(name));var keys=gensym("keys");var i=genloop();validate("var %s = Object.keys(%s)",keys,name)("for (var %s = 0; %s < %s.length; %s++) {",i,i,keys,i);Object.keys(node.patternProperties).forEach(function(key){var p=patterns(key);validate("if (%s.test(%s)) {",p,keys+"["+i+"]");visit(name+"["+keys+"["+i+"]]",node.patternProperties[key],reporter,filter);validate("}")});validate("}");if(type!=="object")validate("}")}if(node.pattern){var p=patterns(node.pattern);if(type!=="string")validate("if (%s) {",types.string(name));validate("if (!(%s.test(%s))) {",p,name);error("pattern mismatch");validate("}");if(type!=="string")validate("}")}if(node.allOf){node.allOf.forEach(function(sch){visit(name,sch,reporter,filter)})}if(node.anyOf&&node.anyOf.length){var prev=gensym("prev");node.anyOf.forEach(function(sch,i){if(i===0){validate("var %s = errors",prev)}else{validate("if (errors !== %s) {",prev)("errors = %s",prev)}visit(name,sch,false,false)});node.anyOf.forEach(function(sch,i){if(i)validate("}")});validate("if (%s !== errors) {",prev);error("no schemas match");validate("}")}if(node.oneOf&&node.oneOf.length){var prev=gensym("prev");var passes=gensym("passes");validate("var %s = errors",prev)("var %s = 0",passes);node.oneOf.forEach(function(sch,i){visit(name,sch,false,false);validate("if (%s === errors) {",prev)("%s++",passes)("} else {")("errors = %s",prev)("}")});validate("if (%s !== 1) {",passes);error("no (or more than one) schemas match");validate("}")}if(node.multipleOf!==undefined){if(type!=="number"&&type!=="integer")validate("if (%s) {",types.number(name));validate("if (!isMultipleOf(%s, %d)) {",name,node.multipleOf);error("has a remainder");validate("}");if(type!=="number"&&type!=="integer")validate("}")}if(node.maxProperties!==undefined){if(type!=="object")validate("if (%s) {",types.object(name));validate("if (Object.keys(%s).length > %d) {",name,node.maxProperties);error("has more properties than allowed");validate("}");if(type!=="object")validate("}")}if(node.minProperties!==undefined){if(type!=="object")validate("if (%s) {",types.object(name));validate("if (Object.keys(%s).length < %d) {",name,node.minProperties);error("has less properties than allowed");validate("}");if(type!=="object")validate("}")}if(node.maxItems!==undefined){if(type!=="array")validate("if (%s) {",types.array(name));validate("if (%s.length > %d) {",name,node.maxItems);error("has more items than allowed");validate("}");if(type!=="array")validate("}")}if(node.minItems!==undefined){if(type!=="array")validate("if (%s) {",types.array(name));validate("if (%s.length < %d) {",name,node.minItems);error("has less items than allowed");validate("}");if(type!=="array")validate("}")}if(node.maxLength!==undefined){if(type!=="string")validate("if (%s) {",types.string(name));validate("if (%s.length > %d) {",name,node.maxLength);error("has longer length than allowed");validate("}");if(type!=="string")validate("}")}if(node.minLength!==undefined){if(type!=="string")validate("if (%s) {",types.string(name));validate("if (%s.length < %d) {",name,node.minLength);error("has less length than allowed");validate("}");if(type!=="string")validate("}")}if(node.minimum!==undefined){if(type!=="number"&&type!=="integer")validate("if (%s) {",types.number(name));validate("if (%s %s %d) {",name,node.exclusiveMinimum?"<=":"<",node.minimum);error("is less than minimum");validate("}");if(type!=="number"&&type!=="integer")validate("}")}if(node.maximum!==undefined){if(type!=="number"&&type!=="integer")validate("if (%s) {",types.number(name)); +validate("if (%s %s %d) {",name,node.exclusiveMaximum?">=":">",node.maximum);error("is more than maximum");validate("}");if(type!=="number"&&type!=="integer")validate("}")}if(properties){Object.keys(properties).forEach(function(p){if(Array.isArray(type)&&type.indexOf("null")!==-1)validate("if (%s !== null) {",name);visit(genobj(name,p),properties[p],reporter,filter);if(Array.isArray(type)&&type.indexOf("null")!==-1)validate("}")})}while(indent--)validate("}")};var validate=genfun("function validate(data) {")("if (data === undefined) data = null")("validate.errors = null")("var errors = 0");visit("data",schema,reporter,opts&&opts.filter);validate("return errors === 0")("}");validate=validate.toFunction(scope);validate.errors=null;if(Object.defineProperty){Object.defineProperty(validate,"error",{get:function(){if(!validate.errors)return"";return validate.errors.map(function(err){return err.field+" "+err.message}).join("\n")}})}validate.toJSON=function(){return schema};return validate};module.exports=function(schema,opts){if(typeof schema==="string")schema=JSON.parse(schema);return compile(schema,{},schema,true,opts)};module.exports.filter=function(schema,opts){var validate=module.exports(schema,xtend(opts,{filter:true}));return function(sch){validate(sch);return sch}}},{"./formats":154,"generate-function":116,"generate-object-property":117,jsonpointer:169,xtend:304}],156:[function(require,module,exports){"use strict";function isProperty(str){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(str)}module.exports=isProperty},{}],157:[function(require,module,exports){module.exports=isTypedArray;isTypedArray.strict=isStrictTypedArray;isTypedArray.loose=isLooseTypedArray;var toString=Object.prototype.toString;var names={"[object Int8Array]":true,"[object Int16Array]":true,"[object Int32Array]":true,"[object Uint8Array]":true,"[object Uint8ClampedArray]":true,"[object Uint16Array]":true,"[object Uint32Array]":true,"[object Float32Array]":true,"[object Float64Array]":true};function isTypedArray(arr){return isStrictTypedArray(arr)||isLooseTypedArray(arr)}function isStrictTypedArray(arr){return arr instanceof Int8Array||arr instanceof Int16Array||arr instanceof Int32Array||arr instanceof Uint8Array||arr instanceof Uint8ClampedArray||arr instanceof Uint16Array||arr instanceof Uint32Array||arr instanceof Float32Array||arr instanceof Float64Array}function isLooseTypedArray(arr){return names[toString.call(arr)]}},{}],158:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],159:[function(require,module,exports){var stream=require("stream");function isStream(obj){return obj instanceof stream.Stream}function isReadable(obj){return isStream(obj)&&typeof obj._read=="function"&&typeof obj._readableState=="object"}function isWritable(obj){return isStream(obj)&&typeof obj._write=="function"&&typeof obj._writableState=="object"}function isDuplex(obj){return isReadable(obj)&&isWritable(obj)}module.exports=isStream;module.exports.isReadable=isReadable;module.exports.isWritable=isWritable;module.exports.isDuplex=isDuplex},{stream:271}],160:[function(require,module,exports){"use strict";var dh=require("./lib/dh");var eddsa=require("./lib/eddsa");var curve255=require("./lib/curve255");var utils=require("./lib/utils");var ns={};ns.VERSION="0.7.1";ns.dh=dh;ns.eddsa=eddsa;ns.curve255=curve255;ns.utils=utils;module.exports=ns},{"./lib/curve255":162,"./lib/dh":163,"./lib/eddsa":164,"./lib/utils":165}],161:[function(require,module,exports){"use strict";var crypto=require("crypto");var ns={};function _setbit(n,c,v){var i=c>>4;var a=n[i];a=a+(1<<(c&15))*v;n[i]=a}function _getbit(n,c){return n[c>>4]>>(c&15)&1}function _ZERO(){return[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function _ONE(){return[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function _BASE(){return[9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function _bigintcmp(a,b){var c,abs_r,mask;var r=0;for(c=15;c>=0;c--){var x=a[c];var y=b[c];r=r+(x-y)*(1-r*r);mask=r>>31;abs_r=r+mask^mask;r=~~((r<<1)/(abs_r+1))}return r}function _bigintadd(a,b){var r=[];var v;r[0]=(v=a[0]+b[0])&65535;r[1]=(v=(v>>>16)+a[1]+b[1])&65535;r[2]=(v=(v>>>16)+a[2]+b[2])&65535;r[3]=(v=(v>>>16)+a[3]+b[3])&65535;r[4]=(v=(v>>>16)+a[4]+b[4])&65535;r[5]=(v=(v>>>16)+a[5]+b[5])&65535;r[6]=(v=(v>>>16)+a[6]+b[6])&65535;r[7]=(v=(v>>>16)+a[7]+b[7])&65535;r[8]=(v=(v>>>16)+a[8]+b[8])&65535;r[9]=(v=(v>>>16)+a[9]+b[9])&65535;r[10]=(v=(v>>>16)+a[10]+b[10])&65535;r[11]=(v=(v>>>16)+a[11]+b[11])&65535;r[12]=(v=(v>>>16)+a[12]+b[12])&65535;r[13]=(v=(v>>>16)+a[13]+b[13])&65535;r[14]=(v=(v>>>16)+a[14]+b[14])&65535;r[15]=(v>>>16)+a[15]+b[15];return r}function _bigintsub(a,b){var r=[];var v;r[0]=(v=524288+a[0]-b[0])&65535;r[1]=(v=(v>>>16)+524280+a[1]-b[1])&65535;r[2]=(v=(v>>>16)+524280+a[2]-b[2])&65535;r[3]=(v=(v>>>16)+524280+a[3]-b[3])&65535;r[4]=(v=(v>>>16)+524280+a[4]-b[4])&65535;r[5]=(v=(v>>>16)+524280+a[5]-b[5])&65535;r[6]=(v=(v>>>16)+524280+a[6]-b[6])&65535;r[7]=(v=(v>>>16)+524280+a[7]-b[7])&65535;r[8]=(v=(v>>>16)+524280+a[8]-b[8])&65535;r[9]=(v=(v>>>16)+524280+a[9]-b[9])&65535;r[10]=(v=(v>>>16)+524280+a[10]-b[10])&65535;r[11]=(v=(v>>>16)+524280+a[11]-b[11])&65535;r[12]=(v=(v>>>16)+524280+a[12]-b[12])&65535;r[13]=(v=(v>>>16)+524280+a[13]-b[13])&65535;r[14]=(v=(v>>>16)+524280+a[14]-b[14])&65535;r[15]=(v>>>16)-8+a[15]-b[15];return r}function _sqr8h(a7,a6,a5,a4,a3,a2,a1,a0){var r=[];var v;r[0]=(v=a0*a0)&65535;r[1]=(v=(0|v/65536)+2*a0*a1)&65535;r[2]=(v=(0|v/65536)+2*a0*a2+a1*a1)&65535;r[3]=(v=(0|v/65536)+2*a0*a3+2*a1*a2)&65535;r[4]=(v=(0|v/65536)+2*a0*a4+2*a1*a3+a2*a2)&65535;r[5]=(v=(0|v/65536)+2*a0*a5+2*a1*a4+2*a2*a3)&65535;r[6]=(v=(0|v/65536)+2*a0*a6+2*a1*a5+2*a2*a4+a3*a3)&65535;r[7]=(v=(0|v/65536)+2*a0*a7+2*a1*a6+2*a2*a5+2*a3*a4)&65535;r[8]=(v=(0|v/65536)+2*a1*a7+2*a2*a6+2*a3*a5+a4*a4)&65535;r[9]=(v=(0|v/65536)+2*a2*a7+2*a3*a6+2*a4*a5)&65535;r[10]=(v=(0|v/65536)+2*a3*a7+2*a4*a6+a5*a5)&65535;r[11]=(v=(0|v/65536)+2*a4*a7+2*a5*a6)&65535;r[12]=(v=(0|v/65536)+2*a5*a7+a6*a6)&65535;r[13]=(v=(0|v/65536)+2*a6*a7)&65535;r[14]=(v=(0|v/65536)+a7*a7)&65535;r[15]=0|v/65536;return r}function _sqrmodp(a){var x=_sqr8h(a[15],a[14],a[13],a[12],a[11],a[10],a[9],a[8]);var z=_sqr8h(a[7],a[6],a[5],a[4],a[3],a[2],a[1],a[0]);var y=_sqr8h(a[15]+a[7],a[14]+a[6],a[13]+a[5],a[12]+a[4],a[11]+a[3],a[10]+a[2],a[9]+a[1],a[8]+a[0]);var r=[];var v;r[0]=(v=8388608+z[0]+(y[8]-x[8]-z[8]+x[0]-128)*38)&65535;r[1]=(v=8388480+(v>>>16)+z[1]+(y[9]-x[9]-z[9]+x[1])*38)&65535;r[2]=(v=8388480+(v>>>16)+z[2]+(y[10]-x[10]-z[10]+x[2])*38)&65535;r[3]=(v=8388480+(v>>>16)+z[3]+(y[11]-x[11]-z[11]+x[3])*38)&65535;r[4]=(v=8388480+(v>>>16)+z[4]+(y[12]-x[12]-z[12]+x[4])*38)&65535;r[5]=(v=8388480+(v>>>16)+z[5]+(y[13]-x[13]-z[13]+x[5])*38)&65535;r[6]=(v=8388480+(v>>>16)+z[6]+(y[14]-x[14]-z[14]+x[6])*38)&65535;r[7]=(v=8388480+(v>>>16)+z[7]+(y[15]-x[15]-z[15]+x[7])*38)&65535;r[8]=(v=8388480+(v>>>16)+z[8]+y[0]-x[0]-z[0]+x[8]*38)&65535;r[9]=(v=8388480+(v>>>16)+z[9]+y[1]-x[1]-z[1]+x[9]*38)&65535;r[10]=(v=8388480+(v>>>16)+z[10]+y[2]-x[2]-z[2]+x[10]*38)&65535;r[11]=(v=8388480+(v>>>16)+z[11]+y[3]-x[3]-z[3]+x[11]*38)&65535;r[12]=(v=8388480+(v>>>16)+z[12]+y[4]-x[4]-z[4]+x[12]*38)&65535;r[13]=(v=8388480+(v>>>16)+z[13]+y[5]-x[5]-z[5]+x[13]*38)&65535;r[14]=(v=8388480+(v>>>16)+z[14]+y[6]-x[6]-z[6]+x[14]*38)&65535;r[15]=8388480+(v>>>16)+z[15]+y[7]-x[7]-z[7]+x[15]*38;_reduce(r);return r}function _mul8h(a7,a6,a5,a4,a3,a2,a1,a0,b7,b6,b5,b4,b3,b2,b1,b0){var r=[];var v;r[0]=(v=a0*b0)&65535;r[1]=(v=(0|v/65536)+a0*b1+a1*b0)&65535;r[2]=(v=(0|v/65536)+a0*b2+a1*b1+a2*b0)&65535;r[3]=(v=(0|v/65536)+a0*b3+a1*b2+a2*b1+a3*b0)&65535;r[4]=(v=(0|v/65536)+a0*b4+a1*b3+a2*b2+a3*b1+a4*b0)&65535;r[5]=(v=(0|v/65536)+a0*b5+a1*b4+a2*b3+a3*b2+a4*b1+a5*b0)&65535;r[6]=(v=(0|v/65536)+a0*b6+a1*b5+a2*b4+a3*b3+a4*b2+a5*b1+a6*b0)&65535;r[7]=(v=(0|v/65536)+a0*b7+a1*b6+a2*b5+a3*b4+a4*b3+a5*b2+a6*b1+a7*b0)&65535;r[8]=(v=(0|v/65536)+a1*b7+a2*b6+a3*b5+a4*b4+a5*b3+a6*b2+a7*b1)&65535;r[9]=(v=(0|v/65536)+a2*b7+a3*b6+a4*b5+a5*b4+a6*b3+a7*b2)&65535;r[10]=(v=(0|v/65536)+a3*b7+a4*b6+a5*b5+a6*b4+a7*b3)&65535;r[11]=(v=(0|v/65536)+a4*b7+a5*b6+a6*b5+a7*b4)&65535;r[12]=(v=(0|v/65536)+a5*b7+a6*b6+a7*b5)&65535;r[13]=(v=(0|v/65536)+a6*b7+a7*b6)&65535;r[14]=(v=(0|v/65536)+a7*b7)&65535;r[15]=0|v/65536;return r}function _mulmodp(a,b){var x=_mul8h(a[15],a[14],a[13],a[12],a[11],a[10],a[9],a[8],b[15],b[14],b[13],b[12],b[11],b[10],b[9],b[8]);var z=_mul8h(a[7],a[6],a[5],a[4],a[3],a[2],a[1],a[0],b[7],b[6],b[5],b[4],b[3],b[2],b[1],b[0]);var y=_mul8h(a[15]+a[7],a[14]+a[6],a[13]+a[5],a[12]+a[4],a[11]+a[3],a[10]+a[2],a[9]+a[1],a[8]+a[0],b[15]+b[7],b[14]+b[6],b[13]+b[5],b[12]+b[4],b[11]+b[3],b[10]+b[2],b[9]+b[1],b[8]+b[0]);var r=[];var v;r[0]=(v=8388608+z[0]+(y[8]-x[8]-z[8]+x[0]-128)*38)&65535;r[1]=(v=8388480+(v>>>16)+z[1]+(y[9]-x[9]-z[9]+x[1])*38)&65535;r[2]=(v=8388480+(v>>>16)+z[2]+(y[10]-x[10]-z[10]+x[2])*38)&65535;r[3]=(v=8388480+(v>>>16)+z[3]+(y[11]-x[11]-z[11]+x[3])*38)&65535;r[4]=(v=8388480+(v>>>16)+z[4]+(y[12]-x[12]-z[12]+x[4])*38)&65535;r[5]=(v=8388480+(v>>>16)+z[5]+(y[13]-x[13]-z[13]+x[5])*38)&65535;r[6]=(v=8388480+(v>>>16)+z[6]+(y[14]-x[14]-z[14]+x[6])*38)&65535;r[7]=(v=8388480+(v>>>16)+z[7]+(y[15]-x[15]-z[15]+x[7])*38)&65535;r[8]=(v=8388480+(v>>>16)+z[8]+y[0]-x[0]-z[0]+x[8]*38)&65535;r[9]=(v=8388480+(v>>>16)+z[9]+y[1]-x[1]-z[1]+x[9]*38)&65535;r[10]=(v=8388480+(v>>>16)+z[10]+y[2]-x[2]-z[2]+x[10]*38)&65535;r[11]=(v=8388480+(v>>>16)+z[11]+y[3]-x[3]-z[3]+x[11]*38)&65535;r[12]=(v=8388480+(v>>>16)+z[12]+y[4]-x[4]-z[4]+x[12]*38)&65535;r[13]=(v=8388480+(v>>>16)+z[13]+y[5]-x[5]-z[5]+x[13]*38)&65535;r[14]=(v=8388480+(v>>>16)+z[14]+y[6]-x[6]-z[6]+x[14]*38)&65535;r[15]=8388480+(v>>>16)+z[15]+y[7]-x[7]-z[7]+x[15]*38;_reduce(r);return r}function _reduce(arr){var aCopy=arr.slice(0);var choice=[arr,aCopy];var v=arr[15];var a=choice[v<32768&1];a[15]=v&32767;v=(0|v/32768)*19;a[0]=(v+=a[0])&65535;v=v>>>16;a[1]=(v+=a[1])&65535;v=v>>>16;a[2]=(v+=a[2])&65535;v=v>>>16;a[3]=(v+=a[3])&65535;v=v>>>16;a[4]=(v+=a[4])&65535;v=v>>>16;a[5]=(v+=a[5])&65535;v=v>>>16;a[6]=(v+=a[6])&65535;v=v>>>16;a[7]=(v+=a[7])&65535;v=v>>>16;a[8]=(v+=a[8])&65535;v=v>>>16;a[9]=(v+=a[9])&65535;v=v>>>16;a[10]=(v+=a[10])&65535;v=v>>>16;a[11]=(v+=a[11])&65535;v=v>>>16;a[12]=(v+=a[12])&65535;v=v>>>16;a[13]=(v+=a[13])&65535;v=v>>>16;a[14]=(v+=a[14])&65535;v=v>>>16;a[15]+=v}function _addmodp(a,b){var r=[];var v;r[0]=(v=((0|a[15]>>>15)+(0|b[15]>>>15))*19+a[0]+b[0])&65535;r[1]=(v=(v>>>16)+a[1]+b[1])&65535;r[2]=(v=(v>>>16)+a[2]+b[2])&65535;r[3]=(v=(v>>>16)+a[3]+b[3])&65535;r[4]=(v=(v>>>16)+a[4]+b[4])&65535;r[5]=(v=(v>>>16)+a[5]+b[5])&65535;r[6]=(v=(v>>>16)+a[6]+b[6])&65535;r[7]=(v=(v>>>16)+a[7]+b[7])&65535;r[8]=(v=(v>>>16)+a[8]+b[8])&65535;r[9]=(v=(v>>>16)+a[9]+b[9])&65535;r[10]=(v=(v>>>16)+a[10]+b[10])&65535;r[11]=(v=(v>>>16)+a[11]+b[11])&65535;r[12]=(v=(v>>>16)+a[12]+b[12])&65535;r[13]=(v=(v>>>16)+a[13]+b[13])&65535;r[14]=(v=(v>>>16)+a[14]+b[14])&65535;r[15]=(v>>>16)+(a[15]&32767)+(b[15]&32767);return r}function _submodp(a,b){var r=[];var v;r[0]=(v=524288+((0|a[15]>>>15)-(0|b[15]>>>15)-1)*19+a[0]-b[0])&65535;r[1]=(v=(v>>>16)+524280+a[1]-b[1])&65535;r[2]=(v=(v>>>16)+524280+a[2]-b[2])&65535;r[3]=(v=(v>>>16)+524280+a[3]-b[3])&65535;r[4]=(v=(v>>>16)+524280+a[4]-b[4])&65535;r[5]=(v=(v>>>16)+524280+a[5]-b[5])&65535;r[6]=(v=(v>>>16)+524280+a[6]-b[6])&65535;r[7]=(v=(v>>>16)+524280+a[7]-b[7])&65535;r[8]=(v=(v>>>16)+524280+a[8]-b[8])&65535;r[9]=(v=(v>>>16)+524280+a[9]-b[9])&65535;r[10]=(v=(v>>>16)+524280+a[10]-b[10])&65535;r[11]=(v=(v>>>16)+524280+a[11]-b[11])&65535;r[12]=(v=(v>>>16)+524280+a[12]-b[12])&65535;r[13]=(v=(v>>>16)+524280+a[13]-b[13])&65535;r[14]=(v=(v>>>16)+524280+a[14]-b[14])&65535;r[15]=(v>>>16)+32760+(a[15]&32767)-(b[15]&32767);return r}function _invmodp(a){var c=a;var i=250;while(--i){a=_sqrmodp(a);a=_mulmodp(a,c)}a=_sqrmodp(a);a=_sqrmodp(a);a=_mulmodp(a,c);a=_sqrmodp(a);a=_sqrmodp(a);a=_mulmodp(a,c);a=_sqrmodp(a);a=_mulmodp(a,c);return a}function _mulasmall(a){var m=121665;var r=[];var v;r[0]=(v=a[0]*m)&65535;r[1]=(v=(0|v/65536)+a[1]*m)&65535;r[2]=(v=(0|v/65536)+a[2]*m)&65535;r[3]=(v=(0|v/65536)+a[3]*m)&65535;r[4]=(v=(0|v/65536)+a[4]*m)&65535;r[5]=(v=(0|v/65536)+a[5]*m)&65535;r[6]=(v=(0|v/65536)+a[6]*m)&65535;r[7]=(v=(0|v/65536)+a[7]*m)&65535;r[8]=(v=(0|v/65536)+a[8]*m)&65535;r[9]=(v=(0|v/65536)+a[9]*m)&65535;r[10]=(v=(0|v/65536)+a[10]*m)&65535;r[11]=(v=(0|v/65536)+a[11]*m)&65535;r[12]=(v=(0|v/65536)+a[12]*m)&65535;r[13]=(v=(0|v/65536)+a[13]*m)&65535;r[14]=(v=(0|v/65536)+a[14]*m)&65535;r[15]=(0|v/65536)+a[15]*m;_reduce(r);return r}function _dbl(x,z){var x_2,z_2,m,n,o;m=_sqrmodp(_addmodp(x,z));n=_sqrmodp(_submodp(x,z));o=_submodp(m,n);x_2=_mulmodp(n,m);z_2=_mulmodp(_addmodp(_mulasmall(o),m),o);return[x_2,z_2]}function _sum(x,z,x_p,z_p,x_1){var x_3,z_3,p,q;p=_mulmodp(_submodp(x,z),_addmodp(x_p,z_p));q=_mulmodp(_addmodp(x,z),_submodp(x_p,z_p));x_3=_sqrmodp(_addmodp(p,q));z_3=_mulmodp(_sqrmodp(_submodp(p,q)),x_1);return[x_3,z_3]}function _generateKey(curve25519){var buffer=crypto.randomBytes(32);if(curve25519===true){buffer[0]&=248;buffer[31]=buffer[31]&127|64}var result=[];for(var i=0;i=0){var r,s;var b=core.getbit(f,n);r=core.sum(aq[0][0],aq[0][1],aq[1][0],aq[1][1],x_1);s=core.dbl(aq[1-b][0],aq[1-b][1]);aq[1-b]=s;aq[b]=r;n--}q=aq[1];q[1]=core.invmodp(q[1]);q[0]=core.mulmodp(q[0],q[1]);core.reduce(q[0]);return q[0]}function curve25519b32(a,b){return _base32encode(curve25519(_base32decode(a),_base32decode(b)))}function curve25519(f,c){if(!c){c=core.BASE()}f[0]&=65528;f[15]=f[15]&32767|16384;return curve25519_raw(f,c)}function _hexEncodeVector(k){var hexKey=utils.hexEncode(k);hexKey=new Array(64+1-hexKey.length).join("0")+hexKey;return hexKey.split(/(..)/).reverse().join("")}function _hexDecodeVector(v){var hexKey=v.split(/(..)/).reverse().join("");return utils.hexDecode(hexKey)}ns.curve25519=curve25519;ns.curve25519_raw=curve25519_raw;ns.hexEncodeVector=_hexEncodeVector;ns.hexDecodeVector=_hexDecodeVector;ns.hexencode=utils.hexEncode;ns.hexdecode=utils.hexDecode;ns.base32encode=utils.base32encode;ns.base32decode=utils.base32decode;module.exports=ns},{"./core":161,"./utils":165}],163:[function(require,module,exports){!function(Buffer){"use strict";var core=require("./core");var utils=require("./utils");var curve255=require("./curve255");var ns={};function _toString(vector){var u=new Uint16Array(vector);return new Buffer(new Uint8Array(u.buffer))}function _fromString(vector){if(Buffer.isBuffer(vector)){var u=new Uint8Array(vector);return new Uint16Array(u.buffer)}var result=new Array(16);for(var i=0,l=0;i>16,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}else if(value instanceof _bi255){this.n=value.n.slice(0)}else{throw"Bad argument for bignum: "+value}}_bi255.prototype={toString:function(){return utils.hexEncode(this.n)},toSource:function(){return"_"+utils.hexEncode(this.n)},plus:function(n1){return _bi255(core.bigintadd(this.n,n1.n))},minus:function(n1){return _bi255(core.bigintsub(this.n,n1.n)).modq()},times:function(n1){return _bi255(core.mulmodp(this.n,n1.n))},divide:function(n1){return this.times(n1.inv())},sqr:function(){return _bi255(core.sqrmodp(this.n))},cmp:function(n1){return core.bigintcmp(this.n,n1.n)},equals:function(n1){return this.cmp(n1)===0},isOdd:function(){return(this.n[0]&1)===1},shiftLeft:function(cnt){_shiftL(this.n,cnt);return this},shiftRight:function(cnt){_shiftR(this.n,cnt);return this},inv:function(){return _bi255(core.invmodp(this.n))},pow:function(e){return _bi255(_pow(this.n,e.n))},modq:function(){return _modq(this)},bytes:function(){return _bi255_bytes(this)}};function _shiftL(n,cnt){var lastcarry=0;for(var i=0;i<16;i++){var carry=n[i]>>16-cnt;n[i]=n[i]<=0;i--){var carry=n[i]<<16-cnt&65535;n[i]=n[i]>>cnt|lastcarry;lastcarry=carry}return n}function _bi255_bytes(n){n=_bi255(n);var a=new Array(32);for(var i=31;i>=0;i--){a[i]=n.n[0]&255;n.shiftRight(8)}return a}function _bytes2bi255(a){var n=_ZERO;for(var i=0;i<32;i++){n.shiftLeft(8);n=n.plus(_bi255(a[i]))}return n}function _pow(n,e){var result=core.ONE();for(var i=0;i<256;i++){if(core.getbit(e,i)===1){result=core.mulmodp(result,n)}n=core.sqrmodp(n)}return result}var _ZERO=_bi255(0);var _ONE=_bi255(1);var _TWO=_bi255(2);var _Q=_bi255([65535-18,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,32767]);function _modq(n){core.reduce(n.n);if(n.cmp(_Q)>=0){return _modq(n.minus(_Q))}if(n.cmp(_ZERO)===-1){return _modq(n.plus(_Q))}else{return n}}var _RECOVERY_EXPONENT=_bi255("0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe");var _D=_bi255("52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3");var _I=_bi255("2b8324804fc1df0b2b4d00993dfbd7a72f431806ad2fe478c4ee1b274a0ea0b0");var _L=_bi255("1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed");var _L_BI=_bi("1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed",16);function _isoncurve(p){var x=p[0];var y=p[1];var xsqr=x.sqr();var ysqr=y.sqr();var v=_D.times(xsqr).times(ysqr);return ysqr.minus(xsqr).minus(_ONE).minus(v).modq().equals(_ZERO)}function _xrecover(y){var ysquared=y.sqr();var xx=ysquared.minus(_ONE).divide(_ONE.plus(_D.times(ysquared)));var x=xx.pow(_RECOVERY_EXPONENT);if(!x.times(x).minus(xx).equals(_ZERO)){x=x.times(_I)}if(x.isOdd()){x=_Q.minus(x)}return x}function _x_pt_add(pt1,pt2){var x1=pt1[0];var y1=pt1[1];var z1=pt1[2];var t1=pt1[3];var x2=pt2[0];var y2=pt2[1];var z2=pt2[2];var t2=pt2[3];var A=y1.minus(x1).times(y2.plus(x2));var B=y1.plus(x1).times(y2.minus(x2));var C=z1.times(_TWO).times(t2);var D=t1.times(_TWO).times(z2);var E=D.plus(C);var F=B.minus(A);var G=B.plus(A);var H=D.minus(C);return[E.times(F),G.times(H),F.times(G),E.times(H)]}function _xpt_double(pt1){var x1=pt1[0];var y1=pt1[1];var z1=pt1[2];var A=x1.times(x1);var B=y1.times(y1);var C=_TWO.times(z1).times(z1);var D=_Q.minus(A);var J=x1.plus(y1);var E=J.times(J).minus(A).minus(B);var G=D.plus(B);var F=G.minus(C);var H=D.minus(B);return[E.times(F),G.times(H),F.times(G),E.times(H)]}function _xpt_mult(pt,n){if(n.equals(_ZERO)){return[_ZERO,_ONE,_ONE,_ZERO]}var odd=n.isOdd();n.shiftRight(1);var value=_xpt_double(_xpt_mult(pt,n));return odd?_x_pt_add(value,pt):value}function _pt_xform(pt){var x=pt[0];var y=pt[1];return[x,y,_ONE,x.times(y)]}function _pt_unxform(pt){var x=pt[0];var y=pt[1];var z=pt[2];var invz=z.inv();return[x.times(invz),y.times(invz)]}function _scalarmult(pt,n){return _pt_unxform(_xpt_mult(_pt_xform(pt),n))}function _bytesgetbit(bytes,n){return bytes[bytes.length-(n>>>3)-1]>>(n&7)&1}function _xpt_mult_bytes(pt,bytes){var r=[_ZERO,_ONE,_ONE,_ZERO];for(var i=(bytes.length<<3)-1;i>=0;i--){r=_xpt_double(r);if(_bytesgetbit(bytes,i)===1){r=_x_pt_add(r,pt)}}return r}function _scalarmultBytes(pt,bytes){return _pt_unxform(_xpt_mult_bytes(_pt_xform(pt),bytes))}var _by=_bi255(4).divide(_bi255(5));var _bx=_xrecover(_by);var _bp=[_bx,_by];function _encodeint(n){return n.bytes(32).reverse()}function _decodeint(b){return _bi255(b.slice(0).reverse())}function _encodepoint(p){var v=_encodeint(p[1]);if(p[0].isOdd()){v[31]|=128}return v}function _decodepoint(v){v=v.slice(0); +var signbit=v[31]>>7;v[31]&=127;var y=_decodeint(v);var x=_xrecover(y);if((x.n[0]&1)!==signbit){x=_Q.minus(x)}var p=[x,y];if(!_isoncurve(p)){throw"Point is not on curve"}return p}function _bi(value,base){if(base!==undefined){if(base===256){return _bi(utils.string2bytes(value))}return new BigInteger(value,base)}else if(typeof value==="string"){return new BigInteger(value,10)}else if(value instanceof Array||value instanceof Uint8Array||Buffer.isBuffer(value)){return new BigInteger(value)}else if(typeof value==="number"){return new BigInteger(value.toString(),10)}else{throw"Can't convert "+value+" to BigInteger"}}function _bi2bytes(n,cnt){if(cnt===undefined){cnt=n.bitLength()+7>>>3}var bytes=new Array(cnt);for(var i=cnt-1;i>=0;i--){bytes[i]=n[0]&255;n=n.shiftRight(8)}return bytes}BigInteger.prototype.bytes=function(n){return _bi2bytes(this,n)};function _bytehash(s){var sha=crypto.createHash("sha512").update(s).digest();return _bi2bytes(_bi(sha),64).reverse()}function _stringhash(s){var sha=crypto.createHash("sha512").update(s).digest();return _map(_chr,_bi2bytes(_bi(sha),64)).join("")}function _inthash(s){return _bi([0].concat(_bytehash(s)))}function _inthash_lo(s){return _bi255(_bytehash(s).slice(32,64))}function _inthash_mod_l(s){return _inthash(s).mod(_L_BI)}function _get_a(sk){var a=_inthash_lo(sk);a.n[0]&=65528;a.n[15]&=16383;a.n[15]|=16384;return a}function _publickey(sk){return _encodepoint(_scalarmult(_bp,_get_a(sk)))}function _map(f,l){var result=new Array(l.length);for(var i=0;i=0;i--){var value=vector[i];result.push(_HEXCHARS.substr(value>>>12&15,1));result.push(_HEXCHARS.substr(value>>>8&15,1));result.push(_HEXCHARS.substr(value>>>4&15,1));result.push(_HEXCHARS.substr(value&15,1))}return result.join("")}function _hexdecode(vector){var result=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(var i=vector.length-1,l=0;i>=0;i-=4){result[l]=_HEXCHARS.indexOf(vector.charAt(i))|_HEXCHARS.indexOf(vector.charAt(i-1))<<4|_HEXCHARS.indexOf(vector.charAt(i-2))<<8|_HEXCHARS.indexOf(vector.charAt(i-3))<<12;l++}return result}var _BASE32CHARS="abcdefghijklmnopqrstuvwxyz234567";var _BASE32VALUES=function(){var result={};for(var i=0;i<_BASE32CHARS.length;i++){result[_BASE32CHARS.charAt(i)]=i}return result}();function _base32encode(n){var c;var r="";for(c=0;c<255;c+=5){r=_BASE32CHARS.substr(core.getbit(n,c)+(core.getbit(n,c+1)<<1)+(core.getbit(n,c+2)<<2)+(core.getbit(n,c+3)<<3)+(core.getbit(n,c+4)<<4),1)+r}return r}function _base32decode(n){var c=0;var r=core.ZERO();var l=n.length;for(c=0;l>0&&c<255;c+=5){l--;var v=_BASE32VALUES[n.substr(l,1)];core.setbit(r,c,v&1);v>>=1;core.setbit(r,c+1,v&1);v>>=1;core.setbit(r,c+2,v&1);v>>=1;core.setbit(r,c+3,v&1);v>>=1;core.setbit(r,c+4,v&1)}return r}function _map(f,l){var result=new Array(l.length);for(var i=0;i=0){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864);w[j++]=v&67108863}return c}function am2(i,x,w,j,c,n){var xl=x&32767,xh=x>>15;while(--n>=0){var l=this[i]&32767;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&32767)<<15)+w[j]+(c&1073741823);c=(l>>>30)+(m>>>15)+xh*h+(c>>>30);w[j++]=l&1073741823}return c}function am3(i,x,w,j,c,n){var xl=x&16383,xh=x>>14;while(--n>=0){var l=this[i]&16383;var h=this[i++]>>14;var m=xh*l+h*xl;l=xl*l+((m&16383)<<14)+w[j]+c;c=(l>>28)+(m>>14)+xh*h;w[j++]=l&268435455}return c}var inBrowser=typeof navigator!=="undefined";if(inBrowser&&j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(inBrowser&&j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<=0;--i)r[i]=this[i];r.t=this.t;r.s=this.s}function bnpFromInt(x){this.t=1;this.s=x<0?-1:0;if(x>0)this[0]=x;else if(x<-1)this[0]=x+this.DV;else this.t=0}function nbv(i){var r=nbi();r.fromInt(i);return r}function bnpFromString(s,b){var k;if(b==16)k=4;else if(b==8)k=3;else if(b==256)k=8;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else{this.fromRadix(s,b);return}this.t=0;this.s=0;var i=s.length,mi=false,sh=0;while(--i>=0){var x=k==8?s[i]&255:intAt(s,i);if(x<0){if(s.charAt(i)=="-")mi=true;continue}mi=false;if(sh==0)this[this.t++]=x;else if(sh+k>this.DB){this[this.t-1]|=(x&(1<>this.DB-sh}else this[this.t-1]|=x<=this.DB)sh-=this.DB}if(k==8&&(s[0]&128)!=0){this.s=-1;if(sh>0)this[this.t-1]|=(1<0&&this[this.t-1]==c)--this.t}function bnToString(b){if(this.s<0)return"-"+this.negate().toString(b);var k;if(b==16)k=4;else if(b==8)k=3;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else return this.toRadix(b);var km=(1<0){if(p>p)>0){m=true;r=int2char(d)}while(i>=0){if(p>(p+=this.DB-k)}else{d=this[i]>>(p-=k)&km;if(p<=0){p+=this.DB;--i}}if(d>0)m=true;if(m)r+=int2char(d)}}return m?r:"0"}function bnNegate(){var r=nbi();BigInteger.ZERO.subTo(this,r);return r}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var r=this.s-a.s;if(r!=0)return r;var i=this.t;r=i-a.t;if(r!=0)return this.s<0?-r:r;while(--i>=0)if((r=this[i]-a[i])!=0)return r;return 0}function nbits(x){var r=1,t;if((t=x>>>16)!=0){x=t;r+=16}if((t=x>>8)!=0){x=t;r+=8}if((t=x>>4)!=0){x=t;r+=4}if((t=x>>2)!=0){x=t;r+=2}if((t=x>>1)!=0){x=t;r+=1}return r}function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(n,r){var i;for(i=this.t-1;i>=0;--i)r[i+n]=this[i];for(i=n-1;i>=0;--i)r[i]=0;r.t=this.t+n;r.s=this.s}function bnpDRShiftTo(n,r){for(var i=n;i=0;--i){r[i+ds+1]=this[i]>>cbs|c;c=(this[i]&bm)<=0;--i)r[i]=0;r[ds]=c;r.t=this.t+ds+1;r.s=this.s;r.clamp()}function bnpRShiftTo(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t){r.t=0;return}var bs=n%this.DB;var cbs=this.DB-bs;var bm=(1<>bs;for(var i=ds+1;i>bs}if(bs>0)r[this.t-ds-1]|=(this.s&bm)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c-=a.s}r.s=c<0?-1:0;if(c<-1)r[i++]=this.DV+c;else if(c>0)r[i++]=c;r.t=i;r.clamp()}function bnpMultiplyTo(a,r){var x=this.abs(),y=a.abs();var i=x.t;r.t=i+y.t;while(--i>=0)r[i]=0;for(i=0;i=0)r[i]=0;for(i=0;i=x.DV){r[i+x.t]-=x.DV;r[i+x.t+1]=1}}if(r.t>0)r[r.t-1]+=x.am(i,x[i],r,2*i,0,1);r.s=0;r.clamp()}function bnpDivRemTo(m,q,r){var pm=m.abs();if(pm.t<=0)return;var pt=this.abs();if(pt.t0){pm.lShiftTo(nsh,y);pt.lShiftTo(nsh,r)}else{pm.copyTo(y);pt.copyTo(r)}var ys=y.t;var y0=y[ys-1];if(y0==0)return;var yt=y0*(1<1?y[ys-2]>>this.F2:0);var d1=this.FV/yt,d2=(1<=0){r[r.t++]=1;r.subTo(t,r)}BigInteger.ONE.dlShiftTo(ys,t);t.subTo(y,y);while(y.t=0){var qd=r[--i]==y0?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))0)r.rShiftTo(nsh,r);if(ts<0)BigInteger.ZERO.subTo(r,r)}function bnMod(a){var r=nbi();this.abs().divRemTo(a,null,r);if(this.s<0&&r.compareTo(BigInteger.ZERO)>0)a.subTo(r,r);return r}function Classic(m){this.m=m}function cConvert(x){if(x.s<0||x.compareTo(this.m)>=0)return x.mod(this.m);else return x}function cRevert(x){return x}function cReduce(x){x.divRemTo(this.m,null,x)}function cMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}function cSqrTo(x,r){x.squareTo(r);this.reduce(r)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1)return 0;var x=this[0];if((x&1)==0)return 0;var y=x&3;y=y*(2-(x&15)*y)&15;y=y*(2-(x&255)*y)&255;y=y*(2-((x&65535)*y&65535))&65535;y=y*(2-x*y%this.DV)%this.DV;return y>0?this.DV-y:-y}function Montgomery(m){this.m=m;this.mp=m.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<0)this.m.subTo(r,r);return r}function montRevert(x){var r=nbi();x.copyTo(r);this.reduce(r);return r}function montReduce(x){while(x.t<=this.mt2)x[x.t++]=0;for(var i=0;i>15)*this.mpl&this.um)<<15)&x.DM;j=i+this.m.t;x[j]+=this.m.am(0,u0,x,i,0,this.m.t);while(x[j]>=x.DV){x[j]-=x.DV;x[++j]++}}x.clamp();x.drShiftTo(this.m.t,x);if(x.compareTo(this.m)>=0)x.subTo(this.m,x)}function montSqrTo(x,r){x.squareTo(r);this.reduce(r)}function montMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(e,z){if(e>4294967295||e<1)return BigInteger.ONE;var r=nbi(),r2=nbi(),g=z.convert(this),i=nbits(e)-1;g.copyTo(r);while(--i>=0){z.sqrTo(r,r2);if((e&1<0)z.mulTo(r2,g,r);else{var t=r;r=r2;r2=t}}return z.revert(r)}function bnModPowInt(e,m){var z;if(e<256||m.isEven())z=new Classic(m);else z=new Montgomery(m);return this.exp(e,z)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnClone(){var r=nbi();this.copyTo(r);return r}function bnIntValue(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<>24}function bnShortValue(){return this.t==0?this.s:this[0]<<16>>16}function bnpChunkSize(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}function bnSigNum(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function bnpToRadix(b){if(b==null)b=10;if(this.signum()==0||b<2||b>36)return"0";var cs=this.chunkSize(b);var a=Math.pow(b,cs);var d=nbv(a),y=nbi(),z=nbi(),r="";this.divRemTo(d,y,z);while(y.signum()>0){r=(a+z.intValue()).toString(b).substr(1)+r;y.divRemTo(d,y,z)}return z.intValue().toString(b)+r}function bnpFromRadix(s,b){this.fromInt(0);if(b==null)b=10;var cs=this.chunkSize(b);var d=Math.pow(b,cs),mi=false,j=0,w=0;for(var i=0;i=cs){this.dMultiply(d);this.dAddOffset(w,0);j=0;w=0}}if(j>0){this.dMultiply(Math.pow(b,j));this.dAddOffset(w,0)}if(mi)BigInteger.ZERO.subTo(this,this)}function bnpFromNumber(a,b,c){if("number"==typeof b){if(a<2)this.fromInt(1);else{this.fromNumber(a,c);if(!this.testBit(a-1))this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(b)){this.dAddOffset(2,0);if(this.bitLength()>a)this.subTo(BigInteger.ONE.shiftLeft(a-1),this)}}}else{var x=new Array,t=a&7;x.length=(a>>3)+1;b.nextBytes(x);if(t>0)x[0]&=(1<0){if(p>p)!=(this.s&this.DM)>>p)r[k++]=d|this.s<=0){if(p<8){d=(this[i]&(1<>(p+=this.DB-8)}else{d=this[i]>>(p-=8)&255;if(p<=0){p+=this.DB;--i}}if((d&128)!=0)d|=-256;if(k==0&&(this.s&128)!=(d&128))++k;if(k>0||d!=this.s)r[k++]=d}}return r}function bnEquals(a){return this.compareTo(a)==0}function bnMin(a){return this.compareTo(a)<0?this:a}function bnMax(a){return this.compareTo(a)>0?this:a}function bnpBitwiseTo(a,op,r){var i,f,m=Math.min(a.t,this.t);for(i=0;i>=16;r+=16}if((x&255)==0){x>>=8;r+=8}if((x&15)==0){x>>=4;r+=4}if((x&3)==0){x>>=2;r+=2}if((x&1)==0)++r;return r}function bnGetLowestSetBit(){for(var i=0;i=this.t)return this.s!=0;return(this[j]&1<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c+=a.s}r.s=c<0?-1:0;if(c>0)r[i++]=c;else if(c<-1)r[i++]=this.DV+c;r.t=i;r.clamp()}function bnAdd(a){var r=nbi();this.addTo(a,r);return r}function bnSubtract(a){var r=nbi();this.subTo(a,r);return r}function bnMultiply(a){var r=nbi();this.multiplyTo(a,r);return r}function bnSquare(){var r=nbi();this.squareTo(r);return r}function bnDivide(a){var r=nbi();this.divRemTo(a,r,null);return r}function bnRemainder(a){var r=nbi();this.divRemTo(a,null,r);return r}function bnDivideAndRemainder(a){var q=nbi(),r=nbi();this.divRemTo(a,q,r);return new Array(q,r)}function bnpDMultiply(n){this[this.t]=this.am(0,n-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(n,w){if(n==0)return;while(this.t<=w)this[this.t++]=0;this[w]+=n;while(this[w]>=this.DV){this[w]-=this.DV;if(++w>=this.t)this[this.t++]=0;++this[w]}}function NullExp(){}function nNop(x){return x}function nMulTo(x,y,r){x.multiplyTo(y,r)}function nSqrTo(x,r){x.squareTo(r)}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(e){return this.exp(e,new NullExp)}function bnpMultiplyLowerTo(a,n,r){var i=Math.min(this.t+a.t,n);r.s=0;r.t=i;while(i>0)r[--i]=0;var j;for(j=r.t-this.t;i=0)r[i]=0;for(i=Math.max(n-this.t,0);i2*this.m.t)return x.mod(this.m);else if(x.compareTo(this.m)<0)return x;else{var r=nbi();x.copyTo(r);this.reduce(r);return r}}function barrettRevert(x){return x}function barrettReduce(x){x.drShiftTo(this.m.t-1,this.r2);if(x.t>this.m.t+1){x.t=this.m.t+1;x.clamp()}this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(x.compareTo(this.r2)<0)x.dAddOffset(1,this.m.t+1);x.subTo(this.r2,x);while(x.compareTo(this.m)>=0)x.subTo(this.m,x)}function barrettSqrTo(x,r){x.squareTo(r);this.reduce(r)}function barrettMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Barrett.prototype.convert=barrettConvert;Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;function bnModPow(e,m){var i=e.bitLength(),k,r=nbv(1),z;if(i<=0)return r;else if(i<18)k=1;else if(i<48)k=3;else if(i<144)k=4;else if(i<768)k=5;else k=6;if(i<8)z=new Classic(m);else if(m.isEven())z=new Barrett(m);else z=new Montgomery(m);var g=new Array,n=3,k1=k-1,km=(1<1){var g2=nbi();z.sqrTo(g[1],g2);while(n<=km){g[n]=nbi();z.mulTo(g2,g[n-2],g[n]);n+=2}}var j=e.t-1,w,is1=true,r2=nbi(),t;i=nbits(e[j])-1;while(j>=0){if(i>=k1)w=e[j]>>i-k1&km;else{w=(e[j]&(1<0)w|=e[j-1]>>this.DB+i-k1}n=k;while((w&1)==0){w>>=1;--n}if((i-=n)<0){i+=this.DB;--j}if(is1){g[w].copyTo(r);is1=false}else{while(n>1){z.sqrTo(r,r2);z.sqrTo(r2,r);n-=2}if(n>0)z.sqrTo(r,r2);else{t=r;r=r2;r2=t}z.mulTo(r2,g[w],r)}while(j>=0&&(e[j]&1<0){x.rShiftTo(g,x);y.rShiftTo(g,y)}while(x.signum()>0){if((i=x.getLowestSetBit())>0)x.rShiftTo(i,x);if((i=y.getLowestSetBit())>0)y.rShiftTo(i,y);if(x.compareTo(y)>=0){x.subTo(y,x);x.rShiftTo(1,x)}else{y.subTo(x,y);y.rShiftTo(1,y)}}if(g>0)y.lShiftTo(g,y);return y}function bnpModInt(n){if(n<=0)return 0;var d=this.DV%n,r=this.s<0?n-1:0;if(this.t>0)if(d==0)r=this[0]%n;else for(var i=this.t-1;i>=0;--i)r=(d*r+this[i])%n;return r}function bnModInverse(m){var ac=m.isEven();if(this.isEven()&&ac||m.signum()==0)return BigInteger.ZERO;var u=m.clone(),v=this.clone();var a=nbv(1),b=nbv(0),c=nbv(0),d=nbv(1);while(u.signum()!=0){while(u.isEven()){u.rShiftTo(1,u);if(ac){if(!a.isEven()||!b.isEven()){a.addTo(this,a);b.subTo(m,b)}a.rShiftTo(1,a)}else if(!b.isEven())b.subTo(m,b);b.rShiftTo(1,b)}while(v.isEven()){v.rShiftTo(1,v);if(ac){if(!c.isEven()||!d.isEven()){c.addTo(this,c);d.subTo(m,d)}c.rShiftTo(1,c)}else if(!d.isEven())d.subTo(m,d);d.rShiftTo(1,d)}if(u.compareTo(v)>=0){u.subTo(v,u);if(ac)a.subTo(c,a);b.subTo(d,b)}else{v.subTo(u,v);if(ac)c.subTo(a,c);d.subTo(b,d)}}if(v.compareTo(BigInteger.ONE)!=0)return BigInteger.ZERO;if(d.compareTo(m)>=0)return d.subtract(m);if(d.signum()<0)d.addTo(m,d);else return d;if(d.signum()<0)return d.add(m);else return d}var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];var lplim=(1<<26)/lowprimes[lowprimes.length-1];function bnIsProbablePrime(t){var i,x=this.abs();if(x.t==1&&x[0]<=lowprimes[lowprimes.length-1]){for(i=0;i>1;if(t>lowprimes.length)t=lowprimes.length;var a=nbi();for(var i=0;i>8&255;rng_pool[rng_pptr++]^=x>>16&255;rng_pool[rng_pptr++]^=x>>24&255;if(rng_pptr>=rng_psize)rng_pptr-=rng_psize}function rng_seed_time(){rng_seed_int((new Date).getTime())}if(rng_pool==null){rng_pool=new Array;rng_pptr=0;var t;if(typeof window!=="undefined"&&window.crypto){if(window.crypto.getRandomValues){var ua=new Uint8Array(32);window.crypto.getRandomValues(ua);for(t=0;t<32;++t)rng_pool[rng_pptr++]=ua[t]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var z=window.crypto.random(32);for(t=0;t>>8;rng_pool[rng_pptr++]=t&255}rng_pptr=0;rng_seed_time()}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptrschema.maxItems){addError("There must be a maximum of "+schema.maxItems+" in the array")}}else if(schema.properties||schema.additionalProperties){errors.concat(checkObj(value,schema.properties,path,schema.additionalProperties))}if(schema.pattern&&typeof value=="string"&&!value.match(schema.pattern)){addError("does not match the regex pattern "+schema.pattern)}if(schema.maxLength&&typeof value=="string"&&value.length>schema.maxLength){addError("may only be "+schema.maxLength+" characters long")}if(schema.minLength&&typeof value=="string"&&value.lengthvalue){addError("must have a minimum value of "+schema.minimum)}if(typeof schema.maximum!==undefined&&typeof value==typeof schema.maximum&&schema.maximum0){var thisPos=stack.indexOf(this);~thisPos?stack.splice(thisPos+1):stack.push(this);~thisPos?keys.splice(thisPos,Infinity,key):keys.push(key);if(~stack.indexOf(value))value=cycleReplacer.call(this,key,value)}else stack.push(value);return replacer==null?value:replacer.call(this,key,value)}}},{}],169:[function(require,module,exports){var hasExcape=/~/;var escapeMatcher=/~[01]/g;function escapeReplacer(m){switch(m){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+m)}function untilde(str){if(!hasExcape.test(str))return str;return str.replace(escapeMatcher,escapeReplacer)}function setter(obj,pointer,value){var part;var hasNextPart;for(var p=1,len=pointer.length;pp;if(typeof obj[part]==="undefined"){if(Array.isArray(obj)&&part==="-"){part=obj.length}if(hasNextPart){if(pointer[p]!==""&&pointer[p]=0);for(key in data){each=accum.slice(0);each.push(key);doFlattenIter(data[key],depth-1,each,callback)}}function flattenObject(data,depth){if(depth===0)return[data];mod_assert.ok(data!==null);mod_assert.equal(typeof data,"object");mod_assert.equal(typeof depth,"number");mod_assert.ok(depth>=0);var rv=[];var key;for(key in data){flattenObject(data[key],depth-1).forEach(function(p){rv.push([key].concat(p))})}return rv}function startsWith(str,prefix){return str.substr(0,prefix.length)==prefix}function endsWith(str,suffix){return str.substr(str.length-suffix.length,suffix.length)==suffix}function iso8601(d){if(typeof d=="number")d=new Date(d);mod_assert.ok(d.constructor===Date);return mod_extsprintf.sprintf("%4d-%02d-%02dT%02d:%02d:%02d.%03dZ",d.getUTCFullYear(),d.getUTCMonth()+1,d.getUTCDate(),d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds())}var RFC1123_MONTHS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var RFC1123_DAYS=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function rfc1123(date){return mod_extsprintf.sprintf("%s, %02d %s %04d %02d:%02d:%02d GMT",RFC1123_DAYS[date.getUTCDay()],date.getUTCDate(),RFC1123_MONTHS[date.getUTCMonth()],date.getUTCFullYear(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds())}function parseDateTime(str){var numeric=+str;if(!isNaN(numeric)){return new Date(numeric)}else{return new Date(str)}}function validateJsonObjectJS(schema,input){var report=mod_jsonschema.validate(input,schema);if(report.errors.length===0)return null;var error=report.errors[0];var propname=error["property"];var reason=error["message"].toLowerCase();var i,j;if((i=reason.indexOf("the property "))!=-1&&(j=reason.indexOf(" is not defined in the schema and the "+"schema does not allow additional properties"))!=-1){i+="the property ".length;if(propname==="")propname=reason.substr(i,j-i);else propname=propname+"."+reason.substr(i,j-i);reason="unsupported property"}var rv=new mod_verror.VError('property "%s": %s',propname,reason);rv.jsv_details=error;return rv}function randElt(arr){mod_assert.ok(Array.isArray(arr)&&arr.length>0,"randElt argument must be a non-empty array");return arr[Math.floor(Math.random()*arr.length)]}function assertHrtime(a){mod_assert.ok(a[0]>=0&&a[1]>=0,"negative numbers not allowed in hrtimes");mod_assert.ok(a[1]<1e9,"nanoseconds column overflow")}function hrtimeDiff(a,b){assertHrtime(a);assertHrtime(b);mod_assert.ok(a[0]>b[0]||a[0]==b[0]&&a[1]>=b[1],"negative differences not allowed");var rv=[a[0]-b[0],0];if(a[1]>=b[1]){rv[1]=a[1]-b[1]}else{rv[0]--;rv[1]=1e9-(b[1]-a[1])}return rv}function hrtimeNanosec(a){assertHrtime(a);return Math.floor(a[0]*1e9+a[1])}function hrtimeMicrosec(a){assertHrtime(a);return Math.floor(a[0]*1e6+a[1]/1e3)}function hrtimeMillisec(a){assertHrtime(a);return Math.floor(a[0]*1e3+a[1]/1e6)}function hrtimeAccum(a,b){assertHrtime(a);assertHrtime(b);a[1]+=b[1];if(a[1]>=1e9){a[0]++;a[1]-=1e9}a[0]+=b[0];return a}function hrtimeAdd(a,b){assertHrtime(a);var rv=[a[0],a[1]];return hrtimeAccum(rv,b)}function extraProperties(obj,allowed){mod_assert.ok(typeof obj==="object"&&obj!==null,"obj argument must be a non-null object");mod_assert.ok(Array.isArray(allowed),"allowed argument must be an array of strings");for(var i=0;i>=7-mask;return new bn(buf)};MillerRabin.prototype.test=function test(n,k,cb){var len=n.bitLength();var red=bn.mont(n);var rone=new bn(1).toRed(red);if(!k)k=Math.max(1,len/48|0);var n1=n.subn(1);var n2=n1.subn(1);for(var s=0;!n1.testn(s);s++){}var d=n.shrn(s);var rn1=n1.toRed(red);var prime=true;for(;k>0;k--){var a=this._rand(n2);if(cb)cb(a);var x=a.toRed(red).redPow(d);if(x.cmp(rone)===0||x.cmp(rn1)===0)continue;for(var i=1;i0;k--){var a=this._rand(n2);var g=n.gcd(a);if(g.cmpn(1)!==0)return g;var x=a.toRed(red).redPow(d);if(x.cmp(rone)===0||x.cmp(rn1)===0)continue;for(var i=1;ito||from===to&&types[extension].substr(0,12)==="application/"){continue}}types[extension]=type}})}},{"mime-db":173,path:192}],175:[function(require,module,exports){module.exports=assert;function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}assert.equal=function assertEqual(l,r,msg){if(l!=r)throw new Error(msg||"Assertion failed: "+l+" != "+r)}},{}],176:[function(require,module,exports){var crypto=require("crypto"),qs=require("querystring");function sha1(key,body){return crypto.createHmac("sha1",key).update(body).digest("base64")}function rsa(key,body){return crypto.createSign("RSA-SHA1").update(body).sign(key,"base64")}function rfc3986(str){return encodeURIComponent(str).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}function map(obj){var key,val,arr=[];for(key in obj){val=obj[key];if(Array.isArray(val))for(var i=0;ib?1:a>>16&65535|0,n=0;while(len!==0){n=len>2e3?2e3:len;len-=n;do{s1=s1+buf[pos++]|0;s2=s2+s1|0}while(--n);s1%=65521;s2%=65521}return s1|s2<<16|0}module.exports=adler32},{}],179:[function(require,module,exports){"use strict";module.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],180:[function(require,module,exports){"use strict";function makeTable(){var c,table=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++){c=c&1?3988292384^c>>>1:c>>>1}table[n]=c}return table}var crcTable=makeTable();function crc32(crc,buf,len,pos){var t=crcTable,end=pos+len;crc^=-1;for(var i=pos;i>>8^t[(crc^buf[i])&255]}return crc^-1}module.exports=crc32},{}],181:[function(require,module,exports){"use strict";var utils=require("../utils/common");var trees=require("./trees");var adler32=require("./adler32");var crc32=require("./crc32");var msg=require("./messages");var Z_NO_FLUSH=0;var Z_PARTIAL_FLUSH=1;var Z_FULL_FLUSH=3;var Z_FINISH=4;var Z_BLOCK=5;var Z_OK=0;var Z_STREAM_END=1;var Z_STREAM_ERROR=-2;var Z_DATA_ERROR=-3;var Z_BUF_ERROR=-5;var Z_DEFAULT_COMPRESSION=-1;var Z_FILTERED=1;var Z_HUFFMAN_ONLY=2;var Z_RLE=3;var Z_FIXED=4;var Z_DEFAULT_STRATEGY=0;var Z_UNKNOWN=2;var Z_DEFLATED=8;var MAX_MEM_LEVEL=9;var MAX_WBITS=15;var DEF_MEM_LEVEL=8;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var MIN_MATCH=3;var MAX_MATCH=258;var MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1;var PRESET_DICT=32;var INIT_STATE=42;var EXTRA_STATE=69;var NAME_STATE=73;var COMMENT_STATE=91;var HCRC_STATE=103;var BUSY_STATE=113;var FINISH_STATE=666;var BS_NEED_MORE=1;var BS_BLOCK_DONE=2;var BS_FINISH_STARTED=3;var BS_FINISH_DONE=4;var OS_CODE=3;function err(strm,errorCode){strm.msg=msg[errorCode];return errorCode}function rank(f){return(f<<1)-(f>4?9:0)}function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}function flush_pending(strm){var s=strm.state;var len=s.pending;if(len>strm.avail_out){len=strm.avail_out}if(len===0){return}utils.arraySet(strm.output,s.pending_buf,s.pending_out,len,strm.next_out);strm.next_out+=len;s.pending_out+=len;strm.total_out+=len;strm.avail_out-=len;s.pending-=len;if(s.pending===0){s.pending_out=0}}function flush_block_only(s,last){trees._tr_flush_block(s,s.block_start>=0?s.block_start:-1,s.strstart-s.block_start,last);s.block_start=s.strstart;flush_pending(s.strm)}function put_byte(s,b){s.pending_buf[s.pending++]=b}function putShortMSB(s,b){s.pending_buf[s.pending++]=b>>>8&255;s.pending_buf[s.pending++]=b&255}function read_buf(strm,buf,start,size){var len=strm.avail_in;if(len>size){len=size}if(len===0){return 0}strm.avail_in-=len;utils.arraySet(buf,strm.input,strm.next_in,len,start);if(strm.state.wrap===1){strm.adler=adler32(strm.adler,buf,len,start)}else if(strm.state.wrap===2){strm.adler=crc32(strm.adler,buf,len,start)}strm.next_in+=len;strm.total_in+=len;return len}function longest_match(s,cur_match){var chain_length=s.max_chain_length;var scan=s.strstart;var match;var len;var best_len=s.prev_length;var nice_match=s.nice_match;var limit=s.strstart>s.w_size-MIN_LOOKAHEAD?s.strstart-(s.w_size-MIN_LOOKAHEAD):0;var _win=s.window;var wmask=s.w_mask;var prev=s.prev;var strend=s.strstart+MAX_MATCH;var scan_end1=_win[scan+best_len-1];var scan_end=_win[scan+best_len];if(s.prev_length>=s.good_match){chain_length>>=2}if(nice_match>s.lookahead){nice_match=s.lookahead}do{match=cur_match;if(_win[match+best_len]!==scan_end||_win[match+best_len-1]!==scan_end1||_win[match]!==_win[scan]||_win[++match]!==_win[scan+1]){continue}scan+=2;match++;do{}while(_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&scanbest_len){s.match_start=cur_match;best_len=len;if(len>=nice_match){break}scan_end1=_win[scan+best_len-1];scan_end=_win[scan+best_len]}}while((cur_match=prev[cur_match&wmask])>limit&&--chain_length!==0);if(best_len<=s.lookahead){return best_len}return s.lookahead}function fill_window(s){var _w_size=s.w_size;var p,n,m,more,str;do{more=s.window_size-s.lookahead-s.strstart;if(s.strstart>=_w_size+(_w_size-MIN_LOOKAHEAD)){utils.arraySet(s.window,s.window,_w_size,_w_size,0);s.match_start-=_w_size;s.strstart-=_w_size;s.block_start-=_w_size;n=s.hash_size;p=n;do{m=s.head[--p];s.head[p]=m>=_w_size?m-_w_size:0}while(--n);n=_w_size;p=n;do{m=s.prev[--p];s.prev[p]=m>=_w_size?m-_w_size:0}while(--n);more+=_w_size}if(s.strm.avail_in===0){break}n=read_buf(s.strm,s.window,s.strstart+s.lookahead,more);s.lookahead+=n;if(s.lookahead+s.insert>=MIN_MATCH){str=s.strstart-s.insert;s.ins_h=s.window[str];s.ins_h=(s.ins_h<s.pending_buf_size-5){max_block_size=s.pending_buf_size-5}for(;;){if(s.lookahead<=1){fill_window(s);if(s.lookahead===0&&flush===Z_NO_FLUSH){return BS_NEED_MORE}if(s.lookahead===0){break}}s.strstart+=s.lookahead;s.lookahead=0;var max_start=s.block_start+max_block_size;if(s.strstart===0||s.strstart>=max_start){s.lookahead=s.strstart-max_start;s.strstart=max_start;flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}if(s.strstart-s.block_start>=s.w_size-MIN_LOOKAHEAD){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.strstart>s.block_start){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_NEED_MORE}function deflate_fast(s,flush){var hash_head;var bflush;for(;;){if(s.lookahead=MIN_MATCH){s.ins_h=(s.ins_h<=MIN_MATCH){bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;if(s.match_length<=s.max_lazy_match&&s.lookahead>=MIN_MATCH){s.match_length--;do{s.strstart++;s.ins_h=(s.ins_h<=MIN_MATCH){s.ins_h=(s.ins_h<4096)){s.match_length=MIN_MATCH-1}}if(s.prev_length>=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH;bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH);s.lookahead-=s.prev_length-1;s.prev_length-=2;do{if(++s.strstart<=max_insert){s.ins_h=(s.ins_h<=MIN_MATCH&&s.strstart>0){scan=s.strstart-1;prev=_win[scan];if(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]){strend=s.strstart+MAX_MATCH;do{}while(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&scans.lookahead){s.match_length=s.lookahead}}}if(s.match_length>=MIN_MATCH){bflush=trees._tr_tally(s,1,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;s.strstart+=s.match_length;s.match_length=0}else{bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++}if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function deflate_huff(s,flush){var bflush;for(;;){if(s.lookahead===0){fill_window(s);if(s.lookahead===0){if(flush===Z_NO_FLUSH){return BS_NEED_MORE}break}}s.match_length=0;bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function Config(good_length,max_lazy,nice_length,max_chain,func){this.good_length=good_length;this.max_lazy=max_lazy;this.nice_length=nice_length;this.max_chain=max_chain;this.func=func}var configuration_table;configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];function lm_init(s){s.window_size=2*s.w_size;zero(s.head);s.max_lazy_match=configuration_table[s.level].max_lazy;s.good_match=configuration_table[s.level].good_length;s.nice_match=configuration_table[s.level].nice_length;s.max_chain_length=configuration_table[s.level].max_chain;s.strstart=0;s.block_start=0;s.lookahead=0;s.insert=0;s.match_length=s.prev_length=MIN_MATCH-1;s.match_available=0;s.ins_h=0}function DeflateState(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=Z_DEFLATED;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new utils.Buf16(HEAP_SIZE*2);this.dyn_dtree=new utils.Buf16((2*D_CODES+1)*2);this.bl_tree=new utils.Buf16((2*BL_CODES+1)*2);zero(this.dyn_ltree);zero(this.dyn_dtree);zero(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new utils.Buf16(MAX_BITS+1);this.heap=new utils.Buf16(2*L_CODES+1);zero(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new utils.Buf16(2*L_CODES+1);zero(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function deflateResetKeep(strm){var s;if(!strm||!strm.state){return err(strm,Z_STREAM_ERROR)}strm.total_in=strm.total_out=0;strm.data_type=Z_UNKNOWN;s=strm.state;s.pending=0;s.pending_out=0;if(s.wrap<0){s.wrap=-s.wrap}s.status=s.wrap?INIT_STATE:BUSY_STATE;strm.adler=s.wrap===2?0:1;s.last_flush=Z_NO_FLUSH;trees._tr_init(s);return Z_OK}function deflateReset(strm){var ret=deflateResetKeep(strm);if(ret===Z_OK){lm_init(strm.state)}return ret}function deflateSetHeader(strm,head){if(!strm||!strm.state){return Z_STREAM_ERROR}if(strm.state.wrap!==2){return Z_STREAM_ERROR}strm.state.gzhead=head;return Z_OK}function deflateInit2(strm,level,method,windowBits,memLevel,strategy){if(!strm){return Z_STREAM_ERROR}var wrap=1;if(level===Z_DEFAULT_COMPRESSION){level=6}if(windowBits<0){wrap=0;windowBits=-windowBits}else if(windowBits>15){wrap=2;windowBits-=16}if(memLevel<1||memLevel>MAX_MEM_LEVEL||method!==Z_DEFLATED||windowBits<8||windowBits>15||level<0||level>9||strategy<0||strategy>Z_FIXED){return err(strm,Z_STREAM_ERROR)}if(windowBits===8){windowBits=9}var s=new DeflateState;strm.state=s;s.strm=strm;s.wrap=wrap;s.gzhead=null;s.w_bits=windowBits;s.w_size=1<Z_BLOCK||flush<0){return strm?err(strm,Z_STREAM_ERROR):Z_STREAM_ERROR}s=strm.state;if(!strm.output||!strm.input&&strm.avail_in!==0||s.status===FINISH_STATE&&flush!==Z_FINISH){return err(strm,strm.avail_out===0?Z_BUF_ERROR:Z_STREAM_ERROR)}s.strm=strm;old_flush=s.last_flush;s.last_flush=flush;if(s.status===INIT_STATE){if(s.wrap===2){strm.adler=0;put_byte(s,31);put_byte(s,139);put_byte(s,8);if(!s.gzhead){put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,OS_CODE);s.status=BUSY_STATE}else{put_byte(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(!s.gzhead.extra?0:4)+(!s.gzhead.name?0:8)+(!s.gzhead.comment?0:16));put_byte(s,s.gzhead.time&255);put_byte(s,s.gzhead.time>>8&255);put_byte(s,s.gzhead.time>>16&255);put_byte(s,s.gzhead.time>>24&255);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,s.gzhead.os&255);if(s.gzhead.extra&&s.gzhead.extra.length){put_byte(s,s.gzhead.extra.length&255);put_byte(s,s.gzhead.extra.length>>8&255)}if(s.gzhead.hcrc){strm.adler=crc32(strm.adler,s.pending_buf,s.pending,0)}s.gzindex=0;s.status=EXTRA_STATE}}else{var header=Z_DEFLATED+(s.w_bits-8<<4)<<8;var level_flags=-1;if(s.strategy>=Z_HUFFMAN_ONLY||s.level<2){level_flags=0}else if(s.level<6){level_flags=1}else if(s.level===6){level_flags=2}else{level_flags=3}header|=level_flags<<6;if(s.strstart!==0){header|=PRESET_DICT}header+=31-header%31;s.status=BUSY_STATE;putShortMSB(s,header);if(s.strstart!==0){putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}strm.adler=1}}if(s.status===EXTRA_STATE){if(s.gzhead.extra){beg=s.pending;while(s.gzindex<(s.gzhead.extra.length&65535)){if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){break}}put_byte(s,s.gzhead.extra[s.gzindex]&255);s.gzindex++}if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(s.gzindex===s.gzhead.extra.length){s.gzindex=0;s.status=NAME_STATE}}else{s.status=NAME_STATE}}if(s.status===NAME_STATE){if(s.gzhead.name){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindexbeg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.gzindex=0;s.status=COMMENT_STATE}}else{s.status=COMMENT_STATE}}if(s.status===COMMENT_STATE){if(s.gzhead.comment){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindexbeg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.status=HCRC_STATE}}else{s.status=HCRC_STATE}}if(s.status===HCRC_STATE){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size){flush_pending(strm)}if(s.pending+2<=s.pending_buf_size){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);strm.adler=0;s.status=BUSY_STATE}}else{s.status=BUSY_STATE}}if(s.pending!==0){flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}else if(strm.avail_in===0&&rank(flush)<=rank(old_flush)&&flush!==Z_FINISH){return err(strm,Z_BUF_ERROR)}if(s.status===FINISH_STATE&&strm.avail_in!==0){return err(strm,Z_BUF_ERROR)}if(strm.avail_in!==0||s.lookahead!==0||flush!==Z_NO_FLUSH&&s.status!==FINISH_STATE){var bstate=s.strategy===Z_HUFFMAN_ONLY?deflate_huff(s,flush):s.strategy===Z_RLE?deflate_rle(s,flush):configuration_table[s.level].func(s,flush);if(bstate===BS_FINISH_STARTED||bstate===BS_FINISH_DONE){s.status=FINISH_STATE}if(bstate===BS_NEED_MORE||bstate===BS_FINISH_STARTED){if(strm.avail_out===0){s.last_flush=-1}return Z_OK}if(bstate===BS_BLOCK_DONE){if(flush===Z_PARTIAL_FLUSH){trees._tr_align(s)}else if(flush!==Z_BLOCK){trees._tr_stored_block(s,0,0,false);if(flush===Z_FULL_FLUSH){zero(s.head);if(s.lookahead===0){s.strstart=0;s.block_start=0;s.insert=0}}}flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}}if(flush!==Z_FINISH){return Z_OK}if(s.wrap<=0){return Z_STREAM_END}if(s.wrap===2){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);put_byte(s,strm.adler>>16&255);put_byte(s,strm.adler>>24&255);put_byte(s,strm.total_in&255);put_byte(s,strm.total_in>>8&255);put_byte(s,strm.total_in>>16&255);put_byte(s,strm.total_in>>24&255)}else{putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}flush_pending(strm);if(s.wrap>0){s.wrap=-s.wrap}return s.pending!==0?Z_OK:Z_STREAM_END}function deflateEnd(strm){var status;if(!strm||!strm.state){return Z_STREAM_ERROR}status=strm.state.status;if(status!==INIT_STATE&&status!==EXTRA_STATE&&status!==NAME_STATE&&status!==COMMENT_STATE&&status!==HCRC_STATE&&status!==BUSY_STATE&&status!==FINISH_STATE){return err(strm,Z_STREAM_ERROR)}strm.state=null;return status===BUSY_STATE?err(strm,Z_DATA_ERROR):Z_OK}function deflateSetDictionary(strm,dictionary){var dictLength=dictionary.length;var s;var str,n;var wrap;var avail;var next;var input;var tmpDict;if(!strm||!strm.state){return Z_STREAM_ERROR}s=strm.state;wrap=s.wrap;if(wrap===2||wrap===1&&s.status!==INIT_STATE||s.lookahead){return Z_STREAM_ERROR}if(wrap===1){strm.adler=adler32(strm.adler,dictionary,dictLength,0)}s.wrap=0;if(dictLength>=s.w_size){if(wrap===0){zero(s.head);s.strstart=0;s.block_start=0;s.insert=0}tmpDict=new utils.Buf8(s.w_size);utils.arraySet(tmpDict,dictionary,dictLength-s.w_size,s.w_size,0);dictionary=tmpDict;dictLength=s.w_size}avail=strm.avail_in;next=strm.next_in;input=strm.input;strm.avail_in=dictLength;strm.next_in=0;strm.input=dictionary;fill_window(s);while(s.lookahead>=MIN_MATCH){str=s.strstart;n=s.lookahead-(MIN_MATCH-1);do{s.ins_h=(s.ins_h<>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op===0){output[_out++]=here&65535}else if(op&16){len=here&65535;op&=15;if(op){if(bits>>=op;bits-=op}if(bits<15){hold+=input[_in++]<>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op&16){dist=here&65535;op&=15;if(bitsdmax){strm.msg="invalid distance too far back";state.mode=BAD;break top}hold>>>=op;bits-=op;op=_out-beg;if(dist>op){op=dist-op;if(op>whave){if(state.sane){strm.msg="invalid distance too far back";state.mode=BAD;break top}}from=0;from_source=s_window;if(wnext===0){from+=wsize-op;if(op2){output[_out++]=from_source[from++];output[_out++]=from_source[from++];output[_out++]=from_source[from++];len-=3}if(len){output[_out++]=from_source[from++];if(len>1){output[_out++]=from_source[from++]}}}else{from=_out-dist;do{output[_out++]=output[from++];output[_out++]=output[from++];output[_out++]=output[from++];len-=3}while(len>2);if(len){output[_out++]=output[from++];if(len>1){output[_out++]=output[from++]}}}}else if((op&64)===0){here=dcode[(here&65535)+(hold&(1<>3;_in-=len;bits-=len<<3;hold&=(1<>>24&255)+(q>>>8&65280)+((q&65280)<<8)+((q&255)<<24)}function InflateState(){this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new utils.Buf16(320);this.work=new utils.Buf16(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function inflateResetKeep(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;strm.total_in=strm.total_out=state.total=0;strm.msg="";if(state.wrap){strm.adler=state.wrap&1}state.mode=HEAD;state.last=0;state.havedict=0;state.dmax=32768;state.head=null;state.hold=0;state.bits=0;state.lencode=state.lendyn=new utils.Buf32(ENOUGH_LENS);state.distcode=state.distdyn=new utils.Buf32(ENOUGH_DISTS);state.sane=1;state.back=-1;return Z_OK}function inflateReset(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;state.wsize=0;state.whave=0;state.wnext=0;return inflateResetKeep(strm)}function inflateReset2(strm,windowBits){var wrap;var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;if(windowBits<0){wrap=0;windowBits=-windowBits}else{wrap=(windowBits>>4)+1;if(windowBits<48){windowBits&=15}}if(windowBits&&(windowBits<8||windowBits>15)){return Z_STREAM_ERROR}if(state.window!==null&&state.wbits!==windowBits){state.window=null}state.wrap=wrap;state.wbits=windowBits;return inflateReset(strm)}function inflateInit2(strm,windowBits){var ret;var state;if(!strm){return Z_STREAM_ERROR}state=new InflateState;strm.state=state;state.window=null;ret=inflateReset2(strm,windowBits);if(ret!==Z_OK){strm.state=null}return ret}function inflateInit(strm){return inflateInit2(strm,DEF_WBITS)}var virgin=true;var lenfix,distfix;function fixedtables(state){if(virgin){var sym;lenfix=new utils.Buf32(512);distfix=new utils.Buf32(32);sym=0;while(sym<144){state.lens[sym++]=8}while(sym<256){state.lens[sym++]=9}while(sym<280){state.lens[sym++]=7}while(sym<288){state.lens[sym++]=8}inflate_table(LENS,state.lens,0,288,lenfix,0,state.work,{bits:9});sym=0;while(sym<32){state.lens[sym++]=5}inflate_table(DISTS,state.lens,0,32,distfix,0,state.work,{bits:5});virgin=false}state.lencode=lenfix;state.lenbits=9;state.distcode=distfix;state.distbits=5}function updatewindow(strm,src,end,copy){var dist;var state=strm.state;if(state.window===null){state.wsize=1<=state.wsize){utils.arraySet(state.window,src,end-state.wsize,state.wsize,0);state.wnext=0;state.whave=state.wsize}else{dist=state.wsize-state.wnext;if(dist>copy){dist=copy}utils.arraySet(state.window,src,end-copy,dist,state.wnext);copy-=dist;if(copy){utils.arraySet(state.window,src,end-copy,copy,0);state.wnext=copy;state.whave=state.wsize}else{state.wnext+=dist;if(state.wnext===state.wsize){state.wnext=0}if(state.whave>>8&255;state.check=crc32(state.check,hbuf,2,0);hold=0;bits=0;state.mode=FLAGS;break}state.flags=0;if(state.head){state.head.done=false}if(!(state.wrap&1)||(((hold&255)<<8)+(hold>>8))%31){strm.msg="incorrect header check";state.mode=BAD;break}if((hold&15)!==Z_DEFLATED){strm.msg="unknown compression method";state.mode=BAD;break}hold>>>=4;bits-=4;len=(hold&15)+8;if(state.wbits===0){state.wbits=len}else if(len>state.wbits){strm.msg="invalid window size";state.mode=BAD;break}state.dmax=1<>8&1}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=TIME;case TIME:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>8&255;hbuf[2]=hold>>>16&255;hbuf[3]=hold>>>24&255;state.check=crc32(state.check,hbuf,4,0)}hold=0;bits=0;state.mode=OS;case OS:while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<>8}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=EXLEN;case EXLEN:if(state.flags&1024){while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0}else if(state.head){state.head.extra=null}state.mode=EXTRA;case EXTRA:if(state.flags&1024){copy=state.length;if(copy>have){copy=have}if(copy){if(state.head){len=state.head.extra_len-state.length;if(!state.head.extra){state.head.extra=new Array(state.head.extra_len)}utils.arraySet(state.head.extra,input,next,copy,len)}if(state.flags&512){state.check=crc32(state.check,input,copy,next)}have-=copy;next+=copy;state.length-=copy}if(state.length){break inf_leave}}state.length=0;state.mode=NAME;case NAME:if(state.flags&2048){if(have===0){break inf_leave}copy=0;do{len=input[next+copy++];if(state.head&&len&&state.length<65536){state.head.name+=String.fromCharCode(len)}}while(len&©>9&1;state.head.done=true}strm.adler=state.check=0;state.mode=TYPE;break;case DICTID:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=bits&7;bits-=bits&7;state.mode=CHECK;break}while(bits<3){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=1;bits-=1;switch(hold&3){case 0:state.mode=STORED;break;case 1:fixedtables(state);state.mode=LEN_;if(flush===Z_TREES){hold>>>=2;bits-=2;break inf_leave}break;case 2:state.mode=TABLE;break;case 3:strm.msg="invalid block type";state.mode=BAD}hold>>>=2;bits-=2;break;case STORED:hold>>>=bits&7;bits-=bits&7;while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>16^65535)){strm.msg="invalid stored block lengths";state.mode=BAD;break}state.length=hold&65535;hold=0;bits=0;state.mode=COPY_;if(flush===Z_TREES){break inf_leave}case COPY_:state.mode=COPY;case COPY:copy=state.length;if(copy){if(copy>have){copy=have}if(copy>left){copy=left}if(copy===0){break inf_leave}utils.arraySet(output,input,next,copy,put);have-=copy;next+=copy;left-=copy;put+=copy;state.length-=copy;break}state.mode=TYPE;break;case TABLE:while(bits<14){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=5;bits-=5;state.ndist=(hold&31)+1;hold>>>=5;bits-=5;state.ncode=(hold&15)+4;hold>>>=4;bits-=4;if(state.nlen>286||state.ndist>30){strm.msg="too many length or distance symbols";state.mode=BAD;break}state.have=0;state.mode=LENLENS;case LENLENS:while(state.have>>=3;bits-=3}while(state.have<19){state.lens[order[state.have++]]=0}state.lencode=state.lendyn;state.lenbits=7;opts={bits:state.lenbits};ret=inflate_table(CODES,state.lens,0,19,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg="invalid code lengths set";state.mode=BAD;break}state.have=0;state.mode=CODELENS;case CODELENS:while(state.have>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=here_bits;bits-=here_bits;state.lens[state.have++]=here_val}else{if(here_val===16){n=here_bits+2;while(bits>>=here_bits;bits-=here_bits;if(state.have===0){strm.msg="invalid bit length repeat";state.mode=BAD;break}len=state.lens[state.have-1];copy=3+(hold&3);hold>>>=2;bits-=2}else if(here_val===17){n=here_bits+3;while(bits>>=here_bits;bits-=here_bits;len=0;copy=3+(hold&7);hold>>>=3;bits-=3}else{n=here_bits+7;while(bits>>=here_bits;bits-=here_bits;len=0;copy=11+(hold&127);hold>>>=7;bits-=7}if(state.have+copy>state.nlen+state.ndist){strm.msg="invalid bit length repeat";state.mode=BAD;break}while(copy--){state.lens[state.have++]=len}}}if(state.mode===BAD){break}if(state.lens[256]===0){strm.msg="invalid code -- missing end-of-block";state.mode=BAD;break}state.lenbits=9;opts={bits:state.lenbits};ret=inflate_table(LENS,state.lens,0,state.nlen,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg="invalid literal/lengths set";state.mode=BAD;break}state.distbits=6;state.distcode=state.distdyn;opts={bits:state.distbits};ret=inflate_table(DISTS,state.lens,state.nlen,state.ndist,state.distcode,0,state.work,opts);state.distbits=opts.bits;if(ret){strm.msg="invalid distances set";state.mode=BAD;break}state.mode=LEN_;if(flush===Z_TREES){break inf_leave}case LEN_:state.mode=LEN;case LEN:if(have>=6&&left>=258){strm.next_out=put;strm.avail_out=left;strm.next_in=next;strm.avail_in=have;state.hold=hold;state.bits=bits;inflate_fast(strm,_out);put=strm.next_out;output=strm.output;left=strm.avail_out;next=strm.next_in;input=strm.input;have=strm.avail_in;hold=state.hold;bits=state.bits;if(state.mode===TYPE){state.back=-1}break}state.back=0;for(;;){here=state.lencode[hold&(1<>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;state.length=here_val;if(here_op===0){state.mode=LIT;break}if(here_op&32){state.back=-1;state.mode=TYPE;break}if(here_op&64){strm.msg="invalid literal/length code";state.mode=BAD;break}state.extra=here_op&15;state.mode=LENEXT;case LENEXT:if(state.extra){n=state.extra;while(bits>>=state.extra;bits-=state.extra;state.back+=state.extra}state.was=state.length;state.mode=DIST;case DIST:for(;;){here=state.distcode[hold&(1<>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;if(here_op&64){strm.msg="invalid distance code";state.mode=BAD;break}state.offset=here_val;state.extra=here_op&15;state.mode=DISTEXT;case DISTEXT:if(state.extra){n=state.extra;while(bits>>=state.extra;bits-=state.extra;state.back+=state.extra}if(state.offset>state.dmax){strm.msg="invalid distance too far back";state.mode=BAD;break}state.mode=MATCH;case MATCH:if(left===0){break inf_leave}copy=_out-left;if(state.offset>copy){copy=state.offset-copy;if(copy>state.whave){if(state.sane){strm.msg="invalid distance too far back";state.mode=BAD;break}}if(copy>state.wnext){copy-=state.wnext;from=state.wsize-copy}else{from=state.wnext-copy}if(copy>state.length){copy=state.length}from_source=state.window}else{from_source=output;from=put-state.offset;copy=state.length}if(copy>left){copy=left}left-=copy;state.length-=copy;do{output[put++]=from_source[from++]}while(--copy);if(state.length===0){state.mode=LEN}break;case LIT:if(left===0){break inf_leave}output[put++]=state.length;left--;state.mode=LEN;break;case CHECK:if(state.wrap){while(bits<32){if(have===0){break inf_leave}have--;hold|=input[next++]<=1;max--){if(count[max]!==0){break}}if(root>max){root=max}if(max===0){table[table_index++]=1<<24|64<<16|0;table[table_index++]=1<<24|64<<16|0;opts.bits=1;return 0}for(min=1;min0&&(type===CODES||max!==1)){return-1}offs[1]=0;for(len=1;lenENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}var i=0;for(;;){i++;here_bits=len-drop;if(work[sym]end){here_op=extra[extra_index+work[sym]];here_val=base[base_index+work[sym]]}else{here_op=32+64;here_val=0}incr=1<>drop)+fill]=here_bits<<24|here_op<<16|here_val|0}while(fill!==0);incr=1<>=1}if(incr!==0){huff&=incr-1;huff+=incr}else{huff=0}sym++;if(--count[len]===0){if(len===max){break}len=lens[lens_index+work[sym]]}if(len>root&&(huff&mask)!==low){if(drop===0){drop=root}next+=min;curr=len-drop;left=1<ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}low=huff&mask;table[low]=root<<24|curr<<16|next-table_index|0}}if(huff!==0){table[next+huff]=len-drop<<24|64<<16|0}opts.bits=root;return 0}},{"../utils/common":177}],185:[function(require,module,exports){"use strict";module.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],186:[function(require,module,exports){"use strict";var utils=require("../utils/common");var Z_FIXED=4;var Z_BINARY=0;var Z_TEXT=1;var Z_UNKNOWN=2;function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}var STORED_BLOCK=0;var STATIC_TREES=1;var DYN_TREES=2;var MIN_MATCH=3;var MAX_MATCH=258;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var Buf_size=16;var MAX_BL_BITS=7;var END_BLOCK=256;var REP_3_6=16;var REPZ_3_10=17;var REPZ_11_138=18;var extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var DIST_CODE_LEN=512;var static_ltree=new Array((L_CODES+2)*2);zero(static_ltree);var static_dtree=new Array(D_CODES*2);zero(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero(_dist_code);var _length_code=new Array(MAX_MATCH-MIN_MATCH+1);zero(_length_code);var base_length=new Array(LENGTH_CODES);zero(base_length);var base_dist=new Array(D_CODES);zero(base_dist);function StaticTreeDesc(static_tree,extra_bits,extra_base,elems,max_length){this.static_tree=static_tree;this.extra_bits=extra_bits;this.extra_base=extra_base;this.elems=elems;this.max_length=max_length;this.has_stree=static_tree&&static_tree.length}var static_l_desc;var static_d_desc;var static_bl_desc;function TreeDesc(dyn_tree,stat_desc){this.dyn_tree=dyn_tree;this.max_code=0;this.stat_desc=stat_desc}function d_code(dist){return dist<256?_dist_code[dist]:_dist_code[256+(dist>>>7)]}function put_short(s,w){s.pending_buf[s.pending++]=w&255;s.pending_buf[s.pending++]=w>>>8&255}function send_bits(s,value,length){if(s.bi_valid>Buf_size-length){s.bi_buf|=value<>Buf_size-s.bi_valid;s.bi_valid+=length-Buf_size}else{s.bi_buf|=value<>>=1;res<<=1}while(--len>0);return res>>>1}function bi_flush(s){if(s.bi_valid===16){put_short(s,s.bi_buf);s.bi_buf=0;s.bi_valid=0}else if(s.bi_valid>=8){s.pending_buf[s.pending++]=s.bi_buf&255;s.bi_buf>>=8;s.bi_valid-=8}}function gen_bitlen(s,desc){var tree=desc.dyn_tree;var max_code=desc.max_code;var stree=desc.stat_desc.static_tree;var has_stree=desc.stat_desc.has_stree;var extra=desc.stat_desc.extra_bits;var base=desc.stat_desc.extra_base;var max_length=desc.stat_desc.max_length;var h;var n,m;var bits;var xbits;var f;var overflow=0;for(bits=0;bits<=MAX_BITS;bits++){s.bl_count[bits]=0}tree[s.heap[s.heap_max]*2+1]=0;for(h=s.heap_max+1;hmax_length){bits=max_length;overflow++}tree[n*2+1]=bits;if(n>max_code){continue}s.bl_count[bits]++;xbits=0;if(n>=base){xbits=extra[n-base]}f=tree[n*2];s.opt_len+=f*(bits+xbits);if(has_stree){s.static_len+=f*(stree[n*2+1]+xbits)}}if(overflow===0){return}do{bits=max_length-1;while(s.bl_count[bits]===0){bits--}s.bl_count[bits]--;s.bl_count[bits+1]+=2;s.bl_count[max_length]--;overflow-=2}while(overflow>0);for(bits=max_length;bits!==0;bits--){n=s.bl_count[bits];while(n!==0){m=s.heap[--h];if(m>max_code){continue}if(tree[m*2+1]!==bits){s.opt_len+=(bits-tree[m*2+1])*tree[m*2];tree[m*2+1]=bits}n--}}}function gen_codes(tree,max_code,bl_count){var next_code=new Array(MAX_BITS+1);var code=0;var bits;var n;for(bits=1;bits<=MAX_BITS;bits++){next_code[bits]=code=code+bl_count[bits-1]<<1}for(n=0;n<=max_code;n++){var len=tree[n*2+1];if(len===0){continue}tree[n*2]=bi_reverse(next_code[len]++,len)}}function tr_static_init(){var n;var bits;var length;var code;var dist;var bl_count=new Array(MAX_BITS+1);length=0;for(code=0;code>=7;for(;code8){put_short(s,s.bi_buf)}else if(s.bi_valid>0){s.pending_buf[s.pending++]=s.bi_buf}s.bi_buf=0;s.bi_valid=0}function copy_block(s,buf,len,header){bi_windup(s);if(header){put_short(s,len);put_short(s,~len)}utils.arraySet(s.pending_buf,s.window,buf,len,s.pending);s.pending+=len}function smaller(tree,n,m,depth){var _n2=n*2;var _m2=m*2;return tree[_n2]>1;n>=1;n--){pqdownheap(s,tree,n)}node=elems;do{n=s.heap[1];s.heap[1]=s.heap[s.heap_len--];pqdownheap(s,tree,1);m=s.heap[1];s.heap[--s.heap_max]=n;s.heap[--s.heap_max]=m;tree[node*2]=tree[n*2]+tree[m*2];s.depth[node]=(s.depth[n]>=s.depth[m]?s.depth[n]:s.depth[m])+1;tree[n*2+1]=tree[m*2+1]=node;s.heap[1]=node++;pqdownheap(s,tree,1)}while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1];gen_bitlen(s,desc);gen_codes(tree,max_code,s.bl_count)}function scan_tree(s,tree,max_code){var n;var prevlen=-1;var curlen;var nextlen=tree[0*2+1];var count=0;var max_count=7;var min_count=4;if(nextlen===0){max_count=138;min_count=3}tree[(max_code+1)*2+1]=65535;for(n=0;n<=max_code;n++){curlen=nextlen;nextlen=tree[(n+1)*2+1];if(++count=3;max_blindex--){if(s.bl_tree[bl_order[max_blindex]*2+1]!==0){break}}s.opt_len+=3*(max_blindex+1)+5+5+4;return max_blindex}function send_all_trees(s,lcodes,dcodes,blcodes){var rank;send_bits(s,lcodes-257,5);send_bits(s,dcodes-1,5);send_bits(s,blcodes-4,4);for(rank=0;rank>>=1){if(black_mask&1&&s.dyn_ltree[n*2]!==0){return Z_BINARY}}if(s.dyn_ltree[9*2]!==0||s.dyn_ltree[10*2]!==0||s.dyn_ltree[13*2]!==0){return Z_TEXT}for(n=32;n0){if(s.strm.data_type===Z_UNKNOWN){s.strm.data_type=detect_data_type(s)}build_tree(s,s.l_desc);build_tree(s,s.d_desc);max_blindex=build_bl_tree(s);opt_lenb=s.opt_len+3+7>>>3;static_lenb=s.static_len+3+7>>>3;if(static_lenb<=opt_lenb){opt_lenb=static_lenb}}else{opt_lenb=static_lenb=stored_len+5}if(stored_len+4<=opt_lenb&&buf!==-1){_tr_stored_block(s,buf,stored_len,last)}else if(s.strategy===Z_FIXED||static_lenb===opt_lenb){send_bits(s,(STATIC_TREES<<1)+(last?1:0),3);compress_block(s,static_ltree,static_dtree)}else{send_bits(s,(DYN_TREES<<1)+(last?1:0),3);send_all_trees(s,s.l_desc.max_code+1,s.d_desc.max_code+1,max_blindex+1);compress_block(s,s.dyn_ltree,s.dyn_dtree)}init_block(s);if(last){bi_windup(s)}}function _tr_tally(s,dist,lc){s.pending_buf[s.d_buf+s.last_lit*2]=dist>>>8&255;s.pending_buf[s.d_buf+s.last_lit*2+1]=dist&255;s.pending_buf[s.l_buf+s.last_lit]=lc&255;s.last_lit++;if(dist===0){s.dyn_ltree[lc*2]++}else{s.matches++;dist--;s.dyn_ltree[(_length_code[lc]+LITERALS+1)*2]++;s.dyn_dtree[d_code(dist)*2]++}return s.last_lit===s.lit_bufsize-1}exports._tr_init=_tr_init;exports._tr_stored_block=_tr_stored_block;exports._tr_flush_block=_tr_flush_block;exports._tr_tally=_tr_tally;exports._tr_align=_tr_align},{"../utils/common":177}],187:[function(require,module,exports){"use strict";function ZStream(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}module.exports=ZStream},{}],188:[function(require,module,exports){module.exports={"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"}},{}],189:[function(require,module,exports){var asn1=require("asn1.js");var RSAPrivateKey=asn1.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())});exports.RSAPrivateKey=RSAPrivateKey;var RSAPublicKey=asn1.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});exports.RSAPublicKey=RSAPublicKey;var PublicKey=asn1.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPublicKey").bitstr())});exports.PublicKey=PublicKey;var AlgorithmIdentifier=asn1.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())});var PrivateKeyInfo=asn1.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPrivateKey").octstr())});exports.PrivateKey=PrivateKeyInfo;var EncryptedPrivateKeyInfo=asn1.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())});exports.EncryptedPrivateKey=EncryptedPrivateKeyInfo;var DSAPrivateKey=asn1.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())});exports.DSAPrivateKey=DSAPrivateKey;exports.DSAparam=asn1.define("DSAparam",function(){this.int()});var ECPrivateKey=asn1.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(ECParameters),this.key("publicKey").optional().explicit(1).bitstr())});exports.ECPrivateKey=ECPrivateKey;var ECParameters=asn1.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});exports.signature=asn1.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"asn1.js":8}],190:[function(require,module,exports){!function(Buffer){var findProc=/Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m;var startRegex=/^-----BEGIN (.*) KEY-----\r?\n/m;var fullRegex=/^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m;var evp=require("evp_bytestokey");var ciphers=require("browserify-aes");module.exports=function(okey,password){var key=okey.toString();var match=key.match(findProc);var decrypted;if(!match){var match2=key.match(fullRegex);decrypted=new Buffer(match2[2].replace(/\r?\n/g,""),"base64")}else{var suite="aes"+match[1];var iv=new Buffer(match[2],"hex");var cipherText=new Buffer(match[3].replace(/\r?\n/g,""),"base64");var cipherKey=evp(password,iv.slice(0,8),parseInt(match[1],10)).key;var out=[];var cipher=ciphers.createDecipheriv(suite,cipherKey,iv);out.push(cipher.update(cipherText));out.push(cipher.final());decrypted=Buffer.concat(out)}var tag=key.match(startRegex)[1]+" KEY";return{tag:tag,data:decrypted}}}.call(this,require("buffer").Buffer)},{"browserify-aes":40,buffer:67,evp_bytestokey:111}],191:[function(require,module,exports){!function(Buffer){var asn1=require("./asn1");var aesid=require("./aesid.json");var fixProc=require("./fixProc");var ciphers=require("browserify-aes");var compat=require("pbkdf2");module.exports=parseKeys;function parseKeys(buffer){var password;if(typeof buffer==="object"&&!Buffer.isBuffer(buffer)){password=buffer.passphrase;buffer=buffer.key}if(typeof buffer==="string"){buffer=new Buffer(buffer)}var stripped=fixProc(buffer,password);var type=stripped.tag;var data=stripped.data;var subtype,ndata;switch(type){case"PUBLIC KEY":ndata=asn1.PublicKey.decode(data,"der");subtype=ndata.algorithm.algorithm.join(".");switch(subtype){case"1.2.840.113549.1.1.1":return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":ndata.subjectPrivateKey=ndata.subjectPublicKey;return{type:"ec",data:ndata};case"1.2.840.10040.4.1":ndata.algorithm.params.pub_key=asn1.DSAparam.decode(ndata.subjectPublicKey.data,"der");return{type:"dsa",data:ndata.algorithm.params};default:throw new Error("unknown key id "+subtype)}throw new Error("unknown key type "+type);case"ENCRYPTED PRIVATE KEY":data=asn1.EncryptedPrivateKey.decode(data,"der");data=decrypt(data,password);case"PRIVATE KEY":ndata=asn1.PrivateKey.decode(data,"der");subtype=ndata.algorithm.algorithm.join(".");switch(subtype){case"1.2.840.113549.1.1.1":return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:ndata.algorithm.curve,privateKey:asn1.ECPrivateKey.decode(ndata.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":ndata.algorithm.params.priv_key=asn1.DSAparam.decode(ndata.subjectPrivateKey,"der");return{type:"dsa",params:ndata.algorithm.params};default:throw new Error("unknown key id "+subtype)}throw new Error("unknown key type "+type);case"RSA PUBLIC KEY":return asn1.RSAPublicKey.decode(data,"der");case"RSA PRIVATE KEY":return asn1.RSAPrivateKey.decode(data,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:asn1.DSAPrivateKey.decode(data,"der")};case"EC PRIVATE KEY":data=asn1.ECPrivateKey.decode(data,"der");return{curve:data.parameters.value,privateKey:data.privateKey};default:throw new Error("unknown key type "+type)}}parseKeys.signature=asn1.signature;function decrypt(data,password){var salt=data.algorithm.decrypt.kde.kdeparams.salt;var iters=parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(),10);var algo=aesid[data.algorithm.decrypt.cipher.algo.join(".")];var iv=data.algorithm.decrypt.cipher.iv;var cipherText=data.subjectPrivateKey;var keylen=parseInt(algo.split("-")[1],10)/8;var key=compat.pbkdf2Sync(password,salt,iters,keylen);var cipher=ciphers.createDecipheriv(algo,key,iv);var out=[];out.push(cipher.update(cipherText));out.push(cipher.final());return Buffer.concat(out)}}.call(this,require("buffer").Buffer)},{"./aesid.json":188,"./asn1":189,"./fixProc":190,"browserify-aes":40,buffer:67,pbkdf2:193}],192:[function(require,module,exports){!function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=6?"utf-8":"binary"}exports.pbkdf2Sync=function(password,salt,iterations,keylen,digest){if(!Buffer.isBuffer(password))password=new Buffer(password,defaultEncoding);if(!Buffer.isBuffer(salt))salt=new Buffer(salt,defaultEncoding);checkParameters(iterations,keylen);digest=digest||"sha1";var hLen;var l=1;var DK=new Buffer(keylen);var block1=new Buffer(salt.length+4);salt.copy(block1,0,0,salt.length);var r;var T;for(var i=1;i<=l;i++){block1.writeUInt32BE(i,salt.length);var U=createHmac(digest,password).update(block1).digest();if(!hLen){hLen=U.length;T=new Buffer(hLen);l=Math.ceil(keylen/hLen);r=keylen-(l-1)*hLen}U.copy(T,0,0,hLen);for(var j=1;jMAX_ALLOC||keylen!==keylen){throw new TypeError("Bad key length")}}},{}],195:[function(require,module,exports){"use strict";module.exports=typeof Promise==="function"?Promise:require("pinkie")},{pinkie:196}],196:[function(require,module,exports){!function(global){"use strict";var PENDING="pending";var SETTLED="settled";var FULFILLED="fulfilled";var REJECTED="rejected";var NOOP=function(){};var isNode=typeof global!=="undefined"&&typeof global.process!=="undefined"&&typeof global.process.emit==="function";var asyncSetTimer=typeof setImmediate==="undefined"?setTimeout:setImmediate;var asyncQueue=[];var asyncTimer;function asyncFlush(){for(var i=0;i1){for(var i=1;ik||new bn(enc).cmp(key.modulus)>=0){throw new Error("decryption error")}var msg;if(reverse){msg=withPublic(new bn(enc),key)}else{msg=crt(enc,key)}var zBuffer=new Buffer(k-msg.length);zBuffer.fill(0);msg=Buffer.concat([zBuffer,msg],k);if(padding===4){return oaep(key,msg)}else if(padding===1){return pkcs1(key,msg,reverse)}else if(padding===3){return msg}else{throw new Error("unknown padding")}};function oaep(key,msg){var n=key.modulus;var k=key.modulus.byteLength();var mLen=msg.length;var iHash=createHash("sha1").update(new Buffer("")).digest();var hLen=iHash.length;var hLen2=2*hLen;if(msg[0]!==0){throw new Error("decryption error")}var maskedSeed=msg.slice(1,hLen+1);var maskedDb=msg.slice(hLen+1);var seed=xor(maskedSeed,mgf(maskedDb,hLen));var db=xor(maskedDb,mgf(seed,k-hLen-1));if(compare(iHash,db.slice(0,hLen))){throw new Error("decryption error")}var i=hLen;while(db[i]===0){i++}if(db[i++]!==1){throw new Error("decryption error")}return db.slice(i)}function pkcs1(key,msg,reverse){var p1=msg.slice(0,2);var i=2;var status=0;while(msg[i++]!==0){if(i>=msg.length){status++;break}}var ps=msg.slice(2,i-1);var p2=msg.slice(i-1,i);if(p1.toString("hex")!=="0002"&&!reverse||p1.toString("hex")!=="0001"&&reverse){status++}if(ps.length<8){status++}if(status){throw new Error("decryption error")}return msg.slice(i)}function compare(a,b){a=new Buffer(a);b=new Buffer(b);var dif=0;var len=a.length;if(a.length!==b.length){dif++;len=Math.min(a.length,b.length)}var i=-1;while(++i=0){throw new Error("data too long for modulus")}}else{throw new Error("unknown padding")}if(reverse){return crt(paddedMsg,key)}else{return withPublic(paddedMsg,key)}};function oaep(key,msg){var k=key.modulus.byteLength();var mLen=msg.length;var iHash=createHash("sha1").update(new Buffer("")).digest();var hLen=iHash.length;var hLen2=2*hLen;if(mLen>k-hLen2-2){throw new Error("message too long")}var ps=new Buffer(k-mLen-hLen2-2);ps.fill(0);var dblen=k-hLen-1;var seed=randomBytes(hLen);var maskedDb=xor(Buffer.concat([iHash,ps,new Buffer([1]),msg],dblen),mgf(seed,dblen));var maskedSeed=xor(seed,mgf(maskedDb,hLen));return new bn(Buffer.concat([new Buffer([0]),maskedSeed,maskedDb],k))}function pkcs1(key,msg,reverse){var mLen=msg.length;var k=key.modulus.byteLength();if(mLen>k-11){throw new Error("message too long")}var ps;if(reverse){ps=new Buffer(k-mLen-3);ps.fill(255)}else{ps=nonZero(k-mLen-3)}return new bn(Buffer.concat([new Buffer([0,reverse?1:2]),ps,new Buffer([0]),msg],k))}function nonZero(len,crypto){var out=new Buffer(len);var i=0;var cache=randomBytes(len*2);var cur=0;var num;while(i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw new RangeError(errors[type])}function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter=55296&&value<=56319&&counter65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(j=0;j=128){error("not-basic")}output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index=inputLength){error("invalid-input")}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error("overflow")}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digitfloor(maxInt/baseMinusT)){error("overflow")}w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error("overflow") +}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)){error("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;jmaxInt){error("overflow")}if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q=0&&options.parseArrays&&index<=options.arrayLimit){obj=[];obj[index]=parseObject(chain,val,options)}else{obj[cleanRoot]=parseObject(chain,val,options)}}return obj};var parseKeys=function parseKeys(givenKey,val,options){if(!givenKey){return}var key=options.allowDots?givenKey.replace(/\.([^\.\[]+)/g,"[$1]"):givenKey;var parent=/^([^\[\]]*)/;var child=/(\[[^\[\]]*\])/g;var segment=parent.exec(key);var keys=[];if(segment[1]){if(!options.plainObjects&&has.call(Object.prototype,segment[1])){if(!options.allowPrototypes){return}}keys.push(segment[1])}var i=0;while((segment=child.exec(key))!==null&&i=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122){out+=string.charAt(i);continue}if(c<128){out=out+hexTable[c];continue}if(c<2048){out=out+(hexTable[192|c>>6]+hexTable[128|c&63]);continue}if(c<55296||c>=57344){out=out+(hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|c&63]);continue}i+=1;c=65536+((c&1023)<<10|string.charCodeAt(i)&1023);out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|c&63]}return out};exports.compact=function(obj,references){if(typeof obj!=="object"||obj===null){return obj}var refs=references||[];var lookup=refs.indexOf(obj);if(lookup!==-1){return refs[lookup]}refs.push(obj);if(Array.isArray(obj)){var compacted=[];for(var i=0;i0&&len>maxKeys){len=maxKeys}for(var i=0;i=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1)}else{kstr=x;vstr=""}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v}else if(isArray(obj[k])){obj[k].push(v)}else{obj[k]=[obj[k],v]}}return obj};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},{}],212:[function(require,module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){sep=sep||"&";eq=eq||"=";if(obj===null){obj=undefined}if(typeof obj==="object"){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep)}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]))}}).join(sep)}if(!name)return"";return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj))};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i65536)throw new Error("requested too many random bytes");var rawBytes=new global.Uint8Array(size);if(size>0){crypto.getRandomValues(rawBytes)}var bytes=new Buffer(rawBytes.buffer);if(typeof cb==="function"){return process.nextTick(function(){cb(null,bytes)})}return bytes}}.call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer)},{_process:198,buffer:67}],215:[function(require,module,exports){module.exports=require("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":216}],216:[function(require,module,exports){"use strict";var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){keys.push(key)}return keys};module.exports=Duplex;var processNextTick=require("process-nextick-args");var util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable");var Writable=require("./_stream_writable");util.inherits(Duplex,Readable);var keys=objectKeys(Writable.prototype);for(var v=0;v0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;if(state.decoder&&!addToFront&&!encoding){chunk=state.decoder.write(chunk);skipAdd=!state.objectMode&&chunk.length===0}if(!addToFront)state.reading=false;if(!skipAdd){if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}else{state.length-=n}if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;increasedAwaitDrain=true}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)dest.emit("error",er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var i=0;i=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.head.data;else ret=state.buffer.concat(state.length);state.buffer.clear()}else{ret=fromListPartial(n,state.buffer,state.decoder)}return ret}function fromListPartial(n,list,hasStrings){var ret;if(nstr.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=str.slice(nb)}break}++c}list.length-=c;return ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n);var p=list.head;var c=1;p.data.copy(ret); +n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=buf.slice(nb)}break}++c}list.length-=c;return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i-1?setImmediate:processNextTick;var Duplex;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")};var Stream;!function(){try{Stream=require("st"+"ream")}catch(_){}finally{if(!Stream)Stream=require("events").EventEmitter}}();var Buffer=require("buffer").Buffer;var bufferShim=require("buffer-shims");util.inherits(Writable,Stream);function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null}function WritableState(options,stream){Duplex=Duplex||require("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var current=this.bufferedRequest;var out=[];while(current){out.push(current);current=current.next}return out};!function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(_){}}();var realHasInstance;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){realHasInstance=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){if(realHasInstance.call(this,object))return true;return object&&object._writableState instanceof WritableState}})}else{realHasInstance=function(object){return object instanceof this}}function Writable(options){Duplex=Duplex||require("./_stream_duplex");if(!realHasInstance.call(Writable,this)&&!(this instanceof Duplex)){return new Writable(options)}this._writableState=new WritableState(options,this);this.writable=true;if(options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev}Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er);processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError("May not write null values to stream")}else if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}if(er){stream.emit("error",er);processNextTick(cb,er);valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(typeof encoding==="function"){cb=encoding;encoding=null}if(Buffer.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(validChunk(this,state,chunk,cb)){state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if(typeof encoding==="string")encoding=encoding.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding;return this};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=bufferShim.from(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length};BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length};BufferList.prototype.shift=function(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret};BufferList.prototype.clear=function(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next){ret+=s+p.data}return ret};BufferList.prototype.concat=function(n){if(this.length===0)return bufferShim.alloc(0);if(this.length===1)return this.head.data;var ret=bufferShim.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){p.data.copy(ret,i);i+=p.data.length;p=p.next}return ret}},{buffer:67,"buffer-shims":65}],222:[function(require,module,exports){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":217}],223:[function(require,module,exports){!function(process){var Stream=function(){try{return require("st"+"ream")}catch(_){}}();exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=Stream||exports;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");if(!process.browser&&process.env.READABLE_STREAM==="disable"&&Stream){module.exports=Stream}}.call(this,require("_process"))},{"./lib/_stream_duplex.js":216,"./lib/_stream_passthrough.js":217,"./lib/_stream_readable.js":218,"./lib/_stream_transform.js":219,"./lib/_stream_writable.js":220,_process:198}],224:[function(require,module,exports){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":219}],225:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":220}],226:[function(require,module,exports){"use strict";var extend=require("extend"),cookies=require("./lib/cookies"),helpers=require("./lib/helpers");var paramsHaveRequestBody=helpers.paramsHaveRequestBody;function initParams(uri,options,callback){if(typeof options==="function"){callback=options}var params={};if(typeof options==="object"){extend(params,options,{uri:uri})}else if(typeof uri==="string"){extend(params,{uri:uri})}else{extend(params,uri)}params.callback=callback||params.callback;return params}function request(uri,options,callback){if(typeof uri==="undefined"){throw new Error("undefined is not a valid uri or options object.")}var params=initParams(uri,options,callback);if(params.method==="HEAD"&¶msHaveRequestBody(params)){throw new Error("HTTP HEAD requests MUST NOT include a request body.")}return new request.Request(params)}function verbFunc(verb){var method=verb.toUpperCase();return function(uri,options,callback){var params=initParams(uri,options,callback);params.method=method;return request(params,params.callback)}}request.get=verbFunc("get");request.head=verbFunc("head");request.post=verbFunc("post");request.put=verbFunc("put");request.patch=verbFunc("patch");request.del=verbFunc("delete");request["delete"]=verbFunc("delete");request.jar=function(store){return cookies.jar(store)};request.cookie=function(str){return cookies.parse(str)};function wrapRequestMethod(method,options,requester,verb){return function(uri,opts,callback){var params=initParams(uri,opts,callback);var target={};extend(true,target,options,params);target.pool=params.pool||options.pool;if(verb){target.method=verb.toUpperCase()}if(typeof requester==="function"){method=requester}return method(target,target.callback)}}request.defaults=function(options,requester){var self=this;options=options||{};if(typeof options==="function"){requester=options;options={}}var defaults=wrapRequestMethod(self,options,requester);var verbs=["get","head","post","put","patch","del","delete"];verbs.forEach(function(verb){defaults[verb]=wrapRequestMethod(self[verb],options,requester,verb)});defaults.cookie=wrapRequestMethod(self.cookie,options,requester);defaults.jar=self.jar;defaults.defaults=self.defaults;return defaults};request.forever=function(agentOptions,optionsArg){var options={};if(optionsArg){extend(options,optionsArg)}if(agentOptions){options.agentOptions=agentOptions}options.forever=true;return request.defaults(options)};module.exports=request;request.Request=require("./request");request.initParams=initParams;Object.defineProperty(request,"debug",{enumerable:true,get:function(){return request.Request.debug},set:function(debug){request.Request.debug=debug}})},{"./lib/cookies":228,"./lib/helpers":231,"./request":237,extend:112}],227:[function(require,module,exports){"use strict";var caseless=require("caseless"),uuid=require("uuid"),helpers=require("./helpers");var md5=helpers.md5,toBase64=helpers.toBase64;function Auth(request){this.request=request;this.hasAuth=false;this.sentAuth=false;this.bearerToken=null;this.user=null;this.pass=null}Auth.prototype.basic=function(user,pass,sendImmediately){var self=this;if(typeof user!=="string"||pass!==undefined&&typeof pass!=="string"){self.request.emit("error",new Error("auth() received invalid user or password"))}self.user=user;self.pass=pass;self.hasAuth=true;var header=user+":"+(pass||"");if(sendImmediately||typeof sendImmediately==="undefined"){var authHeader="Basic "+toBase64(header);self.sentAuth=true;return authHeader}};Auth.prototype.bearer=function(bearer,sendImmediately){var self=this;self.bearerToken=bearer;self.hasAuth=true;if(sendImmediately||typeof sendImmediately==="undefined"){if(typeof bearer==="function"){bearer=bearer()}var authHeader="Bearer "+(bearer||"");self.sentAuth=true;return authHeader}};Auth.prototype.digest=function(method,path,authHeader){var self=this;var challenge={};var re=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){var match=re.exec(authHeader);if(!match){break}challenge[match[1]]=match[2]||match[3]}var ha1Compute=function(algorithm,user,realm,pass,nonce,cnonce){var ha1=md5(user+":"+realm+":"+pass);if(algorithm&&algorithm.toLowerCase()==="md5-sess"){return md5(ha1+":"+nonce+":"+cnonce)}else{return ha1}};var qop=/(^|,)\s*auth\s*($|,)/.test(challenge.qop)&&"auth";var nc=qop&&"00000001";var cnonce=qop&&uuid().replace(/-/g,"");var ha1=ha1Compute(challenge.algorithm,self.user,challenge.realm,self.pass,challenge.nonce,cnonce);var ha2=md5(method+":"+path);var digestResponse=qop?md5(ha1+":"+challenge.nonce+":"+nc+":"+cnonce+":"+qop+":"+ha2):md5(ha1+":"+challenge.nonce+":"+ha2);var authValues={username:self.user,realm:challenge.realm,nonce:challenge.nonce,uri:path,qop:qop,response:digestResponse,nc:nc,cnonce:cnonce,algorithm:challenge.algorithm,opaque:challenge.opaque};authHeader=[];for(var k in authValues){if(authValues[k]){if(k==="qop"||k==="nc"||k==="algorithm"){authHeader.push(k+"="+authValues[k])}else{authHeader.push(k+'="'+authValues[k]+'"')}}}authHeader="Digest "+authHeader.join(", ");self.sentAuth=true;return authHeader};Auth.prototype.onRequest=function(user,pass,sendImmediately,bearer){var self=this,request=self.request;var authHeader;if(bearer===undefined&&user===undefined){self.request.emit("error",new Error("no auth mechanism defined"))}else if(bearer!==undefined){authHeader=self.bearer(bearer,sendImmediately)}else{authHeader=self.basic(user,pass,sendImmediately)}if(authHeader){request.setHeader("authorization",authHeader)}};Auth.prototype.onResponse=function(response){var self=this,request=self.request;if(!self.hasAuth||self.sentAuth){return null}var c=caseless(response.headers);var authHeader=c.get("www-authenticate");var authVerb=authHeader&&authHeader.split(" ")[0].toLowerCase();request.debug("reauth",authVerb);switch(authVerb){case"basic":return self.basic(self.user,self.pass,true);case"bearer":return self.bearer(self.bearerToken,true);case"digest":return self.digest(request.method,request.path,authHeader)}};exports.Auth=Auth},{"./helpers":231,caseless:69,uuid:294}],228:[function(require,module,exports){"use strict";var tough=require("tough-cookie");var Cookie=tough.Cookie,CookieJar=tough.CookieJar;exports.parse=function(str){if(str&&str.uri){str=str.uri}if(typeof str!=="string"){throw new Error("The cookie function only accepts STRING as param")}return Cookie.parse(str,{loose:true})};function RequestJar(store){var self=this;self._jar=new CookieJar(store,{looseMode:true})}RequestJar.prototype.setCookie=function(cookieOrStr,uri,options){var self=this;return self._jar.setCookieSync(cookieOrStr,uri,options||{})};RequestJar.prototype.getCookieString=function(uri){var self=this;return self._jar.getCookieStringSync(uri)};RequestJar.prototype.getCookies=function(uri){var self=this;return self._jar.getCookiesSync(uri)};exports.jar=function(store){return new RequestJar(store)}},{"tough-cookie":279}],229:[function(require,module,exports){!function(process){"use strict";function formatHostname(hostname){return hostname.replace(/^\.*/,".").toLowerCase()}function parseNoProxyZone(zone){zone=zone.trim().toLowerCase();var zoneParts=zone.split(":",2),zoneHost=formatHostname(zoneParts[0]),zonePort=zoneParts[1],hasPort=zone.indexOf(":")>-1;return{hostname:zoneHost,port:zonePort,hasPort:hasPort}}function uriInNoProxy(uri,noProxy){var port=uri.port||(uri.protocol==="https:"?"443":"80"),hostname=formatHostname(uri.hostname),noProxyList=noProxy.split(",");return noProxyList.map(parseNoProxyZone).some(function(noProxyZone){var isMatchedAt=hostname.indexOf(noProxyZone.hostname),hostnameMatched=isMatchedAt>-1&&isMatchedAt===hostname.length-noProxyZone.hostname.length;if(noProxyZone.hasPort){return port===noProxyZone.port&&hostnameMatched}return hostnameMatched})}function getProxyFromURI(uri){var noProxy=process.env.NO_PROXY||process.env.no_proxy||"";if(noProxy==="*"){return null}if(noProxy!==""&&uriInNoProxy(uri,noProxy)){return null}if(uri.protocol==="http:"){return process.env.HTTP_PROXY||process.env.http_proxy||null}if(uri.protocol==="https:"){return process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||null}return null}module.exports=getProxyFromURI}.call(this,require("_process"))},{_process:198}],230:[function(require,module,exports){"use strict";var fs=require("fs");var qs=require("querystring");var validate=require("har-validator");var extend=require("extend");function Har(request){this.request=request}Har.prototype.reducer=function(obj,pair){if(obj[pair.name]===undefined){obj[pair.name]=pair.value;return obj}var arr=[obj[pair.name],pair.value];obj[pair.name]=arr;return obj};Har.prototype.prep=function(data){data.queryObj={};data.headersObj={};data.postData.jsonObj=false;data.postData.paramsObj=false;if(data.queryString&&data.queryString.length){data.queryObj=data.queryString.reduce(this.reducer,{})}if(data.headers&&data.headers.length){data.headersObj=data.headers.reduceRight(function(headers,header){headers[header.name]=header.value;return headers},{})}if(data.cookies&&data.cookies.length){var cookies=data.cookies.map(function(cookie){return cookie.name+"="+cookie.value});if(cookies.length){data.headersObj.cookie=cookies.join("; ")}}function some(arr){return arr.some(function(type){return data.postData.mimeType.indexOf(type)===0})}if(some(["multipart/mixed","multipart/related","multipart/form-data","multipart/alternative"])){data.postData.mimeType="multipart/form-data"}else if(some(["application/x-www-form-urlencoded"])){if(!data.postData.params){data.postData.text=""}else{data.postData.paramsObj=data.postData.params.reduce(this.reducer,{});data.postData.text=qs.stringify(data.postData.paramsObj)}}else if(some(["text/json","text/x-json","application/json","application/x-json"])){data.postData.mimeType="application/json";if(data.postData.text){try{data.postData.jsonObj=JSON.parse(data.postData.text)}catch(e){this.request.debug(e);data.postData.mimeType="text/plain"}}}return data};Har.prototype.options=function(options){if(!options.har){return options}var har={};extend(har,options.har);if(har.log&&har.log.entries){har=har.log.entries[0]}har.url=har.url||options.url||options.uri||options.baseUrl||"/";har.httpVersion=har.httpVersion||"HTTP/1.1";har.queryString=har.queryString||[];har.headers=har.headers||[];har.cookies=har.cookies||[];har.postData=har.postData||{};har.postData.mimeType=har.postData.mimeType||"application/octet-stream";har.bodySize=0;har.headersSize=0;har.postData.size=0;if(!validate.request(har)){return options}var req=this.prep(har);if(req.url){options.url=req.url}if(req.method){options.method=req.method}if(Object.keys(req.queryObj).length){options.qs=req.queryObj}if(Object.keys(req.headersObj).length){options.headers=req.headersObj}function test(type){return req.postData.mimeType.indexOf(type)===0}if(test("application/x-www-form-urlencoded")){options.form=req.postData.paramsObj}else if(test("application/json")){if(req.postData.jsonObj){options.body=req.postData.jsonObj;options.json=true}}else if(test("multipart/form-data")){options.formData={};req.postData.params.forEach(function(param){var attachment={};if(!param.fileName&&!param.fileName&&!param.contentType){options.formData[param.name]=param.value;return}if(param.fileName&&!param.value){attachment.value=fs.createReadStream(param.fileName)}else if(param.value){attachment.value=param.value}if(param.fileName){attachment.options={filename:param.fileName,contentType:param.contentType?param.contentType:null}}options.formData[param.name]=attachment})}else{if(req.postData.text){options.body=req.postData.text}}return options};exports.Har=Har},{extend:112,fs:64,"har-validator":119,querystring:213}],231:[function(require,module,exports){!function(process,Buffer){"use strict";var jsonSafeStringify=require("json-stringify-safe"),crypto=require("crypto");var defer=typeof setImmediate==="undefined"?process.nextTick:setImmediate;function paramsHaveRequestBody(params){return params.body||params.requestBodyStream||params.json&&typeof params.json!=="boolean"||params.multipart}function safeStringify(obj,replacer){var ret;try{ret=JSON.stringify(obj,replacer)}catch(e){ret=jsonSafeStringify(obj,replacer)}return ret}function md5(str){return crypto.createHash("md5").update(str).digest("hex")}function isReadStream(rs){return rs.readable&&rs.path&&rs.mode}function toBase64(str){return new Buffer(str||"","utf8").toString("base64")}function copy(obj){var o={};Object.keys(obj).forEach(function(i){o[i]=obj[i]});return o}function version(){var numbers=process.version.replace("v","").split(".");return{major:parseInt(numbers[0],10),minor:parseInt(numbers[1],10),patch:parseInt(numbers[2],10)}}exports.paramsHaveRequestBody=paramsHaveRequestBody;exports.safeStringify=safeStringify;exports.md5=md5;exports.isReadStream=isReadStream;exports.toBase64=toBase64;exports.copy=copy;exports.version=version;exports.defer=defer}.call(this,require("_process"),require("buffer").Buffer)},{_process:198,buffer:67,crypto:78,"json-stringify-safe":168}],232:[function(require,module,exports){!function(Buffer){"use strict";var uuid=require("uuid"),CombinedStream=require("combined-stream"),isstream=require("isstream");function Multipart(request){this.request=request;this.boundary=uuid();this.chunked=false;this.body=null}Multipart.prototype.isChunked=function(options){var self=this,chunked=false,parts=options.data||options;if(!parts.forEach){self.request.emit("error",new Error("Argument error, options.multipart."))}if(options.chunked!==undefined){chunked=options.chunked}if(self.request.getHeader("transfer-encoding")==="chunked"){chunked=true}if(!chunked){parts.forEach(function(part){if(typeof part.body==="undefined"){self.request.emit("error",new Error("Body attribute missing in multipart."))}if(isstream(part.body)){chunked=true}})}return chunked};Multipart.prototype.setHeaders=function(chunked){var self=this;if(chunked&&!self.request.hasHeader("transfer-encoding")){self.request.setHeader("transfer-encoding","chunked")}var header=self.request.getHeader("content-type");if(!header||header.indexOf("multipart")===-1){self.request.setHeader("content-type","multipart/related; boundary="+self.boundary)}else{if(header.indexOf("boundary")!==-1){self.boundary=header.replace(/.*boundary=([^\s;]+).*/,"$1")}else{self.request.setHeader("content-type",header+"; boundary="+self.boundary)}}};Multipart.prototype.build=function(parts,chunked){var self=this;var body=chunked?new CombinedStream:[];function add(part){if(typeof part==="number"){part=part.toString()}return chunked?body.append(part):body.push(new Buffer(part))}if(self.request.preambleCRLF){add("\r\n")}parts.forEach(function(part){var preamble="--"+self.boundary+"\r\n";Object.keys(part).forEach(function(key){if(key==="body"){return}preamble+=key+": "+part[key]+"\r\n"});preamble+="\r\n";add(preamble);add(part.body);add("\r\n")});add("--"+self.boundary+"--");if(self.request.postambleCRLF){add("\r\n")}return body};Multipart.prototype.onRequest=function(options){var self=this;var chunked=self.isChunked(options),parts=options.data||options;self.setHeaders(chunked);self.chunked=chunked;self.body=self.build(parts,chunked)};exports.Multipart=Multipart}.call(this,require("buffer").Buffer)},{buffer:67,"combined-stream":71,isstream:159,uuid:294}],233:[function(require,module,exports){!function(Buffer){"use strict";var url=require("url"),qs=require("qs"),caseless=require("caseless"),uuid=require("uuid"),oauth=require("oauth-sign"),crypto=require("crypto");function OAuth(request){this.request=request;this.params=null}OAuth.prototype.buildParams=function(_oauth,uri,method,query,form,qsLib){var oa={};for(var i in _oauth){oa["oauth_"+i]=_oauth[i]}if(!oa.oauth_version){oa.oauth_version="1.0"}if(!oa.oauth_timestamp){oa.oauth_timestamp=Math.floor(Date.now()/1e3).toString()}if(!oa.oauth_nonce){oa.oauth_nonce=uuid().replace(/-/g,"")}if(!oa.oauth_signature_method){oa.oauth_signature_method="HMAC-SHA1"}var consumer_secret_or_private_key=oa.oauth_consumer_secret||oa.oauth_private_key;delete oa.oauth_consumer_secret;delete oa.oauth_private_key;var token_secret=oa.oauth_token_secret;delete oa.oauth_token_secret;var realm=oa.oauth_realm;delete oa.oauth_realm;delete oa.oauth_transport_method;var baseurl=uri.protocol+"//"+uri.host+uri.pathname;var params=qsLib.parse([].concat(query,form,qsLib.stringify(oa)).join("&"));oa.oauth_signature=oauth.sign(oa.oauth_signature_method,method,baseurl,params,consumer_secret_or_private_key,token_secret);if(realm){oa.realm=realm}return oa};OAuth.prototype.buildBodyHash=function(_oauth,body){if(["HMAC-SHA1","RSA-SHA1"].indexOf(_oauth.signature_method||"HMAC-SHA1")<0){this.request.emit("error",new Error("oauth: "+_oauth.signature_method+" signature_method not supported with body_hash signing."))}var shasum=crypto.createHash("sha1"); +shasum.update(body||"");var sha1=shasum.digest("hex");return new Buffer(sha1).toString("base64")};OAuth.prototype.concatParams=function(oa,sep,wrap){wrap=wrap||"";var params=Object.keys(oa).filter(function(i){return i!=="realm"&&i!=="oauth_signature"}).sort();if(oa.realm){params.splice(0,0,"realm")}params.push("oauth_signature");return params.map(function(i){return i+"="+wrap+oauth.rfc3986(oa[i])+wrap}).join(sep)};OAuth.prototype.onRequest=function(_oauth){var self=this;self.params=_oauth;var uri=self.request.uri||{},method=self.request.method||"",headers=caseless(self.request.headers),body=self.request.body||"",qsLib=self.request.qsLib||qs;var form,query,contentType=headers.get("content-type")||"",formContentType="application/x-www-form-urlencoded",transport=_oauth.transport_method||"header";if(contentType.slice(0,formContentType.length)===formContentType){contentType=formContentType;form=body}if(uri.query){query=uri.query}if(transport==="body"&&(method!=="POST"||contentType!==formContentType)){self.request.emit("error",new Error("oauth: transport_method of body requires POST "+"and content-type "+formContentType))}if(!form&&typeof _oauth.body_hash==="boolean"){_oauth.body_hash=self.buildBodyHash(_oauth,self.request.body.toString())}var oa=self.buildParams(_oauth,uri,method,query,form,qsLib);switch(transport){case"header":self.request.setHeader("Authorization","OAuth "+self.concatParams(oa,",",'"'));break;case"query":var href=self.request.uri.href+=(query?"&":"?")+self.concatParams(oa,"&");self.request.uri=url.parse(href);self.request.path=self.request.uri.path;break;case"body":self.request.body=(form?form+"&":"")+self.concatParams(oa,"&");break;default:self.request.emit("error",new Error("oauth: transport_method invalid"))}};exports.OAuth=OAuth}.call(this,require("buffer").Buffer)},{buffer:67,caseless:69,crypto:78,"oauth-sign":176,qs:207,url:288,uuid:294}],234:[function(require,module,exports){"use strict";var qs=require("qs"),querystring=require("querystring");function Querystring(request){this.request=request;this.lib=null;this.useQuerystring=null;this.parseOptions=null;this.stringifyOptions=null}Querystring.prototype.init=function(options){if(this.lib){return}this.useQuerystring=options.useQuerystring;this.lib=this.useQuerystring?querystring:qs;this.parseOptions=options.qsParseOptions||{};this.stringifyOptions=options.qsStringifyOptions||{}};Querystring.prototype.stringify=function(obj){return this.useQuerystring?this.rfc3986(this.lib.stringify(obj,this.stringifyOptions.sep||null,this.stringifyOptions.eq||null,this.stringifyOptions)):this.lib.stringify(obj,this.stringifyOptions)};Querystring.prototype.parse=function(str){return this.useQuerystring?this.lib.parse(str,this.parseOptions.sep||null,this.parseOptions.eq||null,this.parseOptions):this.lib.parse(str,this.parseOptions)};Querystring.prototype.rfc3986=function(str){return str.replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()})};Querystring.prototype.unescape=querystring.unescape;exports.Querystring=Querystring},{qs:207,querystring:213}],235:[function(require,module,exports){"use strict";var url=require("url");var isUrl=/^https?:/;function Redirect(request){this.request=request;this.followRedirect=true;this.followRedirects=true;this.followAllRedirects=false;this.followOriginalHttpMethod=false;this.allowRedirect=function(){return true};this.maxRedirects=10;this.redirects=[];this.redirectsFollowed=0;this.removeRefererHeader=false}Redirect.prototype.onRequest=function(options){var self=this;if(options.maxRedirects!==undefined){self.maxRedirects=options.maxRedirects}if(typeof options.followRedirect==="function"){self.allowRedirect=options.followRedirect}if(options.followRedirect!==undefined){self.followRedirects=!!options.followRedirect}if(options.followAllRedirects!==undefined){self.followAllRedirects=options.followAllRedirects}if(self.followRedirects||self.followAllRedirects){self.redirects=self.redirects||[]}if(options.removeRefererHeader!==undefined){self.removeRefererHeader=options.removeRefererHeader}if(options.followOriginalHttpMethod!==undefined){self.followOriginalHttpMethod=options.followOriginalHttpMethod}};Redirect.prototype.redirectTo=function(response){var self=this,request=self.request;var redirectTo=null;if(response.statusCode>=300&&response.statusCode<400&&response.caseless.has("location")){var location=response.caseless.get("location");request.debug("redirect",location);if(self.followAllRedirects){redirectTo=location}else if(self.followRedirects){switch(request.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:redirectTo=location;break}}}else if(response.statusCode===401){var authHeader=request._auth.onResponse(response);if(authHeader){request.setHeader("authorization",authHeader);redirectTo=request.uri}}return redirectTo};Redirect.prototype.onResponse=function(response){var self=this,request=self.request;var redirectTo=self.redirectTo(response);if(!redirectTo||!self.allowRedirect.call(request,response)){return false}request.debug("redirect to",redirectTo);if(response.resume){response.resume()}if(self.redirectsFollowed>=self.maxRedirects){request.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+request.uri.href));return false}self.redirectsFollowed+=1;if(!isUrl.test(redirectTo)){redirectTo=url.resolve(request.uri.href,redirectTo)}var uriPrev=request.uri;request.uri=url.parse(redirectTo);if(request.uri.protocol!==uriPrev.protocol){delete request.agent}self.redirects.push({statusCode:response.statusCode,redirectUri:redirectTo});if(self.followAllRedirects&&request.method!=="HEAD"&&response.statusCode!==401&&response.statusCode!==307){request.method=self.followOriginalHttpMethod?request.method:"GET"}delete request.src;delete request.req;delete request._started;if(response.statusCode!==401&&response.statusCode!==307){delete request.body;delete request._form;if(request.headers){request.removeHeader("host");request.removeHeader("content-type");request.removeHeader("content-length");if(request.uri.hostname!==request.originalHost.split(":")[0]){request.removeHeader("authorization")}}}if(!self.removeRefererHeader){request.setHeader("referer",uriPrev.href)}request.emit("redirect");request.init();return true};exports.Redirect=Redirect},{url:288}],236:[function(require,module,exports){"use strict";var url=require("url"),tunnel=require("tunnel-agent");var defaultProxyHeaderWhiteList=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"];var defaultProxyHeaderExclusiveList=["proxy-authorization"];function constructProxyHost(uriObject){var port=uriObject.port,protocol=uriObject.protocol,proxyHost=uriObject.hostname+":";if(port){proxyHost+=port}else if(protocol==="https:"){proxyHost+="443"}else{proxyHost+="80"}return proxyHost}function constructProxyHeaderWhiteList(headers,proxyHeaderWhiteList){var whiteList=proxyHeaderWhiteList.reduce(function(set,header){set[header.toLowerCase()]=true;return set},{});return Object.keys(headers).filter(function(header){return whiteList[header.toLowerCase()]}).reduce(function(set,header){set[header]=headers[header];return set},{})}function constructTunnelOptions(request,proxyHeaders){var proxy=request.proxy;var tunnelOptions={proxy:{host:proxy.hostname,port:+proxy.port,proxyAuth:proxy.auth,headers:proxyHeaders},headers:request.headers,ca:request.ca,cert:request.cert,key:request.key,passphrase:request.passphrase,pfx:request.pfx,ciphers:request.ciphers,rejectUnauthorized:request.rejectUnauthorized,secureOptions:request.secureOptions,secureProtocol:request.secureProtocol};return tunnelOptions}function constructTunnelFnName(uri,proxy){var uriProtocol=uri.protocol==="https:"?"https":"http";var proxyProtocol=proxy.protocol==="https:"?"Https":"Http";return[uriProtocol,proxyProtocol].join("Over")}function getTunnelFn(request){var uri=request.uri;var proxy=request.proxy;var tunnelFnName=constructTunnelFnName(uri,proxy);return tunnel[tunnelFnName]}function Tunnel(request){this.request=request;this.proxyHeaderWhiteList=defaultProxyHeaderWhiteList;this.proxyHeaderExclusiveList=[];if(typeof request.tunnel!=="undefined"){this.tunnelOverride=request.tunnel}}Tunnel.prototype.isEnabled=function(){var self=this,request=self.request;if(typeof self.tunnelOverride!=="undefined"){return self.tunnelOverride}if(request.uri.protocol==="https:"){return true}return false};Tunnel.prototype.setup=function(options){var self=this,request=self.request;options=options||{};if(typeof request.proxy==="string"){request.proxy=url.parse(request.proxy)}if(!request.proxy||!request.tunnel){return false}if(options.proxyHeaderWhiteList){self.proxyHeaderWhiteList=options.proxyHeaderWhiteList}if(options.proxyHeaderExclusiveList){self.proxyHeaderExclusiveList=options.proxyHeaderExclusiveList}var proxyHeaderExclusiveList=self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList);var proxyHeaderWhiteList=self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList);var proxyHeaders=constructProxyHeaderWhiteList(request.headers,proxyHeaderWhiteList);proxyHeaders.host=constructProxyHost(request.uri);proxyHeaderExclusiveList.forEach(request.removeHeader,request);var tunnelFn=getTunnelFn(request);var tunnelOptions=constructTunnelOptions(request,proxyHeaders);request.agent=tunnelFn(tunnelOptions);return true};Tunnel.defaultProxyHeaderWhiteList=defaultProxyHeaderWhiteList;Tunnel.defaultProxyHeaderExclusiveList=defaultProxyHeaderExclusiveList;exports.Tunnel=Tunnel},{"tunnel-agent":286,url:288}],237:[function(require,module,exports){!function(process,Buffer){"use strict";var http=require("http"),https=require("https"),url=require("url"),util=require("util"),stream=require("stream"),zlib=require("zlib"),hawk=require("hawk"),aws2=require("aws-sign2"),aws4=require("aws4"),httpSignature=require("http-signature"),mime=require("mime-types"),stringstream=require("stringstream"),caseless=require("caseless"),ForeverAgent=require("forever-agent"),FormData=require("form-data"),extend=require("extend"),isstream=require("isstream"),isTypedArray=require("is-typedarray").strict,helpers=require("./lib/helpers"),cookies=require("./lib/cookies"),getProxyFromURI=require("./lib/getProxyFromURI"),Querystring=require("./lib/querystring").Querystring,Har=require("./lib/har").Har,Auth=require("./lib/auth").Auth,OAuth=require("./lib/oauth").OAuth,Multipart=require("./lib/multipart").Multipart,Redirect=require("./lib/redirect").Redirect,Tunnel=require("./lib/tunnel").Tunnel;var safeStringify=helpers.safeStringify,isReadStream=helpers.isReadStream,toBase64=helpers.toBase64,defer=helpers.defer,copy=helpers.copy,version=helpers.version,globalCookieJar=cookies.jar();var globalPool={};function filterForNonReserved(reserved,options){var object={};for(var i in options){var notReserved=reserved.indexOf(i)===-1;if(notReserved){object[i]=options[i]}}return object}function filterOutReservedFunctions(reserved,options){var object={};for(var i in options){var isReserved=!(reserved.indexOf(i)===-1);var isFunction=typeof options[i]==="function";if(!(isReserved&&isFunction)){object[i]=options[i]}}return object}function requestToJSON(){var self=this;return{uri:self.uri,method:self.method,headers:self.headers}}function responseToJSON(){var self=this;return{statusCode:self.statusCode,body:self.body,headers:self.headers,request:requestToJSON.call(self.request)}}function Request(options){var self=this;if(options.har){self._har=new Har(self);options=self._har.options(options)}stream.Stream.call(self);var reserved=Object.keys(Request.prototype);var nonReserved=filterForNonReserved(reserved,options);extend(self,nonReserved);options=filterOutReservedFunctions(reserved,options);self.readable=true;self.writable=true;if(options.method){self.explicitMethod=true}self._qs=new Querystring(self);self._auth=new Auth(self);self._oauth=new OAuth(self);self._multipart=new Multipart(self);self._redirect=new Redirect(self);self._tunnel=new Tunnel(self);self.init(options)}util.inherits(Request,stream.Stream);Request.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function debug(){if(Request.debug){console.error("REQUEST %s",util.format.apply(util,arguments))}}Request.prototype.debug=debug;Request.prototype.init=function(options){var self=this;if(!options){options={}}self.headers=self.headers?copy(self.headers):{};for(var headerName in self.headers){if(typeof self.headers[headerName]==="undefined"){delete self.headers[headerName]}}caseless.httpify(self,self.headers);if(!self.method){self.method=options.method||"GET"}if(!self.localAddress){self.localAddress=options.localAddress}self._qs.init(options);debug(options);if(!self.pool&&self.pool!==false){self.pool=globalPool}self.dests=self.dests||[];self.__isRequestRequest=true;if(!self._callback&&self.callback){self._callback=self.callback;self.callback=function(){if(self._callbackCalled){return}self._callbackCalled=true;self._callback.apply(self,arguments)};self.on("error",self.callback.bind());self.on("complete",self.callback.bind(self,null))}if(!self.uri&&self.url){self.uri=self.url;delete self.url}if(self.baseUrl){if(typeof self.baseUrl!=="string"){return self.emit("error",new Error("options.baseUrl must be a string"))}if(typeof self.uri!=="string"){return self.emit("error",new Error("options.uri must be a string when using options.baseUrl"))}if(self.uri.indexOf("//")===0||self.uri.indexOf("://")!==-1){return self.emit("error",new Error("options.uri must be a path when using options.baseUrl"))}var baseUrlEndsWithSlash=self.baseUrl.lastIndexOf("/")===self.baseUrl.length-1;var uriStartsWithSlash=self.uri.indexOf("/")===0;if(baseUrlEndsWithSlash&&uriStartsWithSlash){self.uri=self.baseUrl+self.uri.slice(1)}else if(baseUrlEndsWithSlash||uriStartsWithSlash){self.uri=self.baseUrl+self.uri}else if(self.uri===""){self.uri=self.baseUrl}else{self.uri=self.baseUrl+"/"+self.uri}delete self.baseUrl}if(!self.uri){return self.emit("error",new Error("options.uri is a required argument"))}if(typeof self.uri==="string"){self.uri=url.parse(self.uri)}if(!self.uri.href){self.uri.href=url.format(self.uri)}if(self.uri.protocol==="unix:"){return self.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"))}if(self.uri.host==="unix"){self.enableUnixSocket()}if(self.strictSSL===false){self.rejectUnauthorized=false}if(!self.uri.pathname){self.uri.pathname="/"}if(!(self.uri.host||self.uri.hostname&&self.uri.port)&&!self.uri.isUnix){var faultyUri=url.format(self.uri);var message='Invalid URI "'+faultyUri+'"';if(Object.keys(options).length===0){message+=". This can be caused by a crappy redirection."}self.abort();return self.emit("error",new Error(message))}if(!self.hasOwnProperty("proxy")){self.proxy=getProxyFromURI(self.uri)}self.tunnel=self._tunnel.isEnabled();if(self.proxy){self._tunnel.setup(options)}self._redirect.onRequest(options);self.setHost=false;if(!self.hasHeader("host")){var hostHeaderName=self.originalHostHeaderName||"host";self.setHeader(hostHeaderName,self.uri.hostname);if(self.uri.port){if(!(self.uri.port===80&&self.uri.protocol==="http:")&&!(self.uri.port===443&&self.uri.protocol==="https:")){self.setHeader(hostHeaderName,self.getHeader("host")+(":"+self.uri.port))}}self.setHost=true}self.jar(self._jar||options.jar);if(!self.uri.port){if(self.uri.protocol==="http:"){self.uri.port=80}else if(self.uri.protocol==="https:"){self.uri.port=443}}if(self.proxy&&!self.tunnel){self.port=self.proxy.port;self.host=self.proxy.hostname}else{self.port=self.uri.port;self.host=self.uri.hostname}if(options.form){self.form(options.form)}if(options.formData){var formData=options.formData;var requestForm=self.form();var appendFormValue=function(key,value){if(value&&value.hasOwnProperty("value")&&value.hasOwnProperty("options")){requestForm.append(key,value.value,value.options)}else{requestForm.append(key,value)}};for(var formKey in formData){if(formData.hasOwnProperty(formKey)){var formValue=formData[formKey];if(formValue instanceof Array){for(var j=0;j=100&&code<200||code===204||code===304};var responseContent;if(self.gzip&&!noBody(response.statusCode)){var contentEncoding=response.headers["content-encoding"]||"identity";contentEncoding=contentEncoding.trim().toLowerCase();if(contentEncoding==="gzip"){responseContent=zlib.createGunzip();response.pipe(responseContent)}else if(contentEncoding==="deflate"){responseContent=zlib.createInflate();response.pipe(responseContent)}else{if(contentEncoding!=="identity"){debug("ignoring unrecognized Content-Encoding "+contentEncoding)}responseContent=response}}else{responseContent=response}if(self.encoding){if(self.dests.length!==0){console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")}else if(responseContent.setEncoding){responseContent.setEncoding(self.encoding)}else{responseContent=responseContent.pipe(stringstream(self.encoding))}}if(self._paused){responseContent.pause()}self.responseContent=responseContent;self.emit("response",response);self.dests.forEach(function(dest){self.pipeDest(dest)});responseContent.on("data",function(chunk){if(self.timing&&!self.responseStarted){self.responseStartTime=(new Date).getTime();response.responseStartTime=self.responseStartTime}self._destdata=true;self.emit("data",chunk)});responseContent.once("end",function(chunk){self.emit("end",chunk)});responseContent.on("error",function(error){self.emit("error",error)});responseContent.on("close",function(){self.emit("close")});if(self.callback){self.readResponseBody(response)}else{self.on("end",function(){if(self._aborted){debug("aborted",self.uri.href);return}self.emit("complete",response)})}}debug("finish init function",self.uri.href)};Request.prototype.readResponseBody=function(response){var self=this;debug("reading response's body");var buffers=[],bufferLength=0,strings=[];self.on("data",function(chunk){if(!Buffer.isBuffer(chunk)){strings.push(chunk)}else if(chunk.length){bufferLength+=chunk.length;buffers.push(chunk)}});self.on("end",function(){debug("end event",self.uri.href);if(self._aborted){debug("aborted",self.uri.href);buffers=[];bufferLength=0;return}if(bufferLength){debug("has body",self.uri.href,bufferLength);response.body=Buffer.concat(buffers,bufferLength);if(self.encoding!==null){response.body=response.body.toString(self.encoding)}buffers=[];bufferLength=0}else if(strings.length){if(self.encoding==="utf8"&&strings[0].length>0&&strings[0][0]===""){strings[0]=strings[0].substring(1)}response.body=strings.join("")}if(self._json){try{response.body=JSON.parse(response.body,self._jsonReviver)}catch(e){debug("invalid JSON received",self.uri.href)}}debug("emitting complete",self.uri.href);if(typeof response.body==="undefined"&&!self._json){response.body=self.encoding===null?new Buffer(0):""}self.emit("complete",response,response.body)})};Request.prototype.abort=function(){var self=this;self._aborted=true;if(self.req){self.req.abort()}else if(self.response){self.response.destroy()}self.emit("abort")};Request.prototype.pipeDest=function(dest){var self=this;var response=self.response;if(dest.headers&&!dest.headersSent){if(response.caseless.has("content-type")){var ctname=response.caseless.has("content-type");if(dest.setHeader){dest.setHeader(ctname,response.headers[ctname])}else{dest.headers[ctname]=response.headers[ctname]}}if(response.caseless.has("content-length")){var clname=response.caseless.has("content-length");if(dest.setHeader){dest.setHeader(clname,response.headers[clname])}else{dest.headers[clname]=response.headers[clname]}}}if(dest.setHeader&&!dest.headersSent){for(var i in response.headers){if(!self.gzip||i!=="content-encoding"){dest.setHeader(i,response.headers[i])}}dest.statusCode=response.statusCode}if(self.pipefilter){self.pipefilter(response,dest)}};Request.prototype.qs=function(q,clobber){var self=this;var base;if(!clobber&&self.uri.query){base=self._qs.parse(self.uri.query)}else{base={}}for(var i in q){base[i]=q[i]}var qs=self._qs.stringify(base);if(qs===""){return self}self.uri=url.parse(self.uri.href.split("?")[0]+"?"+qs);self.url=self.uri;self.path=self.uri.path;if(self.uri.host==="unix"){self.enableUnixSocket()}return self};Request.prototype.form=function(form){var self=this;if(form){if(!/^application\/x-www-form-urlencoded\b/.test(self.getHeader("content-type"))){self.setHeader("content-type","application/x-www-form-urlencoded")}self.body=typeof form==="string"?self._qs.rfc3986(form.toString("utf8")):self._qs.stringify(form).toString("utf8");return self}self._form=new FormData;self._form.on("error",function(err){err.message="form-data: "+err.message;self.emit("error",err);self.abort()});return self._form};Request.prototype.multipart=function(multipart){var self=this;self._multipart.onRequest(multipart);if(!self._multipart.chunked){self.body=self._multipart.body}return self};Request.prototype.json=function(val){var self=this;if(!self.hasHeader("accept")){self.setHeader("accept","application/json")}if(typeof self.jsonReplacer==="function"){self._jsonReplacer=self.jsonReplacer}self._json=true;if(typeof val==="boolean"){if(self.body!==undefined){if(!/^application\/x-www-form-urlencoded\b/.test(self.getHeader("content-type"))){self.body=safeStringify(self.body,self._jsonReplacer) +}else{self.body=self._qs.rfc3986(self.body)}if(!self.hasHeader("content-type")){self.setHeader("content-type","application/json")}}}else{self.body=safeStringify(val,self._jsonReplacer);if(!self.hasHeader("content-type")){self.setHeader("content-type","application/json")}}if(typeof self.jsonReviver==="function"){self._jsonReviver=self.jsonReviver}return self};Request.prototype.getHeader=function(name,headers){var self=this;var result,re,match;if(!headers){headers=self.headers}Object.keys(headers).forEach(function(key){if(key.length!==name.length){return}re=new RegExp(name,"i");match=key.match(re);if(match){result=headers[key]}});return result};Request.prototype.enableUnixSocket=function(){var unixParts=this.uri.path.split(":"),host=unixParts[0],path=unixParts[1];this.socketPath=host;this.uri.pathname=path;this.uri.path=path;this.uri.host=host;this.uri.hostname=host;this.uri.isUnix=true};Request.prototype.auth=function(user,pass,sendImmediately,bearer){var self=this;self._auth.onRequest(user,pass,sendImmediately,bearer);return self};Request.prototype.aws=function(opts,now){var self=this;if(!now){self._aws=opts;return self}if(opts.sign_version==4||opts.sign_version=="4"){var options={host:self.uri.host,path:self.uri.path,method:self.method,headers:{"content-type":self.getHeader("content-type")||""},body:self.body};var signRes=aws4.sign(options,{accessKeyId:opts.key,secretAccessKey:opts.secret,sessionToken:opts.session});self.setHeader("authorization",signRes.headers.Authorization);self.setHeader("x-amz-date",signRes.headers["X-Amz-Date"]);if(signRes.headers["X-Amz-Security-Token"]){self.setHeader("x-amz-security-token",signRes.headers["X-Amz-Security-Token"])}}else{var date=new Date;self.setHeader("date",date.toUTCString());var auth={key:opts.key,secret:opts.secret,verb:self.method.toUpperCase(),date:date,contentType:self.getHeader("content-type")||"",md5:self.getHeader("content-md5")||"",amazonHeaders:aws2.canonicalizeHeaders(self.headers)};var path=self.uri.path;if(opts.bucket&&path){auth.resource="/"+opts.bucket+path}else if(opts.bucket&&!path){auth.resource="/"+opts.bucket}else if(!opts.bucket&&path){auth.resource=path}else if(!opts.bucket&&!path){auth.resource="/"}auth.resource=aws2.canonicalizeResource(auth.resource);self.setHeader("authorization",aws2.authorization(auth))}return self};Request.prototype.httpSignature=function(opts){var self=this;httpSignature.signRequest({getHeader:function(header){return self.getHeader(header,self.headers)},setHeader:function(header,value){self.setHeader(header,value)},method:self.method,path:self.path},opts);debug("httpSignature authorization",self.getHeader("authorization"));return self};Request.prototype.hawk=function(opts){var self=this;self.setHeader("Authorization",hawk.client.header(self.uri,self.method,opts).field)};Request.prototype.oauth=function(_oauth){var self=this;self._oauth.onRequest(_oauth);return self};Request.prototype.jar=function(jar){var self=this;var cookies;if(self._redirect.redirectsFollowed===0){self.originalCookieHeader=self.getHeader("cookie")}if(!jar){cookies=false;self._disableCookies=true}else{var targetCookieJar=jar&&jar.getCookieString?jar:globalCookieJar;var urihref=self.uri.href;if(targetCookieJar){cookies=targetCookieJar.getCookieString(urihref)}}if(cookies&&cookies.length){if(self.originalCookieHeader){self.setHeader("cookie",self.originalCookieHeader+"; "+cookies)}else{self.setHeader("cookie",cookies)}}self._jar=jar;return self};Request.prototype.pipe=function(dest,opts){var self=this;if(self.response){if(self._destdata){self.emit("error",new Error("You cannot pipe after data has been emitted from the response."))}else if(self._ended){self.emit("error",new Error("You cannot pipe after the response has been ended."))}else{stream.Stream.prototype.pipe.call(self,dest,opts);self.pipeDest(dest);return dest}}else{self.dests.push(dest);stream.Stream.prototype.pipe.call(self,dest,opts);return dest}};Request.prototype.write=function(){var self=this;if(self._aborted){return}if(!self._started){self.start()}if(self.req){return self.req.write.apply(self.req,arguments)}};Request.prototype.end=function(chunk){var self=this;if(self._aborted){return}if(chunk){self.write(chunk)}if(!self._started){self.start()}if(self.req){self.req.end()}};Request.prototype.pause=function(){var self=this;if(!self.responseContent){self._paused=true}else{self.responseContent.pause.apply(self.responseContent,arguments)}};Request.prototype.resume=function(){var self=this;if(!self.responseContent){self._paused=false}else{self.responseContent.resume.apply(self.responseContent,arguments)}};Request.prototype.destroy=function(){var self=this;if(!self._ended){self.end()}else if(self.response){self.response.destroy()}};Request.defaultProxyHeaderWhiteList=Tunnel.defaultProxyHeaderWhiteList.slice();Request.defaultProxyHeaderExclusiveList=Tunnel.defaultProxyHeaderExclusiveList.slice();Request.prototype.toJSON=requestToJSON;module.exports=Request}.call(this,require("_process"),require("buffer").Buffer)},{"./lib/auth":227,"./lib/cookies":228,"./lib/getProxyFromURI":229,"./lib/har":230,"./lib/helpers":231,"./lib/multipart":232,"./lib/oauth":233,"./lib/querystring":234,"./lib/redirect":235,"./lib/tunnel":236,_process:198,"aws-sign2":30,aws4:31,buffer:67,caseless:69,extend:112,"forever-agent":114,"form-data":115,hawk:143,http:272,"http-signature":144,https:149,"is-typedarray":157,isstream:159,"mime-types":174,stream:271,stringstream:277,url:288,util:293,zlib:63}],238:[function(require,module,exports){!function(Buffer){var zl=[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];var zr=[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];var sl=[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];var sr=[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];var hl=[0,1518500249,1859775393,2400959708,2840853838];var hr=[1352829926,1548603684,1836072691,2053994217,0];function bytesToWords(bytes){var words=[];for(var i=0,b=0;i>>5]|=bytes[i]<<24-b%32}return words}function wordsToBytes(words){var bytes=[];for(var b=0;b>>5]>>>24-b%32&255)}return bytes}function processBlock(H,M,offset){for(var i=0;i<16;i++){var offset_i=offset+i;var M_offset_i=M[offset_i];M[offset_i]=(M_offset_i<<8|M_offset_i>>>24)&16711935|(M_offset_i<<24|M_offset_i>>>8)&4278255360}var al,bl,cl,dl,el;var ar,br,cr,dr,er;ar=al=H[0];br=bl=H[1];cr=cl=H[2];dr=dl=H[3];er=el=H[4];var t;for(i=0;i<80;i+=1){t=al+M[offset+zl[i]]|0;if(i<16){t+=f1(bl,cl,dl)+hl[0]}else if(i<32){t+=f2(bl,cl,dl)+hl[1]}else if(i<48){t+=f3(bl,cl,dl)+hl[2]}else if(i<64){t+=f4(bl,cl,dl)+hl[3]}else{t+=f5(bl,cl,dl)+hl[4]}t=t|0;t=rotl(t,sl[i]);t=t+el|0;al=el;el=dl;dl=rotl(cl,10);cl=bl;bl=t;t=ar+M[offset+zr[i]]|0;if(i<16){t+=f5(br,cr,dr)+hr[0]}else if(i<32){t+=f4(br,cr,dr)+hr[1]}else if(i<48){t+=f3(br,cr,dr)+hr[2]}else if(i<64){t+=f2(br,cr,dr)+hr[3]}else{t+=f1(br,cr,dr)+hr[4]}t=t|0;t=rotl(t,sr[i]);t=t+er|0;ar=er;er=dr;dr=rotl(cr,10);cr=br;br=t}t=H[1]+cl+dr|0;H[1]=H[2]+dl+er|0;H[2]=H[3]+el+ar|0;H[3]=H[4]+al+br|0;H[4]=H[0]+bl+cr|0;H[0]=t}function f1(x,y,z){return x^y^z}function f2(x,y,z){return x&y|~x&z}function f3(x,y,z){return(x|~y)^z}function f4(x,y,z){return x&z|y&~z}function f5(x,y,z){return x^(y|~z)}function rotl(x,n){return x<>>32-n}function ripemd160(message){var H=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof message==="string"){message=new Buffer(message,"utf8")}var m=bytesToWords(message);var nBitsLeft=message.length*8;var nBitsTotal=message.length*8;m[nBitsLeft>>>5]|=128<<24-nBitsLeft%32;m[(nBitsLeft+64>>>9<<4)+14]=(nBitsTotal<<8|nBitsTotal>>>24)&16711935|(nBitsTotal<<24|nBitsTotal>>>8)&4278255360;for(var i=0;i>>24)&16711935|(H_i<<24|H_i>>>8)&4278255360}var digestbytes=wordsToBytes(H);return new Buffer(digestbytes)}module.exports=ripemd160}.call(this,require("buffer").Buffer)},{buffer:67}],239:[function(require,module,exports){!function(Buffer){function Hash(blockSize,finalSize){this._block=new Buffer(blockSize);this._finalSize=finalSize;this._blockSize=blockSize;this._len=0;this._s=0}Hash.prototype.update=function(data,enc){if(typeof data==="string"){enc=enc||"utf8";data=new Buffer(data,enc)}var l=this._len+=data.length;var s=this._s||0;var f=0;var buffer=this._block;while(s=this._finalSize*8){this._update(this._block);this._block.fill(0)}this._block.writeInt32BE(l,this._blockSize-4);var hash=this._update(this._block)||this._hash();return enc?hash.toString(enc):hash};Hash.prototype._update=function(){throw new Error("_update must be implemented by subclass")};module.exports=Hash}.call(this,require("buffer").Buffer)},{buffer:67}],240:[function(require,module,exports){var exports=module.exports=function SHA(algorithm){algorithm=algorithm.toLowerCase();var Algorithm=exports[algorithm];if(!Algorithm)throw new Error(algorithm+" is not supported (we accept pull requests)");return new Algorithm};exports.sha=require("./sha");exports.sha1=require("./sha1");exports.sha224=require("./sha224");exports.sha256=require("./sha256");exports.sha384=require("./sha384");exports.sha512=require("./sha512")},{"./sha":241,"./sha1":242,"./sha224":243,"./sha256":244,"./sha384":245,"./sha512":246}],241:[function(require,module,exports){!function(Buffer){var inherits=require("inherits");var Hash=require("./hash");var K=[1518500249,1859775393,2400959708|0,3395469782|0];var W=new Array(80);function Sha(){this.init();this._w=W;Hash.call(this,64,56)}inherits(Sha,Hash);Sha.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function rotl5(num){return num<<5|num>>>27}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){if(s===0)return b&c|~b&d;if(s===2)return b&c|b&d|c&d;return b^c^d}Sha.prototype._update=function(M){var W=this._w;var a=this._a|0;var b=this._b|0;var c=this._c|0;var d=this._d|0;var e=this._e|0;for(var i=0;i<16;++i)W[i]=M.readInt32BE(i*4);for(;i<80;++i)W[i]=W[i-3]^W[i-8]^W[i-14]^W[i-16];for(var j=0;j<80;++j){var s=~~(j/20);var t=rotl5(a)+ft(s,b,c,d)+e+W[j]+K[s]|0;e=d;d=c;c=rotl30(b);b=a;a=t}this._a=a+this._a|0;this._b=b+this._b|0;this._c=c+this._c|0;this._d=d+this._d|0;this._e=e+this._e|0};Sha.prototype._hash=function(){var H=new Buffer(20);H.writeInt32BE(this._a|0,0);H.writeInt32BE(this._b|0,4);H.writeInt32BE(this._c|0,8);H.writeInt32BE(this._d|0,12);H.writeInt32BE(this._e|0,16);return H};module.exports=Sha}.call(this,require("buffer").Buffer)},{"./hash":239,buffer:67,inherits:152}],242:[function(require,module,exports){!function(Buffer){var inherits=require("inherits");var Hash=require("./hash");var K=[1518500249,1859775393,2400959708|0,3395469782|0];var W=new Array(80);function Sha1(){this.init();this._w=W;Hash.call(this,64,56)}inherits(Sha1,Hash);Sha1.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function rotl1(num){return num<<1|num>>>31}function rotl5(num){return num<<5|num>>>27}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){if(s===0)return b&c|~b&d;if(s===2)return b&c|b&d|c&d;return b^c^d}Sha1.prototype._update=function(M){var W=this._w;var a=this._a|0;var b=this._b|0;var c=this._c|0;var d=this._d|0;var e=this._e|0;for(var i=0;i<16;++i)W[i]=M.readInt32BE(i*4);for(;i<80;++i)W[i]=rotl1(W[i-3]^W[i-8]^W[i-14]^W[i-16]);for(var j=0;j<80;++j){var s=~~(j/20);var t=rotl5(a)+ft(s,b,c,d)+e+W[j]+K[s]|0;e=d;d=c;c=rotl30(b);b=a;a=t}this._a=a+this._a|0;this._b=b+this._b|0;this._c=c+this._c|0;this._d=d+this._d|0;this._e=e+this._e|0};Sha1.prototype._hash=function(){var H=new Buffer(20);H.writeInt32BE(this._a|0,0);H.writeInt32BE(this._b|0,4);H.writeInt32BE(this._c|0,8);H.writeInt32BE(this._d|0,12);H.writeInt32BE(this._e|0,16);return H};module.exports=Sha1}.call(this,require("buffer").Buffer)},{"./hash":239,buffer:67,inherits:152}],243:[function(require,module,exports){!function(Buffer){var inherits=require("inherits");var Sha256=require("./sha256");var Hash=require("./hash");var W=new Array(64);function Sha224(){this.init();this._w=W;Hash.call(this,64,56)}inherits(Sha224,Sha256);Sha224.prototype.init=function(){this._a=3238371032;this._b=914150663;this._c=812702999;this._d=4144912697;this._e=4290775857;this._f=1750603025;this._g=1694076839;this._h=3204075428;return this};Sha224.prototype._hash=function(){var H=new Buffer(28);H.writeInt32BE(this._a,0);H.writeInt32BE(this._b,4);H.writeInt32BE(this._c,8);H.writeInt32BE(this._d,12);H.writeInt32BE(this._e,16);H.writeInt32BE(this._f,20);H.writeInt32BE(this._g,24);return H};module.exports=Sha224}.call(this,require("buffer").Buffer)},{"./hash":239,"./sha256":244,buffer:67,inherits:152}],244:[function(require,module,exports){!function(Buffer){var inherits=require("inherits");var Hash=require("./hash");var K=[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];var W=new Array(64);function Sha256(){this.init();this._w=W;Hash.call(this,64,56)}inherits(Sha256,Hash);Sha256.prototype.init=function(){this._a=1779033703;this._b=3144134277;this._c=1013904242;this._d=2773480762;this._e=1359893119;this._f=2600822924;this._g=528734635;this._h=1541459225;return this};function ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function sigma1(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function gamma0(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}function gamma1(x){return(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10}Sha256.prototype._update=function(M){var W=this._w;var a=this._a|0;var b=this._b|0;var c=this._c|0;var d=this._d|0;var e=this._e|0;var f=this._f|0;var g=this._g|0;var h=this._h|0;for(var i=0;i<16;++i)W[i]=M.readInt32BE(i*4);for(;i<64;++i)W[i]=gamma1(W[i-2])+W[i-7]+gamma0(W[i-15])+W[i-16]|0;for(var j=0;j<64;++j){var T1=h+sigma1(e)+ch(e,f,g)+K[j]+W[j]|0;var T2=sigma0(a)+maj(a,b,c)|0;h=g;g=f;f=e;e=d+T1|0;d=c;c=b;b=a;a=T1+T2|0}this._a=a+this._a|0;this._b=b+this._b|0;this._c=c+this._c|0;this._d=d+this._d|0;this._e=e+this._e|0;this._f=f+this._f|0;this._g=g+this._g|0;this._h=h+this._h|0};Sha256.prototype._hash=function(){var H=new Buffer(32);H.writeInt32BE(this._a,0);H.writeInt32BE(this._b,4);H.writeInt32BE(this._c,8);H.writeInt32BE(this._d,12);H.writeInt32BE(this._e,16);H.writeInt32BE(this._f,20);H.writeInt32BE(this._g,24);H.writeInt32BE(this._h,28);return H};module.exports=Sha256}.call(this,require("buffer").Buffer)},{"./hash":239,buffer:67,inherits:152}],245:[function(require,module,exports){!function(Buffer){var inherits=require("inherits");var SHA512=require("./sha512");var Hash=require("./hash");var W=new Array(160);function Sha384(){this.init();this._w=W;Hash.call(this,128,112)}inherits(Sha384,SHA512);Sha384.prototype.init=function(){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;return this};Sha384.prototype._hash=function(){var H=new Buffer(48);function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset);H.writeInt32BE(l,offset+4)}writeInt64BE(this._ah,this._al,0);writeInt64BE(this._bh,this._bl,8);writeInt64BE(this._ch,this._cl,16);writeInt64BE(this._dh,this._dl,24);writeInt64BE(this._eh,this._el,32);writeInt64BE(this._fh,this._fl,40);return H};module.exports=Sha384}.call(this,require("buffer").Buffer)},{"./hash":239,"./sha512":246,buffer:67,inherits:152}],246:[function(require,module,exports){!function(Buffer){var inherits=require("inherits");var Hash=require("./hash");var K=[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];var W=new Array(160);function Sha512(){this.init();this._w=W;Hash.call(this,128,112)}inherits(Sha512,Hash);Sha512.prototype.init=function(){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;return this};function Ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x,xl){return(x>>>28|xl<<4)^(xl>>>2|x<<30)^(xl>>>7|x<<25)}function sigma1(x,xl){return(x>>>14|xl<<18)^(x>>>18|xl<<14)^(xl>>>9|x<<23)}function Gamma0(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^x>>>7}function Gamma0l(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^(x>>>7|xl<<25)}function Gamma1(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^x>>>6}function Gamma1l(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^(x>>>6|xl<<26)}function getCarry(a,b){return a>>>0>>0?1:0}Sha512.prototype._update=function(M){var W=this._w;var ah=this._ah|0;var bh=this._bh|0;var ch=this._ch|0;var dh=this._dh|0;var eh=this._eh|0;var fh=this._fh|0;var gh=this._gh|0;var hh=this._hh|0;var al=this._al|0;var bl=this._bl|0;var cl=this._cl|0;var dl=this._dl|0;var el=this._el|0;var fl=this._fl|0;var gl=this._gl|0;var hl=this._hl|0;for(var i=0;i<32;i+=2){W[i]=M.readInt32BE(i*4);W[i+1]=M.readInt32BE(i*4+4)}for(;i<160;i+=2){var xh=W[i-15*2];var xl=W[i-15*2+1];var gamma0=Gamma0(xh,xl);var gamma0l=Gamma0l(xl,xh);xh=W[i-2*2];xl=W[i-2*2+1];var gamma1=Gamma1(xh,xl);var gamma1l=Gamma1l(xl,xh);var Wi7h=W[i-7*2];var Wi7l=W[i-7*2+1];var Wi16h=W[i-16*2];var Wi16l=W[i-16*2+1];var Wil=gamma0l+Wi7l|0;var Wih=gamma0+Wi7h+getCarry(Wil,gamma0l)|0;Wil=Wil+gamma1l|0;Wih=Wih+gamma1+getCarry(Wil,gamma1l)|0;Wil=Wil+Wi16l|0;Wih=Wih+Wi16h+getCarry(Wil,Wi16l)|0;W[i]=Wih;W[i+1]=Wil}for(var j=0;j<160;j+=2){Wih=W[j];Wil=W[j+1];var majh=maj(ah,bh,ch);var majl=maj(al,bl,cl);var sigma0h=sigma0(ah,al);var sigma0l=sigma0(al,ah);var sigma1h=sigma1(eh,el);var sigma1l=sigma1(el,eh);var Kih=K[j];var Kil=K[j+1];var chh=Ch(eh,fh,gh);var chl=Ch(el,fl,gl);var t1l=hl+sigma1l|0;var t1h=hh+sigma1h+getCarry(t1l,hl)|0;t1l=t1l+chl|0;t1h=t1h+chh+getCarry(t1l,chl)|0;t1l=t1l+Kil|0;t1h=t1h+Kih+getCarry(t1l,Kil)|0;t1l=t1l+Wil|0;t1h=t1h+Wih+getCarry(t1l,Wil)|0;var t2l=sigma0l+majl|0;var t2h=sigma0h+majh+getCarry(t2l,sigma0l)|0;hh=gh;hl=gl;gh=fh;gl=fl;fh=eh;fl=el;el=dl+t1l|0;eh=dh+t1h+getCarry(el,dl)|0;dh=ch;dl=cl;ch=bh;cl=bl;bh=ah;bl=al;al=t1l+t2l|0;ah=t1h+t2h+getCarry(al,t1l)|0}this._al=this._al+al|0;this._bl=this._bl+bl|0;this._cl=this._cl+cl|0;this._dl=this._dl+dl|0;this._el=this._el+el|0;this._fl=this._fl+fl|0;this._gl=this._gl+gl|0;this._hl=this._hl+hl|0;this._ah=this._ah+ah+getCarry(this._al,al)|0;this._bh=this._bh+bh+getCarry(this._bl,bl)|0;this._ch=this._ch+ch+getCarry(this._cl,cl)|0;this._dh=this._dh+dh+getCarry(this._dl,dl)|0;this._eh=this._eh+eh+getCarry(this._el,el)|0;this._fh=this._fh+fh+getCarry(this._fl,fl)|0;this._gh=this._gh+gh+getCarry(this._gl,gl)|0;this._hh=this._hh+hh+getCarry(this._hl,hl)|0};Sha512.prototype._hash=function(){var H=new Buffer(64);function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset);H.writeInt32BE(l,offset+4)}writeInt64BE(this._ah,this._al,0);writeInt64BE(this._bh,this._bl,8);writeInt64BE(this._ch,this._cl,16);writeInt64BE(this._dh,this._dl,24);writeInt64BE(this._eh,this._el,32);writeInt64BE(this._fh,this._fl,40);writeInt64BE(this._gh,this._gl,48);writeInt64BE(this._hh,this._hl,56);return H};module.exports=Sha512}.call(this,require("buffer").Buffer)},{"./hash":239,buffer:67,inherits:152}],247:[function(require,module,exports){!function(Buffer){var algInfo={dsa:{parts:["p","q","g","y"],sizePart:"p"},rsa:{parts:["e","n"],sizePart:"n"},ecdsa:{parts:["curve","Q"],sizePart:"Q"},ed25519:{parts:["R"],normalize:false,sizePart:"R"}};algInfo["curve25519"]=algInfo["ed25519"];var algPrivInfo={dsa:{parts:["p","q","g","y","x"]},rsa:{parts:["n","e","d","iqmp","p","q"]},ecdsa:{parts:["curve","Q","d"]},ed25519:{parts:["R","r"],normalize:false}};algPrivInfo["curve25519"]=algPrivInfo["ed25519"];var hashAlgs={md5:true,sha1:true,sha256:true,sha384:true,sha512:true};var curves={nistp256:{size:256,pkcs8oid:"1.2.840.10045.3.1.7",p:new Buffer(("00"+"ffffffff 00000001 00000000 00000000"+"00000000 ffffffff ffffffff ffffffff").replace(/ /g,""),"hex"),a:new Buffer(("00"+"FFFFFFFF 00000001 00000000 00000000"+"00000000 FFFFFFFF FFFFFFFF FFFFFFFC").replace(/ /g,""),"hex"),b:new Buffer(("5ac635d8 aa3a93e7 b3ebbd55 769886bc"+"651d06b0 cc53b0f6 3bce3c3e 27d2604b").replace(/ /g,""),"hex"),s:new Buffer(("00"+"c49d3608 86e70493 6a6678e1 139d26b7"+"819f7e90").replace(/ /g,""),"hex"),n:new Buffer(("00"+"ffffffff 00000000 ffffffff ffffffff"+"bce6faad a7179e84 f3b9cac2 fc632551").replace(/ /g,""),"hex"),G:new Buffer(("04"+"6b17d1f2 e12c4247 f8bce6e5 63a440f2"+"77037d81 2deb33a0 f4a13945 d898c296"+"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16"+"2bce3357 6b315ece cbb64068 37bf51f5").replace(/ /g,""),"hex")},nistp384:{size:384,pkcs8oid:"1.3.132.0.34",p:new Buffer(("00"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff fffffffe"+"ffffffff 00000000 00000000 ffffffff").replace(/ /g,""),"hex"),a:new Buffer(("00"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE"+"FFFFFFFF 00000000 00000000 FFFFFFFC").replace(/ /g,""),"hex"),b:new Buffer(("b3312fa7 e23ee7e4 988e056b e3f82d19"+"181d9c6e fe814112 0314088f 5013875a"+"c656398d 8a2ed19d 2a85c8ed d3ec2aef").replace(/ /g,""),"hex"),s:new Buffer(("00"+"a335926a a319a27a 1d00896a 6773a482"+"7acdac73").replace(/ /g,""),"hex"),n:new Buffer(("00"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff c7634d81 f4372ddf"+"581a0db2 48b0a77a ecec196a ccc52973").replace(/ /g,""),"hex"),G:new Buffer(("04"+"aa87ca22 be8b0537 8eb1c71e f320ad74"+"6e1d3b62 8ba79b98 59f741e0 82542a38"+"5502f25d bf55296c 3a545e38 72760ab7"+"3617de4a 96262c6f 5d9e98bf 9292dc29"+"f8f41dbd 289a147c e9da3113 b5f0b8c0"+"0a60b1ce 1d7e819d 7a431d7c 90ea0e5f").replace(/ /g,""),"hex")},nistp521:{size:521,pkcs8oid:"1.3.132.0.35",p:new Buffer(("01ffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff ffffffff"+"ffff").replace(/ /g,""),"hex"),a:new Buffer(("01FF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"+"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC").replace(/ /g,""),"hex"),b:new Buffer(("51"+"953eb961 8e1c9a1f 929a21a0 b68540ee"+"a2da725b 99b315f3 b8b48991 8ef109e1"+"56193951 ec7e937b 1652c0bd 3bb1bf07"+"3573df88 3d2c34f1 ef451fd4 6b503f00").replace(/ /g,""),"hex"),s:new Buffer(("00"+"d09e8800 291cb853 96cc6717 393284aa"+"a0da64ba").replace(/ /g,""),"hex"),n:new Buffer(("01ff"+"ffffffff ffffffff ffffffff ffffffff"+"ffffffff ffffffff ffffffff fffffffa"+"51868783 bf2f966b 7fcc0148 f709a5d0"+"3bb5c9b8 899c47ae bb6fb71e 91386409").replace(/ /g,""),"hex"),G:new Buffer(("04"+"00c6 858e06b7 0404e9cd 9e3ecb66 2395b442"+"9c648139 053fb521 f828af60 6b4d3dba"+"a14b5e77 efe75928 fe1dc127 a2ffa8de"+"3348b3c1 856a429b f97e7e31 c2e5bd66"+"0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9"+"98f54449 579b4468 17afbd17 273e662c"+"97ee7299 5ef42640 c550b901 3fad0761"+"353c7086 a272c240 88be9476 9fd16650").replace(/ /g,""),"hex")}};module.exports={info:algInfo,privInfo:algPrivInfo,hashAlgs:hashAlgs,curves:curves}}.call(this,require("buffer").Buffer)},{buffer:67}],248:[function(require,module,exports){!function(Buffer){module.exports=Certificate;var assert=require("assert-plus");var algs=require("./algs");var crypto=require("crypto");var Fingerprint=require("./fingerprint");var Signature=require("./signature");var errs=require("./errors");var util=require("util");var utils=require("./utils");var Key=require("./key");var PrivateKey=require("./private-key");var Identity=require("./identity");var formats={};formats["openssh"]=require("./formats/openssh-cert");formats["x509"]=require("./formats/x509");formats["pem"]=require("./formats/x509-pem");var CertificateParseError=errs.CertificateParseError;var InvalidAlgorithmError=errs.InvalidAlgorithmError;function Certificate(opts){assert.object(opts,"options");assert.arrayOfObject(opts.subjects,"options.subjects");utils.assertCompatible(opts.subjects[0],Identity,[1,0],"options.subjects");utils.assertCompatible(opts.subjectKey,Key,[1,0],"options.subjectKey");utils.assertCompatible(opts.issuer,Identity,[1,0],"options.issuer");if(opts.issuerKey!==undefined){utils.assertCompatible(opts.issuerKey,Key,[1,0],"options.issuerKey")}assert.object(opts.signatures,"options.signatures");assert.buffer(opts.serial,"options.serial");assert.date(opts.validFrom,"options.validFrom");assert.date(opts.validUntil,"optons.validUntil");this._hashCache={};this.subjects=opts.subjects;this.issuer=opts.issuer;this.subjectKey=opts.subjectKey;this.issuerKey=opts.issuerKey;this.signatures=opts.signatures;this.serial=opts.serial;this.validFrom=opts.validFrom;this.validUntil=opts.validUntil}Certificate.formats=formats;Certificate.prototype.toBuffer=function(format,options){if(format===undefined)format="x509";assert.string(format,"format");assert.object(formats[format],"formats[format]");assert.optionalObject(options,"options");return formats[format].write(this,options)};Certificate.prototype.toString=function(format,options){if(format===undefined)format="pem";return this.toBuffer(format,options).toString()};Certificate.prototype.fingerprint=function(algo){if(algo===undefined)algo="sha256";assert.string(algo,"algorithm");var opts={type:"certificate",hash:this.hash(algo),algorithm:algo};return new Fingerprint(opts)};Certificate.prototype.hash=function(algo){assert.string(algo,"algorithm");algo=algo.toLowerCase();if(algs.hashAlgs[algo]===undefined)throw new InvalidAlgorithmError(algo);if(this._hashCache[algo])return this._hashCache[algo];var hash=crypto.createHash(algo).update(this.toBuffer("x509")).digest();this._hashCache[algo]=hash;return hash};Certificate.prototype.isExpired=function(when){if(when===undefined)when=new Date;return!(when.getTime()>=this.validFrom.getTime()&&when.getTime()2){alg="md5";if(parts[0].toLowerCase()==="md5")parts=parts.slice(1);parts=parts.join("");var md5RE=/^[a-fA-F0-9]+$/;if(!md5RE.test(parts))throw new FingerprintFormatError(fp);try{hash=new Buffer(parts,"hex")}catch(e){throw new FingerprintFormatError(fp)}}if(alg===undefined)throw new FingerprintFormatError(fp);if(algs.hashAlgs[alg]===undefined)throw new InvalidAlgorithmError(alg);if(enAlgs!==undefined){enAlgs=enAlgs.map(function(a){return a.toLowerCase()});if(enAlgs.indexOf(alg)===-1)throw new InvalidAlgorithmError(alg)}return new Fingerprint({algorithm:alg,hash:hash,type:options.type||"key"})};function addColons(s){return s.replace(/(.{2})(?=.)/g,"$1:")}function base64Strip(s){return s.replace(/=*$/,"")}function sshBase64Format(alg,h){return alg.toUpperCase()+":"+base64Strip(h)}Fingerprint.isFingerprint=function(obj,ver){return utils.isCompatible(obj,Fingerprint,ver)};Fingerprint.prototype._sshpkApiVersion=[1,1];Fingerprint._oldVersionDetect=function(obj){assert.func(obj.toString);assert.func(obj.matches);return[1,0]}}.call(this,require("buffer").Buffer)},{"./algs":247,"./certificate":248,"./errors":251,"./key":265,"./utils":269,"assert-plus":270,buffer:67,crypto:78}],253:[function(require,module,exports){!function(Buffer){module.exports={read:read,write:write};var assert=require("assert-plus");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var pem=require("./pem");var ssh=require("./ssh");var rfc4253=require("./rfc4253");function read(buf,options){if(typeof buf==="string"){if(buf.trim().match(/^[-]+[ ]*BEGIN/))return pem.read(buf,options);if(buf.match(/^\s*ssh-[a-z]/))return ssh.read(buf,options);if(buf.match(/^\s*ecdsa-/))return ssh.read(buf,options);buf=new Buffer(buf,"binary")}else{assert.buffer(buf);if(findPEMHeader(buf))return pem.read(buf,options);if(findSSHHeader(buf))return ssh.read(buf,options)}if(buf.readUInt32BE(0)buf.length||buf.slice(offset,offset+5).toString("ascii")!=="BEGIN")return false;return true}function write(key,options){throw new Error('"auto" format cannot be used for writing')}}.call(this,require("buffer").Buffer)},{"../key":265,"../private-key":266,"../utils":269,"./pem":255,"./rfc4253":258,"./ssh":260,"assert-plus":270,buffer:67}],254:[function(require,module,exports){!function(Buffer){module.exports={read:read,verify:verify,sign:sign,write:write,fromBuffer:fromBuffer,toBuffer:toBuffer};var assert=require("assert-plus");var SSHBuffer=require("../ssh-buffer");var crypto=require("crypto");var algs=require("../algs");var Key=require("../key");var PrivateKey=require("../private-key");var Identity=require("../identity");var rfc4253=require("./rfc4253");var Signature=require("../signature");var utils=require("../utils");var Certificate=require("../certificate");function verify(cert,key){return false}var TYPES={user:1,host:2};Object.keys(TYPES).forEach(function(k){TYPES[TYPES[k]]=k});var ECDSA_ALGO=/^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/;function read(buf,options){if(Buffer.isBuffer(buf))buf=buf.toString("ascii");var parts=buf.trim().split(/[ \t\n]+/g);if(parts.length<2||parts.length>3)throw new Error("Not a valid SSH certificate line");var algo=parts[0];var data=parts[1];data=new Buffer(data,"base64");return fromBuffer(data,algo)}function fromBuffer(data,algo,partial){var sshbuf=new SSHBuffer({buffer:data});var innerAlgo=sshbuf.readString();if(algo!==undefined&&innerAlgo!==algo)throw new Error("SSH certificate algorithm mismatch");if(algo===undefined)algo=innerAlgo;var cert={};cert.signatures={};cert.signatures.openssh={};cert.signatures.openssh.nonce=sshbuf.readBuffer();var key={};var parts=key.parts=[];key.type=getAlg(algo);var partCount=algs.info[key.type].parts.length;while(parts.length=1,"key must have at least one part");var algInfo=algs.info[key.type];if(key.type==="ecdsa"){var res=ECDSA_ALGO.exec(algo);assert.ok(res!==null);assert.strictEqual(res[1],parts[0].data.toString())}for(var i=0;itmp.length)limit=tmp.length;o+=buf.write(tmp.slice(i,limit),o);buf[o++]=10;i=limit}o+=buf.write("-----END "+header+"-----\n",o);return buf.slice(0,o)}}.call(this,require("buffer").Buffer)},{"../algs":247,"../errors":251,"../key":265,"../private-key":266,"../utils":269,"./pkcs1":256,"./pkcs8":257,"./rfc4253":258,"./ssh-private":259,asn1:27,"assert-plus":270,buffer:67,crypto:78}],256:[function(require,module,exports){!function(Buffer){module.exports={read:read,readPkcs1:readPkcs1,write:write,writePkcs1:writePkcs1};var assert=require("assert-plus");var asn1=require("asn1");var algs=require("../algs");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var pem=require("./pem");var pkcs8=require("./pkcs8");var readECDSACurve=pkcs8.readECDSACurve;function read(buf,options){return pem.read(buf,options,"pkcs1")}function write(key,options){return pem.write(key,options,"pkcs1")}function readMPInt(der,nm){assert.strictEqual(der.peek(),asn1.Ber.Integer,nm+" is not an Integer");return utils.mpNormalize(der.readString(asn1.Ber.Integer,true))}function readPkcs1(alg,type,der){switch(alg){case"RSA":if(type==="public")return readPkcs1RSAPublic(der);else if(type==="private")return readPkcs1RSAPrivate(der);throw new Error("Unknown key type: "+type);case"DSA":if(type==="public")return readPkcs1DSAPublic(der);else if(type==="private")return readPkcs1DSAPrivate(der);throw new Error("Unknown key type: "+type);case"EC":case"ECDSA":if(type==="private")return readPkcs1ECDSAPrivate(der);else if(type==="public")return readPkcs1ECDSAPublic(der);throw new Error("Unknown key type: "+type);default:throw new Error("Unknown key algo: "+alg)}}function readPkcs1RSAPublic(der){var n=readMPInt(der,"modulus");var e=readMPInt(der,"exponent");var key={type:"rsa",parts:[{name:"e",data:e},{name:"n",data:n}]};return new Key(key)}function readPkcs1RSAPrivate(der){var version=readMPInt(der,"version");assert.strictEqual(version[0],0);var n=readMPInt(der,"modulus");var e=readMPInt(der,"public exponent");var d=readMPInt(der,"private exponent");var p=readMPInt(der,"prime1");var q=readMPInt(der,"prime2");var dmodp=readMPInt(der,"exponent1");var dmodq=readMPInt(der,"exponent2");var iqmp=readMPInt(der,"iqmp");var key={type:"rsa",parts:[{name:"n",data:n},{name:"e",data:e},{name:"d",data:d},{name:"iqmp",data:iqmp},{name:"p",data:p},{name:"q",data:q},{name:"dmodp",data:dmodp},{name:"dmodq",data:dmodq}]};return new PrivateKey(key)}function readPkcs1DSAPrivate(der){var version=readMPInt(der,"version");assert.strictEqual(version.readUInt8(0),0);var p=readMPInt(der,"p");var q=readMPInt(der,"q");var g=readMPInt(der,"g");var y=readMPInt(der,"y");var x=readMPInt(der,"x");var key={type:"dsa",parts:[{name:"p",data:p},{name:"q",data:q},{name:"g",data:g},{name:"y",data:y},{name:"x",data:x}]};return new PrivateKey(key)}function readPkcs1DSAPublic(der){var y=readMPInt(der,"y");var p=readMPInt(der,"p");var q=readMPInt(der,"q");var g=readMPInt(der,"g");var key={type:"dsa",parts:[{name:"y",data:y},{name:"p",data:p},{name:"q",data:q},{name:"g",data:g}]};return new Key(key)}function readPkcs1ECDSAPublic(der){der.readSequence();var oid=der.readOID();assert.strictEqual(oid,"1.2.840.10045.2.1","must be ecPublicKey");var curveOid=der.readOID();var curve;var curves=Object.keys(algs.curves);for(var j=0;j=1,"key must have at least one part");assert.ok(partial||sshbuf.atEnd(),"leftover bytes at end of key");var Constructor=Key;var algInfo=algs.info[key.type];if(type==="private"||algInfo.parts.length!==parts.length){algInfo=algs.privInfo[key.type];Constructor=PrivateKey}assert.strictEqual(algInfo.parts.length,parts.length);if(key.type==="ecdsa"){var res=/^ecdsa-sha2-(.+)$/.exec(alg);assert.ok(res!==null);assert.strictEqual(res[1],parts[0].data.toString())}var normalized=true;for(var i=0;itmp.length)limit=tmp.length;o+=buf.write(tmp.slice(i,limit),o);buf[o++]=10;i=limit}o+=buf.write("-----END "+header+"-----\n",o);return buf.slice(0,o)}}.call(this,require("buffer").Buffer)},{"../algs":247,"../errors":251,"../key":265,"../private-key":266,"../ssh-buffer":268,"../utils":269,"./pem":255,"./rfc4253":258,asn1:27,"assert-plus":270,"bcrypt-pbkdf":34,buffer:67,crypto:78}],260:[function(require,module,exports){!function(Buffer){module.exports={read:read,write:write};var assert=require("assert-plus");var rfc4253=require("./rfc4253");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var sshpriv=require("./ssh-private");var SSHKEY_RE=/^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([\n \t]+([^\n]+))?$/;var SSHKEY_RE2=/^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/ \t\n]+[=]*)(.*)$/;function read(buf,options){if(typeof buf!=="string"){assert.buffer(buf,"buf");buf=buf.toString("ascii")}var trimmed=buf.trim().replace(/[\\\r]/g,"");var m=trimmed.match(SSHKEY_RE);if(!m)m=trimmed.match(SSHKEY_RE2);assert.ok(m,"key must match regex");var type=rfc4253.algToKeyType(m[1]);var kbuf=new Buffer(m[2],"base64");var key;var ret={};if(m[4]){try{key=rfc4253.read(kbuf)}catch(e){m=trimmed.match(SSHKEY_RE2);assert.ok(m,"key must match regex");kbuf=new Buffer(m[2],"base64");key=rfc4253.readInternal(ret,"public",kbuf)}}else{key=rfc4253.readInternal(ret,"public",kbuf)}assert.strictEqual(type,key.type);if(m[4]&&m[4].length>0){key.comment=m[4]}else if(ret.consumed){var data=m[2]+m[3];var realOffset=Math.ceil(ret.consumed/3)*4;data=data.slice(0,realOffset-2).replace(/[^a-zA-Z0-9+\/=]/g,"")+data.slice(realOffset-2);var padding=ret.consumed%3;if(padding>0&&data.slice(realOffset-1,realOffset)!=="=")realOffset--;while(data.slice(realOffset,realOffset+1)==="=")realOffset++;var trailer=data.slice(realOffset);trailer=trailer.replace(/[\r\n]/g," ").replace(/^\s+/,"");if(trailer.match(/^[a-zA-Z0-9]/))key.comment=trailer}return key}function write(key,options){assert.object(key);if(!Key.isKey(key))throw new Error("Must be a public key");var parts=[];var alg=rfc4253.keyTypeToAlg(key);parts.push(alg);var buf=rfc4253.write(key);parts.push(buf.toString("base64"));if(key.comment)parts.push(key.comment);return new Buffer(parts.join(" "))}}.call(this,require("buffer").Buffer)},{"../key":265,"../private-key":266,"../utils":269,"./rfc4253":258,"./ssh-private":259,"assert-plus":270,buffer:67}],261:[function(require,module,exports){!function(Buffer){var x509=require("./x509");module.exports={read:read,verify:x509.verify,sign:x509.sign,write:write};var assert=require("assert-plus");var asn1=require("asn1");var algs=require("../algs");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var pem=require("./pem");var Identity=require("../identity");var Signature=require("../signature");var Certificate=require("../certificate");function read(buf,options){if(typeof buf!=="string"){assert.buffer(buf,"buf");buf=buf.toString("ascii")}var lines=buf.trim().split(/[\r\n]+/g);var m=lines[0].match(/[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/);assert.ok(m,"invalid PEM header");var m2=lines[lines.length-1].match(/[-]+[ ]*END CERTIFICATE[ ]*[-]+/);assert.ok(m2,"invalid PEM footer");var headers={};while(true){lines=lines.slice(1);m=lines[0].match(/^([A-Za-z0-9-]+): (.+)$/);if(!m)break;headers[m[1].toLowerCase()]=m[2]}lines=lines.slice(0,-1).join("");buf=new Buffer(lines,"base64");return x509.read(buf,options)}function write(cert,options){var dbuf=x509.write(cert,options);var header="CERTIFICATE";var tmp=dbuf.toString("base64");var len=tmp.length+tmp.length/64+18+16+header.length*2+10;var buf=new Buffer(len);var o=0;o+=buf.write("-----BEGIN "+header+"-----\n",o);for(var i=0;itmp.length)limit=tmp.length;o+=buf.write(tmp.slice(i,limit),o);buf[o++]=10;i=limit}o+=buf.write("-----END "+header+"-----\n",o);return buf.slice(0,o)}}.call(this,require("buffer").Buffer)},{"../algs":247,"../certificate":248,"../identity":263,"../key":265,"../private-key":266,"../signature":267,"../utils":269,"./pem":255,"./x509":262,asn1:27,"assert-plus":270,buffer:67}],262:[function(require,module,exports){!function(Buffer){module.exports={read:read,verify:verify,sign:sign,write:write};var assert=require("assert-plus");var asn1=require("asn1");var algs=require("../algs");var utils=require("../utils");var Key=require("../key");var PrivateKey=require("../private-key");var pem=require("./pem");var Identity=require("../identity");var Signature=require("../signature");var Certificate=require("../certificate");var pkcs8=require("./pkcs8");function readMPInt(der,nm){assert.strictEqual(der.peek(),asn1.Ber.Integer,nm+" is not an Integer");return utils.mpNormalize(der.readString(asn1.Ber.Integer,true))}function verify(cert,key){var sig=cert.signatures.x509;assert.object(sig,"x509 signature");var algParts=sig.algo.split("-");if(algParts[0]!==key.type)return false;var blob=sig.cache;if(blob===undefined){var der=new asn1.BerWriter;writeTBSCert(cert,der);blob=der.buffer}var verifier=key.createVerify(algParts[1]);verifier.write(blob);return verifier.verify(sig.signature)}function Local(i){return asn1.Ber.Context|asn1.Ber.Constructor|i}function Context(i){return asn1.Ber.Context|i}var SIGN_ALGS={"rsa-md5":"1.2.840.113549.1.1.4","rsa-sha1":"1.2.840.113549.1.1.5","rsa-sha256":"1.2.840.113549.1.1.11","rsa-sha384":"1.2.840.113549.1.1.12","rsa-sha512":"1.2.840.113549.1.1.13","dsa-sha1":"1.2.840.10040.4.3","dsa-sha256":"2.16.840.1.101.3.4.3.2","ecdsa-sha1":"1.2.840.10045.4.1","ecdsa-sha256":"1.2.840.10045.4.3.2","ecdsa-sha384":"1.2.840.10045.4.3.3","ecdsa-sha512":"1.2.840.10045.4.3.4"};Object.keys(SIGN_ALGS).forEach(function(k){SIGN_ALGS[SIGN_ALGS[k]]=k});SIGN_ALGS["1.3.14.3.2.3"]="rsa-md5";SIGN_ALGS["1.3.14.3.2.29"]="rsa-sha1";var EXTS={issuerKeyId:"2.5.29.35",altName:"2.5.29.17"};function read(buf,options){if(typeof buf==="string"){buf=new Buffer(buf,"binary")}assert.buffer(buf,"buf");var der=new asn1.BerReader(buf);der.readSequence();if(Math.abs(der.length-der.remain)>1){throw new Error("DER sequence does not contain whole byte "+"stream")}var tbsStart=der.offset;der.readSequence();var sigOffset=der.offset+der.length;var tbsEnd=sigOffset;if(der.peek()===Local(0)){der.readSequence(Local(0));var version=der.readInt();assert.ok(version<=3,"only x.509 versions up to v3 supported")}var cert={};cert.signatures={};var sig=cert.signatures.x509={};sig.extras={};cert.serial=readMPInt(der,"serial");der.readSequence();var after=der.offset+der.length;var certAlgOid=der.readOID();var certAlg=SIGN_ALGS[certAlgOid];if(certAlg===undefined)throw new Error("unknown signature algorithm "+certAlgOid);der._offset=after;cert.issuer=Identity.parseAsn1(der);der.readSequence();cert.validFrom=readDate(der);cert.validUntil=readDate(der);cert.subjects=[Identity.parseAsn1(der)];der.readSequence();after=der.offset+der.length;cert.subjectKey=pkcs8.readPkcs8(undefined,"public",der);der._offset=after;if(der.peek()===Local(1)){der.readSequence(Local(1));sig.extras.issuerUniqueID=buf.slice(der.offset,der.offset+der.length);der._offset+=der.length}if(der.peek()===Local(2)){der.readSequence(Local(2));sig.extras.subjectUniqueID=buf.slice(der.offset,der.offset+der.length);der._offset+=der.length}if(der.peek()===Local(3)){der.readSequence(Local(3));var extEnd=der.offset+der.length;der.readSequence();while(der.offset=60)year+=century-1;else year+=century;d.setUTCFullYear(year,parseInt(m[2],10)-1,parseInt(m[3],10));d.setUTCHours(parseInt(m[4],10),parseInt(m[5],10));if(m[6]&&m[6].length>0)d.setUTCSeconds(parseInt(m[6],10));return d}var GTIME_RE=/^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;function gTimeToDate(t){var m=t.match(GTIME_RE);assert.ok(m); +var d=new Date;d.setUTCFullYear(parseInt(m[1],10),parseInt(m[2],10)-1,parseInt(m[3],10));d.setUTCHours(parseInt(m[4],10),parseInt(m[5],10));if(m[6]&&m[6].length>0)d.setUTCSeconds(parseInt(m[6],10));return d}function zeroPad(n){var s=""+n;while(s.length<2)s="0"+s;return s}function dateToUTCTime(d){var s="";s+=zeroPad(d.getUTCFullYear()%100);s+=zeroPad(d.getUTCMonth()+1);s+=zeroPad(d.getUTCDate());s+=zeroPad(d.getUTCHours());s+=zeroPad(d.getUTCMinutes());s+=zeroPad(d.getUTCSeconds());s+="Z";return s}function sign(cert,key){if(cert.signatures.x509===undefined)cert.signatures.x509={};var sig=cert.signatures.x509;sig.algo=key.type+"-"+key.defaultHashAlgorithm();if(SIGN_ALGS[sig.algo]===undefined)return false;var der=new asn1.BerWriter;writeTBSCert(cert,der);var blob=der.buffer;sig.cache=blob;var signer=key.createSign();signer.write(blob);cert.signatures.x509.signature=signer.sign();return true}function write(cert,options){var sig=cert.signatures.x509;assert.object(sig,"x509 signature");var der=new asn1.BerWriter;der.startSequence();if(sig.cache){der._ensure(sig.cache.length);sig.cache.copy(der._buf,der._offset);der._offset+=sig.cache.length}else{writeTBSCert(cert,der)}der.startSequence();der.writeOID(SIGN_ALGS[sig.algo]);if(sig.algo.match(/^rsa-/))der.writeNull();der.endSequence();var sigData=sig.signature.toBuffer("asn1");var data=new Buffer(sigData.length+1);data[0]=0;sigData.copy(data,1);der.writeBuffer(data,asn1.Ber.BitString);der.endSequence();return der.buffer}function writeTBSCert(cert,der){var sig=cert.signatures.x509;assert.object(sig,"x509 signature");der.startSequence();der.startSequence(Local(0));der.writeInt(2);der.endSequence();der.writeBuffer(utils.mpNormalize(cert.serial),asn1.Ber.Integer);der.startSequence();der.writeOID(SIGN_ALGS[sig.algo]);der.endSequence();cert.issuer.toAsn1(der);der.startSequence();der.writeString(dateToUTCTime(cert.validFrom),asn1.Ber.UTCTime);der.writeString(dateToUTCTime(cert.validUntil),asn1.Ber.UTCTime);der.endSequence();var subject=cert.subjects[0];var altNames=cert.subjects.slice(1);subject.toAsn1(der);pkcs8.writePkcs8(der,cert.subjectKey);if(sig.extras&&sig.extras.issuerUniqueID){der.writeBuffer(sig.extras.issuerUniqueID,Local(1))}if(sig.extras&&sig.extras.subjectUniqueID){der.writeBuffer(sig.extras.subjectUniqueID,Local(2))}if(altNames.length>0||subject.type==="host"||sig.extras&&sig.extras.exts){der.startSequence(Local(3));der.startSequence();var exts=[{oid:EXTS.altName}];if(sig.extras&&sig.extras.exts)exts=sig.extras.exts;for(var i=0;i0){this.cn=this.componentLookup.cn[0].value}assert.optionalString(opts.type,"options.type");if(opts.type===undefined){if(this.components.length===1&&this.componentLookup.cn&&this.componentLookup.cn.length===1&&this.componentLookup.cn[0].value.match(DNS_NAME_RE)){this.type="host";this.hostname=this.componentLookup.cn[0].value}else if(this.componentLookup.dc&&this.components.length===this.componentLookup.dc.length){this.type="host";this.hostname=this.componentLookup.dc.map(function(c){return c.value}).join(".")}else if(this.componentLookup.uid&&this.components.length===this.componentLookup.uid.length){this.type="user";this.uid=this.componentLookup.uid[0].value}else if(this.componentLookup.cn&&this.componentLookup.cn.length===1&&this.componentLookup.cn[0].value.match(DNS_NAME_RE)){this.type="host";this.hostname=this.componentLookup.cn[0].value}else if(this.componentLookup.uid&&this.componentLookup.uid.length===1){this.type="user";this.uid=this.componentLookup.uid[0].value}else if(this.componentLookup.mail&&this.componentLookup.mail.length===1){this.type="email";this.email=this.componentLookup.mail[0].value}else if(this.componentLookup.cn&&this.componentLookup.cn.length===1){this.type="user";this.uid=this.componentLookup.cn[0].value}else{this.type="unknown"}}else{this.type=opts.type;if(this.type==="host")this.hostname=opts.hostname;else if(this.type==="user")this.uid=opts.uid;else if(this.type==="email")this.email=opts.email;else throw new Error("Unknown type "+this.type)}}Identity.prototype.toString=function(){return this.components.map(function(c){return c.name.toUpperCase()+"="+c.value}).join(", ")};var NOT_PRINTABLE=/[^a-zA-Z0-9 '(),+.\/:=?-]/;var NOT_IA5=/[^\x00-\x7f]/;Identity.prototype.toAsn1=function(der,tag){der.startSequence(tag);this.components.forEach(function(c){der.startSequence(asn1.Ber.Constructor|asn1.Ber.Set);der.startSequence();der.writeOID(c.oid);if(c.value.match(NOT_IA5)){var v=new Buffer(c.value,"utf8");der.writeBuffer(v,asn1.Ber.Utf8String)}else if(c.value.match(NOT_PRINTABLE)){der.writeString(c.value,asn1.Ber.IA5String)}else{der.writeString(c.value,asn1.Ber.PrintableString)}der.endSequence();der.endSequence()});der.endSequence()};function globMatch(a,b){if(a==="**"||b==="**")return true;var aParts=a.split(".");var bParts=b.split(".");if(aParts.length!==bParts.length)return false;for(var i=0;i1024)hashAlgo="sha256";if(this.type==="ed25519")hashAlgo="sha512";if(this.type==="ecdsa"){if(this.size<=256)hashAlgo="sha256";else if(this.size<=384)hashAlgo="sha384";else hashAlgo="sha512"}return hashAlgo};Key.prototype.createVerify=function(hashAlgo){if(hashAlgo===undefined)hashAlgo=this.defaultHashAlgorithm();assert.string(hashAlgo,"hash algorithm");if(this.type==="ed25519"&&edCompat!==undefined)return new edCompat.Verifier(this,hashAlgo);if(this.type==="curve25519")throw new Error("Curve25519 keys are not suitable for "+"signing or verification");var v,nm,err;try{nm=hashAlgo.toUpperCase();v=crypto.createVerify(nm)}catch(e){err=e}if(v===undefined||err instanceof Error&&err.message.match(/Unknown message digest/)){nm="RSA-";nm+=hashAlgo.toUpperCase();v=crypto.createVerify(nm)}assert.ok(v,"failed to create verifier");var oldVerify=v.verify.bind(v);var key=this.toBuffer("pkcs8");var self=this;v.verify=function(signature,fmt){if(Signature.isSignature(signature,[2,0])){if(signature.type!==self.type)return false;if(signature.hashAlgorithm&&signature.hashAlgorithm!==hashAlgo)return false;return oldVerify(key,signature.toBuffer("asn1"))}else if(typeof signature==="string"||Buffer.isBuffer(signature)){return oldVerify(key,signature,fmt)}else if(Signature.isSignature(signature,[1,0])){throw new Error("signature was created by too old "+"a version of sshpk and cannot be verified")}else{throw new TypeError("signature must be a string, "+"Buffer, or Signature object")}};return v};Key.prototype.createDiffieHellman=function(){if(this.type==="rsa")throw new Error("RSA keys do not support Diffie-Hellman");return new DiffieHellman(this)};Key.prototype.createDH=Key.prototype.createDiffieHellman;Key.parse=function(data,format,options){if(typeof data!=="string")assert.buffer(data,"data");if(format===undefined)format="auto";assert.string(format,"format");if(typeof options==="string")options={filename:options};assert.optionalObject(options,"options");if(options===undefined)options={};assert.optionalString(options.filename,"options.filename");if(options.filename===undefined)options.filename="(unnamed)";assert.object(formats[format],"formats[format]");try{var k=formats[format].read(data,options);if(k instanceof PrivateKey)k=k.toPublic();if(!k.comment)k.comment=options.filename;return k}catch(e){if(e.name==="KeyEncryptedError")throw e;throw new KeyParseError(options.filename,format,e)}};Key.isKey=function(obj,ver){return utils.isCompatible(obj,Key,ver)};Key.prototype._sshpkApiVersion=[1,5];Key._oldVersionDetect=function(obj){assert.func(obj.toBuffer);assert.func(obj.fingerprint);if(obj.createDH)return[1,4];if(obj.defaultHashAlgorithm)return[1,3];if(obj.formats["auto"])return[1,2];if(obj.formats["pkcs1"])return[1,1];return[1,0]}}.call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":153,"./algs":247,"./dhe":249,"./ed-compat":250,"./errors":251,"./fingerprint":252,"./formats/auto":253,"./formats/pem":255,"./formats/pkcs1":256,"./formats/pkcs8":257,"./formats/rfc4253":258,"./formats/ssh":260,"./formats/ssh-private":259,"./private-key":266,"./signature":267,"./utils":269,"assert-plus":270,crypto:78}],266:[function(require,module,exports){!function(Buffer){module.exports=PrivateKey;var assert=require("assert-plus");var algs=require("./algs");var crypto=require("crypto");var Fingerprint=require("./fingerprint");var Signature=require("./signature");var errs=require("./errors");var util=require("util");var utils=require("./utils");var edCompat;var ed;try{edCompat=require("./ed-compat")}catch(e){}var Key=require("./key");var InvalidAlgorithmError=errs.InvalidAlgorithmError;var KeyParseError=errs.KeyParseError;var KeyEncryptedError=errs.KeyEncryptedError;var formats={};formats["auto"]=require("./formats/auto");formats["pem"]=require("./formats/pem");formats["pkcs1"]=require("./formats/pkcs1");formats["pkcs8"]=require("./formats/pkcs8");formats["rfc4253"]=require("./formats/rfc4253");formats["ssh-private"]=require("./formats/ssh-private");formats["openssh"]=formats["ssh-private"];formats["ssh"]=formats["ssh-private"];function PrivateKey(opts){assert.object(opts,"options");Key.call(this,opts);this._pubCache=undefined}util.inherits(PrivateKey,Key);PrivateKey.formats=formats;PrivateKey.prototype.toBuffer=function(format,options){if(format===undefined)format="pkcs1";assert.string(format,"format");assert.object(formats[format],"formats[format]");assert.optionalObject(options,"options");return formats[format].write(this,options)};PrivateKey.prototype.hash=function(algo){return this.toPublic().hash(algo)};PrivateKey.prototype.toPublic=function(){if(this._pubCache)return this._pubCache;var algInfo=algs.info[this.type];var pubParts=[];for(var i=0;i20&&r[0]===0)r=r.slice(1);s=this.part.s.data;if(s.length>20&&s[0]===0)s=s.slice(1);if(this.hashAlgorithm&&this.hashAlgorithm!=="sha1"||r.length+s.length!==40){throw new Error("OpenSSH only supports "+"DSA signatures with SHA1 hash")}buf.writeBuffer(Buffer.concat([r,s]));return buf.toBuffer()}else if(format==="ssh"&&this.type==="ecdsa"){var inner=new SSHBuffer({});r=this.part.r.data;inner.writeBuffer(r);inner.writePart(this.part.s);buf=new SSHBuffer({});var curve;if(r[0]===0)r=r.slice(1);var sz=r.length*8;if(sz===256)curve="nistp256";else if(sz===384)curve="nistp384";else if(sz===528)curve="nistp521";buf.writeString("ecdsa-sha2-"+curve);buf.writeBuffer(inner.toBuffer());return buf.toBuffer()}throw new Error("Invalid signature format");default:throw new Error("Invalid signature data")}};Signature.prototype.toString=function(format){assert.optionalString(format,"format");return this.toBuffer(format).toString("base64")};Signature.parse=function(data,type,format){if(typeof data==="string")data=new Buffer(data,"base64");assert.buffer(data,"data");assert.string(format,"format");assert.string(type,"type");var opts={};opts.type=type.toLowerCase();opts.parts=[];try{assert.ok(data.length>0,"signature must not be empty");switch(opts.type){case"rsa":return parseOneNum(data,type,format,opts,"ssh-rsa");case"ed25519":return parseOneNum(data,type,format,opts,"ssh-ed25519");case"dsa":case"ecdsa":if(format==="asn1")return parseDSAasn1(data,type,format,opts);else if(opts.type==="dsa")return parseDSA(data,type,format,opts);else return parseECDSA(data,type,format,opts);default:throw new InvalidAlgorithmError(type)}}catch(e){if(e instanceof InvalidAlgorithmError)throw e;throw new SignatureParseError(type,format,e)}};function parseOneNum(data,type,format,opts,headType){if(format==="ssh"){try{var buf=new SSHBuffer({buffer:data});var head=buf.readString()}catch(e){}if(head===headType){var sig=buf.readPart();assert.ok(buf.atEnd(),"extra trailing bytes");sig.name="sig";opts.parts.push(sig);return new Signature(opts)}}opts.parts.push({name:"sig",data:data});return new Signature(opts)}function parseDSAasn1(data,type,format,opts){var der=new asn1.BerReader(data);der.readSequence();var r=der.readString(asn1.Ber.Integer,true);var s=der.readString(asn1.Ber.Integer,true);opts.parts.push({name:"r",data:utils.mpNormalize(r)});opts.parts.push({name:"s",data:utils.mpNormalize(s)});return new Signature(opts)}function parseDSA(data,type,format,opts){if(data.length!=40){var buf=new SSHBuffer({buffer:data});var d=buf.readBuffer();if(d.toString("ascii")==="ssh-dss")d=buf.readBuffer();assert.ok(buf.atEnd(),"extra trailing bytes");assert.strictEqual(d.length,40,"invalid inner length");data=d}opts.parts.push({name:"r",data:data.slice(0,20)});opts.parts.push({name:"s",data:data.slice(20,40)});return new Signature(opts)}function parseECDSA(data,type,format,opts){var buf=new SSHBuffer({buffer:data});var r,s;var inner=buf.readBuffer();if(inner.toString("ascii").match(/^ecdsa-/)){inner=buf.readBuffer();assert.ok(buf.atEnd(),"extra trailing bytes on outer");buf=new SSHBuffer({buffer:inner});r=buf.readPart()}else{r={data:inner}}s=buf.readPart();assert.ok(buf.atEnd(),"extra trailing bytes");r.name="r";s.name="s";opts.parts.push(r);opts.parts.push(s);return new Signature(opts)}Signature.isSignature=function(obj,ver){return utils.isCompatible(obj,Signature,ver)};Signature.prototype._sshpkApiVersion=[2,1];Signature._oldVersionDetect=function(obj){assert.func(obj.toBuffer);if(obj.hasOwnProperty("hashAlgorithm"))return[2,0];return[1,0]}}.call(this,require("buffer").Buffer)},{"./algs":247,"./errors":251,"./ssh-buffer":268,"./utils":269,asn1:27,"assert-plus":270,buffer:67,crypto:78}],268:[function(require,module,exports){!function(Buffer){module.exports=SSHBuffer;var assert=require("assert-plus");function SSHBuffer(opts){assert.object(opts,"options");if(opts.buffer!==undefined)assert.buffer(opts.buffer,"options.buffer");this._size=opts.buffer?opts.buffer.length:1024;this._buffer=opts.buffer||new Buffer(this._size);this._offset=0}SSHBuffer.prototype.toBuffer=function(){return this._buffer.slice(0,this._offset)};SSHBuffer.prototype.atEnd=function(){return this._offset>=this._buffer.length};SSHBuffer.prototype.remainder=function(){return this._buffer.slice(this._offset)};SSHBuffer.prototype.skip=function(n){this._offset+=n};SSHBuffer.prototype.expand=function(){this._size*=2;var buf=new Buffer(this._size);this._buffer.copy(buf,0);this._buffer=buf};SSHBuffer.prototype.readPart=function(){return{data:this.readBuffer()}};SSHBuffer.prototype.readBuffer=function(){var len=this._buffer.readUInt32BE(this._offset);this._offset+=4;assert.ok(this._offset+len<=this._buffer.length,"length out of bounds at +0x"+this._offset.toString(16)+" (data truncated?)");var buf=this._buffer.slice(this._offset,this._offset+len);this._offset+=len;return buf};SSHBuffer.prototype.readString=function(){return this.readBuffer().toString()};SSHBuffer.prototype.readCString=function(){var offset=this._offset;while(offsetthis._size)this.expand();this._buffer.writeUInt32BE(buf.length,this._offset);this._offset+=4;buf.copy(this._buffer,this._offset);this._offset+=buf.length};SSHBuffer.prototype.writeString=function(str){this.writeBuffer(new Buffer(str,"utf8"))};SSHBuffer.prototype.writeCString=function(str){while(this._offset+1+str.length>this._size)this.expand();this._buffer.write(str,this._offset);this._offset+=str.length;this._buffer[this._offset++]=0};SSHBuffer.prototype.writeInt=function(v){while(this._offset+4>this._size)this.expand();this._buffer.writeUInt32BE(v,this._offset);this._offset+=4};SSHBuffer.prototype.writeInt64=function(v){assert.buffer(v,"value");if(v.length>8){var lead=v.slice(0,v.length-8);for(var i=0;ithis._size)this.expand();v.copy(this._buffer,this._offset);this._offset+=8};SSHBuffer.prototype.writeChar=function(v){while(this._offset+1>this._size)this.expand();this._buffer[this._offset++]=v};SSHBuffer.prototype.writePart=function(p){this.writeBuffer(p.data)};SSHBuffer.prototype.write=function(buf){while(this._offset+buf.length>this._size)this.expand();buf.copy(this._buffer,this._offset);this._offset+=buf.length}}.call(this,require("buffer").Buffer)},{"assert-plus":270,buffer:67}],269:[function(require,module,exports){!function(Buffer){module.exports={bufferSplit:bufferSplit,addRSAMissing:addRSAMissing,calculateDSAPublic:calculateDSAPublic,mpNormalize:mpNormalize,ecNormalize:ecNormalize,countZeros:countZeros,assertCompatible:assertCompatible,isCompatible:isCompatible,opensslKeyDeriv:opensslKeyDeriv,opensshCipherInfo:opensshCipherInfo};var assert=require("assert-plus");var PrivateKey=require("./private-key");var crypto=require("crypto");var MAX_CLASS_DEPTH=3;function isCompatible(obj,klass,needVer){if(obj===null||typeof obj!=="object")return false;if(needVer===undefined)needVer=klass.prototype._sshpkApiVersion;if(obj instanceof klass&&klass.prototype._sshpkApiVersion[0]==needVer[0])return true;var proto=Object.getPrototypeOf(obj);var depth=0;while(proto.constructor.name!==klass.name){proto=Object.getPrototypeOf(proto);if(!proto||++depth>MAX_CLASS_DEPTH)return false}if(proto.constructor.name!==klass.name)return false;var ver=proto._sshpkApiVersion;if(ver===undefined)ver=klass._oldVersionDetect(obj);if(ver[0]!=needVer[0]||ver[1]=needVer[1],name+" must be compatible with "+klass.name+" klass "+"version "+needVer[0]+"."+needVer[1])}var CIPHER_LEN={"des-ede3-cbc":{key:7,iv:8},"aes-128-cbc":{key:16,iv:16}};var PKCS5_SALT_LEN=8;function opensslKeyDeriv(cipher,salt,passphrase,count){assert.buffer(salt,"salt");assert.buffer(passphrase,"passphrase");assert.number(count,"iteration count");var clen=CIPHER_LEN[cipher];assert.object(clen,"supported cipher");salt=salt.slice(0,PKCS5_SALT_LEN);var D,D_prev,bufs;var material=new Buffer(0);while(material.length=chr.length){var newPart=i+1;parts.push(buf.slice(lastPart,newPart-matches));lastPart=newPart;matches=0}}if(lastPart<=buf.length)parts.push(buf.slice(lastPart,buf.length));return parts}function ecNormalize(buf,addZero){assert.buffer(buf);if(buf[0]===0&&buf[1]===4){if(addZero)return buf;return buf.slice(1)}else if(buf[0]===4){if(!addZero)return buf}else{while(buf[0]===0)buf=buf.slice(1);if(buf[0]===2||buf[0]===3)throw new Error("Compressed elliptic curve points "+"are not supported");if(buf[0]!==4)throw new Error("Not a valid elliptic curve point");if(!addZero)return buf}var b=new Buffer(buf.length+1);b[0]=0;buf.copy(b,1);return b}function mpNormalize(buf){assert.buffer(buf);while(buf.length>1&&buf[0]===0&&(buf[1]&128)===0)buf=buf.slice(1);if((buf[0]&128)===128){var b=new Buffer(buf.length+1);b[0]=0;buf.copy(b,1);buf=b}return buf}function bigintToMpBuf(bigint){var buf=new Buffer(bigint.toByteArray());buf=mpNormalize(buf);return buf}function calculateDSAPublic(g,p,x){assert.buffer(g);assert.buffer(p);assert.buffer(x);try{var bigInt=require("jsbn").BigInteger}catch(e){throw new Error("To load a PKCS#8 format DSA private key, "+"the node jsbn library is required.")}g=new bigInt(g);p=new bigInt(p);x=new bigInt(x);var y=g.modPow(x,p);var ybuf=bigintToMpBuf(y);return ybuf}function addRSAMissing(key){assert.object(key);assertCompatible(key,PrivateKey,[1,1]);try{var bigInt=require("jsbn").BigInteger}catch(e){throw new Error("To write a PEM private key from "+"this source, the node jsbn lib is required.")}var d=new bigInt(key.part.d.data);var buf;if(!key.part.dmodp){var p=new bigInt(key.part.p.data);var dmodp=d.mod(p.subtract(1));buf=bigintToMpBuf(dmodp);key.part.dmodp={name:"dmodp",data:buf};key.parts.push(key.part.dmodp)}if(!key.part.dmodq){var q=new bigInt(key.part.q.data);var dmodq=d.mod(q.subtract(1));buf=bigintToMpBuf(dmodq);key.part.dmodq={name:"dmodq",data:buf};key.parts.push(key.part.dmodq)}}function opensshCipherInfo(cipher){var inf={};switch(cipher){case"3des-cbc":inf.keySize=24;inf.blockSize=8;inf.opensslName="des-ede3-cbc";break;case"blowfish-cbc":inf.keySize=16;inf.blockSize=8;inf.opensslName="bf-cbc";break;case"aes128-cbc":case"aes128-ctr":case"aes128-gcm@openssh.com":inf.keySize=16;inf.blockSize=16;inf.opensslName="aes-128-"+cipher.slice(7,10);break;case"aes192-cbc":case"aes192-ctr":case"aes192-gcm@openssh.com":inf.keySize=24;inf.blockSize=16;inf.opensslName="aes-192-"+cipher.slice(7,10);break;case"aes256-cbc":case"aes256-ctr":case"aes256-gcm@openssh.com":inf.keySize=32;inf.blockSize=16;inf.opensslName="aes-256-"+cipher.slice(7,10);break;default:throw new Error('Unsupported openssl cipher "'+cipher+'"')}return inf}}.call(this,require("buffer").Buffer)},{"./private-key":266,"assert-plus":270,buffer:67,crypto:78,jsbn:166}],270:[function(require,module,exports){!function(Buffer,process){var assert=require("assert");var Stream=require("stream").Stream;var util=require("util");var UUID_REGEXP=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function _capitalize(str){return str.charAt(0).toUpperCase()+str.slice(1)}function _toss(name,expected,oper,arg,actual){throw new assert.AssertionError({message:util.format("%s (%s) is required",name,expected),actual:actual===undefined?typeof arg:actual(arg),expected:expected,operator:oper||"===",stackStartFunction:_toss.caller})}function _getClass(arg){return Object.prototype.toString.call(arg).slice(8,-1)}function noop(){}var types={bool:{check:function(arg){return typeof arg==="boolean"}},func:{check:function(arg){return typeof arg==="function"}},string:{check:function(arg){return typeof arg==="string"}},object:{check:function(arg){return typeof arg==="object"&&arg!==null}},number:{check:function(arg){return typeof arg==="number"&&!isNaN(arg)}},finite:{check:function(arg){return typeof arg==="number"&&!isNaN(arg)&&isFinite(arg)}},buffer:{check:function(arg){return Buffer.isBuffer(arg)},operator:"Buffer.isBuffer"},array:{check:function(arg){return Array.isArray(arg)},operator:"Array.isArray"},stream:{check:function(arg){return arg instanceof Stream},operator:"instanceof",actual:_getClass},date:{check:function(arg){return arg instanceof Date},operator:"instanceof",actual:_getClass},regexp:{check:function(arg){return arg instanceof RegExp},operator:"instanceof",actual:_getClass},uuid:{check:function(arg){return typeof arg==="string"&&UUID_REGEXP.test(arg)},operator:"isUUID"}};function _setExports(ndebug){var keys=Object.keys(types);var out;if(process.env.NODE_NDEBUG){out=noop}else{out=function(arg,msg){if(!arg){_toss(msg,"true",arg)}}}keys.forEach(function(k){if(ndebug){out[k]=noop;return}var type=types[k];out[k]=function(arg,msg){if(!type.check(arg)){_toss(msg,k,type.operator,arg,type.actual)}}});keys.forEach(function(k){var name="optional"+_capitalize(k);if(ndebug){out[name]=noop;return}var type=types[k];out[name]=function(arg,msg){if(arg===undefined||arg===null){return}if(!type.check(arg)){_toss(msg,k,type.operator,arg,type.actual)}}});keys.forEach(function(k){var name="arrayOf"+_capitalize(k);if(ndebug){out[name]=noop;return}var type=types[k];var expected="["+k+"]";out[name]=function(arg,msg){if(!Array.isArray(arg)){_toss(msg,expected,type.operator,arg,type.actual)}var i;for(i=0;iself._pos){var newData=response.substr(self._pos);if(self._charset==="x-user-defined"){var buffer=new Buffer(newData.length);for(var i=0;iself._pos){self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos))));self._pos=reader.result.byteLength}};reader.onload=function(){self.push(null)};reader.readAsArrayBuffer(response);break}if(self._xhr.readyState===rStates.DONE&&self._mode!=="ms-stream"){self.push(null)}}}.call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer)},{"./capability":273,_process:198,buffer:67,inherits:152,"readable-stream":223}],276:[function(require,module,exports){var Buffer=require("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding)){throw new Error("Unknown encoding: "+encoding)}}var StringDecoder=exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:67}],277:[function(require,module,exports){!function(Buffer){var util=require("util");var Stream=require("stream");var StringDecoder=require("string_decoder").StringDecoder;module.exports=StringStream;module.exports.AlignedStringDecoder=AlignedStringDecoder;function StringStream(from,to){if(!(this instanceof StringStream))return new StringStream(from,to);Stream.call(this);if(from==null)from="utf8";this.readable=this.writable=true;this.paused=false;this.toEncoding=to==null?from:to;this.fromEncoding=to==null?"":from;this.decoder=new AlignedStringDecoder(this.toEncoding)}util.inherits(StringStream,Stream);StringStream.prototype.write=function(data){if(!this.writable){var err=new Error("stream not writable");err.code="EPIPE";this.emit("error",err);return false}if(this.fromEncoding){if(Buffer.isBuffer(data))data=data.toString();data=new Buffer(data,this.fromEncoding)}var string=this.decoder.write(data);if(string.length)this.emit("data",string);return!this.paused};StringStream.prototype.flush=function(){if(this.decoder.flush){var string=this.decoder.flush();if(string.length)this.emit("data",string)}};StringStream.prototype.end=function(){if(!this.writable&&!this.readable)return;this.flush();this.emit("end");this.writable=this.readable=false;this.destroy()};StringStream.prototype.destroy=function(){this.decoder=null;this.writable=this.readable=false;this.emit("close")};StringStream.prototype.pause=function(){this.paused=true};StringStream.prototype.resume=function(){if(this.paused)this.emit("drain");this.paused=false};function AlignedStringDecoder(encoding){StringDecoder.call(this,encoding);switch(this.encoding){case"base64":this.write=alignedWrite;this.alignedBuffer=new Buffer(3);this.alignedBytes=0;break}}util.inherits(AlignedStringDecoder,StringDecoder);AlignedStringDecoder.prototype.flush=function(){if(!this.alignedBuffer||!this.alignedBytes)return"";var leftover=this.alignedBuffer.toString(this.encoding,0,this.alignedBytes);this.alignedBytes=0;return leftover};function alignedWrite(buffer){var rem=(this.alignedBytes+buffer.length)%this.alignedBuffer.length;if(!rem&&!this.alignedBytes)return buffer.toString(this.encoding);var returnBuffer=new Buffer(this.alignedBytes+buffer.length-rem);this.alignedBuffer.copy(returnBuffer,0,0,this.alignedBytes);buffer.copy(returnBuffer,this.alignedBytes,0,buffer.length-rem);buffer.copy(this.alignedBuffer,0,buffer.length-rem,buffer.length);this.alignedBytes=rem;return returnBuffer.toString(this.encoding)}}.call(this,require("buffer").Buffer)},{buffer:67,stream:271,string_decoder:276,util:293}],278:[function(require,module,exports){var Buffer=require("buffer").Buffer;module.exports=function(buf){if(buf instanceof Uint8Array){if(buf.byteOffset===0&&buf.byteLength===buf.buffer.byteLength){return buf.buffer}else if(typeof buf.buffer.slice==="function"){return buf.buffer.slice(buf.byteOffset,buf.byteOffset+buf.byteLength)}}if(Buffer.isBuffer(buf)){var arrayCopy=new Uint8Array(buf.length);var len=buf.length;for(var i=0;i23||minutes>59||seconds>59){return}continue}}if(day===null){result=DAY_OF_MONTH.exec(token);if(result){day=parseInt(result,10);if(day<1||day>31){return}continue}}if(month===null){result=MONTH.exec(token);if(result){month=MONTH_TO_NUM[result[1].toLowerCase()];continue}}if(year===null){result=YEAR.exec(token);if(result){year=parseInt(result[0],10);if(70<=year&&year<=99){year+=1900}else if(0<=year&&year<=69){year+=2e3}if(year<1601){return}}}}if(seconds===null||day===null||month===null||year===null){return}return new Date(Date.UTC(year,month,day,hour,minutes,seconds))}function formatDate(date){var d=date.getUTCDate();d=d>=10?d:"0"+d;var h=date.getUTCHours();h=h>=10?h:"0"+h;var m=date.getUTCMinutes();m=m>=10?m:"0"+m;var s=date.getUTCSeconds();s=s>=10?s:"0"+s;return NUM_TO_DAY[date.getUTCDay()]+", "+d+" "+NUM_TO_MONTH[date.getUTCMonth()]+" "+date.getUTCFullYear()+" "+h+":"+m+":"+s+" GMT"}function canonicalDomain(str){if(str==null){return null}str=str.trim().replace(/^\./,"");if(punycode&&/[^\u0001-\u007f]/.test(str)){str=punycode.toASCII(str)}return str.toLowerCase()}function domainMatch(str,domStr,canonicalize){if(str==null||domStr==null){return null}if(canonicalize!==false){str=canonicalDomain(str);domStr=canonicalDomain(domStr)}if(str==domStr){return true}if(net.isIP(str)){return false}var idx=str.indexOf(domStr);if(idx<=0){return false}if(str.length!==domStr.length+idx){return false}if(str.substr(idx-1,1)!=="."){return false}return true}function defaultPath(path){if(!path||path.substr(0,1)!=="/"){return"/"}if(path==="/"){return path}var rightSlash=path.lastIndexOf("/");if(rightSlash===0){return"/"}return path.slice(0,rightSlash)}function parse(str,options){if(!options||typeof options!=="object"){options={}}str=str.trim();var firstSemi=str.indexOf(";");var pairRe=options.loose?LOOSE_COOKIE_PAIR:COOKIE_PAIR;var result=pairRe.exec(firstSemi===-1?str:str.substr(0,firstSemi));if(!result){return}var c=new Cookie;if(result[1]){c.key=result[2].trim()}else{c.key=""}c.value=result[3].trim();if(CONTROL_CHARS.test(c.key)||CONTROL_CHARS.test(c.value)){return}if(firstSemi===-1){return c}var unparsed=str.slice(firstSemi+1).trim();if(unparsed.length===0){return c}var cookie_avs=unparsed.split(";");while(cookie_avs.length){var av=cookie_avs.shift().trim();if(av.length===0){continue}var av_sep=av.indexOf("=");var av_key,av_value;if(av_sep===-1){av_key=av;av_value=null}else{av_key=av.substr(0,av_sep);av_value=av.substr(av_sep+1)}av_key=av_key.trim().toLowerCase();if(av_value){av_value=av_value.trim()}switch(av_key){case"expires":if(av_value){var exp=parseDate(av_value); +if(exp){c.expires=exp}}break;case"max-age":if(av_value){if(/^-?[0-9]+$/.test(av_value)){var delta=parseInt(av_value,10);c.setMaxAge(delta)}}break;case"domain":if(av_value){var domain=av_value.trim().replace(/^\./,"");if(domain){c.domain=domain.toLowerCase()}}break;case"path":c.path=av_value&&av_value[0]==="/"?av_value:null;break;case"secure":c.secure=true;break;case"httponly":c.httpOnly=true;break;default:c.extensions=c.extensions||[];c.extensions.push(av);break}}return c}function jsonParse(str){var obj;try{obj=JSON.parse(str)}catch(e){return e}return obj}function fromJSON(str){if(!str){return null}var obj;if(typeof str==="string"){obj=jsonParse(str);if(obj instanceof Error){return null}}else{obj=str}var c=new Cookie;for(var i=0;i1){var lindex=path.lastIndexOf("/");if(lindex===0){break}path=path.substr(0,lindex);permutations.push(path)}permutations.push("/");return permutations}function getCookieContext(url){if(url instanceof Object){return url}try{url=decodeURI(url)}catch(err){}return urlParse(url)}function Cookie(options){options=options||{};Object.keys(options).forEach(function(prop){if(Cookie.prototype.hasOwnProperty(prop)&&Cookie.prototype[prop]!==options[prop]&&prop.substr(0,1)!=="_"){this[prop]=options[prop]}},this);this.creation=this.creation||new Date;Object.defineProperty(this,"creationIndex",{configurable:false,enumerable:false,writable:true,value:++Cookie.cookiesCreated})}Cookie.cookiesCreated=0;Cookie.parse=parse;Cookie.fromJSON=fromJSON;Cookie.prototype.key="";Cookie.prototype.value="";Cookie.prototype.expires="Infinity";Cookie.prototype.maxAge=null;Cookie.prototype.domain=null;Cookie.prototype.path=null;Cookie.prototype.secure=false;Cookie.prototype.httpOnly=false;Cookie.prototype.extensions=null;Cookie.prototype.hostOnly=null;Cookie.prototype.pathIsDefault=null;Cookie.prototype.creation=null;Cookie.prototype.lastAccessed=null;Object.defineProperty(Cookie.prototype,"creationIndex",{configurable:true,enumerable:false,writable:true,value:0});Cookie.serializableProperties=Object.keys(Cookie.prototype).filter(function(prop){return!(Cookie.prototype[prop]instanceof Function||prop==="creationIndex"||prop.substr(0,1)==="_")});Cookie.prototype.inspect=function inspect(){var now=Date.now();return'Cookie="'+this.toString()+"; hostOnly="+(this.hostOnly!=null?this.hostOnly:"?")+"; aAge="+(this.lastAccessed?now-this.lastAccessed.getTime()+"ms":"?")+"; cAge="+(this.creation?now-this.creation.getTime()+"ms":"?")+'"'};Cookie.prototype.toJSON=function(){var obj={};var props=Cookie.serializableProperties;for(var i=0;isuffixLen){var publicSuffix=parts.slice(0,suffixLen+1).reverse().join(".");return converted?punycode.toUnicode(publicSuffix):publicSuffix}return null};var index=module.exports.index=Object.freeze({ac:true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,ad:true,"nom.ad":true,ae:true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,aero:true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,af:true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,ag:true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,ai:true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,al:true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,am:true,an:true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,ao:true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,aq:true,ar:true,"com.ar":true,"edu.ar":true,"gob.ar":true,"gov.ar":true,"int.ar":true,"mil.ar":true,"net.ar":true,"org.ar":true,"tur.ar":true,arpa:true,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,as:true,"gov.as":true,asia:true,at:true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,au:true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,aw:true,"com.aw":true,ax:true,az:true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,ba:true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,bb:true,"biz.bb":true,"co.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"tv.bb":true,"*.bd":true,be:true,"ac.be":true,bf:true,"gov.bf":true,bg:true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,bh:true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,bi:true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,biz:true,bj:true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,bm:true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,bo:true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,br:true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"eco.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"leg.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mp.br":true,"mus.br":true,"net.br":true,"*.nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,bs:true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,bt:true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,bv:true,bw:true,"co.bw":true,"org.bw":true,by:true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,bz:true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,ca:true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,cat:true,cc:true,cd:true,"gov.cd":true,cf:true,cg:true,ch:true,ci:true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,cl:true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,cm:true,"co.cm":true,"com.cm":true,"gov.cm":true,"net.cm":true,cn:true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,co:true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,com:true,coop:true,cr:true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,cu:true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,cv:true,cw:true,"com.cw":true,"edu.cw":true,"net.cw":true,"org.cw":true,cx:true,"gov.cx":true,"ac.cy":true,"biz.cy":true,"com.cy":true,"ekloges.cy":true,"gov.cy":true,"ltd.cy":true,"name.cy":true,"net.cy":true,"org.cy":true,"parliament.cy":true,"press.cy":true,"pro.cy":true,"tm.cy":true,cz:true,de:true,dj:true,dk:true,dm:true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,dz:true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,ec:true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,edu:true,ee:true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,eg:true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,es:true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,et:true,"com.et":true,"gov.et":true,"org.et":true,"edu.et":true,"biz.et":true,"name.et":true,"info.et":true,"net.et":true,eu:true,fi:true,"aland.fi":true,"*.fj":true,"*.fk":true,fm:true,fo:true,fr:true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,ga:true,gb:true,gd:true,ge:true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,gf:true,gg:true,"co.gg":true,"net.gg":true,"org.gg":true,gh:true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,gi:true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,gl:true,"co.gl":true,"com.gl":true,"edu.gl":true,"net.gl":true,"org.gl":true,gm:true,gn:true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,gov:true,gp:true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,gq:true,gr:true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,gs:true,gt:true,"com.gt":true,"edu.gt":true,"gob.gt":true,"ind.gt":true,"mil.gt":true,"net.gt":true,"org.gt":true,"*.gu":true,gw:true,gy:true,"co.gy":true,"com.gy":true,"net.gy":true,hk:true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,hm:true,hn:true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,hr:true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,ht:true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,hu:true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,id:true,"ac.id":true,"biz.id":true,"co.id":true,"desa.id":true,"go.id":true,"mil.id":true,"my.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,ie:true,"gov.ie":true,il:true,"ac.il":true,"co.il":true,"gov.il":true,"idf.il":true,"k12.il":true,"muni.il":true,"net.il":true,"org.il":true,im:true,"ac.im":true,"co.im":true,"com.im":true,"ltd.co.im":true,"net.im":true,"org.im":true,"plc.co.im":true,"tt.im":true,"tv.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,info:true,"int":true,"eu.int":true,io:true,"com.io":true,iq:true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,ir:true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,is:true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,it:true,"gov.it":true,"edu.it":true,"abr.it":true,"abruzzo.it":true,"aosta-valley.it":true,"aostavalley.it":true,"bas.it":true,"basilicata.it":true,"cal.it":true,"calabria.it":true,"cam.it":true,"campania.it":true,"emilia-romagna.it":true,"emiliaromagna.it":true,"emr.it":true,"friuli-v-giulia.it":true,"friuli-ve-giulia.it":true,"friuli-vegiulia.it":true,"friuli-venezia-giulia.it":true,"friuli-veneziagiulia.it":true,"friuli-vgiulia.it":true,"friuliv-giulia.it":true,"friulive-giulia.it":true,"friulivegiulia.it":true,"friulivenezia-giulia.it":true,"friuliveneziagiulia.it":true,"friulivgiulia.it":true,"fvg.it":true,"laz.it":true,"lazio.it":true,"lig.it":true,"liguria.it":true,"lom.it":true,"lombardia.it":true,"lombardy.it":true,"lucania.it":true,"mar.it":true,"marche.it":true,"mol.it":true,"molise.it":true,"piedmont.it":true,"piemonte.it":true,"pmn.it":true,"pug.it":true,"puglia.it":true,"sar.it":true,"sardegna.it":true,"sardinia.it":true,"sic.it":true,"sicilia.it":true,"sicily.it":true,"taa.it":true,"tos.it":true,"toscana.it":true,"trentino-a-adige.it":true,"trentino-aadige.it":true,"trentino-alto-adige.it":true,"trentino-altoadige.it":true,"trentino-s-tirol.it":true,"trentino-stirol.it":true,"trentino-sud-tirol.it":true,"trentino-sudtirol.it":true,"trentino-sued-tirol.it":true,"trentino-suedtirol.it":true,"trentinoa-adige.it":true,"trentinoaadige.it":true,"trentinoalto-adige.it":true,"trentinoaltoadige.it":true,"trentinos-tirol.it":true,"trentinostirol.it":true,"trentinosud-tirol.it":true,"trentinosudtirol.it":true,"trentinosued-tirol.it":true,"trentinosuedtirol.it":true,"tuscany.it":true,"umb.it":true,"umbria.it":true,"val-d-aosta.it":true,"val-daosta.it":true,"vald-aosta.it":true,"valdaosta.it":true,"valle-aosta.it":true,"valle-d-aosta.it":true,"valle-daosta.it":true,"valleaosta.it":true,"valled-aosta.it":true,"valledaosta.it":true,"vallee-aoste.it":true,"valleeaoste.it":true,"vao.it":true,"vda.it":true,"ven.it":true,"veneto.it":true,"ag.it":true,"agrigento.it":true,"al.it":true,"alessandria.it":true,"alto-adige.it":true,"altoadige.it":true,"an.it":true,"ancona.it":true,"andria-barletta-trani.it":true,"andria-trani-barletta.it":true,"andriabarlettatrani.it":true,"andriatranibarletta.it":true,"ao.it":true,"aosta.it":true,"aoste.it":true,"ap.it":true,"aq.it":true,"aquila.it":true,"ar.it":true,"arezzo.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"asti.it":true,"at.it":true,"av.it":true,"avellino.it":true,"ba.it":true,"balsan.it":true,"bari.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"belluno.it":true,"benevento.it":true,"bergamo.it":true,"bg.it":true,"bi.it":true,"biella.it":true,"bl.it":true,"bn.it":true,"bo.it":true,"bologna.it":true,"bolzano.it":true,"bozen.it":true,"br.it":true,"brescia.it":true,"brindisi.it":true,"bs.it":true,"bt.it":true,"bz.it":true,"ca.it":true,"cagliari.it":true,"caltanissetta.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"campobasso.it":true,"carbonia-iglesias.it":true,"carboniaiglesias.it":true,"carrara-massa.it":true,"carraramassa.it":true,"caserta.it":true,"catania.it":true,"catanzaro.it":true,"cb.it":true,"ce.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"ch.it":true,"chieti.it":true,"ci.it":true,"cl.it":true,"cn.it":true,"co.it":true,"como.it":true,"cosenza.it":true,"cr.it":true,"cremona.it":true,"crotone.it":true,"cs.it":true,"ct.it":true,"cuneo.it":true,"cz.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"en.it":true,"enna.it":true,"fc.it":true,"fe.it":true,"fermo.it":true,"ferrara.it":true,"fg.it":true,"fi.it":true,"firenze.it":true,"florence.it":true,"fm.it":true,"foggia.it":true,"forli-cesena.it":true,"forlicesena.it":true,"fr.it":true,"frosinone.it":true,"ge.it":true,"genoa.it":true,"genova.it":true,"go.it":true,"gorizia.it":true,"gr.it":true,"grosseto.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"im.it":true,"imperia.it":true,"is.it":true,"isernia.it":true,"kr.it":true,"la-spezia.it":true,"laquila.it":true,"laspezia.it":true,"latina.it":true,"lc.it":true,"le.it":true,"lecce.it":true,"lecco.it":true,"li.it":true,"livorno.it":true,"lo.it":true,"lodi.it":true,"lt.it":true,"lu.it":true,"lucca.it":true,"macerata.it":true,"mantova.it":true,"massa-carrara.it":true,"massacarrara.it":true,"matera.it":true,"mb.it":true,"mc.it":true,"me.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"messina.it":true,"mi.it":true,"milan.it":true,"milano.it":true,"mn.it":true,"mo.it":true,"modena.it":true,"monza-brianza.it":true,"monza-e-della-brianza.it":true,"monza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"ms.it":true,"mt.it":true,"na.it":true,"naples.it":true,"napoli.it":true,"no.it":true,"novara.it":true,"nu.it":true,"nuoro.it":true,"og.it":true,"ogliastra.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"or.it":true,"oristano.it":true,"ot.it":true,"pa.it":true,"padova.it":true,"padua.it":true,"palermo.it":true,"parma.it":true,"pavia.it":true,"pc.it":true,"pd.it":true,"pe.it":true,"perugia.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"pescara.it":true,"pg.it":true,"pi.it":true,"piacenza.it":true,"pisa.it":true,"pistoia.it":true,"pn.it":true,"po.it":true,"pordenone.it":true,"potenza.it":true,"pr.it":true,"prato.it":true,"pt.it":true,"pu.it":true,"pv.it":true,"pz.it":true,"ra.it":true,"ragusa.it":true,"ravenna.it":true,"rc.it":true,"re.it":true,"reggio-calabria.it":true,"reggio-emilia.it":true,"reggiocalabria.it":true,"reggioemilia.it":true,"rg.it":true,"ri.it":true,"rieti.it":true,"rimini.it":true,"rm.it":true,"rn.it":true,"ro.it":true,"roma.it":true,"rome.it":true,"rovigo.it":true,"sa.it":true,"salerno.it":true,"sassari.it":true,"savona.it":true,"si.it":true,"siena.it":true,"siracusa.it":true,"so.it":true,"sondrio.it":true,"sp.it":true,"sr.it":true,"ss.it":true,"suedtirol.it":true,"sv.it":true,"ta.it":true,"taranto.it":true,"te.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"teramo.it":true,"terni.it":true,"tn.it":true,"to.it":true,"torino.it":true,"tp.it":true,"tr.it":true,"trani-andria-barletta.it":true,"trani-barletta-andria.it":true,"traniandriabarletta.it":true,"tranibarlettaandria.it":true,"trapani.it":true,"trentino.it":true,"trento.it":true,"treviso.it":true,"trieste.it":true,"ts.it":true,"turin.it":true,"tv.it":true,"ud.it":true,"udine.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"va.it":true,"varese.it":true,"vb.it":true,"vc.it":true,"ve.it":true,"venezia.it":true,"venice.it":true,"verbania.it":true,"vercelli.it":true,"verona.it":true,"vi.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vicenza.it":true,"viterbo.it":true,"vr.it":true,"vs.it":true,"vt.it":true,"vv.it":true,je:true,"co.je":true,"net.je":true,"org.je":true,"*.jm":true,jo:true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,jobs:true,jp:true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"aichi.jp":true,"akita.jp":true,"aomori.jp":true,"chiba.jp":true,"ehime.jp":true,"fukui.jp":true,"fukuoka.jp":true,"fukushima.jp":true,"gifu.jp":true,"gunma.jp":true,"hiroshima.jp":true,"hokkaido.jp":true,"hyogo.jp":true,"ibaraki.jp":true,"ishikawa.jp":true,"iwate.jp":true,"kagawa.jp":true,"kagoshima.jp":true,"kanagawa.jp":true,"kochi.jp":true,"kumamoto.jp":true,"kyoto.jp":true,"mie.jp":true,"miyagi.jp":true,"miyazaki.jp":true,"nagano.jp":true,"nagasaki.jp":true,"nara.jp":true,"niigata.jp":true,"oita.jp":true,"okayama.jp":true,"okinawa.jp":true,"osaka.jp":true,"saga.jp":true,"saitama.jp":true,"shiga.jp":true,"shimane.jp":true,"shizuoka.jp":true,"tochigi.jp":true,"tokushima.jp":true,"tokyo.jp":true,"tottori.jp":true,"toyama.jp":true,"wakayama.jp":true,"yamagata.jp":true,"yamaguchi.jp":true,"yamanashi.jp":true,"xn--4pvxs.jp":true,"xn--vgu402c.jp":true,"xn--c3s14m.jp":true,"xn--f6qx53a.jp":true,"xn--8pvr4u.jp":true,"xn--uist22h.jp":true,"xn--djrs72d6uy.jp":true,"xn--mkru45i.jp":true,"xn--0trq7p7nn.jp":true,"xn--8ltr62k.jp":true,"xn--2m4a15e.jp":true,"xn--efvn9s.jp":true,"xn--32vp30h.jp":true,"xn--4it797k.jp":true,"xn--1lqs71d.jp":true,"xn--5rtp49c.jp":true,"xn--5js045d.jp":true,"xn--ehqz56n.jp":true,"xn--1lqs03n.jp":true,"xn--qqqt11m.jp":true,"xn--kbrq7o.jp":true,"xn--pssu33l.jp":true,"xn--ntsq17g.jp":true,"xn--uisz3g.jp":true,"xn--6btw5a.jp":true,"xn--1ctwo.jp":true,"xn--6orx2r.jp":true,"xn--rht61e.jp":true,"xn--rht27z.jp":true,"xn--djty4k.jp":true,"xn--nit225k.jp":true,"xn--rht3d.jp":true,"xn--klty5x.jp":true,"xn--kltx9a.jp":true,"xn--kltp7d.jp":true,"xn--uuwu58a.jp":true,"xn--zbx025d.jp":true,"xn--ntso0iqx3a.jp":true,"xn--elqq16h.jp":true,"xn--4it168d.jp":true,"xn--klt787d.jp":true,"xn--rny31h.jp":true,"xn--7t0a264c.jp":true,"xn--5rtq34k.jp":true,"xn--k7yn95e.jp":true,"xn--tor131o.jp":true,"xn--d5qv7z876c.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.nagoya.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.yokohama.jp":true,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.nagoya.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.yokohama.jp":false,"aisai.aichi.jp":true,"ama.aichi.jp":true,"anjo.aichi.jp":true,"asuke.aichi.jp":true,"chiryu.aichi.jp":true,"chita.aichi.jp":true,"fuso.aichi.jp":true,"gamagori.aichi.jp":true,"handa.aichi.jp":true,"hazu.aichi.jp":true,"hekinan.aichi.jp":true,"higashiura.aichi.jp":true,"ichinomiya.aichi.jp":true,"inazawa.aichi.jp":true,"inuyama.aichi.jp":true,"isshiki.aichi.jp":true,"iwakura.aichi.jp":true,"kanie.aichi.jp":true,"kariya.aichi.jp":true,"kasugai.aichi.jp":true,"kira.aichi.jp":true,"kiyosu.aichi.jp":true,"komaki.aichi.jp":true,"konan.aichi.jp":true,"kota.aichi.jp":true,"mihama.aichi.jp":true,"miyoshi.aichi.jp":true,"nishio.aichi.jp":true,"nisshin.aichi.jp":true,"obu.aichi.jp":true,"oguchi.aichi.jp":true,"oharu.aichi.jp":true,"okazaki.aichi.jp":true,"owariasahi.aichi.jp":true,"seto.aichi.jp":true,"shikatsu.aichi.jp":true,"shinshiro.aichi.jp":true,"shitara.aichi.jp":true,"tahara.aichi.jp":true,"takahama.aichi.jp":true,"tobishima.aichi.jp":true,"toei.aichi.jp":true,"togo.aichi.jp":true,"tokai.aichi.jp":true,"tokoname.aichi.jp":true,"toyoake.aichi.jp":true,"toyohashi.aichi.jp":true,"toyokawa.aichi.jp":true,"toyone.aichi.jp":true,"toyota.aichi.jp":true,"tsushima.aichi.jp":true,"yatomi.aichi.jp":true,"akita.akita.jp":true,"daisen.akita.jp":true,"fujisato.akita.jp":true,"gojome.akita.jp":true,"hachirogata.akita.jp":true,"happou.akita.jp":true,"higashinaruse.akita.jp":true,"honjo.akita.jp":true,"honjyo.akita.jp":true,"ikawa.akita.jp":true,"kamikoani.akita.jp":true,"kamioka.akita.jp":true,"katagami.akita.jp":true,"kazuno.akita.jp":true,"kitaakita.akita.jp":true,"kosaka.akita.jp":true,"kyowa.akita.jp":true,"misato.akita.jp":true,"mitane.akita.jp":true,"moriyoshi.akita.jp":true,"nikaho.akita.jp":true,"noshiro.akita.jp":true,"odate.akita.jp":true,"oga.akita.jp":true,"ogata.akita.jp":true,"semboku.akita.jp":true,"yokote.akita.jp":true,"yurihonjo.akita.jp":true,"aomori.aomori.jp":true,"gonohe.aomori.jp":true,"hachinohe.aomori.jp":true,"hashikami.aomori.jp":true,"hiranai.aomori.jp":true,"hirosaki.aomori.jp":true,"itayanagi.aomori.jp":true,"kuroishi.aomori.jp":true,"misawa.aomori.jp":true,"mutsu.aomori.jp":true,"nakadomari.aomori.jp":true,"noheji.aomori.jp":true,"oirase.aomori.jp":true,"owani.aomori.jp":true,"rokunohe.aomori.jp":true,"sannohe.aomori.jp":true,"shichinohe.aomori.jp":true,"shingo.aomori.jp":true,"takko.aomori.jp":true,"towada.aomori.jp":true,"tsugaru.aomori.jp":true,"tsuruta.aomori.jp":true,"abiko.chiba.jp":true,"asahi.chiba.jp":true,"chonan.chiba.jp":true,"chosei.chiba.jp":true,"choshi.chiba.jp":true,"chuo.chiba.jp":true,"funabashi.chiba.jp":true,"futtsu.chiba.jp":true,"hanamigawa.chiba.jp":true,"ichihara.chiba.jp":true,"ichikawa.chiba.jp":true,"ichinomiya.chiba.jp":true,"inzai.chiba.jp":true,"isumi.chiba.jp":true,"kamagaya.chiba.jp":true,"kamogawa.chiba.jp":true,"kashiwa.chiba.jp":true,"katori.chiba.jp":true,"katsuura.chiba.jp":true,"kimitsu.chiba.jp":true,"kisarazu.chiba.jp":true,"kozaki.chiba.jp":true,"kujukuri.chiba.jp":true,"kyonan.chiba.jp":true,"matsudo.chiba.jp":true,"midori.chiba.jp":true,"mihama.chiba.jp":true,"minamiboso.chiba.jp":true,"mobara.chiba.jp":true,"mutsuzawa.chiba.jp":true,"nagara.chiba.jp":true,"nagareyama.chiba.jp":true,"narashino.chiba.jp":true,"narita.chiba.jp":true,"noda.chiba.jp":true,"oamishirasato.chiba.jp":true,"omigawa.chiba.jp":true,"onjuku.chiba.jp":true,"otaki.chiba.jp":true,"sakae.chiba.jp":true,"sakura.chiba.jp":true,"shimofusa.chiba.jp":true,"shirako.chiba.jp":true,"shiroi.chiba.jp":true,"shisui.chiba.jp":true,"sodegaura.chiba.jp":true,"sosa.chiba.jp":true,"tako.chiba.jp":true,"tateyama.chiba.jp":true,"togane.chiba.jp":true,"tohnosho.chiba.jp":true,"tomisato.chiba.jp":true,"urayasu.chiba.jp":true,"yachimata.chiba.jp":true,"yachiyo.chiba.jp":true,"yokaichiba.chiba.jp":true,"yokoshibahikari.chiba.jp":true,"yotsukaido.chiba.jp":true,"ainan.ehime.jp":true,"honai.ehime.jp":true,"ikata.ehime.jp":true,"imabari.ehime.jp":true,"iyo.ehime.jp":true,"kamijima.ehime.jp":true,"kihoku.ehime.jp":true,"kumakogen.ehime.jp":true,"masaki.ehime.jp":true,"matsuno.ehime.jp":true,"matsuyama.ehime.jp":true,"namikata.ehime.jp":true,"niihama.ehime.jp":true,"ozu.ehime.jp":true,"saijo.ehime.jp":true,"seiyo.ehime.jp":true,"shikokuchuo.ehime.jp":true,"tobe.ehime.jp":true,"toon.ehime.jp":true,"uchiko.ehime.jp":true,"uwajima.ehime.jp":true,"yawatahama.ehime.jp":true,"echizen.fukui.jp":true,"eiheiji.fukui.jp":true,"fukui.fukui.jp":true,"ikeda.fukui.jp":true,"katsuyama.fukui.jp":true,"mihama.fukui.jp":true,"minamiechizen.fukui.jp":true,"obama.fukui.jp":true,"ohi.fukui.jp":true,"ono.fukui.jp":true,"sabae.fukui.jp":true,"sakai.fukui.jp":true,"takahama.fukui.jp":true,"tsuruga.fukui.jp":true,"wakasa.fukui.jp":true,"ashiya.fukuoka.jp":true,"buzen.fukuoka.jp":true,"chikugo.fukuoka.jp":true,"chikuho.fukuoka.jp":true,"chikujo.fukuoka.jp":true,"chikushino.fukuoka.jp":true,"chikuzen.fukuoka.jp":true,"chuo.fukuoka.jp":true,"dazaifu.fukuoka.jp":true,"fukuchi.fukuoka.jp":true,"hakata.fukuoka.jp":true,"higashi.fukuoka.jp":true,"hirokawa.fukuoka.jp":true,"hisayama.fukuoka.jp":true,"iizuka.fukuoka.jp":true,"inatsuki.fukuoka.jp":true,"kaho.fukuoka.jp":true,"kasuga.fukuoka.jp":true,"kasuya.fukuoka.jp":true,"kawara.fukuoka.jp":true,"keisen.fukuoka.jp":true,"koga.fukuoka.jp":true,"kurate.fukuoka.jp":true,"kurogi.fukuoka.jp":true,"kurume.fukuoka.jp":true,"minami.fukuoka.jp":true,"miyako.fukuoka.jp":true,"miyama.fukuoka.jp":true,"miyawaka.fukuoka.jp":true,"mizumaki.fukuoka.jp":true,"munakata.fukuoka.jp":true,"nakagawa.fukuoka.jp":true,"nakama.fukuoka.jp":true,"nishi.fukuoka.jp":true,"nogata.fukuoka.jp":true,"ogori.fukuoka.jp":true,"okagaki.fukuoka.jp":true,"okawa.fukuoka.jp":true,"oki.fukuoka.jp":true,"omuta.fukuoka.jp":true,"onga.fukuoka.jp":true,"onojo.fukuoka.jp":true,"oto.fukuoka.jp":true,"saigawa.fukuoka.jp":true,"sasaguri.fukuoka.jp":true,"shingu.fukuoka.jp":true,"shinyoshitomi.fukuoka.jp":true,"shonai.fukuoka.jp":true,"soeda.fukuoka.jp":true,"sue.fukuoka.jp":true,"tachiarai.fukuoka.jp":true,"tagawa.fukuoka.jp":true,"takata.fukuoka.jp":true,"toho.fukuoka.jp":true,"toyotsu.fukuoka.jp":true,"tsuiki.fukuoka.jp":true,"ukiha.fukuoka.jp":true,"umi.fukuoka.jp":true,"usui.fukuoka.jp":true,"yamada.fukuoka.jp":true,"yame.fukuoka.jp":true,"yanagawa.fukuoka.jp":true,"yukuhashi.fukuoka.jp":true,"aizubange.fukushima.jp":true,"aizumisato.fukushima.jp":true,"aizuwakamatsu.fukushima.jp":true,"asakawa.fukushima.jp":true,"bandai.fukushima.jp":true,"date.fukushima.jp":true,"fukushima.fukushima.jp":true,"furudono.fukushima.jp":true,"futaba.fukushima.jp":true,"hanawa.fukushima.jp":true,"higashi.fukushima.jp":true,"hirata.fukushima.jp":true,"hirono.fukushima.jp":true,"iitate.fukushima.jp":true,"inawashiro.fukushima.jp":true,"ishikawa.fukushima.jp":true,"iwaki.fukushima.jp":true,"izumizaki.fukushima.jp":true,"kagamiishi.fukushima.jp":true,"kaneyama.fukushima.jp":true,"kawamata.fukushima.jp":true,"kitakata.fukushima.jp":true,"kitashiobara.fukushima.jp":true,"koori.fukushima.jp":true,"koriyama.fukushima.jp":true,"kunimi.fukushima.jp":true,"miharu.fukushima.jp":true,"mishima.fukushima.jp":true,"namie.fukushima.jp":true,"nango.fukushima.jp":true,"nishiaizu.fukushima.jp":true,"nishigo.fukushima.jp":true,"okuma.fukushima.jp":true,"omotego.fukushima.jp":true,"ono.fukushima.jp":true,"otama.fukushima.jp":true,"samegawa.fukushima.jp":true,"shimogo.fukushima.jp":true,"shirakawa.fukushima.jp":true,"showa.fukushima.jp":true,"soma.fukushima.jp":true,"sukagawa.fukushima.jp":true,"taishin.fukushima.jp":true,"tamakawa.fukushima.jp":true,"tanagura.fukushima.jp":true,"tenei.fukushima.jp":true,"yabuki.fukushima.jp":true,"yamato.fukushima.jp":true,"yamatsuri.fukushima.jp":true,"yanaizu.fukushima.jp":true,"yugawa.fukushima.jp":true,"anpachi.gifu.jp":true,"ena.gifu.jp":true,"gifu.gifu.jp":true,"ginan.gifu.jp":true,"godo.gifu.jp":true,"gujo.gifu.jp":true,"hashima.gifu.jp":true,"hichiso.gifu.jp":true,"hida.gifu.jp":true,"higashishirakawa.gifu.jp":true,"ibigawa.gifu.jp":true,"ikeda.gifu.jp":true,"kakamigahara.gifu.jp":true,"kani.gifu.jp":true,"kasahara.gifu.jp":true,"kasamatsu.gifu.jp":true,"kawaue.gifu.jp":true,"kitagata.gifu.jp":true,"mino.gifu.jp":true,"minokamo.gifu.jp":true,"mitake.gifu.jp":true,"mizunami.gifu.jp":true,"motosu.gifu.jp":true,"nakatsugawa.gifu.jp":true,"ogaki.gifu.jp":true,"sakahogi.gifu.jp":true,"seki.gifu.jp":true,"sekigahara.gifu.jp":true,"shirakawa.gifu.jp":true,"tajimi.gifu.jp":true,"takayama.gifu.jp":true,"tarui.gifu.jp":true,"toki.gifu.jp":true,"tomika.gifu.jp":true,"wanouchi.gifu.jp":true,"yamagata.gifu.jp":true,"yaotsu.gifu.jp":true,"yoro.gifu.jp":true,"annaka.gunma.jp":true,"chiyoda.gunma.jp":true,"fujioka.gunma.jp":true,"higashiagatsuma.gunma.jp":true,"isesaki.gunma.jp":true,"itakura.gunma.jp":true,"kanna.gunma.jp":true,"kanra.gunma.jp":true,"katashina.gunma.jp":true,"kawaba.gunma.jp":true,"kiryu.gunma.jp":true,"kusatsu.gunma.jp":true,"maebashi.gunma.jp":true,"meiwa.gunma.jp":true,"midori.gunma.jp":true,"minakami.gunma.jp":true,"naganohara.gunma.jp":true,"nakanojo.gunma.jp":true,"nanmoku.gunma.jp":true,"numata.gunma.jp":true,"oizumi.gunma.jp":true,"ora.gunma.jp":true,"ota.gunma.jp":true,"shibukawa.gunma.jp":true,"shimonita.gunma.jp":true,"shinto.gunma.jp":true,"showa.gunma.jp":true,"takasaki.gunma.jp":true,"takayama.gunma.jp":true,"tamamura.gunma.jp":true,"tatebayashi.gunma.jp":true,"tomioka.gunma.jp":true,"tsukiyono.gunma.jp":true,"tsumagoi.gunma.jp":true,"ueno.gunma.jp":true,"yoshioka.gunma.jp":true,"asaminami.hiroshima.jp":true,"daiwa.hiroshima.jp":true,"etajima.hiroshima.jp":true,"fuchu.hiroshima.jp":true,"fukuyama.hiroshima.jp":true,"hatsukaichi.hiroshima.jp":true,"higashihiroshima.hiroshima.jp":true,"hongo.hiroshima.jp":true,"jinsekikogen.hiroshima.jp":true,"kaita.hiroshima.jp":true,"kui.hiroshima.jp":true,"kumano.hiroshima.jp":true,"kure.hiroshima.jp":true,"mihara.hiroshima.jp":true,"miyoshi.hiroshima.jp":true,"naka.hiroshima.jp":true,"onomichi.hiroshima.jp":true,"osakikamijima.hiroshima.jp":true,"otake.hiroshima.jp":true,"saka.hiroshima.jp":true,"sera.hiroshima.jp":true,"seranishi.hiroshima.jp":true,"shinichi.hiroshima.jp":true,"shobara.hiroshima.jp":true,"takehara.hiroshima.jp":true,"abashiri.hokkaido.jp":true,"abira.hokkaido.jp":true,"aibetsu.hokkaido.jp":true,"akabira.hokkaido.jp":true,"akkeshi.hokkaido.jp":true,"asahikawa.hokkaido.jp":true,"ashibetsu.hokkaido.jp":true,"ashoro.hokkaido.jp":true,"assabu.hokkaido.jp":true,"atsuma.hokkaido.jp":true,"bibai.hokkaido.jp":true,"biei.hokkaido.jp":true,"bifuka.hokkaido.jp":true,"bihoro.hokkaido.jp":true,"biratori.hokkaido.jp":true,"chippubetsu.hokkaido.jp":true,"chitose.hokkaido.jp":true,"date.hokkaido.jp":true,"ebetsu.hokkaido.jp":true,"embetsu.hokkaido.jp":true,"eniwa.hokkaido.jp":true,"erimo.hokkaido.jp":true,"esan.hokkaido.jp":true,"esashi.hokkaido.jp":true,"fukagawa.hokkaido.jp":true,"fukushima.hokkaido.jp":true,"furano.hokkaido.jp":true,"furubira.hokkaido.jp":true,"haboro.hokkaido.jp":true,"hakodate.hokkaido.jp":true,"hamatonbetsu.hokkaido.jp":true,"hidaka.hokkaido.jp":true,"higashikagura.hokkaido.jp":true,"higashikawa.hokkaido.jp":true,"hiroo.hokkaido.jp":true,"hokuryu.hokkaido.jp":true,"hokuto.hokkaido.jp":true,"honbetsu.hokkaido.jp":true,"horokanai.hokkaido.jp":true,"horonobe.hokkaido.jp":true,"ikeda.hokkaido.jp":true,"imakane.hokkaido.jp":true,"ishikari.hokkaido.jp":true,"iwamizawa.hokkaido.jp":true,"iwanai.hokkaido.jp":true,"kamifurano.hokkaido.jp":true,"kamikawa.hokkaido.jp":true,"kamishihoro.hokkaido.jp":true,"kamisunagawa.hokkaido.jp":true,"kamoenai.hokkaido.jp":true,"kayabe.hokkaido.jp":true,"kembuchi.hokkaido.jp":true,"kikonai.hokkaido.jp":true,"kimobetsu.hokkaido.jp":true,"kitahiroshima.hokkaido.jp":true,"kitami.hokkaido.jp":true,"kiyosato.hokkaido.jp":true,"koshimizu.hokkaido.jp":true,"kunneppu.hokkaido.jp":true,"kuriyama.hokkaido.jp":true,"kuromatsunai.hokkaido.jp":true,"kushiro.hokkaido.jp":true,"kutchan.hokkaido.jp":true,"kyowa.hokkaido.jp":true,"mashike.hokkaido.jp":true,"matsumae.hokkaido.jp":true,"mikasa.hokkaido.jp":true,"minamifurano.hokkaido.jp":true,"mombetsu.hokkaido.jp":true,"moseushi.hokkaido.jp":true,"mukawa.hokkaido.jp":true,"muroran.hokkaido.jp":true,"naie.hokkaido.jp":true,"nakagawa.hokkaido.jp":true,"nakasatsunai.hokkaido.jp":true,"nakatombetsu.hokkaido.jp":true,"nanae.hokkaido.jp":true,"nanporo.hokkaido.jp":true,"nayoro.hokkaido.jp":true,"nemuro.hokkaido.jp":true,"niikappu.hokkaido.jp":true,"niki.hokkaido.jp":true,"nishiokoppe.hokkaido.jp":true,"noboribetsu.hokkaido.jp":true,"numata.hokkaido.jp":true,"obihiro.hokkaido.jp":true,"obira.hokkaido.jp":true,"oketo.hokkaido.jp":true,"okoppe.hokkaido.jp":true,"otaru.hokkaido.jp":true,"otobe.hokkaido.jp":true,"otofuke.hokkaido.jp":true,"otoineppu.hokkaido.jp":true,"oumu.hokkaido.jp":true,"ozora.hokkaido.jp":true,"pippu.hokkaido.jp":true,"rankoshi.hokkaido.jp":true,"rebun.hokkaido.jp":true,"rikubetsu.hokkaido.jp":true,"rishiri.hokkaido.jp":true,"rishirifuji.hokkaido.jp":true,"saroma.hokkaido.jp":true,"sarufutsu.hokkaido.jp":true,"shakotan.hokkaido.jp":true,"shari.hokkaido.jp":true,"shibecha.hokkaido.jp":true,"shibetsu.hokkaido.jp":true,"shikabe.hokkaido.jp":true,"shikaoi.hokkaido.jp":true,"shimamaki.hokkaido.jp":true,"shimizu.hokkaido.jp":true,"shimokawa.hokkaido.jp":true,"shinshinotsu.hokkaido.jp":true,"shintoku.hokkaido.jp":true,"shiranuka.hokkaido.jp":true,"shiraoi.hokkaido.jp":true,"shiriuchi.hokkaido.jp":true,"sobetsu.hokkaido.jp":true,"sunagawa.hokkaido.jp":true,"taiki.hokkaido.jp":true,"takasu.hokkaido.jp":true,"takikawa.hokkaido.jp":true,"takinoue.hokkaido.jp":true,"teshikaga.hokkaido.jp":true,"tobetsu.hokkaido.jp":true,"tohma.hokkaido.jp":true,"tomakomai.hokkaido.jp":true,"tomari.hokkaido.jp":true,"toya.hokkaido.jp":true,"toyako.hokkaido.jp":true,"toyotomi.hokkaido.jp":true,"toyoura.hokkaido.jp":true,"tsubetsu.hokkaido.jp":true,"tsukigata.hokkaido.jp":true,"urakawa.hokkaido.jp":true,"urausu.hokkaido.jp":true,"uryu.hokkaido.jp":true,"utashinai.hokkaido.jp":true,"wakkanai.hokkaido.jp":true,"wassamu.hokkaido.jp":true,"yakumo.hokkaido.jp":true,"yoichi.hokkaido.jp":true,"aioi.hyogo.jp":true,"akashi.hyogo.jp":true,"ako.hyogo.jp":true,"amagasaki.hyogo.jp":true,"aogaki.hyogo.jp":true,"asago.hyogo.jp":true,"ashiya.hyogo.jp":true,"awaji.hyogo.jp":true,"fukusaki.hyogo.jp":true,"goshiki.hyogo.jp":true,"harima.hyogo.jp":true,"himeji.hyogo.jp":true,"ichikawa.hyogo.jp":true,"inagawa.hyogo.jp":true,"itami.hyogo.jp":true,"kakogawa.hyogo.jp":true,"kamigori.hyogo.jp":true,"kamikawa.hyogo.jp":true,"kasai.hyogo.jp":true,"kasuga.hyogo.jp":true,"kawanishi.hyogo.jp":true,"miki.hyogo.jp":true,"minamiawaji.hyogo.jp":true,"nishinomiya.hyogo.jp":true,"nishiwaki.hyogo.jp":true,"ono.hyogo.jp":true,"sanda.hyogo.jp":true,"sannan.hyogo.jp":true,"sasayama.hyogo.jp":true,"sayo.hyogo.jp":true,"shingu.hyogo.jp":true,"shinonsen.hyogo.jp":true,"shiso.hyogo.jp":true,"sumoto.hyogo.jp":true,"taishi.hyogo.jp":true,"taka.hyogo.jp":true,"takarazuka.hyogo.jp":true,"takasago.hyogo.jp":true,"takino.hyogo.jp":true,"tamba.hyogo.jp":true,"tatsuno.hyogo.jp":true,"toyooka.hyogo.jp":true,"yabu.hyogo.jp":true,"yashiro.hyogo.jp":true,"yoka.hyogo.jp":true,"yokawa.hyogo.jp":true,"ami.ibaraki.jp":true,"asahi.ibaraki.jp":true,"bando.ibaraki.jp":true,"chikusei.ibaraki.jp":true,"daigo.ibaraki.jp":true,"fujishiro.ibaraki.jp":true,"hitachi.ibaraki.jp":true,"hitachinaka.ibaraki.jp":true,"hitachiomiya.ibaraki.jp":true,"hitachiota.ibaraki.jp":true,"ibaraki.ibaraki.jp":true,"ina.ibaraki.jp":true,"inashiki.ibaraki.jp":true,"itako.ibaraki.jp":true,"iwama.ibaraki.jp":true,"joso.ibaraki.jp":true,"kamisu.ibaraki.jp":true,"kasama.ibaraki.jp":true,"kashima.ibaraki.jp":true,"kasumigaura.ibaraki.jp":true,"koga.ibaraki.jp":true,"miho.ibaraki.jp":true,"mito.ibaraki.jp":true,"moriya.ibaraki.jp":true,"naka.ibaraki.jp":true,"namegata.ibaraki.jp":true,"oarai.ibaraki.jp":true,"ogawa.ibaraki.jp":true,"omitama.ibaraki.jp":true,"ryugasaki.ibaraki.jp":true,"sakai.ibaraki.jp":true,"sakuragawa.ibaraki.jp":true,"shimodate.ibaraki.jp":true,"shimotsuma.ibaraki.jp":true,"shirosato.ibaraki.jp":true,"sowa.ibaraki.jp":true,"suifu.ibaraki.jp":true,"takahagi.ibaraki.jp":true,"tamatsukuri.ibaraki.jp":true,"tokai.ibaraki.jp":true,"tomobe.ibaraki.jp":true,"tone.ibaraki.jp":true,"toride.ibaraki.jp":true,"tsuchiura.ibaraki.jp":true,"tsukuba.ibaraki.jp":true,"uchihara.ibaraki.jp":true,"ushiku.ibaraki.jp":true,"yachiyo.ibaraki.jp":true,"yamagata.ibaraki.jp":true,"yawara.ibaraki.jp":true,"yuki.ibaraki.jp":true,"anamizu.ishikawa.jp":true,"hakui.ishikawa.jp":true,"hakusan.ishikawa.jp":true,"kaga.ishikawa.jp":true,"kahoku.ishikawa.jp":true,"kanazawa.ishikawa.jp":true,"kawakita.ishikawa.jp":true,"komatsu.ishikawa.jp":true,"nakanoto.ishikawa.jp":true,"nanao.ishikawa.jp":true,"nomi.ishikawa.jp":true,"nonoichi.ishikawa.jp":true,"noto.ishikawa.jp":true,"shika.ishikawa.jp":true,"suzu.ishikawa.jp":true,"tsubata.ishikawa.jp":true,"tsurugi.ishikawa.jp":true,"uchinada.ishikawa.jp":true,"wajima.ishikawa.jp":true,"fudai.iwate.jp":true,"fujisawa.iwate.jp":true,"hanamaki.iwate.jp":true,"hiraizumi.iwate.jp":true,"hirono.iwate.jp":true,"ichinohe.iwate.jp":true,"ichinoseki.iwate.jp":true,"iwaizumi.iwate.jp":true,"iwate.iwate.jp":true,"joboji.iwate.jp":true,"kamaishi.iwate.jp":true,"kanegasaki.iwate.jp":true,"karumai.iwate.jp":true,"kawai.iwate.jp":true,"kitakami.iwate.jp":true,"kuji.iwate.jp":true,"kunohe.iwate.jp":true,"kuzumaki.iwate.jp":true,"miyako.iwate.jp":true,"mizusawa.iwate.jp":true,"morioka.iwate.jp":true,"ninohe.iwate.jp":true,"noda.iwate.jp":true,"ofunato.iwate.jp":true,"oshu.iwate.jp":true,"otsuchi.iwate.jp":true,"rikuzentakata.iwate.jp":true,"shiwa.iwate.jp":true,"shizukuishi.iwate.jp":true,"sumita.iwate.jp":true,"tanohata.iwate.jp":true,"tono.iwate.jp":true,"yahaba.iwate.jp":true,"yamada.iwate.jp":true,"ayagawa.kagawa.jp":true,"higashikagawa.kagawa.jp":true,"kanonji.kagawa.jp":true,"kotohira.kagawa.jp":true,"manno.kagawa.jp":true,"marugame.kagawa.jp":true,"mitoyo.kagawa.jp":true,"naoshima.kagawa.jp":true,"sanuki.kagawa.jp":true,"tadotsu.kagawa.jp":true,"takamatsu.kagawa.jp":true,"tonosho.kagawa.jp":true,"uchinomi.kagawa.jp":true,"utazu.kagawa.jp":true,"zentsuji.kagawa.jp":true,"akune.kagoshima.jp":true,"amami.kagoshima.jp":true,"hioki.kagoshima.jp":true,"isa.kagoshima.jp":true,"isen.kagoshima.jp":true,"izumi.kagoshima.jp":true,"kagoshima.kagoshima.jp":true,"kanoya.kagoshima.jp":true,"kawanabe.kagoshima.jp":true,"kinko.kagoshima.jp":true,"kouyama.kagoshima.jp":true,"makurazaki.kagoshima.jp":true,"matsumoto.kagoshima.jp":true,"minamitane.kagoshima.jp":true,"nakatane.kagoshima.jp":true,"nishinoomote.kagoshima.jp":true,"satsumasendai.kagoshima.jp":true,"soo.kagoshima.jp":true,"tarumizu.kagoshima.jp":true,"yusui.kagoshima.jp":true,"aikawa.kanagawa.jp":true,"atsugi.kanagawa.jp":true,"ayase.kanagawa.jp":true,"chigasaki.kanagawa.jp":true,"ebina.kanagawa.jp":true,"fujisawa.kanagawa.jp":true,"hadano.kanagawa.jp":true,"hakone.kanagawa.jp":true,"hiratsuka.kanagawa.jp":true,"isehara.kanagawa.jp":true,"kaisei.kanagawa.jp":true,"kamakura.kanagawa.jp":true,"kiyokawa.kanagawa.jp":true,"matsuda.kanagawa.jp":true,"minamiashigara.kanagawa.jp":true,"miura.kanagawa.jp":true,"nakai.kanagawa.jp":true,"ninomiya.kanagawa.jp":true,"odawara.kanagawa.jp":true,"oi.kanagawa.jp":true,"oiso.kanagawa.jp":true,"sagamihara.kanagawa.jp":true,"samukawa.kanagawa.jp":true,"tsukui.kanagawa.jp":true,"yamakita.kanagawa.jp":true,"yamato.kanagawa.jp":true,"yokosuka.kanagawa.jp":true,"yugawara.kanagawa.jp":true,"zama.kanagawa.jp":true,"zushi.kanagawa.jp":true,"aki.kochi.jp":true,"geisei.kochi.jp":true,"hidaka.kochi.jp":true,"higashitsuno.kochi.jp":true,"ino.kochi.jp":true,"kagami.kochi.jp":true,"kami.kochi.jp":true,"kitagawa.kochi.jp":true,"kochi.kochi.jp":true,"mihara.kochi.jp":true,"motoyama.kochi.jp":true,"muroto.kochi.jp":true,"nahari.kochi.jp":true,"nakamura.kochi.jp":true,"nankoku.kochi.jp":true,"nishitosa.kochi.jp":true,"niyodogawa.kochi.jp":true,"ochi.kochi.jp":true,"okawa.kochi.jp":true,"otoyo.kochi.jp":true,"otsuki.kochi.jp":true,"sakawa.kochi.jp":true,"sukumo.kochi.jp":true,"susaki.kochi.jp":true,"tosa.kochi.jp":true,"tosashimizu.kochi.jp":true,"toyo.kochi.jp":true,"tsuno.kochi.jp":true,"umaji.kochi.jp":true,"yasuda.kochi.jp":true,"yusuhara.kochi.jp":true,"amakusa.kumamoto.jp":true,"arao.kumamoto.jp":true,"aso.kumamoto.jp":true,"choyo.kumamoto.jp":true,"gyokuto.kumamoto.jp":true,"hitoyoshi.kumamoto.jp":true,"kamiamakusa.kumamoto.jp":true,"kashima.kumamoto.jp":true,"kikuchi.kumamoto.jp":true,"kosa.kumamoto.jp":true,"kumamoto.kumamoto.jp":true,"mashiki.kumamoto.jp":true,"mifune.kumamoto.jp":true,"minamata.kumamoto.jp":true,"minamioguni.kumamoto.jp":true,"nagasu.kumamoto.jp":true,"nishihara.kumamoto.jp":true,"oguni.kumamoto.jp":true,"ozu.kumamoto.jp":true,"sumoto.kumamoto.jp":true,"takamori.kumamoto.jp":true,"uki.kumamoto.jp":true,"uto.kumamoto.jp":true,"yamaga.kumamoto.jp":true,"yamato.kumamoto.jp":true,"yatsushiro.kumamoto.jp":true,"ayabe.kyoto.jp":true,"fukuchiyama.kyoto.jp":true,"higashiyama.kyoto.jp":true,"ide.kyoto.jp":true,"ine.kyoto.jp":true,"joyo.kyoto.jp":true,"kameoka.kyoto.jp":true,"kamo.kyoto.jp":true,"kita.kyoto.jp":true,"kizu.kyoto.jp":true,"kumiyama.kyoto.jp":true,"kyotamba.kyoto.jp":true,"kyotanabe.kyoto.jp":true,"kyotango.kyoto.jp":true,"maizuru.kyoto.jp":true,"minami.kyoto.jp":true,"minamiyamashiro.kyoto.jp":true,"miyazu.kyoto.jp":true,"muko.kyoto.jp":true,"nagaokakyo.kyoto.jp":true,"nakagyo.kyoto.jp":true,"nantan.kyoto.jp":true,"oyamazaki.kyoto.jp":true,"sakyo.kyoto.jp":true,"seika.kyoto.jp":true,"tanabe.kyoto.jp":true,"uji.kyoto.jp":true,"ujitawara.kyoto.jp":true,"wazuka.kyoto.jp":true,"yamashina.kyoto.jp":true,"yawata.kyoto.jp":true,"asahi.mie.jp":true,"inabe.mie.jp":true,"ise.mie.jp":true,"kameyama.mie.jp":true,"kawagoe.mie.jp":true,"kiho.mie.jp":true,"kisosaki.mie.jp":true,"kiwa.mie.jp":true,"komono.mie.jp":true,"kumano.mie.jp":true,"kuwana.mie.jp":true,"matsusaka.mie.jp":true,"meiwa.mie.jp":true,"mihama.mie.jp":true,"minamiise.mie.jp":true,"misugi.mie.jp":true,"miyama.mie.jp":true,"nabari.mie.jp":true,"shima.mie.jp":true,"suzuka.mie.jp":true,"tado.mie.jp":true,"taiki.mie.jp":true,"taki.mie.jp":true,"tamaki.mie.jp":true,"toba.mie.jp":true,"tsu.mie.jp":true,"udono.mie.jp":true,"ureshino.mie.jp":true,"watarai.mie.jp":true,"yokkaichi.mie.jp":true,"furukawa.miyagi.jp":true,"higashimatsushima.miyagi.jp":true,"ishinomaki.miyagi.jp":true,"iwanuma.miyagi.jp":true,"kakuda.miyagi.jp":true,"kami.miyagi.jp":true,"kawasaki.miyagi.jp":true,"kesennuma.miyagi.jp":true,"marumori.miyagi.jp":true,"matsushima.miyagi.jp":true,"minamisanriku.miyagi.jp":true,"misato.miyagi.jp":true,"murata.miyagi.jp":true,"natori.miyagi.jp":true,"ogawara.miyagi.jp":true,"ohira.miyagi.jp":true,"onagawa.miyagi.jp":true,"osaki.miyagi.jp":true,"rifu.miyagi.jp":true,"semine.miyagi.jp":true,"shibata.miyagi.jp":true,"shichikashuku.miyagi.jp":true,"shikama.miyagi.jp":true,"shiogama.miyagi.jp":true,"shiroishi.miyagi.jp":true,"tagajo.miyagi.jp":true,"taiwa.miyagi.jp":true,"tome.miyagi.jp":true,"tomiya.miyagi.jp":true,"wakuya.miyagi.jp":true,"watari.miyagi.jp":true,"yamamoto.miyagi.jp":true,"zao.miyagi.jp":true,"aya.miyazaki.jp":true,"ebino.miyazaki.jp":true,"gokase.miyazaki.jp":true,"hyuga.miyazaki.jp":true,"kadogawa.miyazaki.jp":true,"kawaminami.miyazaki.jp":true,"kijo.miyazaki.jp":true,"kitagawa.miyazaki.jp":true,"kitakata.miyazaki.jp":true,"kitaura.miyazaki.jp":true,"kobayashi.miyazaki.jp":true,"kunitomi.miyazaki.jp":true,"kushima.miyazaki.jp":true,"mimata.miyazaki.jp":true,"miyakonojo.miyazaki.jp":true,"miyazaki.miyazaki.jp":true,"morotsuka.miyazaki.jp":true,"nichinan.miyazaki.jp":true,"nishimera.miyazaki.jp":true,"nobeoka.miyazaki.jp":true,"saito.miyazaki.jp":true,"shiiba.miyazaki.jp":true,"shintomi.miyazaki.jp":true,"takaharu.miyazaki.jp":true,"takanabe.miyazaki.jp":true,"takazaki.miyazaki.jp":true,"tsuno.miyazaki.jp":true,"achi.nagano.jp":true,"agematsu.nagano.jp":true,"anan.nagano.jp":true,"aoki.nagano.jp":true,"asahi.nagano.jp":true,"azumino.nagano.jp":true,"chikuhoku.nagano.jp":true,"chikuma.nagano.jp":true,"chino.nagano.jp":true,"fujimi.nagano.jp":true,"hakuba.nagano.jp":true,"hara.nagano.jp":true,"hiraya.nagano.jp":true,"iida.nagano.jp":true,"iijima.nagano.jp":true,"iiyama.nagano.jp":true,"iizuna.nagano.jp":true,"ikeda.nagano.jp":true,"ikusaka.nagano.jp":true,"ina.nagano.jp":true,"karuizawa.nagano.jp":true,"kawakami.nagano.jp":true,"kiso.nagano.jp":true,"kisofukushima.nagano.jp":true,"kitaaiki.nagano.jp":true,"komagane.nagano.jp":true,"komoro.nagano.jp":true,"matsukawa.nagano.jp":true,"matsumoto.nagano.jp":true,"miasa.nagano.jp":true,"minamiaiki.nagano.jp":true,"minamimaki.nagano.jp":true,"minamiminowa.nagano.jp":true,"minowa.nagano.jp":true,"miyada.nagano.jp":true,"miyota.nagano.jp":true,"mochizuki.nagano.jp":true,"nagano.nagano.jp":true,"nagawa.nagano.jp":true,"nagiso.nagano.jp":true,"nakagawa.nagano.jp":true,"nakano.nagano.jp":true,"nozawaonsen.nagano.jp":true,"obuse.nagano.jp":true,"ogawa.nagano.jp":true,"okaya.nagano.jp":true,"omachi.nagano.jp":true,"omi.nagano.jp":true,"ookuwa.nagano.jp":true,"ooshika.nagano.jp":true,"otaki.nagano.jp":true,"otari.nagano.jp":true,"sakae.nagano.jp":true,"sakaki.nagano.jp":true,"saku.nagano.jp":true,"sakuho.nagano.jp":true,"shimosuwa.nagano.jp":true,"shinanomachi.nagano.jp":true,"shiojiri.nagano.jp":true,"suwa.nagano.jp":true,"suzaka.nagano.jp":true,"takagi.nagano.jp":true,"takamori.nagano.jp":true,"takayama.nagano.jp":true,"tateshina.nagano.jp":true,"tatsuno.nagano.jp":true,"togakushi.nagano.jp":true,"togura.nagano.jp":true,"tomi.nagano.jp":true,"ueda.nagano.jp":true,"wada.nagano.jp":true,"yamagata.nagano.jp":true,"yamanouchi.nagano.jp":true,"yasaka.nagano.jp":true,"yasuoka.nagano.jp":true,"chijiwa.nagasaki.jp":true,"futsu.nagasaki.jp":true,"goto.nagasaki.jp":true,"hasami.nagasaki.jp":true,"hirado.nagasaki.jp":true,"iki.nagasaki.jp":true,"isahaya.nagasaki.jp":true,"kawatana.nagasaki.jp":true,"kuchinotsu.nagasaki.jp":true,"matsuura.nagasaki.jp":true,"nagasaki.nagasaki.jp":true,"obama.nagasaki.jp":true,"omura.nagasaki.jp":true,"oseto.nagasaki.jp":true,"saikai.nagasaki.jp":true,"sasebo.nagasaki.jp":true,"seihi.nagasaki.jp":true,"shimabara.nagasaki.jp":true,"shinkamigoto.nagasaki.jp":true,"togitsu.nagasaki.jp":true,"tsushima.nagasaki.jp":true,"unzen.nagasaki.jp":true,"ando.nara.jp":true,"gose.nara.jp":true,"heguri.nara.jp":true,"higashiyoshino.nara.jp":true,"ikaruga.nara.jp":true,"ikoma.nara.jp":true,"kamikitayama.nara.jp":true,"kanmaki.nara.jp":true,"kashiba.nara.jp":true,"kashihara.nara.jp":true,"katsuragi.nara.jp":true,"kawai.nara.jp":true,"kawakami.nara.jp":true,"kawanishi.nara.jp":true,"koryo.nara.jp":true,"kurotaki.nara.jp":true,"mitsue.nara.jp":true,"miyake.nara.jp":true,"nara.nara.jp":true,"nosegawa.nara.jp":true,"oji.nara.jp":true,"ouda.nara.jp":true,"oyodo.nara.jp":true,"sakurai.nara.jp":true,"sango.nara.jp":true,"shimoichi.nara.jp":true,"shimokitayama.nara.jp":true,"shinjo.nara.jp":true,"soni.nara.jp":true,"takatori.nara.jp":true,"tawaramoto.nara.jp":true,"tenkawa.nara.jp":true,"tenri.nara.jp":true,"uda.nara.jp":true,"yamatokoriyama.nara.jp":true,"yamatotakada.nara.jp":true,"yamazoe.nara.jp":true,"yoshino.nara.jp":true,"aga.niigata.jp":true,"agano.niigata.jp":true,"gosen.niigata.jp":true,"itoigawa.niigata.jp":true,"izumozaki.niigata.jp":true,"joetsu.niigata.jp":true,"kamo.niigata.jp":true,"kariwa.niigata.jp":true,"kashiwazaki.niigata.jp":true,"minamiuonuma.niigata.jp":true,"mitsuke.niigata.jp":true,"muika.niigata.jp":true,"murakami.niigata.jp":true,"myoko.niigata.jp":true,"nagaoka.niigata.jp":true,"niigata.niigata.jp":true,"ojiya.niigata.jp":true,"omi.niigata.jp":true,"sado.niigata.jp":true,"sanjo.niigata.jp":true,"seiro.niigata.jp":true,"seirou.niigata.jp":true,"sekikawa.niigata.jp":true,"shibata.niigata.jp":true,"tagami.niigata.jp":true,"tainai.niigata.jp":true,"tochio.niigata.jp":true,"tokamachi.niigata.jp":true,"tsubame.niigata.jp":true,"tsunan.niigata.jp":true,"uonuma.niigata.jp":true,"yahiko.niigata.jp":true,"yoita.niigata.jp":true,"yuzawa.niigata.jp":true,"beppu.oita.jp":true,"bungoono.oita.jp":true,"bungotakada.oita.jp":true,"hasama.oita.jp":true,"hiji.oita.jp":true,"himeshima.oita.jp":true,"hita.oita.jp":true,"kamitsue.oita.jp":true,"kokonoe.oita.jp":true,"kuju.oita.jp":true,"kunisaki.oita.jp":true,"kusu.oita.jp":true,"oita.oita.jp":true,"saiki.oita.jp":true,"taketa.oita.jp":true,"tsukumi.oita.jp":true,"usa.oita.jp":true,"usuki.oita.jp":true,"yufu.oita.jp":true,"akaiwa.okayama.jp":true,"asakuchi.okayama.jp":true,"bizen.okayama.jp":true,"hayashima.okayama.jp":true,"ibara.okayama.jp":true,"kagamino.okayama.jp":true,"kasaoka.okayama.jp":true,"kibichuo.okayama.jp":true,"kumenan.okayama.jp":true,"kurashiki.okayama.jp":true,"maniwa.okayama.jp":true,"misaki.okayama.jp":true,"nagi.okayama.jp":true,"niimi.okayama.jp":true,"nishiawakura.okayama.jp":true,"okayama.okayama.jp":true,"satosho.okayama.jp":true,"setouchi.okayama.jp":true,"shinjo.okayama.jp":true,"shoo.okayama.jp":true,"soja.okayama.jp":true,"takahashi.okayama.jp":true,"tamano.okayama.jp":true,"tsuyama.okayama.jp":true,"wake.okayama.jp":true,"yakage.okayama.jp":true,"aguni.okinawa.jp":true,"ginowan.okinawa.jp":true,"ginoza.okinawa.jp":true,"gushikami.okinawa.jp":true,"haebaru.okinawa.jp":true,"higashi.okinawa.jp":true,"hirara.okinawa.jp":true,"iheya.okinawa.jp":true,"ishigaki.okinawa.jp":true,"ishikawa.okinawa.jp":true,"itoman.okinawa.jp":true,"izena.okinawa.jp":true,"kadena.okinawa.jp":true,"kin.okinawa.jp":true,"kitadaito.okinawa.jp":true,"kitanakagusuku.okinawa.jp":true,"kumejima.okinawa.jp":true,"kunigami.okinawa.jp":true,"minamidaito.okinawa.jp":true,"motobu.okinawa.jp":true,"nago.okinawa.jp":true,"naha.okinawa.jp":true,"nakagusuku.okinawa.jp":true,"nakijin.okinawa.jp":true,"nanjo.okinawa.jp":true,"nishihara.okinawa.jp":true,"ogimi.okinawa.jp":true,"okinawa.okinawa.jp":true,"onna.okinawa.jp":true,"shimoji.okinawa.jp":true,"taketomi.okinawa.jp":true,"tarama.okinawa.jp":true,"tokashiki.okinawa.jp":true,"tomigusuku.okinawa.jp":true,"tonaki.okinawa.jp":true,"urasoe.okinawa.jp":true,"uruma.okinawa.jp":true,"yaese.okinawa.jp":true,"yomitan.okinawa.jp":true,"yonabaru.okinawa.jp":true,"yonaguni.okinawa.jp":true,"zamami.okinawa.jp":true,"abeno.osaka.jp":true,"chihayaakasaka.osaka.jp":true,"chuo.osaka.jp":true,"daito.osaka.jp":true,"fujiidera.osaka.jp":true,"habikino.osaka.jp":true,"hannan.osaka.jp":true,"higashiosaka.osaka.jp":true,"higashisumiyoshi.osaka.jp":true,"higashiyodogawa.osaka.jp":true,"hirakata.osaka.jp":true,"ibaraki.osaka.jp":true,"ikeda.osaka.jp":true,"izumi.osaka.jp":true,"izumiotsu.osaka.jp":true,"izumisano.osaka.jp":true,"kadoma.osaka.jp":true,"kaizuka.osaka.jp":true,"kanan.osaka.jp":true,"kashiwara.osaka.jp":true,"katano.osaka.jp":true,"kawachinagano.osaka.jp":true,"kishiwada.osaka.jp":true,"kita.osaka.jp":true,"kumatori.osaka.jp":true,"matsubara.osaka.jp":true,"minato.osaka.jp":true,"minoh.osaka.jp":true,"misaki.osaka.jp":true,"moriguchi.osaka.jp":true,"neyagawa.osaka.jp":true,"nishi.osaka.jp":true,"nose.osaka.jp":true,"osakasayama.osaka.jp":true,"sakai.osaka.jp":true,"sayama.osaka.jp":true,"sennan.osaka.jp":true,"settsu.osaka.jp":true,"shijonawate.osaka.jp":true,"shimamoto.osaka.jp":true,"suita.osaka.jp":true,"tadaoka.osaka.jp":true,"taishi.osaka.jp":true,"tajiri.osaka.jp":true,"takaishi.osaka.jp":true,"takatsuki.osaka.jp":true,"tondabayashi.osaka.jp":true,"toyonaka.osaka.jp":true,"toyono.osaka.jp":true,"yao.osaka.jp":true,"ariake.saga.jp":true,"arita.saga.jp":true,"fukudomi.saga.jp":true,"genkai.saga.jp":true,"hamatama.saga.jp":true,"hizen.saga.jp":true,"imari.saga.jp":true,"kamimine.saga.jp":true,"kanzaki.saga.jp":true,"karatsu.saga.jp":true,"kashima.saga.jp":true,"kitagata.saga.jp":true,"kitahata.saga.jp":true,"kiyama.saga.jp":true,"kouhoku.saga.jp":true,"kyuragi.saga.jp":true,"nishiarita.saga.jp":true,"ogi.saga.jp":true,"omachi.saga.jp":true,"ouchi.saga.jp":true,"saga.saga.jp":true,"shiroishi.saga.jp":true,"taku.saga.jp":true,"tara.saga.jp":true,"tosu.saga.jp":true,"yoshinogari.saga.jp":true,"arakawa.saitama.jp":true,"asaka.saitama.jp":true,"chichibu.saitama.jp":true,"fujimi.saitama.jp":true,"fujimino.saitama.jp":true,"fukaya.saitama.jp":true,"hanno.saitama.jp":true,"hanyu.saitama.jp":true,"hasuda.saitama.jp":true,"hatogaya.saitama.jp":true,"hatoyama.saitama.jp":true,"hidaka.saitama.jp":true,"higashichichibu.saitama.jp":true,"higashimatsuyama.saitama.jp":true,"honjo.saitama.jp":true,"ina.saitama.jp":true,"iruma.saitama.jp":true,"iwatsuki.saitama.jp":true,"kamiizumi.saitama.jp":true,"kamikawa.saitama.jp":true,"kamisato.saitama.jp":true,"kasukabe.saitama.jp":true,"kawagoe.saitama.jp":true,"kawaguchi.saitama.jp":true,"kawajima.saitama.jp":true,"kazo.saitama.jp":true,"kitamoto.saitama.jp":true,"koshigaya.saitama.jp":true,"kounosu.saitama.jp":true,"kuki.saitama.jp":true,"kumagaya.saitama.jp":true,"matsubushi.saitama.jp":true,"minano.saitama.jp":true,"misato.saitama.jp":true,"miyashiro.saitama.jp":true,"miyoshi.saitama.jp":true,"moroyama.saitama.jp":true,"nagatoro.saitama.jp":true,"namegawa.saitama.jp":true,"niiza.saitama.jp":true,"ogano.saitama.jp":true,"ogawa.saitama.jp":true,"ogose.saitama.jp":true,"okegawa.saitama.jp":true,"omiya.saitama.jp":true,"otaki.saitama.jp":true,"ranzan.saitama.jp":true,"ryokami.saitama.jp":true,"saitama.saitama.jp":true,"sakado.saitama.jp":true,"satte.saitama.jp":true,"sayama.saitama.jp":true,"shiki.saitama.jp":true,"shiraoka.saitama.jp":true,"soka.saitama.jp":true,"sugito.saitama.jp":true,"toda.saitama.jp":true,"tokigawa.saitama.jp":true,"tokorozawa.saitama.jp":true,"tsurugashima.saitama.jp":true,"urawa.saitama.jp":true,"warabi.saitama.jp":true,"yashio.saitama.jp":true,"yokoze.saitama.jp":true,"yono.saitama.jp":true,"yorii.saitama.jp":true,"yoshida.saitama.jp":true,"yoshikawa.saitama.jp":true,"yoshimi.saitama.jp":true,"aisho.shiga.jp":true,"gamo.shiga.jp":true,"higashiomi.shiga.jp":true,"hikone.shiga.jp":true,"koka.shiga.jp":true,"konan.shiga.jp":true,"kosei.shiga.jp":true,"koto.shiga.jp":true,"kusatsu.shiga.jp":true,"maibara.shiga.jp":true,"moriyama.shiga.jp":true,"nagahama.shiga.jp":true,"nishiazai.shiga.jp":true,"notogawa.shiga.jp":true,"omihachiman.shiga.jp":true,"otsu.shiga.jp":true,"ritto.shiga.jp":true,"ryuoh.shiga.jp":true,"takashima.shiga.jp":true,"takatsuki.shiga.jp":true,"torahime.shiga.jp":true,"toyosato.shiga.jp":true,"yasu.shiga.jp":true,"akagi.shimane.jp":true,"ama.shimane.jp":true,"gotsu.shimane.jp":true,"hamada.shimane.jp":true,"higashiizumo.shimane.jp":true,"hikawa.shimane.jp":true,"hikimi.shimane.jp":true,"izumo.shimane.jp":true,"kakinoki.shimane.jp":true,"masuda.shimane.jp":true,"matsue.shimane.jp":true,"misato.shimane.jp":true,"nishinoshima.shimane.jp":true,"ohda.shimane.jp":true,"okinoshima.shimane.jp":true,"okuizumo.shimane.jp":true,"shimane.shimane.jp":true,"tamayu.shimane.jp":true,"tsuwano.shimane.jp":true,"unnan.shimane.jp":true,"yakumo.shimane.jp":true,"yasugi.shimane.jp":true,"yatsuka.shimane.jp":true,"arai.shizuoka.jp":true,"atami.shizuoka.jp":true,"fuji.shizuoka.jp":true,"fujieda.shizuoka.jp":true,"fujikawa.shizuoka.jp":true,"fujinomiya.shizuoka.jp":true,"fukuroi.shizuoka.jp":true,"gotemba.shizuoka.jp":true,"haibara.shizuoka.jp":true,"hamamatsu.shizuoka.jp":true,"higashiizu.shizuoka.jp":true,"ito.shizuoka.jp":true,"iwata.shizuoka.jp":true,"izu.shizuoka.jp":true,"izunokuni.shizuoka.jp":true,"kakegawa.shizuoka.jp":true,"kannami.shizuoka.jp":true,"kawanehon.shizuoka.jp":true,"kawazu.shizuoka.jp":true,"kikugawa.shizuoka.jp":true,"kosai.shizuoka.jp":true,"makinohara.shizuoka.jp":true,"matsuzaki.shizuoka.jp":true,"minamiizu.shizuoka.jp":true,"mishima.shizuoka.jp":true,"morimachi.shizuoka.jp":true,"nishiizu.shizuoka.jp":true,"numazu.shizuoka.jp":true,"omaezaki.shizuoka.jp":true,"shimada.shizuoka.jp":true,"shimizu.shizuoka.jp":true,"shimoda.shizuoka.jp":true,"shizuoka.shizuoka.jp":true,"susono.shizuoka.jp":true,"yaizu.shizuoka.jp":true,"yoshida.shizuoka.jp":true,"ashikaga.tochigi.jp":true,"bato.tochigi.jp":true,"haga.tochigi.jp":true,"ichikai.tochigi.jp":true,"iwafune.tochigi.jp":true,"kaminokawa.tochigi.jp":true,"kanuma.tochigi.jp":true,"karasuyama.tochigi.jp":true,"kuroiso.tochigi.jp":true,"mashiko.tochigi.jp":true,"mibu.tochigi.jp":true,"moka.tochigi.jp":true,"motegi.tochigi.jp":true,"nasu.tochigi.jp":true,"nasushiobara.tochigi.jp":true,"nikko.tochigi.jp":true,"nishikata.tochigi.jp":true,"nogi.tochigi.jp":true,"ohira.tochigi.jp":true,"ohtawara.tochigi.jp":true,"oyama.tochigi.jp":true,"sakura.tochigi.jp":true,"sano.tochigi.jp":true,"shimotsuke.tochigi.jp":true,"shioya.tochigi.jp":true,"takanezawa.tochigi.jp":true,"tochigi.tochigi.jp":true,"tsuga.tochigi.jp":true,"ujiie.tochigi.jp":true,"utsunomiya.tochigi.jp":true,"yaita.tochigi.jp":true,"aizumi.tokushima.jp":true,"anan.tokushima.jp":true,"ichiba.tokushima.jp":true,"itano.tokushima.jp":true,"kainan.tokushima.jp":true,"komatsushima.tokushima.jp":true,"matsushige.tokushima.jp":true,"mima.tokushima.jp":true,"minami.tokushima.jp":true,"miyoshi.tokushima.jp":true,"mugi.tokushima.jp":true,"nakagawa.tokushima.jp":true,"naruto.tokushima.jp":true,"sanagochi.tokushima.jp":true,"shishikui.tokushima.jp":true,"tokushima.tokushima.jp":true,"wajiki.tokushima.jp":true,"adachi.tokyo.jp":true,"akiruno.tokyo.jp":true,"akishima.tokyo.jp":true,"aogashima.tokyo.jp":true,"arakawa.tokyo.jp":true,"bunkyo.tokyo.jp":true,"chiyoda.tokyo.jp":true,"chofu.tokyo.jp":true,"chuo.tokyo.jp":true,"edogawa.tokyo.jp":true,"fuchu.tokyo.jp":true,"fussa.tokyo.jp":true,"hachijo.tokyo.jp":true,"hachioji.tokyo.jp":true,"hamura.tokyo.jp":true,"higashikurume.tokyo.jp":true,"higashimurayama.tokyo.jp":true,"higashiyamato.tokyo.jp":true,"hino.tokyo.jp":true,"hinode.tokyo.jp":true,"hinohara.tokyo.jp":true,"inagi.tokyo.jp":true,"itabashi.tokyo.jp":true,"katsushika.tokyo.jp":true,"kita.tokyo.jp":true,"kiyose.tokyo.jp":true,"kodaira.tokyo.jp":true,"koganei.tokyo.jp":true,"kokubunji.tokyo.jp":true,"komae.tokyo.jp":true,"koto.tokyo.jp":true,"kouzushima.tokyo.jp":true,"kunitachi.tokyo.jp":true,"machida.tokyo.jp":true,"meguro.tokyo.jp":true,"minato.tokyo.jp":true,"mitaka.tokyo.jp":true,"mizuho.tokyo.jp":true,"musashimurayama.tokyo.jp":true,"musashino.tokyo.jp":true,"nakano.tokyo.jp":true,"nerima.tokyo.jp":true,"ogasawara.tokyo.jp":true,"okutama.tokyo.jp":true,"ome.tokyo.jp":true,"oshima.tokyo.jp":true,"ota.tokyo.jp":true,"setagaya.tokyo.jp":true,"shibuya.tokyo.jp":true,"shinagawa.tokyo.jp":true,"shinjuku.tokyo.jp":true,"suginami.tokyo.jp":true,"sumida.tokyo.jp":true,"tachikawa.tokyo.jp":true,"taito.tokyo.jp":true,"tama.tokyo.jp":true,"toshima.tokyo.jp":true,"chizu.tottori.jp":true,"hino.tottori.jp":true,"kawahara.tottori.jp":true,"koge.tottori.jp":true,"kotoura.tottori.jp":true,"misasa.tottori.jp":true,"nanbu.tottori.jp":true,"nichinan.tottori.jp":true,"sakaiminato.tottori.jp":true,"tottori.tottori.jp":true,"wakasa.tottori.jp":true,"yazu.tottori.jp":true,"yonago.tottori.jp":true,"asahi.toyama.jp":true,"fuchu.toyama.jp":true,"fukumitsu.toyama.jp":true,"funahashi.toyama.jp":true,"himi.toyama.jp":true,"imizu.toyama.jp":true,"inami.toyama.jp":true,"johana.toyama.jp":true,"kamiichi.toyama.jp":true,"kurobe.toyama.jp":true,"nakaniikawa.toyama.jp":true,"namerikawa.toyama.jp":true,"nanto.toyama.jp":true,"nyuzen.toyama.jp":true,"oyabe.toyama.jp":true,"taira.toyama.jp":true,"takaoka.toyama.jp":true,"tateyama.toyama.jp":true,"toga.toyama.jp":true,"tonami.toyama.jp":true,"toyama.toyama.jp":true,"unazuki.toyama.jp":true,"uozu.toyama.jp":true,"yamada.toyama.jp":true,"arida.wakayama.jp":true,"aridagawa.wakayama.jp":true,"gobo.wakayama.jp":true,"hashimoto.wakayama.jp":true,"hidaka.wakayama.jp":true,"hirogawa.wakayama.jp":true,"inami.wakayama.jp":true,"iwade.wakayama.jp":true,"kainan.wakayama.jp":true,"kamitonda.wakayama.jp":true,"katsuragi.wakayama.jp":true,"kimino.wakayama.jp":true,"kinokawa.wakayama.jp":true,"kitayama.wakayama.jp":true,"koya.wakayama.jp":true,"koza.wakayama.jp":true,"kozagawa.wakayama.jp":true,"kudoyama.wakayama.jp":true,"kushimoto.wakayama.jp":true,"mihama.wakayama.jp":true,"misato.wakayama.jp":true,"nachikatsuura.wakayama.jp":true,"shingu.wakayama.jp":true,"shirahama.wakayama.jp":true,"taiji.wakayama.jp":true,"tanabe.wakayama.jp":true,"wakayama.wakayama.jp":true,"yuasa.wakayama.jp":true,"yura.wakayama.jp":true,"asahi.yamagata.jp":true,"funagata.yamagata.jp":true,"higashine.yamagata.jp":true,"iide.yamagata.jp":true,"kahoku.yamagata.jp":true,"kaminoyama.yamagata.jp":true,"kaneyama.yamagata.jp":true,"kawanishi.yamagata.jp":true,"mamurogawa.yamagata.jp":true,"mikawa.yamagata.jp":true,"murayama.yamagata.jp":true,"nagai.yamagata.jp":true,"nakayama.yamagata.jp":true,"nanyo.yamagata.jp":true,"nishikawa.yamagata.jp":true,"obanazawa.yamagata.jp":true,"oe.yamagata.jp":true,"oguni.yamagata.jp":true,"ohkura.yamagata.jp":true,"oishida.yamagata.jp":true,"sagae.yamagata.jp":true,"sakata.yamagata.jp":true,"sakegawa.yamagata.jp":true,"shinjo.yamagata.jp":true,"shirataka.yamagata.jp":true,"shonai.yamagata.jp":true,"takahata.yamagata.jp":true,"tendo.yamagata.jp":true,"tozawa.yamagata.jp":true,"tsuruoka.yamagata.jp":true,"yamagata.yamagata.jp":true,"yamanobe.yamagata.jp":true,"yonezawa.yamagata.jp":true,"yuza.yamagata.jp":true,"abu.yamaguchi.jp":true,"hagi.yamaguchi.jp":true,"hikari.yamaguchi.jp":true,"hofu.yamaguchi.jp":true,"iwakuni.yamaguchi.jp":true,"kudamatsu.yamaguchi.jp":true,"mitou.yamaguchi.jp":true,"nagato.yamaguchi.jp":true,"oshima.yamaguchi.jp":true,"shimonoseki.yamaguchi.jp":true,"shunan.yamaguchi.jp":true,"tabuse.yamaguchi.jp":true,"tokuyama.yamaguchi.jp":true,"toyota.yamaguchi.jp":true,"ube.yamaguchi.jp":true,"yuu.yamaguchi.jp":true,"chuo.yamanashi.jp":true,"doshi.yamanashi.jp":true,"fuefuki.yamanashi.jp":true,"fujikawa.yamanashi.jp":true,"fujikawaguchiko.yamanashi.jp":true,"fujiyoshida.yamanashi.jp":true,"hayakawa.yamanashi.jp":true,"hokuto.yamanashi.jp":true,"ichikawamisato.yamanashi.jp":true,"kai.yamanashi.jp":true,"kofu.yamanashi.jp":true,"koshu.yamanashi.jp":true,"kosuge.yamanashi.jp":true,"minami-alps.yamanashi.jp":true,"minobu.yamanashi.jp":true,"nakamichi.yamanashi.jp":true,"nanbu.yamanashi.jp":true,"narusawa.yamanashi.jp":true,"nirasaki.yamanashi.jp":true,"nishikatsura.yamanashi.jp":true,"oshino.yamanashi.jp":true,"otsuki.yamanashi.jp":true,"showa.yamanashi.jp":true,"tabayama.yamanashi.jp":true,"tsuru.yamanashi.jp":true,"uenohara.yamanashi.jp":true,"yamanakako.yamanashi.jp":true,"yamanashi.yamanashi.jp":true,"*.ke":true,kg:true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,ki:true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,km:true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,kn:true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,kp:true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,kr:true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,ky:true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,kz:true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,la:true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,lb:true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,lc:true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,li:true,lk:true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"ac.lk":true,lr:true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,ls:true,"co.ls":true,"org.ls":true,lt:true,"gov.lt":true,lu:true,lv:true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,ly:true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,ma:true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,mc:true,"tm.mc":true,"asso.mc":true,md:true,me:true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,mg:true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"co.mg":true,mh:true,mil:true,mk:true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,ml:true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,mn:true,"gov.mn":true,"edu.mn":true,"org.mn":true,mo:true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,mobi:true,mp:true,mq:true,mr:true,"gov.mr":true,ms:true,"com.ms":true,"edu.ms":true,"gov.ms":true,"net.ms":true,"org.ms":true,mt:true,"com.mt":true,"edu.mt":true,"net.mt":true,"org.mt":true,mu:true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,museum:true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,mv:true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,mw:true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,mx:true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,my:true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"teledata.mz":false,na:true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,name:true,nc:true,"asso.nc":true,ne:true,net:true,nf:true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,ng:true,"com.ng":true,"edu.ng":true,"name.ng":true,"net.ng":true,"org.ng":true,"sch.ng":true,"gov.ng":true,"mil.ng":true,"mobi.ng":true,"*.ni":true,nl:true,"bv.nl":true,no:true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,nr:true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,nu:true,nz:true,"ac.nz":true,"co.nz":true,"cri.nz":true,"geek.nz":true,"gen.nz":true,"govt.nz":true,"health.nz":true,"iwi.nz":true,"kiwi.nz":true,"maori.nz":true,"mil.nz":true,"xn--mori-qsa.nz":true,"net.nz":true,"org.nz":true,"parliament.nz":true,"school.nz":true,om:true,"co.om":true,"com.om":true,"edu.om":true,"gov.om":true,"med.om":true,"museum.om":true,"net.om":true,"org.om":true,"pro.om":true,org:true,pa:true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,pe:true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,pf:true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,ph:true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,pk:true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,pl:true,"com.pl":true,"net.pl":true,"org.pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"gov.pl":true,"ap.gov.pl":true,"ic.gov.pl":true,"is.gov.pl":true,"us.gov.pl":true,"kmpsp.gov.pl":true,"kppsp.gov.pl":true,"kwpsp.gov.pl":true,"psp.gov.pl":true,"wskr.gov.pl":true,"kwp.gov.pl":true,"mw.gov.pl":true,"ug.gov.pl":true,"um.gov.pl":true,"umig.gov.pl":true,"ugim.gov.pl":true,"upow.gov.pl":true,"uw.gov.pl":true,"starostwo.gov.pl":true,"pa.gov.pl":true,"po.gov.pl":true,"psse.gov.pl":true,"pup.gov.pl":true,"rzgw.gov.pl":true,"sa.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"wsa.gov.pl":true,"sko.gov.pl":true,"uzs.gov.pl":true,"wiih.gov.pl":true,"winb.gov.pl":true,"pinb.gov.pl":true,"wios.gov.pl":true,"witd.gov.pl":true,"wzmiuw.gov.pl":true,"piw.gov.pl":true,"wiw.gov.pl":true,"griw.gov.pl":true,"wif.gov.pl":true,"oum.gov.pl":true,"sdn.gov.pl":true,"zp.gov.pl":true,"uppo.gov.pl":true,"mup.gov.pl":true,"wuoz.gov.pl":true,"konsulat.gov.pl":true,"oirm.gov.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,pm:true,pn:true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,post:true,pr:true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,pro:true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,ps:true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,pt:true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,pw:true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,py:true,"com.py":true,"coop.py":true,"edu.py":true,"gov.py":true,"mil.py":true,"net.py":true,"org.py":true,qa:true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,re:true,"com.re":true,"asso.re":true,"nom.re":true,ro:true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,rs:true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,ru:true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,rw:true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,sa:true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,sb:true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,sc:true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,sd:true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"tv.sd":true,"gov.sd":true,"info.sd":true,se:true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,sg:true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,sh:true,"com.sh":true,"net.sh":true,"gov.sh":true,"org.sh":true,"mil.sh":true,si:true,sj:true,sk:true,sl:true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,sm:true,sn:true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,so:true,"com.so":true,"net.so":true,"org.so":true,sr:true,st:true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,su:true,"adygeya.su":true,"arkhangelsk.su":true,"balashov.su":true,"bashkiria.su":true,"bryansk.su":true,"dagestan.su":true,"grozny.su":true,"ivanovo.su":true,"kalmykia.su":true,"kaluga.su":true,"karelia.su":true,"khakassia.su":true,"krasnodar.su":true,"kurgan.su":true,"lenug.su":true,"mordovia.su":true,"msk.su":true,"murmansk.su":true,"nalchik.su":true,"nov.su":true,"obninsk.su":true,"penza.su":true,"pokrovsk.su":true,"sochi.su":true,"spb.su":true,"togliatti.su":true,"troitsk.su":true,"tula.su":true,"tuva.su":true,"vladikavkaz.su":true,"vladimir.su":true,"vologda.su":true,sv:true,"com.sv":true,"edu.sv":true,"gob.sv":true,"org.sv":true,"red.sv":true,sx:true,"gov.sx":true,sy:true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,sz:true,"co.sz":true,"ac.sz":true,"org.sz":true,tc:true,td:true,tel:true,tf:true,tg:true,th:true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,tj:true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,tk:true,tl:true,"gov.tl":true,tm:true,"com.tm":true,"co.tm":true,"org.tm":true,"net.tm":true,"nom.tm":true,"gov.tm":true,"mil.tm":true,"edu.tm":true,tn:true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,to:true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,tp:true,tr:true,"com.tr":true,"info.tr":true,"biz.tr":true,"net.tr":true,"org.tr":true,"web.tr":true,"gen.tr":true,"tv.tr":true,"av.tr":true,"dr.tr":true,"bbs.tr":true,"name.tr":true,"tel.tr":true,"gov.tr":true,"bel.tr":true,"pol.tr":true,"mil.tr":true,"k12.tr":true,"edu.tr":true,"kep.tr":true,"nc.tr":true,"gov.nc.tr":true,travel:true,tt:true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,tv:true,tw:true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,tz:true,"ac.tz":true,"co.tz":true,"go.tz":true,"hotel.tz":true,"info.tz":true,"me.tz":true,"mil.tz":true,"mobi.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"tv.tz":true,ua:true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"cherkasy.ua":true,"chernigov.ua":true,"chernihiv.ua":true,"chernivtsi.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"cr.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"dnipropetrovsk.ua":true,"dominic.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkiv.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"khmelnytskyi.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"krym.ua":true,"ks.ua":true,"kv.ua":true,"kyiv.ua":true,"lg.ua":true,"lt.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lv.ua":true,"lviv.ua":true,"mk.ua":true,"mykolaiv.ua":true,"nikolaev.ua":true,"od.ua":true,"odesa.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rivne.ua":true,"rovno.ua":true,"rv.ua":true,"sb.ua":true,"sebastopol.ua":true,"sevastopol.ua":true,"sm.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uz.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vinnytsia.ua":true,"vn.ua":true,"volyn.ua":true,"yalta.ua":true,"zaporizhzhe.ua":true,"zaporizhzhia.ua":true,"zhitomir.ua":true,"zhytomyr.ua":true,"zp.ua":true,"zt.ua":true,ug:true,"co.ug":true,"or.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"com.ug":true,"org.ug":true,uk:true,"ac.uk":true,"co.uk":true,"gov.uk":true,"ltd.uk":true,"me.uk":true,"net.uk":true,"nhs.uk":true,"org.uk":true,"plc.uk":true,"police.uk":true,"*.sch.uk":true,us:true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,uy:true,"com.uy":true,"edu.uy":true,"gub.uy":true,"mil.uy":true,"net.uy":true,"org.uy":true,uz:true,"co.uz":true,"com.uz":true,"net.uz":true,"org.uz":true,va:true,vc:true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,ve:true,"arts.ve":true,"co.ve":true,"com.ve":true,"e12.ve":true,"edu.ve":true,"firm.ve":true,"gob.ve":true,"gov.ve":true,"info.ve":true,"int.ve":true,"mil.ve":true,"net.ve":true,"org.ve":true,"rec.ve":true,"store.ve":true,"tec.ve":true,"web.ve":true,vg:true,vi:true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,vn:true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,vu:true,"com.vu":true,"edu.vu":true,"net.vu":true,"org.vu":true,wf:true,ws:true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,yt:true,"xn--mgbaam7a8h":true,"xn--y9a3aq":true,"xn--54b7fta0cc":true,"xn--90ais":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--qxam":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbtx2b":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--80ao21a":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--d1alf":true,"xn--l1acc":true,"xn--mix891f":true,"xn--mix082f":true,"xn--mgbx4cd0ab":true,"xn--mgb9awbf":true,"xn--mgbai9azgqp6j":true,"xn--mgbai9a5eva00b":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--o1ac.xn--90a3ac":true,"xn--c1avg.xn--90a3ac":true,"xn--90azh.xn--90a3ac":true,"xn--d1at.xn--90a3ac":true,"xn--o1ach.xn--90a3ac":true,"xn--80au.xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--mgbpl2fh":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,xxx:true,"*.ye":true,"ac.za":true,"agrica.za":true,"alt.za":true,"co.za":true,"edu.za":true,"gov.za":true,"grondar.za":true,"law.za":true,"mil.za":true,"net.za":true,"ngo.za":true,"nis.za":true,"nom.za":true,"org.za":true,"school.za":true,"tm.za":true,"web.za":true,"*.zm":true,"*.zw":true,aaa:true,aarp:true,abarth:true,abb:true,abbott:true,abbvie:true,abc:true,able:true,abogado:true,abudhabi:true,academy:true,accenture:true,accountant:true,accountants:true,aco:true,active:true,actor:true,adac:true,ads:true,adult:true,aeg:true,aetna:true,afamilycompany:true,afl:true,africa:true,africamagic:true,agakhan:true,agency:true,aig:true,aigo:true,airbus:true,airforce:true,airtel:true,akdn:true,alfaromeo:true,alibaba:true,alipay:true,allfinanz:true,allstate:true,ally:true,alsace:true,alstom:true,americanexpress:true,americanfamily:true,amex:true,amfam:true,amica:true,amsterdam:true,analytics:true,android:true,anquan:true,anz:true,aol:true,apartments:true,app:true,apple:true,aquarelle:true,aramco:true,archi:true,army:true,arte:true,asda:true,associates:true,athleta:true,attorney:true,auction:true,audi:true,audible:true,audio:true,auspost:true,author:true,auto:true,autos:true,avianca:true,aws:true,axa:true,azure:true,baby:true,baidu:true,banamex:true,bananarepublic:true,band:true,bank:true,bar:true,barcelona:true,barclaycard:true,barclays:true,barefoot:true,bargains:true,basketball:true,bauhaus:true,bayern:true,bbc:true,bbt:true,bbva:true,bcg:true,bcn:true,beats:true,beer:true,bentley:true,berlin:true,best:true,bestbuy:true,bet:true,bharti:true,bible:true,bid:true,bike:true,bing:true,bingo:true,bio:true,black:true,blackfriday:true,blanco:true,blockbuster:true,blog:true,bloomberg:true,blue:true,bms:true,bmw:true,bnl:true,bnpparibas:true,boats:true,boehringer:true,bofa:true,bom:true,bond:true,boo:true,book:true,booking:true,boots:true,bosch:true,bostik:true,bot:true,boutique:true,bradesco:true,bridgestone:true,broadway:true,broker:true,brother:true,brussels:true,budapest:true,bugatti:true,build:true,builders:true,business:true,buy:true,buzz:true,bzh:true,cab:true,cafe:true,cal:true,call:true,calvinklein:true,camera:true,camp:true,cancerresearch:true,canon:true,capetown:true,capital:true,capitalone:true,car:true,caravan:true,cards:true,care:true,career:true,careers:true,cars:true,cartier:true,casa:true,"case":true,caseih:true,cash:true,casino:true,catering:true,cba:true,cbn:true,cbre:true,cbs:true,ceb:true,center:true,ceo:true,cern:true,cfa:true,cfd:true,chanel:true,channel:true,chase:true,chat:true,cheap:true,chintai:true,chloe:true,christmas:true,chrome:true,chrysler:true,church:true,cipriani:true,circle:true,cisco:true,citadel:true,citi:true,citic:true,city:true,cityeats:true,claims:true,cleaning:true,click:true,clinic:true,clothing:true,cloud:true,club:true,clubmed:true,coach:true,codes:true,coffee:true,college:true,cologne:true,comcast:true,commbank:true,community:true,company:true,computer:true,comsec:true,condos:true,construction:true,consulting:true,contact:true,contractors:true,cooking:true,cookingchannel:true,cool:true,corsica:true,country:true,coupon:true,coupons:true,courses:true,credit:true,creditcard:true,creditunion:true,cricket:true,crown:true,crs:true,cruises:true,csc:true,cuisinella:true,cymru:true,cyou:true,dabur:true,dad:true,dance:true,date:true,dating:true,datsun:true,day:true,dclk:true,dds:true,deal:true,dealer:true,deals:true,degree:true,delivery:true,dell:true,deloitte:true,delta:true,democrat:true,dental:true,dentist:true,desi:true,design:true,dev:true,dhl:true,diamonds:true,diet:true,digital:true,direct:true,directory:true,discount:true,discover:true,dish:true,dnp:true,docs:true,dodge:true,dog:true,doha:true,domains:true,doosan:true,dot:true,download:true,drive:true,dstv:true,dtv:true,dubai:true,duck:true,dunlop:true,duns:true,dupont:true,durban:true,dvag:true,dwg:true,earth:true,eat:true,edeka:true,education:true,email:true,emerck:true,emerson:true,energy:true,engineer:true,engineering:true,enterprises:true,epost:true,epson:true,equipment:true,ericsson:true,erni:true,esq:true,estate:true,esurance:true,etisalat:true,eurovision:true,eus:true,events:true,everbank:true,exchange:true,expert:true,exposed:true,express:true,extraspace:true,fage:true,fail:true,fairwinds:true,faith:true,family:true,fan:true,fans:true,farm:true,farmers:true,fashion:true,fast:true,fedex:true,feedback:true,ferrari:true,ferrero:true,fiat:true,fidelity:true,fido:true,film:true,"final":true,finance:true,financial:true,fire:true,firestone:true,firmdale:true,fish:true,fishing:true,fit:true,fitness:true,flickr:true,flights:true,flir:true,florist:true,flowers:true,flsmidth:true,fly:true,foo:true,foodnetwork:true,football:true,ford:true,forex:true,forsale:true,forum:true,foundation:true,fox:true,fresenius:true,frl:true,frogans:true,frontdoor:true,frontier:true,ftr:true,fujitsu:true,fujixerox:true,fund:true,furniture:true,futbol:true,fyi:true,gal:true,gallery:true,gallo:true,gallup:true,game:true,games:true,gap:true,garden:true,gbiz:true,gdn:true,gea:true,gent:true,genting:true,george:true,ggee:true,gift:true,gifts:true,gives:true,giving:true,glade:true,glass:true,gle:true,global:true,globo:true,gmail:true,gmo:true,gmx:true,godaddy:true,gold:true,goldpoint:true,golf:true,goo:true,goodhands:true,goodyear:true,goog:true,google:true,gop:true,got:true,gotv:true,grainger:true,graphics:true,gratis:true,green:true,gripe:true,group:true,guardian:true,gucci:true,guge:true,guide:true,guitars:true,guru:true,hamburg:true,hangout:true,haus:true,hbo:true,hdfc:true,hdfcbank:true,health:true,healthcare:true,help:true,helsinki:true,here:true,hermes:true,hgtv:true,hiphop:true,hisamitsu:true,hitachi:true,hiv:true,hkt:true,hockey:true,holdings:true,holiday:true,homedepot:true,homegoods:true,homes:true,homesense:true,honda:true,honeywell:true,horse:true,host:true,hosting:true,hot:true,hoteles:true,hotmail:true,house:true,how:true,hsbc:true,htc:true,hughes:true,hyatt:true,hyundai:true,ibm:true,icbc:true,ice:true,icu:true,ieee:true,ifm:true,iinet:true,ikano:true,imamat:true,imdb:true,immo:true,immobilien:true,industries:true,infiniti:true,ing:true,ink:true,institute:true,insurance:true,insure:true,intel:true,international:true,intuit:true,investments:true,ipiranga:true,irish:true,iselect:true,ismaili:true,ist:true,istanbul:true,itau:true,itv:true,iveco:true,iwc:true,jaguar:true,java:true,jcb:true,jcp:true,jeep:true,jetzt:true,jewelry:true,jio:true,jlc:true,jll:true,jmp:true,jnj:true,joburg:true,jot:true,joy:true,jpmorgan:true,jprs:true,juegos:true,juniper:true,kaufen:true,kddi:true,kerryhotels:true,kerrylogistics:true,kerryproperties:true,kfh:true,kia:true,kim:true,kinder:true,kindle:true,kitchen:true,kiwi:true,koeln:true,komatsu:true,kosher:true,kpmg:true,kpn:true,krd:true,kred:true,kuokgroup:true,kyknet:true,kyoto:true,lacaixa:true,ladbrokes:true,lamborghini:true,lancaster:true,lancia:true,lancome:true,land:true,landrover:true,lanxess:true,lasalle:true,lat:true,latino:true,latrobe:true,law:true,lawyer:true,lds:true,lease:true,leclerc:true,lefrak:true,legal:true,lego:true,lexus:true,lgbt:true,liaison:true,lidl:true,life:true,lifeinsurance:true,lifestyle:true,lighting:true,like:true,lilly:true,limited:true,limo:true,lincoln:true,linde:true,link:true,lipsy:true,live:true,living:true,lixil:true,loan:true,loans:true,locker:true,locus:true,loft:true,lol:true,london:true,lotte:true,lotto:true,love:true,lpl:true,lplfinancial:true,ltd:true,ltda:true,lundbeck:true,lupin:true,luxe:true,luxury:true,macys:true,madrid:true,maif:true,maison:true,makeup:true,man:true,management:true,mango:true,market:true,marketing:true,markets:true,marriott:true,marshalls:true,maserati:true,mattel:true,mba:true,mcd:true,mcdonalds:true,mckinsey:true,med:true,media:true,meet:true,melbourne:true,meme:true,memorial:true,men:true,menu:true,meo:true,metlife:true,miami:true,microsoft:true,mini:true,mint:true,mit:true,mitsubishi:true,mlb:true,mls:true,mma:true,mnet:true,mobily:true,moda:true,moe:true,moi:true,mom:true,monash:true,money:true,monster:true,montblanc:true,mopar:true,mormon:true,mortgage:true,moscow:true,moto:true,motorcycles:true,mov:true,movie:true,movistar:true,msd:true,mtn:true,mtpc:true,mtr:true,multichoice:true,mutual:true,mutuelle:true,mzansimagic:true,nab:true,nadex:true,nagoya:true,naspers:true,nationwide:true,natura:true,navy:true,nba:true,nec:true,netbank:true,netflix:true,network:true,neustar:true,"new":true,newholland:true,news:true,next:true,nextdirect:true,nexus:true,nfl:true,ngo:true,nhk:true,nico:true,nike:true,nikon:true,ninja:true,nissan:true,nokia:true,northwesternmutual:true,norton:true,now:true,nowruz:true,nowtv:true,nra:true,nrw:true,ntt:true,nyc:true,obi:true,observer:true,off:true,office:true,okinawa:true,olayan:true,olayangroup:true,oldnavy:true,ollo:true,omega:true,one:true,ong:true,onl:true,online:true,onyourside:true,ooo:true,open:true,oracle:true,orange:true,organic:true,orientexpress:true,osaka:true,otsuka:true,ott:true,ovh:true,page:true,pamperedchef:true,panasonic:true,panerai:true,paris:true,pars:true,partners:true,parts:true,party:true,passagens:true,pay:true,payu:true,pccw:true,pet:true,pfizer:true,pharmacy:true,philips:true,photo:true,photography:true,photos:true,physio:true,piaget:true,pics:true,pictet:true,pictures:true,pid:true,pin:true,ping:true,pink:true,pioneer:true,pizza:true,place:true,play:true,playstation:true,plumbing:true,plus:true,pnc:true,pohl:true,poker:true,politie:true,porn:true,pramerica:true,praxi:true,press:true,prime:true,prod:true,productions:true,prof:true,progressive:true,promo:true,properties:true,property:true,protection:true,pru:true,prudential:true,pub:true,qpon:true,quebec:true,quest:true,qvc:true,racing:true,raid:true,read:true,realestate:true,realtor:true,realty:true,recipes:true,red:true,redstone:true,redumbrella:true,rehab:true,reise:true,reisen:true,reit:true,reliance:true,ren:true,rent:true,rentals:true,repair:true,report:true,republican:true,rest:true,restaurant:true,review:true,reviews:true,rexroth:true,rich:true,richardli:true,ricoh:true,rightathome:true,ril:true,rio:true,rip:true,rocher:true,rocks:true,rodeo:true,rogers:true,room:true,rsvp:true,ruhr:true,run:true,rwe:true,ryukyu:true,saarland:true,safe:true,safety:true,sakura:true,sale:true,salon:true,samsclub:true,samsung:true,sandvik:true,sandvikcoromant:true,sanofi:true,sap:true,sapo:true,sarl:true,sas:true,save:true,saxo:true,sbi:true,sbs:true,sca:true,scb:true,schaeffler:true,schmidt:true,scholarships:true,school:true,schule:true,schwarz:true,science:true,scjohnson:true,scor:true,scot:true,seat:true,secure:true,security:true,seek:true,sener:true,services:true,ses:true,seven:true,sew:true,sex:true,sexy:true,sfr:true,shangrila:true,sharp:true,shaw:true,shell:true,shia:true,shiksha:true,shoes:true,shouji:true,show:true,showtime:true,shriram:true,silk:true,sina:true,singles:true,site:true,ski:true,skin:true,sky:true,skype:true,sling:true,smart:true,smile:true,sncf:true,soccer:true,social:true,softbank:true,software:true,sohu:true,solar:true,solutions:true,song:true,sony:true,soy:true,space:true,spiegel:true,spot:true,spreadbetting:true,srl:true,srt:true,stada:true,staples:true,star:true,starhub:true,statebank:true,statefarm:true,statoil:true,stc:true,stcgroup:true,stockholm:true,storage:true,store:true,studio:true,study:true,style:true,sucks:true,supersport:true,supplies:true,supply:true,support:true,surf:true,surgery:true,suzuki:true,swatch:true,swiftcover:true,swiss:true,sydney:true,symantec:true,systems:true,tab:true,taipei:true,talk:true,taobao:true,target:true,tatamotors:true,tatar:true,tattoo:true,tax:true,taxi:true,tci:true,tdk:true,team:true,tech:true,technology:true,telecity:true,telefonica:true,temasek:true,tennis:true,teva:true,thd:true,theater:true,theatre:true,theguardian:true,tiaa:true,tickets:true,tienda:true,tiffany:true,tips:true,tires:true,tirol:true,tjmaxx:true,tjx:true,tkmaxx:true,tmall:true,today:true,tokyo:true,tools:true,top:true,toray:true,toshiba:true,total:true,tours:true,town:true,toyota:true,toys:true,trade:true,trading:true,training:true,travelchannel:true,travelers:true,travelersinsurance:true,trust:true,trv:true,tube:true,tui:true,tunes:true,tushu:true,tvs:true,ubank:true,ubs:true,uconnect:true,university:true,uno:true,uol:true,ups:true,vacations:true,vana:true,vanguard:true,vegas:true,ventures:true,verisign:true,versicherung:true,vet:true,viajes:true,video:true,vig:true,viking:true,villas:true,vin:true,vip:true,virgin:true,visa:true,vision:true,vista:true,vistaprint:true,viva:true,vivo:true,vlaanderen:true,vodka:true,volkswagen:true,vote:true,voting:true,voto:true,voyage:true,vuelos:true,wales:true,walmart:true,walter:true,wang:true,wanggou:true,warman:true,watch:true,watches:true,weather:true,weatherchannel:true,webcam:true,weber:true,website:true,wed:true,wedding:true,weibo:true,weir:true,whoswho:true,wien:true,wiki:true,williamhill:true,win:true,windows:true,wine:true,winners:true,wme:true,wolterskluwer:true,woodside:true,work:true,works:true,world:true,wtc:true,wtf:true,xbox:true,xerox:true,xfinity:true,xihuan:true,xin:true,"xn--11b4c3d":true,"xn--1ck2e1b":true,"xn--1qqw23a":true,"xn--30rr7y":true,"xn--3bst00m":true,"xn--3ds443g":true,"xn--3oq18vl8pn36a":true,"xn--3pxu8k":true,"xn--42c2d9a":true,"xn--45q11c":true,"xn--4gbrim":true,"xn--4gq48lf9j":true,"xn--55qw42g":true,"xn--55qx5d":true,"xn--5su34j936bgsg":true,"xn--5tzm5g":true,"xn--6frz82g":true,"xn--6qq986b3xl":true,"xn--80adxhks":true,"xn--80asehdb":true,"xn--80aswg":true,"xn--8y0a063a":true,"xn--9dbq2a":true,"xn--9et52u":true,"xn--9krt00a":true,"xn--b4w605ferd":true,"xn--bck1b9a5dre4c":true,"xn--c1avg":true,"xn--c2br7g":true,"xn--cck2b3b":true,"xn--cg4bki":true,"xn--czr694b":true,"xn--czrs0t":true,"xn--czru2d":true,"xn--d1acj3b":true,"xn--eckvdtc9d":true,"xn--efvy88h":true,"xn--estv75g":true,"xn--fct429k":true,"xn--fhbei":true,"xn--fiq228c5hs":true,"xn--fiq64b":true,"xn--fjq720a":true,"xn--flw351e":true,"xn--fzys8d69uvgm":true,"xn--g2xx48c":true,"xn--gckr3f0f":true,"xn--hxt814e":true,"xn--i1b6b1a6a2e":true,"xn--imr513n":true,"xn--io0a7i":true,"xn--j1aef":true,"xn--jlq61u9w7b":true,"xn--jvr189m":true,"xn--kcrx77d1x4a":true,"xn--kpu716f":true,"xn--kput3i":true,"xn--mgba3a3ejt":true,"xn--mgba7c0bbn0a":true,"xn--mgbaakc7dvf":true,"xn--mgbab2bd":true,"xn--mgbb9fbpob":true,"xn--mgbca7dzdo":true,"xn--mgbt3dhd":true,"xn--mk1bu44c":true,"xn--mxtq1m":true,"xn--ngbc5azd":true,"xn--ngbe9e0a":true,"xn--nqv7f":true,"xn--nqv7fs00ema":true,"xn--nyqy26a":true,"xn--p1acf":true,"xn--pbt977c":true,"xn--pssy2u":true,"xn--q9jyb4c":true,"xn--qcka1pmc":true,"xn--rhqv96g":true,"xn--rovu88b":true,"xn--ses554g":true,"xn--t60b56a":true,"xn--tckwe":true,"xn--unup4y":true,"xn--vermgensberater-ctb":true,"xn--vermgensberatung-pwb":true,"xn--vhquv":true,"xn--vuq861b":true,"xn--w4r85el8fhu5dnra":true,"xn--w4rs40l":true,"xn--xhq521b":true,"xn--zfr164b":true,xperia:true,xyz:true,yachts:true,yahoo:true,yamaxun:true,yandex:true,yodobashi:true,yoga:true,yokohama:true,you:true,youtube:true,yun:true,zappos:true,zara:true,zero:true,zip:true,zippo:true,zone:true,zuerich:true,"cloudfront.net":true,"ap-northeast-1.compute.amazonaws.com":true,"ap-southeast-1.compute.amazonaws.com":true,"ap-southeast-2.compute.amazonaws.com":true,"cn-north-1.compute.amazonaws.cn":true,"compute.amazonaws.cn":true,"compute.amazonaws.com":true,"compute-1.amazonaws.com":true,"eu-west-1.compute.amazonaws.com":true,"eu-central-1.compute.amazonaws.com":true,"sa-east-1.compute.amazonaws.com":true,"us-east-1.amazonaws.com":true,"us-gov-west-1.compute.amazonaws.com":true,"us-west-1.compute.amazonaws.com":true,"us-west-2.compute.amazonaws.com":true,"z-1.compute-1.amazonaws.com":true,"z-2.compute-1.amazonaws.com":true,"elasticbeanstalk.com":true,"elb.amazonaws.com":true,"s3.amazonaws.com":true,"s3-ap-northeast-1.amazonaws.com":true,"s3-ap-southeast-1.amazonaws.com":true,"s3-ap-southeast-2.amazonaws.com":true,"s3-external-1.amazonaws.com":true,"s3-external-2.amazonaws.com":true,"s3-fips-us-gov-west-1.amazonaws.com":true,"s3-eu-central-1.amazonaws.com":true,"s3-eu-west-1.amazonaws.com":true,"s3-sa-east-1.amazonaws.com":true,"s3-us-gov-west-1.amazonaws.com":true,"s3-us-west-1.amazonaws.com":true,"s3-us-west-2.amazonaws.com":true,"s3.cn-north-1.amazonaws.com.cn":true,"s3.eu-central-1.amazonaws.com":true,"betainabox.com":true,"ae.org":true,"ar.com":true,"br.com":true,"cn.com":true,"com.de":true,"com.se":true,"de.com":true,"eu.com":true,"gb.com":true,"gb.net":true,"hu.com":true,"hu.net":true,"jp.net":true,"jpn.com":true,"kr.com":true,"mex.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"se.net":true,"uk.com":true,"uk.net":true,"us.com":true,"uy.com":true,"za.bz":true,"za.com":true,"africa.com":true,"gr.com":true,"in.net":true,"us.org":true,"co.com":true,"c.la":true,"cloudcontrolled.com":true,"cloudcontrolapp.com":true,"co.ca":true,"c.cdn77.org":true,"cdn77-ssl.net":true,"r.cdn77.net":true,"rsc.cdn77.org":true,"ssl.origin.cdn77-secure.org":true,"co.nl":true,"co.no":true,"*.platform.sh":true,"cupcake.is":true,"dreamhosters.com":true,"duckdns.org":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true,"eu.org":true,"al.eu.org":true,"asso.eu.org":true,"at.eu.org":true,"au.eu.org":true,"be.eu.org":true,"bg.eu.org":true,"ca.eu.org":true,"cd.eu.org":true,"ch.eu.org":true,"cn.eu.org":true,"cy.eu.org":true,"cz.eu.org":true,"de.eu.org":true,"dk.eu.org":true,"edu.eu.org":true,"ee.eu.org":true,"es.eu.org":true,"fi.eu.org":true,"fr.eu.org":true,"gr.eu.org":true,"hr.eu.org":true,"hu.eu.org":true,"ie.eu.org":true,"il.eu.org":true,"in.eu.org":true,"int.eu.org":true,"is.eu.org":true,"it.eu.org":true,"jp.eu.org":true,"kr.eu.org":true,"lt.eu.org":true,"lu.eu.org":true,"lv.eu.org":true,"mc.eu.org":true,"me.eu.org":true,"mk.eu.org":true,"mt.eu.org":true,"my.eu.org":true,"net.eu.org":true,"ng.eu.org":true,"nl.eu.org":true,"no.eu.org":true,"nz.eu.org":true,"paris.eu.org":true,"pl.eu.org":true,"pt.eu.org":true,"q-a.eu.org":true,"ro.eu.org":true,"ru.eu.org":true,"se.eu.org":true,"si.eu.org":true,"sk.eu.org":true,"tr.eu.org":true,"uk.eu.org":true,"us.eu.org":true,"a.ssl.fastly.net":true,"b.ssl.fastly.net":true,"global.ssl.fastly.net":true,"a.prod.fastly.net":true,"global.prod.fastly.net":true,"firebaseapp.com":true,"flynnhub.com":true,"service.gov.uk":true,"github.io":true,"githubusercontent.com":true,"ro.com":true,"appspot.com":true,"blogspot.ae":true,"blogspot.al":true,"blogspot.am":true,"blogspot.ba":true,"blogspot.be":true,"blogspot.bg":true,"blogspot.bj":true,"blogspot.ca":true,"blogspot.cf":true,"blogspot.ch":true,"blogspot.cl":true,"blogspot.co.at":true,"blogspot.co.id":true,"blogspot.co.il":true,"blogspot.co.ke":true,"blogspot.co.nz":true,"blogspot.co.uk":true,"blogspot.co.za":true,"blogspot.com":true,"blogspot.com.ar":true,"blogspot.com.au":true,"blogspot.com.br":true,"blogspot.com.by":true,"blogspot.com.co":true,"blogspot.com.cy":true,"blogspot.com.ee":true,"blogspot.com.eg":true,"blogspot.com.es":true,"blogspot.com.mt":true,"blogspot.com.ng":true,"blogspot.com.tr":true,"blogspot.com.uy":true,"blogspot.cv":true,"blogspot.cz":true,"blogspot.de":true,"blogspot.dk":true,"blogspot.fi":true,"blogspot.fr":true,"blogspot.gr":true,"blogspot.hk":true,"blogspot.hr":true,"blogspot.hu":true,"blogspot.ie":true,"blogspot.in":true,"blogspot.is":true,"blogspot.it":true,"blogspot.jp":true,"blogspot.kr":true,"blogspot.li":true,"blogspot.lt":true,"blogspot.lu":true,"blogspot.md":true,"blogspot.mk":true,"blogspot.mr":true,"blogspot.mx":true,"blogspot.my":true,"blogspot.nl":true,"blogspot.no":true,"blogspot.pe":true,"blogspot.pt":true,"blogspot.qa":true,"blogspot.re":true,"blogspot.ro":true,"blogspot.rs":true,"blogspot.ru":true,"blogspot.se":true,"blogspot.sg":true,"blogspot.si":true,"blogspot.sk":true,"blogspot.sn":true,"blogspot.td":true,"blogspot.tw":true,"blogspot.ug":true,"blogspot.vn":true,"codespot.com":true,"googleapis.com":true,"googlecode.com":true,"pagespeedmobilizer.com":true,"withgoogle.com":true,"withyoutube.com":true,"herokuapp.com":true,"herokussl.com":true,"iki.fi":true,"biz.at":true,"info.at":true,"co.pl":true,"azurewebsites.net":true,"azure-mobile.net":true,"cloudapp.net":true,"bmoattachments.org":true,"4u.com":true,"nfshost.com":true,"nyc.mn":true,"nid.io":true,"operaunite.com":true,"outsystemscloud.com":true,"art.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pantheon.io":true,"gotpantheon.com":true,"priv.at":true,"qa2.com":true,"rhcloud.com":true,"sandcats.io":true,"biz.ua":true,"co.ua":true,"pp.ua":true,"sinaapp.com":true,"vipsinaapp.com":true,"1kapp.com":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"hk.com":true,"hk.org":true,"ltd.hk":true,"inc.hk":true,"yolasite.com":true,"za.net":true,"za.org":true}) +},{punycode:205}],284:[function(require,module,exports){"use strict";function Store(){}exports.Store=Store;Store.prototype.synchronous=false;Store.prototype.findCookie=function(domain,path,key,cb){throw new Error("findCookie is not implemented")};Store.prototype.findCookies=function(domain,path,cb){throw new Error("findCookies is not implemented")};Store.prototype.putCookie=function(cookie,cb){throw new Error("putCookie is not implemented")};Store.prototype.updateCookie=function(oldCookie,newCookie,cb){throw new Error("updateCookie is not implemented")};Store.prototype.removeCookie=function(domain,path,key,cb){throw new Error("removeCookie is not implemented")};Store.prototype.removeCookies=function(domain,path,cb){throw new Error("removeCookies is not implemented")};Store.prototype.getAllCookies=function(cb){throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)")}},{}],285:[function(require,module,exports){module.exports={_args:[[{raw:"tough-cookie@~2.3.0",scope:null,escapedName:"tough-cookie",name:"tough-cookie",rawSpec:"~2.3.0",spec:">=2.3.0 <2.4.0",type:"range"},"/Users/deejaybee/Code/eyevinn/dash-validator-js/node_modules/request"]],_from:"tough-cookie@>=2.3.0 <2.4.0",_id:"tough-cookie@2.3.2",_inCache:true,_location:"/tough-cookie",_nodeVersion:"7.0.0",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/tough-cookie-2.3.2.tgz_1477415232912_0.6133609430398792"},_npmUser:{name:"jstash",email:"jstash@gmail.com"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"tough-cookie@~2.3.0",scope:null,escapedName:"tough-cookie",name:"tough-cookie",rawSpec:"~2.3.0",spec:">=2.3.0 <2.4.0",type:"range"},_requiredBy:["/bower-installer/request","/bower-registry-client/request","/request"],_resolved:"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",_shasum:"f081f76e4c85720e6c37a5faced737150d84072a",_shrinkwrap:null,_spec:"tough-cookie@~2.3.0",_where:"/Users/deejaybee/Code/eyevinn/dash-validator-js/node_modules/request",author:{name:"Jeremy Stashewsky",email:"jstashewsky@salesforce.com"},bugs:{url:"https://github.com/salesforce/tough-cookie/issues"},contributors:[{name:"Alexander Savin"},{name:"Ian Livingstone"},{name:"Ivan Nikulin"},{name:"Lalit Kapoor"},{name:"Sam Thompson"},{name:"Sebastian Mayr"}],dependencies:{punycode:"^1.4.1"},description:"RFC6265 Cookies and Cookie Jar for node.js",devDependencies:{async:"^1.4.2","string.prototype.repeat":"^0.2.0",vows:"^0.8.1"},directories:{},dist:{shasum:"f081f76e4c85720e6c37a5faced737150d84072a",tarball:"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz"},engines:{node:">=0.8"},files:["lib"],gitHead:"2610df5dc8ef7373a483d509006e5887572a4076",homepage:"https://github.com/salesforce/tough-cookie",keywords:["HTTP","cookie","cookies","set-cookie","cookiejar","jar","RFC6265","RFC2965"],license:"BSD-3-Clause",main:"./lib/cookie",maintainers:[{name:"awaterma",email:"awaterma@awaterma.net"},{name:"jstash",email:"jstash@gmail.com"},{name:"nexxy",email:"emily@contactvibe.com"}],name:"tough-cookie",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/salesforce/tough-cookie.git"},scripts:{suffixup:"curl -o public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat && ./generate-pubsuffix.js",test:"vows test/*_test.js"},version:"2.3.2"}},{}],286:[function(require,module,exports){!function(process,Buffer){"use strict";var net=require("net"),tls=require("tls"),http=require("http"),https=require("https"),events=require("events"),assert=require("assert"),util=require("util");exports.httpOverHttp=httpOverHttp;exports.httpsOverHttp=httpsOverHttp;exports.httpOverHttps=httpOverHttps;exports.httpsOverHttps=httpsOverHttps;function httpOverHttp(options){var agent=new TunnelingAgent(options);agent.request=http.request;return agent}function httpsOverHttp(options){var agent=new TunnelingAgent(options);agent.request=http.request;agent.createSocket=createSecureSocket;agent.defaultPort=443;return agent}function httpOverHttps(options){var agent=new TunnelingAgent(options);agent.request=https.request;return agent}function httpsOverHttps(options){var agent=new TunnelingAgent(options);agent.request=https.request;agent.createSocket=createSecureSocket;agent.defaultPort=443;return agent}function TunnelingAgent(options){var self=this;self.options=options||{};self.proxyOptions=self.options.proxy||{};self.maxSockets=self.options.maxSockets||http.Agent.defaultMaxSockets;self.requests=[];self.sockets=[];self.on("free",function onFree(socket,host,port){for(var i=0,len=self.requests.length;i=this.maxSockets){self.requests.push({host:options.host,port:options.port,request:req});return}self.createConnection({host:options.host,port:options.port,request:req})};TunnelingAgent.prototype.createConnection=function createConnection(pending){var self=this;self.createSocket(pending,function(socket){socket.on("free",onFree);socket.on("close",onCloseOrRemove);socket.on("agentRemove",onCloseOrRemove);pending.request.onSocket(socket);function onFree(){self.emit("free",socket,pending.host,pending.port)}function onCloseOrRemove(err){self.removeSocket(socket);socket.removeListener("free",onFree);socket.removeListener("close",onCloseOrRemove);socket.removeListener("agentRemove",onCloseOrRemove)}})};TunnelingAgent.prototype.createSocket=function createSocket(options,cb){var self=this;var placeholder={};self.sockets.push(placeholder);var connectOptions=mergeOptions({},self.proxyOptions,{method:"CONNECT",path:options.host+":"+options.port,agent:false});if(connectOptions.proxyAuth){connectOptions.headers=connectOptions.headers||{};connectOptions.headers["Proxy-Authorization"]="Basic "+new Buffer(connectOptions.proxyAuth).toString("base64")}debug("making CONNECT request");var connectReq=self.request(connectOptions);connectReq.useChunkedEncodingByDefault=false;connectReq.once("response",onResponse);connectReq.once("upgrade",onUpgrade);connectReq.once("connect",onConnect);connectReq.once("error",onError);connectReq.end();function onResponse(res){res.upgrade=true}function onUpgrade(res,socket,head){process.nextTick(function(){onConnect(res,socket,head)})}function onConnect(res,socket,head){connectReq.removeAllListeners();socket.removeAllListeners();if(res.statusCode===200){assert.equal(head.length,0);debug("tunneling connection has established");self.sockets[self.sockets.indexOf(placeholder)]=socket;cb(socket)}else{debug("tunneling socket could not be established, statusCode=%d",res.statusCode);var error=new Error("tunneling socket could not be established, "+"statusCode="+res.statusCode);error.code="ECONNRESET";options.request.emit("error",error);self.removeSocket(placeholder)}}function onError(cause){connectReq.removeAllListeners();debug("tunneling socket could not be established, cause=%s\n",cause.message,cause.stack);var error=new Error("tunneling socket could not be established, "+"cause="+cause.message);error.code="ECONNRESET";options.request.emit("error",error);self.removeSocket(placeholder)}};TunnelingAgent.prototype.removeSocket=function removeSocket(socket){var pos=this.sockets.indexOf(socket);if(pos===-1)return;this.sockets.splice(pos,1);var pending=this.requests.shift();if(pending){this.createConnection(pending)}};function createSecureSocket(options,cb){var self=this;TunnelingAgent.prototype.createSocket.call(self,options,function(socket){var secureSocket=tls.connect(0,mergeOptions({},self.options,{servername:options.host,socket:socket}));self.sockets[self.sockets.indexOf(socket)]=secureSocket;cb(secureSocket)})}function mergeOptions(target){for(var i=1,len=arguments.length;i>24&255;x[i+1]=h>>16&255;x[i+2]=h>>8&255;x[i+3]=h&255;x[i+4]=l>>24&255;x[i+5]=l>>16&255;x[i+6]=l>>8&255;x[i+7]=l&255}function vn(x,xi,y,yi,n){var i,d=0;for(i=0;i>>8)-1}function crypto_verify_16(x,xi,y,yi){return vn(x,xi,y,yi,16)}function crypto_verify_32(x,xi,y,yi){return vn(x,xi,y,yi,32)}function core_salsa20(o,p,k,c){var j0=c[0]&255|(c[1]&255)<<8|(c[2]&255)<<16|(c[3]&255)<<24,j1=k[0]&255|(k[1]&255)<<8|(k[2]&255)<<16|(k[3]&255)<<24,j2=k[4]&255|(k[5]&255)<<8|(k[6]&255)<<16|(k[7]&255)<<24,j3=k[8]&255|(k[9]&255)<<8|(k[10]&255)<<16|(k[11]&255)<<24,j4=k[12]&255|(k[13]&255)<<8|(k[14]&255)<<16|(k[15]&255)<<24,j5=c[4]&255|(c[5]&255)<<8|(c[6]&255)<<16|(c[7]&255)<<24,j6=p[0]&255|(p[1]&255)<<8|(p[2]&255)<<16|(p[3]&255)<<24,j7=p[4]&255|(p[5]&255)<<8|(p[6]&255)<<16|(p[7]&255)<<24,j8=p[8]&255|(p[9]&255)<<8|(p[10]&255)<<16|(p[11]&255)<<24,j9=p[12]&255|(p[13]&255)<<8|(p[14]&255)<<16|(p[15]&255)<<24,j10=c[8]&255|(c[9]&255)<<8|(c[10]&255)<<16|(c[11]&255)<<24,j11=k[16]&255|(k[17]&255)<<8|(k[18]&255)<<16|(k[19]&255)<<24,j12=k[20]&255|(k[21]&255)<<8|(k[22]&255)<<16|(k[23]&255)<<24,j13=k[24]&255|(k[25]&255)<<8|(k[26]&255)<<16|(k[27]&255)<<24,j14=k[28]&255|(k[29]&255)<<8|(k[30]&255)<<16|(k[31]&255)<<24,j15=c[12]&255|(c[13]&255)<<8|(c[14]&255)<<16|(c[15]&255)<<24;var x0=j0,x1=j1,x2=j2,x3=j3,x4=j4,x5=j5,x6=j6,x7=j7,x8=j8,x9=j9,x10=j10,x11=j11,x12=j12,x13=j13,x14=j14,x15=j15,u;for(var i=0;i<20;i+=2){u=x0+x12|0;x4^=u<<7|u>>>32-7;u=x4+x0|0;x8^=u<<9|u>>>32-9;u=x8+x4|0;x12^=u<<13|u>>>32-13;u=x12+x8|0;x0^=u<<18|u>>>32-18;u=x5+x1|0;x9^=u<<7|u>>>32-7;u=x9+x5|0;x13^=u<<9|u>>>32-9;u=x13+x9|0;x1^=u<<13|u>>>32-13;u=x1+x13|0;x5^=u<<18|u>>>32-18;u=x10+x6|0;x14^=u<<7|u>>>32-7;u=x14+x10|0;x2^=u<<9|u>>>32-9;u=x2+x14|0;x6^=u<<13|u>>>32-13;u=x6+x2|0;x10^=u<<18|u>>>32-18;u=x15+x11|0;x3^=u<<7|u>>>32-7;u=x3+x15|0;x7^=u<<9|u>>>32-9;u=x7+x3|0;x11^=u<<13|u>>>32-13;u=x11+x7|0;x15^=u<<18|u>>>32-18;u=x0+x3|0;x1^=u<<7|u>>>32-7;u=x1+x0|0;x2^=u<<9|u>>>32-9;u=x2+x1|0;x3^=u<<13|u>>>32-13;u=x3+x2|0;x0^=u<<18|u>>>32-18;u=x5+x4|0;x6^=u<<7|u>>>32-7;u=x6+x5|0;x7^=u<<9|u>>>32-9;u=x7+x6|0;x4^=u<<13|u>>>32-13;u=x4+x7|0;x5^=u<<18|u>>>32-18;u=x10+x9|0;x11^=u<<7|u>>>32-7;u=x11+x10|0;x8^=u<<9|u>>>32-9;u=x8+x11|0;x9^=u<<13|u>>>32-13;u=x9+x8|0;x10^=u<<18|u>>>32-18;u=x15+x14|0;x12^=u<<7|u>>>32-7;u=x12+x15|0;x13^=u<<9|u>>>32-9;u=x13+x12|0;x14^=u<<13|u>>>32-13;u=x14+x13|0;x15^=u<<18|u>>>32-18}x0=x0+j0|0;x1=x1+j1|0;x2=x2+j2|0;x3=x3+j3|0;x4=x4+j4|0;x5=x5+j5|0;x6=x6+j6|0;x7=x7+j7|0;x8=x8+j8|0;x9=x9+j9|0;x10=x10+j10|0;x11=x11+j11|0;x12=x12+j12|0;x13=x13+j13|0;x14=x14+j14|0;x15=x15+j15|0;o[0]=x0>>>0&255;o[1]=x0>>>8&255;o[2]=x0>>>16&255;o[3]=x0>>>24&255;o[4]=x1>>>0&255;o[5]=x1>>>8&255;o[6]=x1>>>16&255;o[7]=x1>>>24&255;o[8]=x2>>>0&255;o[9]=x2>>>8&255;o[10]=x2>>>16&255;o[11]=x2>>>24&255;o[12]=x3>>>0&255;o[13]=x3>>>8&255;o[14]=x3>>>16&255;o[15]=x3>>>24&255;o[16]=x4>>>0&255;o[17]=x4>>>8&255;o[18]=x4>>>16&255;o[19]=x4>>>24&255;o[20]=x5>>>0&255;o[21]=x5>>>8&255;o[22]=x5>>>16&255;o[23]=x5>>>24&255;o[24]=x6>>>0&255;o[25]=x6>>>8&255;o[26]=x6>>>16&255;o[27]=x6>>>24&255;o[28]=x7>>>0&255;o[29]=x7>>>8&255;o[30]=x7>>>16&255;o[31]=x7>>>24&255;o[32]=x8>>>0&255;o[33]=x8>>>8&255;o[34]=x8>>>16&255;o[35]=x8>>>24&255;o[36]=x9>>>0&255;o[37]=x9>>>8&255;o[38]=x9>>>16&255;o[39]=x9>>>24&255;o[40]=x10>>>0&255;o[41]=x10>>>8&255;o[42]=x10>>>16&255;o[43]=x10>>>24&255;o[44]=x11>>>0&255;o[45]=x11>>>8&255;o[46]=x11>>>16&255;o[47]=x11>>>24&255;o[48]=x12>>>0&255;o[49]=x12>>>8&255;o[50]=x12>>>16&255;o[51]=x12>>>24&255;o[52]=x13>>>0&255;o[53]=x13>>>8&255;o[54]=x13>>>16&255;o[55]=x13>>>24&255;o[56]=x14>>>0&255;o[57]=x14>>>8&255;o[58]=x14>>>16&255;o[59]=x14>>>24&255;o[60]=x15>>>0&255;o[61]=x15>>>8&255;o[62]=x15>>>16&255;o[63]=x15>>>24&255}function core_hsalsa20(o,p,k,c){var j0=c[0]&255|(c[1]&255)<<8|(c[2]&255)<<16|(c[3]&255)<<24,j1=k[0]&255|(k[1]&255)<<8|(k[2]&255)<<16|(k[3]&255)<<24,j2=k[4]&255|(k[5]&255)<<8|(k[6]&255)<<16|(k[7]&255)<<24,j3=k[8]&255|(k[9]&255)<<8|(k[10]&255)<<16|(k[11]&255)<<24,j4=k[12]&255|(k[13]&255)<<8|(k[14]&255)<<16|(k[15]&255)<<24,j5=c[4]&255|(c[5]&255)<<8|(c[6]&255)<<16|(c[7]&255)<<24,j6=p[0]&255|(p[1]&255)<<8|(p[2]&255)<<16|(p[3]&255)<<24,j7=p[4]&255|(p[5]&255)<<8|(p[6]&255)<<16|(p[7]&255)<<24,j8=p[8]&255|(p[9]&255)<<8|(p[10]&255)<<16|(p[11]&255)<<24,j9=p[12]&255|(p[13]&255)<<8|(p[14]&255)<<16|(p[15]&255)<<24,j10=c[8]&255|(c[9]&255)<<8|(c[10]&255)<<16|(c[11]&255)<<24,j11=k[16]&255|(k[17]&255)<<8|(k[18]&255)<<16|(k[19]&255)<<24,j12=k[20]&255|(k[21]&255)<<8|(k[22]&255)<<16|(k[23]&255)<<24,j13=k[24]&255|(k[25]&255)<<8|(k[26]&255)<<16|(k[27]&255)<<24,j14=k[28]&255|(k[29]&255)<<8|(k[30]&255)<<16|(k[31]&255)<<24,j15=c[12]&255|(c[13]&255)<<8|(c[14]&255)<<16|(c[15]&255)<<24;var x0=j0,x1=j1,x2=j2,x3=j3,x4=j4,x5=j5,x6=j6,x7=j7,x8=j8,x9=j9,x10=j10,x11=j11,x12=j12,x13=j13,x14=j14,x15=j15,u;for(var i=0;i<20;i+=2){u=x0+x12|0;x4^=u<<7|u>>>32-7;u=x4+x0|0;x8^=u<<9|u>>>32-9;u=x8+x4|0;x12^=u<<13|u>>>32-13;u=x12+x8|0;x0^=u<<18|u>>>32-18;u=x5+x1|0;x9^=u<<7|u>>>32-7;u=x9+x5|0;x13^=u<<9|u>>>32-9;u=x13+x9|0;x1^=u<<13|u>>>32-13;u=x1+x13|0;x5^=u<<18|u>>>32-18;u=x10+x6|0;x14^=u<<7|u>>>32-7;u=x14+x10|0;x2^=u<<9|u>>>32-9;u=x2+x14|0;x6^=u<<13|u>>>32-13;u=x6+x2|0;x10^=u<<18|u>>>32-18;u=x15+x11|0;x3^=u<<7|u>>>32-7;u=x3+x15|0;x7^=u<<9|u>>>32-9;u=x7+x3|0;x11^=u<<13|u>>>32-13;u=x11+x7|0;x15^=u<<18|u>>>32-18;u=x0+x3|0;x1^=u<<7|u>>>32-7;u=x1+x0|0;x2^=u<<9|u>>>32-9;u=x2+x1|0;x3^=u<<13|u>>>32-13;u=x3+x2|0;x0^=u<<18|u>>>32-18;u=x5+x4|0;x6^=u<<7|u>>>32-7;u=x6+x5|0;x7^=u<<9|u>>>32-9;u=x7+x6|0;x4^=u<<13|u>>>32-13;u=x4+x7|0;x5^=u<<18|u>>>32-18;u=x10+x9|0;x11^=u<<7|u>>>32-7;u=x11+x10|0;x8^=u<<9|u>>>32-9;u=x8+x11|0;x9^=u<<13|u>>>32-13;u=x9+x8|0;x10^=u<<18|u>>>32-18;u=x15+x14|0;x12^=u<<7|u>>>32-7;u=x12+x15|0;x13^=u<<9|u>>>32-9;u=x13+x12|0;x14^=u<<13|u>>>32-13;u=x14+x13|0;x15^=u<<18|u>>>32-18}o[0]=x0>>>0&255;o[1]=x0>>>8&255;o[2]=x0>>>16&255;o[3]=x0>>>24&255;o[4]=x5>>>0&255;o[5]=x5>>>8&255;o[6]=x5>>>16&255;o[7]=x5>>>24&255;o[8]=x10>>>0&255;o[9]=x10>>>8&255;o[10]=x10>>>16&255;o[11]=x10>>>24&255;o[12]=x15>>>0&255;o[13]=x15>>>8&255;o[14]=x15>>>16&255;o[15]=x15>>>24&255;o[16]=x6>>>0&255;o[17]=x6>>>8&255;o[18]=x6>>>16&255;o[19]=x6>>>24&255;o[20]=x7>>>0&255;o[21]=x7>>>8&255;o[22]=x7>>>16&255;o[23]=x7>>>24&255;o[24]=x8>>>0&255;o[25]=x8>>>8&255;o[26]=x8>>>16&255;o[27]=x8>>>24&255;o[28]=x9>>>0&255;o[29]=x9>>>8&255;o[30]=x9>>>16&255;o[31]=x9>>>24&255}function crypto_core_salsa20(out,inp,k,c){core_salsa20(out,inp,k,c)}function crypto_core_hsalsa20(out,inp,k,c){core_hsalsa20(out,inp,k,c)}var sigma=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k){var z=new Uint8Array(16),x=new Uint8Array(64);var u,i;for(i=0;i<16;i++)z[i]=0;for(i=0;i<8;i++)z[i]=n[i];while(b>=64){crypto_core_salsa20(x,z,k,sigma);for(i=0;i<64;i++)c[cpos+i]=m[mpos+i]^x[i];u=1;for(i=8;i<16;i++){u=u+(z[i]&255)|0;z[i]=u&255;u>>>=8}b-=64;cpos+=64;mpos+=64}if(b>0){crypto_core_salsa20(x,z,k,sigma);for(i=0;i=64){crypto_core_salsa20(x,z,k,sigma);for(i=0;i<64;i++)c[cpos+i]=x[i];u=1;for(i=8;i<16;i++){u=u+(z[i]&255)|0;z[i]=u&255;u>>>=8}b-=64;cpos+=64}if(b>0){crypto_core_salsa20(x,z,k,sigma);for(i=0;i>>13|t1<<3)&8191;t2=key[4]&255|(key[5]&255)<<8;this.r[2]=(t1>>>10|t2<<6)&7939;t3=key[6]&255|(key[7]&255)<<8;this.r[3]=(t2>>>7|t3<<9)&8191;t4=key[8]&255|(key[9]&255)<<8;this.r[4]=(t3>>>4|t4<<12)&255;this.r[5]=t4>>>1&8190;t5=key[10]&255|(key[11]&255)<<8;this.r[6]=(t4>>>14|t5<<2)&8191;t6=key[12]&255|(key[13]&255)<<8;this.r[7]=(t5>>>11|t6<<5)&8065;t7=key[14]&255|(key[15]&255)<<8;this.r[8]=(t6>>>8|t7<<8)&8191;this.r[9]=t7>>>5&127;this.pad[0]=key[16]&255|(key[17]&255)<<8;this.pad[1]=key[18]&255|(key[19]&255)<<8;this.pad[2]=key[20]&255|(key[21]&255)<<8;this.pad[3]=key[22]&255|(key[23]&255)<<8;this.pad[4]=key[24]&255|(key[25]&255)<<8;this.pad[5]=key[26]&255|(key[27]&255)<<8;this.pad[6]=key[28]&255|(key[29]&255)<<8;this.pad[7]=key[30]&255|(key[31]&255)<<8};poly1305.prototype.blocks=function(m,mpos,bytes){var hibit=this.fin?0:1<<11;var t0,t1,t2,t3,t4,t5,t6,t7,c;var d0,d1,d2,d3,d4,d5,d6,d7,d8,d9;var h0=this.h[0],h1=this.h[1],h2=this.h[2],h3=this.h[3],h4=this.h[4],h5=this.h[5],h6=this.h[6],h7=this.h[7],h8=this.h[8],h9=this.h[9];var r0=this.r[0],r1=this.r[1],r2=this.r[2],r3=this.r[3],r4=this.r[4],r5=this.r[5],r6=this.r[6],r7=this.r[7],r8=this.r[8],r9=this.r[9];while(bytes>=16){t0=m[mpos+0]&255|(m[mpos+1]&255)<<8;h0+=t0&8191;t1=m[mpos+2]&255|(m[mpos+3]&255)<<8;h1+=(t0>>>13|t1<<3)&8191;t2=m[mpos+4]&255|(m[mpos+5]&255)<<8;h2+=(t1>>>10|t2<<6)&8191;t3=m[mpos+6]&255|(m[mpos+7]&255)<<8;h3+=(t2>>>7|t3<<9)&8191;t4=m[mpos+8]&255|(m[mpos+9]&255)<<8;h4+=(t3>>>4|t4<<12)&8191;h5+=t4>>>1&8191;t5=m[mpos+10]&255|(m[mpos+11]&255)<<8;h6+=(t4>>>14|t5<<2)&8191;t6=m[mpos+12]&255|(m[mpos+13]&255)<<8;h7+=(t5>>>11|t6<<5)&8191;t7=m[mpos+14]&255|(m[mpos+15]&255)<<8;h8+=(t6>>>8|t7<<8)&8191;h9+=t7>>>5|hibit;c=0;d0=c;d0+=h0*r0;d0+=h1*5*r9;d0+=h2*5*r8;d0+=h3*5*r7;d0+=h4*5*r6;c=d0>>>13;d0&=8191;d0+=h5*5*r5;d0+=h6*5*r4;d0+=h7*5*r3;d0+=h8*5*r2;d0+=h9*5*r1;c+=d0>>>13;d0&=8191;d1=c;d1+=h0*r1;d1+=h1*r0;d1+=h2*5*r9;d1+=h3*5*r8;d1+=h4*5*r7;c=d1>>>13;d1&=8191;d1+=h5*5*r6;d1+=h6*5*r5;d1+=h7*5*r4;d1+=h8*5*r3;d1+=h9*5*r2;c+=d1>>>13;d1&=8191;d2=c;d2+=h0*r2;d2+=h1*r1;d2+=h2*r0;d2+=h3*5*r9;d2+=h4*5*r8;c=d2>>>13;d2&=8191;d2+=h5*5*r7;d2+=h6*5*r6;d2+=h7*5*r5;d2+=h8*5*r4;d2+=h9*5*r3;c+=d2>>>13;d2&=8191;d3=c;d3+=h0*r3;d3+=h1*r2;d3+=h2*r1;d3+=h3*r0;d3+=h4*5*r9;c=d3>>>13;d3&=8191;d3+=h5*5*r8;d3+=h6*5*r7;d3+=h7*5*r6;d3+=h8*5*r5;d3+=h9*5*r4;c+=d3>>>13;d3&=8191;d4=c;d4+=h0*r4;d4+=h1*r3;d4+=h2*r2;d4+=h3*r1;d4+=h4*r0;c=d4>>>13;d4&=8191;d4+=h5*5*r9;d4+=h6*5*r8;d4+=h7*5*r7;d4+=h8*5*r6;d4+=h9*5*r5;c+=d4>>>13;d4&=8191;d5=c;d5+=h0*r5;d5+=h1*r4;d5+=h2*r3;d5+=h3*r2;d5+=h4*r1;c=d5>>>13;d5&=8191;d5+=h5*r0;d5+=h6*5*r9;d5+=h7*5*r8;d5+=h8*5*r7;d5+=h9*5*r6;c+=d5>>>13;d5&=8191;d6=c;d6+=h0*r6;d6+=h1*r5;d6+=h2*r4;d6+=h3*r3;d6+=h4*r2;c=d6>>>13;d6&=8191;d6+=h5*r1;d6+=h6*r0;d6+=h7*5*r9;d6+=h8*5*r8;d6+=h9*5*r7;c+=d6>>>13;d6&=8191;d7=c;d7+=h0*r7;d7+=h1*r6;d7+=h2*r5;d7+=h3*r4;d7+=h4*r3;c=d7>>>13;d7&=8191;d7+=h5*r2;d7+=h6*r1;d7+=h7*r0;d7+=h8*5*r9;d7+=h9*5*r8;c+=d7>>>13;d7&=8191;d8=c;d8+=h0*r8;d8+=h1*r7;d8+=h2*r6;d8+=h3*r5;d8+=h4*r4;c=d8>>>13;d8&=8191;d8+=h5*r3;d8+=h6*r2;d8+=h7*r1;d8+=h8*r0;d8+=h9*5*r9;c+=d8>>>13;d8&=8191;d9=c;d9+=h0*r9;d9+=h1*r8;d9+=h2*r7;d9+=h3*r6;d9+=h4*r5;c=d9>>>13;d9&=8191;d9+=h5*r4;d9+=h6*r3;d9+=h7*r2;d9+=h8*r1;d9+=h9*r0;c+=d9>>>13;d9&=8191;c=(c<<2)+c|0;c=c+d0|0;d0=c&8191;c=c>>>13;d1+=c;h0=d0;h1=d1;h2=d2;h3=d3;h4=d4;h5=d5;h6=d6;h7=d7;h8=d8;h9=d9;mpos+=16;bytes-=16}this.h[0]=h0;this.h[1]=h1;this.h[2]=h2;this.h[3]=h3;this.h[4]=h4;this.h[5]=h5;this.h[6]=h6;this.h[7]=h7;this.h[8]=h8;this.h[9]=h9};poly1305.prototype.finish=function(mac,macpos){var g=new Uint16Array(10);var c,mask,f,i;if(this.leftover){i=this.leftover;this.buffer[i++]=1;for(;i<16;i++)this.buffer[i]=0;this.fin=1;this.blocks(this.buffer,0,16)}c=this.h[1]>>>13;this.h[1]&=8191;for(i=2;i<10;i++){this.h[i]+=c;c=this.h[i]>>>13;this.h[i]&=8191}this.h[0]+=c*5;c=this.h[0]>>>13;this.h[0]&=8191;this.h[1]+=c;c=this.h[1]>>>13;this.h[1]&=8191;this.h[2]+=c;g[0]=this.h[0]+5;c=g[0]>>>13;g[0]&=8191;for(i=1;i<10;i++){g[i]=this.h[i]+c;c=g[i]>>>13;g[i]&=8191}g[9]-=1<<13;mask=(c^1)-1;for(i=0;i<10;i++)g[i]&=mask;mask=~mask;for(i=0;i<10;i++)this.h[i]=this.h[i]&mask|g[i];this.h[0]=(this.h[0]|this.h[1]<<13)&65535;this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535;this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535;this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535;this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535;this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535;this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535;this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535;f=this.h[0]+this.pad[0];this.h[0]=f&65535;for(i=1;i<8;i++){f=(this.h[i]+this.pad[i]|0)+(f>>>16)|0;this.h[i]=f&65535}mac[macpos+0]=this.h[0]>>>0&255;mac[macpos+1]=this.h[0]>>>8&255;mac[macpos+2]=this.h[1]>>>0&255;mac[macpos+3]=this.h[1]>>>8&255;mac[macpos+4]=this.h[2]>>>0&255;mac[macpos+5]=this.h[2]>>>8&255;mac[macpos+6]=this.h[3]>>>0&255;mac[macpos+7]=this.h[3]>>>8&255;mac[macpos+8]=this.h[4]>>>0&255;mac[macpos+9]=this.h[4]>>>8&255;mac[macpos+10]=this.h[5]>>>0&255;mac[macpos+11]=this.h[5]>>>8&255;mac[macpos+12]=this.h[6]>>>0&255;mac[macpos+13]=this.h[6]>>>8&255;mac[macpos+14]=this.h[7]>>>0&255;mac[macpos+15]=this.h[7]>>>8&255};poly1305.prototype.update=function(m,mpos,bytes){var i,want;if(this.leftover){want=16-this.leftover;if(want>bytes)want=bytes;for(i=0;i=16){want=bytes-bytes%16;this.blocks(m,mpos,want);mpos+=want;bytes-=want}if(bytes){for(i=0;i>16&1);m[i-1]&=65535}m[15]=t[15]-32767-(m[14]>>16&1);b=m[15]>>16&1;m[14]&=65535;sel25519(t,m,1-b)}for(i=0;i<16;i++){o[2*i]=t[i]&255;o[2*i+1]=t[i]>>8}}function neq25519(a,b){var c=new Uint8Array(32),d=new Uint8Array(32);pack25519(c,a);pack25519(d,b);return crypto_verify_32(c,0,d,0)}function par25519(a){var d=new Uint8Array(32);pack25519(d,a);return d[0]&1}function unpack25519(o,n){var i;for(i=0;i<16;i++)o[i]=n[2*i]+(n[2*i+1]<<8);o[15]&=32767}function A(o,a,b){for(var i=0;i<16;i++)o[i]=a[i]+b[i]}function Z(o,a,b){for(var i=0;i<16;i++)o[i]=a[i]-b[i]}function M(o,a,b){var v,c,t0=0,t1=0,t2=0,t3=0,t4=0,t5=0,t6=0,t7=0,t8=0,t9=0,t10=0,t11=0,t12=0,t13=0,t14=0,t15=0,t16=0,t17=0,t18=0,t19=0,t20=0,t21=0,t22=0,t23=0,t24=0,t25=0,t26=0,t27=0,t28=0,t29=0,t30=0,b0=b[0],b1=b[1],b2=b[2],b3=b[3],b4=b[4],b5=b[5],b6=b[6],b7=b[7],b8=b[8],b9=b[9],b10=b[10],b11=b[11],b12=b[12],b13=b[13],b14=b[14],b15=b[15];v=a[0];t0+=v*b0;t1+=v*b1;t2+=v*b2;t3+=v*b3;t4+=v*b4;t5+=v*b5;t6+=v*b6;t7+=v*b7;t8+=v*b8;t9+=v*b9;t10+=v*b10;t11+=v*b11;t12+=v*b12;t13+=v*b13;t14+=v*b14;t15+=v*b15;v=a[1];t1+=v*b0;t2+=v*b1;t3+=v*b2;t4+=v*b3;t5+=v*b4;t6+=v*b5;t7+=v*b6;t8+=v*b7;t9+=v*b8;t10+=v*b9;t11+=v*b10;t12+=v*b11;t13+=v*b12;t14+=v*b13;t15+=v*b14;t16+=v*b15;v=a[2];t2+=v*b0;t3+=v*b1;t4+=v*b2;t5+=v*b3;t6+=v*b4;t7+=v*b5;t8+=v*b6;t9+=v*b7;t10+=v*b8;t11+=v*b9;t12+=v*b10;t13+=v*b11;t14+=v*b12;t15+=v*b13;t16+=v*b14;t17+=v*b15;v=a[3];t3+=v*b0;t4+=v*b1;t5+=v*b2;t6+=v*b3;t7+=v*b4;t8+=v*b5;t9+=v*b6;t10+=v*b7;t11+=v*b8;t12+=v*b9;t13+=v*b10;t14+=v*b11;t15+=v*b12;t16+=v*b13;t17+=v*b14;t18+=v*b15;v=a[4];t4+=v*b0;t5+=v*b1;t6+=v*b2;t7+=v*b3;t8+=v*b4;t9+=v*b5;t10+=v*b6;t11+=v*b7;t12+=v*b8;t13+=v*b9;t14+=v*b10;t15+=v*b11;t16+=v*b12;t17+=v*b13;t18+=v*b14;t19+=v*b15;v=a[5];t5+=v*b0;t6+=v*b1;t7+=v*b2;t8+=v*b3;t9+=v*b4;t10+=v*b5;t11+=v*b6;t12+=v*b7;t13+=v*b8;t14+=v*b9;t15+=v*b10;t16+=v*b11;t17+=v*b12;t18+=v*b13;t19+=v*b14;t20+=v*b15;v=a[6];t6+=v*b0;t7+=v*b1;t8+=v*b2;t9+=v*b3;t10+=v*b4;t11+=v*b5;t12+=v*b6;t13+=v*b7;t14+=v*b8;t15+=v*b9;t16+=v*b10;t17+=v*b11;t18+=v*b12;t19+=v*b13;t20+=v*b14;t21+=v*b15;v=a[7];t7+=v*b0;t8+=v*b1;t9+=v*b2;t10+=v*b3;t11+=v*b4;t12+=v*b5;t13+=v*b6;t14+=v*b7;t15+=v*b8;t16+=v*b9;t17+=v*b10;t18+=v*b11;t19+=v*b12;t20+=v*b13;t21+=v*b14;t22+=v*b15;v=a[8];t8+=v*b0;t9+=v*b1;t10+=v*b2;t11+=v*b3;t12+=v*b4;t13+=v*b5;t14+=v*b6;t15+=v*b7;t16+=v*b8;t17+=v*b9;t18+=v*b10;t19+=v*b11;t20+=v*b12;t21+=v*b13;t22+=v*b14;t23+=v*b15;v=a[9];t9+=v*b0;t10+=v*b1;t11+=v*b2;t12+=v*b3;t13+=v*b4;t14+=v*b5;t15+=v*b6;t16+=v*b7;t17+=v*b8;t18+=v*b9;t19+=v*b10;t20+=v*b11;t21+=v*b12;t22+=v*b13;t23+=v*b14;t24+=v*b15;v=a[10];t10+=v*b0;t11+=v*b1;t12+=v*b2;t13+=v*b3;t14+=v*b4;t15+=v*b5;t16+=v*b6;t17+=v*b7;t18+=v*b8;t19+=v*b9;t20+=v*b10;t21+=v*b11;t22+=v*b12;t23+=v*b13;t24+=v*b14;t25+=v*b15;v=a[11];t11+=v*b0;t12+=v*b1;t13+=v*b2;t14+=v*b3;t15+=v*b4;t16+=v*b5;t17+=v*b6;t18+=v*b7;t19+=v*b8;t20+=v*b9;t21+=v*b10;t22+=v*b11;t23+=v*b12;t24+=v*b13;t25+=v*b14;t26+=v*b15;v=a[12];t12+=v*b0;t13+=v*b1;t14+=v*b2;t15+=v*b3;t16+=v*b4;t17+=v*b5;t18+=v*b6;t19+=v*b7;t20+=v*b8;t21+=v*b9;t22+=v*b10;t23+=v*b11;t24+=v*b12;t25+=v*b13;t26+=v*b14;t27+=v*b15;v=a[13];t13+=v*b0;t14+=v*b1;t15+=v*b2;t16+=v*b3;t17+=v*b4;t18+=v*b5;t19+=v*b6;t20+=v*b7;t21+=v*b8;t22+=v*b9;t23+=v*b10;t24+=v*b11;t25+=v*b12;t26+=v*b13;t27+=v*b14;t28+=v*b15;v=a[14];t14+=v*b0;t15+=v*b1;t16+=v*b2;t17+=v*b3;t18+=v*b4;t19+=v*b5;t20+=v*b6;t21+=v*b7;t22+=v*b8;t23+=v*b9;t24+=v*b10;t25+=v*b11;t26+=v*b12;t27+=v*b13;t28+=v*b14;t29+=v*b15;v=a[15];t15+=v*b0;t16+=v*b1;t17+=v*b2;t18+=v*b3;t19+=v*b4;t20+=v*b5;t21+=v*b6;t22+=v*b7;t23+=v*b8;t24+=v*b9;t25+=v*b10;t26+=v*b11;t27+=v*b12;t28+=v*b13;t29+=v*b14;t30+=v*b15;t0+=38*t16;t1+=38*t17;t2+=38*t18;t3+=38*t19;t4+=38*t20;t5+=38*t21;t6+=38*t22;t7+=38*t23;t8+=38*t24;t9+=38*t25;t10+=38*t26;t11+=38*t27;t12+=38*t28;t13+=38*t29;t14+=38*t30;c=1;v=t0+c+65535;c=Math.floor(v/65536);t0=v-c*65536;v=t1+c+65535;c=Math.floor(v/65536);t1=v-c*65536;v=t2+c+65535;c=Math.floor(v/65536);t2=v-c*65536;v=t3+c+65535;c=Math.floor(v/65536);t3=v-c*65536;v=t4+c+65535;c=Math.floor(v/65536);t4=v-c*65536;v=t5+c+65535;c=Math.floor(v/65536);t5=v-c*65536;v=t6+c+65535;c=Math.floor(v/65536);t6=v-c*65536;v=t7+c+65535;c=Math.floor(v/65536);t7=v-c*65536;v=t8+c+65535;c=Math.floor(v/65536);t8=v-c*65536;v=t9+c+65535;c=Math.floor(v/65536);t9=v-c*65536;v=t10+c+65535;c=Math.floor(v/65536);t10=v-c*65536;v=t11+c+65535;c=Math.floor(v/65536);t11=v-c*65536;v=t12+c+65535;c=Math.floor(v/65536);t12=v-c*65536;v=t13+c+65535;c=Math.floor(v/65536);t13=v-c*65536;v=t14+c+65535;c=Math.floor(v/65536);t14=v-c*65536;v=t15+c+65535;c=Math.floor(v/65536);t15=v-c*65536;t0+=c-1+37*(c-1);c=1;v=t0+c+65535;c=Math.floor(v/65536);t0=v-c*65536;v=t1+c+65535;c=Math.floor(v/65536);t1=v-c*65536;v=t2+c+65535;c=Math.floor(v/65536);t2=v-c*65536;v=t3+c+65535;c=Math.floor(v/65536);t3=v-c*65536;v=t4+c+65535;c=Math.floor(v/65536);t4=v-c*65536;v=t5+c+65535;c=Math.floor(v/65536);t5=v-c*65536;v=t6+c+65535;c=Math.floor(v/65536);t6=v-c*65536;v=t7+c+65535;c=Math.floor(v/65536);t7=v-c*65536;v=t8+c+65535;c=Math.floor(v/65536);t8=v-c*65536;v=t9+c+65535;c=Math.floor(v/65536);t9=v-c*65536;v=t10+c+65535;c=Math.floor(v/65536);t10=v-c*65536;v=t11+c+65535;c=Math.floor(v/65536);t11=v-c*65536;v=t12+c+65535;c=Math.floor(v/65536);t12=v-c*65536;v=t13+c+65535;c=Math.floor(v/65536);t13=v-c*65536;v=t14+c+65535;c=Math.floor(v/65536);t14=v-c*65536;v=t15+c+65535;c=Math.floor(v/65536);t15=v-c*65536;t0+=c-1+37*(c-1);o[0]=t0;o[1]=t1;o[2]=t2;o[3]=t3;o[4]=t4;o[5]=t5;o[6]=t6;o[7]=t7;o[8]=t8;o[9]=t9;o[10]=t10;o[11]=t11;o[12]=t12;o[13]=t13;o[14]=t14;o[15]=t15}function S(o,a){M(o,a,a)}function inv25519(o,i){var c=gf();var a;for(a=0;a<16;a++)c[a]=i[a];for(a=253;a>=0;a--){S(c,c);if(a!==2&&a!==4)M(c,c,i)}for(a=0;a<16;a++)o[a]=c[a]}function pow2523(o,i){var c=gf();var a;for(a=0;a<16;a++)c[a]=i[a];for(a=250;a>=0;a--){S(c,c);if(a!==1)M(c,c,i)}for(a=0;a<16;a++)o[a]=c[a]}function crypto_scalarmult(q,n,p){var z=new Uint8Array(32);var x=new Float64Array(80),r,i;var a=gf(),b=gf(),c=gf(),d=gf(),e=gf(),f=gf();for(i=0;i<31;i++)z[i]=n[i];z[31]=n[31]&127|64;z[0]&=248;unpack25519(x,p);for(i=0;i<16;i++){b[i]=x[i];d[i]=a[i]=c[i]=0}a[0]=d[0]=1;for(i=254;i>=0;--i){r=z[i>>>3]>>>(i&7)&1;sel25519(a,b,r);sel25519(c,d,r);A(e,a,c);Z(a,a,c);A(c,b,d);Z(b,b,d);S(d,e);S(f,a);M(a,c,a);M(c,b,e);A(e,a,c);Z(a,a,c);S(b,a);Z(c,d,f);M(a,c,_121665);A(a,a,d);M(c,c,a);M(a,d,f);M(d,b,x);S(b,e);sel25519(a,b,r);sel25519(c,d,r)}for(i=0;i<16;i++){x[i+16]=a[i];x[i+32]=c[i];x[i+48]=b[i];x[i+64]=d[i]}var x32=x.subarray(32);var x16=x.subarray(16);inv25519(x32,x32);M(x16,x16,x32);pack25519(q,x16);return 0}function crypto_scalarmult_base(q,n){return crypto_scalarmult(q,n,_9)}function crypto_box_keypair(y,x){randombytes(x,32);return crypto_scalarmult_base(y,x)}function crypto_box_beforenm(k,y,x){var s=new Uint8Array(32);crypto_scalarmult(s,x,y);return crypto_core_hsalsa20(k,_0,s,sigma)}var crypto_box_afternm=crypto_secretbox;var crypto_box_open_afternm=crypto_secretbox_open;function crypto_box(c,m,d,n,y,x){var k=new Uint8Array(32);crypto_box_beforenm(k,y,x);return crypto_box_afternm(c,m,d,n,k)}function crypto_box_open(m,c,d,n,y,x){var k=new Uint8Array(32);crypto_box_beforenm(k,y,x);return crypto_box_open_afternm(m,c,d,n,k)}var K=[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 crypto_hashblocks_hl(hh,hl,m,n){var wh=new Int32Array(16),wl=new Int32Array(16),bh0,bh1,bh2,bh3,bh4,bh5,bh6,bh7,bl0,bl1,bl2,bl3,bl4,bl5,bl6,bl7,th,tl,i,j,h,l,a,b,c,d;var ah0=hh[0],ah1=hh[1],ah2=hh[2],ah3=hh[3],ah4=hh[4],ah5=hh[5],ah6=hh[6],ah7=hh[7],al0=hl[0],al1=hl[1],al2=hl[2],al3=hl[3],al4=hl[4],al5=hl[5],al6=hl[6],al7=hl[7];var pos=0;while(n>=128){for(i=0;i<16;i++){j=8*i+pos;wh[i]=m[j+0]<<24|m[j+1]<<16|m[j+2]<<8|m[j+3];wl[i]=m[j+4]<<24|m[j+5]<<16|m[j+6]<<8|m[j+7]}for(i=0;i<80;i++){bh0=ah0;bh1=ah1;bh2=ah2;bh3=ah3;bh4=ah4;bh5=ah5;bh6=ah6;bh7=ah7;bl0=al0;bl1=al1;bl2=al2;bl3=al3;bl4=al4;bl5=al5;bl6=al6;bl7=al7;h=ah7;l=al7;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=(ah4>>>14|al4<<32-14)^(ah4>>>18|al4<<32-18)^(al4>>>41-32|ah4<<32-(41-32));l=(al4>>>14|ah4<<32-14)^(al4>>>18|ah4<<32-18)^(ah4>>>41-32|al4<<32-(41-32));a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;h=ah4&ah5^~ah4&ah6;l=al4&al5^~al4&al6;a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;h=K[i*2];l=K[i*2+1];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;h=wh[i%16];l=wl[i%16];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;th=c&65535|d<<16;tl=a&65535|b<<16;h=th;l=tl;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=(ah0>>>28|al0<<32-28)^(al0>>>34-32|ah0<<32-(34-32))^(al0>>>39-32|ah0<<32-(39-32));l=(al0>>>28|ah0<<32-28)^(ah0>>>34-32|al0<<32-(34-32))^(ah0>>>39-32|al0<<32-(39-32));a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;h=ah0&ah1^ah0&ah2^ah1&ah2;l=al0&al1^al0&al2^al1&al2;a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;bh7=c&65535|d<<16;bl7=a&65535|b<<16;h=bh3;l=bl3;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=th;l=tl;a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;bh3=c&65535|d<<16;bl3=a&65535|b<<16;ah1=bh0;ah2=bh1;ah3=bh2;ah4=bh3;ah5=bh4;ah6=bh5;ah7=bh6;ah0=bh7;al1=bl0;al2=bl1;al3=bl2;al4=bl3;al5=bl4;al6=bl5;al7=bl6;al0=bl7;if(i%16===15){for(j=0;j<16;j++){h=wh[j];l=wl[j];a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=wh[(j+9)%16];l=wl[(j+9)%16];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;th=wh[(j+1)%16];tl=wl[(j+1)%16];h=(th>>>1|tl<<32-1)^(th>>>8|tl<<32-8)^th>>>7;l=(tl>>>1|th<<32-1)^(tl>>>8|th<<32-8)^(tl>>>7|th<<32-7);a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;th=wh[(j+14)%16];tl=wl[(j+14)%16];h=(th>>>19|tl<<32-19)^(tl>>>61-32|th<<32-(61-32))^th>>>6;l=(tl>>>19|th<<32-19)^(th>>>61-32|tl<<32-(61-32))^(tl>>>6|th<<32-6);a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;wh[j]=c&65535|d<<16;wl[j]=a&65535|b<<16}}}h=ah0;l=al0;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[0];l=hl[0];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[0]=ah0=c&65535|d<<16;hl[0]=al0=a&65535|b<<16;h=ah1;l=al1;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[1];l=hl[1];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[1]=ah1=c&65535|d<<16;hl[1]=al1=a&65535|b<<16;h=ah2;l=al2;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[2];l=hl[2];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[2]=ah2=c&65535|d<<16;hl[2]=al2=a&65535|b<<16;h=ah3;l=al3;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[3];l=hl[3];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[3]=ah3=c&65535|d<<16;hl[3]=al3=a&65535|b<<16;h=ah4;l=al4;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[4];l=hl[4];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[4]=ah4=c&65535|d<<16;hl[4]=al4=a&65535|b<<16;h=ah5;l=al5;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[5];l=hl[5];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[5]=ah5=c&65535|d<<16;hl[5]=al5=a&65535|b<<16;h=ah6;l=al6;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[6];l=hl[6];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[6]=ah6=c&65535|d<<16;hl[6]=al6=a&65535|b<<16;h=ah7;l=al7;a=l&65535;b=l>>>16;c=h&65535;d=h>>>16;h=hh[7];l=hl[7];a+=l&65535;b+=l>>>16;c+=h&65535;d+=h>>>16;b+=a>>>16;c+=b>>>16;d+=c>>>16;hh[7]=ah7=c&65535|d<<16;hl[7]=al7=a&65535|b<<16;pos+=128;n-=128}return n}function crypto_hash(out,m,n){var hh=new Int32Array(8),hl=new Int32Array(8),x=new Uint8Array(256),i,b=n;hh[0]=1779033703;hh[1]=3144134277;hh[2]=1013904242;hh[3]=2773480762;hh[4]=1359893119;hh[5]=2600822924;hh[6]=528734635;hh[7]=1541459225;hl[0]=4089235720;hl[1]=2227873595;hl[2]=4271175723;hl[3]=1595750129;hl[4]=2917565137;hl[5]=725511199;hl[6]=4215389547;hl[7]=327033209;crypto_hashblocks_hl(hh,hl,m,n);n%=128;for(i=0;i=0;--i){b=s[i/8|0]>>(i&7)&1;cswap(p,q,b);add(q,p);add(p,p);cswap(p,q,b)}}function scalarbase(p,s){var q=[gf(),gf(),gf(),gf()];set25519(q[0],X);set25519(q[1],Y);set25519(q[2],gf1);M(q[3],X,Y);scalarmult(p,q,s)}function crypto_sign_keypair(pk,sk,seeded){var d=new Uint8Array(64);var p=[gf(),gf(),gf(),gf()];var i;if(!seeded)randombytes(sk,32);crypto_hash(d,sk,32);d[0]&=248;d[31]&=127;d[31]|=64;scalarbase(p,d);pack(pk,p);for(i=0;i<32;i++)sk[i+32]=pk[i];return 0}var L=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function modL(r,x){var carry,i,j,k;for(i=63;i>=32;--i){carry=0;for(j=i-32,k=i-12;j>8;x[j]-=carry*256}x[j]+=carry;x[i]=0}carry=0;for(j=0;j<32;j++){x[j]+=carry-(x[31]>>4)*L[j];carry=x[j]>>8;x[j]&=255}for(j=0;j<32;j++)x[j]-=carry*L[j];for(i=0;i<32;i++){x[i+1]+=x[i]>>8;r[i]=x[i]&255}}function reduce(r){var x=new Float64Array(64),i;for(i=0;i<64;i++)x[i]=r[i];for(i=0;i<64;i++)r[i]=0;modL(r,x)}function crypto_sign(sm,m,n,sk){var d=new Uint8Array(64),h=new Uint8Array(64),r=new Uint8Array(64);var i,j,x=new Float64Array(64);var p=[gf(),gf(),gf(),gf()];crypto_hash(d,sk,32);d[0]&=248;d[31]&=127;d[31]|=64;var smlen=n+64;for(i=0;i>7)Z(r[0],gf0,r[0]);M(r[3],r[0],r[1]);return 0}function crypto_sign_open(m,sm,n,pk){var i,mlen;var t=new Uint8Array(32),h=new Uint8Array(64);var p=[gf(),gf(),gf(),gf()],q=[gf(),gf(),gf(),gf()];mlen=-1;if(n<64)return-1;if(unpackneg(q,pk))return-1;for(i=0;i=0};nacl.sign.keyPair=function(){var pk=new Uint8Array(crypto_sign_PUBLICKEYBYTES);var sk=new Uint8Array(crypto_sign_SECRETKEYBYTES);crypto_sign_keypair(pk,sk);return{publicKey:pk,secretKey:sk}};nacl.sign.keyPair.fromSecretKey=function(secretKey){checkArrayTypes(secretKey);if(secretKey.length!==crypto_sign_SECRETKEYBYTES)throw new Error("bad secret key size");var pk=new Uint8Array(crypto_sign_PUBLICKEYBYTES);for(var i=0;i",'"',"`"," ","\r","\n"," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=require("querystring");function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url)){throw new TypeError("Parameter 'url' must be a string, not "+typeof url)}var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex127){newpart+="x"}else{newpart+=part[j]}}if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length){rest="/"+notHost.join(".")+rest}this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!ipv6Hostname){this.hostname=punycode.toASCII(this.hostname)}var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/"){rest="/"+rest}}}if(!unsafeProtocol[lowerProto]){for(var i=0,l=autoEscape.length;i0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}result.search=relative.search;result.query=relative.query;if(!util.isNull(result.pathname)||!util.isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search){result.path="/"+result.search}else{result.path=null}result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&(last==="."||last==="..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last==="."){srcPath.splice(i,1)}else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots){for(;up--;up){srcPath.unshift("..")}}if(mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")){srcPath.unshift("")}if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"){srcPath.push("")}var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift("")}if(!srcPath.length){result.pathname=null;result.path=null}else{result.pathname=srcPath.join("/")}if(!util.isNull(result.pathname)||!util.isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==":"){this.port=port.substr(1)}host=host.substr(0,host.length-port.length)}if(host)this.hostname=host}},{"./util":289,punycode:205,querystring:213}],289:[function(require,module,exports){"use strict";module.exports={isString:function(arg){return typeof arg==="string"},isObject:function(arg){return typeof arg==="object"&&arg!==null},isNull:function(arg){return arg===null},isNullOrUndefined:function(arg){return arg==null}}},{}],290:[function(require,module,exports){!function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}.call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],291:[function(require,module,exports){arguments[4][152][0].apply(exports,arguments)},{dup:152}],292:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],293:[function(require,module,exports){!function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts +}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}.call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":292,_process:198,inherits:291}],294:[function(require,module,exports){var v1=require("./v1");var v4=require("./v4");var uuid=v4;uuid.v1=v1;uuid.v4=v4;module.exports=uuid},{"./v1":297,"./v4":298}],295:[function(require,module,exports){var byteToHex=[];for(var i=0;i<256;++i){byteToHex[i]=(i+256).toString(16).substr(1)}function bytesToUuid(buf,offset){var i=offset||0;var bth=byteToHex;return bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]}module.exports=bytesToUuid},{}],296:[function(require,module,exports){!function(global){var rng;var crypto=global.crypto||global.msCrypto;if(crypto&&crypto.getRandomValues){var rnds8=new Uint8Array(16);rng=function whatwgRNG(){crypto.getRandomValues(rnds8);return rnds8}}if(!rng){var rnds=new Array(16);rng=function(){for(var i=0,r;i<16;i++){if((i&3)===0)r=Math.random()*4294967296;rnds[i]=r>>>((i&3)<<3)&255}return rnds}}module.exports=rng}.call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],297:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");var _seedBytes=rng();var _nodeId=[_seedBytes[0]|1,_seedBytes[1],_seedBytes[2],_seedBytes[3],_seedBytes[4],_seedBytes[5]];var _clockseq=(_seedBytes[6]<<8|_seedBytes[7])&16383;var _lastMSecs=0,_lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||[];options=options||{};var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;var msecs=options.msecs!==undefined?options.msecs:(new Date).getTime();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;var node=options.node||_nodeId;for(var n=0;n<6;++n){b[i+n]=node[n]}return buf?buf:bytesToUuid(b)}module.exports=v1},{"./lib/bytesToUuid":295,"./lib/rng":296}],298:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");function v4(options,buf,offset){var i=buf&&offset||0;if(typeof options=="string"){buf=options=="binary"?new Array(16):null;options=null}options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){for(var ii=0;ii<16;++ii){buf[i+ii]=rnds[ii]}}return buf||bytesToUuid(rnds)}module.exports=v4},{"./lib/bytesToUuid":295,"./lib/rng":296}],299:[function(require,module,exports){var mod_assert=require("assert");var mod_util=require("util");var mod_extsprintf=require("extsprintf");exports.VError=VError;exports.WError=WError;exports.MultiError=MultiError;function VError(options){var args,causedBy,ctor,tailmsg;if(options instanceof Error||typeof options==="object"){args=Array.prototype.slice.call(arguments,1)}else{args=Array.prototype.slice.call(arguments,0);options=undefined}tailmsg=args.length>0?mod_extsprintf.sprintf.apply(null,args):"";this.jse_shortmsg=tailmsg;this.jse_summary=tailmsg;if(options){causedBy=options.cause;if(!causedBy||!(options.cause instanceof Error))causedBy=options;if(causedBy&&causedBy instanceof Error){this.jse_cause=causedBy;this.jse_summary+=": "+causedBy.message}}this.message=this.jse_summary;Error.call(this,this.jse_summary);if(Error.captureStackTrace){ctor=options?options.constructorOpt:undefined;ctor=ctor||arguments.callee;Error.captureStackTrace(this,ctor)}}mod_util.inherits(VError,Error);VError.prototype.name="VError";VError.prototype.toString=function ve_toString(){var str=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;if(this.message)str+=": "+this.message;return str};VError.prototype.cause=function ve_cause(){return this.jse_cause};function MultiError(errors){mod_assert.ok(errors.length>0);this.ase_errors=errors;VError.call(this,errors[0],"first of %d error%s",errors.length,errors.length==1?"":"s")}mod_util.inherits(MultiError,VError);function WError(options){Error.call(this);var args,cause,ctor;if(typeof options==="object"){args=Array.prototype.slice.call(arguments,1)}else{args=Array.prototype.slice.call(arguments,0);options=undefined}if(args.length>0){this.message=mod_extsprintf.sprintf.apply(null,args)}else{this.message=""}if(options){if(options instanceof Error){cause=options}else{cause=options.cause;ctor=options.constructorOpt}}Error.captureStackTrace(this,ctor||this.constructor);if(cause)this.cause(cause)}mod_util.inherits(WError,Error);WError.prototype.name="WError";WError.prototype.toString=function we_toString(){var str=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;if(this.message)str+=": "+this.message;if(this.we_cause&&this.we_cause.message)str+="; caused by "+this.we_cause.toString();return str};WError.prototype.cause=function we_cause(c){if(c instanceof Error)this.we_cause=c;return this.we_cause}},{assert:29,extsprintf:113,util:293}],300:[function(require,module,exports){var indexOf=require("indexof");var Object_keys=function(obj){if(Object.keys)return Object.keys(obj);else{var res=[];for(var key in obj)res.push(key);return res}};var forEach=function(xs,fn){if(xs.forEach)return xs.forEach(fn);else for(var i=0;i",amp:"&",quot:'"',apos:"'"};if(locator){domBuilder.setDocumentLocator(locator)}sax.errorHandler=buildErrorHandler(errorHandler,domBuilder,locator);sax.domBuilder=options.domBuilder||domBuilder;if(/\/x?html?$/.test(mimeType)){entityMap.nbsp=" ";entityMap.copy="©";defaultNSMap[""]="http://www.w3.org/1999/xhtml"}defaultNSMap.xml=defaultNSMap.xml||"http://www.w3.org/XML/1998/namespace";if(source){sax.parse(source,defaultNSMap,entityMap)}else{sax.errorHandler.error("invalid doc source")}return domBuilder.doc};function buildErrorHandler(errorImpl,domBuilder,locator){if(!errorImpl){if(domBuilder instanceof DOMHandler){return domBuilder}errorImpl=domBuilder}var errorHandler={};var isCallback=errorImpl instanceof Function;locator=locator||{};function build(key){var fn=errorImpl[key];if(!fn&&isCallback){fn=errorImpl.length==2?function(msg){errorImpl(key,msg)}:errorImpl}errorHandler[key]=fn&&function(msg){fn("[xmldom "+key+"] "+msg+_locator(locator))}||function(){}}build("warning");build("error");build("fatalError");return errorHandler}function DOMHandler(){this.cdata=false}function position(locator,node){node.lineNumber=locator.lineNumber;node.columnNumber=locator.columnNumber}DOMHandler.prototype={startDocument:function(){this.doc=(new DOMImplementation).createDocument(null,null,null);if(this.locator){this.doc.documentURI=this.locator.systemId}},startElement:function(namespaceURI,localName,qName,attrs){var doc=this.doc;var el=doc.createElementNS(namespaceURI,qName||localName);var len=attrs.length;appendElement(this,el);this.currentElement=el;this.locator&&position(this.locator,el);for(var i=0;i=start+length||start){return new java.lang.String(chars,start,length)+""}return chars}}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){DOMHandler.prototype[key]=function(){return null}});function appendElement(hander,node){if(!hander.currentElement){hander.doc.appendChild(node)}else{hander.currentElement.appendChild(node)}}var XMLReader=require("./sax").XMLReader;var DOMImplementation=exports.DOMImplementation=require("./dom").DOMImplementation;exports.XMLSerializer=require("./dom").XMLSerializer;exports.DOMParser=DOMParser},{"./dom":302,"./sax":303}],302:[function(require,module,exports){function copy(src,dest){for(var p in src){dest[p]=src[p]}}function _extends(Class,Super){var pt=Class.prototype;if(Object.create){var ppt=Object.create(Super.prototype);pt.__proto__=ppt}if(!(pt instanceof Super)){function t(){}t.prototype=Super.prototype;t=new t;copy(pt,t);Class.prototype=pt=t}if(pt.constructor!=Class){if(typeof Class!="function"){console.error("unknow Class:"+Class)}pt.constructor=Class}}var htmlns="http://www.w3.org/1999/xhtml";var NodeType={};var ELEMENT_NODE=NodeType.ELEMENT_NODE=1;var ATTRIBUTE_NODE=NodeType.ATTRIBUTE_NODE=2;var TEXT_NODE=NodeType.TEXT_NODE=3;var CDATA_SECTION_NODE=NodeType.CDATA_SECTION_NODE=4;var ENTITY_REFERENCE_NODE=NodeType.ENTITY_REFERENCE_NODE=5;var ENTITY_NODE=NodeType.ENTITY_NODE=6;var PROCESSING_INSTRUCTION_NODE=NodeType.PROCESSING_INSTRUCTION_NODE=7;var COMMENT_NODE=NodeType.COMMENT_NODE=8;var DOCUMENT_NODE=NodeType.DOCUMENT_NODE=9;var DOCUMENT_TYPE_NODE=NodeType.DOCUMENT_TYPE_NODE=10;var DOCUMENT_FRAGMENT_NODE=NodeType.DOCUMENT_FRAGMENT_NODE=11;var NOTATION_NODE=NodeType.NOTATION_NODE=12;var ExceptionCode={};var ExceptionMessage={};var INDEX_SIZE_ERR=ExceptionCode.INDEX_SIZE_ERR=(ExceptionMessage[1]="Index size error",1);var DOMSTRING_SIZE_ERR=ExceptionCode.DOMSTRING_SIZE_ERR=(ExceptionMessage[2]="DOMString size error",2);var HIERARCHY_REQUEST_ERR=ExceptionCode.HIERARCHY_REQUEST_ERR=(ExceptionMessage[3]="Hierarchy request error",3);var WRONG_DOCUMENT_ERR=ExceptionCode.WRONG_DOCUMENT_ERR=(ExceptionMessage[4]="Wrong document",4);var INVALID_CHARACTER_ERR=ExceptionCode.INVALID_CHARACTER_ERR=(ExceptionMessage[5]="Invalid character",5);var NO_DATA_ALLOWED_ERR=ExceptionCode.NO_DATA_ALLOWED_ERR=(ExceptionMessage[6]="No data allowed",6);var NO_MODIFICATION_ALLOWED_ERR=ExceptionCode.NO_MODIFICATION_ALLOWED_ERR=(ExceptionMessage[7]="No modification allowed",7);var NOT_FOUND_ERR=ExceptionCode.NOT_FOUND_ERR=(ExceptionMessage[8]="Not found",8);var NOT_SUPPORTED_ERR=ExceptionCode.NOT_SUPPORTED_ERR=(ExceptionMessage[9]="Not supported",9);var INUSE_ATTRIBUTE_ERR=ExceptionCode.INUSE_ATTRIBUTE_ERR=(ExceptionMessage[10]="Attribute in use",10);var INVALID_STATE_ERR=ExceptionCode.INVALID_STATE_ERR=(ExceptionMessage[11]="Invalid state",11);var SYNTAX_ERR=ExceptionCode.SYNTAX_ERR=(ExceptionMessage[12]="Syntax error",12);var INVALID_MODIFICATION_ERR=ExceptionCode.INVALID_MODIFICATION_ERR=(ExceptionMessage[13]="Invalid modification",13);var NAMESPACE_ERR=ExceptionCode.NAMESPACE_ERR=(ExceptionMessage[14]="Invalid namespace",14);var INVALID_ACCESS_ERR=ExceptionCode.INVALID_ACCESS_ERR=(ExceptionMessage[15]="Invalid access",15);function DOMException(code,message){if(message instanceof Error){var error=message}else{error=this;Error.call(this,ExceptionMessage[code]);this.message=ExceptionMessage[code];if(Error.captureStackTrace)Error.captureStackTrace(this,DOMException)}error.code=code;if(message)this.message=this.message+": "+message;return error}DOMException.prototype=Error.prototype;copy(ExceptionCode,DOMException);function NodeList(){}NodeList.prototype={length:0,item:function(index){return this[index]||null},toString:function(isHTML,nodeFilter){for(var buf=[],i=0;i=0){var lastIndex=list.length-1;while(i0},lookupPrefix:function(namespaceURI){var el=this;while(el){var map=el._nsMap;if(map){for(var n in map){if(map[n]==namespaceURI){return n}}}el=el.nodeType==ATTRIBUTE_NODE?el.ownerDocument:el.parentNode}return null},lookupNamespaceURI:function(prefix){var el=this;while(el){var map=el._nsMap;if(map){if(prefix in map){return map[prefix]}}el=el.nodeType==ATTRIBUTE_NODE?el.ownerDocument:el.parentNode}return null},isDefaultNamespace:function(namespaceURI){var prefix=this.lookupPrefix(namespaceURI);return prefix==null}};function _xmlEncoder(c){return c=="<"&&"<"||c==">"&&">"||c=="&"&&"&"||c=='"'&&"""||"&#"+c.charCodeAt()+";"}copy(NodeType,Node);copy(NodeType,Node.prototype);function _visitNode(node,callback){if(callback(node)){return true}if(node=node.firstChild){do{if(_visitNode(node,callback)){return true}}while(node=node.nextSibling)}}function Document(){}function _onAddAttribute(doc,el,newAttr){doc&&doc._inc++;var ns=newAttr.namespaceURI;if(ns=="http://www.w3.org/2000/xmlns/"){el._nsMap[newAttr.prefix?newAttr.localName:""]=newAttr.value}}function _onRemoveAttribute(doc,el,newAttr,remove){doc&&doc._inc++;var ns=newAttr.namespaceURI;if(ns=="http://www.w3.org/2000/xmlns/"){delete el._nsMap[newAttr.prefix?newAttr.localName:""]}}function _onUpdateChild(doc,el,newChild){if(doc&&doc._inc){doc._inc++;var cs=el.childNodes;if(newChild){cs[cs.length++]=newChild}else{var child=el.firstChild;var i=0;while(child){cs[i++]=child;child=child.nextSibling}cs.length=i}}}function _removeChild(parentNode,child){var previous=child.previousSibling;var next=child.nextSibling;if(previous){previous.nextSibling=next}else{parentNode.firstChild=next}if(next){next.previousSibling=previous}else{parentNode.lastChild=previous}_onUpdateChild(parentNode.ownerDocument,parentNode);return child}function _insertBefore(parentNode,newChild,nextChild){var cp=newChild.parentNode;if(cp){cp.removeChild(newChild)}if(newChild.nodeType===DOCUMENT_FRAGMENT_NODE){var newFirst=newChild.firstChild;if(newFirst==null){return newChild}var newLast=newChild.lastChild}else{newFirst=newLast=newChild}var pre=nextChild?nextChild.previousSibling:parentNode.lastChild;newFirst.previousSibling=pre;newLast.nextSibling=nextChild;if(pre){pre.nextSibling=newFirst}else{parentNode.firstChild=newFirst}if(nextChild==null){parentNode.lastChild=newLast}else{nextChild.previousSibling=newLast}do{newFirst.parentNode=parentNode}while(newFirst!==newLast&&(newFirst=newFirst.nextSibling));_onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);if(newChild.nodeType==DOCUMENT_FRAGMENT_NODE){newChild.firstChild=newChild.lastChild=null}return newChild}function _appendSingleChild(parentNode,newChild){var cp=newChild.parentNode;if(cp){var pre=parentNode.lastChild;cp.removeChild(newChild);var pre=parentNode.lastChild}var pre=parentNode.lastChild;newChild.parentNode=parentNode;newChild.previousSibling=pre;newChild.nextSibling=null;if(pre){pre.nextSibling=newChild}else{parentNode.firstChild=newChild}parentNode.lastChild=newChild;_onUpdateChild(parentNode.ownerDocument,parentNode,newChild);return newChild}Document.prototype={nodeName:"#document",nodeType:DOCUMENT_NODE,doctype:null,documentElement:null,_inc:1,insertBefore:function(newChild,refChild){if(newChild.nodeType==DOCUMENT_FRAGMENT_NODE){var child=newChild.firstChild;while(child){var next=child.nextSibling;this.insertBefore(child,refChild);child=next}return newChild}if(this.documentElement==null&&newChild.nodeType==ELEMENT_NODE){this.documentElement=newChild}return _insertBefore(this,newChild,refChild),newChild.ownerDocument=this,newChild},removeChild:function(oldChild){if(this.documentElement==oldChild){this.documentElement=null}return _removeChild(this,oldChild)},importNode:function(importedNode,deep){return importNode(this,importedNode,deep)},getElementById:function(id){var rtv=null;_visitNode(this.documentElement,function(node){if(node.nodeType==ELEMENT_NODE){if(node.getAttribute("id")==id){rtv=node; +return true}}});return rtv},createElement:function(tagName){var node=new Element;node.ownerDocument=this;node.nodeName=tagName;node.tagName=tagName;node.childNodes=new NodeList;var attrs=node.attributes=new NamedNodeMap;attrs._ownerElement=node;return node},createDocumentFragment:function(){var node=new DocumentFragment;node.ownerDocument=this;node.childNodes=new NodeList;return node},createTextNode:function(data){var node=new Text;node.ownerDocument=this;node.appendData(data);return node},createComment:function(data){var node=new Comment;node.ownerDocument=this;node.appendData(data);return node},createCDATASection:function(data){var node=new CDATASection;node.ownerDocument=this;node.appendData(data);return node},createProcessingInstruction:function(target,data){var node=new ProcessingInstruction;node.ownerDocument=this;node.tagName=node.target=target;node.nodeValue=node.data=data;return node},createAttribute:function(name){var node=new Attr;node.ownerDocument=this;node.name=name;node.nodeName=name;node.localName=name;node.specified=true;return node},createEntityReference:function(name){var node=new EntityReference;node.ownerDocument=this;node.nodeName=name;return node},createElementNS:function(namespaceURI,qualifiedName){var node=new Element;var pl=qualifiedName.split(":");var attrs=node.attributes=new NamedNodeMap;node.childNodes=new NodeList;node.ownerDocument=this;node.nodeName=qualifiedName;node.tagName=qualifiedName;node.namespaceURI=namespaceURI;if(pl.length==2){node.prefix=pl[0];node.localName=pl[1]}else{node.localName=qualifiedName}attrs._ownerElement=node;return node},createAttributeNS:function(namespaceURI,qualifiedName){var node=new Attr;var pl=qualifiedName.split(":");node.ownerDocument=this;node.nodeName=qualifiedName;node.name=qualifiedName;node.namespaceURI=namespaceURI;node.specified=true;if(pl.length==2){node.prefix=pl[0];node.localName=pl[1]}else{node.localName=qualifiedName}return node}};_extends(Document,Node);function Element(){this._nsMap={}}Element.prototype={nodeType:ELEMENT_NODE,hasAttribute:function(name){return this.getAttributeNode(name)!=null},getAttribute:function(name){var attr=this.getAttributeNode(name);return attr&&attr.value||""},getAttributeNode:function(name){return this.attributes.getNamedItem(name)},setAttribute:function(name,value){var attr=this.ownerDocument.createAttribute(name);attr.value=attr.nodeValue=""+value;this.setAttributeNode(attr)},removeAttribute:function(name){var attr=this.getAttributeNode(name);attr&&this.removeAttributeNode(attr)},appendChild:function(newChild){if(newChild.nodeType===DOCUMENT_FRAGMENT_NODE){return this.insertBefore(newChild,null)}else{return _appendSingleChild(this,newChild)}},setAttributeNode:function(newAttr){return this.attributes.setNamedItem(newAttr)},setAttributeNodeNS:function(newAttr){return this.attributes.setNamedItemNS(newAttr)},removeAttributeNode:function(oldAttr){return this.attributes.removeNamedItem(oldAttr.nodeName)},removeAttributeNS:function(namespaceURI,localName){var old=this.getAttributeNodeNS(namespaceURI,localName);old&&this.removeAttributeNode(old)},hasAttributeNS:function(namespaceURI,localName){return this.getAttributeNodeNS(namespaceURI,localName)!=null},getAttributeNS:function(namespaceURI,localName){var attr=this.getAttributeNodeNS(namespaceURI,localName);return attr&&attr.value||""},setAttributeNS:function(namespaceURI,qualifiedName,value){var attr=this.ownerDocument.createAttributeNS(namespaceURI,qualifiedName);attr.value=attr.nodeValue=""+value;this.setAttributeNode(attr)},getAttributeNodeNS:function(namespaceURI,localName){return this.attributes.getNamedItemNS(namespaceURI,localName)},getElementsByTagName:function(tagName){return new LiveNodeList(this,function(base){var ls=[];_visitNode(base,function(node){if(node!==base&&node.nodeType==ELEMENT_NODE&&(tagName==="*"||node.tagName==tagName)){ls.push(node)}});return ls})},getElementsByTagNameNS:function(namespaceURI,localName){return new LiveNodeList(this,function(base){var ls=[];_visitNode(base,function(node){if(node!==base&&node.nodeType===ELEMENT_NODE&&(namespaceURI==="*"||node.namespaceURI===namespaceURI)&&(localName==="*"||node.localName==localName)){ls.push(node)}});return ls})}};Document.prototype.getElementsByTagName=Element.prototype.getElementsByTagName;Document.prototype.getElementsByTagNameNS=Element.prototype.getElementsByTagNameNS;_extends(Element,Node);function Attr(){}Attr.prototype.nodeType=ATTRIBUTE_NODE;_extends(Attr,Node);function CharacterData(){}CharacterData.prototype={data:"",substringData:function(offset,count){return this.data.substring(offset,offset+count)},appendData:function(text){text=this.data+text;this.nodeValue=this.data=text;this.length=text.length},insertData:function(offset,text){this.replaceData(offset,0,text)},appendChild:function(newChild){throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])},deleteData:function(offset,count){this.replaceData(offset,count,"")},replaceData:function(offset,count,text){var start=this.data.substring(0,offset);var end=this.data.substring(offset+count);text=start+text+end;this.nodeValue=this.data=text;this.length=text.length}};_extends(CharacterData,Node);function Text(){}Text.prototype={nodeName:"#text",nodeType:TEXT_NODE,splitText:function(offset){var text=this.data;var newText=text.substring(offset);text=text.substring(0,offset);this.data=this.nodeValue=text;this.length=text.length;var newNode=this.ownerDocument.createTextNode(newText);if(this.parentNode){this.parentNode.insertBefore(newNode,this.nextSibling)}return newNode}};_extends(Text,CharacterData);function Comment(){}Comment.prototype={nodeName:"#comment",nodeType:COMMENT_NODE};_extends(Comment,CharacterData);function CDATASection(){}CDATASection.prototype={nodeName:"#cdata-section",nodeType:CDATA_SECTION_NODE};_extends(CDATASection,CharacterData);function DocumentType(){}DocumentType.prototype.nodeType=DOCUMENT_TYPE_NODE;_extends(DocumentType,Node);function Notation(){}Notation.prototype.nodeType=NOTATION_NODE;_extends(Notation,Node);function Entity(){}Entity.prototype.nodeType=ENTITY_NODE;_extends(Entity,Node);function EntityReference(){}EntityReference.prototype.nodeType=ENTITY_REFERENCE_NODE;_extends(EntityReference,Node);function DocumentFragment(){}DocumentFragment.prototype.nodeName="#document-fragment";DocumentFragment.prototype.nodeType=DOCUMENT_FRAGMENT_NODE;_extends(DocumentFragment,Node);function ProcessingInstruction(){}ProcessingInstruction.prototype.nodeType=PROCESSING_INSTRUCTION_NODE;_extends(ProcessingInstruction,Node);function XMLSerializer(){}XMLSerializer.prototype.serializeToString=function(node,isHtml,nodeFilter){return nodeSerializeToString.call(node,isHtml,nodeFilter)};Node.prototype.toString=nodeSerializeToString;function nodeSerializeToString(isHtml,nodeFilter){var buf=[];var refNode=this.nodeType==9?this.documentElement:this;var prefix=refNode.prefix;var uri=refNode.namespaceURI;if(uri&&prefix==null){var prefix=refNode.lookupPrefix(uri);if(prefix==null){var visibleNamespaces=[{namespace:uri,prefix:null}]}}serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);return buf.join("")}function needNamespaceDefine(node,isHTML,visibleNamespaces){var prefix=node.prefix||"";var uri=node.namespaceURI;if(!prefix&&!uri){return false}if(prefix==="xml"&&uri==="http://www.w3.org/XML/1998/namespace"||uri=="http://www.w3.org/2000/xmlns/"){return false}var i=visibleNamespaces.length;while(i--){var ns=visibleNamespaces[i];if(ns.prefix==prefix){return ns.namespace!=uri}}return true}function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){if(nodeFilter){node=nodeFilter(node);if(node){if(typeof node=="string"){buf.push(node);return}}else{return}}switch(node.nodeType){case ELEMENT_NODE:if(!visibleNamespaces)visibleNamespaces=[];var startVisibleNamespaces=visibleNamespaces.length;var attrs=node.attributes;var len=attrs.length;var child=node.firstChild;var nodeName=node.tagName;isHTML=htmlns===node.namespaceURI||isHTML;buf.push("<",nodeName);for(var i=0;i");if(isHTML&&/^script$/i.test(nodeName)){while(child){if(child.data){buf.push(child.data)}else{serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces)}child=child.nextSibling}}else{while(child){serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);child=child.nextSibling}}buf.push("")}else{buf.push("/>")}return;case DOCUMENT_NODE:case DOCUMENT_FRAGMENT_NODE:var child=node.firstChild;while(child){serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);child=child.nextSibling}return;case ATTRIBUTE_NODE:return buf.push(" ",node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');case TEXT_NODE:return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));case CDATA_SECTION_NODE:return buf.push("");case COMMENT_NODE:return buf.push("");case DOCUMENT_TYPE_NODE:var pubid=node.publicId;var sysid=node.systemId;buf.push("')}else if(sysid&&sysid!="."){buf.push(' SYSTEM "',sysid,'">')}else{var sub=node.internalSubset;if(sub){buf.push(" [",sub,"]")}buf.push(">")}return;case PROCESSING_INSTRUCTION_NODE:return buf.push("");case ENTITY_REFERENCE_NODE:return buf.push("&",node.nodeName,";");default:buf.push("??",node.nodeName)}}function importNode(doc,node,deep){var node2;switch(node.nodeType){case ELEMENT_NODE:node2=node.cloneNode(false);node2.ownerDocument=doc;case DOCUMENT_FRAGMENT_NODE:break;case ATTRIBUTE_NODE:deep=true;break}if(!node2){node2=node.cloneNode(false)}node2.ownerDocument=doc;node2.parentNode=null;if(deep){var child=node.firstChild;while(child){node2.appendChild(importNode(doc,child,deep));child=child.nextSibling}}return node2}function cloneNode(doc,node,deep){var node2=new node.constructor;for(var n in node){var v=node[n];if(typeof v!="object"){if(v!=node2[n]){node2[n]=v}}}if(node.childNodes){node2.childNodes=new NodeList}node2.ownerDocument=doc;switch(node2.nodeType){case ELEMENT_NODE:var attrs=node.attributes;var attrs2=node2.attributes=new NamedNodeMap;var len=attrs.length;attrs2._ownerElement=node2;for(var i=0;i65535){code-=65536;var surrogate1=55296+(code>>10),surrogate2=56320+(code&1023);return String.fromCharCode(surrogate1,surrogate2)}else{return String.fromCharCode(code)}}function entityReplacer(a){var k=a.slice(1,-1);if(k in entityMap){return entityMap[k]}else if(k.charAt(0)==="#"){return fixedFromCharCode(parseInt(k.substr(1).replace("x","0x")))}else{errorHandler.error("entity not found:"+a);return a}}function appendText(end){if(end>start){var xt=source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);locator&&position(start);domBuilder.characters(xt,0,end-start);start=end}}function position(p,m){while(p>=lineEnd&&(m=linePattern.exec(source))){lineStart=m.index;lineEnd=lineStart+m[0].length;locator.lineNumber++}locator.columnNumber=p-lineStart+1}var lineStart=0;var lineEnd=0;var linePattern=/.*(?:\r\n?|\n)|.*$/g;var locator=domBuilder.locator;var parseStack=[{currentNSMap:defaultNSMapCopy}];var closeMap={};var start=0;while(true){try{var tagStart=source.indexOf("<",start);if(tagStart<0){if(!source.substr(start).match(/^\s*$/)){var doc=domBuilder.doc;var text=doc.createTextNode(source.substr(start));doc.appendChild(text);domBuilder.currentElement=text}return}if(tagStart>start){appendText(tagStart)}switch(source.charAt(tagStart+1)){case"/":var end=source.indexOf(">",tagStart+3);var tagName=source.substring(tagStart+2,end);var config=parseStack.pop();if(end<0){tagName=source.substring(tagStart+2).replace(/[\s<].*/,"");errorHandler.error("end tag name: "+tagName+" is not complete:"+config.tagName);end=tagStart+1+tagName.length}else if(tagName.match(/\sstart){start=end}else{appendText(Math.max(tagStart,start)+1)}}}function copyLocator(f,t){t.lineNumber=f.lineNumber;t.columnNumber=f.columnNumber;return t}function parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){var attrName;var value;var p=++start;var s=S_TAG;while(true){var c=source.charAt(p);switch(c){case"=":if(s===S_ATTR){attrName=source.slice(start,p);s=S_EQ}else if(s===S_ATTR_SPACE){s=S_EQ}else{throw new Error("attribute equal must after attrName")}break;case"'":case'"':if(s===S_EQ||s===S_ATTR){if(s===S_ATTR){errorHandler.warning('attribute value must after "="');attrName=source.slice(start,p)}start=p+1;p=source.indexOf(c,start);if(p>0){value=source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);el.add(attrName,value,start-1);s=S_ATTR_END}else{throw new Error("attribute value no end '"+c+"' match")}}else if(s==S_ATTR_NOQUOT_VALUE){value=source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);el.add(attrName,value,start);errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+")!!");start=p+1;s=S_ATTR_END}else{throw new Error('attribute value must after "="')}break;case"/":switch(s){case S_TAG:el.setTagName(source.slice(start,p));case S_ATTR_END:case S_TAG_SPACE:case S_TAG_CLOSE:s=S_TAG_CLOSE;el.closed=true;case S_ATTR_NOQUOT_VALUE:case S_ATTR:case S_ATTR_SPACE:break;default:throw new Error("attribute invalid close char('/')")}break;case"":errorHandler.error("unexpected end of input");if(s==S_TAG){el.setTagName(source.slice(start,p))}return p;case">":switch(s){case S_TAG:el.setTagName(source.slice(start,p));case S_ATTR_END:case S_TAG_SPACE:case S_TAG_CLOSE:break;case S_ATTR_NOQUOT_VALUE:case S_ATTR:value=source.slice(start,p);if(value.slice(-1)==="/"){el.closed=true;value=value.slice(0,-1)}case S_ATTR_SPACE:if(s===S_ATTR_SPACE){value=attrName}if(s==S_ATTR_NOQUOT_VALUE){errorHandler.warning('attribute "'+value+'" missed quot(")!!');el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start)}else{if(currentNSMap[""]!=="http://www.w3.org/1999/xhtml"||!value.match(/^(?:disabled|checked|selected)$/i)){errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')}el.add(value,value,start)}break;case S_EQ:throw new Error("attribute value missed!!")}return p;case"€":c=" ";default:if(c<=" "){switch(s){case S_TAG:el.setTagName(source.slice(start,p));s=S_TAG_SPACE;break;case S_ATTR:attrName=source.slice(start,p);s=S_ATTR_SPACE;break;case S_ATTR_NOQUOT_VALUE:var value=source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);errorHandler.warning('attribute "'+value+'" missed quot(")!!');el.add(attrName,value,start);case S_ATTR_END:s=S_TAG_SPACE;break}}else{switch(s){case S_ATTR_SPACE:var tagName=el.tagName;if(currentNSMap[""]!=="http://www.w3.org/1999/xhtml"||!attrName.match(/^(?:disabled|checked|selected)$/i)){errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead2!!')}el.add(attrName,attrName,start);start=p;s=S_ATTR;break;case S_ATTR_END:errorHandler.warning('attribute space is required"'+attrName+'"!!');case S_TAG_SPACE:s=S_ATTR;start=p;break;case S_EQ:s=S_ATTR_NOQUOT_VALUE;start=p;break;case S_TAG_CLOSE:throw new Error("elements closed character '/' and '>' must be connected to")}}}p++}}function appendElement(el,domBuilder,currentNSMap){var tagName=el.tagName;var localNSMap=null;var i=el.length;while(i--){var a=el[i];var qName=a.qName;var value=a.value;var nsp=qName.indexOf(":");if(nsp>0){var prefix=a.prefix=qName.slice(0,nsp);var localName=qName.slice(nsp+1);var nsPrefix=prefix==="xmlns"&&localName}else{localName=qName;prefix=null;nsPrefix=qName==="xmlns"&&""}a.localName=localName;if(nsPrefix!==false){if(localNSMap==null){localNSMap={};_copy(currentNSMap,currentNSMap={})}currentNSMap[nsPrefix]=localNSMap[nsPrefix]=value;a.uri="http://www.w3.org/2000/xmlns/";domBuilder.startPrefixMapping(nsPrefix,value)}}var i=el.length;while(i--){a=el[i];var prefix=a.prefix;if(prefix){if(prefix==="xml"){a.uri="http://www.w3.org/XML/1998/namespace"}if(prefix!=="xmlns"){a.uri=currentNSMap[prefix||""]}}}var nsp=tagName.indexOf(":");if(nsp>0){prefix=el.prefix=tagName.slice(0,nsp);localName=el.localName=tagName.slice(nsp+1)}else{prefix=null;localName=el.localName=tagName}var ns=el.uri=currentNSMap[prefix||""];domBuilder.startElement(ns,localName,tagName,el);if(el.closed){domBuilder.endElement(ns,localName,tagName);if(localNSMap){for(prefix in localNSMap){domBuilder.endPrefixMapping(prefix)}}}else{el.currentNSMap=currentNSMap;el.localNSMap=localNSMap;return true}}function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){if(/^(?:script|textarea)$/i.test(tagName)){var elEndStart=source.indexOf("",elStartEnd);var text=source.substring(elStartEnd+1,elEndStart);if(/[&<]/.test(text)){if(/^script$/i.test(tagName)){domBuilder.characters(text,0,text.length);return elEndStart}text=text.replace(/&#?\w+;/g,entityReplacer);domBuilder.characters(text,0,text.length);return elEndStart}}return elStartEnd+1}function fixSelfClosed(source,elStartEnd,tagName,closeMap){var pos=closeMap[tagName];if(pos==null){pos=source.lastIndexOf("");if(pos",start+4);if(end>start){domBuilder.comment(source,start+4,end-start-4);return end+3}else{errorHandler.error("Unclosed comment");return-1}}else{return-1}default:if(source.substr(start+3,6)=="CDATA["){var end=source.indexOf("]]>",start+9);domBuilder.startCDATA();domBuilder.characters(source,start+9,end-start-9);domBuilder.endCDATA();return end+3}var matchs=split(source,start);var len=matchs.length;if(len>1&&/!doctype/i.test(matchs[0][0])){var name=matchs[1][0];var pubid=len>3&&/^public$/i.test(matchs[2][0])&&matchs[3][0];var sysid=len>4&&matchs[4][0];var lastMatch=matchs[len-1];domBuilder.startDTD(name,pubid&&pubid.replace(/^(['"])(.*?)\1$/,"$2"),sysid&&sysid.replace(/^(['"])(.*?)\1$/,"$2"));domBuilder.endDTD();return lastMatch.index+lastMatch[0].length}}return-1}function parseInstruction(source,start,domBuilder){var end=source.indexOf("?>",start);if(end){var match=source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(match){var len=match[0].length;domBuilder.processingInstruction(match[1],match[2]);return end+2}else{return-1}}return-1}function ElementAttributes(source){}ElementAttributes.prototype={setTagName:function(tagName){if(!tagNamePattern.test(tagName)){throw new Error("invalid tagName:"+tagName)}this.tagName=tagName},add:function(qName,value,offset){if(!tagNamePattern.test(qName)){throw new Error("invalid attribute:"+qName)}this[this.length++]={qName:qName,value:value,offset:offset}},length:0,getLocalName:function(i){return this[i].localName},getLocator:function(i){return this[i].locator},getQName:function(i){return this[i].qName},getURI:function(i){return this[i].uri},getValue:function(i){return this[i].value}};function _set_proto_(thiz,parent){thiz.__proto__=parent;return thiz}if(!(_set_proto_({},_set_proto_.prototype)instanceof _set_proto_)){_set_proto_=function(thiz,parent){function p(){}p.prototype=parent;p=new p;for(parent in thiz){p[parent]=thiz[parent]}return p}}function split(source,start){var match;var buf=[];var reg=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;reg.lastIndex=start;reg.exec(source);while(match=reg.exec(source)){buf.push(match);if(match[1])return buf}}exports.XMLReader=XMLReader},{}],304:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;iHome

Classes

  • diff --git a/docs/index.js.html b/docs/index.js.html index 20b9ea6..7c7af21 100644 --- a/docs/index.js.html +++ b/docs/index.js.html @@ -144,6 +144,9 @@

    index.js

    if (Math.abs(timeAtHead - d) > diffCriteria) { result.clock = "BAD"; result.clockOffset = Math.abs(timeAtHead - d); + } else { + result.clock = "OK"; + result.clockOffset = Math.abs(timeAtHead - d); } } resolve(result); @@ -230,9 +233,10 @@

    index.js

    * streaming * * @param {number} iterations Number of iterations to test + * @param {Function} _optIterator For testing purposes * @returns {Promise} */ -DashValidator.prototype.validateDynamicManifest = function validateDynamicManifest(iterations) { +DashValidator.prototype.validateDynamicManifest = function validateDynamicManifest(iterations, _optIterator) { return new Promise((resolve, reject) => { this._runner.start(iterations, () => { return new Promise((resolveUpdateMpd) => { @@ -246,7 +250,7 @@

    index.js

    }) }); }); - }) + }, _optIterator) .then((result) => { resolve(result); }).catch(reject); @@ -348,7 +352,7 @@

    index.js


    - Documentation generated by JSDoc 3.4.3 on Thu Jan 26 2017 10:28:29 GMT+0100 (CET) using the Minami theme. + Documentation generated by JSDoc 3.4.3 on Sat Jan 28 2017 11:23:36 GMT+0100 (CET) using the Minami theme.
    diff --git a/docs/module-dash-validator-DashValidator.html b/docs/module-dash-validator-DashValidator.html index 02b8869..7d65518 100644 --- a/docs/module-dash-validator-DashValidator.html +++ b/docs/module-dash-validator-DashValidator.html @@ -270,7 +270,7 @@

    durationSource:
    @@ -370,7 +370,7 @@

    isLiveSource:
    @@ -574,7 +574,7 @@

    segmentUrl
    Source:
    @@ -628,7 +628,7 @@

    Returns:
    -

    validateDynamicManifest(iterations) → {Promise}

    +

    validateDynamicManifest(iterations, _optIterator) → {Promise}

    @@ -692,6 +692,29 @@
    Parameters:
    + + + + _optIterator + + + + + +function + + + + + + + + + + For testing purposes + + + @@ -729,7 +752,7 @@
    Parameters:
    Source:
    @@ -902,7 +925,7 @@
    Parameters:
    Source:
    @@ -1056,7 +1079,7 @@
    Parameters:
    Source:
    @@ -1258,7 +1281,7 @@
    Parameters:
    Source:
    @@ -1324,7 +1347,7 @@
    Returns:

    - Documentation generated by JSDoc 3.4.3 on Thu Jan 26 2017 10:28:29 GMT+0100 (CET) using the Minami theme. + Documentation generated by JSDoc 3.4.3 on Sat Jan 28 2017 11:23:36 GMT+0100 (CET) using the Minami theme.
    diff --git a/docs/module-dash-validator.html b/docs/module-dash-validator.html index 5c5affb..8e4d987 100644 --- a/docs/module-dash-validator.html +++ b/docs/module-dash-validator.html @@ -186,7 +186,7 @@

    Source:
    @@ -955,7 +955,7 @@

    Properties:

    - Documentation generated by JSDoc 3.4.3 on Thu Jan 26 2017 10:28:29 GMT+0100 (CET) using the Minami theme. + Documentation generated by JSDoc 3.4.3 on Sat Jan 28 2017 11:23:36 GMT+0100 (CET) using the Minami theme.
    diff --git a/package.json b/package.json index 30a364f..309b193 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dash-validator", - "version": "0.4.4", + "version": "0.4.5", "description": "JS library to validate MPEG DASH manifests and segments", "main": "index.js", "engines": {