(this.webpackJsonp=this.webpackJsonp||[]).push([[2],{106:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(7),i=n(22);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new u(t,e))}}var u=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.a)},112:function(t,e,n){"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,"a",(function(){return r}))},120:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(35),i=new r.a((function(t){return t.complete()}));function o(t){return t?function(t){return new r.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},123:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(35),i=n(327),o=n(540);function u(t,e){return e?Object(o.a)(t,e):t instanceof r.a?t:new r.a(Object(i.a)(t))}},154:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(7),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(22).a)},160:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},1652:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=r(n(646)),s=n(90),a=n(167),c=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return new WebSocket(t)};(0,i.default)(this,t),this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e;var o=f(e,n),s=o.scheme,a=o.error;if(a)this._error=a;else{this._ws=l(s,e.address,r),this._ws.binaryType="arraybuffer";var c=this;this._ws.onclose=function(t){t&&!t.wasClean&&c._handleConnectionError()},this._ws.onopen=function(){c._clearConnectionTimeout();var t=c._pending;c._pending=null;for(var e=0;e=0}(e);return function(t,e,n){t&&!n?console.warn("Neo4j driver is configured to use secure WebSocket on a HTTP web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to not use encryption."):e&&n&&console.warn("Neo4j driver is configured to use insecure WebSocket on a HTTPS web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to use encryption.")}(n,r,o),r?{scheme:"ws",error:null}:o?{scheme:"wss",error:null}:n?i&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==i?{scheme:null,error:(0,s.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+i+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+a.ENCRYPTION_OFF+'"` in the driver configuration.')}:{scheme:"wss",error:null}:{scheme:"ws",error:null}}function h(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}e.default=c},1653:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=r(n(18)),s=r(n(17)),a=r(n(19)),c=function(t){function e(){return(0,i.default)(this,e),(0,u.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,a.default)(e,t),(0,o.default)(e,[{key:"resolve",value:function(t){return this._resolveToItself(t)}}]),e}(r(n(1654)).default);e.default=c},1654:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=function(){function t(){(0,i.default)(this,t)}return(0,o.default)(t,[{key:"resolve",value:function(){throw new Error("Abstract function")}},{key:"_resolveToItself",value:function(t){return Promise.resolve([t])}}]),t}();e.default=u},1655:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(646)),o=n(1656),u=new o.TextEncoder("utf-8"),s=new o.TextDecoder("utf-8");var a={encode:function(t){return new i.default(u.encode(t).buffer)},decode:function(t,e){if(t instanceof i.default)return s.decode(t.readView(Math.min(e,t.length-t.position)));for(var n=new i.default(e),r=0;r=n.length))return n.getUInt8(t);t-=n.length}}},{key:"getInt8",value:function(t){for(var e=0;e=n.length))return n.getInt8(t);t-=n.length}}},{key:"getFloat64",value:function(t){for(var e=(0,l.alloc)(8),n=0;n<8;n++)e.putUInt8(n,this.getUInt8(t+n));return e.getFloat64(0)}}]),e}(c.default);e.default=f},1658:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(268)),o=r(n(269)),u=r(n(12)),s=r(n(13)),a=r(n(18)),c=r(n(17)),l=r(n(19)),f=r(n(885)),h=r(n(890)),d=r(n(648)),p=n(212),v=function(t){function e(t){var n,r=t.id,i=t.config,o=t.log,s=t.address,l=t.userAgent,f=t.authToken;return(0,u.default)(this,e),(n=(0,a.default)(this,(0,c.default)(e).call(this,{id:r,config:i,log:o,userAgent:l,authToken:f})))._address=s,n}var n;return(0,l.default)(e,t),(0,s.default)(e,[{key:"acquireConnection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.accessMode,t.database,t.bookmarks;return this._connectionPool.acquire(this._address).then((function(t){return new h.default(t,null)}))}},{key:"supportsMultiDb",value:(n=(0,o.default)(i.default.mark((function t(){var e,n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=d.default.create(this._address,this._config,this._createConnectionErrorHandler(),this._log),t.prev=1,t.next=4,e._negotiateProtocol();case 4:if(!(n=e.protocol())){t.next=7;break}return t.abrupt("return",n.version>=p.BOLT_PROTOCOL_V4);case 7:return t.abrupt("return",!1);case 8:return t.prev=8,t.next=11,e.close();case 11:return t.finish(8);case 12:case"end":return t.stop()}}),t,this,[[1,,8,12]])}))),function(){return n.apply(this,arguments)})}]),e}(f.default);e.default=v},1659:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=n(90),u=n(167),s=[null,void 0,!0,!1,u.ENCRYPTION_ON,u.ENCRYPTION_OFF],a=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];e.default=function t(e,n,r){(0,i.default)(this,t),this.address=e,this.encrypted=function(t){var e=t.encrypted;if(-1===s.indexOf(e))throw(0,o.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(s));return e}(n),this.trust=function(t){var e=t.trust;if(-1===a.indexOf(e))throw(0,o.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(a));return e}(n),this.trustedCertificates=function(t){return t.trustedCertificates||[]}(n),this.knownHostsPath=function(t){return t.knownHosts||null}(n),this.connectionErrorCode=r||o.SERVICE_UNAVAILABLE,this.connectionTimeout=function(t){var e=parseInt(t.connectionTimeout,10);return 0===e||e&&e<0?null:e||3e4}(n)}},1660:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=n(336),s=n(90),a=r(n(479)),c=r(n(886)),l=r(n(889)),f=r(n(1665)),h=function(){function t(e,n,r,o,u){(0,i.default)(this,t),this._connection=e,this._channel=n,this._chunker=r,this._disableLosslessIntegers=o,this._log=u}return(0,o.default)(t,[{key:"writeHandshakeRequest",value:function(){var t;this._channel.write(((t=(0,u.alloc)(20)).writeInt32(1616949271),t.writeInt32(4),t.writeInt32(3),t.writeInt32(2),t.writeInt32(1),t.reset(),t))}},{key:"createNegotiatedProtocol",value:function(t){var e=t.readInt32();return this._log.isDebugEnabled()&&this._log.debug("".concat(this._connection," negotiated protocol version ").concat(e)),this._createProtocolWithVersion(e)}},{key:"_createProtocolWithVersion",value:function(t){switch(t){case 1:return new a.default(this._connection,this._chunker,this._disableLosslessIntegers);case 2:return new c.default(this._connection,this._chunker,this._disableLosslessIntegers);case 3:return new l.default(this._connection,this._chunker,this._disableLosslessIntegers);case 4:return new f.default(this._connection,this._chunker,this._disableLosslessIntegers);case 1213486160:throw(0,s.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)");default:throw(0,s.newError)("Unknown Bolt protocol version: "+t)}}}]),t}();e.default=h},1661:function(t,e,n){"use strict";var r=n(211),i=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.Unpacker=e.Packer=void 0;var o=i(n(12)),u=i(n(13)),s=i(n(18)),a=i(n(17)),c=i(n(344)),l=i(n(19)),f=r(n(884)),h=n(887),d=n(649),p=n(192),v=n(888),_=function(t){function e(){return(0,o.default)(this,e),(0,s.default)(this,(0,a.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,u.default)(e,[{key:"disableByteArrays",value:function(){throw new Error("Bolt V2 should always support byte arrays")}},{key:"packable",value:function(t){var n=this;return(0,h.isPoint)(t)?function(){return r=n,void(null===(e=t).z||void 0===e.z?function(t,e){var n=[e.packable((0,p.int)(t.srid)),e.packable(t.x),e.packable(t.y)];e.packStruct(88,n)}(e,r):function(t,e){var n=[e.packable((0,p.int)(t.srid)),e.packable(t.x),e.packable(t.y),e.packable(t.z)];e.packStruct(89,n)}(e,r));var e,r}:(0,d.isDuration)(t)?function(){return e=t,r=n,i=(0,p.int)(e.months),o=(0,p.int)(e.days),u=(0,p.int)(e.seconds),s=(0,p.int)(e.nanoseconds),a=[r.packable(i),r.packable(o),r.packable(u),r.packable(s)],void r.packStruct(69,a);var e,r,i,o,u,s,a}:(0,d.isLocalTime)(t)?function(){return e=t,r=n,i=(0,v.localTimeToNanoOfDay)(e.hour,e.minute,e.second,e.nanosecond),o=[r.packable(i)],void r.packStruct(116,o);var e,r,i,o}:(0,d.isTime)(t)?function(){return e=t,r=n,i=(0,v.localTimeToNanoOfDay)(e.hour,e.minute,e.second,e.nanosecond),o=(0,p.int)(e.timeZoneOffsetSeconds),u=[r.packable(i),r.packable(o)],void r.packStruct(84,u);var e,r,i,o,u}:(0,d.isDate)(t)?function(){return e=t,r=n,i=(0,v.dateToEpochDay)(e.year,e.month,e.day),o=[r.packable(i)],void r.packStruct(68,o);var e,r,i,o}:(0,d.isLocalDateTime)(t)?function(){return e=t,r=n,i=(0,v.localDateTimeToEpochSecond)(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),o=(0,p.int)(e.nanosecond),u=[r.packable(i),r.packable(o)],void r.packStruct(100,u);var e,r,i,o,u}:(0,d.isDateTime)(t)?function(){return r=n,void((e=t).timeZoneId?function(t,e){var n=(0,v.localDateTimeToEpochSecond)(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),r=(0,p.int)(t.nanosecond),i=t.timeZoneId,o=[e.packable(n),e.packable(r),e.packable(i)];e.packStruct(102,o)}(e,r):function(t,e){var n=(0,v.localDateTimeToEpochSecond)(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),r=(0,p.int)(t.nanosecond),i=(0,p.int)(t.timeZoneOffsetSeconds),o=[e.packable(n),e.packable(r),e.packable(i)];e.packStruct(70,o)}(e,r));var e,r}:(0,c.default)((0,a.default)(e.prototype),"packable",this).call(this,t)}}]),e}(f.Packer);e.Packer=_;var b=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,o.default)(this,e),(0,s.default)(this,(0,a.default)(e).call(this,t))}return(0,l.default)(e,t),(0,u.default)(e,[{key:"_unpackUnknownStruct",value:function(t,n,r){return 88===t?function(t,e,n){return t._verifyStructSize("Point2D",3,e),new h.Point(t.unpack(n),t.unpack(n),t.unpack(n),void 0)}(this,n,r):89===t?function(t,e,n){return t._verifyStructSize("Point3D",4,e),new h.Point(t.unpack(n),t.unpack(n),t.unpack(n),t.unpack(n))}(this,n,r):69===t?function(t,e,n){t._verifyStructSize("Duration",4,e);var r=t.unpack(n),i=t.unpack(n),o=t.unpack(n),u=t.unpack(n);return new d.Duration(r,i,o,u)}(this,n,r):116===t?function(t,e,n,r){t._verifyStructSize("LocalTime",1,e);var i=t.unpackInteger(n);return y((0,v.nanoOfDayToLocalTime)(i),r)}(this,n,r,this._disableLosslessIntegers):84===t?function(t,e,n,r){t._verifyStructSize("Time",2,e);var i=t.unpackInteger(n),o=t.unpackInteger(n),u=(0,v.nanoOfDayToLocalTime)(i);return y(new d.Time(u.hour,u.minute,u.second,u.nanosecond,o),r)}(this,n,r,this._disableLosslessIntegers):68===t?function(t,e,n,r){t._verifyStructSize("Date",1,e);var i=t.unpackInteger(n);return y((0,v.epochDayToDate)(i),r)}(this,n,r,this._disableLosslessIntegers):100===t?function(t,e,n,r){t._verifyStructSize("LocalDateTime",2,e);var i=t.unpackInteger(n),o=t.unpackInteger(n);return y((0,v.epochSecondAndNanoToLocalDateTime)(i,o),r)}(this,n,r,this._disableLosslessIntegers):70===t?function(t,e,n,r){t._verifyStructSize("DateTimeWithZoneOffset",3,e);var i=t.unpackInteger(n),o=t.unpackInteger(n),u=t.unpackInteger(n),s=(0,v.epochSecondAndNanoToLocalDateTime)(i,o);return y(new d.DateTime(s.year,s.month,s.day,s.hour,s.minute,s.second,s.nanosecond,u,null),r)}(this,n,r,this._disableLosslessIntegers):102===t?function(t,e,n,r){t._verifyStructSize("DateTimeWithZoneId",3,e);var i=t.unpackInteger(n),o=t.unpackInteger(n),u=t.unpack(n),s=(0,v.epochSecondAndNanoToLocalDateTime)(i,o);return y(new d.DateTime(s.year,s.month,s.day,s.hour,s.minute,s.second,s.nanosecond,null,u),r)}(this,n,r,this._disableLosslessIntegers):(0,c.default)((0,a.default)(e.prototype),"_unpackUnknownStruct",this).call(this,t,n,r,this._disableLosslessIntegers)}}]),e}(f.Unpacker);function y(t,e){if(!e)return t;var n=Object.create(Object.getPrototypeOf(t));for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];n[r]=(0,p.isInt)(i)?i.toNumberOrInfinity():i}return Object.freeze(n),n}e.Unpacker=b},1665:function(t,e,n){"use strict";var r=n(211),i=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n(12)),u=i(n(13)),s=i(n(18)),a=i(n(17)),c=i(n(19)),l=i(n(889)),f=r(n(420)),h=n(229),d=n(212),p=function(t){function e(){return(0,o.default)(this,e),(0,s.default)(this,(0,a.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,u.default)(e,[{key:"beginTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.bookmark,n=t.txConfig,r=t.database,i=t.mode,o=t.beforeError,u=t.afterError,s=t.beforeComplete,a=t.afterComplete,c=new h.ResultStreamObserver({connection:this._connection,beforeError:o,afterError:u,beforeComplete:s,afterComplete:a});return c.prepareToHandleSingleResponse(),this._connection.write(f.default.begin({bookmark:e,txConfig:n,database:r,mode:i}),c,!0),c}},{key:"run",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.bookmark,i=n.txConfig,o=n.database,u=n.mode,s=n.beforeKeys,a=n.afterKeys,c=n.beforeError,l=n.afterError,d=n.beforeComplete,p=n.afterComplete,v=n.flush,_=void 0===v||v,b=n.reactive,y=void 0!==b&&b,m=n.fetchSize,g=void 0===m?f.ALL:m,w=new h.ResultStreamObserver({connection:this._connection,reactive:y,fetchSize:g,moreFunction:this._requestMore,discardFunction:this._requestDiscard,beforeKeys:s,afterKeys:a,beforeError:c,afterError:l,beforeComplete:d,afterComplete:p}),k=y;return this._connection.write(f.default.runWithMetadata(t,e,{bookmark:r,txConfig:i,database:o,mode:u}),w,k&&_),y||this._connection.write(f.default.pull({n:g}),w,_),w}},{key:"_requestMore",value:function(t,e,n,r){t.write(f.default.pull({stmtId:e,n:n}),r,!0)}},{key:"_requestDiscard",value:function(t,e,n){t.write(f.default.discard({stmtId:e}),n,!0)}},{key:"_noOp",value:function(){}},{key:"version",get:function(){return d.BOLT_PROTOCOL_V4}}]),e}(l.default);e.default=p},1666:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(268)),o=r(n(269)),u=r(n(12)),s=r(n(13)),a=r(n(650)),c=n(90),l=r(n(651)),f=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.create,r=void 0===n?function(t,e){return Promise.resolve()}:n,i=e.destroy,o=void 0===i?function(t){return Promise.resolve()}:i,s=e.validate,c=void 0===s?function(t){return!0}:s,f=e.installIdleObserver,h=void 0===f?function(t,e){}:f,d=e.removeIdleObserver,p=void 0===d?function(t){}:d,v=e.config,_=void 0===v?a.default.defaultConfig():v,b=e.log,y=void 0===b?l.default.noOp():b;(0,u.default)(this,t),this._create=r,this._destroy=o,this._validate=c,this._installIdleObserver=h,this._removeIdleObserver=p,this._maxSize=_.maxSize,this._acquisitionTimeout=_.acquisitionTimeout,this._pools={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=y,this._closed=!1}var e,n,r;return(0,s.default)(t,[{key:"acquire",value:function(t){var e=this;return this._acquire(t).then((function(n){var r=t.asKey();if(n){if(!(e._maxSize&&e.activeResourceCount(t)>=e._maxSize))return h(r,e._activeResourceCounts),e._log.isDebugEnabled()&&e._log.debug("".concat(n," acquired from the pool ").concat(r)),n;e._destroy(n)}var i=e._acquireRequests;return i[r]||(i[r]=[]),new Promise((function(n,o){var u,s=setTimeout((function(){var n=i[r];if(n&&(i[r]=n.filter((function(t){return t!==u}))),u.isCompleted());else{var o=e.activeResourceCount(t),s=e.has(t)?e._pools[r].length:0;u.reject((0,c.newError)("Connection acquisition timed out in ".concat(e._acquisitionTimeout," ms. Poos status: Active conn count = ").concat(o,", Idle conn count = ").concat(s,".")))}}),e._acquisitionTimeout);u=new p(r,n,o,s,e._log),i[r].push(u)}))}))}},{key:"purge",value:function(t){return this._purgeKey(t.asKey())}},{key:"close",value:function(){var t=this;return this._closed=!0,Promise.all(Object.keys(this._pools).map((function(e){return t._purgeKey(e)})))}},{key:"keepAll",value:function(t){var e=this,n=t.map((function(t){return t.asKey()})),r=Object.keys(this._pools).filter((function(t){return-1===n.indexOf(t)}));return Promise.all(r.map((function(t){return e._purgeKey(t)})))}},{key:"has",value:function(t){return t.asKey()in this._pools}},{key:"activeResourceCount",value:function(t){return this._activeResourceCounts[t.asKey()]||0}},{key:"_acquire",value:(r=(0,o.default)(i.default.mark((function t(e){var n,r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._closed){t.next=2;break}throw(0,c.newError)("Pool is closed, it is no more able to serve requests.");case 2:n=e.asKey(),(r=this._pools[n])||(r=[],this._pools[n]=r);case 5:if(!r.length){t.next=16;break}if(o=r.pop(),!this._validate(o)){t.next=12;break}return this._removeIdleObserver&&this._removeIdleObserver(o),t.abrupt("return",Promise.resolve(o));case 12:return t.next=14,this._destroy(o);case 14:t.next=5;break;case 16:if(!(this._maxSize&&this.activeResourceCount(e)>=this._maxSize)){t.next=18;break}return t.abrupt("return",null);case 18:return t.next=20,this._create(e,this._release);case 20:return t.abrupt("return",t.sent);case 21:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"_release",value:(n=(0,o.default)(i.default.mark((function t(e,n){var r,o,u=this;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.asKey(),!(o=this._pools[r])){t.next=14;break}if(this._validate(n)){t.next=9;break}return this._log.isDebugEnabled()&&this._log.debug("".concat(n," destroyed and can't be released to the pool ").concat(r," because it is not functional")),t.next=7,this._destroy(n);case 7:t.next=12;break;case 9:this._installIdleObserver&&this._installIdleObserver(n,{onError:function(t){u._log.debug("Idle connection ".concat(n," destroyed because of error: ").concat(t));var e=u._pools[r];e&&(u._pools[r]=e.filter((function(t){return t!==n}))),u._destroy(n).catch((function(){}))}}),o.push(n),this._log.isDebugEnabled()&&this._log.debug("".concat(n," released to the pool ").concat(r));case 12:t.next=17;break;case 14:return this._log.isDebugEnabled()&&this._log.debug("".concat(n," destroyed and can't be released to the pool ").concat(r," because pool has been purged")),t.next=17,this._destroy(n);case 17:d(r,this._activeResourceCounts),this._processPendingAcquireRequests(e);case 19:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"_purgeKey",value:(e=(0,o.default)(i.default.mark((function t(e){var n,r;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this._pools[e]||[];case 1:if(!n.length){t.next=8;break}return r=n.pop(),this._removeIdleObserver&&this._removeIdleObserver(r),t.next=6,this._destroy(r);case 6:t.next=1;break;case 8:delete this._pools[e];case 9:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"_processPendingAcquireRequests",value:function(t){var e=this,n=t.asKey(),r=this._acquireRequests[n];if(r){var i=r.shift();i?this._acquire(t).catch((function(t){return i.reject(t),null})).then((function(r){r&&(i.isCompleted()?e._release(t,r):(h(n,e._activeResourceCounts),i.resolve(r)))})):delete this._acquireRequests[n]}}}]),t}();function h(t,e){var n=e[t]||0;e[t]=n+1}function d(t,e){var n=(e[t]||0)-1;n>0?e[t]=n:delete e[t]}var p=function(){function t(e,n,r,i,o){(0,u.default)(this,t),this._key=e,this._resolve=n,this._reject=r,this._timeoutId=i,this._log=o,this._completed=!1}return(0,s.default)(t,[{key:"isCompleted",value:function(){return this._completed}},{key:"resolve",value:function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(t," acquired from the pool ").concat(this._key)),this._resolve(t))}},{key:"reject",value:function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(t))}}]),t}(),v=f;e.default=v},1667:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=r(n(477)),s=n(337),a=(n(229),function(){function t(e){(0,i.default)(this,t),this._connectionProvider=e}return(0,o.default)(t,[{key:"verify",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.database,n=void 0===e?"":e;return c(this._connectionProvider,n)}}]),t}());function c(t,e){var n=new u.default({mode:s.READ,database:e,connectionProvider:t});return n.initializeConnection(),n.getConnection().then((function(t){return n.close().then((function(){return t.server}))})).catch((function(t){return n.close().catch((function(t){})).then((function(){return Promise.reject(t)}))}))}e.default=a},1668:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=n(90),s=function(){function t(e,n,r,o){(0,i.default)(this,t),this._maxRetryTimeMs=a(e,3e4),this._initialRetryDelayMs=a(n,1e3),this._multiplier=a(r,2),this._jitterFactor=a(o,.2),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}return(0,o.default)(t,[{key:"execute",value:function(t,e){var n=this;return new Promise((function(r,i){n._executeTransactionInsidePromise(t,e,r,i)})).catch((function(r){var i=Date.now(),o=n._initialRetryDelayMs;return n._retryTransactionPromise(t,e,r,i,o)}))}},{key:"close",value:function(){this._inFlightTimeoutIds.forEach((function(t){return clearTimeout(t)})),this._inFlightTimeoutIds=[]}},{key:"_retryTransactionPromise",value:function(e,n,r,i,o){var u=this;return Date.now()-i>this._maxRetryTimeMs||!t._canRetryOn(r)?Promise.reject(r):new Promise((function(t,r){var i=u._computeDelayWithJitter(o),s=setTimeout((function(){u._inFlightTimeoutIds=u._inFlightTimeoutIds.filter((function(t){return t!==s})),u._executeTransactionInsidePromise(e,n,t,r)}),i);u._inFlightTimeoutIds.push(s)})).catch((function(t){var r=o*u._multiplier;return u._retryTransactionPromise(e,n,t,i,r)}))}},{key:"_executeTransactionInsidePromise",value:function(t,e,n,r){var i,o=this;try{i=t()}catch(t){return void r(t)}this._safeExecuteTransactionWork(i,e).then((function(t){return o._handleTransactionWorkSuccess(t,i,n,r)})).catch((function(t){return o._handleTransactionWorkFailure(t,i,r)}))}},{key:"_safeExecuteTransactionWork",value:function(t,e){try{var n=e(t);return Promise.resolve(n)}catch(t){return Promise.reject(t)}}},{key:"_handleTransactionWorkSuccess",value:function(t,e,n,r){e.isOpen()?e.commit().then((function(){n(t)})).catch((function(t){r(t)})):n(t)}},{key:"_handleTransactionWorkFailure",value:function(t,e,n){e.isOpen()?e.rollback().catch((function(t){})).then((function(){return n(t)})):n(t)}},{key:"_computeDelayWithJitter",value:function(t){var e=t*this._jitterFactor,n=t-e,r=t+e;return Math.random()*(r-n)+n}},{key:"_verifyAfterConstruction",value:function(){if(this._maxRetryTimeMs<0)throw(0,u.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs);if(this._initialRetryDelayMs<0)throw(0,u.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs);if(this._multiplier<1)throw(0,u.newError)("Multiplier should be >= 1.0: "+this._multiplier);if(this._jitterFactor<0||this._jitterFactor>1)throw(0,u.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor)}}],[{key:"_canRetryOn",value:function(t){return t&&t instanceof u.Neo4jError&&t.code&&(t.code===u.SERVICE_UNAVAILABLE||t.code===u.SESSION_EXPIRED||this._isTransientError(t))}},{key:"_isTransientError",value:function(t){var e=t.code;return e.indexOf("TransientError")>=0&&("Neo.TransientError.Transaction.Terminated"!==e&&"Neo.TransientError.Transaction.LockClientStopped"!==e)}}]),t}();function a(t,e){return t||0===t?t:e}e.default=s},1669:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=n(508),s=n(695),a=r(n(892)),c=(r(n(480)),r(n(1670))),l=n(212),f=r(n(421)),h=r(n(1671)),d=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.session,r=e.config;(0,i.default)(this,t),this._session=n,this._retryLogic=p(r)}return(0,o.default)(t,[{key:"run",value:function(t,e,n){var r=this;return new a.default(new u.Observable((function(i){try{i.next(r._session.run(t,e,n)),i.complete()}catch(t){i.error(t)}return function(){}})))}},{key:"beginTransaction",value:function(t){return this._beginTransaction(this._session._mode,t)}},{key:"readTransaction",value:function(t,e){return this._runTransaction(l.ACCESS_MODE_READ,t,e)}},{key:"writeTransaction",value:function(t,e){return this._runTransaction(l.ACCESS_MODE_WRITE,t,e)}},{key:"close",value:function(){var t=this;return new u.Observable((function(e){t._session.close().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}},{key:"lastBookmark",value:function(){return this._session.lastBookmark()}},{key:"_beginTransaction",value:function(t,e){var n=this,r=f.default.empty();return e&&(r=new f.default(e)),new u.Observable((function(e){try{e.next(new c.default(n._session._beginTransaction(t,r))),e.complete()}catch(t){e.error(t)}return function(){}}))}},{key:"_runTransaction",value:function(t,e,n){f.default.empty();return n&&new f.default(n),this._retryLogic.retry(this._beginTransaction(t,n).pipe((0,s.flatMap)((function(t){return(0,u.defer)((function(){try{return e(t)}catch(t){return(0,u.throwError)(t)}})).pipe((0,s.catchError)((function(e){return t.rollback().pipe((0,s.concat)((0,u.throwError)(e)))})),(0,s.concat)(t.commit()))}))))}}]),t}();function p(t){var e=t&&t.maxTransactionRetryTime?t.maxTransactionRetryTime:null;return new h.default({maxRetryTimeout:e})}e.default=d},167:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.isEmptyObjectOrNull=function(t){if(null===t)return!0;if(!u(t))return!1;for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},e.isObject=u,e.isString=a,e.assertObject=function(t,e){if(!u(t))throw new TypeError(e+" expected to be an object but was: "+JSON.stringify(t));return t},e.assertString=s,e.assertNumber=function(t,e){if("number"!=typeof t)throw new TypeError(e+" expected to be a number but was: "+JSON.stringify(t));return t},e.assertNumberOrInteger=function(t,e){if("number"!=typeof t&&!(0,o.isInt)(t))throw new TypeError(e+" expected to be either a number or an Integer object but was: "+JSON.stringify(t));return t},e.assertValidDate=function(t,e){if("[object Date]"!==Object.prototype.toString.call(t))throw new TypeError(e+" expected to be a standard JavaScript Date but was: "+JSON.stringify(t));if(Number.isNaN(t.getTime()))throw new TypeError(e+" expected to be valid JavaScript Date but its time was NaN: "+JSON.stringify(t));return t},e.validateQueryAndParameters=function(t,e){var n=t,r=e||{};"object"===(0,i.default)(t)&&t.text&&(n=t.text,r=t.parameters||{});return function(t){if(s(t,"Cypher query"),0===t.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")}(n),function(t){if(!u(t)){var e=t.constructor?" "+t.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(e," ").concat(t))}}(r),{validatedQuery:n,params:r}},e.ENCRYPTION_OFF=e.ENCRYPTION_ON=void 0;var i=r(n(195)),o=n(192);e.ENCRYPTION_ON="ENCRYPTION_ON";function u(t){return"object"===(0,i.default)(t)&&!Array.isArray(t)&&null!==t}function s(t,e){if(!a(t))throw new TypeError(e+" expected to be string but was: "+JSON.stringify(t));return t}function a(t){return"[object String]"===Object.prototype.toString.call(t)}e.ENCRYPTION_OFF="ENCRYPTION_OFF"},1670:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=n(508),s=r(n(892)),a=(r(n(891)),function(){function t(e){(0,i.default)(this,t),this._txc=e}return(0,o.default)(t,[{key:"run",value:function(t,e){var n=this;return new s.default(new u.Observable((function(r){try{r.next(n._txc.run(t,e)),r.complete()}catch(t){r.error(t)}return function(){}})))}},{key:"commit",value:function(){var t=this;return new u.Observable((function(e){t._txc.commit().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}},{key:"rollback",value:function(){var t=this;return new u.Observable((function(e){t._txc.rollback().then((function(){e.complete()})).catch((function(t){return e.error(t)}))}))}}]),t}());e.default=a},1671:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=n(90),s=n(508),a=n(695),c=(r(n(651)),function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.maxRetryTimeout,r=void 0===n?3e4:n,o=e.initialDelay,u=void 0===o?1e3:o,s=e.delayMultiplier,a=void 0===s?2:s,c=e.delayJitter,f=void 0===c?.2:c,h=e.logger,d=void 0===h?null:h;(0,i.default)(this,t),this._maxRetryTimeout=l(r,3e4),this._initialDelay=l(u,1e3),this._delayMultiplier=l(a,2),this._delayJitter=l(f,.2),this._logger=d}return(0,o.default)(t,[{key:"retry",value:function(e){var n=this;return e.pipe((0,a.retryWhen)((function(e){var r=[],i=Date.now(),o=1,c=n._initialDelay;return e.pipe((0,a.flatMap)((function(e){if(!t._canRetryOn(e))return(0,s.throwError)(e);if(r.push(e),o>=2&&Date.now()-i>=n._maxRetryTimeout){var l=(0,u.newError)("Failed after retried for ".concat(o," times in ").concat(n._maxRetryTimeout," ms. Make sure that your database is online and retry again."),u.SERVICE_UNAVAILABLE);return l.seenErrors=r,(0,s.throwError)(l)}var f=n._computeNextDelay(c);return c*=n._delayMultiplier,o++,n._logger&&n._logger.warn("Transaction failed and will be retried in ".concat(f)),(0,s.of)(1).pipe((0,a.delay)(f))})))})))}},{key:"_computeNextDelay",value:function(t){var e=t*this._delayJitter;return t-e+2*e*Math.random()}}],[{key:"_canRetryOn",value:function(t){return t&&t.code&&(t.code===u.SERVICE_UNAVAILABLE||t.code===u.SESSION_EXPIRED||this._isTransientError(t))}},{key:"_isTransientError",value:function(t){var e=t.code;return e.indexOf("TransientError")>=0&&("Neo.TransientError.Transaction.Terminated"!==e&&"Neo.TransientError.Transaction.LockClientStopped"!==e)}}]),t}());function l(t,e){return t||0===t?t:e}e.default=c},1672:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=r(n(18)),s=r(n(17)),a=r(n(19)),c=n(337),l=(n(90),r(n(1673))),f=(r(n(897)),r(n(652)),r(n(1682)));function h(t){var e=t.resolver;if(e&&"function"!=typeof e)throw new TypeError("Configured resolver should be a function. Got: ".concat(e));return t}var d=function(t){function e(t,n,r){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return(0,i.default)(this,e),(o=(0,u.default)(this,(0,s.default)(e).call(this,t,r,a,h(c))))._routingContext=n,o}return(0,a.default)(e,t),(0,o.default)(e,[{key:"_afterConstruction",value:function(){this._log.info("Routing driver ".concat(this._id," created for server address ").concat(this._address))}},{key:"_createConnectionProvider",value:function(t,e,n){return new l.default({id:this._id,address:t,routingContext:this._routingContext,hostNameResolver:(r=this._config,new f.default(r.resolver)),config:this._config,log:this._log,userAgent:e,authToken:n});var r}}]),e}(c.Driver);e.default=d},1673:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(268)),o=r(n(269)),u=r(n(12)),s=r(n(13)),a=r(n(18)),c=r(n(17)),l=r(n(19)),f=n(90),h=n(337),d=r(n(480)),p=r(n(893)),v=r(n(1677)),_=r(n(894)),b=n(336),y=r(n(1679)),m=n(895),g=r(n(885)),w=r(n(652)),k=r(n(890)),E=r(n(897)),S=r(n(267)),O=r(n(648)),x=n(192),I=n(212),T=(0,x.int)(3e4),C=function(t){function e(t){var n,r=t.id,i=t.address,o=t.routingContext,s=t.hostNameResolver,l=t.config,f=t.log,h=t.userAgent,d=t.authToken,p=t.routingTablePurgeDelay;return(0,u.default)(this,e),(n=(0,a.default)(this,(0,c.default)(e).call(this,{id:r,config:l,log:f,userAgent:h,authToken:d})))._seedRouter=i,n._routingTables={},n._rediscovery=new v.default(new _.default(o)),n._loadBalancingStrategy=new E.default(n._connectionPool),n._hostNameResolver=s,n._dnsResolver=new b.HostNameResolver,n._log=f,n._useSeedRouter=!0,n._routingTablePurgeDelay=p?(0,x.int)(p):T,n}var n,r,g,C,N,R,P,j,A,U;return(0,l.default)(e,t),(0,s.default)(e,[{key:"_createConnectionErrorHandler",value:function(){return new w.default(f.SESSION_EXPIRED)}},{key:"_handleUnavailability",value:function(t,e,n){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(e," for database '").concat(n,"' because of an error ").concat(t.code," '").concat(t.message,"'")),this.forget(e,n||""),t}},{key:"_handleWriteFailure",value:function(t,e,n){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(e," for database '").concat(n,"' because of an error ").concat(t.code," '").concat(t.message,"'")),this.forgetWriter(e,n||""),(0,f.newError)("No longer possible to write to server at "+e,f.SESSION_EXPIRED)}},{key:"acquireConnection",value:(U=(0,o.default)(i.default.mark((function t(){var e,n,r,o,u,s,a,c,l,d=this,p=arguments;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=p.length>0&&void 0!==p[0]?p[0]:{},n=e.accessMode,r=e.database,o=e.bookmark,a=new w.default(f.SESSION_EXPIRED,(function(t,e){return d._handleUnavailability(t,e,r)}),(function(t,e){return d._handleWriteFailure(t,e,r)})),t.next=4,this._freshRoutingTable({accessMode:n,database:r||"",bookmark:o});case 4:if(c=t.sent,n!==h.READ){t.next=10;break}s=this._loadBalancingStrategy.selectReader(c.readers),u="read",t.next=16;break;case 10:if(n!==h.WRITE){t.next=15;break}s=this._loadBalancingStrategy.selectWriter(c.writers),u="write",t.next=16;break;case 15:throw(0,f.newError)("Illegal mode "+n);case 16:if(s){t.next=18;break}throw(0,f.newError)("Failed to obtain connection towards ".concat(u," server. Known routing table is: ").concat(c),f.SESSION_EXPIRED);case 18:return t.prev=18,t.next=21,this._acquireConnectionToServer(s,u,c);case 21:return l=t.sent,t.abrupt("return",new k.default(l,a));case 25:throw t.prev=25,t.t0=t.catch(18),a.handleAndTransformError(t.t0,s);case 29:case"end":return t.stop()}}),t,this,[[18,25]])}))),function(){return U.apply(this,arguments)})},{key:"supportsMultiDb",value:(A=(0,o.default)(i.default.mark((function t(){var e,n,r,o,u;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._resolveSeedRouter(this._seedRouter);case 2:e=t.sent,r=0;case 4:if(!(r=I.BOLT_PROTOCOL_V4);case 12:return t.abrupt("return",!1);case 15:t.prev=15,t.t0=t.catch(6),n=t.t0;case 18:return t.prev=18,t.next=21,o.close();case 21:return t.finish(18);case 22:r++,t.next=4;break;case 25:if(!n){t.next=27;break}throw n;case 27:return t.abrupt("return",!1);case 28:case"end":return t.stop()}}),t,this,[[6,15,18,22]])}))),function(){return A.apply(this,arguments)})},{key:"forget",value:function(t,e){e||""===e?this._routingTables[e].forget(t):Object.values(this._routingTables).forEach((function(e){return e.forget(t)})),this._connectionPool.purge(t).catch((function(){}))}},{key:"forgetWriter",value:function(t,e){e||""===e?this._routingTables[e].forgetWriter(t):Object.values(this._routingTables).forEach((function(e){return e.forgetWriter(t)}))}},{key:"_acquireConnectionToServer",value:function(t,e,n){return this._connectionPool.acquire(t)}},{key:"_freshRoutingTable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.accessMode,n=t.database,r=t.bookmark,i=this._routingTables[n]||new p.default({database:n});return i.isStaleFor(e)?(this._log.info('Routing table is stale for database: "'.concat(n,'" and access mode: "').concat(e,'": ').concat(i)),this._refreshRoutingTable(i,r)):i}},{key:"_refreshRoutingTable",value:function(t,e){var n=t.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(n,t,e):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(n,t,e)}},{key:"_fetchRoutingTableFromSeedRouterFallbackToKnownRouters",value:(j=(0,o.default)(i.default.mark((function t(e,n,r){var o,u;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=[],t.next=3,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,n,r);case 3:if(!(u=t.sent)){t.next=8;break}this._useSeedRouter=!1,t.next=11;break;case 8:return t.next=10,this._fetchRoutingTableUsingKnownRouters(e,n,r);case 10:u=t.sent;case 11:return t.next=13,this._applyRoutingTableIfPossible(n,u);case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return j.apply(this,arguments)})},{key:"_fetchRoutingTableFromKnownRoutersFallbackToSeedRouter",value:(P=(0,o.default)(i.default.mark((function t(e,n,r){var o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._fetchRoutingTableUsingKnownRouters(e,n,r);case 2:if(o=t.sent){t.next=7;break}return t.next=6,this._fetchRoutingTableUsingSeedRouter(e,this._seedRouter,n,r);case 6:o=t.sent;case 7:return t.next=9,this._applyRoutingTableIfPossible(n,o);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return P.apply(this,arguments)})},{key:"_fetchRoutingTableUsingKnownRouters",value:(R=(0,o.default)(i.default.mark((function t(n,r,o){var u,s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._fetchRoutingTable(n,r,o);case 2:if(!(u=t.sent)){t.next=5;break}return t.abrupt("return",u);case 5:return s=n.length-1,e._forgetRouter(r,n,s),t.abrupt("return",null);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return R.apply(this,arguments)})},{key:"_fetchRoutingTableUsingSeedRouter",value:(N=(0,o.default)(i.default.mark((function t(e,n,r,o){var u,s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._resolveSeedRouter(n);case 2:return u=t.sent,s=u.filter((function(t){return e.indexOf(t)<0})),t.next=6,this._fetchRoutingTable(s,r,o);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,n,r){return N.apply(this,arguments)})},{key:"_resolveSeedRouter",value:(C=(0,o.default)(i.default.mark((function t(e){var n,r,o=this;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._hostNameResolver.resolve(e);case 2:return n=t.sent,t.next=5,Promise.all(n.map((function(t){return o._dnsResolver.resolve(t)})));case 5:return r=t.sent,t.abrupt("return",[].concat.apply([],r));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return C.apply(this,arguments)})},{key:"_fetchRoutingTable",value:function(t,n,r){var u=this;return t.reduce(function(){var s=(0,o.default)(i.default.mark((function o(s,a,c){var l,f,h;return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,s;case 2:if(!(l=i.sent)){i.next=7;break}return i.abrupt("return",l);case 7:f=c-1,e._forgetRouter(n,t,f);case 9:return i.next=11,u._createSessionForRediscovery(a,r);case 11:if(!(h=i.sent)){i.next=27;break}return i.prev=13,i.next=16,u._rediscovery.lookupRoutingTableOnRouter(h,n.database,a);case 16:return i.abrupt("return",i.sent);case 19:if(i.prev=19,i.t0=i.catch(13),!i.t0||"Neo.ClientError.Database.DatabaseNotFound"!==i.t0.code){i.next=23;break}throw i.t0;case 23:return u._log.warn("unable to fetch routing table because of an error ".concat(i.t0)),i.abrupt("return",null);case 25:i.next=28;break;case 27:return i.abrupt("return",null);case 28:case"end":return i.stop()}}),o,null,[[13,19]])})));return function(t,e,n){return s.apply(this,arguments)}}(),Promise.resolve(null))}},{key:"_createSessionForRediscovery",value:(g=(0,o.default)(i.default.mark((function t(e,n){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._connectionPool.acquire(e);case 3:if(r=t.sent,o=new y.default(r),!(m.ServerVersion.fromString(r.version).compareTo(m.VERSION_4_0_0)<0)){t.next=8;break}return t.abrupt("return",new d.default({mode:h.WRITE,bookmark:S.default.empty(),connectionProvider:o}));case 8:return t.abrupt("return",new d.default({mode:h.READ,database:"system",bookmark:n,connectionProvider:o}));case 11:if(t.prev=11,t.t0=t.catch(0),!t.t0||"Neo.ClientError.Security.Unauthorized"!==t.t0.code){t.next=15;break}throw t.t0;case 15:return t.abrupt("return",null);case 16:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(t,e){return g.apply(this,arguments)})},{key:"_applyRoutingTableIfPossible",value:(r=(0,o.default)(i.default.mark((function t(e,n){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}throw(0,f.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(e),f.SERVICE_UNAVAILABLE);case 2:return 0===n.writers.length&&(this._useSeedRouter=!0),t.next=5,this._updateRoutingTable(n);case 5:return t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"_updateRoutingTable",value:(n=(0,o.default)(i.default.mark((function t(e){var n=this;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._connectionPool.keepAll(e.allServers());case 2:Object.values(this._routingTables).forEach((function(t){t.isExpiredFor(n._routingTablePurgeDelay)&&delete n._routingTables[t.database]})),this._routingTables[e.database]=e,this._log.info("Updated routing table ".concat(e));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})}],[{key:"_forgetRouter",value:function(t,e,n){var r=e[n];t&&r&&t.forgetRouter(r)}}]),e}(g.default);e.default=C},1677:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(268)),o=r(n(269)),u=r(n(12)),s=r(n(13)),a=r(n(893)),c=(r(n(894)),n(90)),l=function(){function t(e){(0,u.default)(this,t),this._routingUtil=e}var e;return(0,s.default)(t,[{key:"lookupRoutingTableOnRouter",value:(e=(0,o.default)(i.default.mark((function e(n,r,o){var u,s,l,f,h,d,p;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._routingUtil.callRoutingProcedure(n,r,o);case 2:if(null!==(u=e.sent)){e.next=5;break}return e.abrupt("return",null);case 5:if(1===u.length){e.next=7;break}throw(0,c.newError)('Illegal response from router "'+o+'". Received '+u.length+" records but expected only one.\n"+JSON.stringify(u),c.PROTOCOL_ERROR);case 7:return s=u[0],l=this._routingUtil.parseTtl(s,o),f=this._routingUtil.parseServers(s,o),h=f.routers,d=f.readers,p=f.writers,t._assertNonEmpty(h,"routers",o),t._assertNonEmpty(d,"readers",o),e.abrupt("return",new a.default({database:r,routers:h,readers:d,writers:p,expirationTime:l}));case 13:case"end":return e.stop()}}),e,this)}))),function(t,n,r){return e.apply(this,arguments)})}],[{key:"_assertNonEmpty",value:function(t,e,n){if(0===t.length)throw(0,c.newError)("Received no "+e+" from router "+n,c.PROTOCOL_ERROR)}}]),t}();e.default=l},1679:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=r(n(18)),s=r(n(17)),a=r(n(19)),c=function(t){function e(t){var n;return(0,i.default)(this,e),(n=(0,u.default)(this,(0,s.default)(e).call(this)))._connection=t,n}return(0,a.default)(e,t),(0,o.default)(e,[{key:"acquireConnection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(t.accessMode,t.database,t.bookmarks,this._connection);return this._connection=null,Promise.resolve(e)}}]),e}(r(n(647)).default);e.default=c},1680:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=function(){function t(e){(0,i.default)(this,t),this._offset=e||0}return(0,o.default)(t,[{key:"next",value:function(t){if(0===t)return-1;var e=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),e%t}}]),t}();e.default=u},1681:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=function(){function t(){(0,i.default)(this,t)}return(0,o.default)(t,[{key:"selectReader",value:function(t){throw new Error("Abstract function")}},{key:"selectWriter",value:function(t){throw new Error("Abstract function")}}]),t}();e.default=u},1682:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=r(n(653));function s(t){return Promise.resolve([t])}var a=function(){function t(e){(0,i.default)(this,t),this._resolverFunction=e||s}return(0,o.default)(t,[{key:"resolve",value:function(t){var e=this;return new Promise((function(n){return n(e._resolverFunction(t.asHostPort()))})).then((function(t){if(!Array.isArray(t))throw new TypeError("Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses."+"Each address is ':'. Got: ".concat(t));return t.map((function(t){return u.default.fromUrl(t)}))}))}}]),t}();e.default=a},1683:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default="0.0.0-dev"},171:function(t,e,n){"use strict";function r(){}n.d(e,"a",(function(){return r}))},178:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(7),i=n(22);function o(t,e){return function(n){return n.lift(new u(t,e))}}var u=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.a)},180:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return s}));var r,i=n(120),o=n(278),u=n(347);r||(r={});var s=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Object(o.a)(this.value);case"E":return Object(u.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},187:function(t,e,n){"use strict";function r(t){return t}n.d(e,"a",(function(){return r}))},189:function(t,e,n){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return i}));var i=r()},192:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=void 0;var i=r(n(12)),o=r(n(13)),u=n(90),s=function(){function t(e,n){(0,i.default)(this,t),this.low=0|e,this.high=0|n}return(0,o.default)(t,[{key:"inSafeRange",value:function(){return this.greaterThanOrEqual(t.MIN_SAFE_VALUE)&&this.lessThanOrEqual(t.MAX_SAFE_VALUE)}},{key:"toInt",value:function(){return this.low}},{key:"toNumber",value:function(){return this.high*c+(this.low>>>0)}},{key:"toNumberOrInfinity",value:function(){return this.lessThan(t.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(t.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()}},{key:"toString",value:function(e){if((e=e||10)<2||e>36)throw RangeError("radix out of range: "+e);if(this.isZero())return"0";var n;if(this.isNegative()){if(this.equals(t.MIN_VALUE)){var r=t.fromNumber(e),i=this.div(r);return n=i.multiply(r).subtract(this),i.toString(e)+n.toInt().toString(e)}return"-"+this.negate().toString(e)}var o=t.fromNumber(Math.pow(e,6));n=this;for(var u="";;){var s=n.div(o),a=(n.subtract(s.multiply(o)).toInt()>>>0).toString(e);if((n=s).isZero())return a+u;for(;a.length<6;)a="0"+a;u=""+a+u}}},{key:"getHighBits",value:function(){return this.high}},{key:"getLowBits",value:function(){return this.low}},{key:"getNumBitsAbs",value:function(){if(this.isNegative())return this.equals(t.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,n=31;n>0&&0==(e&1<=0}},{key:"isOdd",value:function(){return 1==(1&this.low)}},{key:"isEven",value:function(){return 0==(1&this.low)}},{key:"equals",value:function(e){return t.isInteger(e)||(e=t.fromValue(e)),this.high===e.high&&this.low===e.low}},{key:"notEquals",value:function(t){return!this.equals(t)}},{key:"lessThan",value:function(t){return this.compare(t)<0}},{key:"lessThanOrEqual",value:function(t){return this.compare(t)<=0}},{key:"greaterThan",value:function(t){return this.compare(t)>0}},{key:"greaterThanOrEqual",value:function(t){return this.compare(t)>=0}},{key:"compare",value:function(e){if(t.isInteger(e)||(e=t.fromValue(e)),this.equals(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.subtract(e).isNegative()?-1:1}},{key:"negate",value:function(){return this.equals(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)}},{key:"add",value:function(e){t.isInteger(e)||(e=t.fromValue(e));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,u=e.high>>>16,s=65535&e.high,a=e.low>>>16,c=0,l=0,f=0,h=0;return f+=(h+=o+(65535&e.low))>>>16,h&=65535,l+=(f+=i+a)>>>16,f&=65535,c+=(l+=r+s)>>>16,l&=65535,c+=n+u,c&=65535,t.fromBits(f<<16|h,c<<16|l)}},{key:"subtract",value:function(e){return t.isInteger(e)||(e=t.fromValue(e)),this.add(e.negate())}},{key:"multiply",value:function(e){if(this.isZero())return t.ZERO;if(t.isInteger(e)||(e=t.fromValue(e)),e.isZero())return t.ZERO;if(this.equals(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.equals(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate();if(e.isNegative())return this.multiply(e.negate()).negate();if(this.lessThan(f)&&e.lessThan(f))return t.fromNumber(this.toNumber()*e.toNumber());var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,u=e.high>>>16,s=65535&e.high,a=e.low>>>16,c=65535&e.low,l=0,h=0,d=0,p=0;return d+=(p+=o*c)>>>16,p&=65535,h+=(d+=i*c)>>>16,d&=65535,h+=(d+=o*a)>>>16,d&=65535,l+=(h+=r*c)>>>16,h&=65535,l+=(h+=i*a)>>>16,h&=65535,l+=(h+=o*s)>>>16,h&=65535,l+=n*c+r*a+i*s+o*u,l&=65535,t.fromBits(d<<16|p,l<<16|h)}},{key:"div",value:function(e){if(t.isInteger(e)||(e=t.fromValue(e)),e.isZero())throw(0,u.newError)("division by zero");if(this.isZero())return t.ZERO;var n,r,i;if(this.equals(t.MIN_VALUE))return e.equals(t.ONE)||e.equals(t.NEG_ONE)?t.MIN_VALUE:e.equals(t.MIN_VALUE)?t.ONE:(n=this.shiftRight(1).div(e).shiftLeft(1)).equals(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(r=this.subtract(e.multiply(n)),i=n.add(r.div(e)));if(e.equals(t.MIN_VALUE))return t.ZERO;if(this.isNegative())return e.isNegative()?this.negate().div(e.negate()):this.negate().div(e).negate();if(e.isNegative())return this.div(e.negate()).negate();for(i=t.ZERO,r=this;r.greaterThanOrEqual(e);){n=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(n)/Math.LN2),s=o<=48?1:Math.pow(2,o-48),a=t.fromNumber(n),c=a.multiply(e);c.isNegative()||c.greaterThan(r);)n-=s,c=(a=t.fromNumber(n)).multiply(e);a.isZero()&&(a=t.ONE),i=i.add(a),r=r.subtract(c)}return i}},{key:"modulo",value:function(e){return t.isInteger(e)||(e=t.fromValue(e)),this.subtract(this.div(e).multiply(e))}},{key:"not",value:function(){return t.fromBits(~this.low,~this.high)}},{key:"and",value:function(e){return t.isInteger(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high)}},{key:"or",value:function(e){return t.isInteger(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high)}},{key:"xor",value:function(e){return t.isInteger(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high)}},{key:"shiftLeft",value:function(e){return t.isInteger(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?t.fromBits(this.low<>>32-e):t.fromBits(0,this.low<>>e|this.high<<32-e,this.high>>e):t.fromBits(this.high>>e-32,this.high>=0?0:-1)}}]),t}();s.__isInteger__=!0,Object.defineProperty(s.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1}),s.isInteger=function(t){return!0===(t&&t.__isInteger__)};var a={};s.fromInt=function(t){var e,n;return(t|=0)>=-128&&t<128&&(n=a[t])?n:(e=new s(t,t<0?-1:0,!1),t>=-128&&t<128&&(a[t]=e),e)},s.fromNumber=function(t){return isNaN(t)||!isFinite(t)?s.ZERO:t<=-l?s.MIN_VALUE:t+1>=l?s.MAX_VALUE:t<0?s.fromNumber(-t).negate():new s(t%c|0,t/c|0)},s.fromBits=function(t,e){return new s(t,e)},s.fromString=function(t,e){if(0===t.length)throw(0,u.newError)("number format error: empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return s.ZERO;if((e=e||10)<2||e>36)throw(0,u.newError)("radix out of range: "+e);var n;if((n=t.indexOf("-"))>0)throw(0,u.newError)('number format error: interior "-" character: '+t);if(0===n)return s.fromString(t.substring(1),e).negate();for(var r=s.fromNumber(Math.pow(e,8)),i=s.ZERO,o=0;o0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.a)},217:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},219:function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.d(e,"a",(function(){return r}))},22:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(7),i=n(219),o=n(390),u=n(58),s=n(323),a=n(160),c=n(255),l=function(t){function e(n,r,i){var u=t.call(this)||this;switch(u.syncErrorValue=null,u.syncErrorThrown=!1,u.syncErrorThrowable=!1,u.isStopped=!1,arguments.length){case 0:u.destination=o.a;break;case 1:if(!n){u.destination=o.a;break}if("object"==typeof n){n instanceof e?(u.syncErrorThrowable=n.syncErrorThrowable,u.destination=n,n.add(u)):(u.syncErrorThrowable=!0,u.destination=new f(u,n));break}default:u.syncErrorThrowable=!0,u.destination=new f(u,n,r,i)}return u}return r.__extends(e,t),e.prototype[s.a]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(u.a),f=function(t){function e(e,n,r,u){var s,a=t.call(this)||this;a._parentSubscriber=e;var c=a;return Object(i.a)(n)?s=n:n&&(s=n.next,r=n.error,u=n.complete,n!==o.a&&(c=Object.create(n),Object(i.a)(c.unsubscribe)&&a.add(c.unsubscribe.bind(c)),c.unsubscribe=a.unsubscribe.bind(a))),a._context=c,a._next=s,a._error=r,a._complete=u,a}return r.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=a.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(c.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(c.a)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw t;Object(c.a)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return a.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(Object(c.a)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},229:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.CompletedObserver=e.FailedObserver=e.ResetObserver=e.LoginObserver=e.ResultStreamObserver=e.StreamObserver=void 0;var i=r(n(3)),o=r(n(344)),u=r(n(18)),s=r(n(17)),a=r(n(19)),c=r(n(12)),l=r(n(13)),f=r(n(644)),h=(r(n(478)),n(90)),d=(r(n(192)),n(420)),p=function(){function t(){(0,c.default)(this,t)}return(0,l.default)(t,[{key:"onNext",value:function(t){}},{key:"onError",value:function(t){}},{key:"onCompleted",value:function(t){}}]),t}();e.StreamObserver=p;var v=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.connection,i=n.reactive,o=void 0!==i&&i,a=n.moreFunction,l=n.discardFunction,f=n.fetchSize,h=void 0===f?d.ALL:f,p=n.beforeError,v=n.afterError,_=n.beforeKeys,b=n.afterKeys,y=n.beforeComplete,m=n.afterComplete;return(0,c.default)(this,e),(t=(0,u.default)(this,(0,s.default)(e).call(this)))._connection=r,t._reactive=o,t._streaming=!1,t._fieldKeys=null,t._fieldLookup=null,t._head=null,t._queuedRecords=[],t._tail=null,t._error=null,t._hasFailed=!1,t._observers=[],t._meta={},t._beforeError=p,t._afterError=v,t._beforeKeys=_,t._afterKeys=b,t._beforeComplete=y,t._afterComplete=m,t._queryId=null,t._moreFunction=a,t._discardFunction=l,t._discard=!1,t._fetchSize=h,t._finished=!1,t}return(0,a.default)(e,t),(0,l.default)(e,[{key:"onNext",value:function(t){var e=new f.default(this._fieldKeys,t,this._fieldLookup);this._observers.some((function(t){return t.onNext}))?this._observers.forEach((function(t){t.onNext&&t.onNext(e)})):this._queuedRecords.push(e)}},{key:"onCompleted",value:function(t){var e=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},t.fields&&t.fields.length>0){this._fieldKeys=t.fields;for(var n=0;n0&&t.onNext)for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{},r=n.connection,i=n.beforeError,o=n.afterError,a=n.beforeComplete,l=n.afterComplete;return(0,c.default)(this,e),(t=(0,u.default)(this,(0,s.default)(e).call(this)))._connection=r,t._beforeError=i,t._afterError=o,t._beforeComplete=a,t._afterComplete=l,t}return(0,a.default)(e,t),(0,l.default)(e,[{key:"onNext",value:function(t){this.onError((0,h.newError)("Received RECORD when initializing "+JSON.stringify(t)))}},{key:"onError",value:function(t){this._beforeError&&this._beforeError(t),this._connection._updateCurrentObserver(),this._connection._handleFatalError(t),this._afterError&&this._afterError(t)}},{key:"onCompleted",value:function(t){if(this._beforeComplete&&this._beforeComplete(t),t){var e=t.server;this._connection.version||(this._connection.version=e);var n=t.connection_id;this._connection.databaseId||(this._connection.databaseId=n)}this._afterComplete&&this._afterComplete(t)}}]),e}(p);e.LoginObserver=_;var b=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.connection,i=n.onError,o=n.onComplete;return(0,c.default)(this,e),(t=(0,u.default)(this,(0,s.default)(e).call(this)))._connection=r,t._onError=i,t._onComplete=o,t}return(0,a.default)(e,t),(0,l.default)(e,[{key:"onNext",value:function(t){this.onError((0,h.newError)("Received RECORD when resetting: received record is: "+JSON.stringify(t),h.PROTOCOL_ERROR))}},{key:"onError",value:function(t){t.code===h.PROTOCOL_ERROR&&this._connection._handleProtocolError(t.message),this._onError&&this._onError(t)}},{key:"onCompleted",value:function(t){this._onComplete&&this._onComplete(t)}}]),e}(p);e.ResetObserver=b;var y=function(t){function e(t){var n,r=t.error,i=t.onError;return(0,c.default)(this,e),(n=(0,u.default)(this,(0,s.default)(e).call(this,{beforeError:i}))).onError(r),n}return(0,a.default)(e,t),e}(v);e.FailedObserver=y;var m=function(t){function e(){var t;return(0,c.default)(this,e),t=(0,u.default)(this,(0,s.default)(e).call(this)),(0,o.default)((0,s.default)(e.prototype),"markCompleted",(0,i.default)(t)).call((0,i.default)(t)),t}return(0,a.default)(e,t),e}(v);e.CompletedObserver=m},232:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}()},234:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(35),i=n(550),o=n(368);function u(t,e){return e?Object(o.a)(t,e):new r.a(Object(i.a)(t))}},235:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(7),i=n(439),o=function(t){function e(n,r){void 0===r&&(r=i.a.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.__extends(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.a)},236:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(7),i=n(73),o=n(58),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.a.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(i.a)},241:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(7),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.__extends(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(58).a))},242:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(81);function i(t){return!Object(r.a)(t)&&t-parseFloat(t)+1>=0}},251:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(278),i=n(515);function o(){for(var t=[],e=0;e2&&void 0!==arguments[2]?arguments[2]:void 0;return n?{scheme:"basic",principal:t,credentials:e,realm:n}:{scheme:"basic",principal:t,credentials:e}},kerberos:function(t){return{scheme:"kerberos",principal:"",credentials:t}},custom:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return i?{scheme:r,principal:t,credentials:e,realm:n,parameters:i}:{scheme:r,principal:t,credentials:e,realm:n}}};e.auth=m;var g="neo4j-javascript/"+d.default,w={console:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return{level:e,logger:function(e,n){return console.log("".concat(t.Date.now()," ").concat(e.toUpperCase()," ").concat(n))}}}))};function k(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,p.assertString)(t,"Bolt URL");var r=v.default.parseDatabaseUrl(t);if("neo4j"===r.scheme)return new h.default(y.default.fromUrl(r.hostAndPort),r.query,g,e,n);if("bolt"===r.scheme){if(!(0,p.isEmptyObjectOrNull)(r.query))throw new Error("Parameters are not supported with scheme 'bolt'. Given URL: '".concat(t,"'"));return new f.Driver(y.default.fromUrl(r.hostAndPort),g,e,n)}throw new Error("Unknown scheme: ".concat(r.scheme))}e.logging=w;var E={Node:u.Node,Relationship:u.Relationship,UnboundRelationship:u.UnboundRelationship,PathSegment:u.PathSegment,Path:u.Path,Result:a.default,ResultSummary:c.default,Record:l.default,Point:_.Point,Date:b.Date,DateTime:b.DateTime,Duration:b.Duration,LocalDateTime:b.LocalDateTime,LocalTime:b.LocalTime,Time:b.Time,Integer:o.default};e.types=E;var S={READ:f.READ,WRITE:f.WRITE};e.session=S;var O={SERVICE_UNAVAILABLE:s.SERVICE_UNAVAILABLE,SESSION_EXPIRED:s.SESSION_EXPIRED,PROTOCOL_ERROR:s.PROTOCOL_ERROR};e.error=O;var x={toNumber:o.toNumber,toString:o.toString,inSafeRange:o.inSafeRange};e.integer=x;var I={isPoint:_.isPoint};e.spatial=I;var T={isDuration:b.isDuration,isLocalTime:b.isLocalTime,isTime:b.isTime,isDate:b.isDate,isLocalDateTime:b.isLocalDateTime,isDateTime:b.isDateTime};e.temporal=T;var C={driver:k,int:o.int,isInt:o.isInt,isPoint:_.isPoint,isDuration:b.isDuration,isLocalTime:b.isLocalTime,isTime:b.isTime,isDate:b.isDate,isLocalDateTime:b.isLocalDateTime,isDateTime:b.isDateTime,integer:x,Neo4jError:s.Neo4jError,auth:m,logging:w,types:E,session:S,error:O,spatial:I,temporal:T};e.default=C}).call(this,n(109))},336:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.utf8=e.HostNameResolver=e.Channel=e.alloc=void 0;var i=r(n(646)),o=r(n(1652)),u=r(n(1653)),s=r(n(1655));e.alloc=function(t){return new i.default(t)};var a=o.default;e.Channel=a;var c=u.default;e.HostNameResolver=c;var l=s.default;e.utf8=l},337:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.WRITE=e.READ=e.Driver=void 0;var i=r(n(12)),o=r(n(13)),u=n(90),s=(r(n(647)),r(n(267))),a=r(n(1658)),c=r(n(1667)),l=n(212),f=r(n(651)),h=n(650),d=r(n(480)),p=r(n(1669)),v=n(420),_=l.ACCESS_MODE_READ;e.READ=_;var b=l.ACCESS_MODE_WRITE;e.WRITE=b;var y=0,m=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,i.default)(this,t),g(o),this._id=y++,this._address=e,this._userAgent=n,this._authToken=r,this._config=o,this._log=f.default.create(o),this._connectionProvider=null,this._afterConstruction()}return(0,o.default)(t,[{key:"verifyConnectivity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.database,n=void 0===e?"":e,r=this._getOrCreateConnectionProvider(),i=new c.default(r);return i.verify({database:n})}},{key:"supportsMultiDb",value:function(){return this._getOrCreateConnectionProvider().supportsMultiDb()}},{key:"session",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.defaultAccessMode,n=void 0===e?b:e,r=t.bookmarks,i=t.database,o=void 0===i?"":i,u=t.fetchSize;return this._newSession({defaultAccessMode:n,bookmarkOrBookmarks:r,database:o,reactive:!1,fetchSize:k(u,this._config.fetchSize)})}},{key:"rxSession",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.defaultAccessMode,n=void 0===e?b:e,r=t.bookmarks,i=t.database,o=void 0===i?"":i,u=t.fetchSize;return new p.default({session:this._newSession({defaultAccessMode:n,bookmarks:r,database:o,reactive:!0,fetchSize:k(u,this._config.fetchSize)}),config:this._config})}},{key:"close",value:function(){return this._log.info("Driver ".concat(this._id," closing")),this._connectionProvider?this._connectionProvider.close():Promise.resolve()}},{key:"_afterConstruction",value:function(){this._log.info("Direct driver ".concat(this._id," created for server address ").concat(this._address))}},{key:"_createConnectionProvider",value:function(t,e,n){return new a.default({id:this._id,config:this._config,log:this._log,address:t,userAgent:e,authToken:n})}},{key:"_newSession",value:function(e){var n=e.defaultAccessMode,r=e.bookmarkOrBookmarks,i=e.database,o=e.reactive,u=e.fetchSize,a=t._validateSessionMode(n),c=this._getOrCreateConnectionProvider(),l=r?new s.default(r):s.default.empty();return new d.default({mode:a,database:i,connectionProvider:c,bookmark:l,config:this._config,reactive:o,fetchSize:u})}},{key:"_getOrCreateConnectionProvider",value:function(){return this._connectionProvider||(this._connectionProvider=this._createConnectionProvider(this._address,this._userAgent,this._authToken)),this._connectionProvider}}],[{key:"_validateSessionMode",value:function(t){var e=t||b;if(e!==l.ACCESS_MODE_READ&&e!==l.ACCESS_MODE_WRITE)throw(0,u.newError)("Illegal session mode "+e);return e}}]),t}();function g(t){t.maxConnectionLifetime=w(t.maxConnectionLifetime,36e5),t.maxConnectionPoolSize=w(t.maxConnectionPoolSize,h.DEFAULT_MAX_SIZE),t.connectionAcquisitionTimeout=w(t.connectionAcquisitionTimeout,h.DEFAULT_ACQUISITION_TIMEOUT),t.fetchSize=k(t.fetchSize,1e3)}function w(t,e){var n=parseInt(t,10);return n>0||0===n?n:n<0?Number.MAX_SAFE_INTEGER:e}function k(t,e){var n=parseInt(t,10);if(n>0||n===v.ALL)return n;if(0===n||n<0)throw new Error("The fetch size can only be a positive value or -1 for ALL. However fetchSize = "+n);return e}e.Driver=m;var E=m;e.default=E},345:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(7),i=n(22);function o(){return function(t){return t.lift(new u(t))}}var u=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new s(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.__extends(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.a)},346:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(7),i=n(73),o=n(541),u=n(58),s=n(513),a=n(203),c=n(549),l=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.__extends(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new f(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new a.a;if(this.isStopped||this.hasError?e=u.a.EMPTY:(this.observers.push(t),e=new c.a(this,t)),i&&t.add(t=new s.a(t,i)),n)for(var l=0;le&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.a),f=function(){return function(t,e){this.time=t,this.value=e}}()},347:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(35);function i(t,e){return e?new r.a((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e)}},348:function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return f}));var r=n(7),i=n(112),o=n(81),u=n(43),s=n(42),a=n(234),c={};function l(){for(var t=[],e=0;ethis.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),v=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.__extends(e,t),e.prototype[c.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return Object(a.a)(this,this.observable,this,e)},e}(s.a)},366:function(t,e,n){"use strict";function r(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return r}))},367:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(22);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.a?i:null}return!0}},368:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(35),i=n(58);function o(t,e){return new r.a((function(n){var r=new i.a,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},386:function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(7),i=1,o=function(){return Promise.resolve()}(),u={};function s(t){return t in u&&(delete u[t],!0)}var a=function(t){var e=i++;return u[e]=!0,o.then((function(){return s(e)&&t()})),e},c=function(t){s(t)},l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.__extends(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=a(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(c(n),e.scheduled=void 0)},e}(n(241).a),f=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r0&&void 0!==arguments[0]?arguments[0]:{},n=e.bookmark,r=e.txConfig,i=e.database,o=e.mode,u=l(n,r,i,o);return new t(17,[u],(function(){return"BEGIN ".concat(JSON.stringify(u))}))}},{key:"commit",value:function(){return p}},{key:"rollback",value:function(){return v}},{key:"runWithMetadata",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.bookmark,o=r.txConfig,u=r.database,s=r.mode,a=l(i,o,u,s);return new t(16,[e,n,a],(function(){return"RUN ".concat(e," ").concat(JSON.stringify(n)," ").concat(JSON.stringify(a))}))}},{key:"goodbye",value:function(){return _}},{key:"pull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.stmtId,r=void 0===n?-1:n,i=e.n,o=void 0===i?-1:i,u=f(r||-1,o||-1);return new t(63,[u],(function(){return"PULL ".concat(JSON.stringify(u))}))}},{key:"discard",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.stmtId,r=void 0===n?-1:n,i=e.n,o=void 0===i?-1:i,u=f(r||-1,o||-1);return new t(47,[u],(function(){return"DISCARD ".concat(JSON.stringify(u))}))}}]),t}();function l(t,e,n,r){var i={};return t.isEmpty()||(i.bookmarks=t.values()),e.timeout&&(i.tx_timeout=e.timeout),e.metadata&&(i.tx_metadata=e.metadata),n&&(i.db=(0,a.assertString)(n,"database")),r===u.ACCESS_MODE_READ&&(i.mode="r"),i}function f(t,e){var n={n:(0,s.int)(e)};return-1!==t&&(n.qid=(0,s.int)(t)),n}e.default=c;var h=new c(63,[],(function(){return"PULL_ALL"})),d=new c(15,[],(function(){return"RESET"})),p=new c(18,[],(function(){return"COMMIT"})),v=new c(19,[],(function(){return"ROLLBACK"})),_=new c(2,[],(function(){return"GOODBYE"}))},421:function(t,e,n){"use strict";var r=n(211),i=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n(12)),u=i(n(13)),s=r(n(167)),a=n(192),c=n(90),l=function(){function t(e){(0,o.default)(this,t),function(t){t&&s.assertObject(t,"Transaction config")}(e),this.timeout=function(t){if(s.isObject(t)&&(t.timeout||0===t.timeout)){s.assertNumberOrInteger(t.timeout,"Transaction timeout");var e=(0,a.int)(t.timeout);if(e.isZero())throw(0,c.newError)("Transaction timeout should not be zero");if(e.isNegative())throw(0,c.newError)("Transaction timeout should not be negative");return e}return null}(e),this.metadata=function(t){if(s.isObject(t)&&t.metadata){var e=t.metadata;if(s.assertObject(e),0!==Object.keys(e).length)return e}return null}(e)}return(0,u.default)(t,[{key:"isEmpty",value:function(){return Object.values(this).every((function(t){return null==t}))}}],[{key:"empty",value:function(){return f}}]),t}();e.default=l;var f=new l({})},43:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(7),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(22).a)},439:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},477:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_CONNECTION_HOLDER=e.default=void 0;var i=r(n(18)),o=r(n(17)),u=r(n(19)),s=r(n(12)),a=r(n(13)),c=n(90),l=n(167),f=n(212),h=r(n(267)),d=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.mode,r=void 0===n?f.ACCESS_MODE_WRITE:n,i=e.database,o=void 0===i?"":i,u=e.bookmark,a=e.connectionProvider;(0,s.default)(this,t),this._mode=r,this._database=o?(0,l.assertString)(o,"database"):"",this._bookmark=u||h.default.empty(),this._connectionProvider=a,this._referenceCount=0,this._connectionPromise=Promise.resolve(null)}return(0,a.default)(t,[{key:"mode",value:function(){return this._mode}},{key:"database",value:function(){return this._database}},{key:"initializeConnection",value:function(){return 0!==this._referenceCount?(this._referenceCount++,!1):(this._connectionPromise=this._connectionProvider.acquireConnection({accessMode:this._mode,database:this._database,bookmark:this._bookmark}),this._referenceCount++,!0)}},{key:"getConnection",value:function(){return this._connectionPromise}},{key:"releaseConnection",value:function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)}},{key:"close",value:function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection())}},{key:"_releaseConnection",value:function(){return this._connectionPromise=this._connectionPromise.then((function(t){return t?t.resetAndFlush().catch(p).then((function(){return t._release()})):Promise.resolve()})).catch(p),this._connectionPromise}}]),t}();function p(t){}e.default=d;var v=new(function(t){function e(){return(0,s.default)(this,e),(0,i.default)(this,(0,o.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"initializeConnection",value:function(){return!0}},{key:"getConnection",value:function(){return Promise.reject((0,c.newError)("This connection holder does not serve connections"))}},{key:"releaseConnection",value:function(){return Promise.resolve()}},{key:"close",value:function(){return Promise.resolve()}}]),e}(d));e.EMPTY_CONNECTION_HOLDER=v},478:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=(n(229),r(n(479)),function(){function t(e){(0,i.default)(this,t),this._errorHandler=e}return(0,o.default)(t,[{key:"isOpen",value:function(){throw new Error("not implemented")}},{key:"protocol",value:function(){throw new Error("not implemented")}},{key:"connect",value:function(t,e){throw new Error("not implemented")}},{key:"write",value:function(t,e,n){throw new Error("not implemented")}},{key:"resetAndFlush",value:function(){throw new Error("not implemented")}},{key:"close",value:function(){throw new Error("not implemented")}},{key:"handleAndTransformError",value:function(t,e){return this._errorHandler?this._errorHandler.handleAndTransformError(t,e):t}},{key:"id",get:function(){throw new Error("not implemented")}},{key:"databaseId",get:function(){throw new Error("not implemented")},set:function(t){throw new Error("not implemented")}},{key:"address",get:function(){throw new Error("not implemented")}},{key:"version",get:function(){throw new Error("not implemented")},set:function(t){throw new Error("not implemented")}},{key:"server",get:function(){throw new Error("not implemented")}}]),t}());e.default=u},479:function(t,e,n){"use strict";var r=n(211),i=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n(12)),u=i(n(13)),s=n(882),a=i(n(267)),c=(n(883),i(n(478)),n(212)),l=r(n(884)),f=i(n(420)),h=n(229),d=i(n(421)),p=function(){function t(e,n,r){(0,o.default)(this,t),this._connection=e,this._packer=this._createPacker(n),this._unpacker=this._createUnpacker(r)}return(0,u.default)(t,[{key:"packer",value:function(){return this._packer}},{key:"unpacker",value:function(){return this._unpacker}},{key:"transformMetadata",value:function(t){return t}},{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.userAgent,n=t.authToken,r=t.onError,i=t.onComplete,o=new h.LoginObserver({connection:this._connection,afterError:r,afterComplete:i});return this._connection.write(f.default.init(e,n),o,!0),o}},{key:"prepareToClose",value:function(){}},{key:"beginTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.bookmark,n=t.txConfig,r=t.database,i=t.mode,o=t.beforeError,u=t.afterError,s=t.beforeComplete,a=t.afterComplete;return this.run("BEGIN",e?e.asBeginTransactionParameters():{},{bookmark:e,txConfig:n,database:r,mode:i,beforeError:o,afterError:u,beforeComplete:s,afterComplete:a,flush:!1})}},{key:"commitTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.beforeError,n=t.afterError,r=t.beforeComplete,i=t.afterComplete;return this.run("COMMIT",{},{bookmark:a.default.empty(),txConfig:d.default.empty(),mode:c.ACCESS_MODE_WRITE,beforeError:e,afterError:n,beforeComplete:r,afterComplete:i})}},{key:"rollbackTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.beforeError,n=t.afterError,r=t.beforeComplete,i=t.afterComplete;return this.run("ROLLBACK",{},{bookmark:a.default.empty(),txConfig:d.default.empty(),mode:c.ACCESS_MODE_WRITE,beforeError:e,afterError:n,beforeComplete:r,afterComplete:i})}},{key:"run",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(n.bookmark,n.txConfig),i=n.database,o=(n.mode,n.beforeKeys),u=n.afterKeys,a=n.beforeError,c=n.afterError,l=n.beforeComplete,d=n.afterComplete,p=n.flush,v=void 0===p||p,_=new h.ResultStreamObserver({connection:this._connection,beforeKeys:o,afterKeys:u,beforeError:a,afterError:c,beforeComplete:l,afterComplete:d});return(0,s.assertTxConfigIsEmpty)(r,this._connection,_),(0,s.assertDatabaseIsEmpty)(i,this._connection,_),this._connection.write(f.default.run(t,e),_,!1),this._connection.write(f.default.pullAll(),_,v),_}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.onError,n=t.onComplete,r=new h.ResetObserver({connection:this._connection,onError:e,onComplete:n});return this._connection.write(f.default.reset(),r,!0),r}},{key:"_createPacker",value:function(t){return new l.Packer(t)}},{key:"_createUnpacker",value:function(t){return new l.Unpacker(t)}},{key:"version",get:function(){return c.BOLT_PROTOCOL_V1}}]),t}();e.default=p},480:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(268)),o=r(n(269)),u=r(n(12)),s=r(n(13)),a=n(229),c=r(n(642)),l=r(n(891)),f=n(90),h=n(167),d=r(n(477)),p=r(n(337)),v=n(212),_=r(n(1668)),b=r(n(267)),y=r(n(421));var m=function(){function t(e){var n=e.mode,r=e.connectionProvider,i=e.bookmark,o=e.database,s=e.config,a=e.reactive,c=e.fetchSize;(0,u.default)(this,t),this._mode=n,this._database=o,this._reactive=a,this._fetchSize=c,this._readConnectionHolder=new d.default({mode:v.ACCESS_MODE_READ,database:o,bookmark:i,connectionProvider:r}),this._writeConnectionHolder=new d.default({mode:v.ACCESS_MODE_WRITE,database:o,bookmark:i,connectionProvider:r}),this._open=!0,this._hasTx=!1,this._lastBookmark=i,this._transactionExecutor=function(t){var e=t&&t.maxTransactionRetryTime?t.maxTransactionRetryTime:null;return new _.default(e)}(s),this._onComplete=this._onCompleteCallback.bind(this)}var e;return(0,s.default)(t,[{key:"run",value:function(t,e,n){var r=this,i=(0,h.validateQueryAndParameters)(t,e),o=i.validatedQuery,u=i.params,s=n?new y.default(n):y.default.empty();return this._run(o,u,(function(t){return t.protocol().run(o,u,{bookmark:r._lastBookmark,txConfig:s,mode:r._mode,database:r._database,afterComplete:r._onComplete,reactive:r._reactive,fetchSize:r._fetchSize})}))}},{key:"_run",value:function(t,e,n){var r,i=this._connectionHolderWithMode(this._mode);return r=this._open?!this._hasTx&&i.initializeConnection()?i.getConnection().then((function(t){return n(t)})).catch((function(t){return Promise.resolve(new a.FailedObserver({error:t}))})):Promise.resolve(new a.FailedObserver({error:(0,f.newError)("Queries cannot be run directly on a session with an open transaction; either run from within the transaction or use a different session.")})):Promise.resolve(new a.FailedObserver({error:(0,f.newError)("Cannot run query in a closed session.")})),new c.default(r,t,e,i)}},{key:"beginTransaction",value:function(t){var e=t,n=y.default.empty();return e&&(n=new y.default(e)),this._beginTransaction(this._mode,n)}},{key:"_beginTransaction",value:function(t,e){if(!this._open)throw(0,f.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,f.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");var n=p.default._validateSessionMode(t),r=this._connectionHolderWithMode(n);r.initializeConnection(),this._hasTx=!0;var i=new l.default({connectionHolder:r,onClose:this._transactionClosed.bind(this),onBookmark:this._updateBookmark.bind(this),reactive:this._reactive,fetchSize:this._fetchSize});return i._begin(this._lastBookmark,e),i}},{key:"_transactionClosed",value:function(){this._hasTx=!1}},{key:"lastBookmark",value:function(){return this._lastBookmark.values()}},{key:"readTransaction",value:function(t,e){var n=new y.default(e);return this._runTransaction(v.ACCESS_MODE_READ,n,t)}},{key:"writeTransaction",value:function(t,e){var n=new y.default(e);return this._runTransaction(v.ACCESS_MODE_WRITE,n,t)}},{key:"_runTransaction",value:function(t,e,n){var r=this;return this._transactionExecutor.execute((function(){return r._beginTransaction(t,e)}),n)}},{key:"_updateBookmark",value:function(t){t&&!t.isEmpty()&&(this._lastBookmark=t)}},{key:"close",value:(e=(0,o.default)(i.default.mark((function t(){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._open){t.next=7;break}return this._open=!1,this._transactionExecutor.close(),t.next=5,this._readConnectionHolder.close();case 5:return t.next=7,this._writeConnectionHolder.close();case 7:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"_connectionHolderWithMode",value:function(t){if(t===v.ACCESS_MODE_READ)return this._readConnectionHolder;if(t===v.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,f.newError)("Unknown access mode: "+t)}},{key:"_onCompleteCallback",value:function(t){this._updateBookmark(new b.default(t.bookmark))}}]),t}();e.default=m},481:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return h}));var r=n(7),i=n(22),o=n(58),u=n(35),s=n(73);function a(t,e,n,r){return function(i){return i.lift(new c(t,e,n,r))}}var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,i,o){var u=t.call(this,e)||this;return u.keySelector=n,u.elementSelector=r,u.durationSelector=i,u.subjectSelector=o,u.groups=null,u.attemptedToUnsubscribe=!1,u.count=0,u}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new s.a,n.set(e,i);var o=new h(e,i,this);if(this.destination.next(o),this.durationSelector){var u=void 0;try{u=this.durationSelector(new h(e,i))}catch(t){return void this.error(t)}this.add(u.subscribe(new f(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(i.a),f=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.__extends(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(i.a),h=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.__extends(e,t),e.prototype._subscribe=function(t){var e=new o.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new d(n)),e.add(r.subscribe(t)),e},e}(u.a),d=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.__extends(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(o.a)},508:function(t,e,n){"use strict";n.r(e),n.d(e,"Observable",(function(){return r.a})),n.d(e,"ConnectableObservable",(function(){return i.a})),n.d(e,"GroupedObservable",(function(){return o.a})),n.d(e,"observable",(function(){return u.a})),n.d(e,"Subject",(function(){return s.a})),n.d(e,"BehaviorSubject",(function(){return a.a})),n.d(e,"ReplaySubject",(function(){return c.a})),n.d(e,"AsyncSubject",(function(){return l.a})),n.d(e,"asapScheduler",(function(){return f.a})),n.d(e,"asyncScheduler",(function(){return h.a})),n.d(e,"queueScheduler",(function(){return d.a})),n.d(e,"animationFrameScheduler",(function(){return y})),n.d(e,"VirtualTimeScheduler",(function(){return m})),n.d(e,"VirtualAction",(function(){return g})),n.d(e,"Scheduler",(function(){return w.a})),n.d(e,"Subscription",(function(){return k.a})),n.d(e,"Subscriber",(function(){return E.a})),n.d(e,"Notification",(function(){return S.a})),n.d(e,"NotificationKind",(function(){return S.b})),n.d(e,"pipe",(function(){return O.a})),n.d(e,"noop",(function(){return x.a})),n.d(e,"identity",(function(){return I.a})),n.d(e,"isObservable",(function(){return T})),n.d(e,"ArgumentOutOfRangeError",(function(){return C.a})),n.d(e,"EmptyError",(function(){return N.a})),n.d(e,"ObjectUnsubscribedError",(function(){return R.a})),n.d(e,"UnsubscriptionError",(function(){return P.a})),n.d(e,"TimeoutError",(function(){return j.a})),n.d(e,"bindCallback",(function(){return V})),n.d(e,"bindNodeCallback",(function(){return B})),n.d(e,"combineLatest",(function(){return W.b})),n.d(e,"concat",(function(){return K.a})),n.d(e,"defer",(function(){return Y.a})),n.d(e,"empty",(function(){return Z.b})),n.d(e,"forkJoin",(function(){return X})),n.d(e,"from",(function(){return G.a})),n.d(e,"fromEvent",(function(){return tt})),n.d(e,"fromEventPattern",(function(){return et})),n.d(e,"generate",(function(){return nt})),n.d(e,"iif",(function(){return it})),n.d(e,"interval",(function(){return ut})),n.d(e,"merge",(function(){return at.a})),n.d(e,"never",(function(){return lt})),n.d(e,"of",(function(){return ft.a})),n.d(e,"onErrorResumeNext",(function(){return ht})),n.d(e,"pairs",(function(){return dt})),n.d(e,"partition",(function(){return yt})),n.d(e,"race",(function(){return mt.a})),n.d(e,"range",(function(){return gt})),n.d(e,"throwError",(function(){return kt.a})),n.d(e,"timer",(function(){return Et.a})),n.d(e,"using",(function(){return St})),n.d(e,"zip",(function(){return Ot.b})),n.d(e,"scheduled",(function(){return xt.a})),n.d(e,"EMPTY",(function(){return Z.a})),n.d(e,"NEVER",(function(){return ct})),n.d(e,"config",(function(){return It.a}));var r=n(35),i=n(511),o=n(481),u=n(196),s=n(73),a=n(512),c=n(346),l=n(236),f=n(386),h=n(83),d=n(541),p=n(7),v=n(241),_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return p.__extends(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(v.a),b=n(235),y=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++re.index?1:-1:t.delay>e.delay?1:-1},e}(v.a),w=n(439),k=n(58),E=n(22),S=n(180),O=n(318),x=n(171),I=n(187);function T(t){return!!t&&(t instanceof r.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var C=n(217),N=n(232),R=n(203),P=n(324),j=n(514),A=n(106),U=n(367),D=n(81),M=n(112);function V(t,e,n){if(e){if(!Object(M.a)(e))return function(){for(var r=[],i=0;i1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function et(t,e,n){return n?et(t,e).pipe(Object(A.a)((function(t){return Object(D.a)(t)?n.apply(void 0,t):n(t)}))):new r.a((function(n){var r,i=function(){for(var t=[],e=0;e=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function wt(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var kt=n(347),Et=n(518);function St(t,e){return new r.a((function(n){var r,i;try{r=t()}catch(t){return void n.error(t)}try{i=e(r)}catch(t){return void n.error(t)}var o=(i?Object(G.a)(i):Z.a).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))}var Ot=n(351),xt=n(540),It=n(160)},511:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var r=n(7),i=n(73),o=n(35),u=n(22),s=n(58),a=n(345),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new s.a).add(this.source.subscribe(new f(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.a.EMPTY)),t},e.prototype.refCount=function(){return Object(a.a)()(this)},e}(o.a),l=function(){var t=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.__extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.b);u.a},512:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(7),i=n(73),o=n(203),u=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.a)},513:function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return a}));var r=n(7),i=n(22),o=n(180);function u(t,e){return void 0===e&&(e=0),function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.scheduler,this.delay))},t}(),a=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.__extends(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.a.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.a.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(o.a.createComplete()),this.unsubscribe()},e}(i.a),c=function(){return function(t,e){this.notification=t,this.destination=e}}()},514:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},515:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(349);function i(){return Object(r.a)(1)}},516:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(35),i=n(112),o=n(349),u=n(234);function s(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof a&&(n=t.pop()),null===s&&1===t.length&&t[0]instanceof r.a?t[0]:Object(o.a)(n)(Object(u.a)(t,s))}},517:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(7),i=n(81),o=n(234),u=n(43),s=n(42);function a(){for(var t=[],e=0;e0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(241).a),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(n(235).a))(i)},549:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(7),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.__extends(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(58).a)},550:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return function(e){for(var n=0,r=t.length;n0||this.pageCacheHits>0||this.pageCacheHitRatio>0}}]),t}(),l=function(){function t(e){var n=this;(0,i.default)(this,t),this._stats={nodesCreated:0,nodesDeleted:0,relationshipsCreated:0,relationshipsDeleted:0,propertiesSet:0,labelsAdded:0,labelsRemoved:0,indexesAdded:0,indexesRemoved:0,constraintsAdded:0,constraintsRemoved:0},this._systemUpdates=0,Object.keys(e).forEach((function(t){var r=t.replace(/(-\w)/g,(function(t){return t[1].toUpperCase()}));r in n._stats?n._stats[r]=d(e[t]):"systemUpdates"===r&&(n._systemUpdates=d(e[t]))})),this._stats=Object.freeze(this._stats)}return(0,o.default)(t,[{key:"containsUpdates",value:function(){var t=this;return Object.keys(this._stats).reduce((function(e,n){return e+t._stats[n]}),0)>0}},{key:"updates",value:function(){return this._stats}},{key:"containsSystemUpdates",value:function(){return this._systemUpdates>0}},{key:"systemUpdates",value:function(){return this._systemUpdates}}]),t}(),f=function(){function t(e){(0,i.default)(this,t),this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=t._constructPosition(e.position)}return(0,o.default)(t,null,[{key:"_constructPosition",value:function(t){return t?{offset:d(t.offset),line:d(t.line),column:d(t.column)}:{}}}]),t}(),h=function t(e){(0,i.default)(this,t),e&&(this.address=e.address,this.version=e.version)};function d(t){return(0,u.isInt)(t)?t.toInt():t}function p(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t in e){var r=e[t];return(0,u.isInt)(r)?r.toInt():r}return n}e.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"};var v=s;e.default=v},644:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=n(90);function s(t){var e={};return t.forEach((function(t,n){e[t]=n})),e}var a=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,i.default)(this,t),this.keys=e,this.length=e.length,this._fields=n,this._fieldLookup=r||s(e)}return(0,o.default)(t,[{key:"forEach",value:function(t){for(var e=0;ethis._fields.length-1||e<0)throw(0,u.newError)("This record has no field with index '"+e+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[e]}},{key:"has",value:function(t){return"number"==typeof t?t>=0&&t>8),this.putUInt8(t+1,255&e)}},{key:"putUInt16",value:function(t,e){this.putUInt8(t,e>>8&255),this.putUInt8(t+1,255&e)}},{key:"putInt32",value:function(t,e){this.putInt8(t,e>>24),this.putUInt8(t+1,e>>16&255),this.putUInt8(t+2,e>>8&255),this.putUInt8(t+3,255&e)}},{key:"putUInt32",value:function(t,e){this.putUInt8(t,e>>24&255),this.putUInt8(t+1,e>>16&255),this.putUInt8(t+2,e>>8&255),this.putUInt8(t+3,255&e)}},{key:"putInt64",value:function(t,e){this.putInt8(t,e>>48),this.putUInt8(t+1,e>>42&255),this.putUInt8(t+2,e>>36&255),this.putUInt8(t+3,e>>30&255),this.putUInt8(t+4,e>>24&255),this.putUInt8(t+5,e>>16&255),this.putUInt8(t+6,e>>8&255),this.putUInt8(t+7,255&e)}},{key:"putBytes",value:function(t,e){for(var n=0,r=e.remaining();n0}},{key:"reset",value:function(){this.position=0}},{key:"toString",value:function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()}},{key:"toHex",value:function(){for(var t="",e=0;e0&&void 0!==arguments[0]?arguments[0]:{};t.accessMode,t.database,t.bookmarks;throw new Error("not implemented")}},{key:"supportsMultiDb",value:function(){throw new Error("not implemented")}},{key:"close",value:function(){throw new Error("not implemented")}}]),t}());e.default=u},648:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(268)),o=r(n(269)),u=r(n(12)),s=r(n(13)),a=r(n(18)),c=r(n(17)),l=r(n(3)),f=r(n(19)),h=n(336),d=n(883),p=n(90),v=r(n(1659)),_=r(n(1660)),b=r(n(478));r(n(479)),n(229);function y(){}var m={onNext:y,onCompleted:y,onError:y},g=0,w=function(t){function e(t,n,r,i){var o,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return(0,u.default)(this,e),(o=(0,a.default)(this,(0,c.default)(e).call(this,n)))._id=g++,o._address=r,o._server={address:r.asHostPort()},o.creationTimestamp=Date.now(),o._disableLosslessIntegers=s,o._pendingObservers=[],o._currentObserver=void 0,o._ch=t,o._dechunker=new d.Dechunker,o._chunker=new d.Chunker(t),o._log=i,o._dbConnectionId=null,o._protocol=null,o._currentFailure=null,o._isBroken=!1,o._log.isDebugEnabled()&&o._log.debug("".concat((0,l.default)(o)," created towards ").concat(r)),o}var n;return(0,f.default)(e,t),(0,s.default)(e,[{key:"connect",value:function(t,e){var n=this;return this._negotiateProtocol().then((function(){return n._initialize(t,e)}))}},{key:"_negotiateProtocol",value:function(){var t=this,e=new _.default(this,this._ch,this._chunker,this._disableLosslessIntegers,this._log);return new Promise((function(n,r){var i=function(e){t._handleFatalError(e),r(e)};t._ch.onerror=i.bind(t),t._ch._error&&i(t._ch._error),t._ch.onmessage=function(i){try{t._protocol=e.createNegotiatedProtocol(i),t._ch.onerror=t._handleFatalError.bind(t),t._ch.onmessage=function(e){return t._dechunker.write(e)},t._dechunker.onmessage=function(e){t._handleMessage(t._protocol.unpacker().unpack(e))},i.hasRemaining()&&t._dechunker.write(i.readSlice(i.remaining())),n(t)}catch(e){t._handleFatalError(e),r(e)}},e.writeHandshakeRequest()}))}},{key:"_initialize",value:function(t,e){var n=this,r=this;return new Promise((function(i,o){n._protocol.initialize({userAgent:t,authToken:e,onError:function(t){return o(t)},onComplete:function(){return i(r)}})}))}},{key:"protocol",value:function(){return this._protocol}},{key:"write",value:function(t,e,n){var r=this;this._queueObserver(e)&&(this._log.isDebugEnabled()&&this._log.debug("".concat(this," C: ").concat(t)),this._protocol.packer().packStruct(t.signature,t.fields.map((function(t){return r._packable(t)}))),this._chunker.messageBoundary(),n&&this._chunker.flush())}},{key:"_handleFatalError",value:function(t){for(this._isBroken=!0,this._error=this.handleAndTransformError(t,this._address),this._log.isErrorEnabled()&&this._log.error("".concat(this," experienced a fatal error ").concat(JSON.stringify(this._error))),this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(this._error);this._pendingObservers.length>0;){var e=this._pendingObservers.shift();e&&e.onError&&e.onError(this._error)}}},{key:"_handleMessage",value:function(t){if(!this._isBroken){var e=t.fields[0];switch(t.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("".concat(this," S: RECORD ").concat(JSON.stringify(t))),this._currentObserver.onNext(e);break;case 112:this._log.isDebugEnabled()&&this._log.debug("".concat(this," S: SUCCESS ").concat(JSON.stringify(t)));try{var n=this._protocol.transformMetadata(e);this._currentObserver.onCompleted(n)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("".concat(this," S: FAILURE ").concat(JSON.stringify(t)));try{var r=(0,p.newError)(e.message,e.code);this._currentFailure=this.handleAndTransformError(r,this._address),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._resetOnFailure()}break;case 126:this._log.isDebugEnabled()&&this._log.debug("".concat(this," S: IGNORED ").concat(JSON.stringify(t)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,p.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._handleFatalError((0,p.newError)("Unknown Bolt protocol message: "+t))}}}},{key:"resetAndFlush",value:function(){var t=this;return new Promise((function(e,n){t._protocol.reset({onError:function(e){if(t._isBroken)n(e);else{var r=t._handleProtocolError("Received FAILURE as a response for RESET: "+e);n(r)}},onComplete:function(){e()}})}))}},{key:"_resetOnFailure",value:function(){var t=this;this._protocol.reset({onError:function(){t._currentFailure=null},onComplete:function(){t._currentFailure=null}})}},{key:"_queueObserver",value:function(t){return this._isBroken?(t&&t.onError&&t.onError(this._error),!1):((t=t||m).onCompleted=t.onCompleted||y,t.onError=t.onError||y,t.onNext=t.onNext||y,void 0===this._currentObserver?this._currentObserver=t:this._pendingObservers.push(t),!0)}},{key:"_updateCurrentObserver",value:function(){this._currentObserver=this._pendingObservers.shift()}},{key:"isOpen",value:function(){return!this._isBroken&&this._ch._open}},{key:"close",value:(n=(0,o.default)(i.default.mark((function t(){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._log.isDebugEnabled()&&this._log.debug("".concat(this," closing")),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),t.next=4,this._ch.close();case 4:this._log.isDebugEnabled()&&this._log.debug("".concat(this," closed"));case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"toString",value:function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")}},{key:"_packable",value:function(t){return this._protocol.packer().packable(t)}},{key:"_handleProtocolError",value:function(t){this._currentFailure=null,this._updateCurrentObserver();var e=(0,p.newError)(t,p.PROTOCOL_ERROR);return this._handleFatalError(e),e}},{key:"id",get:function(){return this._id}},{key:"databaseId",get:function(){return this._dbConnectionId},set:function(t){this._dbConnectionId=t}},{key:"address",get:function(){return this._address}},{key:"version",get:function(){return this._server.version},set:function(t){this._server.version=t}},{key:"server",get:function(){return this._server}}],[{key:"create",value:function(t,n,r,i){var o=new v.default(t,n,r.errorCode());return new e(new h.Channel(o),r,t,i,n.disableLosslessIntegers)}}]),e}(b.default);e.default=w},649:function(t,e,n){"use strict";var r=n(211),i=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.isDuration=function(t){return y(t,"__isDuration__")},e.isLocalTime=function(t){return y(t,"__isLocalTime__")},e.isTime=function(t){return y(t,"__isTime__")},e.isDate=function(t){return y(t,"__isDate__")},e.isLocalDateTime=function(t){return y(t,"__isLocalDateTime__")},e.isDateTime=function(t){return y(t,"__isDateTime__")},e.DateTime=e.LocalDateTime=e.Date=e.Time=e.LocalTime=e.Duration=void 0;var o=i(n(134)),u=i(n(12)),s=i(n(13)),a=r(n(888)),c=n(167),l=n(90),f={value:!0,enumerable:!1,configurable:!1,writable:!1},h=function(){function t(e,n,r,i){(0,u.default)(this,t),this.months=(0,c.assertNumberOrInteger)(e,"Months"),this.days=(0,c.assertNumberOrInteger)(n,"Days"),(0,c.assertNumberOrInteger)(r,"Seconds"),(0,c.assertNumberOrInteger)(i,"Nanoseconds"),this.seconds=a.normalizeSecondsForDuration(r,i),this.nanoseconds=a.normalizeNanosecondsForDuration(i),Object.freeze(this)}return(0,s.default)(t,[{key:"toString",value:function(){return a.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)}}]),t}();e.Duration=h,Object.defineProperty(h.prototype,"__isDuration__",f);var d=function(){function t(e,n,r,i){(0,u.default)(this,t),this.hour=a.assertValidHour(e),this.minute=a.assertValidMinute(n),this.second=a.assertValidSecond(r),this.nanosecond=a.assertValidNanosecond(i),Object.freeze(this)}return(0,s.default)(t,[{key:"toString",value:function(){return a.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)}}],[{key:"fromStandardDate",value:function(e,n){return g(e,n),new t(e.getHours(),e.getMinutes(),e.getSeconds(),a.totalNanoseconds(e,n))}}]),t}();e.LocalTime=d,Object.defineProperty(d.prototype,"__isLocalTime__",f);var p=function(){function t(e,n,r,i,o){(0,u.default)(this,t),this.hour=a.assertValidHour(e),this.minute=a.assertValidMinute(n),this.second=a.assertValidSecond(r),this.nanosecond=a.assertValidNanosecond(i),this.timeZoneOffsetSeconds=(0,c.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}return(0,s.default)(t,[{key:"toString",value:function(){return a.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+a.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)}}],[{key:"fromStandardDate",value:function(e,n){return g(e,n),new t(e.getHours(),e.getMinutes(),e.getSeconds(),a.totalNanoseconds(e,n),a.timeZoneOffsetInSeconds(e))}}]),t}();e.Time=p,Object.defineProperty(p.prototype,"__isTime__",f);var v=function(){function t(e,n,r){(0,u.default)(this,t),this.year=a.assertValidYear(e),this.month=a.assertValidMonth(n),this.day=a.assertValidDay(r),Object.freeze(this)}return(0,s.default)(t,[{key:"toString",value:function(){return a.dateToIsoString(this.year,this.month,this.day)}}],[{key:"fromStandardDate",value:function(e){return g(e,null),new t(e.getFullYear(),e.getMonth()+1,e.getDate())}}]),t}();e.Date=v,Object.defineProperty(v.prototype,"__isDate__",f);var _=function(){function t(e,n,r,i,o,s,c){(0,u.default)(this,t),this.year=a.assertValidYear(e),this.month=a.assertValidMonth(n),this.day=a.assertValidDay(r),this.hour=a.assertValidHour(i),this.minute=a.assertValidMinute(o),this.second=a.assertValidSecond(s),this.nanosecond=a.assertValidNanosecond(c),Object.freeze(this)}return(0,s.default)(t,[{key:"toString",value:function(){return m(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)}}],[{key:"fromStandardDate",value:function(e,n){return g(e,n),new t(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),a.totalNanoseconds(e,n))}}]),t}();e.LocalDateTime=_,Object.defineProperty(_.prototype,"__isLocalDateTime__",f);var b=function(){function t(e,n,r,i,s,f,h,d,p){(0,u.default)(this,t),this.year=a.assertValidYear(e),this.month=a.assertValidMonth(n),this.day=a.assertValidDay(r),this.hour=a.assertValidHour(i),this.minute=a.assertValidMinute(s),this.second=a.assertValidSecond(f),this.nanosecond=a.assertValidNanosecond(h);var v=function(t,e){var n=t||0===t,r=e&&""!==e;if(n&&!r)return(0,c.assertNumberOrInteger)(t,"Time zone offset in seconds"),[t,null];if(!n&&r)return(0,c.assertString)(e,"Time zone ID"),[null,e];throw n&&r?(0,l.newError)("Unable to create DateTime with both time zone offset and id. Please specify either of them. Given offset: ".concat(t," and id: ").concat(e)):(0,l.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(t," and id: ").concat(e))}(d,p),_=(0,o.default)(v,2),b=_[0],y=_[1];this.timeZoneOffsetSeconds=b,this.timeZoneId=y,Object.freeze(this)}return(0,s.default)(t,[{key:"toString",value:function(){return m(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(this.timeZoneId?"[".concat(this.timeZoneId,"]"):a.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds))}}],[{key:"fromStandardDate",value:function(e,n){return g(e,n),new t(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),a.totalNanoseconds(e,n),a.timeZoneOffsetInSeconds(e),null)}}]),t}();function y(t,e){return!0===(t&&t[e])}function m(t,e,n,r,i,o,u){return a.dateToIsoString(t,e,n)+"T"+a.timeToIsoString(r,i,o,u)}function g(t,e){(0,c.assertValidDate)(t,"Standard date"),null!=e&&(0,c.assertNumberOrInteger)(e,"Nanosecond")}e.DateTime=b,Object.defineProperty(b.prototype,"__isDateTime__",f)},650:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_ACQUISITION_TIMEOUT=e.DEFAULT_MAX_SIZE=e.default=void 0;var i=r(n(12)),o=r(n(13));e.DEFAULT_MAX_SIZE=100;e.DEFAULT_ACQUISITION_TIMEOUT=6e4;var u=function(){function t(e,n){(0,i.default)(this,t),this.maxSize=s(e,100),this.acquisitionTimeout=s(n,6e4)}return(0,o.default)(t,null,[{key:"defaultConfig",value:function(){return new t(100,6e4)}},{key:"fromDriverConfig",value:function(e){return new t(a(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,a(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)}}]),t}();function s(t,e){return 0===t||t?t:e}function a(t){return 0===t||t}e.default=u},651:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i,o=r(n(18)),u=r(n(17)),s=r(n(19)),a=r(n(12)),c=r(n(13)),l=r(n(1)),f=n(90),h=(i={},(0,l.default)(i,"error",0),(0,l.default)(i,"warn",1),(0,l.default)(i,"info",2),(0,l.default)(i,"debug",3),i),d=function(){function t(e,n){(0,a.default)(this,t),this._level=e,this._loggerFunction=n}return(0,c.default)(t,[{key:"isErrorEnabled",value:function(){return v(this._level,"error")}},{key:"error",value:function(t){this.isErrorEnabled()&&this._loggerFunction("error",t)}},{key:"isWarnEnabled",value:function(){return v(this._level,"warn")}},{key:"warn",value:function(t){this.isWarnEnabled()&&this._loggerFunction("warn",t)}},{key:"isInfoEnabled",value:function(){return v(this._level,"info")}},{key:"info",value:function(t){this.isInfoEnabled()&&this._loggerFunction("info",t)}},{key:"isDebugEnabled",value:function(){return v(this._level,"debug")}},{key:"debug",value:function(t){this.isDebugEnabled()&&this._loggerFunction("debug",t)}}],[{key:"create",value:function(e){if(e&&e.logging){var n=e.logging;return new t(function(t){if(t&&t.level){var e=t.level,n=h[e];if(!n&&0!==n)throw(0,f.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(h)));return e}return"info"}(n),function(t){if(t&&t.logger){var e=t.logger;if(e&&"function"==typeof e)return e}throw(0,f.newError)("Illegal logger function: ".concat(t.logger))}(n))}return this.noOp()}},{key:"noOp",value:function(){return p}}]),t}(),p=new(function(t){function e(){return(0,a.default)(this,e),(0,o.default)(this,(0,u.default)(e).call(this,null,null))}return(0,s.default)(e,t),(0,c.default)(e,[{key:"isErrorEnabled",value:function(){return!1}},{key:"error",value:function(t){}},{key:"isWarnEnabled",value:function(){return!1}},{key:"warn",value:function(t){}},{key:"isInfoEnabled",value:function(){return!1}},{key:"info",value:function(t){}},{key:"isDebugEnabled",value:function(){return!1}},{key:"debug",value:function(t){}}]),e}(d));function v(t,e){return h[t]>=h[e]}var _=d;e.default=_},652:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=n(90),s=function(){function t(e,n,r){(0,i.default)(this,t),this._errorCode=e,this._handleUnavailability=n||a,this._handleWriteFailure=r||a}return(0,o.default)(t,[{key:"errorCode",value:function(){return this._errorCode}},{key:"handleAndTransformError",value:function(t,e){return function(t){if(t)return t.code===u.SESSION_EXPIRED||t.code===u.SERVICE_UNAVAILABLE||"Neo.TransientError.General.DatabaseUnavailable"===t.code;return!1}(t)?this._handleUnavailability(t,e):function(t){if(t)return"Neo.ClientError.Cluster.NotALeader"===t.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===t.code;return!1}(t)?this._handleWriteFailure(t,e):t}}]),t}();function a(t){return t}e.default=s},653:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=n(167),s=r(n(896)),a=function(){function t(e,n,r,o){(0,i.default)(this,t),this._host=(0,u.assertString)(e,"host"),this._resolved=n?(0,u.assertString)(n,"resolved"):null,this._port=(0,u.assertNumber)(r,"port"),this._hostPort=o,this._stringValue=n?"".concat(o,"(").concat(n,")"):"".concat(o)}return(0,o.default)(t,[{key:"host",value:function(){return this._host}},{key:"resolvedHost",value:function(){return this._resolved?this._resolved:this._host}},{key:"port",value:function(){return this._port}},{key:"resolveWith",value:function(e){return new t(this._host,e,this._port,this._hostPort)}},{key:"asHostPort",value:function(){return this._hostPort}},{key:"asKey",value:function(){return this._hostPort}},{key:"toString",value:function(){return this._stringValue}}],[{key:"fromUrl",value:function(e){var n=s.default.parseDatabaseUrl(e);return new t(n.host,null,n.port,n.hostAndPort)}}]),t}();e.default=a},695:function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return u})),n.d(e,"auditTime",(function(){return f})),n.d(e,"buffer",(function(){return h})),n.d(e,"bufferCount",(function(){return _})),n.d(e,"bufferTime",(function(){return w})),n.d(e,"bufferToggle",(function(){return C})),n.d(e,"bufferWhen",(function(){return P})),n.d(e,"catchError",(function(){return D})),n.d(e,"combineAll",(function(){return F})),n.d(e,"combineLatest",(function(){return H})),n.d(e,"concat",(function(){return W})),n.d(e,"concatAll",(function(){return K.a})),n.d(e,"concatMap",(function(){return Z})),n.d(e,"concatMapTo",(function(){return J})),n.d(e,"count",(function(){return G})),n.d(e,"debounce",(function(){return $})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return ut})),n.d(e,"delay",(function(){return ft})),n.d(e,"delayWhen",(function(){return _t})),n.d(e,"dematerialize",(function(){return wt})),n.d(e,"distinct",(function(){return St})),n.d(e,"distinctUntilChanged",(function(){return It})),n.d(e,"distinctUntilKeyChanged",(function(){return Nt})),n.d(e,"elementAt",(function(){return zt})),n.d(e,"endWith",(function(){return qt})),n.d(e,"every",(function(){return Wt})),n.d(e,"exhaust",(function(){return Zt})),n.d(e,"exhaustMap",(function(){return Qt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return Pt.a})),n.d(e,"finalize",(function(){return ie})),n.d(e,"find",(function(){return se})),n.d(e,"findIndex",(function(){return le})),n.d(e,"first",(function(){return he})),n.d(e,"groupBy",(function(){return de.b})),n.d(e,"ignoreElements",(function(){return pe})),n.d(e,"isEmpty",(function(){return be})),n.d(e,"last",(function(){return Ee})),n.d(e,"map",(function(){return Xt.a})),n.d(e,"mapTo",(function(){return Se})),n.d(e,"materialize",(function(){return Ie})),n.d(e,"max",(function(){return Ue})),n.d(e,"merge",(function(){return Me})),n.d(e,"mergeAll",(function(){return Ve.a})),n.d(e,"mergeMap",(function(){return Y.a})),n.d(e,"flatMap",(function(){return Y.a})),n.d(e,"mergeMapTo",(function(){return Le})),n.d(e,"mergeScan",(function(){return Fe})),n.d(e,"min",(function(){return He})),n.d(e,"multicast",(function(){return We})),n.d(e,"observeOn",(function(){return Ye.b})),n.d(e,"onErrorResumeNext",(function(){return Ze})),n.d(e,"pairwise",(function(){return Xe})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return un})),n.d(e,"publishBehavior",(function(){return an})),n.d(e,"publishLast",(function(){return ln})),n.d(e,"publishReplay",(function(){return hn})),n.d(e,"race",(function(){return pn})),n.d(e,"reduce",(function(){return Ae})),n.d(e,"repeat",(function(){return vn})),n.d(e,"repeatWhen",(function(){return yn})),n.d(e,"retry",(function(){return wn})),n.d(e,"retryWhen",(function(){return Sn})),n.d(e,"refCount",(function(){return In.a})),n.d(e,"sample",(function(){return Tn})),n.d(e,"sampleTime",(function(){return Rn})),n.d(e,"scan",(function(){return Ne})),n.d(e,"sequenceEqual",(function(){return Un})),n.d(e,"share",(function(){return Fn})),n.d(e,"shareReplay",(function(){return Bn})),n.d(e,"single",(function(){return zn})),n.d(e,"skip",(function(){return Wn})),n.d(e,"skipLast",(function(){return Zn})),n.d(e,"skipUntil",(function(){return Xn})),n.d(e,"skipWhile",(function(){return tr})),n.d(e,"startWith",(function(){return rr})),n.d(e,"subscribeOn",(function(){return sr})),n.d(e,"switchAll",(function(){return hr})),n.d(e,"switchMap",(function(){return cr})),n.d(e,"switchMapTo",(function(){return dr})),n.d(e,"take",(function(){return Lt})),n.d(e,"takeLast",(function(){return ge})),n.d(e,"takeUntil",(function(){return pr})),n.d(e,"takeWhile",(function(){return br})),n.d(e,"tap",(function(){return kr})),n.d(e,"throttle",(function(){return xr})),n.d(e,"throttleTime",(function(){return Cr})),n.d(e,"throwIfEmpty",(function(){return At})),n.d(e,"timeInterval",(function(){return Ar})),n.d(e,"timeout",(function(){return Br})),n.d(e,"timeoutWith",(function(){return Mr})),n.d(e,"timestamp",(function(){return zr})),n.d(e,"toArray",(function(){return Wr})),n.d(e,"window",(function(){return Kr})),n.d(e,"windowCount",(function(){return Jr})),n.d(e,"windowTime",(function(){return Qr})),n.d(e,"windowToggle",(function(){return oi})),n.d(e,"windowWhen",(function(){return ai})),n.d(e,"withLatestFrom",(function(){return fi})),n.d(e,"zip",(function(){return vi})),n.d(e,"zipAll",(function(){return _i}));var r=n(7),i=n(43),o=n(42);function u(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=Object(o.a)(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.a),c=n(83),l=n(518);function f(t,e){return void 0===e&&(e=c.a),u((function(){return Object(l.a)(t,e)}))}function h(t){return function(e){return e.lift(new d(t))}}var d=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.closingNotifier))},t}(),p=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(Object(o.a)(r,n)),r}return r.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.buffer;this.buffer=[],this.destination.next(o)},e}(i.a),v=n(22);function _(t,e){return void 0===e&&(e=null),function(n){return n.lift(new b(t,e))}}var b=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?m:y}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),y=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(v.a),m=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var u=r[o];u.push(t),u.length===e&&(r.splice(o,1),this.destination.next(u))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(v.a),g=n(112);function w(t){var e=arguments.length,n=c.a;Object(g.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new k(t,r,i,n))}}var k=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new S(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),E=function(){return function(){this.buffer=[]}}(),S=function(t){function e(e,n,r,i,o){var u=t.call(this,e)||this;u.bufferTimeSpan=n,u.bufferCreationInterval=r,u.maxBufferSize=i,u.scheduler=o,u.contexts=[];var s=u.openContext();if(u.timespanOnly=null==r||r<0,u.timespanOnly){var a={subscriber:u,context:s,bufferTimeSpan:n};u.add(s.closeAction=o.schedule(O,n,a))}else{var c={subscriber:u,context:s},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:u,scheduler:o};u.add(s.closeAction=o.schedule(I,n,c)),u.add(o.schedule(x,r,l))}return u}return r.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(O,n,r))}},e.prototype.openContext=function(){var t=new E;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(v.a);function O(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function x(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(I,n,{subscriber:r,context:o})),this.schedule(t,e))}function I(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var T=n(58);function C(t,e){return function(n){return n.lift(new N(t,e))}}var N=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new R(t,this.openings,this.closingSelector))},t}(),R=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(Object(o.a)(i,n)),i}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new T.a,r={buffer:[],subscription:n};e.push(r);var i=Object(o.a)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(i.a);function P(t){return function(e){return e.lift(new j(t))}}var j=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new A(t,this.closingSelector))},t}(),A=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,r,i){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new T.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(o.a)(this,e)),this.subscribing=!1},e}(i.a),U=n(154);function D(t){return function(e){var n=new M(t),r=e.lift(n);return n.caught=r}}var M=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new V(t,this.selector,this.caught))},t}(),V=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new U.a(this,void 0,void 0);this.add(r);var i=Object(o.a)(this,n,void 0,void 0,r);i!==r&&this.add(i)}},e}(i.a),L=n(348);function F(t){return function(e){return e.lift(new L.a(t))}}var B=n(81),z=n(123);function H(){for(var t=[],e=0;e0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new pt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(lt.a.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(lt.a.createComplete()),this.unsubscribe()},e}(v.a),pt=function(){return function(t,e){this.time=t,this.notification=e}}(),vt=n(35);function _t(t,e){return e?function(n){return new mt(n,e).lift(new bt(t))}:function(e){return e.lift(new bt(t))}}var bt=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new yt(t,this.delayDurationSelector))},t}(),yt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(o.a)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(i.a),mt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new gt(t,this.source))},e}(vt.a),gt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.__extends(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(v.a);function wt(){return function(t){return t.lift(new kt)}}var kt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Et(t))},t}(),Et=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(v.a);function St(t,e){return function(n){return n.lift(new Ot(t,e))}}var Ot=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new xt(t,this.keySelector,this.flushes))},t}(),xt=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=n,i.values=new Set,r&&i.add(Object(o.a)(i,r)),i}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(i.a);function It(t,e){return function(n){return n.lift(new Tt(t,e))}}var Tt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Ct(t,this.compare,this.keySelector))},t}(),Ct=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.__extends(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(v.a);function Nt(t,e){return It((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var Rt=n(217),Pt=n(178),jt=n(232);function At(t){return void 0===t&&(t=Mt),function(e){return e.lift(new Ut(t))}}var Ut=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Dt(t,this.errorFactory))},t}(),Dt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.__extends(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(v.a);function Mt(){return new jt.a}var Vt=n(120);function Lt(t){return function(e){return 0===t?Object(Vt.b)():e.lift(new Ft(t))}}var Ft=function(){function t(t){if(this.total=t,this.total<0)throw new Rt.a}return t.prototype.call=function(t,e){return e.subscribe(new Bt(t,this.total))},t}(),Bt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(v.a);function zt(t,e){if(t<0)throw new Rt.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(Pt.a)((function(e,n){return n===t})),Lt(1),n?ut(e):At((function(){return new Rt.a})))}}var Ht=n(278);function qt(){for(var t=[],e=0;e0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.a);function ie(t){return function(e){return e.lift(new oe(t))}}var oe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new ue(t,this.callback))},t}(),ue=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new T.a(n)),r}return r.__extends(e,t),e}(v.a);function se(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ae(t,n,!1,e))}}var ae=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,n,r,i,o){var u=t.call(this,e)||this;return u.predicate=n,u.source=r,u.yieldIndex=i,u.thisArg=o,u.index=0,u}return r.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(v.a);function le(t,e){return function(n){return n.lift(new ae(t,n,!0,e))}}var fe=n(187);function he(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(Pt.a)((function(e,n){return t(e,n,r)})):fe.a,Lt(1),n?ut(e):At((function(){return new jt.a})))}}var de=n(481);function pe(){return function(t){return t.lift(new ve)}}var ve=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new _e(t))},t}(),_e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype._next=function(t){},e}(v.a);function be(){return function(t){return t.lift(new ye)}}var ye=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new me(t))},t}(),me=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(v.a);function ge(t){return function(e){return 0===t?Object(Vt.b)():e.lift(new we(t))}}var we=function(){function t(t){if(this.total=t,this.total<0)throw new Rt.a}return t.prototype.call=function(t,e){return e.subscribe(new ke(t,this.total))},t}(),ke=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i=2;return function(r){return r.pipe(t?Object(Pt.a)((function(e,n){return t(e,n,r)})):fe.a,ge(1),n?ut(e):At((function(){return new jt.a})))}}function Se(t){return function(e){return e.lift(new Oe(t))}}var Oe=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new xe(t,this.value))},t}(),xe=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(v.a);function Ie(){return function(t){return t.lift(new Te)}}var Te=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t))},t}(),Ce=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(lt.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(lt.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(lt.a.createComplete()),t.complete()},e}(v.a);function Ne(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Re(t,e,n))}}var Re=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Pe(t,this.accumulator,this.seed,this.hasSeed))},t}(),Pe=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.__extends(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(v.a),je=n(318);function Ae(t,e){return arguments.length>=2?function(n){return Object(je.a)(Ne(t,e),ge(1),ut(e))(n)}:function(e){return Object(je.a)(Ne((function(e,n,r){return t(e,n,r+1)})),ge(1))(e)}}function Ue(t){return Ae("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var De=n(516);function Me(){for(var t=[],e=0;e0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.a);function He(t){return Ae("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(v.a);function yn(t){return function(e){return e.lift(new mn(t))}}var mn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new gn(t,this.notifier,e))},t}(),gn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new on.a;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(o.a)(this,e)},e}(i.a);function wn(t){return void 0===t&&(t=-1),function(e){return e.lift(new kn(t,e))}}var kn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.count,this.source))},t}(),En=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(v.a);function Sn(t){return function(e){return e.lift(new On(t,e))}}var On=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new xn(t,this.notifier,this.source))},t}(),xn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,i=this.retriesSubscription;if(r)this.errors=null,this.retriesSubscription=null;else{n=new on.a;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}i=Object(o.a)(this,r)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=i,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,r,i){var o=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=o,this.source.subscribe(this)},e}(i.a),In=n(345);function Tn(t){return function(e){return e.lift(new Cn(t))}}var Cn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Nn(t),r=e.subscribe(n);return r.add(Object(o.a)(n,this.notifier)),r},t}(),Nn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.__extends(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,r,i){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.a);function Rn(t,e){return void 0===e&&(e=c.a),function(n){return n.lift(new Pn(t,e))}}var Pn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new jn(t,this.period,this.scheduler))},t}(),jn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(An,n,{subscriber:i,period:n})),i}return r.__extends(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(v.a);function An(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Un(t,e){return function(n){return n.lift(new Dn(t,e))}}var Dn=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Mn(t,this.compareTo,this.comparator))},t}(),Mn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Vn(e,i))),i}return r.__extends(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var r=t.shift(),i=e.shift(),o=!1;try{o=n?n(r,i):r===i}catch(t){this.destination.error(t)}o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(v.a),Vn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.__extends(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(v.a);function Ln(){return new on.a}function Fn(){return function(t){return Object(In.a)()(We(Ln)(t))}}function Bn(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,u=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,a=t.scheduler,c=0,l=!1,f=!1;return function(t){c++,e&&!l||(l=!1,e=new fn.a(i,u,a),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){f=!0,n=void 0,e.complete()}}));var r=e.subscribe(this);this.add((function(){c--,r.unsubscribe(),n&&!f&&s&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function zn(t){return function(e){return e.lift(new Hn(t,e))}}var Hn=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new qn(t,this.predicate,this.source))},t}(),qn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.__extends(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new jt.a)},e}(v.a);function Wn(t){return function(e){return e.lift(new Kn(t))}}var Kn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Yn(t,this.total))},t}(),Yn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(v.a);function Zn(t){return function(e){return e.lift(new Jn(t))}}var Jn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Rt.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new v.a(t)):e.subscribe(new Gn(t,this._skipCount))},t}(),Gn=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,u=0;u=0&&s%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var a=new on.a;i.push(a),n.next(a)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(v.a);function Qr(t){var e=c.a,n=null,r=Number.POSITIVE_INFINITY;return Object(g.a)(arguments[3])&&(e=arguments[3]),Object(g.a)(arguments[2])?e=arguments[2]:Object(or.a)(arguments[2])&&(r=arguments[2]),Object(g.a)(arguments[1])?e=arguments[1]:Object(or.a)(arguments[1])&&(n=arguments[1]),function(i){return i.lift(new $r(t,n,r,e))}}var $r=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new ei(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),ti=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.__extends(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(on.a),ei=function(t){function e(e,n,r,i,o){var u=t.call(this,e)||this;u.destination=e,u.windowTimeSpan=n,u.windowCreationInterval=r,u.maxWindowSize=i,u.scheduler=o,u.windows=[];var s=u.openWindow();if(null!==r&&r>=0){var a={subscriber:u,window:s,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:u,scheduler:o};u.add(o.schedule(ii,n,a)),u.add(o.schedule(ri,r,c))}else{var l={subscriber:u,window:s,windowTimeSpan:n};u.add(o.schedule(ni,n,l))}return u}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new ti;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(v.a);function ni(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function ri(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),u={action:this,subscription:null},s={subscriber:n,window:o,context:u};u.subscription=r.schedule(ii,e,s),this.add(u.subscription),this.schedule(t,i)}function ii(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function oi(t,e){return function(n){return n.lift(new ui(t,e))}}var ui=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new si(t,this.openings,this.closingSelector))},t}(),si=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=Object(o.a)(i,n,n)),i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r0){var u=o.indexOf(n);-1!==u&&o.splice(u,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.a),pi=n(351);function vi(){for(var t=[],e=0;e0){t+=" {";for(var r=0;r0&&(t+=","),t+=n[r]+":"+JSON.stringify(this.properties[n[r]]);t+="}"}return t+=")"}}]),t}();e.Node=a,Object.defineProperty(a.prototype,"__isNode__",u);var c=function(){function t(e,n,r,o,u){(0,i.default)(this,t),this.identity=e,this.start=n,this.end=r,this.type=o,this.properties=u}return(0,o.default)(t,[{key:"toString",value:function(){var t="("+this.start+")-[:"+this.type,e=Object.keys(this.properties);if(e.length>0){t+=" {";for(var n=0;n0&&(t+=","),t+=e[n]+":"+JSON.stringify(this.properties[e[n]]);t+="}"}return t+="]->("+this.end+")"}}]),t}();e.Relationship=c,Object.defineProperty(c.prototype,"__isRelationship__",u);var l=function(){function t(e,n,r){(0,i.default)(this,t),this.identity=e,this.type=n,this.properties=r}return(0,o.default)(t,[{key:"bind",value:function(t,e){return new c(this.identity,t,e,this.type,this.properties)}},{key:"toString",value:function(){var t="-[:"+this.type,e=Object.keys(this.properties);if(e.length>0){t+=" {";for(var n=0;n0&&(t+=","),t+=e[n]+":"+JSON.stringify(this.properties[e[n]]);t+="}"}return t+="]->"}}]),t}();e.UnboundRelationship=l,Object.defineProperty(l.prototype,"__isUnboundRelationship__",u);var f=function t(e,n,r){(0,i.default)(this,t),this.start=e,this.relationship=n,this.end=r};e.PathSegment=f,Object.defineProperty(f.prototype,"__isPathSegment__",u);var h=function t(e,n,r){(0,i.default)(this,t),this.start=e,this.end=n,this.segments=r,this.length=r.length};e.Path=h,Object.defineProperty(h.prototype,"__isPath__",u)},882:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertDatabaseIsEmpty=function(t,e,n){if(t){var i=(0,r.newError)("Driver is connected to the database that does not support multiple databases. Please upgrade to neo4j 4.0.0 or later in order to use this functionality");throw e._handleFatalError(i),n.onError(i),i}},e.assertTxConfigIsEmpty=function(t,e,n){if(t&&!t.isEmpty()){var i=(0,r.newError)("Driver is connected to the database that does not support transaction configuration. Please upgrade to neo4j 3.5.0 or later in order to use this functionality");throw e._handleFatalError(i),n.onError(i),i}};var r=n(90);n(229)},883:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.Dechunker=e.Chunker=void 0;var i=r(n(12)),o=r(n(13)),u=r(n(18)),s=r(n(17)),a=r(n(19)),c=r(n(645)),l=n(336),f=r(n(1657)),h=function(t){function e(t,n){var r;return(0,i.default)(this,e),(r=(0,u.default)(this,(0,s.default)(e).call(this,0)))._bufferSize=n||1400,r._ch=t,r._buffer=(0,l.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}return(0,a.default)(e,t),(0,o.default)(e,[{key:"putUInt8",value:function(t,e){this._ensure(1),this._buffer.writeUInt8(e)}},{key:"putInt8",value:function(t,e){this._ensure(1),this._buffer.writeInt8(e)}},{key:"putFloat64",value:function(t,e){this._ensure(8),this._buffer.writeFloat64(e)}},{key:"putBytes",value:function(t,e){for(;e.remaining()>0;)this._ensure(1),this._buffer.remaining()>e.remaining()?this._buffer.writeBytes(e):this._buffer.writeBytes(e.readSlice(this._buffer.remaining()));return this}},{key:"flush",value:function(){if(this._buffer.position>0){this._closeChunkIfOpen();var t=this._buffer;this._buffer=null,this._ch.write(t.getSlice(0,t.position)),this._buffer=(0,l.alloc)(this._bufferSize),this._chunkOpen=!1}return this}},{key:"messageBoundary",value:function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)}},{key:"_ensure",value:function(t){var e=this._chunkOpen?t:t+2;this._buffer.remaining()=2?this._onHeader(t.readUInt16()):(this._partialChunkHeader=t.readUInt8()<<8,this.IN_HEADER)}},{key:"IN_HEADER",value:function(t){return this._onHeader(65535&(this._partialChunkHeader|t.readUInt8()))}},{key:"IN_CHUNK",value:function(t){return this._chunkSize<=t.remaining()?(this._currentMessage.push(t.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=t.remaining(),this._currentMessage.push(t.readSlice(t.remaining())),this.IN_CHUNK)}},{key:"CLOSED",value:function(t){}},{key:"_onHeader",value:function(t){var e;return 0===t?(e=1===this._currentMessage.length?this._currentMessage[0]:new f.default(this._currentMessage),this._currentMessage=[],this.onmessage(e),this.AWAITING_CHUNK):(this._chunkSize=t,this.IN_CHUNK)}},{key:"write",value:function(t){for(;t.hasRemaining();)this._state=this._state(t)}}]),t}();e.Dechunker=d},884:function(t,e,n){"use strict";var r=n(211),i=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.Structure=e.Unpacker=e.Packer=void 0;var o=i(n(195)),u=i(n(12)),s=i(n(13)),a=n(336),c=r(n(192)),l=n(90),f=n(881),h=function(){function t(e,n){(0,u.default)(this,t),this.signature=e,this.fields=n}return(0,s.default)(t,[{key:"toString",value:function(){for(var t="",e=0;e0&&(t+=", "),t+=this.fields[e];return"Structure("+this.signature+", ["+t+"])"}}]),t}();e.Structure=h;var d=function(){function t(e){(0,u.default)(this,t),this._ch=e,this._byteArraysSupported=!0}return(0,s.default)(t,[{key:"packable",value:function(t){var e=this;if(null===t)return function(){return e._ch.writeUInt8(192)};if(!0===t)return function(){return e._ch.writeUInt8(195)};if(!1===t)return function(){return e._ch.writeUInt8(194)};if("number"==typeof t)return function(){return e.packFloat(t)};if("string"==typeof t)return function(){return e.packString(t)};if((0,c.isInt)(t))return function(){return e.packInteger(t)};if(t instanceof Int8Array)return function(){return e.packBytes(t)};if(t instanceof Array)return function(){e.packListHeader(t.length);for(var n=0;n>0),this._ch.writeUInt8(n%256),this._ch.writeBytes(e);else{if(!(n<4294967296))throw(0,l.newError)("UTF-8 strings of size "+n+" are not supported");this._ch.writeUInt8(210),this._ch.writeUInt8((n/16777216>>0)%256),this._ch.writeUInt8((n/65536>>0)%256),this._ch.writeUInt8((n/256>>0)%256),this._ch.writeUInt8(n%256),this._ch.writeBytes(e)}}},{key:"packListHeader",value:function(t){if(t<16)this._ch.writeUInt8(144|t);else if(t<256)this._ch.writeUInt8(212),this._ch.writeUInt8(t);else if(t<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,l.newError)("Lists of size "+t+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256)}}},{key:"packBytes",value:function(t){if(!this._byteArraysSupported)throw(0,l.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(t.length);for(var e=0;e>0)%256),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,l.newError)("Byte arrays of size "+t+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256)}}},{key:"packMapHeader",value:function(t){if(t<16)this._ch.writeUInt8(160|t);else if(t<256)this._ch.writeUInt8(216),this._ch.writeUInt8(t);else if(t<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,l.newError)("Maps of size "+t+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256)}}},{key:"packStructHeader",value:function(t,e){if(t<16)this._ch.writeUInt8(176|t),this._ch.writeUInt8(e);else if(t<256)this._ch.writeUInt8(220),this._ch.writeUInt8(t),this._ch.writeUInt8(e);else{if(!(t<65536))throw(0,l.newError)("Structures of size "+t+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256)}}},{key:"disableByteArrays",value:function(){this._byteArraysSupported=!1}},{key:"_nonPackableValue",value:function(t){return function(){throw(0,l.newError)(t,l.PROTOCOL_ERROR)}}}]),t}();e.Packer=d;var p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(0,u.default)(this,t),this._disableLosslessIntegers=e}return(0,s.default)(t,[{key:"unpack",value:function(t){var e=t.readUInt8(),n=240&e,r=15&e;if(192===e)return null;var i=this._unpackBoolean(e);if(null!==i)return i;var o=this._unpackNumberOrInteger(e,t);if(null!==o)return this._disableLosslessIntegers&&(0,c.isInt)(o)?o.toNumberOrInfinity():o;var u=this._unpackString(e,n,r,t);if(null!==u)return u;var s=this._unpackList(e,n,r,t);if(null!==s)return s;var a=this._unpackByteArray(e,t);if(null!==a)return a;var f=this._unpackMap(e,n,r,t);if(null!==f)return f;var h=this._unpackStruct(e,n,r,t);if(null!==h)return h;throw(0,l.newError)("Unknown packed value with marker "+e.toString(16))}},{key:"unpackInteger",value:function(t){var e=t.readUInt8(),n=this._unpackInteger(e,t);if(null==n)throw(0,l.newError)("Unable to unpack integer value with marker "+e.toString(16));return n}},{key:"_unpackBoolean",value:function(t){return 195===t||194!==t&&null}},{key:"_unpackNumberOrInteger",value:function(t,e){return 193===t?e.readFloat64():this._unpackInteger(t,e)}},{key:"_unpackInteger",value:function(t,e){if(t>=0&&t<128)return(0,c.int)(t);if(t>=240&&t<256)return(0,c.int)(t-256);if(200===t)return(0,c.int)(e.readInt8());if(201===t)return(0,c.int)(e.readInt16());if(202===t){var n=e.readInt32();return(0,c.int)(n)}if(203===t){var r=e.readInt32(),i=e.readInt32();return new c.default(i,r)}return null}},{key:"_unpackString",value:function(t,e,n,r){return 128===e?a.utf8.decode(r,n):208===t?a.utf8.decode(r,r.readUInt8()):209===t?a.utf8.decode(r,r.readUInt16()):210===t?a.utf8.decode(r,r.readUInt32()):null}},{key:"_unpackList",value:function(t,e,n,r){return 144===e?this._unpackListWithSize(n,r):212===t?this._unpackListWithSize(r.readUInt8(),r):213===t?this._unpackListWithSize(r.readUInt16(),r):214===t?this._unpackListWithSize(r.readUInt32(),r):null}},{key:"_unpackListWithSize",value:function(t,e){for(var n=[],r=0;r0?(l=r[c-1])instanceof f.UnboundRelationship&&(r[c-1]=l=l.bind(u.identity,a.identity)):(l=r[-c-1])instanceof f.UnboundRelationship&&(r[-c-1]=l=l.bind(a.identity,u.identity)),o.push(new f.PathSegment(u,l,a)),u=a}return new f.Path(n[0],n[n.length-1],o)}},{key:"_unpackUnknownStruct",value:function(t,e,n){for(var r=new h(t,[]),i=0;i=this._minNumber&&t<=this._maxNumber}},{key:"toString",value:function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")}}]),t}(),f=new l(-999999999,999999999),h=new l(1,12),d=new l(1,31),p=new l(0,23),v=new l(0,59),_=new l(0,59),b=new l(0,999999999);function y(t){var e=(t=(0,u.int)(t)).div(36e11),n=(t=t.subtract(e.multiply(36e11))).div(6e10),r=(t=t.subtract(n.multiply(6e10))).div(1e9),i=t.subtract(r.multiply(1e9));return new s.LocalTime(e,n,r,i)}function m(t,e,n){t=(0,u.int)(t),e=(0,u.int)(e),n=(0,u.int)(n);var r=t.multiply(365);return r=(r=(r=t.greaterThanOrEqual(0)?r.add(t.add(3).div(4).subtract(t.add(99).div(100)).add(t.add(399).div(400))):r.subtract(t.div(-4).subtract(t.div(-100)).add(t.div(-400)))).add(e.multiply(367).subtract(362).div(12))).add(n.subtract(1)),e.greaterThan(2)&&(r=r.subtract(1),function(t){return!!(t=(0,u.int)(t)).modulo(4).equals(0)&&(!t.modulo(100).equals(0)||!!t.modulo(400).equals(0))}(t)||(r=r.subtract(1))),r.subtract(719528)}function g(t){var e=(t=(0,u.int)(t)).add(719528).subtract(60),n=(0,u.int)(0);if(e.lessThan(0)){var r=e.add(1).div(146097).subtract(1);n=r.multiply(400),e=e.add(r.multiply(-146097))}var i=e.multiply(400).add(591).div(146097),o=e.subtract(i.multiply(365).add(i.div(4)).subtract(i.div(100)).add(i.div(400)));o.lessThan(0)&&(i=i.subtract(1),o=e.subtract(i.multiply(365).add(i.div(4)).subtract(i.div(100)).add(i.div(400)))),i=i.add(n);var a=o,c=a.multiply(5).add(2).div(153),l=c.add(2).modulo(12).add(1),f=a.subtract(c.multiply(306).add(5).div(10)).add(1);return i=i.add(c.div(10)),new s.Date(i,l,f)}function w(t,e,n){if((0,a.assertNumberOrInteger)(t,n),!e.contains(t))throw(0,c.newError)("".concat(n," is expected to be in range ").concat(e," but was: ").concat(t));return t}function k(t,e){t=(0,u.int)(t),e=(0,u.int)(e);var n=t.div(e);return t.isPositive()!==e.isPositive()&&n.multiply(e).notEquals(t)&&(n=n.subtract(1)),n}function E(t,e){return t=(0,u.int)(t),e=(0,u.int)(e),t.subtract(k(t,e).multiply(e))}function S(t){return(t=(0,u.int)(t)).equals(0)?"":"."+O(t,9)}function O(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=(t=(0,u.int)(t)).isNegative();n&&(t=t.negate());var r=t.toString();if(e)for(;r.length0&&void 0!==arguments[0]?arguments[0]:{},e=t.userAgent,n=t.authToken,r=t.onError,i=t.onComplete,o=new h.LoginObserver({connection:this._connection,afterError:r,afterComplete:i});return this._connection.write(l.default.hello(e,n),o,!0),o}},{key:"prepareToClose",value:function(){this._connection.write(l.default.goodbye(),p,!0)}},{key:"beginTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.bookmark,n=t.txConfig,r=t.database,i=t.mode,o=t.beforeError,u=t.afterError,s=t.beforeComplete,a=t.afterComplete,c=new h.ResultStreamObserver({connection:this._connection,beforeError:o,afterError:u,beforeComplete:s,afterComplete:a});return c.prepareToHandleSingleResponse(),(0,f.assertDatabaseIsEmpty)(r,this._connection,c),this._connection.write(l.default.begin({bookmark:e,txConfig:n,mode:i}),c,!0),c}},{key:"commitTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.beforeError,n=t.afterError,r=t.beforeComplete,i=t.afterComplete,o=new h.ResultStreamObserver({connection:this._connection,beforeError:e,afterError:n,beforeComplete:r,afterComplete:i});return o.prepareToHandleSingleResponse(),this._connection.write(l.default.commit(),o,!0),o}},{key:"rollbackTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.beforeError,n=t.afterError,r=t.beforeComplete,i=t.afterComplete,o=new h.ResultStreamObserver({connection:this._connection,beforeError:e,afterError:n,beforeComplete:r,afterComplete:i});return o.prepareToHandleSingleResponse(),this._connection.write(l.default.rollback(),o,!0),o}},{key:"run",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.bookmark,i=n.txConfig,o=n.database,u=n.mode,s=n.beforeKeys,a=n.afterKeys,c=n.beforeError,d=n.afterError,p=n.beforeComplete,v=n.afterComplete,_=n.flush,b=void 0===_||_,y=new h.ResultStreamObserver({connection:this._connection,beforeKeys:s,afterKeys:a,beforeError:c,afterError:d,beforeComplete:p,afterComplete:v});return(0,f.assertDatabaseIsEmpty)(o,this._connection,y),this._connection.write(l.default.runWithMetadata(t,e,{bookmark:r,txConfig:i,mode:u}),y,!1),this._connection.write(l.default.pullAll(),y,b),y}},{key:"version",get:function(){return d.BOLT_PROTOCOL_V3}}]),e}(c.default);e.default=v},890:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=r(n(18)),s=r(n(17)),a=r(n(19)),c=function(t){function e(t,n){var r;return(0,i.default)(this,e),r=(0,u.default)(this,(0,s.default)(e).call(this,n)),n&&(r._originalErrorHandler=t._errorHandler,t._errorHandler=r._errorHandler),r._delegate=t,r}return(0,a.default)(e,t),(0,o.default)(e,[{key:"isOpen",value:function(){return this._delegate.isOpen()}},{key:"protocol",value:function(){return this._delegate.protocol()}},{key:"connect",value:function(t,e){return this._delegate.connect(t,e)}},{key:"write",value:function(t,e,n){return this._delegate.write(t,e,n)}},{key:"resetAndFlush",value:function(){return this._delegate.resetAndFlush()}},{key:"close",value:function(){return this._delegate.close()}},{key:"_release",value:function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate._release()}},{key:"id",get:function(){return this._delegate.id}},{key:"databaseId",get:function(){return this._delegate.databaseId},set:function(t){this._delegate.databaseId=t}},{key:"server",get:function(){return this._delegate.server}},{key:"address",get:function(){return this._delegate.address}},{key:"version",get:function(){return this._delegate.version},set:function(t){this._delegate.version=t}}]),e}(r(n(478)).default);e.default=c},891:function(t,e,n){"use strict";var r=n(211),i=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n(12)),u=i(n(13)),s=i(n(642)),a=n(167),c=r(n(477)),l=i(n(267)),f=i(n(421)),h=n(229),d=n(90),p=function(){function t(e){var n=e.connectionHolder,r=e.onClose,i=e.onBookmark,u=e.reactive,s=e.fetchSize;(0,o.default)(this,t),this._connectionHolder=n,this._reactive=u,this._state=v.ACTIVE,this._onClose=r,this._onBookmark=i,this._onError=this._onErrorCallback.bind(this),this._onComplete=this._onCompleteCallback.bind(this),this._fetchSize=s,this._results=[]}return(0,u.default)(t,[{key:"_begin",value:function(t,e){var n=this;this._connectionHolder.getConnection().then((function(r){return r.protocol().beginTransaction({bookmark:t,txConfig:e,mode:n._connectionHolder.mode(),database:n._connectionHolder.database(),beforeError:n._onError,afterComplete:n._onComplete})})).catch((function(t){return n._onError(t)}))}},{key:"run",value:function(t,e){var n=(0,a.validateQueryAndParameters)(t,e),r=n.validatedQuery,i=n.params,o=this._state.run(r,i,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,reactive:this._reactive,fetchSize:this._fetchSize});return this._results.push(o),o}},{key:"commit",value:function(){var t=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,pendingResults:this._results});return this._state=t.state,this._onClose(),new Promise((function(e,n){t.result.subscribe({onCompleted:function(){return e()},onError:function(t){return n(t)}})}))}},{key:"rollback",value:function(){var t=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,pendingResults:this._results});return this._state=t.state,this._onClose(),new Promise((function(e,n){t.result.subscribe({onCompleted:function(){return e()},onError:function(t){return n(t)}})}))}},{key:"isOpen",value:function(){return this._state===v.ACTIVE}},{key:"_onErrorCallback",value:function(t){return this._state=v.FAILED,this._onClose(),this._connectionHolder.releaseConnection()}},{key:"_onCompleteCallback",value:function(t){this._onBookmark(new l.default(t.bookmark))}}]),t}(),v={ACTIVE:{commit:function(t){return{result:_(!0,t.connectionHolder,t.onError,t.onComplete,t.pendingResults),state:v.SUCCEEDED}},rollback:function(t){return{result:_(!1,t.connectionHolder,t.onError,t.onComplete,t.pendingResults),state:v.ROLLED_BACK}},run:function(t,e,n){var r=n.connectionHolder,i=n.onError,o=n.onComplete,u=n.reactive,s=n.fetchSize;return b(r.getConnection().then((function(n){return n.protocol().run(t,e,{bookmark:l.default.empty(),txConfig:f.default.empty(),beforeError:i,afterComplete:o,reactive:u,fetchSize:s})})).catch((function(t){return new h.FailedObserver({error:t,onError:i})})),t,e)}},FAILED:{commit:function(t){t.connectionHolder;var e=t.onError;t.onComplete;return{result:b(new h.FailedObserver({error:(0,d.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:e}),"COMMIT",{}),state:v.FAILED}},rollback:function(t){t.connectionHolder,t.onError,t.onComplete;return{result:b(new h.CompletedObserver,"ROLLBACK",{}),state:v.FAILED}},run:function(t,e,n){n.connectionHolder;var r=n.onError;n.onComplete,n.reactive;return b(new h.FailedObserver({error:(0,d.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),t,e)}},SUCCEEDED:{commit:function(t){t.connectionHolder;var e=t.onError;t.onComplete;return{result:b(new h.FailedObserver({error:(0,d.newError)("Cannot commit this transaction, because it has already been committed."),onError:e}),"COMMIT",{}),state:v.SUCCEEDED}},rollback:function(t){t.connectionHolder;var e=t.onError;t.onComplete;return{result:b(new h.FailedObserver({error:(0,d.newError)("Cannot rollback this transaction, because it has already been committed."),onError:e}),"ROLLBACK",{}),state:v.SUCCEEDED}},run:function(t,e,n){n.connectionHolder;var r=n.onError;n.onComplete,n.reactive;return b(new h.FailedObserver({error:(0,d.newError)("Cannot run query in this transaction, because it has already been committed."),onError:r}),t,e)}},ROLLED_BACK:{commit:function(t){t.connectionHolder;var e=t.onError;t.onComplete;return{result:b(new h.FailedObserver({error:(0,d.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:e}),"COMMIT",{}),state:v.ROLLED_BACK}},rollback:function(t){t.connectionHolder,t.onError,t.onComplete;return{result:b(new h.FailedObserver({error:(0,d.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{}),state:v.ROLLED_BACK}},run:function(t,e,n){n.connectionHolder;var r=n.onError;n.onComplete,n.reactive;return b(new h.FailedObserver({error:(0,d.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:r}),t,e)}}};function _(t,e,n,r,i){var o=e.getConnection().then((function(e){return i.forEach((function(t){return t._cancel()})),Promise.all(i).then((function(i){return t?e.protocol().commitTransaction({beforeError:n,afterComplete:r}):e.protocol().rollbackTransaction({beforeError:n,afterComplete:r})}))})).catch((function(t){return new h.FailedObserver({error:t,onError:n})}));return new s.default(o,t?"COMMIT":"ROLLBACK",{},e)}function b(t,e,n){return new s.default(Promise.resolve(t),e,n,c.EMPTY_CONNECTION_HOLDER)}var y=p;e.default=y},892:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=n(90),s=(r(n(643)),n(508)),a=n(695),c=(r(n(644)),0),l=1,f=2,h=function(){function t(e){(0,i.default)(this,t);var n=e.pipe((0,a.publishReplay)(1),(0,a.refCount)());this._result=n,this._keys=n.pipe((0,a.flatMap)((function(t){return(0,s.from)(t.keys())})),(0,a.publishReplay)(1),(0,a.refCount)()),this._records=new s.Subject,this._summary=new s.ReplaySubject,this._state=c}return(0,o.default)(t,[{key:"keys",value:function(){return this._keys}},{key:"records",value:function(){var t=this;return this._result.pipe((0,a.flatMap)((function(e){return new s.Observable((function(n){return t._startStreaming({result:e,recordsObserver:n})}))})))}},{key:"consume",value:function(){var t=this;return this._result.pipe((0,a.flatMap)((function(e){return new s.Observable((function(n){return t._startStreaming({result:e,summaryObserver:n})}))})))}},{key:"_startStreaming",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.result,r=e.recordsObserver,i=void 0===r?null:r,o=e.summaryObserver,s=void 0===o?null:o,a=[];return s&&a.push(this._summary.subscribe(s)),this._state0&&void 0!==arguments[0]?arguments[0]:{},n=e.database,r=e.routers,i=e.readers,u=e.writers,a=e.expirationTime;(0,o.default)(this,t),this.database=n,this.databaseName=n||"default database",this.routers=r||[],this.readers=i||[],this.writers=u||[],this.expirationTime=a||(0,s.int)(0)}return(0,u.default)(t,[{key:"forget",value:function(t){this.readers=l(this.readers,t),this.writers=l(this.writers,t)}},{key:"forgetRouter",value:function(t){this.routers=l(this.routers,t)}},{key:"forgetWriter",value:function(t){this.writers=l(this.writers,t)}},{key:"isStaleFor",value:function(t){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||t===a.READ&&0===this.readers.length||t===a.WRITE&&0===this.writers.length}},{key:"isExpiredFor",value:function(t){return this.expirationTime.add(t).lessThan(Date.now())}},{key:"allServers",value:function(){return[].concat((0,i.default)(this.routers),(0,i.default)(this.readers),(0,i.default)(this.writers))}},{key:"toString",value:function(){return"RoutingTable["+"database=".concat(this.databaseName,", ")+"expirationTime=".concat(this.expirationTime,", ")+"currentTime=".concat(Date.now(),", ")+"routers=[".concat(this.routers,"], ")+"readers=[".concat(this.readers,"], ")+"writers=[".concat(this.writers,"]]")}}]),t}();function l(t,e){return t.filter((function(t){return t.asKey()!==e.asKey()}))}e.default=c},894:function(t,e,n){"use strict";var r=n(211),i=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n(268)),u=i(n(269)),s=i(n(12)),a=i(n(13)),c=n(90),l=r(n(192)),f=n(895),h=(i(n(267)),i(n(480)),i(n(421))),d=i(n(653)),p="CALL dbms.cluster.routing.getRoutingTable($".concat("context",")"),v="CALL dbms.routing.getRoutingTable($".concat("context",", $").concat("database",")"),_=function(){function t(e){(0,s.default)(this,t),this._routingContext=e}var e;return(0,a.default)(t,[{key:"callRoutingProcedure",value:(e=(0,u.default)(o.default.mark((function t(e,n,r){var i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._callAvailableRoutingProcedure(e,n);case 3:return i=t.sent,t.next=6,e.close();case 6:return t.abrupt("return",i.records);case 9:if(t.prev=9,t.t0=t.catch(0),"Neo.ClientError.Database.DatabaseNotFound"!==t.t0.code){t.next=15;break}throw t.t0;case 15:if("Neo.ClientError.Procedure.ProcedureNotFound"!==t.t0.code){t.next=19;break}throw(0,c.newError)("Server at ".concat(r.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),c.SERVICE_UNAVAILABLE);case 19:return t.abrupt("return",null);case 20:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(t,n,r){return e.apply(this,arguments)})},{key:"parseTtl",value:function(t,e){try{var n=(0,l.int)(Date.now()),r=(0,l.int)(t.get("ttl")).multiply(1e3).add(n);return r.lessThan(n)?l.default.MAX_VALUE:r}catch(n){throw(0,c.newError)("Unable to parse TTL entry from router ".concat(e," from record:\n").concat(JSON.stringify(t),"\nError message: ").concat(n.message),c.PROTOCOL_ERROR)}}},{key:"parseServers",value:function(t,e){try{var n=t.get("servers"),r=[],i=[],o=[];return n.forEach((function(t){var e=t.role,n=t.addresses;if("ROUTE"===e)r=b(n).map((function(t){return d.default.fromUrl(t)}));else if("WRITE"===e)o=b(n).map((function(t){return d.default.fromUrl(t)}));else{if("READ"!==e)throw(0,c.newError)('Unknown server role "'+e+'"',c.PROTOCOL_ERROR);i=b(n).map((function(t){return d.default.fromUrl(t)}))}})),{routers:r,readers:i,writers:o}}catch(n){throw(0,c.newError)("Unable to parse servers entry from router ".concat(e," from record:\n").concat(JSON.stringify(t),"\nError message: ").concat(n.message),c.PROTOCOL_ERROR)}}},{key:"_callAvailableRoutingProcedure",value:function(t,e){var n=this;return t._run(null,null,(function(r){var i,o;return f.ServerVersion.fromString(r.version).compareTo(f.VERSION_4_0_0)>=0?(i=v,o={context:n._routingContext,database:e||null}):(i=p,o={context:n._routingContext}),r.protocol().run(i,o,{bookmark:t._lastBookmark,txConfig:h.default.empty(),mode:t._mode,database:t._database,afterComplete:t._onComplete})}))}}]),t}();function b(t){if(!Array.isArray(t))throw new TypeError("Array expected but got: "+t);return Array.from(t)}e.default=_},895:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION_IN_DEV=e.VERSION_4_0_0=e.VERSION_3_5_0=e.VERSION_3_4_0=e.VERSION_3_2_0=e.ServerVersion=void 0;var i=r(n(12)),o=r(n(13)),u=n(167),s=new RegExp("^(Neo4j/)?(\\d+)\\.(\\d+)(?:\\.)?(\\d*)(\\.|-|\\+)?([0-9A-Za-z-.]*)?$"),a=function(){function t(e,n,r,o){(0,i.default)(this,t),this.major=e,this.minor=n,this.patch=r,this._originalVersionString=o}return(0,o.default)(t,[{key:"compareTo",value:function(t){var e=l(this.major,t.major);return 0===e&&0===(e=l(this.minor,t.minor))&&(e=l(this.patch,t.patch)),e}},{key:"toString",value:function(){return this._originalVersionString?this._originalVersionString:"".concat(this.major,".").concat(this.minor,".").concat(this.patch)}}],[{key:"fromDriver",value:function(e){var n=e.session();return n.run("RETURN 1").then((function(e){return n.close().then((function(){return t.fromString(e.summary.server.version)}))}))}},{key:"fromString",value:function(e){if(!e)return new t(3,0,0);if((0,u.assertString)(e,"Neo4j version string"),e.toLowerCase()==="Neo4j/dev".toLowerCase())return _;var n=e.match(s);if(!n)throw new Error("Unparsable Neo4j version: ".concat(e));return new t(c(n[2]),c(n[3]),c(n[4]||0),e)}}]),t}();function c(t,e){var n=parseInt(t,10);if(!n&&0!==n)throw new Error("Unparsable number ".concat(e,": '").concat(t,"'"));return n}function l(t,e){return t=0?c(t):t}(i),h=function(t,e){var n=parseInt(t,10);return 0===n||n?n:l(e)}(n.port,r),d="".concat(f,":").concat(h),p=function(t,e){var n=function(t){(t=(t||"").trim())&&"?"===t.charAt(0)&&(t=t.substring(1,t.length));return t}(t),r={};n&&n.split("&").forEach((function(t){var n=t.split("=");if(2!==n.length)throw new Error("Invalid parameters: '".concat(n,"' in URL '").concat(e,"'."));var i=a(n[0],"key",e),o=a(n[1],"value",e);if(r[i])throw new Error("Duplicated query parameters with key '".concat(i,"' in URL '").concat(e,"'"));r[i]=o}));return r}(n.query,t);return new s(r,i,h,d,p)},defaultPortForScheme:l,formatIPv4Address:function(t,e){return"".concat(t,":").concat(e)},formatIPv6Address:function(t,e){var n=c(t);return"".concat(n,":").concat(e)}};e.default=f},897:function(t,e,n){"use strict";var r=n(38);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(12)),o=r(n(13)),u=r(n(18)),s=r(n(17)),a=r(n(19)),c=r(n(1680)),l=function(t){function e(t){var n;return(0,i.default)(this,e),(n=(0,u.default)(this,(0,s.default)(e).call(this)))._readersIndex=new c.default,n._writersIndex=new c.default,n._connectionPool=t,n}return(0,a.default)(e,t),(0,o.default)(e,[{key:"selectReader",value:function(t){return this._select(t,this._readersIndex)}},{key:"selectWriter",value:function(t){return this._select(t,this._writersIndex)}},{key:"_select",value:function(t,e){var n=t.length;if(0===n)return null;var r=e.next(n),i=r,o=null,u=Number.MAX_SAFE_INTEGER;do{var s=t[i],a=this._connectionPool.activeResourceCount(s);a1&&void 0!==arguments[1]?arguments[1]:"N/A";return new c(t,e)},e.PROTOCOL_ERROR=e.SESSION_EXPIRED=e.SERVICE_UNAVAILABLE=e.Neo4jError=void 0;var i=r(n(12)),o=r(n(18)),u=r(n(17)),s=r(n(19)),a=r(n(1648));e.SERVICE_UNAVAILABLE="ServiceUnavailable";e.SESSION_EXPIRED="SessionExpired";e.PROTOCOL_ERROR="ProtocolError";var c=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"N/A";return(0,i.default)(this,e),(n=(0,o.default)(this,(0,u.default)(e).call(this,t))).message=t,n.code=r,n.name="Neo4jError",n}return(0,s.default)(e,t),e}((0,a.default)(Error));e.Neo4jError=c}}]);