!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.NeoVis=e():t.NeoVis=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=394)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return r})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return C}));var i=n(0),r=n(47),o=n(92),g=n(7),s=n(68),A=n(26),a=n(61),C=function(t){function e(n,i,r){var g=t.call(this)||this;switch(g.syncErrorValue=null,g.syncErrorThrown=!1,g.syncErrorThrowable=!1,g.isStopped=!1,arguments.length){case 0:g.destination=o.a;break;case 1:if(!n){g.destination=o.a;break}if("object"==typeof n){n instanceof e?(g.syncErrorThrowable=n.syncErrorThrowable,g.destination=n,n.add(g)):(g.syncErrorThrowable=!0,g.destination=new I(g,n));break}default:g.syncErrorThrowable=!0,g.destination=new I(g,n,i,r)}return g}return i.a(e,t),e.prototype[s.a]=function(){return this},e.create=function(t,n,i){var r=new e(t,n,i);return r.syncErrorThrowable=!1,r},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}(g.a),I=function(t){function e(e,n,i,g){var s,A=t.call(this)||this;A._parentSubscriber=e;var a=A;return Object(r.a)(n)?s=n:n&&(s=n.next,i=n.error,g=n.complete,n!==o.a&&(a=Object.create(n),Object(r.a)(a.unsubscribe)&&A.add(a.unsubscribe.bind(a)),a.unsubscribe=A.unsubscribe.bind(A))),A._context=a,A._next=s,A._error=i,A._complete=g,A}return i.a(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(a.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(a.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(a.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(a.a)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(C)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return A})),n.d(e,"c",(function(){return a}));var i=n(0),r=n(1),o=n(3),g=n(60),s=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return i.a(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(r.a),A=(r.a,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.a(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(r.a));r.a;function a(t,e){if(!e.closed)return t instanceof o.a?t.subscribe(e):Object(g.a)(t)(e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return C}));var i=n(90),r=n(1),o=n(68),g=n(92);var s=n(40),A=n(66),a=n(26),C=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var i=this.operator,s=function(t,e,n){if(t){if(t instanceof r.a)return t;if(t[o.a])return t[o.a]()}return t||e||n?new r.a(t,e,n):new r.a(g.a)}(t,e,n);if(i?s.add(i.call(s,this.source)):s.add(this.source||a.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),a.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){a.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),Object(i.a)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=I(e))((function(e,i){var r;r=n.subscribe((function(e){try{t(e)}catch(t){i(t),r&&r.unsubscribe()}}),i,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[s.a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e1&&void 0!==arguments[1]?arguments[1]:"N/A";return new a(t,e)},e.PROTOCOL_ERROR=e.SESSION_EXPIRED=e.SERVICE_UNAVAILABLE=e.Neo4jError=void 0;var r=i(n(5)),o=i(n(16)),g=i(n(12)),s=i(n(17)),A=i(n(355));e.SERVICE_UNAVAILABLE="ServiceUnavailable";e.SESSION_EXPIRED="SessionExpired";e.PROTOCOL_ERROR="ProtocolError";var a=function(t){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"N/A";return(0,r.default)(this,e),(n=(0,o.default)(this,(0,g.default)(e).call(this,t))).message=t,n.code=i,n.name="Neo4jError",n}return(0,s.default)(e,t),e}((0,A.default)(Error));e.Neo4jError=a},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),r=n(1);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 g(t,e))}}var g=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,i){var r=t.call(this,e)||this;return r.project=n,r.count=0,r.thisArg=i||r,r}return i.a(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}(r.a)},function(t,e,n){"use strict";function i(t){return t&&"function"==typeof t.schedule}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(21),r=n(96).f,o=n(190),g=n(23),s=n(97),A=n(49),a=n(44),C=function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,I,u,c,l,h,d,f,p=t.target,v=t.global,y=t.stat,b=t.proto,m=v?i:y?i[p]:(i[p]||{}).prototype,w=v?g:g[p]||(g[p]={}),_=w.prototype;for(u in e)n=!o(v?u:p+(y?".":"#")+u,t.forced)&&m&&a(m,u),l=w[u],n&&(h=t.noTargetGet?(f=r(m,u))&&f.value:m[u]),c=n&&h?h:e[u],n&&typeof l==typeof c||(d=t.bind&&n?s(c,i):t.wrap&&n?C(c):b&&"function"==typeof c?s(Function.call,c):c,(t.sham||c&&c.sham||l&&l.sham)&&A(d,"sham",!0),w[u]=d,b&&(a(g,I=p+"Prototype")||A(g,I,{}),g[I][u]=c,t.real&&_&&!_[u]&&A(_,u,c)))}},function(t,e,n){var i=n(122),r=n(123);t.exports=function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?r(t):e}},function(t,e,n){var i=n(167);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var i=n(3),r=new i.a((function(t){return t.complete()}));function o(t){return t?function(t){return new i.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):r}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i=n(3),r=n(60),o=n(138);function g(t,e){return e?Object(o.a)(t,e):t instanceof i.a?t:new i.a(Object(r.a)(t))}},function(t,e,n){var i=n(23),r=n(44),o=n(166),g=n(57).f;t.exports=function(t){var e=i.Symbol||(i.Symbol={});r(e,t)||g(e,t,{value:o.f(t)})}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(152))},function(t,e,n){var i=n(21),r=n(154),o=n(44),g=n(155),s=n(158),A=n(192),a=r("wks"),C=i.Symbol,I=A?C:C&&C.withoutSetter||g;t.exports=function(t){return o(a,t)||(s&&o(C,t)?a[t]=C[t]:a[t]=I("Symbol."+t)),a[t]}},function(t,e){t.exports={}},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.isEmptyObjectOrNull=function(t){if(null===t)return!0;if(!g(t))return!1;for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},e.isObject=g,e.isString=A,e.assertObject=function(t,e){if(!g(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,i=e||{};"object"===(0,r.default)(t)&&t.text&&(n=t.text,i=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(!g(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))}}(i),{validatedQuery:n,params:i}},e.ENCRYPTION_OFF=e.ENCRYPTION_ON=void 0;var r=i(n(122)),o=n(38);e.ENCRYPTION_ON="ENCRYPTION_ON";function g(t){return"object"===(0,r.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"},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=function(t){function e(e,n,i){var r=t.call(this)||this;return r.parent=e,r.outerValue=n,r.outerIndex=i,r.index=0,r}return i.a(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(1).a),o=n(60),g=n(3);function s(t,e,n,i,s){if(void 0===s&&(s=new r(t,n,i)),!s.closed)return e instanceof g.a?e.subscribe(s):Object(o.a)(e)(s)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=!1,r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;i=t},get useDeprecatedSynchronousErrorHandling(){return i}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";function i(t){return t}n.d(e,"a",(function(){return i}))},function(t,e,n){var i=n(27);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.a(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(1).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),r=n(1);function o(t,e){return function(n){return n.lift(new g(t,e))}}var g=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,i){var r=t.call(this,e)||this;return r.predicate=n,r.thisArg=i,r.count=0,r}return i.a(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}(r.a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return s}));var i,r=n(18),o=n(65),g=n(84);i||(i={});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(g.a)(this.error);case"C":return Object(r.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}()},function(t,e,n){var i=n(217);t.exports=function(t,e,n){return e in t?i(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";function i(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return r}));var r=i()},function(t,e,n){"use strict";function i(){}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";(function(t){var i=n(4),r=n(37);Object.defineProperty(e,"__esModule",{value:!0}),e.driver=v,Object.defineProperty(e,"int",{enumerable:!0,get:function(){return o.int}}),Object.defineProperty(e,"isInt",{enumerable:!0,get:function(){return o.isInt}}),Object.defineProperty(e,"Neo4jError",{enumerable:!0,get:function(){return s.Neo4jError}}),Object.defineProperty(e,"isPoint",{enumerable:!0,get:function(){return d.isPoint}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return f.isDate}}),Object.defineProperty(e,"isDateTime",{enumerable:!0,get:function(){return f.isDateTime}}),Object.defineProperty(e,"isDuration",{enumerable:!0,get:function(){return f.isDuration}}),Object.defineProperty(e,"isLocalDateTime",{enumerable:!0,get:function(){return f.isLocalDateTime}}),Object.defineProperty(e,"isLocalTime",{enumerable:!0,get:function(){return f.isLocalTime}}),Object.defineProperty(e,"isTime",{enumerable:!0,get:function(){return f.isTime}}),e.default=e.temporal=e.spatial=e.error=e.session=e.types=e.logging=e.auth=e.integer=void 0;var o=r(n(38)),g=n(218),s=n(11),A=i(n(168)),a=i(n(169)),C=i(n(170)),I=n(81),u=i(n(380)),c=i(n(393)),l=n(24),h=i(n(238)),d=n(229),f=n(175),p=i(n(179));function v(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,l.assertString)(t,"Bolt URL");var i,r=h.default.parseDatabaseUrl(t),o=!1,g=!1;switch(r.scheme){case"bolt":break;case"bolt+s":g=!0,i="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":g=!0,i="TRUST_ALL_CERTIFICATES";break;case"neo4j":o=!0;break;case"neo4j+s":g=!0,i="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",o=!0;break;case"neo4j+ssc":g=!0,i="TRUST_ALL_CERTIFICATES",o=!0;break;default:throw new Error("Unknown scheme: ".concat(r.scheme))}if(g){if("encrypted"in n||"trust"in n)throw new Error("Encryption/trust can only be configured either through URL or config, not both");n.encrypted=l.ENCRYPTION_ON,n.trust=i}if((e=e||{}).scheme=e.scheme||"none",n.userAgent=n.userAgent||b,o)return new u.default(p.default.fromUrl(r.hostAndPort),r.query,n.userAgent,e,n);if(!(0,l.isEmptyObjectOrNull)(r.query))throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(t,"'"));return new I.Driver(p.default.fromUrl(r.hostAndPort),n.userAgent,e,n)}var y={basic:function(t,e){var n=arguments.length>2&&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,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return r?{scheme:i,principal:t,credentials:e,realm:n,parameters:r}:{scheme:i,principal:t,credentials:e,realm:n}}};e.auth=y;var b="neo4j-javascript/"+c.default,m={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))}}}))};e.logging=m;var w={Node:g.Node,Relationship:g.Relationship,UnboundRelationship:g.UnboundRelationship,PathSegment:g.PathSegment,Path:g.Path,Result:A.default,ResultSummary:a.default,Record:C.default,Point:d.Point,Date:f.Date,DateTime:f.DateTime,Duration:f.Duration,LocalDateTime:f.LocalDateTime,LocalTime:f.LocalTime,Time:f.Time,Integer:o.default};e.types=w;var _={READ:I.READ,WRITE:I.WRITE};e.session=_;var k={SERVICE_UNAVAILABLE:s.SERVICE_UNAVAILABLE,SESSION_EXPIRED:s.SESSION_EXPIRED,PROTOCOL_ERROR:s.PROTOCOL_ERROR};e.error=k;var x={toNumber:o.toNumber,toString:o.toString,inSafeRange:o.inSafeRange};e.integer=x;var O={isPoint:d.isPoint};e.spatial=O;var E={isDuration:f.isDuration,isLocalTime:f.isLocalTime,isTime:f.isTime,isDate:f.isDate,isLocalDateTime:f.isLocalDateTime,isDateTime:f.isDateTime};e.temporal=E;var T={driver:v,int:o.int,isInt:o.isInt,isPoint:d.isPoint,isDuration:f.isDuration,isLocalTime:f.isLocalTime,isTime:f.isTime,isDate:f.isDate,isLocalDateTime:f.isLocalDateTime,isDateTime:f.isDateTime,integer:x,Neo4jError:s.Neo4jError,auth:y,logging:m,types:w,session:_,error:k,spatial:O,temporal:E};e.default=T}).call(this,n(152))},function(t,e,n){var i=n(122);function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var e=r();if(e&&e.has(t))return e.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in t)if(Object.prototype.hasOwnProperty.call(t,g)){var s=o?Object.getOwnPropertyDescriptor(t,g):null;s&&(s.get||s.set)?Object.defineProperty(n,g,s):n[g]=t[g]}return n.default=t,e&&e.set(t,n),n}},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=void 0;var r=i(n(5)),o=i(n(6)),g=n(11),s=function(){function t(e,n){(0,r.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*a+(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 i=t.fromNumber(e),r=this.div(i);return n=r.multiply(i).subtract(this),r.toString(e)+n.toInt().toString(e)}return"-"+this.negate().toString(e)}var o=t.fromNumber(Math.pow(e,6));n=this;for(var g="";;){var s=n.div(o),A=(n.subtract(s.multiply(o)).toInt()>>>0).toString(e);if((n=s).isZero())return A+g;for(;A.length<6;)A="0"+A;g=""+A+g}}},{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(),i=e.isNegative();return n&&!i?-1:!n&&i?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,i=65535&this.high,r=this.low>>>16,o=65535&this.low,g=e.high>>>16,s=65535&e.high,A=e.low>>>16,a=0,C=0,I=0,u=0;return I+=(u+=o+(65535&e.low))>>>16,u&=65535,C+=(I+=r+A)>>>16,I&=65535,a+=(C+=i+s)>>>16,C&=65535,a+=n+g,a&=65535,t.fromBits(I<<16|u,a<<16|C)}},{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(I)&&e.lessThan(I))return t.fromNumber(this.toNumber()*e.toNumber());var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,o=65535&this.low,g=e.high>>>16,s=65535&e.high,A=e.low>>>16,a=65535&e.low,C=0,u=0,c=0,l=0;return c+=(l+=o*a)>>>16,l&=65535,u+=(c+=r*a)>>>16,c&=65535,u+=(c+=o*A)>>>16,c&=65535,C+=(u+=i*a)>>>16,u&=65535,C+=(u+=r*A)>>>16,u&=65535,C+=(u+=o*s)>>>16,u&=65535,C+=n*a+i*A+r*s+o*g,C&=65535,t.fromBits(c<<16|l,C<<16|u)}},{key:"div",value:function(e){if(t.isInteger(e)||(e=t.fromValue(e)),e.isZero())throw(0,g.newError)("division by zero");if(this.isZero())return t.ZERO;var n,i,r;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:(i=this.subtract(e.multiply(n)),r=n.add(i.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(r=t.ZERO,i=this;i.greaterThanOrEqual(e);){n=Math.max(1,Math.floor(i.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),a=A.multiply(e);a.isNegative()||a.greaterThan(i);)n-=s,a=(A=t.fromNumber(n)).multiply(e);A.isZero()&&(A=t.ONE),r=r.add(A),i=i.subtract(a)}return r}},{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<=-C?s.MIN_VALUE:t+1>=C?s.MAX_VALUE:t<0?s.fromNumber(-t).negate():new s(t%a|0,t/a|0)},s.fromBits=function(t,e){return new s(t,e)},s.fromString=function(t,e){if(0===t.length)throw(0,g.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,g.newError)("radix out of range: "+e);var n;if((n=t.indexOf("-"))>0)throw(0,g.newError)('number format error: interior "-" character: '+t);if(0===n)return s.fromString(t.substring(1),e).negate();for(var i=s.fromNumber(Math.pow(e,8)),r=s.ZERO,o=0;o0&&void 0!==arguments[0]?arguments[0]:{},i=n.connection,r=n.reactive,o=void 0!==r&&r,A=n.moreFunction,C=n.discardFunction,I=n.fetchSize,u=void 0===I?c.ALL:I,l=n.beforeError,h=n.afterError,d=n.beforeKeys,f=n.afterKeys,p=n.beforeComplete,v=n.afterComplete;return(0,a.default)(this,e),(t=(0,g.default)(this,(0,s.default)(e).call(this)))._connection=i,t._fieldKeys=null,t._fieldLookup=null,t._head=null,t._queuedRecords=[],t._tail=null,t._error=null,t._observers=[],t._meta={},t._beforeError=l,t._afterError=h,t._beforeKeys=d,t._afterKeys=f,t._beforeComplete=p,t._afterComplete=v,t._queryId=null,t._moreFunction=A,t._discardFunction=C,t._discard=!1,t._fetchSize=u,t._setState(o?y.READY:y.READY_STREAMING),t._setupAuoPull(u),t}return(0,A.default)(e,t),(0,C.default)(e,[{key:"onNext",value:function(t){var e=new I.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),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))}},{key:"onCompleted",value:function(t){this._state.onSuccess(this,t)}},{key:"onError",value:function(t){this._state.onError(this,t)}},{key:"cancel",value:function(){this._discard=!0}},{key:"prepareToHandleSingleResponse",value:function(){this._head=[],this._fieldKeys=[],this._setState(y.STREAMING)}},{key:"markCompleted",value:function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(y.SUCCEEDED)}},{key:"subscribe",value:function(t){if(this._error)t.onError(this._error);else{if(this._head&&t.onKeys&&t.onKeys(this._head),this._queuedRecords.length>0&&t.onNext)for(var e=0;e0){this._fieldKeys=t.fields;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i=n.connection,r=n.beforeError,o=n.afterError,A=n.beforeComplete,C=n.afterComplete;return(0,a.default)(this,e),(t=(0,g.default)(this,(0,s.default)(e).call(this)))._connection=i,t._beforeError=r,t._afterError=o,t._beforeComplete=A,t._afterComplete=C,t}return(0,A.default)(e,t),(0,C.default)(e,[{key:"onNext",value:function(t){this.onError((0,u.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}(l);e.LoginObserver=d;var f=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.connection,r=n.onError,o=n.onComplete;return(0,a.default)(this,e),(t=(0,g.default)(this,(0,s.default)(e).call(this)))._connection=i,t._onError=r,t._onComplete=o,t}return(0,A.default)(e,t),(0,C.default)(e,[{key:"onNext",value:function(t){this.onError((0,u.newError)("Received RECORD when resetting: received record is: "+JSON.stringify(t),u.PROTOCOL_ERROR))}},{key:"onError",value:function(t){t.code===u.PROTOCOL_ERROR&&this._connection._handleProtocolError(t.message),this._onError&&this._onError(t)}},{key:"onCompleted",value:function(t){this._onComplete&&this._onComplete(t)}}]),e}(l);e.ResetObserver=f;var p=function(t){function e(t){var n,i=t.error,r=t.onError;return(0,a.default)(this,e),(n=(0,g.default)(this,(0,s.default)(e).call(this,{beforeError:r}))).onError(i),n}return(0,A.default)(e,t),e}(h);e.FailedObserver=p;var v=function(t){function e(){var t;return(0,a.default)(this,e),t=(0,g.default)(this,(0,s.default)(e).call(this)),(0,o.default)((0,s.default)(e.prototype),"markCompleted",(0,r.default)(t)).call((0,r.default)(t)),t}return(0,A.default)(e,t),e}(h);e.CompletedObserver=v;var y={READY_STREAMING:{onSuccess:function(t,e){t._handleRunSuccess(e,(function(){t._setState(y.STREAMING)}))},onError:function(t,e){t._handleError(e)},name:function(){return"READY_STREAMING"}},READY:{onSuccess:function(t,e){t._handleRunSuccess(e,(function(){return t._handleStreaming()}))},onError:function(t,e){t._handleError(e)},name:function(){return"READY"}},STREAMING:{onSuccess:function(t,e){e.has_more?t._handleHasMore(e):t._handlePullSuccess(e)},onError:function(t,e){t._handleError(e)},name:function(){return"STREAMING"}},FAILED:{onError:function(t){},name:function(){return"FAILED"}},SUCCEEDED:{name:function(){return"SUCCEEDED"}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=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}()},function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.d(e,"a",(function(){return i}))},function(t,e,n){var i=n(185),r=n(151);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(29),r=n(57),o=n(73);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=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}()},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return C}));var i=n(0),r=n(13),o=n(19),g=n(2);function s(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(i){return i.pipe(s((function(n,i){return Object(o.a)(t(n,i)).pipe(Object(r.a)((function(t,r){return e(n,t,i,r)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new A(t,n))})}var A=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.concurrent))},t}(),a=function(t){function e(e,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY);var r=t.call(this,e)||this;return r.project=n,r.concurrent=i,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return i.a(e,t),e.prototype._next=function(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(g.b),C=s},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i=n(3),r=n(145),o=n(91);function g(t,e){return e?Object(o.a)(t,e):new i.a(Object(r.a)(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),r=n(105),o=function(t){function e(n,i){void 0===i&&(i=r.a.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():i()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return i.a(e,t),e.prototype.schedule=function(n,i,r){return void 0===i&&(i=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,i,r):t.prototype.schedule.call(this,n,i,r)},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}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i=n(0),r=n(8),o=n(7),g=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 i.a(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}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return i.a(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,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,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,i=void 0;try{this.work(t)}catch(t){n=!0,i=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),i},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,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 i.a(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(7).a))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(10);function r(t){return!Object(i.a)(t)&&t-parseFloat(t)+1>=0}},function(t,e,n){var i=n(29),r=n(188),o=n(43),g=n(110),s=Object.defineProperty;e.f=i?s:function(t,e,n){if(o(t),e=g(e,!0),o(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=n(214)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(65),r=n(134);function o(){for(var t=[],e=0;e0?t.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=A(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(a(n),e.scheduled=void 0)},e}(n(55).a),I=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(162),r=n(57).f,o=n(49),g=n(44),s=n(256),A=n(22)("toStringTag");t.exports=function(t,e,n,a){if(t){var C=n?t:t.prototype;g(C,A)||r(C,A,{configurable:!0,value:e}),a&&!i&&o(C,"toString",s)}}},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.utf8=e.HostNameResolver=e.Channel=e.alloc=void 0;var r=i(n(172)),o=i(n(363)),g=i(n(364)),s=i(n(366));e.alloc=function(t){return new r.default(t)};var A=o.default;e.Channel=A;var a=g.default;e.HostNameResolver=a;var C=s.default;e.utf8=C},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ALL=void 0;var r=i(n(5)),o=i(n(6)),g=n(39),s=n(38),A=n(24);e.ALL=-1;var a=function(){function t(e,n,i){(0,r.default)(this,t),this.signature=e,this.fields=n,this.toString=i}return(0,o.default)(t,null,[{key:"init",value:function(e,n){return new t(1,[e,n],(function(){return"INIT ".concat(e," {...}")}))}},{key:"run",value:function(e,n){return new t(16,[e,n],(function(){return"RUN ".concat(e," ").concat(JSON.stringify(n))}))}},{key:"pullAll",value:function(){return u}},{key:"reset",value:function(){return c}},{key:"hello",value:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Object.assign({user_agent:e},n);return null!=i&&(r.routing=i),new t(1,[r],(function(){return"HELLO {user_agent: '".concat(e,"', ...}")}))}},{key:"begin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.bookmark,i=e.txConfig,r=e.database,o=e.mode,g=C(n,i,r,o);return new t(17,[g],(function(){return"BEGIN ".concat(JSON.stringify(g))}))}},{key:"commit",value:function(){return l}},{key:"rollback",value:function(){return h}},{key:"runWithMetadata",value:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i.bookmark,o=i.txConfig,g=i.database,s=i.mode,A=C(r,o,g,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 d}},{key:"pull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.stmtId,i=void 0===n?-1:n,r=e.n,o=void 0===r?-1:r,g=I(i||-1,o||-1);return new t(63,[g],(function(){return"PULL ".concat(JSON.stringify(g))}))}},{key:"discard",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.stmtId,i=void 0===n?-1:n,r=e.n,o=void 0===r?-1:r,g=I(i||-1,o||-1);return new t(47,[g],(function(){return"DISCARD ".concat(JSON.stringify(g))}))}}]),t}();function C(t,e,n,i){var r={};return t.isEmpty()||(r.bookmarks=t.values()),e.timeout&&(r.tx_timeout=e.timeout),e.metadata&&(r.tx_metadata=e.metadata),n&&(r.db=(0,A.assertString)(n,"database")),i===g.ACCESS_MODE_READ&&(r.mode="r"),r}function I(t,e){var n={n:(0,s.int)(e)};return-1!==t&&(n.qid=(0,s.int)(t)),n}e.default=a;var u=new a(63,[],(function(){return"PULL_ALL"})),c=new a(15,[],(function(){return"RESET"})),l=new a(18,[],(function(){return"COMMIT"})),h=new a(19,[],(function(){return"ROLLBACK"})),d=new a(2,[],(function(){return"GOODBYE"}))},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.WRITE=e.READ=e.Driver=void 0;var r=i(n(5)),o=i(n(6)),g=n(11),s=(i(n(173)),i(n(63))),A=i(n(369)),a=i(n(375)),C=n(39),I=i(n(177)),u=n(176),c=i(n(127)),l=i(n(377)),h=n(80),d=n(24),f=C.ACCESS_MODE_READ;e.READ=f;var p=C.ACCESS_MODE_WRITE;e.WRITE=p;var v=0,y=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,r.default)(this,t),b(o),this._id=v++,this._address=e,this._userAgent=n,this._authToken=i,this._config=o,this._log=I.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,i=this._getOrCreateConnectionProvider(),r=new a.default(i);return r.verify({database:n})}},{key:"supportsMultiDb",value:function(){return this._getOrCreateConnectionProvider().supportsMultiDb()}},{key:"supportsTransactionConfig",value:function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()}},{key:"_supportsRouting",value:function(){return!1}},{key:"_isEncrypted",value:function(){return this._config.encrypted===d.ENCRYPTION_ON}},{key:"_getTrust",value:function(){return this._config.trust}},{key:"session",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.defaultAccessMode,n=void 0===e?p:e,i=t.bookmarks,r=t.database,o=void 0===r?"":r,g=t.fetchSize;return this._newSession({defaultAccessMode:n,bookmarkOrBookmarks:i,database:o,reactive:!1,fetchSize:w(g,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?p:e,i=t.bookmarks,r=t.database,o=void 0===r?"":r,g=t.fetchSize;return new l.default({session:this._newSession({defaultAccessMode:n,bookmarks:i,database:o,reactive:!0,fetchSize:w(g,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,i=e.bookmarkOrBookmarks,r=e.database,o=e.reactive,g=e.fetchSize,A=t._validateSessionMode(n),a=this._getOrCreateConnectionProvider(),C=i?new s.default(i):s.default.empty();return new c.default({mode:A,database:r,connectionProvider:a,bookmark:C,config:this._config,reactive:o,fetchSize:g})}},{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||p;if(e!==C.ACCESS_MODE_READ&&e!==C.ACCESS_MODE_WRITE)throw(0,g.newError)("Illegal session mode "+e);return e}}]),t}();function b(t){t.maxConnectionLifetime=m(t.maxConnectionLifetime,36e5),t.maxConnectionPoolSize=m(t.maxConnectionPoolSize,u.DEFAULT_MAX_SIZE),t.connectionAcquisitionTimeout=m(t.connectionAcquisitionTimeout,u.DEFAULT_ACQUISITION_TIMEOUT),t.fetchSize=w(t.fetchSize,1e3)}function m(t,e){var n=parseInt(t,10);return n>0||0===n?n:n<0?Number.MAX_SAFE_INTEGER:e}function w(t,e){var n=parseInt(t,10);if(n>0||n===h.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=y;var _=y;e.default=_},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),r=n(1);function o(){return function(t){return t.lift(new g(t))}}var g=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var i=new s(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r},t}(),s=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.a(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,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return C}));var i=n(0),r=n(8),o=n(104),g=n(7),s=n(132),A=n(41),a=n(144),C=function(t){function e(e,n,i){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this)||this;return r.scheduler=i,r._events=[],r._infiniteTimeWindow=!1,r._bufferSize=e<1?1:e,r._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(r._infiniteTimeWindow=!0,r.next=r.nextInfiniteTimeWindow):r.next=r.nextTimeWindow,r}return i.a(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){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.isStopped||(this._events.push(new I(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;if(this.closed)throw new A.a;if(this.isStopped||this.hasError?e=g.a.EMPTY:(this.observers.push(t),e=new a.a(this,t)),r&&t.add(t=new s.a(t,r)),n)for(var C=0;Ce&&(o=Math.max(o,r-e)),o>0&&i.splice(0,o),i},e}(r.a),I=function(){return function(t,e){this.time=t,this.value=e}}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(3);function r(t,e){return e?new i.a((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new i.a((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return C})),n.d(e,"a",(function(){return I}));var i=n(0),r=n(14),o=n(10),g=n(30),s=n(25),A=n(52),a={};function C(){for(var t=[],e=0;ethis.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),l=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.parent=n,r.observable=i,r.stillUnsubscribed=!0,r.buffer=[],r.isComplete=!1,r}return i.a(e,t),e.prototype[s.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){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return Object(A.c)(this.observable,new A.a(this))},e}(A.b)},function(t,e,n){"use strict";function i(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(1);function r(t){for(;t;){var e=t,n=e.closed,r=e.destination,o=e.isStopped;if(n||o)return!1;t=r&&r instanceof i.a?r:null}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(3),r=n(7);function o(t,e){return new i.a((function(n){var i=new r.a,o=0;return i.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||i.add(this.schedule())):n.complete()}))),i}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(26),r=n(61),o={closed:!0,next:function(t){},error:function(t){if(i.a.useDeprecatedSynchronousErrorHandling)throw t;Object(r.a)(t)},complete:function(){}}},function(t,e,n){t.exports=n(299)},function(t,e,n){n(249);var i=n(258),r=n(21),o=n(114),g=n(49),s=n(72),A=n(22)("toStringTag");for(var a in i){var C=r[a],I=C&&C.prototype;I&&o(I)!==A&&g(I,A,a),s[a]=s.Array}},function(t,e,n){var i,r,o,g=n(251),s=n(21),A=n(42),a=n(49),C=n(44),I=n(111),u=n(112),c=s.WeakMap;if(g){var l=new c,h=l.get,d=l.has,f=l.set;i=function(t,e){return f.call(l,t,e),e},r=function(t){return h.call(l,t)||{}},o=function(t){return d.call(l,t)}}else{var p=I("state");u[p]=!0,i=function(t,e){return a(t,p,e),e},r=function(t){return C(t,p)?t[p]:{}},o=function(t){return C(t,p)}}t.exports={set:i,get:r,has:o,enforce:function(t){return o(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!A(e)||(n=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var i=n(29),r=n(156),o=n(73),g=n(48),s=n(110),A=n(44),a=n(188),C=Object.getOwnPropertyDescriptor;e.f=i?C:function(t,e){if(t=g(t),e=s(e,!0),a)try{return C(t,e)}catch(t){}if(A(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var i=n(75);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(49);t.exports=function(t,e,n,r){r&&r.enumerable?t[e]=n:i(t,e,n)}},function(t,e,n){"use strict";var i=n(259).charAt,r=n(95),o=n(189),g=r.set,s=r.getterFor("String Iterator");o(String,"String",(function(t){g(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=s(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=i(n,r),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var i=n(71);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(23);t.exports=function(t){return i[t+"Prototype"]}},function(t,e,n){"use strict";var i=n(75),r=function(t){var e,n;this.promise=new t((function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i})),this.resolve=i(e),this.reject=i(n)};t.exports.f=function(t){return new r(t)}},function(t,e,n){"use strict";var i=n(37),r=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(5)),g=r(n(6)),s=i(n(24)),A=n(38),a=n(11),C=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,a.newError)("Transaction timeout should not be zero");if(e.isNegative())throw(0,a.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,g.default)(t,[{key:"isEmpty",value:function(){return Object.values(this).every((function(t){return null==t}))}}],[{key:"empty",value:function(){return I}}]),t}();e.default=C;var I=new C({})},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return g}));var i=n(0),r=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.a(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?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,i){return void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,i):e.flush(this)},e}(n(55).a),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.a(e,t),e}(n(53).a))(r),g=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=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}()},function(t,e,n){t.exports=n(310)},function(t,e,n){var i=n(217);function r(t,e){for(var n=0;n=51||!i((function(){var e=[];return(e.constructor={})[g]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var i=n(29),r=n(27),o=n(44),g=Object.defineProperty,s={},A=function(t){throw t};t.exports=function(t,e){if(o(s,t))return s[t];e||(e={});var n=[][t],a=!!o(e,"ACCESSORS")&&e.ACCESSORS,C=o(e,0)?e[0]:A,I=o(e,1)?e[1]:void 0;return s[t]=!!n&&!r((function(){if(a&&!i)return!0;var t={length:-1};a?g(t,1,{enumerable:!0,get:A}):t[1]=1,n.call(t,C,I)}))}},function(t,e,n){var i=n(97),r=n(185),o=n(76),g=n(77),s=n(203),A=[].push,a=function(t){var e=1==t,n=2==t,a=3==t,C=4==t,I=6==t,u=5==t||I;return function(c,l,h,d){for(var f,p,v=o(c),y=r(v),b=i(l,h,3),m=g(y.length),w=0,_=d||s,k=e?_(c,m):n?_(c,0):void 0;m>w;w++)if((u||w in y)&&(p=b(f=y[w],w,v),t))if(e)k[w]=p;else if(p)switch(t){case 3:return!0;case 5:return f;case 6:return w;case 2:A.call(k,f)}else if(C)return!1;return I?-1:a||C?C:k}};t.exports={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6)}},function(t,e,n){var i=n(43),r=n(199),o=n(77),g=n(97),s=n(115),A=n(198),a=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,C,I){var u,c,l,h,d,f,p,v=g(e,n,C?2:1);if(I)u=t;else{if("function"!=typeof(c=s(t)))throw TypeError("Target is not iterable");if(r(c)){for(l=0,h=o(t.length);h>l;l++)if((d=C?v(i(p=t[l])[0],p[1]):v(t[l]))&&d instanceof a)return d;return new a(!1)}u=c.call(t)}for(f=u.next;!(p=f.call(u)).done;)if("object"==typeof(d=A(u,v,p.value,C))&&d&&d instanceof a)return d;return new a(!1)}).stop=function(t){return new a(!0,t)}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_CONNECTION_HOLDER=e.default=void 0;var r=i(n(16)),o=i(n(12)),g=i(n(17)),s=i(n(5)),A=i(n(6)),a=n(11),C=n(24),I=n(39),u=i(n(63)),c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.mode,i=void 0===n?I.ACCESS_MODE_WRITE:n,r=e.database,o=void 0===r?"":r,g=e.bookmark,A=e.connectionProvider;(0,s.default)(this,t),this._mode=i,this._database=o?(0,C.assertString)(o,"database"):"",this._bookmark=g||u.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(l).then((function(){return t._release()})):Promise.resolve()})).catch(l),this._connectionPromise}}]),t}();function l(t){}e.default=c;var h=new(function(t){function e(){return(0,s.default)(this,e),(0,r.default)(this,(0,o.default)(e).apply(this,arguments))}return(0,g.default)(e,t),(0,A.default)(e,[{key:"initializeConnection",value:function(){return!0}},{key:"getConnection",value:function(){return Promise.reject((0,a.newError)("This connection holder does not serve connections"))}},{key:"releaseConnection",value:function(){return Promise.resolve()}},{key:"close",value:function(){return Promise.resolve()}}]),e}(c));e.EMPTY_CONNECTION_HOLDER=h},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(5)),o=i(n(6)),g=(n(45),i(n(126)),function(){function t(e){(0,r.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=g},function(t,e,n){"use strict";var i=n(37),r=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(5)),g=r(n(6)),s=n(224),A=r(n(63)),a=(n(225),r(n(125)),n(39)),C=i(n(226)),I=r(n(80)),u=n(45),c=r(n(103)),l=function(){function t(e,n,i){(0,o.default)(this,t),this._connection=e,this._packer=this._createPacker(n),this._unpacker=this._createUnpacker(i)}return(0,g.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,i=t.onError,r=t.onComplete,o=new u.LoginObserver({connection:this._connection,afterError:i,afterComplete:r});return this._connection.write(I.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,i=t.database,r=t.mode,o=t.beforeError,g=t.afterError,s=t.beforeComplete,A=t.afterComplete;return this.run("BEGIN",e?e.asBeginTransactionParameters():{},{bookmark:e,txConfig:n,database:i,mode:r,beforeError:o,afterError:g,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,i=t.beforeComplete,r=t.afterComplete;return this.run("COMMIT",{},{bookmark:A.default.empty(),txConfig:c.default.empty(),mode:a.ACCESS_MODE_WRITE,beforeError:e,afterError:n,beforeComplete:i,afterComplete:r})}},{key:"rollbackTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.beforeError,n=t.afterError,i=t.beforeComplete,r=t.afterComplete;return this.run("ROLLBACK",{},{bookmark:A.default.empty(),txConfig:c.default.empty(),mode:a.ACCESS_MODE_WRITE,beforeError:e,afterError:n,beforeComplete:i,afterComplete:r})}},{key:"run",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(n.bookmark,n.txConfig),r=n.database,o=(n.mode,n.beforeKeys),g=n.afterKeys,A=n.beforeError,a=n.afterError,C=n.beforeComplete,c=n.afterComplete,l=n.flush,h=void 0===l||l,d=new u.ResultStreamObserver({connection:this._connection,beforeKeys:o,afterKeys:g,beforeError:A,afterError:a,beforeComplete:C,afterComplete:c});return(0,s.assertTxConfigIsEmpty)(i,this._connection,d),(0,s.assertDatabaseIsEmpty)(r,this._connection,d),this._connection.write(I.default.run(t,e),d,!1),this._connection.write(I.default.pullAll(),d,h),d}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.onError,n=t.onComplete,i=new u.ResetObserver({connection:this._connection,onError:e,onComplete:n});return this._connection.write(I.default.reset(),i,!0),i}},{key:"_createPacker",value:function(t){return new C.Packer(t)}},{key:"_createUnpacker",value:function(t){return new C.Unpacker(t)}},{key:"version",get:function(){return a.BOLT_PROTOCOL_V1}}]),t}();e.default=l},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(58)),o=i(n(64)),g=i(n(5)),s=i(n(6)),A=n(45),a=i(n(168)),C=i(n(234)),I=n(11),u=n(24),c=i(n(124)),l=i(n(81)),h=n(39),d=i(n(376)),f=i(n(63)),p=i(n(103));var v=function(){function t(e){var n=e.mode,i=e.connectionProvider,r=e.bookmark,o=e.database,s=e.config,A=e.reactive,a=e.fetchSize;(0,g.default)(this,t),this._mode=n,this._database=o,this._reactive=A,this._fetchSize=a,this._readConnectionHolder=new c.default({mode:h.ACCESS_MODE_READ,database:o,bookmark:r,connectionProvider:i}),this._writeConnectionHolder=new c.default({mode:h.ACCESS_MODE_WRITE,database:o,bookmark:r,connectionProvider:i}),this._open=!0,this._hasTx=!1,this._lastBookmark=r,this._transactionExecutor=function(t){var e=t&&t.maxTransactionRetryTime?t.maxTransactionRetryTime:null;return new d.default(e)}(s),this._onComplete=this._onCompleteCallback.bind(this)}var e;return(0,s.default)(t,[{key:"run",value:function(t,e,n){var i=this,r=(0,u.validateQueryAndParameters)(t,e),o=r.validatedQuery,g=r.params,s=n?new p.default(n):p.default.empty();return this._run(o,g,(function(t){return i._assertSessionIsOpen(),t.protocol().run(o,g,{bookmark:i._lastBookmark,txConfig:s,mode:i._mode,database:i._database,afterComplete:i._onComplete,reactive:i._reactive,fetchSize:i._fetchSize})}))}},{key:"_run",value:function(t,e,n){var i,r=this._connectionHolderWithMode(this._mode);return i=this._open?!this._hasTx&&r.initializeConnection()?r.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,I.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,I.newError)("Cannot run query in a closed session.")})),new a.default(i,t,e,r)}},{key:"beginTransaction",value:function(t){var e=t,n=p.default.empty();return e&&(n=new p.default(e)),this._beginTransaction(this._mode,n)}},{key:"_beginTransaction",value:function(t,e){if(!this._open)throw(0,I.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,I.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=l.default._validateSessionMode(t),i=this._connectionHolderWithMode(n);i.initializeConnection(),this._hasTx=!0;var r=new C.default({connectionHolder:i,onClose:this._transactionClosed.bind(this),onBookmark:this._updateBookmark.bind(this),onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize});return r._begin(this._lastBookmark,e),r}},{key:"_assertSessionIsOpen",value:function(){if(!this._open)throw(0,I.newError)("You cannot run more transactions on a closed session.")}},{key:"_transactionClosed",value:function(){this._hasTx=!1}},{key:"lastBookmark",value:function(){return this._lastBookmark.values()}},{key:"readTransaction",value:function(t,e){var n=new p.default(e);return this._runTransaction(h.ACCESS_MODE_READ,n,t)}},{key:"writeTransaction",value:function(t,e){var n=new p.default(e);return this._runTransaction(h.ACCESS_MODE_WRITE,n,t)}},{key:"_runTransaction",value:function(t,e,n){var i=this;return this._transactionExecutor.execute((function(){return i._beginTransaction(t,e)}),n)}},{key:"_updateBookmark",value:function(t){t&&!t.isEmpty()&&(this._lastBookmark=t)}},{key:"close",value:(e=(0,o.default)(r.default.mark((function t(){return r.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===h.ACCESS_MODE_READ)return this._readConnectionHolder;if(t===h.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,I.newError)("Unknown access mode: "+t)}},{key:"_onCompleteCallback",value:function(t){this._updateBookmark(new f.default(t.bookmark))}}]),t}();e.default=v},function(t,e,n){"use strict";n.d(e,"b",(function(){return A})),n.d(e,"a",(function(){return u}));var i=n(0),r=n(1),o=n(7),g=n(3),s=n(8);function A(t,e,n,i){return function(r){return r.lift(new a(t,e,n,i))}}var a=function(){function t(t,e,n,i){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=i}return t.prototype.call=function(t,e){return e.subscribe(new C(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),C=function(t){function e(e,n,i,r,o){var g=t.call(this,e)||this;return g.keySelector=n,g.elementSelector=i,g.durationSelector=r,g.subjectSelector=o,g.groups=null,g.attemptedToUnsubscribe=!1,g.count=0,g}return i.a(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 i,r=n.get(e);if(this.elementSelector)try{i=this.elementSelector(t)}catch(t){this.error(t)}else i=t;if(!r){r=this.subjectSelector?this.subjectSelector():new s.a,n.set(e,r);var o=new u(e,r,this);if(this.destination.next(o),this.durationSelector){var g=void 0;try{g=this.durationSelector(new u(e,r))}catch(t){return void this.error(t)}this.add(g.subscribe(new I(e,r,this)))}}r.closed||r.next(i)},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}(r.a),I=function(t){function e(e,n,i){var r=t.call(this,n)||this;return r.key=e,r.group=n,r.parent=i,r}return i.a(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}(r.a),u=function(t){function e(e,n,i){var r=t.call(this)||this;return r.key=e,r.groupSubject=n,r.refCountSubscription=i,r}return i.a(e,t),e.prototype._subscribe=function(t){var e=new o.a,n=this.refCountSubscription,i=this.groupSubject;return n&&!n.closed&&e.add(new c(n)),e.add(i.subscribe(t)),e},e}(g.a),c=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return i.a(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)},function(t,e,n){"use strict";n.r(e),n.d(e,"Observable",(function(){return i.a})),n.d(e,"ConnectableObservable",(function(){return r.a})),n.d(e,"GroupedObservable",(function(){return o.a})),n.d(e,"observable",(function(){return g.a})),n.d(e,"Subject",(function(){return s.a})),n.d(e,"BehaviorSubject",(function(){return A.a})),n.d(e,"ReplaySubject",(function(){return a.a})),n.d(e,"AsyncSubject",(function(){return C.a})),n.d(e,"asap",(function(){return I.a})),n.d(e,"asapScheduler",(function(){return I.b})),n.d(e,"async",(function(){return u.a})),n.d(e,"asyncScheduler",(function(){return u.b})),n.d(e,"queue",(function(){return c.a})),n.d(e,"queueScheduler",(function(){return c.b})),n.d(e,"animationFrame",(function(){return v})),n.d(e,"animationFrameScheduler",(function(){return p})),n.d(e,"VirtualTimeScheduler",(function(){return y})),n.d(e,"VirtualAction",(function(){return b})),n.d(e,"Scheduler",(function(){return m.a})),n.d(e,"Subscription",(function(){return w.a})),n.d(e,"Subscriber",(function(){return _.a})),n.d(e,"Notification",(function(){return k.a})),n.d(e,"NotificationKind",(function(){return k.b})),n.d(e,"pipe",(function(){return x.a})),n.d(e,"noop",(function(){return O.a})),n.d(e,"identity",(function(){return E.a})),n.d(e,"isObservable",(function(){return T})),n.d(e,"ArgumentOutOfRangeError",(function(){return S.a})),n.d(e,"EmptyError",(function(){return D.a})),n.d(e,"ObjectUnsubscribedError",(function(){return N.a})),n.d(e,"UnsubscriptionError",(function(){return R.a})),n.d(e,"TimeoutError",(function(){return P.a})),n.d(e,"bindCallback",(function(){return L})),n.d(e,"bindNodeCallback",(function(){return V})),n.d(e,"combineLatest",(function(){return W.b})),n.d(e,"concat",(function(){return H.a})),n.d(e,"defer",(function(){return K.a})),n.d(e,"empty",(function(){return Q.b})),n.d(e,"forkJoin",(function(){return J})),n.d(e,"from",(function(){return q.a})),n.d(e,"fromEvent",(function(){return et})),n.d(e,"fromEventPattern",(function(){return nt})),n.d(e,"generate",(function(){return it})),n.d(e,"iif",(function(){return ot})),n.d(e,"interval",(function(){return st})),n.d(e,"merge",(function(){return at.a})),n.d(e,"never",(function(){return It})),n.d(e,"of",(function(){return ut.a})),n.d(e,"onErrorResumeNext",(function(){return ct})),n.d(e,"pairs",(function(){return lt})),n.d(e,"partition",(function(){return vt})),n.d(e,"race",(function(){return yt.a})),n.d(e,"range",(function(){return bt})),n.d(e,"throwError",(function(){return wt.a})),n.d(e,"timer",(function(){return _t.a})),n.d(e,"using",(function(){return kt})),n.d(e,"zip",(function(){return xt.b})),n.d(e,"scheduled",(function(){return Ot.a})),n.d(e,"EMPTY",(function(){return Q.a})),n.d(e,"NEVER",(function(){return Ct})),n.d(e,"config",(function(){return Et.a}));var i=n(3),r=n(130),o=n(128),g=n(40),s=n(8),A=n(131),a=n(83),C=n(54),I=n(67),u=n(9),c=n(104),l=n(0),h=n(55),d=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return l.a(e,t),e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0?t.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(h.a),f=n(53),p=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++ie.index?1:-1:t.delay>e.delay?1:-1},e}(h.a),m=n(105),w=n(7),_=n(1),k=n(32),x=n(66),O=n(35),E=n(28);function T(t){return!!t&&(t instanceof i.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var S=n(46),D=n(50),N=n(41),R=n(69),P=n(133),M=n(13),j=n(90),F=n(10),z=n(14);function L(t,e,n){if(e){if(!Object(z.a)(e))return function(){for(var i=[],r=0;r1?i.next(Array.prototype.slice.call(arguments)):i.next(t)}),i,n)}))}function nt(t,e,n){return n?nt(t,e).pipe(Object(M.a)((function(t){return Object(F.a)(t)?n.apply(void 0,t):n(t)}))):new i.a((function(n){var i,r=function(){for(var t=[],e=0;e=e){i.complete();break}if(i.next(o++),i.closed)break}}))}function mt(t){var e=t.start,n=t.index,i=t.count,r=t.subscriber;n>=i?r.complete():(r.next(e),r.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var wt=n(84),_t=n(137);function kt(t,e){return new i.a((function(n){var i,r;try{i=t()}catch(t){return void n.error(t)}try{r=e(i)}catch(t){return void n.error(t)}var o=(r?Object(q.a)(r):Q.a).subscribe(n);return function(){o.unsubscribe(),i&&i.unsubscribe()}}))}var xt=n(88),Ot=n(138),Et=n(26)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return C}));var i=n(0),r=n(8),o=n(3),g=n(1),s=n(7),A=n(82),a=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return i.a(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 I(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),C=function(){var t=a.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}}}(),I=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.a(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}(r.b);g.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i=n(0),r=n(8),o=n(41),g=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return i.a(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}(r.a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return g})),n.d(e,"a",(function(){return A}));var i=n(0),r=n(1),o=n(32);function g(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,i){void 0===i&&(i=0);var r=t.call(this,e)||this;return r.scheduler=n,r.delay=i,r}return i.a(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 a(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}(r.a),a=function(){return function(t,e){this.notification=t,this.destination=e}}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(86);function r(){return Object(i.a)(1)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(3),r=n(14),o=n(86),g=n(52);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 i.a?t[0]:Object(o.a)(n)(Object(g.a)(t,s))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return A}));var i=n(0),r=n(10),o=n(52),g=n(30),s=n(25);function A(){for(var t=[],e=0;e"+t+"<\/script>"},l=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;l=i?function(t){t.write(c("")),t.close();var e=t.parentWindow.Object;return t=null,e}(i):((e=a("iframe")).style.display="none",A.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(c("document.F=Object")),t.close(),t.F);for(var n=g.length;n--;)delete l.prototype[g[n]];return l()};s[I]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=r(t),n=new u,u.prototype=null,n[I]=t):n=l(),void 0===e?n:o(n,e)}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){var i={};i[n(22)("toStringTag")]="z",t.exports="[object z]"===String(i)},function(t,e,n){var i,r,o=n(21),g=n(164),s=o.process,A=s&&s.versions,a=A&&A.v8;a?r=(i=a.split("."))[0]+i[1]:g&&(!(i=g.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=g.match(/Chrome\/(\d+)/))&&(r=i[1]),t.exports=r&&+r},function(t,e,n){var i=n(62);t.exports=i("navigator","userAgent")||""},function(t,e,n){var i=n(194),r=n(161).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e,n){var i=n(22);e.f=i},function(t,e){function n(e,i){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,i)}t.exports=n},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(5)),o=i(n(6)),g=i(n(169)),s=n(124),A=(n(45),function(t){console.log("Uncaught error when processing result: "+t)}),a=function(t){};var C=function(){function t(e,n,i,o){(0,r.default)(this,t),this._stack=function(){var t=new Error("");if(t.stack)return t.stack.replace(/^Error(\n\r)*/,"");return null}(),this._streamObserverPromise=e,this._p=null,this._query=n,this._parameters=i||{},this._connectionHolder=o||s.EMPTY_CONNECTION_HOLDER}return(0,o.default)(t,[{key:"keys",value:function(){var t=this;return new Promise((function(e,n){t._streamObserverPromise.then((function(t){return t.subscribe({onKeys:function(t){return e(t)},onError:function(t){return n(t)}})}))}))}},{key:"summary",value:function(){var t=this;return new Promise((function(e,n){t._streamObserverPromise.then((function(t){t.cancel(),t.subscribe({onCompleted:function(t){return e(t)},onError:function(t){return n(t)}})}))}))}},{key:"_getOrCreatePromise",value:function(){var t=this;return this._p||(this._p=new Promise((function(e,n){var i=[],r={onNext:function(t){i.push(t)},onCompleted:function(t){e({records:i,summary:t})},onError:function(t){n(t)}};t.subscribe(r)}))),this._p}},{key:"then",value:function(t,e){return this._getOrCreatePromise().then(t,e)}},{key:"catch",value:function(t){return this._getOrCreatePromise().catch(t)}},{key:"subscribe",value:function(t){var e=this,n=t.onCompleted||a;t.onCompleted=function(i){var r=e._connectionHolder,o=e._query,s=e._parameters;function A(e){r.releaseConnection().then((function(){n.call(t,new g.default(o,s,i,e))}))}r.getConnection().then((function(t){A(t?t.protocol().version:void 0)}),(function(t){A()}))};var i=t.onError||A;t.onError=function(n){e._connectionHolder.releaseConnection().then((function(){!function(t,e){e&&(t.stack=t.toString()+"\n"+e)}(n,e._stack),i.call(t,n)}))},this._streamObserverPromise.then((function(e){return e.subscribe(t)}))}},{key:"_cancel",value:function(){this._streamObserverPromise.then((function(t){return t.cancel()}))}}]),t}();e.default=C},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.queryType=void 0;var r=i(n(5)),o=i(n(6)),g=n(38),s=function(){function t(e,n,i,o){(0,r.default)(this,t),this.query={text:e,parameters:n},this.queryType=i.type,this.counters=new C(i.stats||{}),this.updateStatistics=this.counters,this.plan=!(!i.plan&&!i.profile)&&new A(i.plan||i.profile),this.profile=!!i.profile&&new a(i.profile),this.notifications=this._buildNotifications(i.notifications),this.server=new u(i.server,o),this.resultConsumedAfter=i.result_consumed_after,this.resultAvailableAfter=i.result_available_after,this.database={name:i.db||null}}return(0,o.default)(t,[{key:"_buildNotifications",value:function(t){return t?t.map((function(t){return new I(t)})):[]}},{key:"hasPlan",value:function(){return this.plan instanceof A}},{key:"hasProfile",value:function(){return this.profile instanceof a}}]),t}(),A=function t(e){(0,r.default)(this,t),this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.children=e.children?e.children.map((function(e){return new t(e)})):[]},a=function(){function t(e){(0,r.default)(this,t),this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=l("dbHits",e),this.rows=l("rows",e),this.pageCacheMisses=l("pageCacheMisses",e),this.pageCacheHits=l("pageCacheHits",e),this.pageCacheHitRatio=l("pageCacheHitRatio",e),this.time=l("time",e),this.children=e.children?e.children.map((function(e){return new t(e)})):[]}return(0,o.default)(t,[{key:"hasPageCacheStats",value:function(){return this.pageCacheMisses>0||this.pageCacheHits>0||this.pageCacheHitRatio>0}}]),t}(),C=function(){function t(e){var n=this;(0,r.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 i=t.replace(/(-\w)/g,(function(t){return t[1].toUpperCase()}));i in n._stats?n._stats[i]=c(e[t]):"systemUpdates"===i&&(n._systemUpdates=c(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}(),I=function(){function t(e){(0,r.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:c(t.offset),line:c(t.line),column:c(t.column)}:{}}}]),t}(),u=function t(e,n){(0,r.default)(this,t),e&&(this.address=e.address,this.version=e.version),this.protocolVersion=n};function c(t){return(0,g.isInt)(t)?t.toInt():t}function l(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t in e){var i=e[t];return(0,g.isInt)(i)?i.toInt():i}return n}e.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"};var h=s;e.default=h},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(58)),o=i(n(221)),g=i(n(5)),s=i(n(6)),A=n(11);function a(t){var e={};return t.forEach((function(t,n){e[t]=n})),e}var C=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,g.default)(this,t),this.keys=e,this.length=e.length,this._fields=n,this._fieldLookup=i||a(e)}return(0,s.default)(t,[{key:"forEach",value:function(t){var e=!0,n=!1,i=void 0;try{for(var r,g=this.entries()[Symbol.iterator]();!(e=(r=g.next()).done);e=!0){var s=(0,o.default)(r.value,2),A=s[0];t(s[1],A,this)}}catch(t){n=!0,i=t}finally{try{e||null==g.return||g.return()}finally{if(n)throw i}}}},{key:"map",value:function(t){var e=[],n=!0,i=!1,r=void 0;try{for(var g,s=this.entries()[Symbol.iterator]();!(n=(g=s.next()).done);n=!0){var A=(0,o.default)(g.value,2),a=A[0],C=A[1];e.push(t(C,a,this))}}catch(t){i=!0,r=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw r}}return e}},{key:"entries",value:r.default.mark((function t(){var e;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=0;case 1:if(!(ethis._fields.length-1||e<0)throw(0,A.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,i=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:"supportsTransactionConfig",value:function(){throw new Error("not implemented")}},{key:"close",value:function(){throw new Error("not implemented")}}]),t}());e.default=g},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(58)),o=i(n(64)),g=i(n(5)),s=i(n(6)),A=i(n(16)),a=i(n(12)),C=i(n(123)),I=i(n(17)),u=n(79),c=n(225),l=n(11),h=i(n(370)),d=i(n(371)),f=i(n(125));i(n(126)),n(45);function p(){}var v={onNext:p,onCompleted:p,onError:p},y=0,b=function(t){function e(t,n,i,r){var o,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],I=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;return(0,g.default)(this,e),(o=(0,A.default)(this,(0,a.default)(e).call(this,n)))._id=y++,o._address=i,o._server={address:i.asHostPort()},o.creationTimestamp=Date.now(),o._disableLosslessIntegers=s,o._pendingObservers=[],o._currentObserver=void 0,o._ch=t,o._dechunker=new c.Dechunker,o._chunker=new c.Chunker(t),o._log=r,o._serversideRouting=I,o._dbConnectionId=null,o._protocol=null,o._currentFailure=null,o._isBroken=!1,o._log.isDebugEnabled()&&o._log.debug("".concat((0,C.default)(o)," created towards ").concat(i)),o}var n;return(0,I.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 d.default(this,this._ch,this._chunker,this._disableLosslessIntegers,this._log,this._serversideRouting);return new Promise((function(n,i){var r=function(e){t._handleFatalError(e),i(e)};t._ch.onerror=r.bind(t),t._ch._error&&r(t._ch._error),t._ch.onmessage=function(r){try{t._protocol=e.createNegotiatedProtocol(r),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))},r.hasRemaining()&&t._dechunker.write(r.readSlice(r.remaining())),n(t)}catch(e){t._handleFatalError(e),i(e)}},e.writeHandshakeRequest()}))}},{key:"_initialize",value:function(t,e){var n=this,i=this;return new Promise((function(r,o){n._protocol.initialize({userAgent:t,authToken:e,onError:function(t){return o(t)},onComplete:function(){return r(i)}})}))}},{key:"protocol",value:function(){return this._protocol}},{key:"write",value:function(t,e,n){var i=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 i._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 i=(0,l.newError)(e.message,e.code);this._currentFailure=this.handleAndTransformError(i,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,l.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._handleFatalError((0,l.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 i=t._handleProtocolError("Received FAILURE as a response for RESET: "+e);n(i)}},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||v).onCompleted=t.onCompleted||p,t.onError=t.onError||p,t.onNext=t.onNext||p,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)(r.default.mark((function t(){return r.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,l.newError)(t,l.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,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,g=new h.default(t,n,i.errorCode());return new e(new u.Channel(g),i,t,r,n.disableLosslessIntegers,o)}}]),e}(f.default);e.default=b},function(t,e,n){"use strict";var i=n(37),r=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.isDuration=function(t){return p(t,"__isDuration__")},e.isLocalTime=function(t){return p(t,"__isLocalTime__")},e.isTime=function(t){return p(t,"__isTime__")},e.isDate=function(t){return p(t,"__isDate__")},e.isLocalDateTime=function(t){return p(t,"__isLocalDateTime__")},e.isDateTime=function(t){return p(t,"__isDateTime__")},e.DateTime=e.LocalDateTime=e.Date=e.Time=e.LocalTime=e.Duration=void 0;var o=r(n(221)),g=r(n(5)),s=r(n(6)),A=i(n(230)),a=n(24),C=n(11),I={value:!0,enumerable:!1,configurable:!1,writable:!1},u=function(){function t(e,n,i,r){(0,g.default)(this,t),this.months=(0,a.assertNumberOrInteger)(e,"Months"),this.days=(0,a.assertNumberOrInteger)(n,"Days"),(0,a.assertNumberOrInteger)(i,"Seconds"),(0,a.assertNumberOrInteger)(r,"Nanoseconds"),this.seconds=A.normalizeSecondsForDuration(i,r),this.nanoseconds=A.normalizeNanosecondsForDuration(r),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=u,Object.defineProperty(u.prototype,"__isDuration__",I);var c=function(){function t(e,n,i,r){(0,g.default)(this,t),this.hour=A.assertValidHour(e),this.minute=A.assertValidMinute(n),this.second=A.assertValidSecond(i),this.nanosecond=A.assertValidNanosecond(r),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 y(e,n),new t(e.getHours(),e.getMinutes(),e.getSeconds(),A.totalNanoseconds(e,n))}}]),t}();e.LocalTime=c,Object.defineProperty(c.prototype,"__isLocalTime__",I);var l=function(){function t(e,n,i,r,o){(0,g.default)(this,t),this.hour=A.assertValidHour(e),this.minute=A.assertValidMinute(n),this.second=A.assertValidSecond(i),this.nanosecond=A.assertValidNanosecond(r),this.timeZoneOffsetSeconds=(0,a.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 y(e,n),new t(e.getHours(),e.getMinutes(),e.getSeconds(),A.totalNanoseconds(e,n),A.timeZoneOffsetInSeconds(e))}}]),t}();e.Time=l,Object.defineProperty(l.prototype,"__isTime__",I);var h=function(){function t(e,n,i){(0,g.default)(this,t),this.year=A.assertValidYear(e),this.month=A.assertValidMonth(n),this.day=A.assertValidDay(i),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 y(e,null),new t(e.getFullYear(),e.getMonth()+1,e.getDate())}}]),t}();e.Date=h,Object.defineProperty(h.prototype,"__isDate__",I);var d=function(){function t(e,n,i,r,o,s,a){(0,g.default)(this,t),this.year=A.assertValidYear(e),this.month=A.assertValidMonth(n),this.day=A.assertValidDay(i),this.hour=A.assertValidHour(r),this.minute=A.assertValidMinute(o),this.second=A.assertValidSecond(s),this.nanosecond=A.assertValidNanosecond(a),Object.freeze(this)}return(0,s.default)(t,[{key:"toString",value:function(){return v(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)}}],[{key:"fromStandardDate",value:function(e,n){return y(e,n),new t(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),A.totalNanoseconds(e,n))}}]),t}();e.LocalDateTime=d,Object.defineProperty(d.prototype,"__isLocalDateTime__",I);var f=function(){function t(e,n,i,r,s,I,u,c,l){(0,g.default)(this,t),this.year=A.assertValidYear(e),this.month=A.assertValidMonth(n),this.day=A.assertValidDay(i),this.hour=A.assertValidHour(r),this.minute=A.assertValidMinute(s),this.second=A.assertValidSecond(I),this.nanosecond=A.assertValidNanosecond(u);var h=function(t,e){var n=t||0===t,i=e&&""!==e;if(n&&!i)return(0,a.assertNumberOrInteger)(t,"Time zone offset in seconds"),[t,null];if(!n&&i)return(0,a.assertString)(e,"Time zone ID"),[null,e];throw n&&i?(0,C.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,C.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))}(c,l),d=(0,o.default)(h,2),f=d[0],p=d[1];this.timeZoneOffsetSeconds=f,this.timeZoneId=p,Object.freeze(this)}return(0,s.default)(t,[{key:"toString",value:function(){return v(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 y(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 p(t,e){return!0===(t&&t[e])}function v(t,e,n,i,r,o,g){return A.dateToIsoString(t,e,n)+"T"+A.timeToIsoString(i,r,o,g)}function y(t,e){(0,a.assertValidDate)(t,"Standard date"),null!=e&&(0,a.assertNumberOrInteger)(e,"Nanosecond")}e.DateTime=f,Object.defineProperty(f.prototype,"__isDateTime__",I)},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_ACQUISITION_TIMEOUT=e.DEFAULT_MAX_SIZE=e.default=void 0;var r=i(n(5)),o=i(n(6));e.DEFAULT_MAX_SIZE=100;e.DEFAULT_ACQUISITION_TIMEOUT=6e4;var g=function(){function t(e,n){(0,r.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=g},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,o=i(n(16)),g=i(n(12)),s=i(n(17)),A=i(n(5)),a=i(n(6)),C=i(n(219)),I=n(11),u=(r={},(0,C.default)(r,"error",0),(0,C.default)(r,"warn",1),(0,C.default)(r,"info",2),(0,C.default)(r,"debug",3),r),c=function(){function t(e,n){(0,A.default)(this,t),this._level=e,this._loggerFunction=n}return(0,a.default)(t,[{key:"isErrorEnabled",value:function(){return h(this._level,"error")}},{key:"error",value:function(t){this.isErrorEnabled()&&this._loggerFunction("error",t)}},{key:"isWarnEnabled",value:function(){return h(this._level,"warn")}},{key:"warn",value:function(t){this.isWarnEnabled()&&this._loggerFunction("warn",t)}},{key:"isInfoEnabled",value:function(){return h(this._level,"info")}},{key:"info",value:function(t){this.isInfoEnabled()&&this._loggerFunction("info",t)}},{key:"isDebugEnabled",value:function(){return h(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=u[e];if(!n&&0!==n)throw(0,I.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(u)));return e}return"info"}(n),function(t){if(t&&t.logger){var e=t.logger;if(e&&"function"==typeof e)return e}throw(0,I.newError)("Illegal logger function: ".concat(t.logger))}(n))}return this.noOp()}},{key:"noOp",value:function(){return l}}]),t}(),l=new(function(t){function e(){return(0,A.default)(this,e),(0,o.default)(this,(0,g.default)(e).call(this,null,null))}return(0,s.default)(e,t),(0,a.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}(c));function h(t,e){return u[t]>=u[e]}var d=c;e.default=d},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(5)),o=i(n(6)),g=n(11),s=function(){function t(e,n,i){(0,r.default)(this,t),this._errorCode=e,this._handleUnavailability=n||A,this._handleWriteFailure=i||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===g.SESSION_EXPIRED||t.code===g.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},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(5)),o=i(n(6)),g=n(24),s=i(n(238)),A=function(){function t(e,n,i,o){(0,r.default)(this,t),this._host=(0,g.assertString)(e,"host"),this._resolved=n?(0,g.assertString)(n,"resolved"):null,this._port=(0,g.assertNumber)(i,"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},function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return o})),n.d(e,"auditTime",(function(){return C})),n.d(e,"buffer",(function(){return I})),n.d(e,"bufferCount",(function(){return h})),n.d(e,"bufferTime",(function(){return y})),n.d(e,"bufferToggle",(function(){return S})),n.d(e,"bufferWhen",(function(){return R})),n.d(e,"catchError",(function(){return j})),n.d(e,"combineAll",(function(){return B})),n.d(e,"combineLatest",(function(){return Y})),n.d(e,"concat",(function(){return U})),n.d(e,"concatAll",(function(){return W.a})),n.d(e,"concatMap",(function(){return K})),n.d(e,"concatMapTo",(function(){return Q})),n.d(e,"count",(function(){return X})),n.d(e,"debounce",(function(){return $})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return gt})),n.d(e,"delay",(function(){return It})),n.d(e,"delayWhen",(function(){return dt})),n.d(e,"dematerialize",(function(){return bt})),n.d(e,"distinct",(function(){return _t})),n.d(e,"distinctUntilChanged",(function(){return Ot})),n.d(e,"distinctUntilKeyChanged",(function(){return St})),n.d(e,"elementAt",(function(){return Vt})),n.d(e,"endWith",(function(){return Gt})),n.d(e,"every",(function(){return Ut})),n.d(e,"exhaust",(function(){return Kt})),n.d(e,"exhaustMap",(function(){return Jt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return Nt.a})),n.d(e,"finalize",(function(){return re})),n.d(e,"find",(function(){return se})),n.d(e,"findIndex",(function(){return Ce})),n.d(e,"first",(function(){return ue})),n.d(e,"groupBy",(function(){return ce.b})),n.d(e,"ignoreElements",(function(){return le})),n.d(e,"isEmpty",(function(){return fe})),n.d(e,"last",(function(){return we})),n.d(e,"map",(function(){return qt.a})),n.d(e,"mapTo",(function(){return _e})),n.d(e,"materialize",(function(){return Oe})),n.d(e,"max",(function(){return Me})),n.d(e,"merge",(function(){return Fe})),n.d(e,"mergeAll",(function(){return ze.a})),n.d(e,"mergeMap",(function(){return H.b})),n.d(e,"flatMap",(function(){return H.a})),n.d(e,"mergeMapTo",(function(){return Le})),n.d(e,"mergeScan",(function(){return Be})),n.d(e,"min",(function(){return Ye})),n.d(e,"multicast",(function(){return Ue})),n.d(e,"observeOn",(function(){return He.b})),n.d(e,"onErrorResumeNext",(function(){return Ke})),n.d(e,"pairwise",(function(){return qe})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return gn})),n.d(e,"publishBehavior",(function(){return An})),n.d(e,"publishLast",(function(){return Cn})),n.d(e,"publishReplay",(function(){return un})),n.d(e,"race",(function(){return ln})),n.d(e,"reduce",(function(){return Pe})),n.d(e,"repeat",(function(){return hn})),n.d(e,"repeatWhen",(function(){return pn})),n.d(e,"retry",(function(){return bn})),n.d(e,"retryWhen",(function(){return _n})),n.d(e,"refCount",(function(){return On.a})),n.d(e,"sample",(function(){return En})),n.d(e,"sampleTime",(function(){return Dn})),n.d(e,"scan",(function(){return Se})),n.d(e,"sequenceEqual",(function(){return Mn})),n.d(e,"share",(function(){return Bn})),n.d(e,"shareReplay",(function(){return Zn})),n.d(e,"single",(function(){return Vn})),n.d(e,"skip",(function(){return Un})),n.d(e,"skipLast",(function(){return Kn})),n.d(e,"skipUntil",(function(){return qn})),n.d(e,"skipWhile",(function(){return ti})),n.d(e,"startWith",(function(){return ii})),n.d(e,"subscribeOn",(function(){return si})),n.d(e,"switchAll",(function(){return ui})),n.d(e,"switchMap",(function(){return ai})),n.d(e,"switchMapTo",(function(){return ci})),n.d(e,"take",(function(){return Lt})),n.d(e,"takeLast",(function(){return ye})),n.d(e,"takeUntil",(function(){return li})),n.d(e,"takeWhile",(function(){return fi})),n.d(e,"tap",(function(){return mi})),n.d(e,"throttle",(function(){return xi})),n.d(e,"throttleTime",(function(){return Ti})),n.d(e,"throwIfEmpty",(function(){return Pt})),n.d(e,"timeInterval",(function(){return Pi})),n.d(e,"timeout",(function(){return Zi})),n.d(e,"timeoutWith",(function(){return Fi})),n.d(e,"timestamp",(function(){return Vi})),n.d(e,"toArray",(function(){return Ui})),n.d(e,"window",(function(){return Wi})),n.d(e,"windowCount",(function(){return Qi})),n.d(e,"windowTime",(function(){return Ji})),n.d(e,"windowToggle",(function(){return or})),n.d(e,"windowWhen",(function(){return Ar})),n.d(e,"withLatestFrom",(function(){return Ir})),n.d(e,"zip",(function(){return hr})),n.d(e,"zipAll",(function(){return dr}));var i=n(0),r=n(2);function o(t){return function(e){return e.lift(new g(t))}}var g=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.durationSelector))},t}(),s=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i}return i.a(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(r.c)(e,new r.a(this));!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=void 0,n.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(r.b),A=n(9),a=n(137);function C(t,e){return void 0===e&&(e=A.a),o((function(){return Object(a.a)(t,e)}))}function I(t){return function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.closingNotifier))},t}(),c=function(t){function e(e,n){var i=t.call(this,e)||this;return i.buffer=[],i.add(Object(r.c)(n,new r.a(i))),i}return i.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(r.b),l=n(1);function h(t,e){return void 0===e&&(e=null),function(n){return n.lift(new d(t,e))}}var d=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?p:f}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),f=function(t){function e(e,n){var i=t.call(this,e)||this;return i.bufferSize=n,i.buffer=[],i}return i.a(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}(l.a),p=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.bufferSize=n,r.startBufferEvery=i,r.buffers=[],r.count=0,r}return i.a(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,i=this.buffers,r=this.count;this.count++,r%n==0&&i.push([]);for(var o=i.length;o--;){var g=i[o];g.push(t),g.length===e&&(i.splice(o,1),this.destination.next(g))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var i=e.shift();i.length>0&&n.next(i)}t.prototype._complete.call(this)},e}(l.a),v=n(14);function y(t){var e=arguments.length,n=A.a;Object(v.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var r=Number.POSITIVE_INFINITY;return e>=3&&(r=arguments[2]),function(e){return e.lift(new b(t,i,r,n))}}var b=function(){function t(t,e,n,i){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new w(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),m=function(){return function(){this.buffer=[]}}(),w=function(t){function e(e,n,i,r,o){var g=t.call(this,e)||this;g.bufferTimeSpan=n,g.bufferCreationInterval=i,g.maxBufferSize=r,g.scheduler=o,g.contexts=[];var s=g.openContext();if(g.timespanOnly=null==i||i<0,g.timespanOnly){var A={subscriber:g,context:s,bufferTimeSpan:n};g.add(s.closeAction=o.schedule(_,n,A))}else{var a={subscriber:g,context:s},C={bufferTimeSpan:n,bufferCreationInterval:i,subscriber:g,scheduler:o};g.add(s.closeAction=o.schedule(x,n,a)),g.add(o.schedule(k,i,C))}return g}return i.a(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,i=n.length,r=0;r0;){var i=e.shift();n.next(i.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,i={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(_,n,i))}},e.prototype.openContext=function(){var t=new m;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}(l.a);function _(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 k(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,i=t.subscriber,r=t.scheduler,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(x,n,{subscriber:i,context:o})),this.schedule(t,e))}function x(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var O=n(7),E=n(25),T=n(30);function S(t,e){return function(n){return n.lift(new D(t,e))}}var D=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new N(t,this.openings,this.closingSelector))},t}(),N=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.closingSelector=i,r.contexts=[],r.add(Object(E.a)(r,n)),r}return i.a(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,i=0;i0;){var i=n.shift();i.subscription.unsubscribe(),i.buffer=null,i.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){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,i=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(i),i.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new O.a,i={buffer:[],subscription:n};e.push(i);var r=Object(E.a)(this,t,i);!r||r.closed?this.closeBuffer(i):(r.context=i,this.add(r),n.add(r))},e}(T.a);function R(t){return function(e){return e.lift(new P(t))}}var P=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new M(t,this.closingSelector))},t}(),M=function(t){function e(e,n){var i=t.call(this,e)||this;return i.closingSelector=n,i.subscribing=!1,i.openBuffer(),i}return i.a(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=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){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 O.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(r.c)(e,new r.a(this))),this.subscribing=!1},e}(r.b);function j(t){return function(e){var n=new F(t),i=e.lift(n);return n.caught=i}}var F=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new z(t,this.selector,this.caught))},t}(),z=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.selector=n,r.caught=i,r}return i.a(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 i=new r.a(this);this.add(i);var o=Object(r.c)(n,i);o!==i&&this.add(o)}},e}(r.b),L=n(85);function B(t){return function(e){return e.lift(new L.a(t))}}var Z=n(10),V=n(19);function Y(){for(var t=[],e=0;e0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.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 lt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(Ct.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(Ct.a.createComplete()),this.unsubscribe()},e}(l.a),lt=function(){return function(t,e){this.time=t,this.notification=e}}(),ht=n(3);function dt(t,e){return e?function(n){return new vt(n,e).lift(new ft(t))}:function(e){return e.lift(new ft(t))}}var ft=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new pt(t,this.delayDurationSelector))},t}(),pt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.delayDurationSelector=n,i.completed=!1,i.delayNotifierSubscriptions=[],i.index=0,i}return i.a(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(t),this.removeSubscription(r),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(E.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}(T.a),vt=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subscriptionDelay=n,i}return i.a(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new yt(t,this.source))},e}(ht.a),yt=function(t){function e(e,n){var i=t.call(this)||this;return i.parent=e,i.source=n,i.sourceSubscribed=!1,i}return i.a(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}(l.a);function bt(){return function(t){return t.lift(new mt)}}var mt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new wt(t))},t}(),wt=function(t){function e(e){return t.call(this,e)||this}return i.a(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(l.a);function _t(t,e){return function(n){return n.lift(new kt(t,e))}}var kt=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,i){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,i&&o.add(Object(r.c)(i,new r.a(o))),o}return i.a(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){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}(r.b);function Ot(t,e){return function(n){return n.lift(new Et(t,e))}}var Et=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.compare,this.keySelector))},t}(),Tt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=i,r.hasKey=!1,"function"==typeof n&&(r.compare=n),r}return i.a(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 i=!1;if(this.hasKey)try{i=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))},e}(l.a);function St(t,e){return Ot((function(n,i){return e?e(n[t],i[t]):n[t]===i[t]}))}var Dt=n(46),Nt=n(31),Rt=n(50);function Pt(t){return void 0===t&&(t=Ft),function(e){return e.lift(new Mt(t))}}var Mt=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new jt(t,this.errorFactory))},t}(),jt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.errorFactory=n,i.hasValue=!1,i}return i.a(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}(l.a);function Ft(){return new Rt.a}var zt=n(18);function Lt(t){return function(e){return 0===t?Object(zt.b)():e.lift(new Bt(t))}}var Bt=function(){function t(t){if(this.total=t,this.total<0)throw new Dt.a}return t.prototype.call=function(t,e){return e.subscribe(new Zt(t,this.total))},t}(),Zt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.a(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}(l.a);function Vt(t,e){if(t<0)throw new Dt.a;var n=arguments.length>=2;return function(i){return i.pipe(Object(Nt.a)((function(e,n){return n===t})),Lt(1),n?gt(e):Pt((function(){return new Dt.a})))}}var Yt=n(65);function Gt(){for(var t=[],e=0;e0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(r.b);function re(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 ge(t,this.callback))},t}(),ge=function(t){function e(e,n){var i=t.call(this,e)||this;return i.add(new O.a(n)),i}return i.a(e,t),e}(l.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,i){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=i}return t.prototype.call=function(t,e){return e.subscribe(new ae(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ae=function(t){function e(e,n,i,r,o){var g=t.call(this,e)||this;return g.predicate=n,g.source=i,g.yieldIndex=r,g.thisArg=o,g.index=0,g}return i.a(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,i=this.index++;try{e.call(n||this,t,i,this.source)&&this.notifyComplete(this.yieldIndex?i:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(l.a);function Ce(t,e){return function(n){return n.lift(new Ae(t,n,!0,e))}}var Ie=n(28);function ue(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Object(Nt.a)((function(e,n){return t(e,n,i)})):Ie.a,Lt(1),n?gt(e):Pt((function(){return new Rt.a})))}}var ce=n(128);function le(){return function(t){return t.lift(new he)}}var he=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new de(t))},t}(),de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.a(e,t),e.prototype._next=function(t){},e}(l.a);function fe(){return function(t){return t.lift(new pe)}}var pe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return i.a(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}(l.a);function ye(t){return function(e){return 0===t?Object(zt.b)():e.lift(new be(t))}}var be=function(){function t(t){if(this.total=t,this.total<0)throw new Dt.a}return t.prototype.call=function(t,e){return e.subscribe(new me(t,this.total))},t}(),me=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.ring=new Array,i.count=0,i}return i.a(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,i=this.count++;e.length0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r=2;return function(i){return i.pipe(t?Object(Nt.a)((function(e,n){return t(e,n,i)})):Ie.a,ye(1),n?gt(e):Pt((function(){return new Rt.a})))}}function _e(t){return function(e){return e.lift(new ke(t))}}var ke=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 i=t.call(this,e)||this;return i.value=n,i}return i.a(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(l.a);function Oe(){return function(t){return t.lift(new Ee)}}var Ee=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Te(t))},t}(),Te=function(t){function e(e){return t.call(this,e)||this}return i.a(e,t),e.prototype._next=function(t){this.destination.next(Ct.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(Ct.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(Ct.a.createComplete()),t.complete()},e}(l.a);function Se(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new De(t,e,n))}}var De=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 Ne(t,this.accumulator,this.seed,this.hasSeed))},t}(),Ne=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=i,o.hasSeed=r,o.index=0,o}return i.a(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}(l.a),Re=n(66);function Pe(t,e){return arguments.length>=2?function(n){return Object(Re.a)(Se(t,e),ye(1),gt(e))(n)}:function(e){return Object(Re.a)(Se((function(e,n,i){return t(e,n,i+1)})),ye(1))(e)}}function Me(t){return Pe("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var je=n(135);function Fe(){for(var t=[],e=0;e0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(r.b);function Ye(t){return Pe("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}(l.a);function pn(t){return function(e){return e.lift(new vn(t))}}var vn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new yn(t,this.notifier,e))},t}(),yn=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r.sourceIsBeingSubscribedTo=!0,r}return i.a(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){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(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},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(r.c)(e,new r.a(this))},e}(r.b);function bn(t){return void 0===t&&(t=-1),function(e){return e.lift(new mn(t,e))}}var mn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new wn(t,this.count,this.source))},t}(),wn=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.count=n,r.source=i,r}return i.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,i=this.count;if(0===i)return t.prototype.error.call(this,e);i>-1&&(this.count=i-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(l.a);function _n(t){return function(e){return e.lift(new kn(t,e))}}var kn=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,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r}return i.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,i=this.retries,o=this.retriesSubscription;if(i)this.errors=void 0,this.retriesSubscription=void 0;else{n=new on.a;try{i=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=Object(r.c)(i,new r.a(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(r.b),On=n(82);function En(t){return function(e){return e.lift(new Tn(t))}}var Tn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Sn(t),i=e.subscribe(n);return i.add(Object(r.c)(this.notifier,new r.a(n))),i},t}(),Sn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return i.a(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(r.b);function Dn(t,e){return void 0===e&&(e=A.a),function(n){return n.lift(new Nn(t,e))}}var Nn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Rn(t,this.period,this.scheduler))},t}(),Rn=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.period=n,r.scheduler=i,r.hasValue=!1,r.add(i.schedule(Pn,n,{subscriber:r,period:n})),r}return i.a(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}(l.a);function Pn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Mn(t,e){return function(n){return n.lift(new jn(t,e))}}var jn=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Fn(t,this.compareTo,this.comparator))},t}(),Fn=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.compareTo=n,r.comparator=i,r._a=[],r._b=[],r._oneComplete=!1,r.destination.add(n.subscribe(new zn(e,r))),r}return i.a(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 i=t.shift(),r=e.shift(),o=!1;try{o=n?n(i,r):i===r}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}(l.a),zn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=n,i}return i.a(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}(l.a);function Ln(){return new on.a}function Bn(){return function(t){return Object(On.a)()(Ue(Ln)(t))}}function Zn(t,e,n){var i;return i=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,i=t.bufferSize,r=void 0===i?Number.POSITIVE_INFINITY:i,o=t.windowTime,g=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,A=t.scheduler,a=0,C=!1,I=!1;return function(t){var i;a++,!e||C?(C=!1,e=new In.a(r,g,A),i=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){C=!0,e.error(t)},complete:function(){I=!0,n=void 0,e.complete()}})):i=e.subscribe(this),this.add((function(){a--,i.unsubscribe(),n&&!I&&s&&0===a&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(i))}}function Vn(t){return function(e){return e.lift(new Yn(t,e))}}var Yn=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Gn(t,this.predicate,this.source))},t}(),Gn=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.source=i,r.seenValue=!1,r.index=0,r}return i.a(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 Rt.a)},e}(l.a);function Un(t){return function(e){return e.lift(new Wn(t))}}var Wn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Hn(t,this.total))},t}(),Hn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.a(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(l.a);function Kn(t){return function(e){return e.lift(new Qn(t))}}var Qn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Dt.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new l.a(t)):e.subscribe(new Xn(t,this._skipCount))},t}(),Xn=function(t){function e(e,n){var i=t.call(this,e)||this;return i._skipCount=n,i._count=0,i._ring=new Array(n),i}return i.a(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n0?this.startWindowEvery:this.windowSize,n=this.destination,i=this.windowSize,r=this.windows,o=r.length,g=0;g=0&&s%e==0&&!this.closed&&r.shift().complete(),++this.count%e==0&&!this.closed){var A=new on.a;r.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}(l.a);function Ji(t){var e=A.a,n=null,i=Number.POSITIVE_INFINITY;return Object(v.a)(arguments[3])&&(e=arguments[3]),Object(v.a)(arguments[2])?e=arguments[2]:Object(oi.a)(arguments[2])&&(i=Number(arguments[2])),Object(v.a)(arguments[1])?e=arguments[1]:Object(oi.a)(arguments[1])&&(n=Number(arguments[1])),function(r){return r.lift(new $i(t,n,i,e))}}var $i=function(){function t(t,e,n,i){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new er(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),tr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return i.a(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),er=function(t){function e(e,n,i,r,o){var g=t.call(this,e)||this;g.destination=e,g.windowTimeSpan=n,g.windowCreationInterval=i,g.maxWindowSize=r,g.scheduler=o,g.windows=[];var s=g.openWindow();if(null!==i&&i>=0){var A={subscriber:g,window:s,context:null},a={windowTimeSpan:n,windowCreationInterval:i,subscriber:g,scheduler:o};g.add(o.schedule(rr,n,A)),g.add(o.schedule(ir,i,a))}else{var C={subscriber:g,window:s,windowTimeSpan:n};g.add(o.schedule(nr,n,C))}return g}return i.a(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,i=0;i=this.maxWindowSize&&this.closeWindow(r))}},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 tr;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}(l.a);function nr(t){var e=t.subscriber,n=t.windowTimeSpan,i=t.window;i&&e.closeWindow(i),t.window=e.openWindow(),this.schedule(t,n)}function ir(t){var e=t.windowTimeSpan,n=t.subscriber,i=t.scheduler,r=t.windowCreationInterval,o=n.openWindow(),g={action:this,subscription:null},s={subscriber:n,window:o,context:g};g.subscription=i.schedule(rr,e,s),this.add(g.subscription),this.schedule(t,r)}function rr(t){var e=t.subscriber,n=t.window,i=t.context;i&&i.action&&i.subscription&&i.action.remove(i.subscription),e.closeWindow(n)}function or(t,e){return function(n){return n.lift(new gr(t,e))}}var gr=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new sr(t,this.openings,this.closingSelector))},t}(),sr=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.openings=n,r.closingSelector=i,r.contexts=[],r.add(r.openSubscription=Object(E.a)(r,n,n)),r}return i.a(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,i=0;i0){var r=i.indexOf(n);-1!==r&&i.splice(r,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}(T.a),lr=n(88);function hr(){for(var t=[],e=0;eA;)r.f(t,n=i[A++],e[n]);return t}},function(t,e,n){var i=n(44),r=n(48),o=n(255).indexOf,g=n(112);t.exports=function(t,e){var n,s=r(t),A=0,a=[];for(n in s)!i(g,n)&&i(s,n)&&a.push(n);for(;e.length>A;)i(s,n=e[A++])&&(~o(a,n)||a.push(n));return a}},function(t,e,n){var i=n(160),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},function(t,e,n){var i=n(62);t.exports=i("document","documentElement")},function(t,e,n){var i=n(43),r=n(257);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return i(n),r(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},function(t,e,n){var i=n(43);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},function(t,e,n){var i=n(22),r=n(72),o=i("iterator"),g=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||g[o]===t)}},function(t,e,n){var i=n(22)("iterator"),r=!1;try{var o=0,g={next:function(){return{done:!!o++}},return:function(){r=!0}};g[i]=function(){return this},Array.from(g,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o={};o[i]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},function(t,e,n){n(271);var i=n(23).Object,r=t.exports=function(t,e,n){return i.defineProperty(t,e,n)};i.defineProperty.sham&&(r.sham=!0)},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(42),r=n(100),o=n(22)("species");t.exports=function(t,e){var n;return r(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e,n){"use strict";var i=n(15),r=n(21),o=n(62),g=n(74),s=n(29),A=n(158),a=n(192),C=n(27),I=n(44),u=n(100),c=n(42),l=n(43),h=n(76),d=n(48),f=n(110),p=n(73),v=n(159),y=n(113),b=n(165),m=n(288),w=n(202),_=n(96),k=n(57),x=n(156),O=n(49),E=n(98),T=n(154),S=n(111),D=n(112),N=n(155),R=n(22),P=n(166),M=n(20),j=n(78),F=n(95),z=n(119).forEach,L=S("hidden"),B=R("toPrimitive"),Z=F.set,V=F.getterFor("Symbol"),Y=Object.prototype,G=r.Symbol,U=o("JSON","stringify"),W=_.f,H=k.f,K=m.f,Q=x.f,X=T("symbols"),q=T("op-symbols"),J=T("string-to-symbol-registry"),$=T("symbol-to-string-registry"),tt=T("wks"),et=r.QObject,nt=!et||!et.prototype||!et.prototype.findChild,it=s&&C((function(){return 7!=v(H({},"a",{get:function(){return H(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=W(Y,e);i&&delete Y[e],H(t,e,n),i&&t!==Y&&H(Y,e,i)}:H,rt=function(t,e){var n=X[t]=v(G.prototype);return Z(n,{type:"Symbol",tag:t,description:e}),s||(n.description=e),n},ot=a?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof G},gt=function(t,e,n){t===Y&>(q,e,n),l(t);var i=f(e,!0);return l(n),I(X,i)?(n.enumerable?(I(t,L)&&t[L][i]&&(t[L][i]=!1),n=v(n,{enumerable:p(0,!1)})):(I(t,L)||H(t,L,p(1,{})),t[L][i]=!0),it(t,i,n)):H(t,i,n)},st=function(t,e){l(t);var n=d(e),i=y(n).concat(It(n));return z(i,(function(e){s&&!At.call(n,e)||gt(t,e,n[e])})),t},At=function(t){var e=f(t,!0),n=Q.call(this,e);return!(this===Y&&I(X,e)&&!I(q,e))&&(!(n||!I(this,e)||!I(X,e)||I(this,L)&&this[L][e])||n)},at=function(t,e){var n=d(t),i=f(e,!0);if(n!==Y||!I(X,i)||I(q,i)){var r=W(n,i);return!r||!I(X,i)||I(n,L)&&n[L][i]||(r.enumerable=!0),r}},Ct=function(t){var e=K(d(t)),n=[];return z(e,(function(t){I(X,t)||I(D,t)||n.push(t)})),n},It=function(t){var e=t===Y,n=K(e?q:d(t)),i=[];return z(n,(function(t){!I(X,t)||e&&!I(Y,t)||i.push(X[t])})),i};(A||(E((G=function(){if(this instanceof G)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=N(t),n=function(t){this===Y&&n.call(q,t),I(this,L)&&I(this[L],e)&&(this[L][e]=!1),it(this,e,p(1,t))};return s&&nt&&it(Y,e,{configurable:!0,set:n}),rt(e,t)}).prototype,"toString",(function(){return V(this).tag})),E(G,"withoutSetter",(function(t){return rt(N(t),t)})),x.f=At,k.f=gt,_.f=at,b.f=m.f=Ct,w.f=It,P.f=function(t){return rt(R(t),t)},s&&(H(G.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),g||E(Y,"propertyIsEnumerable",At,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!A,sham:!A},{Symbol:G}),z(y(tt),(function(t){M(t)})),i({target:"Symbol",stat:!0,forced:!A},{for:function(t){var e=String(t);if(I(J,e))return J[e];var n=G(e);return J[e]=n,$[n]=e,n},keyFor:function(t){if(!ot(t))throw TypeError(t+" is not a symbol");if(I($,t))return $[t]},useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),i({target:"Object",stat:!0,forced:!A,sham:!s},{create:function(t,e){return void 0===e?v(t):st(v(t),e)},defineProperty:gt,defineProperties:st,getOwnPropertyDescriptor:at}),i({target:"Object",stat:!0,forced:!A},{getOwnPropertyNames:Ct,getOwnPropertySymbols:It}),i({target:"Object",stat:!0,forced:C((function(){w.f(1)}))},{getOwnPropertySymbols:function(t){return w.f(h(t))}}),U)&&i({target:"JSON",stat:!0,forced:!A||C((function(){var t=G();return"[null]"!=U([t])||"{}"!=U({a:t})||"{}"!=U(Object(t))}))},{stringify:function(t,e,n){for(var i,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(i=e,(c(e)||void 0!==t)&&!ot(t))return u(e)||(e=function(t,e){if("function"==typeof i&&(e=i.call(this,t,e)),!ot(e))return e}),r[1]=e,U.apply(null,r)}});G.prototype[B]||O(G.prototype,B,G.prototype.valueOf),j(G,"Symbol"),D[L]=!0},function(t,e,n){n(206),n(99),n(94),n(292),n(212),n(298);var i=n(23);t.exports=i.Promise},function(t,e){},function(t,e,n){var i=n(21);t.exports=i.Promise},function(t,e,n){var i=n(43),r=n(75),o=n(22)("species");t.exports=function(t,e){var n,g=i(t).constructor;return void 0===g||null==(n=i(g)[o])?e:r(n)}},function(t,e,n){var i,r,o,g=n(21),s=n(27),A=n(71),a=n(97),C=n(196),I=n(153),u=n(210),c=g.location,l=g.setImmediate,h=g.clearImmediate,d=g.process,f=g.MessageChannel,p=g.Dispatch,v=0,y={},b=function(t){if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},m=function(t){return function(){b(t)}},w=function(t){b(t.data)},_=function(t){g.postMessage(t+"",c.protocol+"//"+c.host)};l&&h||(l=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++v]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},i(v),v},h=function(t){delete y[t]},"process"==A(d)?i=function(t){d.nextTick(m(t))}:p&&p.now?i=function(t){p.now(m(t))}:f&&!u?(o=(r=new f).port2,r.port1.onmessage=w,i=a(o.postMessage,o,1)):!g.addEventListener||"function"!=typeof postMessage||g.importScripts||s(_)||"file:"===c.protocol?i="onreadystatechange"in I("script")?function(t){C.appendChild(I("script")).onreadystatechange=function(){C.removeChild(this),b(t)}}:function(t){setTimeout(m(t),0)}:(i=_,g.addEventListener("message",w,!1))),t.exports={set:l,clear:h}},function(t,e,n){var i=n(164);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(i)},function(t,e,n){var i=n(43),r=n(42),o=n(102);t.exports=function(t,e){if(i(t),r(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var i=n(15),r=n(75),o=n(102),g=n(121),s=n(120);i({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=o.f(e),i=n.resolve,A=n.reject,a=g((function(){var n=r(e.resolve),o=[],g=0,A=1;s(t,(function(t){var r=g++,s=!1;o.push(void 0),A++,n.call(e,t).then((function(t){s||(s=!0,o[r]={status:"fulfilled",value:t},--A||i(o))}),(function(t){s||(s=!0,o[r]={status:"rejected",reason:t},--A||i(o))}))})),--A||i(o)}));return a.error&&A(a.value),n.promise}})},function(t,e,n){"use strict";var i=n(15),r=n(27),o=n(100),g=n(42),s=n(76),A=n(77),a=n(116),C=n(203),I=n(117),u=n(22),c=n(163),l=u("isConcatSpreadable"),h=c>=51||!r((function(){var t=[];return t[l]=!1,t.concat()[0]!==t})),d=I("concat"),f=function(t){if(!g(t))return!1;var e=t[l];return void 0!==e?!!e:o(t)};i({target:"Array",proto:!0,forced:!h||!d},{concat:function(t){var e,n,i,r,o,g=s(this),I=C(g,0),u=0;for(e=-1,i=arguments.length;e9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");a(I,u++,o)}return I.length=u,I}})},function(t,e,n){var i=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",g=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function A(t,e,n,i){var r=e&&e.prototype instanceof I?e:I,o=Object.create(r.prototype),g=new w(i||[]);return o._invoke=function(t,e,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return k()}for(n.method=r,n.arg=o;;){var g=n.delegate;if(g){var s=y(g,n);if(s){if(s===C)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var A=a(t,e,n);if("normal"===A.type){if(i=n.done?"completed":"suspendedYield",A.arg===C)continue;return{value:A.arg,done:n.done}}"throw"===A.type&&(i="completed",n.method="throw",n.arg=A.arg)}}}(t,n,g),o}function a(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=A;var C={};function I(){}function u(){}function c(){}var l={};l[r]=function(){return this};var h=Object.getPrototypeOf,d=h&&h(h(_([])));d&&d!==e&&n.call(d,r)&&(l=d);var f=c.prototype=I.prototype=Object.create(l);function p(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function v(t,e){var i;this._invoke=function(r,o){function g(){return new e((function(i,g){!function i(r,o,g,s){var A=a(t[r],t,o);if("throw"!==A.type){var C=A.arg,I=C.value;return I&&"object"==typeof I&&n.call(I,"__await")?e.resolve(I.__await).then((function(t){i("next",t,g,s)}),(function(t){i("throw",t,g,s)})):e.resolve(I).then((function(t){C.value=t,g(C)}),(function(t){return i("throw",t,g,s)}))}s(A.arg)}(r,o,i,g)}))}return i=i?i.then(g,g):g()}}function y(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,y(t,e),"throw"===e.method))return C;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return C}var i=a(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,C;var r=i.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,C):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,C)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function m(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function e(){for(;++i=0;--r){var o=this.tryEntries[r],g=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),A=n.call(o,"finallyLoc");if(s&&A){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),m(n),C}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;m(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),C}},t}(t.exports);try{regeneratorRuntime=i}catch(t){Function("r","regeneratorRuntime = r")(i)}},function(t,e,n){n(20)("iterator")},function(t,e,n){n(213),n(206),n(204),n(318),n(319),n(320),n(321),n(215),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332);var i=n(23);t.exports=i.Symbol},function(t,e,n){t.exports=n(353)},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.isNode=function(t){return s(t,"__isNode__")},e.isRelationship=function(t){return s(t,"__isRelationship__")},e.isUnboundRelationship=function(t){return s(t,UNBOUNT_RELATIONSHIP_IDENTIFIER_PROPERTY)},e.isPath=function(t){return s(t,"__isPath__")},e.isPathSegment=function(t){return s(t,"__isPathSegment__")},e.PathSegment=e.Path=e.UnboundRelationship=e.Relationship=e.Node=void 0;var r=i(n(5)),o=i(n(6)),g={value:!0,enumerable:!1,configurable:!1,writable:!1};function s(t,e){return!0===(t&&t[e])}var A=function(){function t(e,n,i){(0,r.default)(this,t),this.identity=e,this.labels=n,this.properties=i}return(0,o.default)(t,[{key:"toString",value:function(){for(var t="("+this.identity,e=0;e0){t+=" {";for(var i=0;i0&&(t+=","),t+=n[i]+":"+JSON.stringify(this.properties[n[i]]);t+="}"}return t+=")"}}]),t}();e.Node=A,Object.defineProperty(A.prototype,"__isNode__",g);var a=function(){function t(e,n,i,o,g){(0,r.default)(this,t),this.identity=e,this.start=n,this.end=i,this.type=o,this.properties=g}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=a,Object.defineProperty(a.prototype,"__isRelationship__",g);var C=function(){function t(e,n,i){(0,r.default)(this,t),this.identity=e,this.type=n,this.properties=i}return(0,o.default)(t,[{key:"bind",value:function(t,e){return new a(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=C,Object.defineProperty(C.prototype,"__isUnboundRelationship__",g);var I=function t(e,n,i){(0,r.default)(this,t),this.start=e,this.relationship=n,this.end=i};e.PathSegment=I,Object.defineProperty(I.prototype,"__isPathSegment__",g);var u=function t(e,n,i){(0,r.default)(this,t),this.start=e,this.end=n,this.segments=i,this.length=i.length};e.Path=u,Object.defineProperty(u.prototype,"__isPath__",g)},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var i=n(359);function r(e,n,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=r=Reflect.get:t.exports=r=function(t,e,n){var r=i(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}},r(e,n,o||e)}t.exports=r},function(t,e,n){var i=n(360),r=n(361),o=n(222),g=n(362);t.exports=function(t,e){return i(t)||r(t,e)||o(t,e)||g()}},function(t,e,n){var i=n(223);t.exports=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0;)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,C.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){if(0===t){var e;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:e=this._currentMessage[0];break;default:e=new I.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(e),this.AWAITING_CHUNK}return this._chunkSize=t,this.IN_CHUNK}},{key:"write",value:function(t){for(;t.hasRemaining();)this._state=this._state(t)}}]),t}();e.Dechunker=c},function(t,e,n){"use strict";var i=n(37),r=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.Structure=e.Unpacker=e.Packer=void 0;var o=r(n(122)),g=r(n(5)),s=r(n(6)),A=n(79),a=i(n(38)),C=n(11),I=n(218),u=function(){function t(e,n){(0,g.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=u;var c=function(){function t(e){(0,g.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,a.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,C.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,C.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,C.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,C.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,C.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,C.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,C.newError)(t,C.PROTOCOL_ERROR)}}}]),t}();e.Packer=c;var l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(0,g.default)(this,t),this._disableLosslessIntegers=e}return(0,s.default)(t,[{key:"unpack",value:function(t){var e=t.readUInt8(),n=240&e,i=15&e;if(192===e)return null;var r=this._unpackBoolean(e);if(null!==r)return r;var o=this._unpackNumberOrInteger(e,t);if(null!==o)return this._disableLosslessIntegers&&(0,a.isInt)(o)?o.toNumberOrInfinity():o;var g=this._unpackString(e,n,i,t);if(null!==g)return g;var s=this._unpackList(e,n,i,t);if(null!==s)return s;var A=this._unpackByteArray(e,t);if(null!==A)return A;var I=this._unpackMap(e,n,i,t);if(null!==I)return I;var u=this._unpackStruct(e,n,i,t);if(null!==u)return u;throw(0,C.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,C.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,a.int)(t);if(t>=240&&t<256)return(0,a.int)(t-256);if(200===t)return(0,a.int)(e.readInt8());if(201===t)return(0,a.int)(e.readInt16());if(202===t){var n=e.readInt32();return(0,a.int)(n)}if(203===t){var i=e.readInt32(),r=e.readInt32();return new a.default(r,i)}return null}},{key:"_unpackString",value:function(t,e,n,i){return 128===e?A.utf8.decode(i,n):208===t?A.utf8.decode(i,i.readUInt8()):209===t?A.utf8.decode(i,i.readUInt16()):210===t?A.utf8.decode(i,i.readUInt32()):null}},{key:"_unpackList",value:function(t,e,n,i){return 144===e?this._unpackListWithSize(n,i):212===t?this._unpackListWithSize(i.readUInt8(),i):213===t?this._unpackListWithSize(i.readUInt16(),i):214===t?this._unpackListWithSize(i.readUInt32(),i):null}},{key:"_unpackListWithSize",value:function(t,e){for(var n=[],i=0;i0?(C=i[a-1])instanceof I.UnboundRelationship&&(i[a-1]=C=C.bind(g.identity,A.identity)):(C=i[-a-1])instanceof I.UnboundRelationship&&(i[-a-1]=C=C.bind(A.identity,g.identity)),o.push(new I.PathSegment(g,C,A)),g=A}return new I.Path(n[0],n[n.length-1],o)}},{key:"_unpackUnknownStruct",value:function(t,e,n){for(var i=new u(t,[]),r=0;r1&&void 0!==arguments[1]?arguments[1]:null;return(0,g.default)(this,e),(n=(0,A.default)(this,(0,a.default)(e).call(this)))._id=i,n._config=r,n._log=o,n._userAgent=s,n._authToken=I,n._createChannelConnection=h||function(t){return u.default.create(t,n._config,n._createConnectionErrorHandler(),n._log)},n._connectionPool=new c.default({create:n._createConnection.bind((0,C.default)(n)),destroy:n._destroyConnection.bind((0,C.default)(n)),validate:n._validateConnection.bind((0,C.default)(n)),installIdleObserver:e._installIdleObserverOnConnection.bind((0,C.default)(n)),removeIdleObserver:e._removeIdleObserverOnConnection.bind((0,C.default)(n)),config:l.default.fromDriverConfig(r),log:n._log}),n._openConnections={},n}var n;return(0,I.default)(e,t),(0,s.default)(e,[{key:"_createConnectionErrorHandler",value:function(){return new h.default(d.SERVICE_UNAVAILABLE)}},{key:"_createConnection",value:function(t,e){var n=this,i=this._createChannelConnection(t);return i._release=function(){return e(t,i)},this._openConnections[i.id]=i,i.connect(this._userAgent,this._authToken).catch((function(t){throw n._destroyConnection(i),t}))}},{key:"_validateConnection",value:function(t){if(!t.isOpen())return!1;var e=this._config.maxConnectionLifetime;return Date.now()-t.creationTimestamp<=e}},{key:"_destroyConnection",value:function(t){return delete this._openConnections[t.id],t.close()}},{key:"close",value:(n=(0,o.default)(r.default.mark((function t(){return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._connectionPool.close();case 2:return t.next=4,Promise.all(Object.values(this._openConnections).map((function(t){return t.close()})));case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],[{key:"_installIdleObserverOnConnection",value:function(t,e){t._queueObserver(e)}},{key:"_removeIdleObserverOnConnection",value:function(t){t._updateCurrentObserver()}}]),e}(i(n(173)).default);e.default=f},function(t,e,n){"use strict";var i=n(37),r=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(5)),g=r(n(6)),s=r(n(16)),A=r(n(12)),a=r(n(17)),C=r(n(126)),I=i(n(372)),u=n(39),c=function(t){function e(){return(0,o.default)(this,e),(0,s.default)(this,(0,A.default)(e).apply(this,arguments))}return(0,a.default)(e,t),(0,g.default)(e,[{key:"_createPacker",value:function(t){return new I.Packer(t)}},{key:"_createUnpacker",value:function(t){return new I.Unpacker(t)}},{key:"version",get:function(){return u.BOLT_PROTOCOL_V2}}]),e}(C.default);e.default=c},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.isPoint=function(t){return!0===(t&&t.__isPoint__)},e.Point=void 0;var r=i(n(5)),o=i(n(6)),g=n(24),s=function(){function t(e,n,i,o){(0,r.default)(this,t),this.srid=(0,g.assertNumberOrInteger)(e,"SRID"),this.x=(0,g.assertNumber)(n,"X coordinate"),this.y=(0,g.assertNumber)(i,"Y coordinate"),this.z=null==o?o:(0,g.assertNumber)(o,"Z coordinate"),Object.freeze(this)}return(0,o.default)(t,[{key:"toString",value:function(){return this.z||0===this.z?"Point{srid=".concat(A(this.srid),", x=").concat(A(this.x),", y=").concat(A(this.y),", z=").concat(A(this.z),"}"):"Point{srid=".concat(A(this.srid),", x=").concat(A(this.x),", y=").concat(A(this.y),"}")}}]),t}();function A(t){return Number.isInteger(t)?t+".0":t.toString()}e.Point=s,Object.defineProperty(s.prototype,"__isPoint__",{value:!0,enumerable:!1,configurable:!1,writable:!1})},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeSecondsForDuration=function(t,e){return(0,g.int)(t).add(m(e,1e9))},e.normalizeNanosecondsForDuration=function(t){return w(t,1e9)},e.localTimeToNanoOfDay=function(t,e,n,i){t=(0,g.int)(t),e=(0,g.int)(e),n=(0,g.int)(n),i=(0,g.int)(i);var r=t.multiply(36e11);return(r=(r=r.add(e.multiply(6e10))).add(n.multiply(1e9))).add(i)},e.nanoOfDayToLocalTime=p,e.localDateTimeToEpochSecond=function(t,e,n,i,r,o,s){var A=v(t,e,n),a=function(t,e,n){t=(0,g.int)(t),e=(0,g.int)(e),n=(0,g.int)(n);var i=t.multiply(3600);return(i=i.add(e.multiply(60))).add(n)}(i,r,o);return A.multiply(86400).add(a)},e.epochSecondAndNanoToLocalDateTime=function(t,e){var n=m(t,86400),i=w(t,86400).multiply(1e9).add(e),r=y(n),o=p(i);return new s.LocalDateTime(r.year,r.month,r.day,o.hour,o.minute,o.second,o.nanosecond)},e.dateToEpochDay=v,e.epochDayToDate=y,e.durationToIsoString=function(t,e,n,i){var r=k(t),o=k(e),s=function(t,e){var n,i;t=(0,g.int)(t),e=(0,g.int)(e);var r=t.isNegative(),o=e.greaterThan(0);n=r&&o?t.equals(-1)?"-0":t.add(1).toString():t.toString();o&&(i=_(r?e.negate().add(2e9).modulo(1e9):e.add(1e9).modulo(1e9)));return i?n+i:n}(n,i);return"P".concat(r,"M").concat(o,"DT").concat(s,"S")},e.timeToIsoString=function(t,e,n,i){var r=k(t,2),o=k(e,2),g=k(n,2),s=_(i);return"".concat(r,":").concat(o,":").concat(g).concat(s)},e.timeZoneOffsetToIsoString=function(t){if((t=(0,g.int)(t)).equals(0))return"Z";var e=t.isNegative();e&&(t=t.multiply(-1));var n=e?"-":"+",i=k(t.div(3600),2),r=k(t.div(60).modulo(60),2),o=t.modulo(60),s=o.equals(0)?null:k(o,2);return s?"".concat(n).concat(i,":").concat(r,":").concat(s):"".concat(n).concat(i,":").concat(r)},e.dateToIsoString=function(t,e,n){var i=(t=(0,g.int)(t)).isNegative();i&&(t=t.multiply(-1));var r=k(t,4);i&&(r="-"+r);var o=k(e,2),s=k(n,2);return"".concat(r,"-").concat(o,"-").concat(s)},e.totalNanoseconds=function(t,e){e=e||0;var n=1e6*t.getMilliseconds();return(0,g.isInt)(e)?e.add(n):e+n},e.timeZoneOffsetInSeconds=function(t){var e=t.getTimezoneOffset();if(0===e)return 0;return-1*e*60},e.assertValidYear=function(t){return b(t,I,"Year")},e.assertValidMonth=function(t){return b(t,u,"Month")},e.assertValidDay=function(t){return b(t,c,"Day")},e.assertValidHour=function(t){return b(t,l,"Hour")},e.assertValidMinute=function(t){return b(t,h,"Minute")},e.assertValidSecond=function(t){return b(t,d,"Second")},e.assertValidNanosecond=function(t){return b(t,f,"Nanosecond")};var r=i(n(5)),o=i(n(6)),g=n(38),s=n(175),A=n(24),a=n(11),C=function(){function t(e,n){(0,r.default)(this,t),this._minNumber=e,this._maxNumber=n,this._minInteger=(0,g.int)(e),this._maxInteger=(0,g.int)(n)}return(0,o.default)(t,[{key:"contains",value:function(t){return(0,g.isInt)(t)?t.greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):t>=this._minNumber&&t<=this._maxNumber}},{key:"toString",value:function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")}}]),t}(),I=new C(-999999999,999999999),u=new C(1,12),c=new C(1,31),l=new C(0,23),h=new C(0,59),d=new C(0,59),f=new C(0,999999999);function p(t){var e=(t=(0,g.int)(t)).div(36e11),n=(t=t.subtract(e.multiply(36e11))).div(6e10),i=(t=t.subtract(n.multiply(6e10))).div(1e9),r=t.subtract(i.multiply(1e9));return new s.LocalTime(e,n,i,r)}function v(t,e,n){t=(0,g.int)(t),e=(0,g.int)(e),n=(0,g.int)(n);var i=t.multiply(365);return i=(i=(i=t.greaterThanOrEqual(0)?i.add(t.add(3).div(4).subtract(t.add(99).div(100)).add(t.add(399).div(400))):i.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)&&(i=i.subtract(1),function(t){return!!(t=(0,g.int)(t)).modulo(4).equals(0)&&(!t.modulo(100).equals(0)||!!t.modulo(400).equals(0))}(t)||(i=i.subtract(1))),i.subtract(719528)}function y(t){var e=(t=(0,g.int)(t)).add(719528).subtract(60),n=(0,g.int)(0);if(e.lessThan(0)){var i=e.add(1).div(146097).subtract(1);n=i.multiply(400),e=e.add(i.multiply(-146097))}var r=e.multiply(400).add(591).div(146097),o=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400)));o.lessThan(0)&&(r=r.subtract(1),o=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400)))),r=r.add(n);var A=o,a=A.multiply(5).add(2).div(153),C=a.add(2).modulo(12).add(1),I=A.subtract(a.multiply(306).add(5).div(10)).add(1);return r=r.add(a.div(10)),new s.Date(r,C,I)}function b(t,e,n){if((0,A.assertNumberOrInteger)(t,n),!e.contains(t))throw(0,a.newError)("".concat(n," is expected to be in range ").concat(e," but was: ").concat(t));return t}function m(t,e){t=(0,g.int)(t),e=(0,g.int)(e);var n=t.div(e);return t.isPositive()!==e.isPositive()&&n.multiply(e).notEquals(t)&&(n=n.subtract(1)),n}function w(t,e){return t=(0,g.int)(t),e=(0,g.int)(e),t.subtract(m(t,e).multiply(e))}function _(t){return(t=(0,g.int)(t)).equals(0)?"":"."+k(t,9)}function k(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=(t=(0,g.int)(t)).isNegative();n&&(t=t.negate());var i=t.toString();if(e)for(;i.length0&&void 0!==arguments[0]?arguments[0]:{},e=t.userAgent,n=t.authToken,i=t.onError,r=t.onComplete,o=new u.LoginObserver({connection:this._connection,afterError:i,afterComplete:r});return this._connection.write(C.default.hello(e,n),o,!0),o}},{key:"prepareToClose",value:function(){this._connection.write(C.default.goodbye(),l,!0)}},{key:"beginTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.bookmark,n=t.txConfig,i=t.database,r=t.mode,o=t.beforeError,g=t.afterError,s=t.beforeComplete,A=t.afterComplete,a=new u.ResultStreamObserver({connection:this._connection,beforeError:o,afterError:g,beforeComplete:s,afterComplete:A});return a.prepareToHandleSingleResponse(),(0,I.assertDatabaseIsEmpty)(i,this._connection,a),this._connection.write(C.default.begin({bookmark:e,txConfig:n,mode:r}),a,!0),a}},{key:"commitTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.beforeError,n=t.afterError,i=t.beforeComplete,r=t.afterComplete,o=new u.ResultStreamObserver({connection:this._connection,beforeError:e,afterError:n,beforeComplete:i,afterComplete:r});return o.prepareToHandleSingleResponse(),this._connection.write(C.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,i=t.beforeComplete,r=t.afterComplete,o=new u.ResultStreamObserver({connection:this._connection,beforeError:e,afterError:n,beforeComplete:i,afterComplete:r});return o.prepareToHandleSingleResponse(),this._connection.write(C.default.rollback(),o,!0),o}},{key:"run",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.bookmark,r=n.txConfig,o=n.database,g=n.mode,s=n.beforeKeys,A=n.afterKeys,a=n.beforeError,c=n.afterError,l=n.beforeComplete,h=n.afterComplete,d=n.flush,f=void 0===d||d,p=new u.ResultStreamObserver({connection:this._connection,beforeKeys:s,afterKeys:A,beforeError:a,afterError:c,beforeComplete:l,afterComplete:h});return(0,I.assertDatabaseIsEmpty)(o,this._connection,p),this._connection.write(C.default.runWithMetadata(t,e,{bookmark:i,txConfig:r,mode:g}),p,!1),this._connection.write(C.default.pullAll(),p,f),p}},{key:"version",get:function(){return c.BOLT_PROTOCOL_V3}}]),e}(a.default);e.default=h},function(t,e,n){"use strict";var i=n(37),r=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(5)),g=r(n(6)),s=r(n(16)),A=r(n(12)),a=r(n(17)),C=r(n(231)),I=i(n(80)),u=n(45),c=n(39),l=function(t){function e(){return(0,o.default)(this,e),(0,s.default)(this,(0,A.default)(e).apply(this,arguments))}return(0,a.default)(e,t),(0,g.default)(e,[{key:"beginTransaction",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.bookmark,n=t.txConfig,i=t.database,r=t.mode,o=t.beforeError,g=t.afterError,s=t.beforeComplete,A=t.afterComplete,a=new u.ResultStreamObserver({connection:this._connection,beforeError:o,afterError:g,beforeComplete:s,afterComplete:A});return a.prepareToHandleSingleResponse(),this._connection.write(I.default.begin({bookmark:e,txConfig:n,database:i,mode:r}),a,!0),a}},{key:"run",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.bookmark,r=n.txConfig,o=n.database,g=n.mode,s=n.beforeKeys,A=n.afterKeys,a=n.beforeError,C=n.afterError,c=n.beforeComplete,l=n.afterComplete,h=n.flush,d=void 0===h||h,f=n.reactive,p=void 0!==f&&f,v=n.fetchSize,y=void 0===v?I.ALL:v,b=new u.ResultStreamObserver({connection:this._connection,reactive:p,fetchSize:y,moreFunction:this._requestMore,discardFunction:this._requestDiscard,beforeKeys:s,afterKeys:A,beforeError:a,afterError:C,beforeComplete:c,afterComplete:l}),m=p;return this._connection.write(I.default.runWithMetadata(t,e,{bookmark:i,txConfig:r,database:o,mode:g}),b,m&&d),p||this._connection.write(I.default.pull({n:y}),b,d),b}},{key:"_requestMore",value:function(t,e,n,i){t.write(I.default.pull({stmtId:e,n:n}),i,!0)}},{key:"_requestDiscard",value:function(t,e,n){t.write(I.default.discard({stmtId:e}),n,!0)}},{key:"_noOp",value:function(){}},{key:"version",get:function(){return c.BOLT_PROTOCOL_V4_0}}]),e}(C.default);e.default=l},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(5)),o=i(n(6)),g=i(n(16)),s=i(n(12)),A=i(n(17)),a=function(t){function e(t,n){var i;return(0,r.default)(this,e),i=(0,g.default)(this,(0,s.default)(e).call(this,n)),n&&(i._originalErrorHandler=t._errorHandler,t._errorHandler=i._errorHandler),i._delegate=t,i}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}(i(n(125)).default);e.default=a},function(t,e,n){"use strict";var i=n(37),r=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(5)),g=r(n(6)),s=r(n(168)),A=n(24),a=i(n(124)),C=r(n(63)),I=r(n(103)),u=n(45),c=n(11),l=function(){function t(e){var n=e.connectionHolder,i=e.onClose,r=e.onBookmark,g=e.onConnection,s=e.reactive,A=e.fetchSize;(0,o.default)(this,t),this._connectionHolder=n,this._reactive=s,this._state=h.ACTIVE,this._onClose=i,this._onBookmark=r,this._onConnection=g,this._onError=this._onErrorCallback.bind(this),this._onComplete=this._onCompleteCallback.bind(this),this._fetchSize=A,this._results=[]}return(0,g.default)(t,[{key:"_begin",value:function(t,e){var n=this;this._connectionHolder.getConnection().then((function(i){return n._onConnection(),i.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),i=n.validatedQuery,r=n.params,o=this._state.run(i,r,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,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,onConnection:this._onConnection,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,onConnection:this._onConnection,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===h.ACTIVE}},{key:"_onErrorCallback",value:function(t){return this._state=h.FAILED,this._onClose(),this._connectionHolder.releaseConnection()}},{key:"_onCompleteCallback",value:function(t){this._onBookmark(new C.default(t.bookmark))}}]),t}(),h={ACTIVE:{commit:function(t){return{result:d(!0,t.connectionHolder,t.onError,t.onComplete,t.onConnection,t.pendingResults),state:h.SUCCEEDED}},rollback:function(t){return{result:d(!1,t.connectionHolder,t.onError,t.onComplete,t.onConnection,t.pendingResults),state:h.ROLLED_BACK}},run:function(t,e,n){var i=n.connectionHolder,r=n.onError,o=n.onComplete,g=n.onConnection,s=n.reactive,A=n.fetchSize;return f(i.getConnection().then((function(n){return g(),n.protocol().run(t,e,{bookmark:C.default.empty(),txConfig:I.default.empty(),beforeError:r,afterComplete:o,reactive:s,fetchSize:A})})).catch((function(t){return new u.FailedObserver({error:t,onError:r})})),t,e)}},FAILED:{commit:function(t){t.connectionHolder;var e=t.onError;t.onComplete;return{result:f(new u.FailedObserver({error:(0,c.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:e}),"COMMIT",{}),state:h.FAILED}},rollback:function(t){t.connectionHolder,t.onError,t.onComplete;return{result:f(new u.CompletedObserver,"ROLLBACK",{}),state:h.FAILED}},run:function(t,e,n){n.connectionHolder;var i=n.onError;n.onComplete;return f(new u.FailedObserver({error:(0,c.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:i}),t,e)}},SUCCEEDED:{commit:function(t){t.connectionHolder;var e=t.onError;t.onComplete;return{result:f(new u.FailedObserver({error:(0,c.newError)("Cannot commit this transaction, because it has already been committed."),onError:e}),"COMMIT",{}),state:h.SUCCEEDED}},rollback:function(t){t.connectionHolder;var e=t.onError;t.onComplete;return{result:f(new u.FailedObserver({error:(0,c.newError)("Cannot rollback this transaction, because it has already been committed."),onError:e}),"ROLLBACK",{}),state:h.SUCCEEDED}},run:function(t,e,n){n.connectionHolder;var i=n.onError;n.onComplete;return f(new u.FailedObserver({error:(0,c.newError)("Cannot run query in this transaction, because it has already been committed."),onError:i}),t,e)}},ROLLED_BACK:{commit:function(t){t.connectionHolder;var e=t.onError;t.onComplete;return{result:f(new u.FailedObserver({error:(0,c.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:e}),"COMMIT",{}),state:h.ROLLED_BACK}},rollback:function(t){t.connectionHolder,t.onError,t.onComplete;return{result:f(new u.FailedObserver({error:(0,c.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{}),state:h.ROLLED_BACK}},run:function(t,e,n){n.connectionHolder;var i=n.onError;n.onComplete;return f(new u.FailedObserver({error:(0,c.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:i}),t,e)}}};function d(t,e,n,i,r,o){var g=e.getConnection().then((function(e){return r(),o.forEach((function(t){return t._cancel()})),Promise.all(o).then((function(r){return t?e.protocol().commitTransaction({beforeError:n,afterComplete:i}):e.protocol().rollbackTransaction({beforeError:n,afterComplete:i})}))})).catch((function(t){return new u.FailedObserver({error:t,onError:n})}));return new s.default(g,t?"COMMIT":"ROLLBACK",{},e)}function f(t,e,n){return new s.default(Promise.resolve(t),e,n,a.EMPTY_CONNECTION_HOLDER)}var p=l;e.default=p},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(5)),o=i(n(6)),g=n(11),s=(i(n(169)),n(129)),A=n(180),a=(i(n(170)),0),C=1,I=2,u=function(){function t(e){(0,r.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=a}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,i=e.recordsObserver,r=void 0===i?null:i,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,i=e.routers,r=e.readers,g=e.writers,A=e.expirationTime;(0,o.default)(this,t),this.database=n,this.databaseName=n||"default database",this.routers=i||[],this.readers=r||[],this.writers=g||[],this.expirationTime=A||(0,s.int)(0)}return(0,g.default)(t,[{key:"forget",value:function(t){this.readers=C(this.readers,t),this.writers=C(this.writers,t)}},{key:"forgetRouter",value:function(t){this.routers=C(this.routers,t)}},{key:"forgetWriter",value:function(t){this.writers=C(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,r.default)(this.routers),(0,r.default)(this.readers),(0,r.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 C(t,e){return t.filter((function(t){return t.asKey()!==e.asKey()}))}e.default=a},function(t,e,n){"use strict";var i=n(37),r=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(58)),g=r(n(64)),s=r(n(5)),A=r(n(6)),a=n(11),C=i(n(38)),I=(n(387),r(n(63)),r(n(127)),r(n(103))),u=r(n(179)),c="CALL dbms.cluster.routing.getRoutingTable($".concat("context",")"),l="CALL dbms.routing.getRoutingTable($".concat("context",", $").concat("database",")"),h=function(){function t(e,n){(0,s.default)(this,t),this._routingContext=e,this._initialAddress=n}var e;return(0,A.default)(t,[{key:"callRoutingProcedure",value:(e=(0,g.default)(o.default.mark((function t(e,n,i){var r;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 r=t.sent,t.next=6,e.close();case 6:return t.abrupt("return",r.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,a.newError)("Server at ".concat(i.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),a.SERVICE_UNAVAILABLE);case 19:return t.abrupt("return",null);case 20:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(t,n,i){return e.apply(this,arguments)})},{key:"parseTtl",value:function(t,e){try{var n=(0,C.int)(Date.now()),i=(0,C.int)(t.get("ttl")).multiply(1e3).add(n);return i.lessThan(n)?C.default.MAX_VALUE:i}catch(n){throw(0,a.newError)("Unable to parse TTL entry from router ".concat(e," from record:\n").concat(JSON.stringify(t),"\nError message: ").concat(n.message),a.PROTOCOL_ERROR)}}},{key:"parseServers",value:function(t,e){try{var n=t.get("servers"),i=[],r=[],o=[];return n.forEach((function(t){var e=t.role,n=t.addresses;if("ROUTE"===e)i=d(n).map((function(t){return u.default.fromUrl(t)}));else if("WRITE"===e)o=d(n).map((function(t){return u.default.fromUrl(t)}));else{if("READ"!==e)throw(0,a.newError)('Unknown server role "'+e+'"',a.PROTOCOL_ERROR);r=d(n).map((function(t){return u.default.fromUrl(t)}))}})),{routers:i,readers:r,writers:o}}catch(n){throw(0,a.newError)("Unable to parse servers entry from router ".concat(e," from record:\n").concat(JSON.stringify(t),"\nError message: ").concat(n.message),a.PROTOCOL_ERROR)}}},{key:"_callAvailableRoutingProcedure",value:function(t,e){var n=this;return t._run(null,null,(function(i){var r,o;return i.protocol().version>=4?(r=l,(o={context:n._routingContext||{},database:e||null}).context.address=n._initialAddress):(r=c,o={context:n._routingContext}),i.protocol().run(r,o,{bookmark:t._lastBookmark,txConfig:I.default.empty(),mode:t._mode,database:t._database,afterComplete:t._onComplete})}))}}]),t}();function d(t){if(!Array.isArray(t))throw new TypeError("Array expected but got: "+t);return Array.from(t)}e.default=h},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(5)),o=n(388),g=n(24),s=function t(e,n,i,o,g){(0,r.default)(this,t),this.scheme=e,this.host=n,this.port=i,this.hostAndPort=o,this.query=g};function A(t,e,n){if(!(t=(t||"").trim()))throw new Error("Illegal empty ".concat(e," in URL query '").concat(n,"'"));return t}function a(t){var e="["===t.charAt(0),n="]"===t.charAt(t.length-1);if(e||n){if(e&&n)return t;throw new Error("Illegal IPv6 address ".concat(t))}return"[".concat(t,"]")}function C(t){return"http"===t?7474:"https"===t?7473:7687}var I={parseDatabaseUrl:function(t){(0,g.assertString)(t,"URL");var e=function(t){if(-1===(t=t.trim()).indexOf("://"))return{schemeMissing:!0,url:"none://".concat(t)};return{schemeMissing:!1,url:t}}(t),n=(0,o.parse)(e.url),i=e.schemeMissing?null:function(t){if(t)return":"===(t=t.trim()).charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t;return null}(n.scheme),r=function(t,e){if(!t)throw new Error("Unable to extract host from ".concat(e));return t.trim()}(n.host),I=function(t){if(!t)throw new Error("Illegal host ".concat(t));return t.indexOf(":")>=0?a(t):t}(r),u=function(t,e){var n=parseInt(t,10);return 0===n||n?n:C(e)}(n.port,i),c="".concat(I,":").concat(u),l=function(t,e){var n=function(t){(t=(t||"").trim())&&"?"===t.charAt(0)&&(t=t.substring(1,t.length));return t}(t),i={};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 r=A(n[0],"key",e),o=A(n[1],"value",e);if(i[r])throw new Error("Duplicated query parameters with key '".concat(r,"' in URL '").concat(e,"'"));i[r]=o}));return i}(n.query,t);return new s(i,r,u,c,l)},defaultPortForScheme:C,formatIPv4Address:function(t,e){return"".concat(t,":").concat(e)},formatIPv6Address:function(t,e){var n=a(t);return"".concat(n,":").concat(e)}};e.default=I},function(t,e,n){"use strict";var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(5)),o=i(n(6)),g=i(n(16)),s=i(n(12)),A=i(n(17)),a=i(n(390)),C=function(t){function e(t){var n;return(0,r.default)(this,e),(n=(0,g.default)(this,(0,s.default)(e).call(this)))._readersIndex=new a.default,n._writersIndex=new a.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 i=e.next(n),r=i,o=null,g=Number.MAX_SAFE_INTEGER;do{var s=t[r],A=this._connectionPool.activeResourceCount(s);A0?nt:et)(t)},rt=Math.min,ot=function(t){return t>0?rt(it(t),9007199254740991):0},gt=Math.max,st=Math.min,At=function(t,e){var n=it(t);return n<0?gt(n+e,0):st(n,e)},at=function(t){return function(e,n,i){var r,o=v(e),g=ot(o.length),s=At(i,g);if(t&&n!=n){for(;g>s;)if((r=o[s++])!=r)return!0}else for(;g>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},Ct={includes:at(!0),indexOf:at(!1)},It={},ut=Ct.indexOf,ct=function(t,e){var n,i=v(t),r=0,o=[];for(n in i)!w(It,n)&&w(i,n)&&o.push(n);for(;e.length>r;)w(i,n=e[r++])&&(~ut(o,n)||o.push(n));return o},lt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ht=Object.keys||function(t){return ct(t,lt)},dt={f:Object.getOwnPropertySymbols},ft=function(t){return Object(p(t))},pt=Object.assign,vt=Object.defineProperty,yt=!pt||A((function(){if(a&&1!==pt({b:1},pt(vt({},"a",{enumerable:!0,get:function(){vt(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=pt({},t)[n]||"abcdefghijklmnopqrst"!=ht(pt({},e)).join("")}))?function(t,e){for(var n=ft(t),i=arguments.length,r=1,o=dt.f,g=u.f;i>r;)for(var s,A=f(arguments[r++]),C=o?ht(A).concat(o(A)):ht(A),I=C.length,c=0;I>c;)s=C[c++],a&&!g.call(A,s)||(n[s]=A[s]);return n}:pt;W({target:"Object",stat:!0,forced:Object.assign!==yt},{assign:yt});var bt=F.Object.assign;function mt(t,e,n,i){t.beginPath(),t.arc(e,n,i,0,2*Math.PI,!1),t.closePath()}function wt(t,e,n,i,r,o){var g=Math.PI/180;i-2*o<0&&(o=i/2),r-2*o<0&&(o=r/2),t.beginPath(),t.moveTo(e+o,n),t.lineTo(e+i-o,n),t.arc(e+i-o,n+o,o,270*g,360*g,!1),t.lineTo(e+i,n+r-o),t.arc(e+i-o,n+r-o,o,0,90*g,!1),t.lineTo(e+o,n+r),t.arc(e+o,n+r-o,o,90*g,180*g,!1),t.lineTo(e,n+o),t.arc(e+o,n+o,o,180*g,270*g,!1),t.closePath()}function _t(t,e,n,i,r){var o=i/2*.5522848,g=r/2*.5522848,s=e+i,A=n+r,a=e+i/2,C=n+r/2;t.beginPath(),t.moveTo(e,C),t.bezierCurveTo(e,C-g,a-o,n,a,n),t.bezierCurveTo(a+o,n,s,C-g,s,C),t.bezierCurveTo(s,C+g,a+o,A,a,A),t.bezierCurveTo(a-o,A,e,C+g,e,C),t.closePath()}function kt(t,e,n,i,r){var o=r*(1/3),g=i/2*.5522848,s=o/2*.5522848,A=e+i,a=n+o,C=e+i/2,I=n+o/2,u=n+(r-o/2),c=n+r;t.beginPath(),t.moveTo(A,I),t.bezierCurveTo(A,I+s,C+g,a,C,a),t.bezierCurveTo(C-g,a,e,I+s,e,I),t.bezierCurveTo(e,I-s,C-g,n,C,n),t.bezierCurveTo(C+g,n,A,I-s,A,I),t.lineTo(A,u),t.bezierCurveTo(A,u+s,C+g,c,C,c),t.bezierCurveTo(C-g,c,e,u+s,e,u),t.lineTo(e,I)}function xt(t,e,n,i,r,o){t.beginPath(),t.moveTo(e,n);for(var g=o.length,s=i-e,A=r-n,a=A/s,C=Math.sqrt(s*s+A*A),I=0,u=!0,c=0,l=+o[0];C>=.1;)(l=+o[I++%g])>C&&(l=C),c=Math.sqrt(l*l/(1+a*a)),e+=c=s<0?-c:c,n+=a*c,!0===u?t.lineTo(e,n):t.moveTo(e,n),C-=l,u=!u}var Ot={circle:mt,dashedLine:xt,database:kt,diamond:function(t,e,n,i){t.beginPath(),t.lineTo(e,n+i),t.lineTo(e+i,n),t.lineTo(e,n-i),t.lineTo(e-i,n),t.closePath()},ellipse:_t,ellipse_vis:_t,hexagon:function(t,e,n,i){t.beginPath();var r=2*Math.PI/6;t.moveTo(e+i,n);for(var o=1;o<6;o++)t.lineTo(e+i*Math.cos(r*o),n+i*Math.sin(r*o));t.closePath()},roundRect:wt,square:function(t,e,n,i){t.beginPath(),t.rect(e-i,n-i,2*i,2*i),t.closePath()},star:function(t,e,n,i){t.beginPath(),n+=.1*(i*=.82);for(var r=0;r<10;r++){var o=r%2==0?1.3*i:.5*i;t.lineTo(e+o*Math.sin(2*r*Math.PI/10),n-o*Math.cos(2*r*Math.PI/10))}t.closePath()},triangle:function(t,e,n,i){t.beginPath(),n+=.275*(i*=1.15);var r=2*i,o=r/2,g=Math.sqrt(3)/6*r,s=Math.sqrt(r*r-o*o);t.moveTo(e,n-(s-g)),t.lineTo(e+o,n+g),t.lineTo(e-o,n+g),t.lineTo(e,n-(s-g)),t.closePath()},triangleDown:function(t,e,n,i){t.beginPath(),n-=.275*(i*=1.15);var r=2*i,o=r/2,g=Math.sqrt(3)/6*r,s=Math.sqrt(r*r-o*o);t.moveTo(e,n+(s-g)),t.lineTo(e+o,n-g),t.lineTo(e-o,n-g),t.lineTo(e,n+(s-g)),t.closePath()}};var Et=r((function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r=0;ro;)V.f(t,n=i[o++],e[n]);return t};W({target:"Object",stat:!0,forced:!a,sham:!a},{defineProperties:Dt});var Nt=r((function(t){var e=F.Object,n=t.exports=function(t,n){return e.defineProperties(t,n)};e.defineProperties.sham&&(n.sham=!0)})),Rt=function(t){return"function"==typeof t?t:void 0},Pt=function(t,e){return arguments.length<2?Rt(F[t])||Rt(s[t]):F[t]&&F[t][e]||s[t]&&s[t][e]},Mt=lt.concat("length","prototype"),jt={f:Object.getOwnPropertyNames||function(t){return ct(t,Mt)}},Ft=Pt("Reflect","ownKeys")||function(t){var e=jt.f(B(t)),n=dt.f;return n?e.concat(n(t)):e},zt=function(t,e,n){var i=b(e);i in t?V.f(t,i,c(0,n)):t[i]=n};W({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(t){for(var e,n,i=v(t),r=T.f,o=Ft(i),g={},s=0;o.length>s;)void 0!==(n=r(i,e=o[s++]))&&zt(g,e,n);return g}});var Lt=F.Object.getOwnPropertyDescriptors,Bt=T.f,Zt=A((function(){Bt(1)}));W({target:"Object",stat:!0,forced:!a||Zt,sham:!a},{getOwnPropertyDescriptor:function(t,e){return Bt(v(t),e)}});var Vt,Yt=r((function(t){var e=F.Object,n=t.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};e.getOwnPropertyDescriptor.sham&&(n.sham=!0)})),Gt=Yt,Ut=!!Object.getOwnPropertySymbols&&!A((function(){return!String(Symbol())})),Wt=Ut&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ht=Array.isArray||function(t){return"Array"==h(t)},Kt=Pt("document","documentElement"),Qt=s["__core-js_shared__"]||function(t,e){try{Y(s,t,e)}catch(n){s[t]=e}return e}("__core-js_shared__",{}),Xt=r((function(t){(t.exports=function(t,e){return Qt[t]||(Qt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.4",mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),qt=0,Jt=Math.random(),$t=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++qt+Jt).toString(36)},te=Xt("keys"),ee=function(t){return te[t]||(te[t]=$t(t))},ne=ee("IE_PROTO"),ie=function(){},re=function(t){return"