text: // PouchDB fruitdown plugin 5.2.0
  // Based on FruitDOWN: https://github.com/nolanlawson/fruitdown
  // 
  // (c) 2012-2016 Dale Harvey and the PouchDB team
  // PouchDB may be freely distributed under the Apache license, version 2.0.
  // For all details and documentation:
  // http://pouchdb.com
  !function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[a]={exports:{}};t[a][0].call(f.exports,function(e){var n=t[a][1][e];return i(n?n:e)},f,f.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(t,n,r){"use strict";function i(e){return e instanceof ArrayBuffer||"undefined"!=typeof Blob&&e instanceof Blob}function o(e){if("function"==typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),n=new Uint8Array(t),r=new Uint8Array(e);return n.set(r),t}function a(e){if(e instanceof ArrayBuffer)return o(e);var t=e.size,n=e.type;return"function"==typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n)}function s(e){var t,n,r;if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,r=e.length;r>n;n++)t[n]=s(e[n]);return t}if(e instanceof Date)return e.toISOString();if(i(e))return a(e);t={};for(n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=s(e[n]);"undefined"!=typeof o&&(t[n]=o)}return t}function u(e){var t=!1;return Se(function(n){if(t)throw new Error("once called more than once");t=!0,e.apply(this,n)})}function c(e){return Se(function(n){n=s(n);var r,i=this,o="function"==typeof n[n.length-1]?n.pop():!1;o&&(r=function(e,n){t.nextTick(function(){o(e,n)})});var a=new Te(function(t,r){var o;try{var a=u(function(e,n){e?r(e):t(n)});n.push(a),o=e.apply(i,n),o&&"function"==typeof o.then&&t(o)}catch(s){r(s)}});return r&&a.then(function(e){r(null,e)},r),a})}function f(e){try{return JSON.parse(e)}catch(t){return Oe.parse(e)}}function l(e){try{return JSON.stringify(e)}catch(t){return Oe.stringify(e)}}function h(){return"undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage&&"undefined"!=typeof chrome.storage.local}function d(){return je}function p(e,t){for(var n={},r=0,i=t.length;i>r;r++){var o=t[r];o in e&&(n[o]=e[o])}return n}function g(e){h()?chrome.storage.onChanged.addListener(function(t){null!=t.db_name&&e.emit(t.dbName.newValue)}):d()&&("undefined"!=typeof addEventListener?addEventListener("storage",function(t){e.emit(t.key)}):window.attachEvent("storage",function(t){e.emit(t.key)}))}function v(){Be.EventEmitter.call(this),this._listeners={},g(this)}function y(e){return 0|Math.random()*e}function m(e,t){t=t||Ce.length;var n="",r=-1;if(e){for(;++r<e;)n+=Ce[y(t)];return n}for(;++r<36;)switch(r){case 8:case 13:case 18:case 23:n+="-";break;case 19:n+=Ce[3&y(16)|8];break;default:n+=Ce[y(16)]}return n}function _(e){Error.call(this,e.reason),this.status=e.status,this.name=e.error,this.message=e.reason,this.error=!0}function b(e,t,n){function r(t){for(var r in e)"function"!=typeof e[r]&&(this[r]=e[r]);void 0!==n&&(this.name=n),void 0!==t&&(this.reason=t)}return r.prototype=_.prototype,new r(t)}function w(e,t,n){try{return!e(t,n)}catch(r){var i="Filter function threw: "+r.toString();return b(Ye,i)}}function E(e){var t={},n=e.filter&&"function"==typeof e.filter;return t.query=e.query_params,function(r){r.doc||(r.doc={});var i=n&&w(e.filter,r.doc,t);if("object"==typeof i)return i;if(i)return!1;if(e.include_docs){if(!e.attachments)for(var o in r.doc._attachments)r.doc._attachments.hasOwnProperty(o)&&(r.doc._attachments[o].stub=!0)}else delete r.doc;return!0}}function k(e){for(var t,n,r,i,o=e.rev_tree.slice();i=o.pop();){var a=i.ids,s=a[2],u=i.pos;if(s.length)for(var c=0,f=s.length;f>c;c++)o.push({pos:u+1,ids:s[c]});else{var l=!!a[1].deleted,h=a[0];(!t||(r!==l?r:n!==u?u>n:h>t))&&(t=h,n=u,r=l)}}return n+"-"+t}function S(e,t){for(var n,r=e.slice();n=r.pop();)for(var i=n.pos,o=n.ids,a=o[2],s=t(0===a.length,i,o[0],n.ctx,o[1]),u=0,c=a.length;c>u;u++)r.push({pos:i+1,ids:a[u],ctx:s})}function x(e){var t=[];return S(e.rev_tree,function(e,n,r,i,o){"available"!==o.status||e||(t.push(n+"-"+r),o.status="missing")}),t}function B(e,t){return e.pos-t.pos}function A(e){var t=[];S(e,function(e,n,r,i,o){e&&t.push({rev:n+"-"+r,pos:n,opts:o})}),t.sort(B).reverse();for(var n=0,r=t.length;r>n;n++)delete t[n].pos;return t}function O(e){for(var t=k(e),n=A(e.rev_tree),r=[],i=0,o=n.length;o>i;i++){var a=n[i];a.rev===t||a.opts.deleted||r.push(a.rev)}return r}function L(e){return e.ids}function R(e,t){t||(t=k(e));for(var n,r=t.substring(t.indexOf("-")+1),i=e.rev_tree.map(L);n=i.pop();){if(n[0]===r)return!!n[1].deleted;i=i.concat(n[2])}}function j(e){return/^_local/.test(e)}function T(e){return e.reduce(function(e,t){return e[t]=!0,e},{})}function I(e){var t;if(e?"string"!=typeof e?t=b(Pe):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=b(We)):t=b(qe),t)throw t}function M(e){if(!/^\d+\-./.test(e))return b(Ve);var t=e.indexOf("-"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:parseInt(n,10),id:r}}function C(e,t){for(var n=e.start-e.ids.length+1,r=e.ids,i=[r[0],t,[]],o=1,a=r.length;a>o;o++)i=[r[o],{status:"missing"},[i]];return[{pos:n,ids:i}]}function D(e,t){var n,r,i,o={status:"available"};if(e._deleted&&(o.deleted=!0),t)if(e._id||(e._id=m()),r=m(32,16).toLowerCase(),e._rev){if(i=M(e._rev),i.error)return i;e._rev_tree=[{pos:i.prefix,ids:[i.id,{status:"missing"},[[r,o,[]]]]}],n=i.prefix+1}else e._rev_tree=[{pos:1,ids:[r,o,[]]}],n=1;else if(e._revisions&&(e._rev_tree=C(e._revisions,o),n=e._revisions.start,r=e._revisions.ids[0]),!e._rev_tree){if(i=M(e._rev),i.error)return i;n=i.prefix,r=i.id,e._rev_tree=[{pos:n,ids:[r,o,[]]}]}I(e._id),e._rev=n+"-"+r;var a={metadata:{},data:{}};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var u="_"===s[0];if(u&&!He[s]){var c=b(Ke,s);throw c.message=Ke.message+": "+s,c}u&&!Ge[s]?a.metadata[s.slice(1)]=e[s]:a.data[s]=e[s]}return a}function N(e){for(var t,n=[],r=e.slice();t=r.pop();){var i=t.pos,o=t.ids,a=o[0],s=o[1],u=o[2],c=0===u.length,f=t.history?t.history.slice():[];f.push({id:a,opts:s}),c&&n.push({pos:i+1-f.length,ids:f});for(var l=0,h=u.length;h>l;l++)r.push({pos:i+1,ids:u[l],history:f})}return n.reverse()}function U(e,t){return e.pos-t.pos}function P(e,t,n){for(var r,i=0,o=e.length;o>i;)r=i+o>>>1,n(e[r],t)<0?i=r+1:o=r;return i}function q(e,t,n){var r=P(e,t,n);e.splice(r,0,t)}function W(e,t){for(var n,r,i=t,o=e.length;o>i;i++){var a=e[i],s=[a.id,a.opts,[]];r?(r[2].push(s),r=s):n=r=s}return n}function F(e,t){return e[0]<t[0]?-1:1}function z(e,t){for(var n=[{tree1:e,tree2:t}],r=!1;n.length>0;){var i=n.pop(),o=i.tree1,a=i.tree2;(o[1].status||a[1].status)&&(o[1].status="available"===o[1].status||"available"===a[1].status?"available":"missing");for(var s=0;s<a[2].length;s++)if(o[2][0]){for(var u=!1,c=0;c<o[2].length;c++)o[2][c][0]===a[2][s][0]&&(n.push({tree1:o[2][c],tree2:a[2][s]}),u=!0);u||(r="new_branch",q(o[2],a[2][s],F))}else r="new_leaf",o[2][0]=a[2][s]}return{conflicts:r,tree:e}}function K(e,t,n){var r,i=[],o=!1,a=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var s=0,u=e.length;u>s;s++){var c=e[s];if(c.pos===t.pos&&c.ids[0]===t.ids[0])r=z(c.ids,t.ids),i.push({pos:c.pos,ids:r.tree}),o=o||r.conflicts,a=!0;else if(n!==!0){var f=c.pos<t.pos?c:t,l=c.pos<t.pos?t:c,h=l.pos-f.pos,d=[],p=[];for(p.push({ids:f.ids,diff:h,parent:null,parentIdx:null});p.length>0;){var g=p.pop();if(0!==g.diff)for(var v=g.ids[2],y=0,m=v.length;m>y;y++)p.push({ids:v[y],diff:g.diff-1,parent:g.ids,parentIdx:y});else g.ids[0]===l.ids[0]&&d.push(g)}var _=d[0];_?(r=z(_.ids,l.ids),_.parent[2][_.parentIdx]=r.tree,i.push({pos:f.pos,ids:f.ids}),o=o||r.conflicts,a=!0):i.push(c)}else i.push(c)}return a||i.push(t),i.sort(U),{tree:i,conflicts:o||"internal_node"}}function Y(e,t){for(var n,r=N(e),i=0,o=r.length;o>i;i++){var a=r[i],s=a.ids,u=Math.max(0,s.length-t),c={pos:a.pos+u,ids:W(s,u)};n=n?K(n,c,!0).tree:[c]}return n}function V(e,t,n){var r=K(e,t);return{tree:Y(r.tree,n),conflicts:r.conflicts}}function J(e,t){for(var n,r=e.slice(),i=t.split("-"),o=parseInt(i[0],10),a=i[1];n=r.pop();){if(n.pos===o&&n.ids[0]===a)return!0;for(var s=n.ids[2],u=0,c=s.length;c>u;u++)r.push({pos:n.pos+1,ids:s[u]})}return!1}function H(e,t,n,r,i,o,a,s){if(J(t.rev_tree,n.metadata.rev))return r[i]=n,o();var u=t.winningRev||k(t),c="deleted"in t?t.deleted:R(t,u),f="deleted"in n.metadata?n.metadata.deleted:R(n.metadata),l=/^1-/.test(n.metadata.rev);if(c&&!f&&s&&l){var h=n.data;h._rev=u,h._id=n.metadata.id,n=D(h,s)}var d=V(t.rev_tree,n.metadata.rev_tree[0],e),p=s&&(c&&f||!c&&"new_leaf"!==d.conflicts||c&&!f&&"new_branch"===d.conflicts);if(p){var g=b(Ue);return r[i]=g,o()}var v=n.metadata.rev;n.metadata.rev_tree=d.tree,t.rev_map&&(n.metadata.rev_map=t.rev_map);var y,m=k(n.metadata),_=R(n.metadata,m),w=c===_?0:_>c?-1:1;y=v===m?_:R(n.metadata,v),a(n,m,_,y,!0,w,i,o)}function G(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}function $(e,t,n,r,i,o,a,s,u){function c(e,t,n){var r=k(e.metadata),i=R(e.metadata,r);if("was_delete"in s&&i)return o[t]=b(Ne,"deleted"),n();var u=l&&G(e);if(u){var c=b(Ue);return o[t]=c,n()}var f=i?0:1;a(e,r,i,i,!1,f,t,n)}function f(){++d===p&&u&&u()}e=e||1e3;var l=s.new_edits,h=new ke.Map,d=0,p=t.length;t.forEach(function(e,t){if(e._id&&j(e._id)){var r=e._deleted?"_removeLocal":"_putLocal";return void n[r](e,{ctx:i},function(e,n){o[t]=e||n,f()})}var a=e.metadata.id;h.has(a)?(p--,h.get(a).push([e,t])):h.set(a,[[e,t]])}),h.forEach(function(t,n){function i(){++u<t.length?s():f()}function s(){var s=t[u],f=s[0],h=s[1];if(r.has(n))H(e,r.get(n),f,o,h,i,a,l);else{var d=V([],f.metadata.rev_tree[0],e);f.metadata.rev_tree=d.tree,c(f,h,i)}}var u=0;s()})}function X(e){return Xe(e)}function Z(e,t,n,r){(n>0||r<t.byteLength)&&(t=new Uint8Array(t,n,Math.min(r,t.byteLength)-n)),e.append(t)}function Q(e,t,n,r){(n>0||r<t.length)&&(t=t.substring(n,r)),e.appendBinary(t)}function ee(){}function te(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(n){if("TypeError"!==n.name)throw n;for(var r="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,i=new r,o=0;o<e.length;o+=1)i.append(e[o]);return i.getBlob(t.type)}}function ne(e,t){return te([e.toArrayBuffer()],{type:t})}function re(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;r>i;i++)t+=String.fromCharCode(n[i]);return t}function ie(e,t){if("undefined"==typeof FileReader)return t(re((new FileReaderSync).readAsArrayBuffer(e)));var n=new FileReader,r="function"==typeof n.readAsBinaryString;n.onloadend=function(e){var n=e.target.result||"";return r?t(n):void t(re(n))},r?n.readAsBinaryString(e):n.readAsArrayBuffer(e)}function oe(e,t){ie(e,t)}function ae(e){return te([""],{type:e})}function se(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;t>i;i++)r[i]=e.charCodeAt(i);return n}function ue(e,t){return te([se(e)],{type:t})}function ce(e,t){var n=t.prefix()[0],r=e._cache,i=r.get(n);return i||(i=new ke.Map,r.set(n,i)),i}function fe(){this._batch=[],this._cache=new ke.Map}function le(e){return"winningRev"in e?e.winningRev:k(e)}function he(e,t){return"deleted"in e?e.deleted:R(e,t)}function de(e,t,n){var r=e.content_type;return new Te(function(i,o){t.binaryStore.get(e.digest,function(t,a){var s;if(t){if("NotFoundError"!==t.name)return o(t);s=n.binary?ue("",r):""}else s=n.binary?ne(a,r):a.toString("base64");delete e.stub,delete e.length,e.data=s,i()})})}function pe(e,t,n){var r=[];return e.forEach(function(e){if(e.doc&&e.doc._attachments){var t=Object.keys(e.doc._attachments);t.forEach(function(t){var n=e.doc._attachments[t];"data"in n||r.push(n)})}}),Te.all(r.map(function(e){return de(e,t,n)}))}function ge(e,n){function i(){w.docStore=y.sublevel(at,{valueEncoding:yt}),w.bySeqStore=y.sublevel(st,{valueEncoding:"json"}),w.attachmentStore=y.sublevel(ut,{valueEncoding:"json"}),w.binaryStore=y.sublevel(ct,{valueEncoding:"binary"}),w.localStore=y.sublevel(ft,{valueEncoding:"json"}),w.metaStore=y.sublevel(lt,{valueEncoding:"json"}),rt.localAndMetaStores(y,w,function(){w.metaStore.get(dt,function(e,r){"undefined"==typeof y._updateSeq&&(y._updateSeq=r||0),w.metaStore.get(pt,function(e,r){y._docCount=e?0:r,w.metaStore.get(gt,function(e,r){v=e?m():r,w.metaStore.put(gt,v,function(e,r){t.nextTick(function(){n(null,_)})})})})})})}function o(e){return y.isClosed()?e(new Error("database is closed")):e(null,y._docCount)}function a(e,t){try{e.apply(null,t)}catch(n){t[t.length-1](n)}}function u(){var e=y._queue.peekFront();"read"===e.type?c(e):f(e)}function c(e){for(var n=[e],r=1,i=y._queue.get(r);"undefined"!=typeof i&&"read"===i.type;)n.push(i),r++,i=y._queue.get(r);var o=0;n.forEach(function(e){var r=e.args,i=r[r.length-1];r[r.length-1]=Se(function(e){i.apply(null,e),++o===n.length&&t.nextTick(function(){n.forEach(function(){y._queue.shift()}),y._queue.length&&u()})}),a(e.fun,r)})}function f(e){var n=e.args,r=n[n.length-1];n[n.length-1]=Se(function(e){r.apply(null,e),t.nextTick(function(){y._queue.shift(),y._queue.length&&u()})}),a(e.fun,n)}function l(e){return Se(function(n){y._queue.push({fun:e,args:n,type:"write"}),1===y._queue.length&&t.nextTick(u)})}function h(e){return Se(function(n){y._queue.push({fun:e,args:n,type:"read"}),1===y._queue.length&&t.nextTick(u)})}function d(e){return("0000000000000000"+e).slice(-16)}function p(e){return parseInt(e,10)}function g(e,n){"function"==typeof A.destroy?A.destroy(e,n):t.nextTick(n)}e=s(e);var v,y,_=this,w={},k=e.revs_limit,B=e.name;"undefined"==typeof e.createIfMissing&&(e.createIfMissing=!0);var A=e.db||mt();if(A instanceof Error)return n(A);"function"!=typeof A.destroy&&(A.destroy=function(e,t){t()});var L,R=ot(A);ht.has(R)?L=ht.get(R):(L=new ke.Map,ht.set(R,L)),L.has(B)?(y=L.get(B),i()):L.set(B,we(be(B,e,function(t){return t?(L["delete"](B),n(t)):(y=L.get(B),y._docCount=-1,y._queue=new xe,void(e.db||e.noMigrate?i():rt.toSublevel(B,y,i)))}))),_.type=function(){return"leveldb"},_._id=function(e){e(null,v)},_._info=function(e){var n={doc_count:y._docCount,update_seq:y._updateSeq,backend_adapter:ot(A)};return t.nextTick(function(){e(null,n)})},_._get=h(function(e,t,n){t=s(t),w.docStore.get(e,function(e,r){if(e||!r)return n(b(Ne,"missing"));var i=le(r),o=he(r,i);if(o&&!t.rev)return n(b(Ne,"deleted"));i=t.rev?t.rev:i;var a=r.rev_map[i];w.bySeqStore.get(d(a),function(e,t){if(!t)return n(b(Ne));if("_id"in t&&t._id!==r.id)return n(new Error("wrong doc returned"));if(t._id=r.id,"_rev"in t){if(t._rev!==i)return n(new Error("wrong doc returned"))}else t._rev=i;return n(null,{doc:t,metadata:r})})})}),_._getAttachment=function(e,t,n){var r=e.digest,i=e.content_type;w.binaryStore.get(r,function(e,r){return e?"NotFoundError"!==e.name?n(e):n(null,t.binary?ae(i):""):void(t.binary?n(null,ne(r,i)):n(null,r.toString("base64")))})},_._bulkDocs=l(function(e,n,i){function o(e,t){E.get(w.attachmentStore,e,function(n){if(n){var r=b(Je,"unknown stub attachment with digest "+e);t(r)}else t()})}function a(e){var t=[];if(O.forEach(function(e){e&&e._attachments&&Object.keys(e._attachments).forEach(function(n){var r=e._attachments[n];r.stub&&t.push(r.digest)})}),!t.length)return e();var n,r=0;t.forEach(function(i){o(i,function(i){i&&!n&&(n=i),++r===t.length&&e(n)})})}function s(e){function t(){return++r===O.length?e(n):void 0}var n,r=0;O.forEach(function(e){return e._id&&j(e._id)?t():void E.get(w.docStore,e._id,function(r,i){r?"NotFoundError"!==r.name&&(n=r):m.set(e._id,i),t()})})}function u(e){var t=Te.resolve();m.forEach(function(e,n){t=t.then(function(){return new Te(function(t,r){var i=x(e);_._doCompactionNoLock(n,i,{ctx:E},function(e){return e?r(e):void t()})})})}),t.then(function(){e()},e)}function c(){return _.auto_compaction?u(p):p()}function f(e,t,n,r,o,a,s,u){function c(e){_++,y||(e?(y=e,u(y)):_===k.length&&g())}function f(e,t,n,r){return function(i){h(e,vt+i,t,n,r)}}function p(e,t,n){return function(r){et(r).then(f(e,t,r,n))}}function g(){var n=e.metadata.rev_map[e.metadata.rev];if(n)return u();n=++A,e.metadata.rev_map[e.metadata.rev]=e.metadata.seq=n;var r=d(n),i=[{key:r,value:e.data,prefix:w.bySeqStore,type:"put"},{key:e.metadata.id,value:e.metadata,prefix:w.docStore,type:"put"}];E.batch(i),v[s]={ok:!0,id:e.metadata.id,rev:t},m.set(e.metadata.id,e.metadata),u()}S+=a;var y=null,_=0;e.metadata.winningRev=t,e.metadata.deleted=n,e.data._id=e.metadata.id,e.data._rev=e.metadata.rev,r&&(e.data._deleted=!0);for(var k=e.data._attachments?Object.keys(e.data._attachments):[],x=0;x<k.length;x++){var B=k[x],O=e.data._attachments[B];if(O.stub){var L=e.data._id,R=e.data._rev;l(L,R,O.digest,c)}else{var j;if("string"==typeof O.data){try{j=$e(O.data)}catch(T){return void i(b(ze,"Attachment is not a valid base64 string"))}p(e,B,c)(j)}else oe(O.data,p(e,B,c))}}k.length||g()}function l(e,t,n,r){function i(){return new Te(function(e,t){E.get(w.attachmentStore,n,function(n,r){return n&&"NotFoundError"!==n.name?t(n):void e(r)})})}function o(r){var i=[e,t].join("@"),o={};return r?r.refs&&(o.refs=r.refs,o.refs[i]=!0):(o.refs={},o.refs[i]=!0),new Te(function(e,t){E.batch([{type:"put",prefix:w.attachmentStore,key:n,value:o}]),e(!r)})}var a=T[n]||Te.resolve();T[n]=a.then(function(){return i().then(o).then(function(e){r(null,e)},r)})}function h(e,t,n,i,o){var a=e.data._attachments[n];delete a.data,a.digest=t,a.length=i.length;var s=e.metadata.id,u=e.metadata.rev;l(s,u,t,function(e,n){return e?o(e):0===i.length?o(e):n?(E.batch([{type:"put",prefix:w.binaryStore,key:t,value:new r(i,"binary")}]),void o()):o(e)})}function p(e){return e?t.nextTick(function(){i(e)}):(E.batch([{prefix:w.metaStore,type:"put",key:dt,value:A},{prefix:w.metaStore,type:"put",key:pt,value:y._docCount+S}]),void E.execute(y,function(e){return e?i(e):(y._docCount+=S,y._updateSeq=A,ge.Changes.notify(B),void t.nextTick(function(){i(null,v)}))}))}var g=n.new_edits,v=new Array(e.docs.length),m=new ke.Map,E=new fe,S=0,A=y._updateSeq,O=e.docs,L=O.map(function(e,t){if(e._id&&j(e._id))return e;var n=D(e,g);return n.metadata&&!n.metadata.rev_map&&(n.metadata.rev_map={}),n}),R=L.filter(function(e){return e.error});if(R.length)return i(R[0]);var T={};return L.length?void a(function(e){return e?i(e):void s(function(e){return e?i(e):void $(k,L,_,m,E,v,f,n,c)})}):i(null,[])}),_._allDocs=h(function(e,t){e=s(e),o(function(n,r){if(n)return t(n);var i={},o=e.skip||0;if(e.startkey&&(i.gte=e.startkey),e.endkey&&(i.lte=e.endkey),e.key&&(i.gte=i.lte=e.key),e.descending){i.reverse=!0;var a=i.lte;i.lte=i.gte,i.gte=a}var s;if("number"==typeof e.limit&&(s=e.limit),0===s||"start"in i&&"end"in i&&i.start>i.end)return t(null,{total_rows:r,offset:e.skip,rows:[]});var u=[],c=w.docStore.readStream(i),f=Ee.obj(function(t,n,r){function i(t){var n={id:a.id,key:a.id,value:{rev:f}};if(e.include_docs){n.doc=t,n.doc._rev=n.value.rev,e.conflicts&&(n.doc._conflicts=O(a));for(var i in n.doc._attachments)n.doc._attachments.hasOwnProperty(i)&&(n.doc._attachments[i].stub=!0)}if(e.inclusive_end===!1&&a.id===e.endkey)return r();if(l){if("ok"!==e.deleted)return r();n.value.deleted=!0,n.doc=null}u.push(n),r()}var a=t.value,f=le(a),l=he(a,f);if(l){if("ok"!==e.deleted)return void r()}else{if(o-- >0)return void r();if("number"==typeof s&&s--<=0)return c.unpipe(),c.destroy(),void r()}if(e.include_docs){var h=a.rev_map[f];w.bySeqStore.get(d(h),function(e,t){i(t)})}else i()},function(n){Te.resolve().then(function(){return e.include_docs&&e.attachments?pe(u,w,e):void 0}).then(function(){t(null,{total_rows:r,offset:e.skip,rows:u})},t),n()}).on("unpipe",function(){f.end()});c.on("error",t),c.pipe(f)})}),_._changes=function(e){function t(){e.done=!0,f&&e.limit&&e.limit<o.length&&(o.length=e.limit),v.unpipe(b),v.destroy(),e.continuous||e.cancelled||(e.include_docs&&e.attachments?pe(o,w,e).then(function(){e.complete(null,{results:o,last_seq:a})}):e.complete(null,{results:o,last_seq:a}))}if(e=s(e),e.continuous){var n=B+":"+m();return ge.Changes.addListener(B,n,_,e),ge.Changes.notify(B),{cancel:function(){ge.Changes.removeListener(B,n)}}}var r,i=e.descending,o=[],a=e.since||0,u=0,c={reverse:i};"limit"in e&&e.limit>0&&(r=e.limit),c.reverse||(c.start=d(e.since||0));var f,l=e.doc_ids&&new ke.Set(e.doc_ids),h=E(e),g=new ke.Map;f="return_docs"in e?e.return_docs:"returnDocs"in e?e.returnDocs:!0;var v=w.bySeqStore.readStream(c),b=Ee.obj(function(n,s,c){function v(t){function n(n){var r=e.processChange(n,t,e);r.seq=t.seq;var i=h(r);return"object"==typeof i?e.complete(i):(i&&(u++,e.attachments&&e.include_docs?pe([r],w,e).then(function(){e.onChange(r)}):e.onChange(r),f&&o.push(r)),void c())}var r=le(t);if(t.seq!==m)return c();if(a=m,r===_._rev)return n(_);var i=t.rev_map[r];w.bySeqStore.get(d(i),function(e,t){n(t)})}if(r&&u>=r)return t(),c();if(e.cancelled||e.done)return c();var m=p(n.key),_=n.value;if(m===e.since&&!i)return c();if(l&&!l.has(_._id))return c();var b;return(b=g.get(_._id))?v(b):void w.docStore.get(_._id,function(t,n){return e.cancelled||e.done||y.isClosed()||j(n.id)?c():(g.set(_._id,n),void v(n))})},function(t){return e.cancelled?t():(f&&e.limit&&e.limit<o.length&&(o.length=e.limit),void t())}).on("unpipe",function(){b.end(),t()});return v.pipe(b),{cancel:function(){e.cancelled=!0,t()}}},_._close=function(e){return y.isClosed()?e(b(Fe)):void y.close(function(t){t?e(t):(L["delete"](B),e())})},_._getRevisionTree=function(e,t){w.docStore.get(e,function(e,n){e?t(b(Ne)):t(null,n.rev_tree)})},_._doCompaction=l(function(e,t,n,r){_._doCompactionNoLock(e,t,n,r)}),_._doCompactionNoLock=function(e,t,n,r){if("function"==typeof n&&(r=n,n={}),!t.length)return r();var i=n.ctx||new fe;i.get(w.docStore,e,function(o,a){function s(e){if(e&&(h=e),++g===t.length){if(h)return r(h);c()}}function u(e){return e?r(e):(i.batch(l),n.ctx?r():void i.execute(y,r))}function c(){function n(e){e&&(o=e),++a===r.length&&u(o)}var r=Object.keys(p);if(!r.length)return u();var o,a=0,s=new ke.Map;t.forEach(function(t){s.set(e+"@"+t,!0)}),r.forEach(function(e){i.get(w.attachmentStore,e,function(t,r){if(t)return"NotFoundError"===t.name?n():n(t);var i=Object.keys(r.refs||{}).filter(function(e){return!s.has(e)}),o={};i.forEach(function(e){o[e]=!0}),i.length?l.push({key:e,type:"put",value:{refs:o},prefix:w.attachmentStore}):l=l.concat([{key:e,type:"del",prefix:w.attachmentStore},{key:e,type:"del",prefix:w.binaryStore}]),n()})})}if(o)return r(o);var f=a.rev_map;S(a.rev_tree,function(e,n,r,i,o){var a=n+"-"+r;-1!==t.indexOf(a)&&(o.status="missing")});var l=[];l.push({key:a.id,value:a,type:"put",prefix:w.docStore});var h,p={},g=0;t.forEach(function(e){var t=f[e];l.push({key:d(t),type:"del",prefix:w.bySeqStore}),i.get(w.bySeqStore,d(t),function(e,t){if(e)return"NotFoundError"===e.name?s():s(e);var n=Object.keys(t._attachments||{});n.forEach(function(e){var n=t._attachments[e].digest;p[n]=!0}),s()})})})},_._getLocal=function(e,t){w.localStore.get(e,function(e,n){e?t(b(Ne)):t(null,n)})},_._putLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),t.ctx?_._putLocalNoLock(e,t,n):_._putLocalWithLock(e,t,n)},_._putLocalWithLock=l(function(e,t,n){_._putLocalNoLock(e,t,n)}),_._putLocalNoLock=function(e,t,n){delete e._revisions;var r=e._rev,i=e._id,o=t.ctx||new fe;o.get(w.localStore,i,function(a,s){if(a&&r)return n(b(Ue));if(s&&s._rev!==r)return n(b(Ue));e._rev=r?"0-"+(parseInt(r.split("-")[1],10)+1):"0-1";var u=[{type:"put",prefix:w.localStore,key:i,value:e}];o.batch(u);var c={ok:!0,id:e._id,rev:e._rev};return t.ctx?n(null,c):void o.execute(y,function(e){return e?n(e):void n(null,c)})})},_._removeLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),t.ctx?_._removeLocalNoLock(e,t,n):_._removeLocalWithLock(e,t,n)},_._removeLocalWithLock=l(function(e,t,n){_._removeLocalNoLock(e,t,n)}),_._removeLocalNoLock=function(e,t,n){var r=t.ctx||new fe;r.get(w.localStore,e._id,function(i,o){if(i)return n("NotFoundError"!==i.name?i:b(Ne));if(o._rev!==e._rev)return n(b(Ue));r.batch([{prefix:w.localStore,type:"del",key:e._id}]);var a={ok:!0,id:e._id,rev:"0-0"};return t.ctx?n(null,a):void r.execute(y,function(e){return e?n(e):void n(null,a)})})},_._destroy=function(e,t){var n,r=ot(A);return ht.has(r)?(n=ht.get(r),void(n.has(B)?(ge.Changes.removeAllListeners(B),n.get(B).close(function(){n["delete"](B),g(B,t)})):g(B,t))):g(B,t)}}function ve(e,t){function n(e,n){var r=_e.extend({db:t},e);ge.call(this,r,n)}return n.valid=function(){return e.valid()},n.use_prefix=e.use_prefix,n.destroy=c(function(e,n,r){"function"==typeof n&&(r=n,n={});var i=_e.extend({db:t},n);return ge.destroy(e,i,r)}),n}function ye(t,n){var r=t.name,i=ve(t,n),o="undefined"!=typeof PouchDB?PouchDB:e("pouchdb");o?o.adapter(r,i,!0):console.error(t.name+' adapter plugin error: Cannot find global "PouchDB" object! Did you remember to include pouchdb.js?')}var me=e(18);me="default"in me?me["default"]:me;var _e=e(26),be=e(48);be="default"in be?be["default"]:be;var we=e(34);we="default"in we?we["default"]:we;var Ee=e(91),ke=e(62);ke="default"in ke?ke["default"]:ke;var Se=e(5);Se="default"in Se?Se["default"]:Se;var xe=e(12);xe="default"in xe?xe["default"]:xe;var Be=e(15),Ae=e(23);Ae="default"in Ae?Ae["default"]:Ae;var Oe=e(96);Oe="default"in Oe?Oe["default"]:Oe;var Le=e(72);Le="default"in Le?Le["default"]:Le;var Re=e(60);Re="default"in Re?Re["default"]:Re;var je,Te="function"==typeof Promise?Promise:Re,Ie={name:"fruitdown",valid:function(){return!!n.indexedDB},use_prefix:!0};if(h())je=!1;else try{localStorage.setItem("_pouch_check_localstorage",1),je=!!localStorage.getItem("_pouch_check_localstorage")}catch(Me){je=!1}Ae(v,Be.EventEmitter),v.prototype.addListener=function(e,t,n,r){function i(){function e(){a=!1}if(o._listeners[t]){if(a)return void(a="waiting");a=!0;var s=p(r,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary"]);n.changes(s).on("change",function(e){e.seq>r.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))}).on("complete",function(){"waiting"===a&&setTimeout(function(){i()},0),a=!1}).on("error",e)}}if(!this._listeners[t]){var o=this,a=!1;this._listeners[t]=i,this.on(e,i)}},v.prototype.removeListener=function(e,t){t in this._listeners&&Be.EventEmitter.prototype.removeListener.call(this,e,this._listeners[t])},v.prototype.notifyLocalWindows=function(e){h()?chrome.storage.local.set({dbName:e}):d()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},v.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var Ce="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");Ae(_,Error),_.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})};var De,Ne=(new _({status:401,error:"unauthorized",reason:"Name or password is incorrect."}),new _({status:400,error:"bad_request",reason:"Missing JSON list of 'docs'"}),new _({status:404,error:"not_found",reason:"missing"})),Ue=new _({status:409,error:"conflict",reason:"Document update conflict"}),Pe=new _({status:400,error:"invalid_id",reason:"_id field must contain a string"}),qe=new _({status:412,error:"missing_id",reason:"_id is required for puts"}),We=new _({status:400,error:"bad_request",reason:"Only reserved document ids may start with underscore."}),Fe=new _({status:412,error:"precondition_failed",reason:"Database not open"}),ze=(new _({status:500,error:"unknown_error",reason:"Database encountered an unknown error"}),new _({status:500,error:"badarg",reason:"Some query argument is invalid"})),Ke=(new _({status:400,error:"invalid_request",reason:"Request was invalid"}),new _({status:400,error:"query_parse_error",reason:"Some query parameter is invalid"}),new _({status:500,error:"doc_validation",reason:"Bad special document member"})),Ye=new _({status:400,error:"bad_request",reason:"Something wrong with the request"}),Ve=(new _({status:400,error:"bad_request",reason:"Document must be a JSON object"}),new _({status:404,error:"not_found",reason:"Database not found"}),new _({status:500,error:"indexed_db_went_bad",reason:"unknown"}),new _({status:500,error:"web_sql_went_bad",reason:"unknown"}),new _({status:500,error:"levelDB_went_went_bad",reason:"unknown"}),new _({status:403,error:"forbidden",reason:"Forbidden by design doc validate_doc_update function"}),new _({status:400,error:"bad_request",reason:"Invalid rev format"})),Je=(new _({status:412,error:"file_exists",reason:"The database could not be created, the file already exists."}),new _({status:412,error:"missing_stub"})),He=(new _({status:413,error:"invalid_url",reason:"Provided URL is invalid"}),T(["_id","_rev","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"])),Ge=T(["_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]),$e=function(e){return atob(e)},Xe=function(e){return btoa(e)},Ze=n.setImmediate||n.setTimeout,Qe=32768,et=c(function(e,t){function n(){var r=s*o,i=r+o;if(s++,a>s)c(u,e,r,i),Ze(n);else{c(u,e,r,i);var f=u.end(!0),l=X(f);t(null,l),u.destroy()}}var r="string"==typeof e,i=r?e.length:e.byteLength,o=Math.min(Qe,i),a=Math.ceil(i/o),s=0,u=r?new Le:new Le.ArrayBuffer,c=r?Q:Z;n()}),tt=function(e,n,r){t.nextTick(function(){r()})},nt=function(e,n,r){t.nextTick(function(){r()})},rt={toSublevel:tt,localAndMetaStores:nt},it=ee.name;De=it?function(e){return e.name}:function(e){return e.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]};var ot=De;fe.prototype.get=function(e,n,r){var i=ce(this,e),o=i.get(n);return o?t.nextTick(function(){r(null,o)}):null===o?t.nextTick(function(){r({name:"NotFoundError"})}):void e.get(n,function(e,t){return e?("NotFoundError"===e.name&&i.set(n,null),r(e)):(i.set(n,t),void r(null,t))})},fe.prototype.batch=function(e){for(var t=0,n=e.length;n>t;t++){var r=e[t],i=ce(this,r.prefix);"put"===r.type?i.set(r.key,r.value):i.set(r.key,null)}this._batch=this._batch.concat(e)},fe.prototype.execute=function(e,t){for(var n=new ke.Set,r=[],i=this._batch.length-1;i>=0;i--){var o=this._batch[i],a=o.prefix.prefix()[0]+"ÿ"+o.key;n.has(a)||(n.add(a),r.push(o))}e.batch(r,t)};var at="document-store",st="by-sequence",ut="attach-store",ct="attach-binary-store",ft="local-store",lt="meta-store",ht=new ke.Map,dt="_local_last_update_seq",pt="_local_doc_count",gt="_local_uuid",vt="md5-",yt={encode:l,decode:f,buffer:!1,type:"cheap-json"},mt=function(){try{return e(6)}catch(t){return t=t||"leveldown import error","MODULE_NOT_FOUND"===t.code?new Error(["the 'leveldown' package is not available. install it, or,","specify another storage backend using the 'db' option"].join(" ")):t.message&&t.message.match("Module version mismatch")?new Error([t.message,"This generally implies that leveldown was built with a different","version of node than that which is running now.  You may try","fully removing and reinstalling PouchDB or leveldown to resolve."].join(" ")):new Error(t.toString()+": unable to import leveldown")}};ge.valid=function(){return!0},ge.use_prefix=!1,ge.Changes=new v,ye(Ie,me)}).call(this,e(64),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e(7).Buffer)},{12:12,15:15,18:18,23:23,26:26,34:34,48:48,5:5,6:6,60:60,62:62,64:64,7:7,72:72,91:91,96:96,pouchdb:"pouchdb"}],2:[function(e,t,n){(function(e){function n(e){this._db=e,this._operations=[],this._written=!1}n.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},n.prototype.put=function(e,t){this._checkWritten();var n=this._db._checkKeyValue(e,"key",this._db._isBuffer);if(n)throw n;if(n=this._db._checkKeyValue(t,"value",this._db._isBuffer))throw n;return this._db._isBuffer(e)||(e=String(e)),this._db._isBuffer(t)||(t=String(t)),"function"==typeof this._put?this._put(e,t):this._operations.push({type:"put",key:e,value:t}),this},n.prototype.del=function(e){this._checkWritten();var t=this._db._checkKeyValue(e,"key",this._db._isBuffer);if(t)throw t;return this._db._isBuffer(e)||(e=String(e)),"function"==typeof this._del?this._del(e):this._operations.push({type:"del",key:e}),this},n.prototype.clear=function(){return this._checkWritten(),
  this._operations=[],"function"==typeof this._clear&&this._clear(),this},n.prototype.write=function(t,n){if(this._checkWritten(),"function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("write() requires a callback argument");return"object"!=typeof t&&(t={}),this._written=!0,"function"==typeof this._write?this._write(n):"function"==typeof this._db._batch?this._db._batch(this._operations,t,n):void e.nextTick(n)},t.exports=n}).call(this,e(64))},{64:64}],3:[function(e,t,n){(function(e){function n(e){this.db=e,this._ended=!1,this._nexting=!1}n.prototype.next=function(t){var n=this;if("function"!=typeof t)throw new Error("next() requires a callback argument");return n._ended?t(new Error("cannot call next() after end()")):n._nexting?t(new Error("cannot call next() before previous next() has completed")):(n._nexting=!0,"function"==typeof n._next?n._next(function(){n._nexting=!1,t.apply(null,arguments)}):void e.nextTick(function(){n._nexting=!1,t()}))},n.prototype.end=function(t){if("function"!=typeof t)throw new Error("end() requires a callback argument");return this._ended?t(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(t):void e.nextTick(t))},t.exports=n}).call(this,e(64))},{64:64}],4:[function(e,t,n){(function(n,r){function i(e){if(!arguments.length||void 0===e)throw new Error("constructor requires at least a location argument");if("string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e}var o=e(97),a=e(3),s=e(2);i.prototype.open=function(e,t){if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");return"object"!=typeof e&&(e={}),"function"==typeof this._open?this._open(e,t):void r.nextTick(t)},i.prototype.close=function(e){if("function"!=typeof e)throw new Error("close() requires a callback argument");return"function"==typeof this._close?this._close(e):void r.nextTick(e)},i.prototype.get=function(e,t,n){var i;if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("get() requires a callback argument");return(i=this._checkKeyValue(e,"key",this._isBuffer))?n(i):(this._isBuffer(e)||(e=String(e)),"object"!=typeof t&&(t={}),"function"==typeof this._get?this._get(e,t,n):void r.nextTick(function(){n(new Error("NotFound"))}))},i.prototype.put=function(e,t,n,i){var o;if("function"==typeof n&&(i=n),"function"!=typeof i)throw new Error("put() requires a callback argument");return(o=this._checkKeyValue(e,"key",this._isBuffer))?i(o):(o=this._checkKeyValue(t,"value",this._isBuffer))?i(o):(this._isBuffer(e)||(e=String(e)),this._isBuffer(t)||r.browser||(t=String(t)),"object"!=typeof n&&(n={}),"function"==typeof this._put?this._put(e,t,n,i):void r.nextTick(i))},i.prototype.del=function(e,t,n){var i;if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("del() requires a callback argument");return(i=this._checkKeyValue(e,"key",this._isBuffer))?n(i):(this._isBuffer(e)||(e=String(e)),"object"!=typeof t&&(t={}),"function"==typeof this._del?this._del(e,t,n):void r.nextTick(n))},i.prototype.batch=function(e,t,n){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return n(new Error("batch(array) requires an array argument"));"object"!=typeof t&&(t={});for(var i,o,a=0,s=e.length;s>a;a++)if(i=e[a],"object"==typeof i){if(o=this._checkKeyValue(i.type,"type",this._isBuffer))return n(o);if(o=this._checkKeyValue(i.key,"key",this._isBuffer))return n(o);if("put"==i.type&&(o=this._checkKeyValue(i.value,"value",this._isBuffer)))return n(o)}return"function"==typeof this._batch?this._batch(e,t,n):void r.nextTick(n)},i.prototype.approximateSize=function(e,t,n){if(null==e||null==t||"function"==typeof e||"function"==typeof t)throw new Error("approximateSize() requires valid `start`, `end` and `callback` arguments");if("function"!=typeof n)throw new Error("approximateSize() requires a callback argument");return this._isBuffer(e)||(e=String(e)),this._isBuffer(t)||(t=String(t)),"function"==typeof this._approximateSize?this._approximateSize(e,t,n):void r.nextTick(function(){n(null,0)})},i.prototype._setupIteratorOptions=function(e){var t=this;return e=o(e),["start","end","gt","gte","lt","lte"].forEach(function(n){e[n]&&t._isBuffer(e[n])&&0===e[n].length&&delete e[n]}),e.reverse=!!e.reverse,e.reverse&&e.lt&&(e.start=e.lt),e.reverse&&e.lte&&(e.start=e.lte),!e.reverse&&e.gt&&(e.start=e.gt),!e.reverse&&e.gte&&(e.start=e.gte),(e.reverse&&e.lt&&!e.lte||!e.reverse&&e.gt&&!e.gte)&&(e.exclusiveStart=!0),e},i.prototype.iterator=function(e){return"object"!=typeof e&&(e={}),e=this._setupIteratorOptions(e),"function"==typeof this._iterator?this._iterator(e):new a(this)},i.prototype._chainedBatch=function(){return new s(this)},i.prototype._isBuffer=function(e){return n.isBuffer(e)},i.prototype._checkKeyValue=function(e,t){if(null===e||void 0===e)return new Error(t+" cannot be `null` or `undefined`");if(null===e||void 0===e)return new Error(t+" cannot be `null` or `undefined`");if(this._isBuffer(e)){if(0===e.length)return new Error(t+" cannot be an empty Buffer")}else if(""===String(e))return new Error(t+" cannot be an empty String")},t.exports.AbstractLevelDOWN=i,t.exports.AbstractIterator=a,t.exports.AbstractChainedBatch=s}).call(this,{isBuffer:e(24)},e(64))},{2:2,24:24,3:3,64:64,97:97}],5:[function(e,t,n){"use strict";function r(e){return function(){var t=arguments.length;if(t){for(var n=[],r=-1;++r<t;)n[r]=arguments[r];return e.call(this,n)}return e.call(this,[])}}t.exports=r},{}],6:[function(e,t,n){},{}],7:[function(e,t,n){(function(t){"use strict";function r(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(n){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e){return this instanceof o?(o.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?a(this,e):"string"==typeof e?s(this,e,arguments.length>1?arguments[1]:"utf8"):u(this,e)):arguments.length>1?new o(e,arguments[1]):new o(e)}function a(e,t){if(e=g(e,0>t?0:0|v(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function s(e,t,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|m(t,n);return e=g(e,r),e.write(t,n),e}function u(e,t){if(o.isBuffer(t))return c(e,t);if($(t))return f(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return l(e,t);if(t instanceof ArrayBuffer)return h(e,t)}return t.length?d(e,t):p(e,t)}function c(e,t){var n=0|v(t.length);return e=g(e,n),t.copy(e,0,0,n),e}function f(e,t){var n=0|v(t.length);e=g(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function l(e,t){var n=0|v(t.length);e=g(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function h(e,t){return o.TYPED_ARRAY_SUPPORT?(t.byteLength,e=o._augment(new Uint8Array(t))):e=l(e,new Uint8Array(t)),e}function d(e,t){var n=0|v(t.length);e=g(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){var n,r=0;"Buffer"===t.type&&$(t.data)&&(n=t.data,r=0|v(n.length)),e=g(e,r);for(var i=0;r>i;i+=1)e[i]=255&n[i];return e}function g(e,t){o.TYPED_ARRAY_SUPPORT?(e=o._augment(new Uint8Array(t)),e.__proto__=o.prototype):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=o.poolSize>>>1;return n&&(e.parent=X),e}function v(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function y(e,t){if(!(this instanceof y))return new y(e,t);var n=new o(e,t);return delete n.parent,n}function m(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function _(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return L(this,t,n);case"binary":return R(this,t,n);case"base64":return B(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+a]=s}return a}function w(e,t,n,r){return J(z(t,e.length-n),e,n,r)}function E(e,t,n,r){return J(K(t),e,n,r)}function k(e,t,n,r){return E(e,t,n,r)}function S(e,t,n,r){return J(V(t),e,n,r)}function x(e,t,n,r){return J(Y(t,e.length-n),e,n,r)}function B(e,t,n){return 0===t&&n===e.length?H.fromByteArray(e):H.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n>=i+s){var u,c,f,l;switch(s){case 1:128>o&&(a=o);break;case 2:u=e[i+1],128===(192&u)&&(l=(31&o)<<6|63&u,l>127&&(a=l));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(l=(15&o)<<12|(63&u)<<6|63&c,l>2047&&(55296>l||l>57343)&&(a=l));break;case 4:u=e[i+1],c=e[i+2],f=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&f)&&(l=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&f,l>65535&&1114112>l&&(a=l))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return O(r)}function O(e){var t=e.length;if(Z>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Z));return n}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(127&e[i]);return r}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function j(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;o++)i+=F(e[o]);return i}function T(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function I(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||a>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range")}function C(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);o>i;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function D(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);o>i;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(t>i||o>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function U(e,t,n,r,i){return i||N(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,i){return i||N(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,n,r,52,8),n+8}function q(e){if(e=W(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function W(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function F(e){return 16>e?"0"+e.toString(16):e.toString(16)}function z(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;r>a;a++){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function K(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function Y(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);a++)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function V(e){return H.toByteArray(q(e))}function J(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}var H=e(8),G=e(21),$=e(9);n.Buffer=o,n.SlowBuffer=y,n.INSPECT_MAX_BYTES=50,o.poolSize=8192;var X={};o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),o.TYPED_ARRAY_SUPPORT?(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array):(o.prototype.length=void 0,o.prototype.parent=void 0),o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);a>i&&e[i]===t[i];)++i;return i!==a&&(n=e[i],r=t[i]),r>n?-1:n>r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!$(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new o(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var r=new o(t),i=0;for(n=0;n<e.length;n++){var a=e[n];a.copy(r,i),i+=a.length}return r},o.byteLength=m,o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):_.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:o.compare(this,e)},o.prototype.indexOf=function(e,t){function n(e,t,n){for(var r=-1,i=0;n+i<e.length;i++)if(e[n+i]===t[-1===r?0:i-r]){if(-1===r&&(r=i),i-r+1===t.length)return n+r}else r=-1;return-1}if(t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(o.isBuffer(e))return n(this,e,t);if("number"==typeof e)return o.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):n(this,[e],t);throw new TypeError("val must be string, number or Buffer")},o.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},o.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=t,t=0|n,n=i}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return E(this,e,t,n);case"binary":return k(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var r;if(o.TYPED_ARRAY_SUPPORT)r=o._augment(this.subarray(e,t));else{var i=t-e;r=new o(i,void 0);for(var a=0;i>a;a++)r[a]=this[a+e]}return r.length&&(r.parent=this.parent||this),r},o.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||I(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},o.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||I(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||I(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||I(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),G.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),G.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),G.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),G.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||M(this,e,t,n,Math.pow(2,8*n),0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||M(this,e,t,n,Math.pow(2,8*n),0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=0,a=1,s=0>e?1:0;for(this[t]=255&e;++o<n&&(a*=256);)this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0>e?1:0;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&t>n&&r>t)for(i=a-1;i>=0;i--)e[i+t]=this[i+n];else if(1e3>a||!o.TYPED_ARRAY_SUPPORT)for(i=0;a>i;i++)e[i+t]=this[i+n];else e._set(this.subarray(n,n+a),t);return a},o.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var i=z(e.toString()),o=i.length;for(r=t;n>r;r++)this[r]=i[r%o]}return this}},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o.TYPED_ARRAY_SUPPORT)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Q=o.prototype;o._augment=function(e){return e.constructor=o,e._isBuffer=!0,e._set=e.set,e.get=Q.get,e.set=Q.set,e.write=Q.write,e.toString=Q.toString,e.toLocaleString=Q.toString,e.toJSON=Q.toJSON,e.equals=Q.equals,e.compare=Q.compare,e.indexOf=Q.indexOf,e.copy=Q.copy,e.slice=Q.slice,e.readUIntLE=Q.readUIntLE,e.readUIntBE=Q.readUIntBE,e.readUInt8=Q.readUInt8,e.readUInt16LE=Q.readUInt16LE,e.readUInt16BE=Q.readUInt16BE,e.readUInt32LE=Q.readUInt32LE,e.readUInt32BE=Q.readUInt32BE,e.readIntLE=Q.readIntLE,e.readIntBE=Q.readIntBE,e.readInt8=Q.readInt8,e.readInt16LE=Q.readInt16LE,e.readInt16BE=Q.readInt16BE,e.readInt32LE=Q.readInt32LE,e.readInt32BE=Q.readInt32BE,e.readFloatLE=Q.readFloatLE,e.readFloatBE=Q.readFloatBE,e.readDoubleLE=Q.readDoubleLE,e.readDoubleBE=Q.readDoubleBE,e.writeUInt8=Q.writeUInt8,e.writeUIntLE=Q.writeUIntLE,e.writeUIntBE=Q.writeUIntBE,e.writeUInt16LE=Q.writeUInt16LE,e.writeUInt16BE=Q.writeUInt16BE,e.writeUInt32LE=Q.writeUInt32LE,e.writeUInt32BE=Q.writeUInt32BE,e.writeIntLE=Q.writeIntLE,e.writeIntBE=Q.writeIntBE,e.writeInt8=Q.writeInt8,e.writeInt16LE=Q.writeInt16LE,e.writeInt16BE=Q.writeInt16BE,e.writeInt32LE=Q.writeInt32LE,e.writeInt32BE=Q.writeInt32BE,e.writeFloatLE=Q.writeFloatLE,e.writeFloatBE=Q.writeFloatBE,e.writeDoubleLE=Q.writeDoubleLE,e.writeDoubleBE=Q.writeDoubleBE,e.fill=Q.fill,e.inspect=Q.inspect,e.toArrayBuffer=Q.toArrayBuffer,e};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{21:21,8:8,9:9}],8:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===a||t===l?62:t===s||t===h?63:u>t?-1:u+10>t?t-u+26+26:f+26>t?t-f:c+26>t?t-c+26:void 0}function n(e){function n(e){c[l++]=e}var r,i,a,s,u,c;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=e.length;u="="===e.charAt(f-2)?2:"="===e.charAt(f-1)?1:0,c=new o(3*e.length/4-u),a=u>0?e.length-4:e.length;var l=0;for(r=0,i=0;a>r;r+=4,i+=3)s=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===u?(s=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&s)):1===u&&(s=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(s>>8&255),n(255&s)),c}function i(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,o,a,s=e.length%3,u="";for(i=0,a=e.length-s;a>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=n(o);switch(s){case 1:o=e[e.length-1],u+=t(o>>2),u+=t(o<<4&63),u+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],u+=t(o>>10),u+=t(o>>4&63),u+=t(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),f="A".charCodeAt(0),l="-".charCodeAt(0),h="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],9:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],10:[function(e,t,n){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===v(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function a(e){return"number"==typeof e}function s(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function c(e){return void 0===e}function f(e){return"[object RegExp]"===v(e)}function l(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===v(e)}function d(e){return"[object Error]"===v(e)||e instanceof Error}function p(e){return"function"==typeof e}function g(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function v(e){return Object.prototype.toString.call(e)}n.isArray=t,n.isBoolean=r,n.isNull=i,n.isNullOrUndefined=o,n.isNumber=a,n.isString=s,n.isSymbol=u,n.isUndefined=c,n.isRegExp=f,n.isObject=l,n.isDate=h,n.isError=d,n.isFunction=p,n.isPrimitive=g,n.isBuffer=e.isBuffer}).call(this,{isBuffer:e(24)})},{24:24}],11:[function(e,t,n){var r=e(7).Buffer,i=".PYFGCRLAOEUIDHTNSQJKXBMWVZ_pyfgcrlaoeuidhtnsqjkxbmwvz1234567890".split("").sort().join("");t.exports=function(e,t){if(e=e||i,t=t||{},64!==e.length)throw new Error("a base 64 encoding requires 64 chars");var n=new r(128);n.fill();for(var o=0;64>o;o++){var a=e.charCodeAt(o);n[a]=o}return t.encode=function(t){for(var n="",r=t.length,i=0,o=0;r>o;o++){var a=t[o];switch(o%3){case 0:n+=e[a>>2],i=(3&a)<<4;break;case 1:n+=e[i|a>>4],i=(15&a)<<2;break;case 2:n+=e[i|a>>6],n+=e[63&a],i=0}}return r%3&&(n+=e[i]),n},t.decode=function(e){for(var t=e.length,i=0,o=new r(~~(t/4*3)),a=0,s=0;t>s;s++){var u=n[e.charCodeAt(s)];switch(s%4){case 0:a=u<<2;break;case 1:o[i++]=a|u>>4,a=u<<4&255;break;case 2:o[i++]=a|u>>2,a=u<<6&255;break;case 3:o[i++]=a|u}}return o},t},t.exports(i,t.exports)},{7:7}],12:[function(e,t,n){"use strict";function r(e){if(this._capacity=a(e),this._length=0,this._front=0,this._makeCapacity(),s(e)){for(var t=e.length,n=0;t>n;++n)this[n]=e[n];this._length=t}}function i(e,t,n,r,i){for(var o=0;i>o;++o)n[o+r]=e[o+t]}function o(e){return e>>>=0,e-=1,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e+1}function a(e){if("number"!=typeof e){if(!s(e))return 16;e=e.length}return o(Math.min(Math.max(16,e),1073741824))}r.prototype.toArray=function(){for(var e=this._length,t=new Array(e),n=this._front,r=this._capacity,i=0;e>i;++i)t[i]=this[n+i&r-1];return t},r.prototype.push=function(e){var t=arguments.length,n=this._length;if(t>1){var r=this._capacity;if(n+t>r){for(var i=0;t>i;++i){this._checkCapacity(n+1);var o=this._front+n&this._capacity-1;this[o]=arguments[i],n++,this._length=n}return n}for(var o=this._front,i=0;t>i;++i)this[o+n&r-1]=arguments[i],o++;return this._length=n+t,n+t}if(0===t)return n;this._checkCapacity(n+1);var i=this._front+n&this._capacity-1;return this[i]=e,this._length=n+1,n+1},r.prototype.pop=function(){var e=this._length;if(0!==e){var t=this._front+e-1&this._capacity-1,n=this[t];return this[t]=void 0,this._length=e-1,n}},r.prototype.shift=function(){var e=this._length;if(0!==e){var t=this._front,n=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length=e-1,n}},r.prototype.unshift=function(e){var t=this._length,n=arguments.length;if(n>1){var r=this._capacity;if(t+n>r){for(var i=n-1;i>=0;i--){this._checkCapacity(t+1);var r=this._capacity,o=(this._front-1&r-1^r)-r;this[o]=arguments[i],t++,this._length=t,this._front=o}return t}for(var a=this._front,i=n-1;i>=0;i--){var o=(a-1&r-1^r)-r;this[o]=arguments[i],a=o}return this._front=a,this._length=t+n,t+n}if(0===n)return t;this._checkCapacity(t+1);var r=this._capacity,i=(this._front-1&r-1^r)-r;return this[i]=e,this._length=t+1,this._front=i,t+1},r.prototype.peekBack=function(){var e=this._length;if(0!==e){var t=this._front+e-1&this._capacity-1;return this[t]}},r.prototype.peekFront=function(){return 0!==this._length?this[this._front]:void 0},r.prototype.get=function(e){var t=e;if(t===(0|t)){var n=this._length;if(0>t&&(t+=n),!(0>t||t>=n))return this[this._front+t&this._capacity-1]}},r.prototype.isEmpty=function(){return 0===this._length},r.prototype.clear=function(){this._length=0,this._front=0,this._makeCapacity()},r.prototype.toString=function(){return this.toArray().toString()},r.prototype.valueOf=r.prototype.toString,r.prototype.removeFront=r.prototype.shift,r.prototype.removeBack=r.prototype.pop,r.prototype.insertFront=r.prototype.unshift,r.prototype.insertBack=r.prototype.push,r.prototype.enqueue=r.prototype.push,r.prototype.dequeue=r.prototype.shift,r.prototype.toJSON=r.prototype.toArray,Object.defineProperty(r.prototype,"length",{get:function(){return this._length},set:function(){throw new RangeError("")}}),r.prototype._makeCapacity=function(){for(var e=this._capacity,t=0;e>t;++t)this[t]=void 0},r.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(a(1.5*this._capacity+16))},r.prototype._resizeTo=function(e){var t=this._front,n=this._capacity,r=new Array(n),o=this._length;if(i(this,0,r,0,n),this._capacity=e,this._makeCapacity(),this._front=0,n>=t+o)i(r,t,this,0,o);else{var a=o-(t+o&n-1);i(r,t,this,0,a),i(r,0,this,a,o-a)}};var s=Array.isArray;t.exports=r},{}],13:[function(e,t,n){function r(e,t,n){a(this,{type:e,name:e,cause:"string"!=typeof t?t:n,message:t&&"string"!=typeof t?t.message:t},"ewr")}function i(e,t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,arguments.callee),r.call(this,"CustomError",e,t)}function o(e,t,n){var o=function(n,i){r.call(this,t,n,i),"FilesystemError"==t&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(e.errno[this.cause.errno]?e.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,arguments.callee)};return o.prototype=n?new n:new i,o}var a=e(65);i.prototype=new Error,t.exports=function(e){var t=function(t,n){return o(e,t,n)};return{CustomError:i,FilesystemError:t("FilesystemError"),createError:t}}},{65:65
  }],14:[function(e,t,n){var r=t.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];t.exports.errno={},t.exports.code={},r.forEach(function(e){t.exports.errno[e.errno]=e,t.exports.code[e.code]=e}),t.exports.custom=e(13)(t.exports),t.exports.create=t.exports.custom.createError},{13:13}],15:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!o(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,o,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),c=n.slice(),r=c.length,u=0;r>u;u++)c[u].apply(this,o);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],16:[function(e,t,n){(function(e,n){"use strict";function r(e){this._dbName=e}function i(e,t){if(u[e])return s(function(){t(null,u[e])});var n=indexedDB.open(e,1);c[e]=n,n.onupgradeneeded=function(e){var t=e.target.result;1!==e.oldVersion&&t.createObjectStore(a).createIndex("fakeKey","fakeKey")},n.onsuccess=function(n){var r=u[e]=n.target.result;t(null,r)},n.onerror=function(e){var n="Failed to open indexedDB, are you in private browsing mode?";console.error(n),t(e)}}function o(e,t){try{return{txn:e.transaction(a,t)}}catch(n){return{error:n}}}var a="fruitdown",s=n.setImmediate||e.nextTick,u={},c={};r.prototype.getKeys=function(e){i(this._dbName,function(t,n){if(t)return e(t);var r=o(n,"readonly");if(r.error)return e(r.error);var i=r.txn,s=i.objectStore(a);i.onerror=e;var u=[];i.oncomplete=function(){e(null,u.sort())};var c=s.index("fakeKey").openKeyCursor();c.onsuccess=function(e){var t=e.target.result;t&&(u.push(t.primaryKey),t["continue"]())}})},r.prototype.put=function(e,t,n){i(this._dbName,function(r,i){if(r)return n(r);var s=o(i,"readwrite");if(s.error)return n(s.error);var u=s.txn,c=u.objectStore(a),f="string"==typeof t?t:t.toString();u.onerror=n,u.oncomplete=function(){n()},c.put({value:f,fakeKey:0},e)})},r.prototype.get=function(e,t){i(this._dbName,function(n,r){if(n)return t(n);var i=o(r,"readonly");if(i.error)return t(i.error);var s,u=i.txn,c=u.objectStore(a),f=c.get(e);f.onsuccess=function(e){e.target.result&&(s=e.target.result.value)},u.onerror=t,u.oncomplete=function(){t(null,s)}})},r.prototype.remove=function(e,t){i(this._dbName,function(n,r){if(n)return t(n);var i=o(r,"readwrite");if(i.error)return t(i.error);var s=i.txn,u=s.objectStore(a);u["delete"](e),s.onerror=t,s.oncomplete=function(){t()}})},r.destroy=function(e,t){s(function(){c[e]&&c[e].result&&(c[e].result.close(),delete u[e]);var n=indexedDB.deleteDatabase(e);n.onsuccess=function(){c[e]&&(c[e]=null),t(null)},n.onerror=t})},t.exports=r}).call(this,e(64),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{64:64}],17:[function(e,t,n){(function(n){"use strict";function r(e){this._store=new l(e),this._queue=new h}var i="ArrayBuffer:",o=new RegExp("^"+i),a="Uint8Array:",s=new RegExp("^"+a),u="Buff:",c=new RegExp("^"+u),f=e(20),l=e(16),h=e(19),d=e(11);r.prototype.sequentialize=function(e,t){this._queue.add(t,e)},r.prototype.init=function(e){var t=this;t.sequentialize(e,function(e){t._store.getKeys(function(n,r){return n?e(n):(t._keys=r,e())})})},r.prototype.keys=function(e){var t=this;t.sequentialize(e,function(e){e(null,t._keys.slice())})},r.prototype.setItem=function(e,t,r){var i=this;i.sequentialize(r,function(r){n.isBuffer(t)&&(t=u+d.encode(t));var o=f.sortedIndexOf(i._keys,e);i._keys[o]!==e&&i._keys.splice(o,0,e),i._store.put(e,t,r)})},r.prototype.getItem=function(e,t){var n=this;n.sequentialize(t,function(t){n._store.get(e,function(e,n){return e?t(e):"undefined"==typeof n||null===n?t(new Error("NotFound")):("undefined"!=typeof n&&(c.test(n)?n=d.decode(n.substring(u.length)):o.test(n)?(n=n.substring(i.length),n=new ArrayBuffer(atob(n).split("").map(function(e){return e.charCodeAt(0)}))):s.test(n)&&(n=n.substring(a.length),n=new Uint8Array(atob(n).split("").map(function(e){return e.charCodeAt(0)})))),void t(null,n))})})},r.prototype.removeItem=function(e,t){var n=this;n.sequentialize(t,function(t){var r=f.sortedIndexOf(n._keys,e);n._keys[r]===e?(n._keys.splice(r,1),n._store.remove(e,function(e){return e?t(e):void t()})):t()})},r.prototype.length=function(e){var t=this;t.sequentialize(e,function(e){e(null,t._keys.length)})},t.exports=r}).call(this,{isBuffer:e(24)})},{11:11,16:16,19:19,20:20,24:24}],18:[function(e,t,n){(function(n,r,i){"use strict";function o(e,t){f.call(this,e),this._reverse=!!t.reverse,this._endkey=t.end,this._startkey=t.start,this._gt=t.gt,this._gte=t.gte,this._lt=t.lt,this._lte=t.lte,this._exclusiveStart=t.exclusiveStart,this._limit=t.limit,this._count=0,this.onInitCompleteListeners=[]}function a(e){return this instanceof a?(c.call(this,e),void(this.container=new l(e))):new a(e)}function s(e,t){if(null===e||void 0===e)return new Error(t+" cannot be `null` or `undefined`");if(null===e||void 0===e)return new Error(t+" cannot be `null` or `undefined`");if("key"===t){if(e instanceof Boolean)return new Error(t+" cannot be `null` or `undefined`");if(""===e)return new Error(t+" cannot be empty")}if(0===e.toString().indexOf("[object ArrayBuffer]")&&(0===e.byteLength||void 0===e.byteLength))return new Error(t+" cannot be an empty Buffer");if(i.isBuffer(e)){if(0===e.length)return new Error(t+" cannot be an empty Buffer")}else if(""===String(e))return new Error(t+" cannot be an empty String")}var u=e(23),c=e(4).AbstractLevelDOWN,f=e(4).AbstractIterator,l=e(17),h=e(16),d=e(20),p=r.setImmediate||n.nextTick;u(o,f),o.prototype._init=function(e){p(function(){e()})},o.prototype._next=function(e){function t(){if(n._pos===n._keys.length||n._pos<0)return e();var t=n._keys[n._pos];return n._endkey&&(n._reverse?t<n._endkey:t>n._endkey)?e():n._limit&&n._limit>0&&n._count++>=n._limit?e():n._lt&&t>=n._lt||n._lte&&t>n._lte||n._gt&&t<=n._gt||n._gte&&t<n._gte?e():(n._pos+=n._reverse?-1:1,void n.db.container.getItem(t,function(r,i){return r?"NotFound"===r.message?p(function(){n._next(e)}):e(r):void e(null,t,i)}))}var n=this;n.initStarted?n.initCompleted?t():n.onInitCompleteListeners.push(t):(n.initStarted=!0,n._init(function(r){return r?e(r):void n.db.container.keys(function(r,i){if(r)return e(r);if(n._keys=i,n._startkey){var o=d.sortedIndexOf(n._keys,n._startkey),a=o>=n._keys.length||0>o?void 0:n._keys[o];n._pos=o,n._reverse?(n._exclusiveStart||a!==n._startkey)&&n._pos--:n._exclusiveStart&&a===n._startkey&&n._pos++}else n._pos=n._reverse?n._keys.length-1:0;t(),n.initCompleted=!0;for(var s=-1;++s<n.onInitCompleteListeners;)p(n.onInitCompleteListeners[s])})}))},u(a,c),a.prototype._open=function(e,t){this.container.init(t)},a.prototype._put=function(e,t,n,r){var o=s(e,"key");if(o)return p(function(){r(o)});if(o=s(t,"value"))return p(function(){r(o)});if("object"==typeof t&&!i.isBuffer(t)&&void 0===t.buffer){var a={};a.storetype="json",a.data=t,t=JSON.stringify(a)}this.container.setItem(e,t,r)},a.prototype._get=function(e,t,n){var r=s(e,"key");return r?p(function(){n(r)}):(i.isBuffer(e)||(e=String(e)),void this.container.getItem(e,function(e,r){if(e)return n(e);if(t.asBuffer===!1||i.isBuffer(r)||(r=new i(r)),t.asBuffer===!1&&r.indexOf('{"storetype":"json","data"')>-1){var o=JSON.parse(r);r=o.data}n(null,r)}))},a.prototype._del=function(e,t,n){var r=s(e,"key");return r?p(function(){n(r)}):(i.isBuffer(e)||(e=String(e)),void this.container.removeItem(e,n))},a.prototype._batch=function(e,t,n){var r=this;p(function(){function o(){++l===e.length&&n(f)}var a,u,c,f,l=0;if(Array.isArray(e)&&e.length)for(var h=0;h<e.length;h++){var d=e[h];d?(u=i.isBuffer(d.key)?d.key:String(d.key),a=s(u,"key"),a?(f=a,o()):"del"===d.type?r._del(d.key,t,o):"put"===d.type&&(c=i.isBuffer(d.value)?d.value:String(d.value),a=s(c,"value"),a?(f=a,o()):r._put(u,c,t,o))):o()}else n()})},a.prototype._iterator=function(e){return new o(this,e)},a.destroy=function(e,t){h.destroy(e,t)},t.exports=a}).call(this,e(64),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e(7).Buffer)},{16:16,17:17,20:20,23:23,4:4,64:64,7:7}],19:[function(e,t,n){(function(n,r){"use strict";function i(){this.queue=new a,this.running=!1}var o=e(5),a=e(92),s=r.setImmediate||n.nextTick;i.prototype.add=function(e,t){this.queue.push({fun:e,callback:t}),this.processNext()},i.prototype.processNext=function(){var e=this;if(!e.running&&e.queue.length){e.running=!0;var t=e.queue.shift();s(function(){t.fun(o(function(n){t.callback.apply(null,n),e.running=!1,e.processNext()}))})}},t.exports=i}).call(this,e(64),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{5:5,64:64,92:92}],20:[function(e,t,n){"use strict";n.sortedIndexOf=function(e,t){for(var n,r=0,i=e.length;i>r;)n=r+i>>>1,e[n]<t?r=n+1:i=n;return r}},{}],21:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,f=-7,l=n?i-1:0,h=n?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+l>=1?h/u:h*Math.pow(2,1-l),t*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*g}},{}],22:[function(e,t,n){(function(e){"use strict";function n(){f=!0;for(var e,t,n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}f=!1}function r(e){1!==l.push(e)||f||i()}var i,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var a=0,s=new o(n),u=e.document.createTextNode("");s.observe(u,{characterData:!0}),i=function(){u.data=a=++a%2}}else if(e.setImmediate||"undefined"==typeof e.MessageChannel)i="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){n(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(n,0)};else{var c=new e.MessageChannel;c.port1.onmessage=n,i=function(){c.port2.postMessage(0)}}var f,l=[];t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],24:[function(e,t,n){t.exports=function(e){return!(null==e||!(e._isBuffer||e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)))}},{}],25:[function(e,t,n){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],26:[function(e,t,n){(function(e){e("object"==typeof n?n:this)}).call(this,function(e){var t=Array.prototype.slice,n=Array.prototype.forEach,r=function(e){if("object"!=typeof e)throw e+" is not an object";var i=t.call(arguments,1);return n.call(i,function(t){if(t)for(var n in t)"object"==typeof t[n]&&e[n]?r.call(e,e[n],t[n]):e[n]=t[n]}),e};e.extend=r})},{}],27:[function(e,t,n){function r(e){this.opts=e||{},this.encodings=i}var i=e(28);t.exports=r,r.prototype._encoding=function(e){return"string"==typeof e&&(e=i[e]),e||(e=i.id),e},r.prototype._keyEncoding=function(e,t){return this._encoding(t&&t.keyEncoding||e&&e.keyEncoding||this.opts.keyEncoding)},r.prototype._valueEncoding=function(e,t){return this._encoding(t&&(t.valueEncoding||t.encoding)||e&&(e.valueEncoding||e.encoding)||this.opts.valueEncoding||this.opts.encoding)},r.prototype.encodeKey=function(e,t,n){return this._keyEncoding(t,n).encode(e)},r.prototype.encodeValue=function(e,t,n){return this._valueEncoding(t,n).encode(e)},r.prototype.decodeKey=function(e,t){return this._keyEncoding(t).decode(e)},r.prototype.decodeValue=function(e,t){return this._valueEncoding(t).decode(e)},r.prototype.encodeBatch=function(e,t){var n=this;return e.map(function(e){var r={type:e.type,key:n.encodeKey(e.key,t,e)};return n.keyAsBuffer(t,e)&&(r.keyEncoding="binary"),e.prefix&&(r.prefix=e.prefix),"value"in e&&(r.value=n.encodeValue(e.value,t,e),n.valueAsBuffer(t,e)&&(r.valueEncoding="binary")),r})};var o=["lt","gt","lte","gte","start","end"];r.prototype.encodeLtgt=function(e){var t=this,n={};return Object.keys(e).forEach(function(r){n[r]=o.indexOf(r)>-1?t.encodeKey(e[r],e):e[r]}),n},r.prototype.createStreamDecoder=function(e){var t=this;return e.keys&&e.values?function(n,r){return{key:t.decodeKey(n,e),value:t.decodeValue(r,e)}}:e.keys?function(n){return t.decodeKey(n,e)}:e.values?function(n,r){return t.decodeValue(r,e)}:function(){}},r.prototype.keyAsBuffer=function(e){return this._keyEncoding(e).buffer},r.prototype.valueAsBuffer=function(e){return this._valueEncoding(e).buffer}},{28:28}],28:[function(e,t,n){(function(e){function t(e){return e}function r(t){return void 0===t||null===t||e.isBuffer(t)}n.utf8=n["utf-8"]={encode:function(e){return r(e)?e:String(e)},decode:t,buffer:!1,type:"utf8"},n.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},n.binary={encode:function(t){return r(t)?t:new e(t)},decode:t,buffer:!0,type:"binary"},n.id={encode:function(e){return e},decode:function(e){return e},buffer:!1,type:"id"};var i=["hex","ascii","base64","ucs2","ucs-2","utf16le","utf-16le"];i.forEach(function(t){n[t]={encode:function(n){return r(n)?n:new e(n,t)},decode:function(e){return e.toString(t)},buffer:!0,type:t}})}).call(this,e(7).Buffer)},{7:7}],29:[function(e,t,n){var r=e(14).create,i=r("LevelUPError"),o=r("NotFoundError",i);o.prototype.notFound=!0,o.prototype.status=404,t.exports={LevelUPError:i,InitializationError:r("InitializationError",i),OpenError:r("OpenError",i),ReadError:r("ReadError",i),WriteError:r("WriteError",i),NotFoundError:o,EncodingError:r("EncodingError",i)}},{14:14}],30:[function(e,t,n){function r(e,t){return this instanceof r?(o.call(this,a(t,{objectMode:!0})),this._iterator=e,this._destroyed=!1,this._decoder=null,t&&t.decoder&&(this._decoder=t.decoder),void this.on("end",this._cleanup.bind(this))):new r(e,t)}var i=e(23),o=e(71).Readable,a=e(31),s=e(29).EncodingError;t.exports=r,i(r,o),r.prototype._read=function(){var e=this;this._destroyed||this._iterator.next(function(t,n,r){if(!e._destroyed){if(t)return e.emit("error",t);if(void 0===n&&void 0===r)e.push(null);else{if(!e._decoder)return e.push({key:n,value:r});try{var r=e._decoder(n,r)}catch(t){return e.emit("error",new s(t)),void e.push(null)}e.push(r)}}})},r.prototype.destroy=r.prototype._cleanup=function(){var e=this;this._destroyed||(this._destroyed=!0,this._iterator.end(function(t){return t?e.emit("error",t):void e.emit("close")}))}},{23:23,29:29,31:31,71:71}],31:[function(e,t,n){function r(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)i.call(n,r)&&(e[r]=n[r])}return e}t.exports=r;var i=Object.prototype.hasOwnProperty},{}],32:[function(e,t,n){t.exports={encode:function(e){for(var t="",n=e[0].slice();n.length;)t+="ÿ"+n.shift().toString()+"ÿ";return t+(e[1]||"").toString()},decode:function(e){var t=e.toString().split("ÿ").filter(Boolean),n=t.pop();return[t,n]},lowerBound:"\x00",upperBound:"ÿ"}},{}],33:[function(e,t,n){var r=e(45);t.exports=function(e){var t=[];return{add:function(e,n){var r={range:e,hook:n};return t.push(r),function(){var e=t.indexOf(r);return~e?t.splice(e,1):void 0}},removeAll:function(e){throw new Error("not implemented")},trigger:function(n,i){for(var o=0;o<t.length;o++){var a=t[o];r(a.range,n,e)&&a.hook.apply(this,i)}}}}},{45:45}],34:[function(e,t,n){var r=e(43),i=e(46),o=e(35),a=e(42),s=e(38),u=e(32);t.exports=function(e,t){return t=a(e.options,t),i(r(e,u,o),[],s,e.options)}},{32:32,35:35,38:38,42:42,43:43,46:46}],35:[function(e,t,n){function r(e,t){var n=t&&t.keyEncoding||e.keyEncoding||"utf8";return l[n]||n}function i(e,t){var n=t&&(t.valueEncoding||t.encoding)||e.valueEncoding||e.encoding||"utf8";return l[n]||n}function o(e,t,n){return r(t,n).encode(e)}function a(e,t,n){return i(t,n).encode(e)}function s(e,t){return r(t).decode(e)}function u(e,t){return i(t).decode(e)}function c(e,t){return i(e,t).buffer}function f(e,t){return r(e,t).buffer}var l=e(36);t.exports={encodeKey:o,encodeValue:a,isValueAsBuffer:c,isKeyAsBuffer:f,decodeValue:u,decodeKey:s}},{36:36}],36:[function(e,t,n){(function(e){var n=["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le"];t.exports=function(){function t(t){return void 0===t||null===t||e.isBuffer(t)}var r={};return r.utf8=r["utf-8"]={encode:function(e){return t(e)?e:String(e)},decode:function(e){return e},buffer:!1,type:"utf8"},r.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},r.binary={encode:function(n){return t(n)?n:new e(n)},decode:function(e){return e},buffer:!0,type:"binary"},n.forEach(function(n){r[n]||(r[n]={encode:function(r){return t(r)?r:new e(r,n)},decode:function(e){return e.toString(n)},buffer:!0,type:n})}),r}()}).call(this,e(7).Buffer)},{7:7}],37:[function(e,t,n){var r=e(14).create,i=r("LevelUPError"),o=r("NotFoundError",i);o.prototype.notFound=!0,o.prototype.status=404,t.exports={LevelUPError:i,InitializationError:r("InitializationError",i),OpenError:r("OpenError",i),ReadError:r("ReadError",i),WriteError:r("WriteError",i),NotFoundError:o,EncodingError:r("EncodingError",i)}},{14:14}],38:[function(e,t,n){function r(e,t){return this instanceof r?(i.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this._waiting=!1,this._options=e,void(this._makeData=t)):new r(e,t)}var i=e(71).Readable,o=e(95).inherits,a=(e(40),e(37).EncodingError);e(39);o(r,i),r.prototype.setIterator=function(e){return this._iterator=e,this._destroyed?e.end(function(){}):this._waiting?(this._waiting=!1,this._read()):this},r.prototype._read=function(){var e=this;if(!e._destroyed)return e._iterator?void e._iterator.next(function(t,n,r){if(t||void 0===n&&void 0===r)return t||e._destroyed||e.push(null),e._cleanup(t);try{r=e._makeData(n,r)}catch(i){return e._cleanup(new a(i))}e._destroyed||e.push(r)}):this._waiting=!0},r.prototype._cleanup=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;e&&t.emit("error",e),t._iterator?t._iterator.end(function(){t._iterator=null,t.emit("close")}):t.emit("close")}},r.prototype.destroy=function(){this._cleanup()},r.prototype.toString=function(){return"LevelUP.ReadStream"},t.exports=r},{37:37,39:39,40:40,71:71,95:95}],39:[function(e,t,n){function r(e,t,n){e.readStream().pipe(t.writeStream()).on("close",n?n:function(){}).on("error",n?n:function(e){throw e})}function i(e,t){var n="string"==typeof t;return!n&&t&&t.encoding&&!t.valueEncoding&&(t.valueEncoding=t.encoding),c(e&&e.options||{},n?d[t]||d[h.valueEncoding]:t)}function o(){if(u)return u;var t,n=e(41).devDependencies.leveldown,r="Could not locate LevelDOWN, try `npm install leveldown`";try{t=e(6).version}catch(i){throw new f(r)}if(!e(6).satisfies(t,n))throw new f("Installed version of LevelDOWN ("+t+") does not match required version ("+n+")");try{return u=e(6)}catch(i){throw new f(r)}}function a(e,t,n){return"function"==typeof n?n(t):e.emit("error",t)}function s(e){return"undefined"!=typeof e}var u,c=e(40),f=e(37).LevelUPError,l=e(36),h={createIfMissing:!0,errorIfExists:!1,keyEncoding:"utf8",valueEncoding:"utf8",compression:!0},d=function(){var e={};for(var t in l)e[t]={valueEncoding:l[t]};return e}();t.exports={defaultOptions:h,copy:r,getOptions:i,getLevelDOWN:o,dispatchError:a,isDefined:s}},{36:36,37:37,40:40,41:41,6:6}],40:[function(e,t,n){function r(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}t.exports=r},{}],41:[function(e,t,n){t.exports={_args:[["levelup@~0.19.0","/Users/nolan/workspace/pouchdb/node_modules/level-sublevel"]],_from:"levelup@>=0.19.0 <0.20.0",_id:"levelup@0.19.0",_inCache:!0,_installable:!0,_location:"/level-sublevel/levelup",_npmUser:{email:"rod@vagg.org",name:"rvagg"},_npmVersion:"1.4.23",_phantomChildren:{},_requested:{name:"levelup",raw:"levelup@~0.19.0",rawSpec:"~0.19.0",scope:null,spec:">=0.19.0 <0.20.0",type:"range"},_requiredBy:["/level-sublevel"],_resolved:"http://127.0.0.1:5080/tarballs/levelup/0.19.0.tgz",_shasum:"f6b60a168c86c2fe5d5953476cbe9786ccf0a3f7",_shrinkwrap:null,_spec:"levelup@~0.19.0",_where:"/Users/nolan/workspace/pouchdb/node_modules/level-sublevel",browser:{leveldown:!1,"leveldown/package":!1,semver:!1},bugs:{url:"https://github.com/rvagg/node-levelup/issues"},contributors:[{name:"David Björklund",email:"david.bjorklund@gmail.com",url:"https://github.com/kesla"},{name:"Rod Vagg",email:"r@va.gg",url:"https://github.com/rvagg"},{name:"Jake Verbaten",email:"raynos2@gmail.com",url:"https://github.com/raynos"},{name:"Dominic Tarr",email:"dominic.tarr@gmail.com",url:"https://github.com/dominictarr"},{name:"Max Ogden",email:"max@maxogden.com",url:"https://github.com/maxogden"},{name:"Lars-Magnus Skog",email:"lars.magnus.skog@gmail.com",url:"https://github.com/ralphtheninja"},{name:"John Chesley",email:"john@chesl.es",url:"https://github.com/chesles/"},{name:"Julian Gruber",email:"julian@juliangruber.com",url:"https://github.com/juliangruber"},{name:"Paolo Fragomeni",email:"paolo@async.ly",url:"https://github.com/hij1nx"},{name:"Anton Whalley",email:"anton.whalley@nearform.com",url:"https://github.com/No9"},{name:"Matteo Collina",email:"matteo.collina@gmail.com",url:"https://github.com/mcollina"},{name:"Pedro Teixeira",email:"pedro.teixeira@gmail.com",url:"https://github.com/pgte"},{name:"James Halliday",email:"mail@substack.net",url:"https://github.com/substack"}],dependencies:{bl:"~0.8.1","deferred-leveldown":"~0.2.0",errno:"~0.1.1",prr:"~0.0.0","readable-stream":"~1.0.26",semver:"~2.3.1",xtend:"~3.0.0"},description:"Fast & simple storage - a Node.js-style LevelDB wrapper",devDependencies:{async:"*",boganipsum:"*",bustermove:"*",delayed:"*",du:"*",fstream:"*",leveldown:"~0.10.0",memdown:"*",mkfiletree:"*","msgpack-js":"*",readfiletree:"*",referee:"*",rimraf:"*","slow-stream":">=0.0.4",tap:"*",tar:"*"},dist:{shasum:"f6b60a168c86c2fe5d5953476cbe9786ccf0a3f7",tarball:"http://127.0.0.1:5080/tarballs/levelup/0.19.0.tgz"},gitHead:"fb742b01990139b44b1816de87a6e1b2de629627",homepage:"https://github.com/rvagg/node-levelup",keywords:["database","db","json","leveldb","storage","store","stream"],license:"MIT",main:"lib/levelup.js",maintainers:[{name:"rvagg",email:"rod@vagg.org"}],name:"levelup",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/rvagg/node-levelup.git"},scripts:{alltests:"npm test && npm run-script functionaltests",functionaltests:"node ./test/functional/fstream-test.js && node ./test/functional/binary-data-test.js && node ./test/functional/compat-test.js",test:"tap test/*-test.js --stderr"},version:"0.19.0"}},{}],42:[function(e,t,n){arguments[4][31][0].apply(n,arguments)},{31:31}],43:[function(e,t,n){function r(e){return"function"==typeof e}function i(e){return null==e?e:r(e.prefix)?e.prefix():e}function o(e){var t={};for(var n in e)t[n]=e[n];return t}var a=e(33),s=e(61);t.exports=function(e,t,n,u){function c(e,r,i,o){return t.encode([e,n.encodeKey(r,i,o)])}function f(e,t){return t&&t.options&&(e.keyEncoding=e.keyEncoding||t.options.keyEncoding,e.valueEncoding=e.valueEncoding||t.options.valueEncoding),e}function l(){for(g=!0;p.length;)p.shift()()}var h=a(u),d=a(u),p=[],g=!1;return r(e.isOpen)&&e.isOpen()?g=!0:e.open(l),{apply:function(t,r,o){function a(e){return e===!1?delete t[s]:void t.push(e)}for(var s=0;s<t.length;s++){var u=t[s];f(u,u.prefix),u.prefix=i(u.prefix),h.trigger([u.prefix,u.key],[u,a,t])}if(r=r||{},"object"!=typeof r)throw new Error("opts must be object, was:"+r);"function"==typeof r&&(o=r,r={}),t.length?(e.db||e).batch(t.map(function(e){return{key:c(e.prefix,e.key,r,e),value:"del"!==e.type?n.encodeValue(e.value,r,e):void 0,type:e.type||(void 0===e.value?"del":"put")}}),r,function(e){return e?o(e):(t.forEach(function(e){d.trigger([e.prefix,e.key],[e])}),void o())}):o()},get:function(t,r,i,o){return i.asBuffer=n.isValueAsBuffer(i),(e.db||e).get(c(r,t,i),i,function(e,t){e?o(e):o(null,n.decodeValue(t,i))})},pre:h.add,post:d.add,createDecoder:function(e){return e.keys!==!1&&e.values!==!1?function(r,i){return{key:n.decodeKey(t.decode(r)[1],e),value:n.decodeValue(i,e)}}:e.values!==!1?function(t,r){return n.decodeValue(r,e)}:e.keys!==!1?function(r){return n.decodeKey(t.decode(r)[1],e)}:function(){}},isOpen:function(){return e.db&&r(e.db.isOpen)?e.db.isOpen():e.isOpen()},isClosed:function(){return e.db&&r(e.db.isClosed)?e.db.isClosed():e.isClosed();
  },close:function(t){return e.close(t)},iterator:function(r,i){function a(e){return c(l,e,f,{})}function u(e){return{next:function(t){return e.next(t)},end:function(t){e.end(t)}}}var f=o(r||{}),l=r.prefix||[];return s.toLtgt(r,f,a,t.lowerBound,t.upperBound),f.prefix=null,f.keyAsBuffer=f.valueAsBuffer=!1,"number"!=typeof f.limit&&(f.limit=-1),f.keyAsBuffer=t.buffer,f.valueAsBuffer=n.isValueAsBuffer(f),g?u((e.db||e).iterator(f)):void p.push(function(){i(null,u((e.db||e).iterator(f)))})}}}},{33:33,61:61}],44:[function(e,t,n){t.exports={_args:[["level-sublevel@6.5.2","/Users/nolan/workspace/pouchdb"]],_from:"level-sublevel@6.5.2",_id:"level-sublevel@6.5.2",_inCache:!0,_installable:!0,_location:"/level-sublevel",_nodeVersion:"2.3.1",_npmUser:{email:"dominic.tarr@gmail.com",name:"dominictarr"},_npmVersion:"3.3.1",_phantomChildren:{bl:"0.8.2","deferred-leveldown":"0.2.0",errno:"0.1.4",prr:"0.0.0","readable-stream":"1.0.33",semver:"2.3.2"},_requested:{name:"level-sublevel",raw:"level-sublevel@6.5.2",rawSpec:"6.5.2",scope:null,spec:"6.5.2",type:"version"},_requiredBy:["/","/pouchdb"],_resolved:"http://127.0.0.1:5080/tarballs/level-sublevel/6.5.2.tgz",_shasum:"162df326861cecf29dc97387425e6269a972a89e",_shrinkwrap:null,_spec:"level-sublevel@6.5.2",_where:"/Users/nolan/workspace/pouchdb",author:{email:"dominic.tarr@gmail.com",name:"Dominic Tarr",url:"http://dominictarr.com"},bugs:{url:"https://github.com/dominictarr/level-sublevel/issues"},dependencies:{bytewise:"~0.7.1",levelup:"~0.19.0",ltgt:"~2.1.1","pull-stream":"~2.21.0",typewiselite:"~1.0.0",xtend:"~4.0.0"},description:"partition levelup databases",devDependencies:{level:"~0.18.0","level-test":">=1.5.1 <2",leveldown:"~1.0.1","monotonic-timestamp":"0.0.8","pull-level":"~1.1.1",rimraf:"~2.1.4",shasum:"0.0.2","stream-to-pull-stream":"~1.2.0",tape:"~2.14.0",through:"~2.3.4"},dist:{shasum:"162df326861cecf29dc97387425e6269a972a89e",tarball:"http://127.0.0.1:5080/tarballs/level-sublevel/6.5.2.tgz"},gitHead:"389e1329a5492daf9e4e53ef86f92779d2a56394",homepage:"https://github.com/dominictarr/level-sublevel",license:"MIT",maintainers:[{name:"dominictarr",email:"dominic.tarr@gmail.com"}],name:"level-sublevel",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/dominictarr/level-sublevel.git"},scripts:{test:"set -e; for t in test/*.js; do node $t; done"},stability:"unstable",testling:{browsers:["android-browser/4.2..latest","chrome/22..latest","chrome/canary","firefox/17..latest","firefox/nightly","ie/8..latest","ipad/6.0..latest","iphone/6.0..latest","opera/12..latest","opera/next","safari/5.1..latest"],files:"test/*.js"},version:"6.5.2"}},{}],45:[function(e,t,n){(function(r){function i(e){return Array.isArray(e)||r.isBuffer(e)}function o(e){return"string"==typeof e||"number"==typeof e}function a(e,t){return Object.hasOwnProperty.call(e,t)}function s(e,t){if(i(e)&&i(t)){for(var n=Math.min(e.length,t.length),r=0;n>r;r++){var a=s(e[r],t[r]);if(a)return a}return e.length-t.length}if(o(e)&&o(t))return t>e?-1:e>t?1:0;throw new Error("items not comparable:"+JSON.stringify(e)+" "+JSON.stringify(t))}function u(e,t){if(e.length>t.length)return!1;var n=e.length-1,r=e[n],o=t[n];if(typeof r!=typeof o)return!1;if("string"==typeof r&&0!=o.indexOf(r))return!1;for(1==e.length&&i(r)&&n++;n--;)if(s(e[n],t[n]))return!1;return!0}function c(e,t){var n=f.toLtgt(t,null,function(t){return[e,t]});return a(n,"gte")||a(n,"lte")?n:[e]}var f=e(61);n=t.exports=function(e,t,n){return n=n||s,i(e)?u(e,t):f.contains(e,t,n)},n.compare=s,n.prefix=u,n.addPrefix=c}).call(this,{isBuffer:e(24)})},{24:24,61:61}],46:[function(e,t,n){(function(n){function r(e){return"function"==typeof e}function i(e){return"string"==typeof e}function o(e){return e&&"object"==typeof e}var a=e(15).EventEmitter,s=e(45).addPrefix,u=e(37),c=e(44).version,f=t.exports=function(e,t,l,h){function d(e){e&&g.emit("error",e)}function p(e){var t={};if(h)for(var n in h)void 0!=h[n]&&(t[n]=h[n]);if(e)for(var n in e)void 0!=e[n]&&(t[n]=e[n]);return t}var g=new a;return g.sublevels={},g.options=h,g.version=c,g.methods={},t=t||[],l=l||function(e){return e},g.put=function(n,r,i,o){"function"==typeof i&&(o=i,i={}),o||(o=d),e.apply([{key:n,value:r,prefix:t.slice(),type:"put"}],p(i),function(e){return e||(g.emit("put",n,r),o(null)),e?o(e):void 0})},g.prefix=function(){return t.slice()},g.del=function(n,r,i){"function"==typeof r&&(i=r,r={}),i||(i=d),e.apply([{key:n,prefix:t.slice(),type:"del"}],p(r),function(e){return e||(g.emit("del",n),i(null)),e?i(e):void 0})},g.batch=function(n,r,i){"function"==typeof r&&(i=r,r={}),i||(i=d),n=n.map(function(e){return{key:e.key,value:e.value,prefix:e.prefix||t,keyEncoding:e.keyEncoding,valueEncoding:e.valueEncoding,type:e.type}}),e.apply(n,p(r),function(e){return e||(g.emit("batch",n),i(null)),e?i(e):void 0})},g.get=function(n,r,i){"function"==typeof r&&(i=r,r={}),e.get(n,t,p(r),function(e,t){e?i(new u.NotFoundError("Key not found in database",e)):i(null,t)})},g.clone=function(n){return f(e,t,l,p(n))},g.sublevel=function(n,r){return g.sublevels[n]=g.sublevels[n]||f(e,t.concat(n),l,p(r))},g.pre=function(n,a){if(r(n))return e.pre([t],n);if(i(n))return e.pre([t,n],a);if(o(n))return e.pre(s(t,n),a);throw new Error("not implemented yet")},g.post=function(n,a){if(r(n))return e.post([t],n);if(i(n))return e.post([t,n],a);if(o(n))return e.post(s(t,n),a);throw new Error("not implemented yet")},g.readStream=g.createReadStream=function(n){n=p(n),n.prefix=t;var r,i=e.iterator(n,function(e,t){r.setIterator(t)});return r=l(n,e.createDecoder(n)),i&&r.setIterator(i),r},g.valueStream=g.createValueStream=function(e){return e=e||{},e.values=!0,e.keys=!1,g.createReadStream(e)},g.keyStream=g.createKeyStream=function(e){return e=e||{},e.values=!1,e.keys=!0,g.createReadStream(e)},g.close=function(r){r=r||function(){},t.length?n.nextTick(r):e.close(r)},g.isOpen=e.isOpen,g.isClosed=e.isClosed,g}}).call(this,e(64))},{15:15,37:37,44:44,45:45,64:64}],47:[function(e,t,n){function r(e,t){this._levelup=e,this._codec=t,this.batch=e.db.batch(),this.ops=[],this.length=0}var i=e(49),o=e(29).WriteError,a=i.getOptions,s=i.dispatchError;r.prototype.put=function(e,t,n){n=a(n);var r=this._codec.encodeKey(e,n),i=this._codec.encodeValue(t,n);try{this.batch.put(r,i)}catch(s){throw new o(s)}return this.ops.push({type:"put",key:r,value:i}),this.length++,this},r.prototype.del=function(e,t){t=a(t);var n=this._codec.encodeKey(e,t);try{this.batch.del(n)}catch(r){throw new o(r)}return this.ops.push({type:"del",key:n}),this.length++,this},r.prototype.clear=function(){try{this.batch.clear()}catch(e){throw new o(e)}return this.ops=[],this.length=0,this},r.prototype.write=function(e){var t=this._levelup,n=this.ops;try{this.batch.write(function(r){return r?s(t,new o(r),e):(t.emit("batch",n),void(e&&e()))})}catch(r){throw new o(r)}},t.exports=r},{29:29,49:49}],48:[function(e,t,n){(function(n){function r(e,t){return"function"==typeof e?e:t}function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);var o;if(c.call(this),this.setMaxListeners(1/0),"function"==typeof e?(t="object"==typeof t?t:{},t.db=e,e=null):"object"==typeof e&&"function"==typeof e.db&&(t=e,e=null),"function"==typeof t&&(r=t,t={}),(!t||"function"!=typeof t.db)&&"string"!=typeof e){if(o=new E("Must provide a location for the database"),r)return n.nextTick(function(){r(o)});throw o}t=B(t),this.options=h(A,t),this._codec=new x(this.options),this._status="new",d(this,"location",e,"e"),this.open(r)}function o(e,t,n){return e._isOpening()||e.isOpen()?void 0:(L(e,new m("Database is not open"),n),!0)}function a(e,t,n){L(e,new y(t),n)}function s(e,t,n){L(e,new m(t),n)}function u(e){return function(t,n){O()[e](t,n||function(){})}}var c=e(15).EventEmitter,f=e(95).inherits,l=e(95).deprecate,h=e(58),d=e(57),p=e(56),g=e(30),v=e(29),y=v.WriteError,m=v.ReadError,_=v.NotFoundError,b=v.OpenError,w=v.EncodingError,E=v.InitializationError,k=e(49),S=e(47),x=e(27),B=k.getOptions,A=k.defaultOptions,O=k.getLevelDOWN,L=k.dispatchError;k.isDefined;f(i,c),i.prototype.open=function(e){var t,r,i=this;return this.isOpen()?(e&&n.nextTick(function(){e(null,i)}),this):this._isOpening()?e&&this.once("open",function(){e(null,i)}):(this.emit("opening"),this._status="opening",this.db=new p(this.location),t=this.options.db||O(),r=t(this.location),void r.open(this.options,function(t){return t?L(i,new b(t),e):(i.db.setDb(r),i.db=r,i._status="open",e&&e(null,i),i.emit("open"),i.emit("ready"),void 0)}))},i.prototype.close=function(e){var t=this;if(this.isOpen())this._status="closing",this.db.close(function(){t._status="closed",t.emit("closed"),e&&e.apply(null,arguments)}),this.emit("closing"),this.db=new p(this.location);else{if("closed"==this._status&&e)return n.nextTick(e);"closing"==this._status&&e?this.once("closed",e):this._isOpening()&&this.once("open",function(){t.close(e)})}},i.prototype.isOpen=function(){return"open"==this._status},i.prototype._isOpening=function(){return"opening"==this._status},i.prototype.isClosed=function(){return/^clos/.test(this._status)},i.prototype.get=function(e,t,n){var i,a=this;if(n=r(t,n),!o(this,t,n)){if(null===e||void 0===e||"function"!=typeof n)return s(this,"get() requires key and callback arguments",n);t=k.getOptions(t),i=this._codec.encodeKey(e,t),t.asBuffer=this._codec.valueAsBuffer(t),this.db.get(i,t,function(r,i){if(r)return r=/notfound/i.test(r)||r.notFound?new _("Key not found in database ["+e+"]",r):new m(r),L(a,r,n);if(n){try{i=a._codec.decodeValue(i,t)}catch(o){return n(new w(o))}n(null,i)}})}},i.prototype.put=function(e,t,n,i){var s,u,c=this;return i=r(n,i),null===e||void 0===e?a(this,"put() requires a key argument",i):void(o(this,n,i)||(n=B(n),s=this._codec.encodeKey(e,n),u=this._codec.encodeValue(t,n),this.db.put(s,u,n,function(n){return n?L(c,new y(n),i):(c.emit("put",e,t),void(i&&i()))})))},i.prototype.del=function(e,t,n){var i,s=this;return n=r(t,n),null===e||void 0===e?a(this,"del() requires a key argument",n):void(o(this,t,n)||(t=B(t),i=this._codec.encodeKey(e,t),this.db.del(i,t,function(t){return t?L(s,new y(t),n):(s.emit("del",e),void(n&&n()))})))},i.prototype.batch=function(e,t,n){var i,s=this;return arguments.length?(n=r(t,n),Array.isArray(e)?void(o(this,t,n)||(t=B(t),i=s._codec.encodeBatch(e,t),i=i.map(function(e){return e.type||void 0===e.key||void 0===e.value||(e.type="put"),e}),this.db.batch(i,t,function(t){return t?L(s,new y(t),n):(s.emit("batch",e),void(n&&n()))}))):a(this,"batch() requires an array argument",n)):new S(this,this._codec)},i.prototype.approximateSize=l(function(e,t,n,i){var o,a,u=this;return i=r(n,i),n=B(n),null===e||void 0===e||null===t||void 0===t||"function"!=typeof i?s(this,"approximateSize() requires start, end and callback arguments",i):(o=this._codec.encodeKey(e,n),a=this._codec.encodeKey(t,n),void this.db.approximateSize(o,a,function(e,t){return e?L(u,new b(e),i):void(i&&i(null,t))}))},"db.approximateSize() is deprecated. Use db.db.approximateSize() instead"),i.prototype.readStream=i.prototype.createReadStream=function(e){return e=h({keys:!0,values:!0},this.options,e),e.keyEncoding=e.keyEncoding,e.valueEncoding=e.valueEncoding,e=this._codec.encodeLtgt(e),e.keyAsBuffer=this._codec.keyAsBuffer(e),e.valueAsBuffer=this._codec.valueAsBuffer(e),"number"!=typeof e.limit&&(e.limit=-1),new g(this.db.iterator(e),h(e,{decoder:this._codec.createStreamDecoder(e)}))},i.prototype.keyStream=i.prototype.createKeyStream=function(e){return this.createReadStream(h(e,{keys:!0,values:!1}))},i.prototype.valueStream=i.prototype.createValueStream=function(e){return this.createReadStream(h(e,{keys:!1,values:!0}))},i.prototype.toString=function(){return"LevelUP"},t.exports=i,t.exports.errors=e(29),t.exports.destroy=l(u("destroy"),"levelup.destroy() is deprecated. Use leveldown.destroy() instead"),t.exports.repair=l(u("repair"),"levelup.repair() is deprecated. Use leveldown.repair() instead")}).call(this,e(64))},{15:15,27:27,29:29,30:30,47:47,49:49,56:56,57:57,58:58,64:64,95:95}],49:[function(e,t,n){function r(e){return"string"==typeof e&&(e={valueEncoding:e}),"object"!=typeof e&&(e={}),e}function i(){if(u)return u;var t,n=e(59).devDependencies.leveldown;try{t=e(6).version}catch(r){throw o(r)}if(!e(6).satisfies(t,n))throw new c("Installed version of LevelDOWN ("+t+") does not match required version ("+n+")");try{return u=e(6)}catch(r){throw o(r)}}function o(e){var t="Failed to require LevelDOWN (%s). Try `npm install leveldown` if it's missing";return new c(f(t,e.message))}function a(e,t,n){"function"==typeof n?n(t):e.emit("error",t)}function s(e){return"undefined"!=typeof e}var u,c=(e(58),e(29).LevelUPError),f=e(95).format,l={createIfMissing:!0,errorIfExists:!1,keyEncoding:"utf8",valueEncoding:"utf8",compression:!0};t.exports={defaultOptions:l,getOptions:r,getLevelDOWN:i,dispatchError:a,isDefined:s}},{29:29,58:58,59:59,6:6,95:95}],50:[function(e,t,n){(function(e){function n(e){this._db=e,this._operations=[],this._written=!1}n.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},n.prototype.put=function(e,t){this._checkWritten();var n=this._db._checkKey(e,"key",this._db._isBuffer);if(n)throw n;return this._db._isBuffer(e)||(e=String(e)),this._db._isBuffer(t)||(t=String(t)),"function"==typeof this._put?this._put(e,t):this._operations.push({type:"put",key:e,value:t}),this},n.prototype.del=function(e){this._checkWritten();var t=this._db._checkKey(e,"key",this._db._isBuffer);if(t)throw t;return this._db._isBuffer(e)||(e=String(e)),"function"==typeof this._del?this._del(e):this._operations.push({type:"del",key:e}),this},n.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},n.prototype.write=function(t,n){if(this._checkWritten(),"function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("write() requires a callback argument");return"object"!=typeof t&&(t={}),this._written=!0,"function"==typeof this._write?this._write(n):"function"==typeof this._db._batch?this._db._batch(this._operations,t,n):void e.nextTick(n)},t.exports=n}).call(this,e(64))},{64:64}],51:[function(e,t,n){arguments[4][3][0].apply(n,arguments)},{3:3,64:64}],52:[function(e,t,n){(function(n,r){function i(e){if(!arguments.length||void 0===e)throw new Error("constructor requires at least a location argument");if("string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e,this.status="new"}var o=e(58),a=e(51),s=e(50);i.prototype.open=function(e,t){var n=this,i=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"!=typeof e&&(e={}),e.createIfMissing=0!=e.createIfMissing,e.errorIfExists=!!e.errorIfExists,"function"==typeof this._open?(this.status="opening",this._open(e,function(e){return e?(n.status=i,t(e)):(n.status="open",void t())})):(this.status="open",r.nextTick(t))},i.prototype.close=function(e){var t=this,n=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");"function"==typeof this._close?(this.status="closing",this._close(function(r){return r?(t.status=n,e(r)):(t.status="closed",void e())})):(this.status="closed",r.nextTick(e))},i.prototype.get=function(e,t,n){var i;if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("get() requires a callback argument");return(i=this._checkKey(e,"key",this._isBuffer))?n(i):(this._isBuffer(e)||(e=String(e)),"object"!=typeof t&&(t={}),t.asBuffer=0!=t.asBuffer,"function"==typeof this._get?this._get(e,t,n):void r.nextTick(function(){n(new Error("NotFound"))}))},i.prototype.put=function(e,t,n,i){var o;if("function"==typeof n&&(i=n),"function"!=typeof i)throw new Error("put() requires a callback argument");return(o=this._checkKey(e,"key",this._isBuffer))?i(o):(this._isBuffer(e)||(e=String(e)),null==t||this._isBuffer(t)||r.browser||(t=String(t)),"object"!=typeof n&&(n={}),"function"==typeof this._put?this._put(e,t,n,i):void r.nextTick(i))},i.prototype.del=function(e,t,n){var i;if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("del() requires a callback argument");return(i=this._checkKey(e,"key",this._isBuffer))?n(i):(this._isBuffer(e)||(e=String(e)),"object"!=typeof t&&(t={}),"function"==typeof this._del?this._del(e,t,n):void r.nextTick(n))},i.prototype.batch=function(e,t,n){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(n=t),"function"==typeof e&&(n=e),"function"!=typeof n)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return n(new Error("batch(array) requires an array argument"));t&&"object"==typeof t||(t={});for(var i,o,a=0,s=e.length;s>a;a++)if(i=e[a],"object"==typeof i){if(o=this._checkKey(i.type,"type",this._isBuffer))return n(o);if(o=this._checkKey(i.key,"key",this._isBuffer))return n(o)}return"function"==typeof this._batch?this._batch(e,t,n):void r.nextTick(n)},i.prototype.approximateSize=function(e,t,n){if(null==e||null==t||"function"==typeof e||"function"==typeof t)throw new Error("approximateSize() requires valid `start`, `end` and `callback` arguments");if("function"!=typeof n)throw new Error("approximateSize() requires a callback argument");return this._isBuffer(e)||(e=String(e)),this._isBuffer(t)||(t=String(t)),"function"==typeof this._approximateSize?this._approximateSize(e,t,n):void r.nextTick(function(){n(null,0)})},i.prototype._setupIteratorOptions=function(e){var t=this;return e=o(e),["start","end","gt","gte","lt","lte"].forEach(function(n){e[n]&&t._isBuffer(e[n])&&0===e[n].length&&delete e[n]}),e.reverse=!!e.reverse,e.keys=0!=e.keys,e.values=0!=e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=0!=e.keyAsBuffer,e.valueAsBuffer=0!=e.valueAsBuffer,e},i.prototype.iterator=function(e){return"object"!=typeof e&&(e={}),e=this._setupIteratorOptions(e),"function"==typeof this._iterator?this._iterator(e):new a(this)},i.prototype._chainedBatch=function(){return new s(this)},i.prototype._isBuffer=function(e){return n.isBuffer(e)},i.prototype._checkKey=function(e,t){if(null===e||void 0===e)return new Error(t+" cannot be `null` or `undefined`");if(this._isBuffer(e)){if(0===e.length)return new Error(t+" cannot be an empty Buffer")}else if(""===String(e))return new Error(t+" cannot be an empty String")},t.exports=i}).call(this,{isBuffer:e(24)},e(64))},{24:24,50:50,51:51,58:58,64:64}],53:[function(e,t,n){n.AbstractLevelDOWN=e(52),n.AbstractIterator=e(51),n.AbstractChainedBatch=e(50),n.isLevelDOWN=e(54)},{50:50,51:51,52:52,54:54}],54:[function(e,t,n){function r(e){return e&&"object"==typeof e?Object.keys(i.prototype).filter(function(e){return"_"!=e[0]&&"approximateSize"!=e}).every(function(t){return"function"==typeof e[t]}):!1}var i=e(52);t.exports=r},{52:52}],55:[function(e,t,n){function r(e){o.call(this,e),this._options=e,this._iterator=null,this._operations=[]}var i=e(95),o=e(53).AbstractIterator;i.inherits(r,o),r.prototype.setDb=function(e){var t=this._iterator=e.iterator(this._options);this._operations.forEach(function(e){t[e.method].apply(t,e.args)})},r.prototype._operation=function(e,t){return this._iterator?this._iterator[e].apply(this._iterator,t):void this._operations.push({method:e,args:t})},"next end".split(" ").forEach(function(e){r.prototype["_"+e]=function(){this._operation(e,arguments)}}),t.exports=r},{53:53,95:95}],56:[function(e,t,n){(function(n,r){function i(e){a.call(this,"string"==typeof e?e:""),this._db=void 0,this._operations=[],this._iterators=[]}var o=e(95),a=e(53).AbstractLevelDOWN,s=e(55);o.inherits(i,a),i.prototype.setDb=function(e){this._db=e,this._operations.forEach(function(t){e[t.method].apply(e,t.args)}),this._iterators.forEach(function(t){t.setDb(e)})},i.prototype._open=function(e,t){return r.nextTick(t)},i.prototype._operation=function(e,t){return this._db?this._db[e].apply(this._db,t):void this._operations.push({method:e,args:t})},"put get del batch approximateSize".split(" ").forEach(function(e){i.prototype["_"+e]=function(){this._operation(e,arguments)}}),i.prototype._isBuffer=function(e){return n.isBuffer(e)},i.prototype._iterator=function(e){if(this._db)return this._db.iterator.apply(this._db,arguments);var t=new s(e);return this._iterators.push(t),t},t.exports=i,t.exports.DeferredIterator=s}).call(this,{isBuffer:e(24)},e(64))},{24:24,53:53,55:55,64:64,95:95}],57:[function(e,t,n){!function(e,n,r){"undefined"!=typeof t&&t.exports?t.exports=r():n[e]=r()}("prr",this,function(){var e="function"==typeof Object.defineProperty?function(e,t,n){return Object.defineProperty(e,t,n),e}:function(e,t,n){return e[t]=n.value,e},t=function(e,t){var n="object"==typeof t,r=!n&&"string"==typeof t,i=function(e){return n?!!t[e]:r?t.indexOf(e[0])>-1:!1};return{enumerable:i("enumerable"),configurable:i("configurable"),writable:i("writable"),value:e}},n=function(n,r,i,o){var a;if(o=t(i,o),"object"==typeof r){for(a in r)Object.hasOwnProperty.call(r,a)&&(o.value=r[a],e(n,a,o));return n}return e(n,r,o)};return n})},{}],58:[function(e,t,n){arguments[4][31][0].apply(n,arguments)},{31:31}],59:[function(e,t,n){t.exports={_args:[["levelup@1.3.1","/Users/nolan/workspace/pouchdb"]],_from:"levelup@1.3.1",_id:"levelup@1.3.1",_inCache:!0,_installable:!0,_location:"/levelup",_nodeVersion:"4.2.2",_npmUser:{email:"ralphtheninja@riseup.net",name:"ralphtheninja"},_npmVersion:"3.5.0",_phantomChildren:{},_requested:{name:"levelup",raw:"levelup@1.3.1",rawSpec:"1.3.1",scope:null,spec:"1.3.1",type:"version"},_requiredBy:["/"],_resolved:"http://127.0.0.1:5080/tarballs/levelup/1.3.1.tgz",_shasum:"8030758bb1b1dafdb71bfb55fff0caa2740cb846",_shrinkwrap:null,_spec:"levelup@1.3.1",_where:"/Users/nolan/workspace/pouchdb",browser:{leveldown:!1,"leveldown/package":!1,semver:!1},bugs:{url:"https://github.com/level/levelup/issues"},contributors:[{name:"Julian Gruber",email:"julian@juliangruber.com",url:"https://github.com/juliangruber"},{name:"Rod Vagg",email:"r@va.gg",url:"https://github.com/rvagg"},{name:"Jake Verbaten",email:"raynos2@gmail.com",url:"https://github.com/raynos"},{name:"Dominic Tarr",email:"dominic.tarr@gmail.com",url:"https://github.com/dominictarr"},{name:"Max Ogden",email:"max@maxogden.com",url:"https://github.com/maxogden"},{name:"Lars-Magnus Skog",email:"ralphtheninja@riseup.net",url:"https://github.com/ralphtheninja"},{name:"David Björklund",email:"david.bjorklund@gmail.com",url:"https://github.com/kesla"},{name:"John Chesley",email:"john@chesl.es",url:"https://github.com/chesles/"},{name:"Paolo Fragomeni",email:"paolo@async.ly",url:"https://github.com/hij1nx"},{name:"Anton Whalley",email:"anton.whalley@nearform.com",url:"https://github.com/No9"},{name:"Matteo Collina",email:"matteo.collina@gmail.com",url:"https://github.com/mcollina"},{name:"Pedro Teixeira",email:"pedro.teixeira@gmail.com",url:"https://github.com/pgte"},{name:"James Halliday",email:"mail@substack.net",url:"https://github.com/substack"},{name:"Jarrett Cruger",email:"jcrugzz@gmail.com",url:"https://github.com/jcrugzz"}],dependencies:{"deferred-leveldown":"~1.2.1","level-codec":"~6.1.0","level-errors":"~1.0.3","level-iterator-stream":"~1.3.0",prr:"~1.0.1",semver:"~5.1.0",xtend:"~4.0.0"},description:"Fast & simple storage - a Node.js-style LevelDB wrapper",devDependencies:{async:"~1.5.0",bustermove:"~1.0.0",delayed:"~1.0.1",faucet:"~0.0.1",leveldown:"^1.1.0",memdown:"~1.1.0","msgpack-js":"~0.3.0",referee:"~1.2.0",rimraf:"~2.4.3","slow-stream":"0.0.4",tap:"~2.3.1",tape:"~4.2.1"},dist:{shasum:"8030758bb1b1dafdb71bfb55fff0caa2740cb846",tarball:"http://127.0.0.1:5080/tarballs/levelup/1.3.1.tgz"},gitHead:"40bd66872974140c79a74d9411b992ddffa926a4",homepage:"https://github.com/level/levelup",keywords:["database","db","json","leveldb","storage","store","stream"],license:"MIT",main:"lib/levelup.js",maintainers:[{name:"rvagg",email:"rod@vagg.org"},{name:"ralphtheninja",email:"ralphtheninja@riseup.net"},{name:"juliangruber",email:"julian@juliangruber.com"}],name:"levelup",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/level/levelup.git"},scripts:{test:"tape test/*-test.js | faucet"},version:"1.3.1"}},{}],60:[function(e,t,n){"use strict";function r(){}function i(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=m,this.queue=[],this.outcome=void 0,e!==r&&u(this,e)}function o(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function a(e,t,n){p(function(){var r;try{r=t(n)}catch(i){return g.reject(e,i)}r===e?g.reject(e,new TypeError("Cannot resolve promise with itself")):g.resolve(e,r)})}function s(e){var t=e&&e.then;return e&&"object"==typeof e&&"function"==typeof t?function(){t.apply(e,arguments)}:void 0}function u(e,t){function n(t){o||(o=!0,g.reject(e,t))}function r(t){o||(o=!0,g.resolve(e,t))}function i(){t(r,n)}var o=!1,a=c(i);"error"===a.status&&n(a.value)}function c(e,t){var n={};try{n.value=e(t),n.status="success"}catch(r){n.status="error",n.value=r}return n}function f(e){return e instanceof this?e:g.resolve(new this(r),e)}function l(e){var t=new this(r);return g.reject(t,e)}function h(e){function t(e,t){function r(e){a[t]=e,++s!==i||o||(o=!0,g.resolve(c,a))}n.resolve(e).then(r,function(e){o||(o=!0,g.reject(c,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,o=!1;if(!i)return this.resolve([]);for(var a=new Array(i),s=0,u=-1,c=new this(r);++u<i;)t(e[u],u);return c}function d(e){function t(e){n.resolve(e).then(function(e){o||(o=!0,g.resolve(s,e))},function(e){o||(o=!0,g.reject(s,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,o=!1;if(!i)return this.resolve([]);for(var a=-1,s=new this(r);++a<i;)t(e[a]);return s}var p=e(22),g={},v=["REJECTED"],y=["FULFILLED"],m=["PENDING"];t.exports=n=i,i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){if("function"!=typeof e&&this.state===y||"function"!=typeof t&&this.state===v)return this;var n=new this.constructor(r);if(this.state!==m){var i=this.state===y?e:t;a(n,i,this.outcome)}else this.queue.push(new o(n,e,t));return n},o.prototype.callFulfilled=function(e){g.resolve(this.promise,e)},o.prototype.otherCallFulfilled=function(e){a(this.promise,this.onFulfilled,e)},o.prototype.callRejected=function(e){g.reject(this.promise,e)},o.prototype.otherCallRejected=function(e){a(this.promise,this.onRejected,e)},g.resolve=function(e,t){var n=c(s,t);if("error"===n.status)return g.reject(e,n.value);var r=n.value;if(r)u(e,r);else{e.state=y,e.outcome=t;for(var i=-1,o=e.queue.length;++i<o;)e.queue[i].callFulfilled(t)}return e},g.reject=function(e,t){e.state=v,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},n.resolve=f,n.reject=l,n.all=h,n.race=d},{22:22}],61:[function(e,t,n){(function(e){function t(e,t){return Object.hasOwnProperty.call(e,t)}function r(e){return void 0!==e&&""!==e}function t(e,t){return Object.hasOwnProperty.call(e,t)}function i(e,t){return Object.hasOwnProperty.call(e,t)&&t}function o(e){return e}n.compare=function(t,n){if(e.isBuffer(t)){for(var r=Math.min(t.length,n.length),i=0;r>i;i++){var o=t[i]-n[i];if(o)return o}return t.length-n.length}return n>t?-1:t>n?1:0};var a=n.lowerBoundKey=function(e){return i(e,"gt")||i(e,"gte")||i(e,"min")||(e.reverse?i(e,"end"):i(e,"start"))||void 0},s=n.lowerBound=function(e){var t=a(e);return t&&e[t]};n.lowerBoundInclusive=function(e){return t(e,"gt")?!1:!0},n.upperBoundInclusive=function(e){return t(e,"lt")||!e.minEx?!1:!0};var u=n.lowerBoundExclusive=function(e){return t(e,"gt")||e.minEx?!0:!1},c=n.upperBoundExclusive=function(e){return t(e,"lt")?!0:!1},f=n.upperBoundKey=function(e){return i(e,"lt")||i(e,"lte")||i(e,"max")||(e.reverse?i(e,"start"):i(e,"end"))||void 0},l=n.upperBound=function(e){var t=f(e);return t&&e[t]};n.toLtgt=function(e,r,i,a,s){r=r||{},i=i||o;var u=arguments.length>3,c=n.lowerBoundKey(e),f=n.upperBoundKey(e);return c?"gt"===c?r.gt=i(e.gt,!1):r.gte=i(e[c],!1):u&&(r.gte=i(a,!1)),f?"lt"===f?r.lt=i(e.lt,!0):r.lte=i(e[f],!0):u&&(r.lte=i(s,!0)),null!=e.reverse&&(r.reverse=!!e.reverse),t(r,"max")&&delete r.max,t(r,"min")&&delete r.min,t(r,"start")&&delete r.start,t(r,"end")&&delete r.end,r},n.contains=function(e,t,i){i=i||n.compare;var o=s(e);if(r(o)){var a=i(t,o);if(0>a||0===a&&u(e))return!1}var f=l(e);if(r(f)){var a=i(t,f);if(a>0||0===a&&c(e))return!1}return!0},n.filter=function(e,t){return function(r){return n.contains(e,r,t)}}}).call(this,{isBuffer:e(24)})},{24:24}],62:[function(e,t,n){"use strict";function r(){this.store={}}function i(e){if(this.store=new r,e&&Array.isArray(e))for(var t=0,n=e.length;n>t;t++)this.add(e[t])}n.Map=r,n.Set=i,r.prototype.mangle=function(e){if("string"!=typeof e)throw new TypeError("key must be a string but Got "+e);return"$"+e},r.prototype.unmangle=function(e){return e.substring(1)},r.prototype.get=function(e){var t=this.mangle(e);return t in this.store?this.store[t]:void 0},r.prototype.set=function(e,t){var n=this.mangle(e);return this.store[n]=t,!0},r.prototype.has=function(e){var t=this.mangle(e);return t in this.store},r.prototype["delete"]=function(e){var t=this.mangle(e);return t in this.store?(delete this.store[t],!0):!1},r.prototype.forEach=function(e){for(var t=Object.keys(this.store),n=0,r=t.length;r>n;n++){var i=t[n],o=this.store[i];i=this.unmangle(i),e(o,i)}},i.prototype.add=function(e){return this.store.set(e,!0)},i.prototype.has=function(e){return this.store.has(e)},i.prototype["delete"]=function(e){return this.store["delete"](e)}},{}],63:[function(e,t,n){(function(e){"use strict";function n(t){for(var n=new Array(arguments.length-1),r=0;r<n.length;)n[r++]=arguments[r];e.nextTick(function(){t.apply(null,n)})}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=n:t.exports=e.nextTick}).call(this,e(64))},{64:64}],64:[function(e,t,n){function r(){f=!1,s.length?c=s.concat(c):l=-1,c.length&&i()}function i(){if(!f){var e=setTimeout(r);f=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,f=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function a(){}var s,u=t.exports={},c=[],f=!1,l=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new o(e,t)),1!==c.length||f||setTimeout(i,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=a,u.addListener=a,u.once=a,u.off=a,u.removeListener=a,u.removeAllListeners=a,u.emit=a,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],65:[function(e,t,n){arguments[4][57][0].apply(n,arguments)},{57:57}],66:[function(e,t,n){(function(n){function r(e){return this instanceof r?(u.call(this,e),c.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||n.nextTick(this.end.bind(this))}function o(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}t.exports=r;var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},s=e(10);s.inherits=e(23);var u=e(68),c=e(70);s.inherits(r,u),o(a(c.prototype),function(e){r.prototype[e]||(r.prototype[e]=c.prototype[e])})}).call(this,e(64))},{10:10,23:23,64:64,68:68,70:70}],67:[function(e,t,n){function r(e){return this instanceof r?void i.call(this,e):new r(e)}t.exports=r;var i=e(69),o=e(10);o.inherits=e(23),o.inherits(r,i),r.prototype._transform=function(e,t,n){
  n(null,e)}},{10:10,23:23,69:69}],68:[function(e,t,n){(function(n){function r(t,n){t=t||{};var r=t.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(O||(O=e(84).StringDecoder),this.decoder=new O(t.encoding),this.encoding=t.encoding)}function i(e){return this instanceof i?(this._readableState=new r(e,this),this.readable=!0,void B.call(this)):new i(e)}function o(e,t,n,r,i){var o=c(t,n);if(o)e.emit("error",o);else if(null===n||void 0===n)t.reading=!1,t.ended||f(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||r||(n=t.decoder.write(n)),t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):(t.reading=!1,t.buffer.push(n)),t.needReadable&&l(e),d(e,t);else i||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function s(e){if(e>=L)e=L;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function c(e,t){var n=null;return S.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.length>0?l(e):b(e)}function l(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?n.nextTick(function(){h(e)}):h(e))}function h(e){e.emit("readable")}function d(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(function(){p(e,t)}))}function p(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;t.awaitDrain--,0===t.awaitDrain&&v(e)}}function v(e){function t(e,t,i){var o=e.write(n);!1===o&&r.awaitDrain++}var n,r=e._readableState;for(r.awaitDrain=0;r.pipesCount&&null!==(n=e.read());)if(1===r.pipesCount?t(r.pipes,0,null):w(r.pipes,t),e.emit("data",n),r.awaitDrain>0)return;return 0===r.pipesCount?(r.flowing=!1,void(x.listenerCount(e,"data")>0&&m(e))):void(r.ranOut=!0)}function y(){this._readableState.ranOut&&(this._readableState.ranOut=!1,v(this))}function m(e,t){var r=e._readableState;if(r.flowing)throw new Error("Cannot switch to old mode now.");var i=t||!1,o=!1;e.readable=!0,e.pipe=B.prototype.pipe,e.on=e.addListener=B.prototype.on,e.on("readable",function(){o=!0;for(var t;!i&&null!==(t=e.read());)e.emit("data",t);null===t&&(o=!1,e._readableState.needReadable=!0)}),e.pause=function(){i=!0,this.emit("pause")},e.resume=function(){i=!1,o?n.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function _(e,t){var n,r=t.buffer,i=t.length,o=!!t.decoder,a=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(a)n=r.shift();else if(!e||e>=i)n=o?r.join(""):S.concat(r,i),r.length=0;else if(e<r[0].length){var s=r[0];n=s.slice(0,e),r[0]=s.slice(e)}else if(e===r[0].length)n=r.shift();else{n=o?"":new S(e);for(var u=0,c=0,f=r.length;f>c&&e>u;c++){var s=r[0],l=Math.min(e-u,s.length);o?n+=s.slice(0,l):s.copy(n,u,0,l),l<s.length?r[0]=s.slice(l):r.shift(),u+=l}}return n}function b(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,n.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function w(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}function E(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}t.exports=i;var k=e(25),S=e(7).Buffer;i.ReadableState=r;var x=e(15).EventEmitter;x.listenerCount||(x.listenerCount=function(e,t){return e.listeners(t).length});var B=e(73),A=e(10);A.inherits=e(23);var O;A.inherits(i,B),i.prototype.push=function(e,t){var n=this._readableState;return"string"!=typeof e||n.objectMode||(t=t||n.defaultEncoding,t!==n.encoding&&(e=new S(e,t),t="")),o(this,n,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},i.prototype.setEncoding=function(t){O||(O=e(84).StringDecoder),this._readableState.decoder=new O(t),this._readableState.encoding=t};var L=8388608;i.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var n,r=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return l(this),null;if(e=u(e,t),0===e&&t.ended)return n=null,t.length>0&&t.decoder&&(n=_(e,t),t.length-=n.length),0===t.length&&b(this),n;var i=t.needReadable;return t.length-e<=t.highWaterMark&&(i=!0),(t.ended||t.reading)&&(i=!1),i&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=u(r,t)),n=e>0?_(e,t):null,null===n&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&b(this),n},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function r(e){e===f&&o()}function i(){e.end()}function o(){e.removeListener("close",s),e.removeListener("finish",u),e.removeListener("drain",p),e.removeListener("error",a),e.removeListener("unpipe",r),f.removeListener("end",i),f.removeListener("end",o),(!e._writableState||e._writableState.needDrain)&&p()}function a(t){c(),e.removeListener("error",a),0===x.listenerCount(e,"error")&&e.emit("error",t)}function s(){e.removeListener("finish",u),c()}function u(){e.removeListener("close",s),c()}function c(){f.unpipe(e)}var f=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=e;break;case 1:l.pipes=[l.pipes,e];break;default:l.pipes.push(e)}l.pipesCount+=1;var h=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,d=h?i:o;l.endEmitted?n.nextTick(d):f.once("end",d),e.on("unpipe",r);var p=g(f);return e.on("drain",p),e._events&&e._events.error?k(e._events.error)?e._events.error.unshift(a):e._events.error=[a,e._events.error]:e.on("error",a),e.once("close",s),e.once("finish",u),e.emit("pipe",f),l.flowing||(this.on("readable",y),l.flowing=!0,n.nextTick(function(){v(f)})),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",y),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",y),t.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=E(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var n=B.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||m(this),"readable"===e&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&l(this,r):this.read(0))}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){m(this),this.read(0),this.emit("resume")},i.prototype.pause=function(){m(this,!0),this.emit("pause")},i.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var o=r.push(i);o||(n=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&"undefined"==typeof this[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){n&&(n=!1,e.resume())},r},i._fromList=_}).call(this,e(64))},{10:10,15:15,23:23,25:25,64:64,7:7,73:73,84:84}],69:[function(e,t,n){function r(e,t){this.afterTransform=function(e,n){return i(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);s.call(this,e);var t=(this._transformState=new r(e,this),this);this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){a(t,e)}):a(t)})}function a(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=(e._readableState,e._transformState);if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}t.exports=o;var s=e(66),u=e(10);u.inherits=e(23),u.inherits(o,s),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,n){throw new Error("not implemented")},o.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{10:10,23:23,66:66}],70:[function(e,t,n){(function(n){function r(e,t,n){this.chunk=e,this.encoding=t,this.callback=n}function i(e,t){e=e||{};var n=e.highWaterMark;this.highWaterMark=n||0===n?n:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var r=e.decodeStrings===!1;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){d(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function o(t){var n=e(66);return this instanceof o||this instanceof n?(this._writableState=new i(t,this),this.writable=!0,void E.call(this)):new o(t)}function a(e,t,r){var i=new Error("write after end");e.emit("error",i),n.nextTick(function(){r(i)})}function s(e,t,r,i){var o=!0;if(!b.isBuffer(r)&&"string"!=typeof r&&null!==r&&void 0!==r&&!t.objectMode){var a=new TypeError("Invalid non-string/buffer chunk");e.emit("error",a),n.nextTick(function(){i(a)}),o=!1}return o}function u(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new b(t,n)),t}function c(e,t,n,i,o){n=u(t,n,i),b.isBuffer(n)&&(i="buffer");var a=t.objectMode?1:n.length;t.length+=a;var s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing?t.buffer.push(new r(n,i,o)):f(e,t,a,n,i,o),s}function f(e,t,n,r,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,e._write(r,i,t.onwrite),t.sync=!1}function l(e,t,r,i,o){r?n.nextTick(function(){o(i)}):o(i),e._writableState.errorEmitted=!0,e.emit("error",i)}function h(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function d(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if(h(r),t)l(e,r,i,t,o);else{var a=y(e,r);a||r.bufferProcessing||!r.buffer.length||v(e,r),i?n.nextTick(function(){p(e,r,a,o)}):p(e,r,a,o)}}function p(e,t,n,r){n||g(e,t),r(),n&&m(e,t)}function g(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function v(e,t){t.bufferProcessing=!0;for(var n=0;n<t.buffer.length;n++){var r=t.buffer[n],i=r.chunk,o=r.encoding,a=r.callback,s=t.objectMode?1:i.length;if(f(e,t,s,i,o,a),t.writing){n++;break}}t.bufferProcessing=!1,n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}function y(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function m(e,t){var n=y(e,t);return n&&(t.finished=!0,e.emit("finish")),n}function _(e,t,r){t.ending=!0,m(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0}t.exports=o;var b=e(7).Buffer;o.WritableState=i;var w=e(10);w.inherits=e(23);var E=e(73);w.inherits(o,E),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),b.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=function(){}),r.ended?a(this,r,n):s(this,r,e,n)&&(i=c(this,r,e,t,n)),i},o.prototype._write=function(e,t,n){n(new Error("not implemented"))},o.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),"undefined"!=typeof e&&null!==e&&this.write(e,t),r.ending||r.finished||_(this,r,n)}}).call(this,e(64))},{10:10,23:23,64:64,66:66,7:7,73:73}],71:[function(e,t,n){var r=e(73);n=t.exports=e(68),n.Stream=r,n.Readable=n,n.Writable=e(70),n.Duplex=e(66),n.Transform=e(69),n.PassThrough=e(67)},{66:66,67:67,68:68,69:69,70:70,73:73}],72:[function(e,t,n){!function(e){if("object"==typeof n)t.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var r;try{r=window}catch(i){r=self}r.SparkMD5=e()}}(function(e){"use strict";function t(e,t,n,r,i,o){return t=_(_(t,e),_(r,o)),_(t<<i|t>>>32-i,n)}function n(e,n,r,i,o,a,s){return t(n&r|~n&i,e,n,o,a,s)}function r(e,n,r,i,o,a,s){return t(n&i|r&~i,e,n,o,a,s)}function i(e,n,r,i,o,a,s){return t(n^r^i,e,n,o,a,s)}function o(e,n,r,i,o,a,s){return t(r^(n|~i),e,n,o,a,s)}function a(e,t){var a=e[0],s=e[1],u=e[2],c=e[3];a=n(a,s,u,c,t[0],7,-680876936),c=n(c,a,s,u,t[1],12,-389564586),u=n(u,c,a,s,t[2],17,606105819),s=n(s,u,c,a,t[3],22,-1044525330),a=n(a,s,u,c,t[4],7,-176418897),c=n(c,a,s,u,t[5],12,1200080426),u=n(u,c,a,s,t[6],17,-1473231341),s=n(s,u,c,a,t[7],22,-45705983),a=n(a,s,u,c,t[8],7,1770035416),c=n(c,a,s,u,t[9],12,-1958414417),u=n(u,c,a,s,t[10],17,-42063),s=n(s,u,c,a,t[11],22,-1990404162),a=n(a,s,u,c,t[12],7,1804603682),c=n(c,a,s,u,t[13],12,-40341101),u=n(u,c,a,s,t[14],17,-1502002290),s=n(s,u,c,a,t[15],22,1236535329),a=r(a,s,u,c,t[1],5,-165796510),c=r(c,a,s,u,t[6],9,-1069501632),u=r(u,c,a,s,t[11],14,643717713),s=r(s,u,c,a,t[0],20,-373897302),a=r(a,s,u,c,t[5],5,-701558691),c=r(c,a,s,u,t[10],9,38016083),u=r(u,c,a,s,t[15],14,-660478335),s=r(s,u,c,a,t[4],20,-405537848),a=r(a,s,u,c,t[9],5,568446438),c=r(c,a,s,u,t[14],9,-1019803690),u=r(u,c,a,s,t[3],14,-187363961),s=r(s,u,c,a,t[8],20,1163531501),a=r(a,s,u,c,t[13],5,-1444681467),c=r(c,a,s,u,t[2],9,-51403784),u=r(u,c,a,s,t[7],14,1735328473),s=r(s,u,c,a,t[12],20,-1926607734),a=i(a,s,u,c,t[5],4,-378558),c=i(c,a,s,u,t[8],11,-2022574463),u=i(u,c,a,s,t[11],16,1839030562),s=i(s,u,c,a,t[14],23,-35309556),a=i(a,s,u,c,t[1],4,-1530992060),c=i(c,a,s,u,t[4],11,1272893353),u=i(u,c,a,s,t[7],16,-155497632),s=i(s,u,c,a,t[10],23,-1094730640),a=i(a,s,u,c,t[13],4,681279174),c=i(c,a,s,u,t[0],11,-358537222),u=i(u,c,a,s,t[3],16,-722521979),s=i(s,u,c,a,t[6],23,76029189),a=i(a,s,u,c,t[9],4,-640364487),c=i(c,a,s,u,t[12],11,-421815835),u=i(u,c,a,s,t[15],16,530742520),s=i(s,u,c,a,t[2],23,-995338651),a=o(a,s,u,c,t[0],6,-198630844),c=o(c,a,s,u,t[7],10,1126891415),u=o(u,c,a,s,t[14],15,-1416354905),s=o(s,u,c,a,t[5],21,-57434055),a=o(a,s,u,c,t[12],6,1700485571),c=o(c,a,s,u,t[3],10,-1894986606),u=o(u,c,a,s,t[10],15,-1051523),s=o(s,u,c,a,t[1],21,-2054922799),a=o(a,s,u,c,t[8],6,1873313359),c=o(c,a,s,u,t[15],10,-30611744),u=o(u,c,a,s,t[6],15,-1560198380),s=o(s,u,c,a,t[13],21,1309151649),a=o(a,s,u,c,t[4],6,-145523070),c=o(c,a,s,u,t[11],10,-1120210379),u=o(u,c,a,s,t[2],15,718787259),s=o(s,u,c,a,t[9],21,-343485551),e[0]=_(a,e[0]),e[1]=_(s,e[1]),e[2]=_(u,e[2]),e[3]=_(c,e[3])}function s(e){var t,n=[];for(t=0;64>t;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function u(e){var t,n=[];for(t=0;64>t;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function c(e){var t,n,r,i,o,u,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(t=64;c>=t;t+=64)a(f,s(e.substring(t-64,t)));for(e=e.substring(t-64),n=e.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;n>t;t+=1)r[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(a(f,r),t=0;16>t;t+=1)r[t]=0;return i=8*c,i=i.toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(i[2],16),u=parseInt(i[1],16)||0,r[14]=o,r[15]=u,a(f,r),f}function f(e){var t,n,r,i,o,s,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(t=64;c>=t;t+=64)a(f,u(e.subarray(t-64,t)));for(e=c>t-64?e.subarray(t-64):new Uint8Array(0),n=e.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;n>t;t+=1)r[t>>2]|=e[t]<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(a(f,r),t=0;16>t;t+=1)r[t]=0;return i=8*c,i=i.toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(i[2],16),s=parseInt(i[1],16)||0,r[14]=o,r[15]=s,a(f,r),f}function l(e){var t,n="";for(t=0;4>t;t+=1)n+=b[e>>8*t+4&15]+b[e>>8*t&15];return n}function h(e){var t;for(t=0;t<e.length;t+=1)e[t]=l(e[t]);return e.join("")}function d(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function p(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;r>n;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function g(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function v(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function y(e){var t,n=[],r=e.length;for(t=0;r-1>t;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function m(){this.reset()}var _=function(e,t){return e+t&4294967295},b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return"5d41402abc4b2a76b9719d911017c592"!==h(c("hello"))&&(_=function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n}),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||!function(){function t(e,t){return e=0|e||0,0>e?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,s,u=this.byteLength,c=t(n,u),f=u;return r!==e&&(f=t(r,u)),c>f?new ArrayBuffer(0):(i=f-c,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,c,i),a.set(s),o)}}(),m.prototype.append=function(e){return this.appendBinary(d(e)),this},m.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,n=this._buff.length;for(t=64;n>=t;t+=64)a(this._hash,s(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},m.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;i>t;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=h(this._hash),e&&(n=y(n)),this.reset(),n},m.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},m.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},m.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},m.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},m.prototype._finish=function(e,t){var n,r,i,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(a(this._hash,e),o=0;16>o;o+=1)e[o]=0;n=8*this._length,n=n.toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(n[2],16),i=parseInt(n[1],16)||0,e[14]=r,e[15]=i,a(this._hash,e)},m.hash=function(e,t){return m.hashBinary(d(e),t)},m.hashBinary=function(e,t){var n=c(e),r=h(n);return t?y(r):r},m.ArrayBuffer=function(){this.reset()},m.ArrayBuffer.prototype.append=function(e){var t,n=v(this._buff.buffer,e,!0),r=n.length;for(this._length+=e.byteLength,t=64;r>=t;t+=64)a(this._hash,u(n.subarray(t-64,t)));return this._buff=r>t-64?new Uint8Array(n.buffer.slice(t-64)):new Uint8Array(0),this},m.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;i>t;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=h(this._hash),e&&(n=y(n)),this.reset(),n},m.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},m.ArrayBuffer.prototype.getState=function(){var e=m.prototype.getState.call(this);return e.buff=g(e.buff),e},m.ArrayBuffer.prototype.setState=function(e){return e.buff=p(e.buff,!0),m.prototype.setState.call(this,e)},m.ArrayBuffer.prototype.destroy=m.prototype.destroy,m.ArrayBuffer.prototype._finish=m.prototype._finish,m.ArrayBuffer.hash=function(e,t){var n=f(new Uint8Array(e)),r=h(n);return t?y(r):r},m})},{}],73:[function(e,t,n){function r(){i.call(this)}t.exports=r;var i=e(15).EventEmitter,o=e(23);o(r,i),r.Readable=e(81),r.Writable=e(83),r.Duplex=e(74),r.Transform=e(82),r.PassThrough=e(80),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function o(){f||(f=!0,e.end())}function a(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",n),e.removeListener("drain",r),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),e.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(c.on("end",o),c.on("close",a));var f=!1;return c.on("error",s),e.on("error",s),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},{15:15,23:23,74:74,80:80,81:81,82:82,83:83}],74:[function(e,t,n){t.exports=e(75)},{75:75}],75:[function(e,t,n){"use strict";function r(e){return this instanceof r?(c.call(this,e),f.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||s(o,this)}function o(e){e.end()}var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=r;var s=e(63),u=e(10);u.inherits=e(23);var c=e(77),f=e(79);u.inherits(r,c);for(var l=a(f.prototype),h=0;h<l.length;h++){var d=l[h];r.prototype[d]||(r.prototype[d]=f.prototype[d])}},{10:10,23:23,63:63,77:77,79:79}],76:[function(e,t,n){"use strict";function r(e){return this instanceof r?void i.call(this,e):new r(e)}t.exports=r;var i=e(78),o=e(10);o.inherits=e(23),o.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},{10:10,23:23,78:78}],77:[function(e,t,n){(function(n){"use strict";function r(t,n){M=M||e(75),t=t||{},this.objectMode=!!t.objectMode,n instanceof M&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(I||(I=e(84).StringDecoder),this.decoder=new I(t.encoding),this.encoding=t.encoding)}function i(t){return M=M||e(75),this instanceof i?(this._readableState=new r(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),void O.call(this)):new i(t)}function o(e,t,n,r,i){var o=c(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,f(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||r||(n=t.decoder.write(n)),i||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&l(e)),d(e,t);else i||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function s(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function c(e,t){var n=null;return A.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,l(e)}}function l(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(j("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?x(h,e):h(e))}function h(e){j("emit readable"),e.emit("readable"),_(e)}function d(e,t){t.readingMore||(t.readingMore=!0,x(p,e,t))}function p(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(j("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;j("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&L(e,"data")&&(t.flowing=!0,_(e))}}function v(e){j("readable nexttick read 0"),e.read(0)}function y(e,t){t.resumeScheduled||(t.resumeScheduled=!0,x(m,e,t))}function m(e,t){t.reading||(j("resume read 0"),e.read(0)),t.resumeScheduled=!1,e.emit("resume"),_(e),t.flowing&&!t.reading&&e.read(0)}function _(e){var t=e._readableState;if(j("flow",t.flowing),t.flowing)do var n=e.read();while(null!==n&&t.flowing)}function b(e,t){var n,r=t.buffer,i=t.length,o=!!t.decoder,a=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(a)n=r.shift();else if(!e||e>=i)n=o?r.join(""):1===r.length?r[0]:A.concat(r,i),r.length=0;else if(e<r[0].length){var s=r[0];n=s.slice(0,e),r[0]=s.slice(e)}else if(e===r[0].length)n=r.shift();else{n=o?"":new A(e);for(var u=0,c=0,f=r.length;f>c&&e>u;c++){var s=r[0],l=Math.min(e-u,s.length);o?n+=s.slice(0,l):s.copy(n,u,0,l),l<s.length?r[0]=s.slice(l):r.shift(),u+=l}}return n}function w(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,x(E,t,e))}function E(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function k(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}function S(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}t.exports=i;var x=e(63),B=e(25),A=e(7).Buffer;i.ReadableState=r;var O,L=(e(15),function(e,t){return e.listeners(t).length});!function(){try{O=e("stream")}catch(t){}finally{O||(O=e(15).EventEmitter)}}();var A=e(7).Buffer,R=e(10);R.inherits=e(23);var j,T=e(6);j=T&&T.debuglog?T.debuglog("stream"):function(){};var I;R.inherits(i,O);var M,M;i.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding,t!==n.encoding&&(e=new A(e,t),t="")),o(this,n,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},i.prototype.isPaused=function(){return this._readableState.flowing===!1},i.prototype.setEncoding=function(t){return I||(I=e(84).StringDecoder),this._readableState.decoder=new I(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(e){j("read",e);var t=this._readableState,n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return j("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?w(this):l(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&w(this),null;var r=t.needReadable;j("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,j("length less than watermark",r)),(t.ended||t.reading)&&(r=!1,j("reading or ended",r)),r&&(j("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),r&&!t.reading&&(e=u(n,t));var i;return i=e>0?b(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&w(this),null!==i&&this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function r(e){j("onunpipe"),e===l&&o()}function i(){j("onend"),e.end()}function o(){j("cleanup"),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("drain",v),e.removeListener("error",s),e.removeListener("unpipe",r),l.removeListener("end",i),l.removeListener("end",o),l.removeListener("data",a),y=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||v()}function a(t){j("ondata");var n=e.write(t);!1===n&&(1!==h.pipesCount||h.pipes[0]!==e||1!==l.listenerCount("data")||y||(j("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++),l.pause())}function s(t){j("onerror",t),f(),e.removeListener("error",s),0===L(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",c),f()}function c(){j("onfinish"),e.removeListener("close",u),f()}function f(){j("unpipe"),l.unpipe(e)}var l=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,j("pipe count=%d opts=%j",h.pipesCount,t);var d=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,p=d?i:o;h.endEmitted?x(p):l.once("end",p),e.on("unpipe",r);var v=g(l);e.on("drain",v);var y=!1;return l.on("data",a),e._events&&e._events.error?B(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",u),e.once("finish",c),e.emit("pipe",l),h.flowing||(j("pipe resume"),l.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=S(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var n=O.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&l(this,r):x(v,this))}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var e=this._readableState;return e.flowing||(j("resume"),e.flowing=!0,y(this,e)),this},i.prototype.pause=function(){return j("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(j("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(j("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e);
  }r.push(null)}),e.on("data",function(i){if(j("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var o=r.push(i);o||(n=!0,e.pause())}});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return k(o,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){j("wrapped _read",t),n&&(n=!1,e.resume())},r},i._fromList=b}).call(this,e(64))},{10:10,15:15,23:23,25:25,6:6,63:63,64:64,7:7,75:75,84:84}],78:[function(e,t,n){"use strict";function r(e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);s.call(this,e),this._transformState=new r(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e){a(t,e)}):a(t)})}function a(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}t.exports=o;var s=e(75),u=e(10);u.inherits=e(23),u.inherits(o,s),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,n){throw new Error("not implemented")},o.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{10:10,23:23,75:75}],79:[function(e,t,n){"use strict";function r(){}function i(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function o(t,n){A=A||e(75),t=t||{},this.objectMode=!!t.objectMode,n instanceof A&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){p(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function a(t){return A=A||e(75),this instanceof a||this instanceof A?(this._writableState=new o(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),void x.call(this)):new a(t)}function s(e,t){var n=new Error("write after end");e.emit("error",n),E(t,n)}function u(e,t,n,r){var i=!0;if(!k.isBuffer(n)&&"string"!=typeof n&&null!==n&&void 0!==n&&!t.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),E(r,o),i=!1}return i}function c(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new k(t,n)),t}function f(e,t,n,r,o){n=c(t,n,r),k.isBuffer(n)&&(r="buffer");var a=t.objectMode?1:n.length;t.length+=a;var s=t.length<t.highWaterMark;if(s||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest=new i(n,r,o),u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest}else l(e,t,!1,a,n,r,o);return s}function l(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function h(e,t,n,r,i){--t.pendingcb,n?E(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function d(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function p(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(d(n),t)h(e,n,r,t,i);else{var o=m(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||y(e,n),r?E(g,e,n,o,i):g(e,n,o,i)}}function g(e,t,n,r){n||v(e,t),t.pendingcb--,r(),b(e,t)}function v(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function y(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){for(var r=[],i=[];n;)i.push(n.callback),r.push(n),n=n.next;t.pendingcb++,t.lastBufferedRequest=null,l(e,t,!0,t.length,r,"",function(e){for(var n=0;n<i.length;n++)t.pendingcb--,i[n](e)})}else{for(;n;){var o=n.chunk,a=n.encoding,s=n.callback,u=t.objectMode?1:o.length;if(l(e,t,!1,u,o,a,s),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function m(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function b(e,t){var n=m(t);return n&&(0===t.pendingcb?(_(e,t),t.finished=!0,e.emit("finish")):_(e,t)),n}function w(e,t,n){t.ending=!0,b(e,t),n&&(t.finished?E(n):e.once("finish",n)),t.ended=!0}t.exports=a;var E=e(63),k=e(7).Buffer;a.WritableState=o;var S=e(10);S.inherits=e(23);var x,B={deprecate:e(93)};!function(){try{x=e("stream")}catch(t){}finally{x||(x=e(15).EventEmitter)}}();var k=e(7).Buffer;S.inherits(a,x);var A;o.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(o.prototype,"buffer",{get:B.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var A;a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},a.prototype.write=function(e,t,n){var i=this._writableState,o=!1;return"function"==typeof t&&(n=t,t=null),k.isBuffer(e)?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=r),i.ended?s(this,n):u(this,i,e,n)&&(i.pendingcb++,o=f(this,i,e,t,n)),o},a.prototype.cork=function(){var e=this._writableState;e.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||y(this,e))},a.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e},a.prototype._write=function(e,t,n){n(new Error("not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||w(this,r,n)}},{10:10,15:15,23:23,63:63,7:7,75:75,93:93}],80:[function(e,t,n){t.exports=e(76)},{76:76}],81:[function(e,t,n){var r=function(){try{return e("stream")}catch(t){}}();n=t.exports=e(77),n.Stream=r||n,n.Readable=n,n.Writable=e(79),n.Duplex=e(75),n.Transform=e(78),n.PassThrough=e(76)},{75:75,76:76,77:77,78:78,79:79}],82:[function(e,t,n){t.exports=e(78)},{78:78}],83:[function(e,t,n){t.exports=e(79)},{79:79}],84:[function(e,t,n){function r(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function o(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e(7).Buffer,u=s.isEncoding||function(e){switch(e&&e.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!0;default:return!1}},c=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),r(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";e=e.slice(n,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var r=t.charCodeAt(t.length-1);if(!(r>=55296&&56319>=r)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,r=t.charCodeAt(i);if(r>=55296&&56319>=r){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},c.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(2>=t&&n>>4==14){this.charLength=3;break}if(3>=t&&n>>3==30){this.charLength=4;break}}this.charReceived=t},c.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{7:7}],85:[function(e,t,n){arguments[4][75][0].apply(n,arguments)},{10:10,23:23,63:63,75:75,86:86,88:88}],86:[function(e,t,n){arguments[4][77][0].apply(n,arguments)},{10:10,15:15,23:23,25:25,6:6,63:63,64:64,7:7,77:77,84:84,85:85}],87:[function(e,t,n){arguments[4][78][0].apply(n,arguments)},{10:10,23:23,78:78,85:85}],88:[function(e,t,n){arguments[4][79][0].apply(n,arguments)},{10:10,15:15,23:23,63:63,7:7,79:79,85:85,93:93}],89:[function(e,t,n){arguments[4][82][0].apply(n,arguments)},{82:82,87:87}],90:[function(e,t,n){arguments[4][31][0].apply(n,arguments)},{31:31}],91:[function(e,t,n){(function(n){function r(e){a.call(this,e),this._destroyed=!1}function i(e,t,n){n(null,e)}function o(e){return function(t,n,r){return"function"==typeof t&&(r=n,n=t,t={}),"function"!=typeof n&&(n=i),"function"!=typeof r&&(r=null),e(t,n,r)}}var a=e(89),s=e(95).inherits,u=e(90);s(r,a),r.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;n.nextTick(function(){e&&t.emit("error",e),t.emit("close")})}},t.exports=o(function(e,t,n){var i=new r(e);return i._transform=t,n&&(i._flush=n),i}),t.exports.ctor=o(function(e,t,n){function i(t){return this instanceof i?(this.options=u(e,t),void r.call(this,this.options)):new i(t)}return s(i,r),i.prototype._transform=t,n&&(i.prototype._flush=n),i}),t.exports.obj=o(function(e,t,n){var i=new r(u({objectMode:!0,highWaterMark:16},e));return i._transform=t,n&&(i._flush=n),i})}).call(this,e(64))},{64:64,89:89,90:90,95:95}],92:[function(e,t,n){"use strict";function r(){this.length=0}r.prototype.push=function(e){var t={item:e};this.last?this.last=this.last.next=t:this.last=this.first=t,this.length++},r.prototype.shift=function(){var e=this.first;return e?(this.first=e.next,--this.length||(this.last=void 0),e.item):void 0},r.prototype.slice=function(e,t){e="undefined"==typeof e?0:e,t="undefined"==typeof t?1/0:t;for(var n=[],r=0,i=this.first;i&&!(--t<0);i=i.next)++r>e&&n.push(i.item);return n},t.exports=r},{}],93:[function(e,t,n){(function(e){function n(e,t){function n(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var i=!1;return n}function r(t){try{if(!e.localStorage)return!1}catch(n){return!1}var r=e.localStorage[t];return null==r?!1:"true"===String(r).toLowerCase()}t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],94:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],95:[function(e,t,n){(function(t,r){function i(e,t){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(t)?r.showHidden=t:t&&n._extend(r,t),w(r.showHidden)&&(r.showHidden=!1),w(r.depth)&&(r.depth=2),w(r.colors)&&(r.colors=!1),w(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,t,r){if(e.customInspect&&t&&B(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return _(i)||(i=u(e,i,r)),i}var o=c(e,t);if(o)return o;var a=Object.keys(t),g=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),x(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(t);if(0===a.length){if(B(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(S(t))return e.stylize(Date.prototype.toString.call(t),"date");if(x(t))return f(t)}var y="",m=!1,b=["{","}"];if(p(t)&&(m=!0,b=["[","]"]),B(t)){var w=t.name?": "+t.name:"";y=" [Function"+w+"]"}if(E(t)&&(y=" "+RegExp.prototype.toString.call(t)),S(t)&&(y=" "+Date.prototype.toUTCString.call(t)),x(t)&&(y=" "+f(t)),0===a.length&&(!m||0==t.length))return b[0]+y+b[1];if(0>r)return E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var k;return k=m?l(e,t,r,g,a):a.map(function(n){return h(e,t,r,g,n,m)}),e.seen.pop(),d(k,y,b)}function c(e,t){if(w(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,n,r,i){for(var o=[],a=0,s=t.length;s>a;++a)j(t,String(a))?o.push(h(e,t,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(e,t,n,r,i,!0))}),o}function h(e,t,n,r,i,o){var a,s,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),j(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=v(n)?u(e,c.value,null):u(e,c.value,n-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n"))):s=e.stylize("[Circular]","special")),w(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function p(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function y(e){return null==e}function m(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function w(e){return void 0===e}function E(e){return k(e)&&"[object RegExp]"===O(e)}function k(e){return"object"==typeof e&&null!==e}function S(e){return k(e)&&"[object Date]"===O(e)}function x(e){return k(e)&&("[object Error]"===O(e)||e instanceof Error)}function B(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function O(e){return Object.prototype.toString.call(e)}function L(e){return 10>e?"0"+e.toString(10):e.toString(10)}function R(){var e=new Date,t=[L(e.getHours()),L(e.getMinutes()),L(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var T=/%[sdj%]/g;n.format=function(e){if(!_(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,o=r.length,a=String(e).replace(T,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),s=r[n];o>n;s=r[++n])a+=v(s)||!k(s)?" "+s:" "+i(s);return a},n.deprecate=function(e,i){function o(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(w(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var a=!1;return o};var I,M={};n.debuglog=function(e){if(w(I)&&(I=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!M[e])if(new RegExp("\\b"+e+"\\b","i").test(I)){var r=t.pid;M[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else M[e]=function(){};return M[e]},n.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=p,n.isBoolean=g,n.isNull=v,n.isNullOrUndefined=y,n.isNumber=m,n.isString=_,n.isSymbol=b,n.isUndefined=w,n.isRegExp=E,n.isObject=k,n.isDate=S,n.isError=x,n.isFunction=B,n.isPrimitive=A,n.isBuffer=e(94);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",R(),n.format.apply(n,arguments))},n.inherits=e(23),n._extend=function(e,t){if(!t||!k(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e(64),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{23:23,64:64,94:94}],96:[function(e,t,n){"use strict";function r(e,t,n){var r=n[n.length-1];e===r.element&&(n.pop(),r=n[n.length-1]);var i=r.element,o=r.index;if(Array.isArray(i))i.push(e);else if(o===t.length-2){var a=t.pop();i[a]=e}else t.push(e)}n.stringify=function(e){var t=[];t.push({obj:e});for(var n,r,i,o,a,s,u,c,f,l,h,d="";n=t.pop();)if(r=n.obj,i=n.prefix||"",o=n.val||"",d+=i,o)d+=o;else if("object"!=typeof r)d+="undefined"==typeof r?null:JSON.stringify(r);else if(null===r)d+="null";else if(Array.isArray(r)){for(t.push({val:"]"}),a=r.length-1;a>=0;a--)s=0===a?"":",",t.push({obj:r[a],prefix:s});t.push({val:"["})}else{u=[];for(c in r)r.hasOwnProperty(c)&&u.push(c);for(t.push({val:"}"}),a=u.length-1;a>=0;a--)f=u[a],l=r[f],h=a>0?",":"",h+=JSON.stringify(f)+":",t.push({obj:l,prefix:h});t.push({val:"{"})}return d},n.parse=function(e){for(var t,n,i,o,a,s,u,c,f,l=[],h=[],d=0;;)if(t=e[d++],"}"!==t&&"]"!==t&&"undefined"!=typeof t)switch(t){case" ":case"	":case"\n":case":":case",":break;case"n":d+=3,r(null,l,h);break;case"t":d+=3,r(!0,l,h);break;case"f":d+=4,r(!1,l,h);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",d--;;){if(i=e[d++],!/[\d\.\-e\+]/.test(i)){d--;break}n+=i}r(parseFloat(n),l,h);break;case'"':for(o="",a=void 0,s=0;;){if(u=e[d++],'"'===u&&("\\"!==a||s%2!==1))break;o+=u,a=u,"\\"===a?s++:s=0}r(JSON.parse('"'+o+'"'),l,h);break;case"[":c={element:[],index:l.length},l.push(c.element),h.push(c);break;case"{":f={element:{},index:l.length},l.push(f.element),h.push(f);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===l.length)return l.pop();r(l.pop(),l,h)}}},{}],97:[function(e,t,n){arguments[4][40][0].apply(n,arguments)},{40:40}]},{},[1]);
  