neo4j-driver 4.4.2 → 4.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).neo4j=t()}(function(){return function n(o,i,s){function u(e,t){if(!i[e]){if(!o[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(a)return a(e,!0);throw(r=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",r}r=i[e]={exports:{}},o[e][0].call(r.exports,function(t){return u(o[e][1][t]||t)},r,r.exports,n,o,i,s)}return i[e].exports}for(var a="function"==typeof require&&require,t=0;t<s.length;t++)u(s[t]);return u}({1:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.assertImpersonatedUserIsEmpty=r.assertTxConfigIsEmpty=r.assertDatabaseIsEmpty=void 0;var n=t("neo4j-driver-core");r.assertTxConfigIsEmpty=function(t,e,r){if(void 0===e&&(e=function(){}),t&&!t.isEmpty()){t=(0,n.newError)("Driver is connected to the database that does not support transaction configuration. Please upgrade to neo4j 3.5.0 or later in order to use this functionality");throw e(t.message),r.onError(t),t}},r.assertDatabaseIsEmpty=function(t,e,r){if(void 0===e&&(e=function(){}),t){t=(0,n.newError)("Driver is connected to the database that does not support multiple databases. Please upgrade to neo4j 4.0.0 or later in order to use this functionality");throw e(t.message),r.onError(t),t}},r.assertImpersonatedUserIsEmpty=function(t,e,r){if(void 0===e&&(e=function(){}),t){t=(0,n.newError)("Driver is connected to the database that does not support user impersonation. Please upgrade to neo4j 4.4.0 or later in order to use this functionality. Trying to impersonate "+t+".");throw e(t.message),r.onError(t),t}}},{"neo4j-driver-core":59}],2:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var p=t("./bolt-protocol-util"),o=t("../packstream"),h=n(t("./request-message")),d=t("./stream-observers"),n=t("neo4j-driver-core"),i=n.internal.bookmark.Bookmark,t=n.internal.constants,s=t.ACCESS_MODE_WRITE,u=t.BOLT_PROTOCOL_V1,a=(n.internal.logger.Logger,n.internal.txConfig.TxConfig),n=(Object.defineProperty(c.prototype,"version",{get:function(){return u},enumerable:!1,configurable:!0}),c.prototype.packer=function(){return this._packer},c.prototype.unpacker=function(){return this._unpacker},c.prototype.transformMetadata=function(t){return t},c.prototype.initialize=function(t){var e=this,r=void 0===t?{}:t,n=r.userAgent,t=r.authToken,o=r.onError,i=r.onComplete,r=new d.LoginObserver({onError:function(t){return e._onLoginError(t,o)},onCompleted:function(t){return e._onLoginCompleted(t,i)}});return this.write(h.default.init(n,t),r,!0),r},c.prototype.prepareToClose=function(){},c.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,r=e.bookmark,n=e.txConfig,o=e.database,i=e.mode,s=e.impersonatedUser,u=e.beforeError,a=e.afterError,t=e.beforeComplete,e=e.afterComplete;return this.run("BEGIN",r?r.asBeginTransactionParameters():{},{bookmark:r,txConfig:n,database:o,mode:i,impersonatedUser:s,beforeError:u,afterError:a,beforeComplete:t,afterComplete:e,flush:!1})},c.prototype.commitTransaction=function(t){var e=void 0===t?{}:t,r=e.beforeError,n=e.afterError,t=e.beforeComplete,e=e.afterComplete;return this.run("COMMIT",{},{bookmark:i.empty(),txConfig:a.empty(),mode:s,beforeError:r,afterError:n,beforeComplete:t,afterComplete:e})},c.prototype.rollbackTransaction=function(t){var e=void 0===t?{}:t,r=e.beforeError,n=e.afterError,t=e.beforeComplete,e=e.afterComplete;return this.run("ROLLBACK",{},{bookmark:i.empty(),txConfig:a.empty(),mode:s,beforeError:r,afterError:n,beforeComplete:t,afterComplete:e})},c.prototype.run=function(t,e,r){var n=void 0===r?{}:r,o=(n.bookmark,n.txConfig),i=n.database,s=(n.mode,n.impersonatedUser),u=n.beforeKeys,a=n.afterKeys,c=n.beforeError,l=n.afterError,f=n.beforeComplete,r=n.afterComplete,n=n.flush,n=void 0===n||n,r=new d.ResultStreamObserver({server:this._server,beforeKeys:u,afterKeys:a,beforeError:c,afterError:l,beforeComplete:f,afterComplete:r});return(0,p.assertTxConfigIsEmpty)(o,this._onProtocolError,r),(0,p.assertDatabaseIsEmpty)(i,this._onProtocolError,r),(0,p.assertImpersonatedUserIsEmpty)(s,this._onProtocolError,r),this.write(h.default.run(t,e),r,!1),this.write(h.default.pullAll(),r,n),r},Object.defineProperty(c.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),c.prototype.reset=function(t){var e=void 0===t?{}:t,t=e.onError,e=e.onComplete,e=new d.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(h.default.reset(),e,!0),e},c.prototype._createPacker=function(t){return new o.v1.Packer(t)},c.prototype._createUnpacker=function(t,e){return new o.v1.Unpacker(t,e)},c.prototype.write=function(t,e,r){var n=this;this.queueObserverIfProtocolIsNotBroken(e)&&(this._log.isDebugEnabled()&&this._log.debug("C: "+t),this.packer().packStruct(t.signature,t.fields.map(function(t){return n.packer().packable(t)})),this._chunker.messageBoundary(),r&&this._chunker.flush())},c.prototype.notifyFatalError=function(t){return this._fatalError=t,this._responseHandler._notifyErrorToObservers(t)},c.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},c.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},c.prototype.queueObserverIfProtocolIsNotBroken=function(t){return this.isBroken()?(this.notifyFatalErrorToObserver(t),!1):this._responseHandler._queueObserver(t)},c.prototype.isBroken=function(){return!!this._fatalError},c.prototype.notifyFatalErrorToObserver=function(t){t&&t.onError&&t.onError(this._fatalError)},c.prototype.resetFailure=function(){this._responseHandler._resetFailure()},c.prototype._onLoginCompleted=function(t,e){var r;t&&(r=t.server,this._server.version||(this._server.version=r)),e&&e(t)},c.prototype._onLoginError=function(t,e){this._onProtocolError(t.message),e&&e(t)},c);function c(t,e,r,n,o,i){var s=void 0===r?{}:r,r=s.disableLosslessIntegers,s=s.useBigInt;void 0===n&&(n=function(){return null}),this._server=t||{},this._chunker=e,this._packer=this._createPacker(e),this._unpacker=this._createUnpacker(r,s),this._responseHandler=n(this),this._log=o,this._onProtocolError=i,this._fatalError=null}r.default=n},{"../packstream":43,"./bolt-protocol-util":1,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],3:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,u=i(t("./bolt-protocol-v1")),a=i(t("../packstream")),c=t("neo4j-driver-core").internal.constants.BOLT_PROTOCOL_V2,o=(s=u.default,o(l,s),l.prototype._createPacker=function(t){return new a.default.Packer(t)},l.prototype._createUnpacker=function(t,e){return new a.default.Unpacker(t,e)},Object.defineProperty(l.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),l);function l(){return null!==s&&s.apply(this,arguments)||this}r.default=o},{"../packstream":43,"./bolt-protocol-v1":2,"neo4j-driver-core":59}],4:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var u,a=s(t("./bolt-protocol-v2")),d=s(t("./request-message")),b=t("./bolt-protocol-util"),_=t("./stream-observers"),t=t("neo4j-driver-core"),c=(t.internal.bookmark.Bookmark,t.internal.constants.BOLT_PROTOCOL_V3),l=t.internal.txConfig.TxConfig,f="context",p=new _.StreamObserver,o=(u=a.default,o(h,u),Object.defineProperty(h.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),h.prototype.transformMetadata=function(t){return"t_first"in t&&(t.result_available_after=t.t_first,delete t.t_first),"t_last"in t&&(t.result_consumed_after=t.t_last,delete t.t_last),t},h.prototype.initialize=function(t){var e=this,r=void 0===t?{}:t,n=r.userAgent,t=r.authToken,o=r.onError,i=r.onComplete,r=new _.LoginObserver({onError:function(t){return e._onLoginError(t,o)},onCompleted:function(t){return e._onLoginCompleted(t,i)}});return this.write(d.default.hello(n,t),r,!0),r},h.prototype.prepareToClose=function(){this.write(d.default.goodbye(),p,!0)},h.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,r=e.bookmark,n=e.txConfig,o=e.database,i=e.impersonatedUser,s=e.mode,u=e.beforeError,a=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new _.ResultStreamObserver({server:this._server,beforeError:u,afterError:a,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),(0,b.assertDatabaseIsEmpty)(o,this._onProtocolError,e),(0,b.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,e),this.write(d.default.begin({bookmark:r,txConfig:n,mode:s}),e,!0),e},h.prototype.commitTransaction=function(t){var e=void 0===t?{}:t,r=e.beforeError,n=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new _.ResultStreamObserver({server:this._server,beforeError:r,afterError:n,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),this.write(d.default.commit(),e,!0),e},h.prototype.rollbackTransaction=function(t){var e=void 0===t?{}:t,r=e.beforeError,n=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new _.ResultStreamObserver({server:this._server,beforeError:r,afterError:n,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),this.write(d.default.rollback(),e,!0),e},h.prototype.run=function(t,e,r){var n=void 0===r?{}:r,o=n.bookmark,i=n.txConfig,s=n.database,u=n.impersonatedUser,a=n.mode,c=n.beforeKeys,l=n.afterKeys,f=n.beforeError,p=n.afterError,h=n.beforeComplete,r=n.afterComplete,n=n.flush,n=void 0===n||n,r=new _.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:h,afterComplete:r});return(0,b.assertDatabaseIsEmpty)(s,this._onProtocolError,r),(0,b.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,r),this.write(d.default.runWithMetadata(t,e,{bookmark:o,txConfig:i,mode:a}),r,!1),this.write(d.default.pullAll(),r,n),r},h.prototype.requestRoutingInformation=function(t){var e=t.routingContext,r=t.sessionContext,n=void 0===r?{}:r,o=t.onError,r=t.onCompleted,n=this.run("CALL dbms.cluster.routing.getRoutingTable($context)",((t={})[f]=void 0===e?{}:e,t),i(i({},n),{txConfig:l.empty()}));return new _.ProcedureRouteObserver({resultObserver:n,onProtocolError:this._onProtocolError,onError:o,onCompleted:r})},h);function h(){return null!==u&&u.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-util":1,"./bolt-protocol-v2":3,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],5:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var u,a=i(t("./bolt-protocol-v3")),_=i(t("./request-message")),y=t("./bolt-protocol-util"),v=t("./stream-observers"),i=t("neo4j-driver-core"),t=(i.internal.bookmark.Bookmark,i.internal.constants),c=t.BOLT_PROTOCOL_V4_0,m=t.FETCH_ALL,l=i.internal.txConfig.TxConfig,f="context",p="database",o=(u=a.default,o(h,u),Object.defineProperty(h.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),h.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,r=e.bookmark,n=e.txConfig,o=e.database,i=e.impersonatedUser,s=e.mode,u=e.beforeError,a=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new v.ResultStreamObserver({server:this._server,beforeError:u,afterError:a,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),(0,y.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,e),this.write(_.default.begin({bookmark:r,txConfig:n,database:o,mode:s}),e,!0),e},h.prototype.run=function(t,e,r){var n=void 0===r?{}:r,o=n.bookmark,i=n.txConfig,s=n.database,u=n.impersonatedUser,a=n.mode,c=n.beforeKeys,l=n.afterKeys,f=n.beforeError,p=n.afterError,h=n.beforeComplete,d=n.afterComplete,b=n.flush,r=void 0===b||b,b=n.reactive,b=void 0!==b&&b,n=n.fetchSize,n=void 0===n?m:n,d=new v.ResultStreamObserver({server:this._server,reactive:b,fetchSize:n,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:h,afterComplete:d});(0,y.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,d);u=b;return this.write(_.default.runWithMetadata(t,e,{bookmark:o,txConfig:i,database:s,mode:a}),d,u&&r),b||this.write(_.default.pull({n:n}),d,r),d},h.prototype._requestMore=function(t,e,r){this.write(_.default.pull({stmtId:t,n:e}),r,!0)},h.prototype._requestDiscard=function(t,e){this.write(_.default.discard({stmtId:t}),e,!0)},h.prototype._noOp=function(){},h.prototype.requestRoutingInformation=function(t){var e=t.routingContext,r=t.databaseName,n=void 0===r?null:r,o=t.sessionContext,i=void 0===o?{}:o,r=t.onError,o=t.onCompleted,i=this.run("CALL dbms.routing.getRoutingTable($context, $database)",((t={})[f]=void 0===e?{}:e,t[p]=n,t),s(s({},i),{txConfig:l.empty()}));return new v.ProcedureRouteObserver({resultObserver:i,onProtocolError:this._onProtocolError,onError:r,onCompleted:o})},h);function h(){return null!==u&&u.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-util":1,"./bolt-protocol-v3":4,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],6:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var u,s=i(t("./bolt-protocol-v4x0")),a=i(t("./request-message")),c=t("./stream-observers"),l=t("neo4j-driver-core").internal.constants.BOLT_PROTOCOL_V4_1,o=(u=s.default,o(f,u),Object.defineProperty(f.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),f.prototype.initialize=function(t){var e=this,r=void 0===t?{}:t,n=r.userAgent,t=r.authToken,o=r.onError,i=r.onComplete,r=new c.LoginObserver({onError:function(t){return e._onLoginError(t,o)},onCompleted:function(t){return e._onLoginCompleted(t,i)}});return this.write(a.default.hello(n,t,this._serversideRouting),r,!0),r},f);function f(t,e,r,n,o,i,s){i=u.call(this,t,e,r,n=void 0===n?function(){return null}:n,o,i)||this;return i._serversideRouting=s,i}r.default=o},{"./bolt-protocol-v4x0":5,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],7:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,i=i(t("./bolt-protocol-v4x1")),u=t("neo4j-driver-core").internal.constants.BOLT_PROTOCOL_V4_2,o=(s=i.default,o(a,s),Object.defineProperty(a.prototype,"version",{get:function(){return u},enumerable:!1,configurable:!0}),a);function a(){return null!==s&&s.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-v4x1":6,"neo4j-driver-core":59}],8:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,u=i(t("./bolt-protocol-v4x2")),a=i(t("./request-message")),c=t("./stream-observers"),t=t("neo4j-driver-core"),l=t.internal.bookmark.Bookmark,f=t.internal.constants.BOLT_PROTOCOL_V4_3,o=(s=u.default,o(p,s),Object.defineProperty(p.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),p.prototype.requestRoutingInformation=function(t){var e=t.routingContext,r=void 0===e?{}:e,n=t.databaseName,o=void 0===n?null:n,e=t.sessionContext,n=void 0===e?{}:e,e=t.onError,t=t.onCompleted,t=new c.RouteObserver({onProtocolError:this._onProtocolError,onError:e,onCompleted:t}),n=n.bookmark||l.empty();return this.write(a.default.route(r,n.values(),o),t,!0),t},p);function p(){return null!==s&&s.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-v4x2":7,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],9:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,u=i(t("./bolt-protocol-v4x3")),a=t("neo4j-driver-core"),_=i(t("./request-message")),y=t("./stream-observers"),t=a.internal.constants,c=t.BOLT_PROTOCOL_V4_4,v=t.FETCH_ALL,l=a.internal.bookmark.Bookmark,o=(s=u.default,o(f,s),Object.defineProperty(f.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),f.prototype.requestRoutingInformation=function(t){var e=t.routingContext,r=void 0===e?{}:e,n=t.databaseName,o=void 0===n?null:n,i=t.impersonatedUser,e=void 0===i?null:i,n=t.sessionContext,i=void 0===n?{}:n,n=t.onError,t=t.onCompleted,t=new y.RouteObserver({onProtocolError:this._onProtocolError,onError:n,onCompleted:t}),i=i.bookmark||l.empty();return this.write(_.default.routeV4x4(r,i.values(),{databaseName:o,impersonatedUser:e}),t,!0),t},f.prototype.run=function(t,e,r){var n=void 0===r?{}:r,o=n.bookmark,i=n.txConfig,s=n.database,u=n.mode,a=n.impersonatedUser,c=n.beforeKeys,l=n.afterKeys,f=n.beforeError,p=n.afterError,h=n.beforeComplete,d=n.afterComplete,b=n.flush,r=void 0===b||b,b=n.reactive,b=void 0!==b&&b,n=n.fetchSize,n=void 0===n?v:n,h=new y.ResultStreamObserver({server:this._server,reactive:b,fetchSize:n,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:h,afterComplete:d}),d=b;return this.write(_.default.runWithMetadata(t,e,{bookmark:o,txConfig:i,database:s,mode:u,impersonatedUser:a}),h,d&&r),b||this.write(_.default.pull({n:n}),h,r),h},f.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,r=e.bookmark,n=e.txConfig,o=e.database,i=e.mode,s=e.impersonatedUser,u=e.beforeError,a=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new y.ResultStreamObserver({server:this._server,beforeError:u,afterError:a,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),this.write(_.default.begin({bookmark:r,txConfig:n,database:o,mode:i,impersonatedUser:s}),e,!0),e},f);function f(){return null!==s&&s.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-v4x3":8,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],10:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var f=t("neo4j-driver-core"),p=n(t("./bolt-protocol-v1")),h=n(t("./bolt-protocol-v2")),d=n(t("./bolt-protocol-v3")),b=n(t("./bolt-protocol-v4x0")),_=n(t("./bolt-protocol-v4x1")),y=n(t("./bolt-protocol-v4x2")),v=n(t("./bolt-protocol-v4x3")),m=n(t("./bolt-protocol-v4x4")),g=n(t("./response-handler"));r.default=function(t){var e=void 0===t?{}:t,r=e.version,n=e.chunker,o=e.dechunker,i=e.channel,s=e.disableLosslessIntegers,u=e.useBigInt,a=e.serversideRouting,t=e.server,c=e.log,l=e.observer;return function(t,e,r,n,o,i,s,u){switch(t){case 1:return new p.default(e,r,n,i,u,s);case 2:return new h.default(e,r,n,i,u,s);case 3:return new d.default(e,r,n,i,u,s);case 4:return new b.default(e,r,n,i,u,s);case 4.1:return new _.default(e,r,n,i,u,s,o);case 4.2:return new y.default(e,r,n,i,u,s,o);case 4.3:return new v.default(e,r,n,i,u,s,o);case 4.4:return new m.default(e,r,n,i,u,s,o);default:throw(0,f.newError)("Unknown Bolt protocol version: "+t)}}(r,t,n,{disableLosslessIntegers:s,useBigInt:u},a,function(e){var r=new g.default({transformMetadata:e.transformMetadata.bind(e),log:c,observer:l});return i.onerror=l.onError.bind(l),i.onmessage=function(t){return o.write(t)},o.onmessage=function(t){r.handleResponse(e.unpacker().unpack(t))},r},l.onProtocolError.bind(l),c)}},{"./bolt-protocol-v1":2,"./bolt-protocol-v2":3,"./bolt-protocol-v3":4,"./bolt-protocol-v4x0":5,"./bolt-protocol-v4x1":6,"./bolt-protocol-v4x2":7,"./bolt-protocol-v4x3":8,"./bolt-protocol-v4x4":9,"./response-handler":14,"neo4j-driver-core":59}],11:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../channel"),i=t("neo4j-driver-core"),s=1616949271;function o(t,e){return{major:t,minor:e}}function u(){return function(t){if(4<t.length)throw(0,i.newError)("It should not have more than 4 versions of the protocol");var o=(0,n.alloc)(20);return o.writeInt32(s),t.forEach(function(t){var e,r,n;t instanceof Array?(r=(e=t[0]).major,n=e.minor,e=t[1].minor,o.writeInt32(n-e<<16|n<<8|r)):(r=t.major,n=t.minor,o.writeInt32(n<<8|r))}),o.reset(),o}([[o(4,4),o(4,2)],o(4,1),o(4,0),o(3,0)])}r.default=function(e){var o=this;return new Promise(function(r,n){function t(t){n(t)}e.onerror=t.bind(o),e._error&&t(e._error),e.onmessage=function(e){try{var t=function(t){if(72===(t=[t.readUInt8(),t.readUInt8(),t.readUInt8(),t.readUInt8()])[0]&&84===t[1]&&84===t[2]&&80===t[3])throw(0,i.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)");return Number(t[3]+"."+t[2])}(e);r({protocolVersion:t,consumeRemainingBuffer:function(t){e.hasRemaining()&&t(e.readSlice(e.remaining()))}})}catch(t){n(t)}},e.write(u())})}},{"../channel":26,"neo4j-driver-core":59}],12:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.RawRoutingTable=r.BoltProtocol=void 0;var s=i(t("./handshake")),u=i(t("./create")),a=i(t("./bolt-protocol-v4x3")),i=i(t("./routing-table-raw"));o(t("./stream-observers"),r),r.BoltProtocol=a.default,r.RawRoutingTable=i.default,r.default={handshake:s.default,create:u.default}},{"./bolt-protocol-v4x3":8,"./create":10,"./handshake":11,"./routing-table-raw":15,"./stream-observers":16}],13:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("neo4j-driver-core"),t=o.internal.constants,s=t.ACCESS_MODE_READ,n=t.FETCH_ALL,u=o.internal.util.assertString,t=(i.init=function(t,e){return new i(1,[t,e],function(){return"INIT "+t+" {...}"})},i.run=function(t,e){return new i(16,[t,e],function(){return"RUN "+t+" "+o.json.stringify(e)})},i.pullAll=function(){return l},i.reset=function(){return f},i.hello=function(t,e,r){void 0===r&&(r=null);e=Object.assign({user_agent:t},e);return r&&(e.routing=r),new i(1,[e],function(){return"HELLO {user_agent: '"+t+"', ...}"})},i.begin=function(t){var t=void 0===t?{}:t,e=a(t.bookmark,t.txConfig,t.database,t.mode,t.impersonatedUser);return new i(17,[e],function(){return"BEGIN "+o.json.stringify(e)})},i.commit=function(){return p},i.rollback=function(){return h},i.runWithMetadata=function(t,e,r){var r=void 0===r?{}:r,n=a(r.bookmark,r.txConfig,r.database,r.mode,r.impersonatedUser);return new i(16,[t,e,n],function(){return"RUN "+t+" "+o.json.stringify(e)+" "+o.json.stringify(n)})},i.goodbye=function(){return d},i.pull=function(t){var e=void 0===t?{}:t,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=c(null==t?-1:t,(void 0===e?n:e)||n);return new i(63,[r],function(){return"PULL "+o.json.stringify(r)})},i.discard=function(t){var e=void 0===t?{}:t,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=c(null==t?-1:t,(void 0===e?n:e)||n);return new i(47,[r],function(){return"DISCARD "+o.json.stringify(r)})},i.route=function(t,e,r){return new i(102,[t=void 0===t?{}:t,e=void 0===e?[]:e,r=void 0===r?null:r],function(){return"ROUTE "+o.json.stringify(t)+" "+o.json.stringify(e)+" "+r})},i.routeV4x4=function(t,e,r){void 0===t&&(t={}),void 0===e&&(e=[]);var n={};return(r=void 0===r?{}:r).databaseName&&(n.db=r.databaseName),r.impersonatedUser&&(n.imp_user=r.impersonatedUser),new i(102,[t,e,n],function(){return"ROUTE "+o.json.stringify(t)+" "+o.json.stringify(e)+" "+o.json.stringify(n)})},i);function i(t,e,r){this.signature=t,this.fields=e,this.toString=r}function a(t,e,r,n,o){var i={};return t.isEmpty()||(i.bookmarks=t.values()),e.timeout&&(i.tx_timeout=e.timeout),e.metadata&&(i.tx_metadata=e.metadata),r&&(i.db=u(r,"database")),o&&(i.imp_user=u(o,"impersonatedUser")),n===s&&(i.mode="r"),i}function c(t,e){e={n:(0,o.int)(e)};return-1!==t&&(e.qid=(0,o.int)(t)),e}var l=new(r.default=t)(63,[],function(){return"PULL_ALL"}),f=new t(15,[],function(){return"RESET"}),p=new t(18,[],function(){return"COMMIT"}),h=new t(19,[],function(){return"ROLLBACK"}),d=new t(2,[],function(){return"GOODBYE"})},{"neo4j-driver-core":59}],14:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("neo4j-driver-core");function n(){}function i(t){return t}var s={onNext:n,onCompleted:n,onError:n},t=(Object.defineProperty(u.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),u.prototype.handleResponse=function(t){var e=t.fields[0];switch(t.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD "+o.json.stringify(t)),this._currentObserver.onNext(e);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS "+o.json.stringify(t));try{var r=this._transformMetadata(e);this._currentObserver.onCompleted(r)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE "+o.json.stringify(t));try{var n=(0,o.newError)(e.message,e.code);this._currentFailure=this._observer.onErrorApplyTransformation(n),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED "+o.json.stringify(t));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,o.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,o.newError)("Unknown Bolt protocol message: "+t))}},u.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift()},u.prototype._queueObserver=function(t){return(t=t||s).onCompleted=t.onCompleted||n,t.onError=t.onError||n,t.onNext=t.onNext||n,void 0===this._currentObserver?this._currentObserver=t:this._pendingObservers.push(t),!0},u.prototype._notifyErrorToObservers=function(t){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(t);0<this._pendingObservers.length;){var e=this._pendingObservers.shift();e&&e.onError&&e.onError(t)}},u.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},u.prototype._resetFailure=function(){this._currentFailure=null},u);function u(t){var e=void 0===t?{}:t,r=e.transformMetadata,t=e.log,e=e.observer;this._pendingObservers=[],this._log=t,this._transformMetadata=r||i,this._observer=Object.assign({onError:n,onFailure:n,onErrorApplyTransformation:i},e)}r.default=t},{"neo4j-driver-core":59}],15:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=(s.ofRecord=function(t){return null===t?s.ofNull():new d(t)},s.ofMessageResponse=function(t){return null===t?s.ofNull():new a(t)},s.ofNull=function(){return new f},Object.defineProperty(s.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),s);function s(){}r.default=i;var u,a=(o(c,u=i),Object.defineProperty(c.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0}),c);function c(t){var e=u.call(this)||this;return e._response=t,e}var l,f=(o(p,l=i),Object.defineProperty(p.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),p);function p(){return null!==l&&l.apply(this,arguments)||this}var h,d=(o(b,h=i),Object.defineProperty(b.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0}),b);function b(t){var e=h.call(this)||this;return e._record=t,e}},{}],16:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.ProcedureRouteObserver=r.RouteObserver=r.CompletedObserver=r.FailedObserver=r.ResetObserver=r.LoginObserver=r.ResultStreamObserver=r.StreamObserver=void 0;var s=t("neo4j-driver-core"),u=i(t("./routing-table-raw")),p=s.internal.constants.FETCH_ALL,a=s.error.PROTOCOL_ERROR,c=(l.prototype.onNext=function(t){},l.prototype.onError=function(t){},l.prototype.onCompleted=function(t){},l);function l(){}r.StreamObserver=c;var h,i=(o(f,h=c),f.prototype.onNext=function(t){var e=new s.Record(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))},f.prototype.onCompleted=function(t){this._state.onSuccess(this,t)},f.prototype.onError=function(t){this._state.onError(this,t)},f.prototype.cancel=function(){this._discard=!0},f.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(j.STREAMING)},f.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(j.SUCCEEDED)},f.prototype.subscribe=function(t){if(this._error)t.onError(this._error);else{if(this._head&&t.onKeys&&t.onKeys(this._head),0<this._queuedRecords.length&&t.onNext)for(var e=0;e<this._queuedRecords.length;e++)t.onNext(this._queuedRecords[e]),this._queuedRecords.length-e-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===j.READY&&this._handleStreaming());this._tail&&t.onCompleted&&t.onCompleted(this._tail),this._observers.push(t),this._state===j.READY&&this._handleStreaming()}},f.prototype._handleHasMore=function(t){this._setState(j.READY),this._handleStreaming(),delete t.has_more},f.prototype._handlePullSuccess=function(t){var e=this;this._setState(j.SUCCEEDED);var r=Object.assign(this._server?{server:this._server}:{},this._meta,t),n=null;this._beforeComplete&&(n=this._beforeComplete(r));t=function(){e._tail=r,e._observers.some(function(t){return t.onCompleted})&&e._observers.forEach(function(t){t.onCompleted&&t.onCompleted(r)}),e._afterComplete&&e._afterComplete(r)};n?Promise.resolve(n).then(t):t()},f.prototype._handleRunSuccess=function(t,e){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},t.fields&&0<t.fields.length){this._fieldKeys=t.fields;for(var n=0;n<t.fields.length;n++)this._fieldLookup[t.fields[n]]=n;delete t.fields}null!==t.qid&&void 0!==t.qid&&(this._queryId=t.qid,delete t.qid),this._storeMetadataForCompletion(t);var o=null;this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys));var i=function(){r._head=r._fieldKeys,r._observers.some(function(t){return t.onKeys})&&r._observers.forEach(function(t){t.onKeys&&t.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),e()};o?Promise.resolve(o).then(i):i()}},f.prototype._handleError=function(e){var t=this;this._setState(j.FAILED),this._error=e;var r=null;this._beforeError&&(r=this._beforeError(e));function n(){t._observers.some(function(t){return t.onError})&&t._observers.forEach(function(t){t.onError&&t.onError(e)}),t._afterError&&t._afterError(e)}r?Promise.resolve(r).then(n):n()},f.prototype._handleStreaming=function(){this._head&&this._observers.some(function(t){return t.onNext||t.onCompleted})&&(this._discard?(this._discardFunction(this._queryId,this),this._setState(j.STREAMING)):this._autoPull&&(this._moreFunction(this._queryId,this._fetchSize,this),this._setState(j.STREAMING)))},f.prototype._storeMetadataForCompletion=function(t){for(var e,r=Object.keys(t),n=r.length;n--;)e=r[n],this._meta[e]=t[e]},f.prototype._setState=function(t){this._state=t},f.prototype._setupAuoPull=function(t){this._autoPull=!0,t===p?(this._lowRecordWatermark=Number.MAX_VALUE,this._highRecordWatermark=Number.MAX_VALUE):(this._lowRecordWatermark=.3*t,this._highRecordWatermark=.7*t)},f);function f(t){var e=void 0===t?{}:t,r=e.reactive,n=void 0!==r&&r,o=e.moreFunction,i=e.discardFunction,s=e.fetchSize,u=void 0===s?p:s,a=e.beforeError,c=e.afterError,l=e.beforeKeys,f=e.afterKeys,t=e.beforeComplete,r=e.afterComplete,s=e.server,e=h.call(this)||this;return e._fieldKeys=null,e._fieldLookup=null,e._head=null,e._queuedRecords=[],e._tail=null,e._error=null,e._observers=[],e._meta={},e._server=s,e._beforeError=a,e._afterError=c,e._beforeKeys=l,e._afterKeys=f,e._beforeComplete=t,e._afterComplete=r,e._queryId=null,e._moreFunction=o,e._discardFunction=i,e._discard=!1,e._fetchSize=u,e._setState(n?j.READY:j.READY_STREAMING),e._setupAuoPull(u),e}r.ResultStreamObserver=i;var d,t=(o(b,d=c),b.prototype.onNext=function(t){this.onError((0,s.newError)("Received RECORD when initializing "+s.json.stringify(t)))},b.prototype.onError=function(t){this._onError&&this._onError(t)},b.prototype.onCompleted=function(t){this._onCompleted&&this._onCompleted(t)},b);function b(t){var e=void 0===t?{}:t,r=e.onError,t=e.onCompleted,e=d.call(this)||this;return e._onError=r,e._onCompleted=t,e}r.LoginObserver=t;var _,t=(o(y,_=c),y.prototype.onNext=function(t){this.onError((0,s.newError)("Received RECORD when resetting: received record is: "+s.json.stringify(t),a))},y.prototype.onError=function(t){t.code===a&&this._onProtocolError&&this._onProtocolError(t.message),this._onError&&this._onError(t)},y.prototype.onCompleted=function(t){this._onComplete&&this._onComplete(t)},y);function y(t){var e=void 0===t?{}:t,r=e.onProtocolError,n=e.onError,t=e.onComplete,e=_.call(this)||this;return e._onProtocolError=r,e._onError=n,e._onComplete=t,e}r.ResetObserver=t;var v,t=(o(m,v=i),m);function m(t){var e=t.error,t=t.onError,t=v.call(this,{beforeError:t})||this;return t.onError(e),t}r.FailedObserver=t;var g,i=(o(O,g=i),O);function O(){var t=g.call(this)||this;return g.prototype.markCompleted.call(t),t}r.CompletedObserver=i;var w,i=(o(S,w=c),S.prototype.onNext=function(t){this._records.push(t)},S.prototype.onError=function(t){t.code===a&&this._onProtocolError&&this._onProtocolError(t.message),this._onError&&this._onError(t)},S.prototype.onCompleted=function(){null===this._records||1===this._records.length?this._onCompleted&&this._onCompleted(u.default.ofRecord(this._records[0])):this.onError((0,s.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+s.json.stringify(this._records),a))},S);function S(t){var e=t.resultObserver,r=t.onProtocolError,n=t.onError,o=t.onCompleted,t=w.call(this)||this;return t._resultObserver=e,t._onError=n,t._onCompleted=o,t._records=[],t._onProtocolError=r,e.subscribe(t),t}r.ProcedureRouteObserver=i;var E,c=(o(P,E=c),P.prototype.onNext=function(t){this.onError((0,s.newError)("Received RECORD when resetting: received record is: "+s.json.stringify(t),a))},P.prototype.onError=function(t){t.code===a&&this._onProtocolError&&this._onProtocolError(t.message),this._onError&&this._onError(t)},P.prototype.onCompleted=function(t){this._onCompleted&&this._onCompleted(u.default.ofMessageResponse(t))},P);function P(t){var e=void 0===t?{}:t,r=e.onProtocolError,n=e.onError,t=e.onCompleted,e=E.call(this)||this;return e._onProtocolError=r,e._onError=n,e._onCompleted=t,e}r.RouteObserver=c;var j={READY_STREAMING:{onSuccess:function(t,e){t._handleRunSuccess(e,function(){t._setState(j.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"}}}},{"./routing-table-raw":15,"neo4j-driver-core":59}],17:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=(s.prototype.getUInt8=function(t){throw new Error("Not implemented")},s.prototype.getInt8=function(t){throw new Error("Not implemented")},s.prototype.getFloat64=function(t){throw new Error("Not implemented")},s.prototype.putUInt8=function(t,e){throw new Error("Not implemented")},s.prototype.putInt8=function(t,e){throw new Error("Not implemented")},s.prototype.putFloat64=function(t,e){throw new Error("Not implemented")},s.prototype.getInt16=function(t){return this.getInt8(t)<<8|this.getUInt8(t+1)},s.prototype.getUInt16=function(t){return this.getUInt8(t)<<8|this.getUInt8(t+1)},s.prototype.getInt32=function(t){return this.getInt8(t)<<24|this.getUInt8(t+1)<<16|this.getUInt8(t+2)<<8|this.getUInt8(t+3)},s.prototype.getUInt32=function(t){return this.getUInt8(t)<<24|this.getUInt8(t+1)<<16|this.getUInt8(t+2)<<8|this.getUInt8(t+3)},s.prototype.getInt64=function(t){return this.getInt8(t)<<56|this.getUInt8(t+1)<<48|this.getUInt8(t+2)<<40|this.getUInt8(t+3)<<32|this.getUInt8(t+4)<<24|this.getUInt8(t+5)<<16|this.getUInt8(t+6)<<8|this.getUInt8(t+7)},s.prototype.getSlice=function(t,e){return new a(t,e,this)},s.prototype.putInt16=function(t,e){this.putInt8(t,e>>8),this.putUInt8(t+1,255&e)},s.prototype.putUInt16=function(t,e){this.putUInt8(t,e>>8&255),this.putUInt8(t+1,255&e)},s.prototype.putInt32=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)},s.prototype.putUInt32=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)},s.prototype.putInt64=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)},s.prototype.putBytes=function(t,e){for(var r=0,n=e.remaining();r<n;r++)this.putUInt8(t+r,e.readUInt8())},s.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},s.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},s.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},s.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},s.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},s.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},s.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},s.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},s.prototype.writeUInt8=function(t){this.putUInt8(this._updatePos(1),t)},s.prototype.writeInt8=function(t){this.putInt8(this._updatePos(1),t)},s.prototype.writeInt16=function(t){this.putInt16(this._updatePos(2),t)},s.prototype.writeInt32=function(t){this.putInt32(this._updatePos(4),t)},s.prototype.writeUInt32=function(t){this.putUInt32(this._updatePos(4),t)},s.prototype.writeInt64=function(t){this.putInt64(this._updatePos(8),t)},s.prototype.writeFloat64=function(t){this.putFloat64(this._updatePos(8),t)},s.prototype.writeBytes=function(t){this.putBytes(this._updatePos(t.remaining()),t)},s.prototype.readSlice=function(t){return this.getSlice(this._updatePos(t),t)},s.prototype._updatePos=function(t){var e=this.position;return this.position+=t,e},s.prototype.remaining=function(){return this.length-this.position},s.prototype.hasRemaining=function(){return 0<this.remaining()},s.prototype.reset=function(){this.position=0},s.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},s.prototype.toHex=function(){for(var t="",e=0;e<this.length;e++){var r=this.getUInt8(e).toString(16);t+=r=1===r.length?"0"+r:r,e!==this.length-1&&(t+=" ")}return t},s);function s(t){this.position=0,this.length=t}r.default=i;var u,a=(o(c,u=i),c.prototype.putUInt8=function(t,e){this._inner.putUInt8(this._start+t,e)},c.prototype.getUInt8=function(t){return this._inner.getUInt8(this._start+t)},c.prototype.putInt8=function(t,e){this._inner.putInt8(this._start+t,e)},c.prototype.putFloat64=function(t,e){this._inner.putFloat64(this._start+t,e)},c.prototype.getInt8=function(t){return this._inner.getInt8(this._start+t)},c.prototype.getFloat64=function(t){return this._inner.getFloat64(this._start+t)},c);function c(t,e,r){e=u.call(this,e)||this;return e._start=t,e._inner=r,e}},{}],18:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.BaseBuffer=void 0;t=n(t("./base-buf"));r.BaseBuffer=t.default,r.default=t.default},{"./base-buf":17}],19:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../channel-buf")),s=t("neo4j-driver-core"),t=s.internal.util,u=t.ENCRYPTION_OFF,a=t.ENCRYPTION_ON,t=(o.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,s.newError)("Failed to establish connection in "+this._config.connectionTimeout+"ms",this._config.connectionErrorCode),void(this.onerror&&this.onerror(this._error));this._open&&(this._error=(0,s.newError)("WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket `readyState` is: "+this._ws.readyState,this._config.connectionErrorCode),this.onerror&&this.onerror(this._error))},o.prototype.write=function(t){if(null!==this._pending)this._pending.push(t);else{if(!(t instanceof i.default))throw(0,s.newError)("Don't know how to send buffer: "+t);try{this._ws.send(t._buffer)}catch(t){if(1===this._ws.readyState)throw t;this._handleConnectionError()}}},o.prototype.close=function(){var r=this;return new Promise(function(t,e){r._ws&&3!==r._ws.readyState?(r._open=!1,r._clearConnectionTimeout(),r._ws.onclose=function(){return t()},r._ws.close()):t()})},o.prototype.setupReceiveTimeout=function(t){},o.prototype._setupConnectionTimeout=function(){var t=this,e=this._config.connectionTimeout;if(e){var r=this._ws;return setTimeout(function(){1!==r.readyState&&(t._connectionTimeoutFired=!0,r.close())},e)}return null},o.prototype._clearConnectionTimeout=function(){var t=this._connectionTimeoutId;!t&&0!==t||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(t))},o);function o(t,e,r){void 0===e&&(e=c),void 0===r&&(r=function(t){return new WebSocket(t)}),this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this);var n,o=function(t,e){var r=function(t){return!0===t.encrypted||t.encrypted===a}(t),n=function(t){return!1===t.encrypted||t.encrypted===u}(t),t=t.trust,e=function(t){t="function"==typeof t?t():"";return t&&0<=t.toLowerCase().indexOf("https")}(e);if(function(t,e,r){null===r||(t&&!r?console.warn("Neo4j driver is configured to use secure WebSocket on a HTTP web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to not use encryption."):e&&r&&console.warn("Neo4j driver is configured to use insecure WebSocket on a HTTPS web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to use encryption."))}(r,n,e),n)return{scheme:"ws",error:null};if(e)return{scheme:"wss",error:null};if(r)return t&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==t?{scheme:null,error:(0,s.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+t+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+u+'"` in the driver configuration.')}:{scheme:"wss",error:null};return{scheme:"ws",error:null}}(this._config=t,e),e=o.scheme,o=o.error;o?this._error=o:(this._ws=function(e,r,n){var t=e+"://"+r.asHostPort();try{return n(t)}catch(t){if(function(t,e){return"SyntaxError"===t.name&&function(t){return"["===t.charAt(0)&&-1!==t.indexOf("]")}(e.asHostPort())}(t,r)){r=function(t,e){var r=e.host().replace(new RegExp(":","g"),"-").replace("%","s");return t+"://"+r+".ipv6-literal.net:"+e.port()}(e,r);return n(r)}throw t}}(e,t.address,r),this._ws.binaryType="arraybuffer",(n=this)._ws.onclose=function(t){t&&!t.wasClean&&n._handleConnectionError(),n._open=!1},this._ws.onopen=function(){n._clearConnectionTimeout();var t=n._pending;n._pending=null;for(var e=0;e<t.length;e++)n.write(t[e])},this._ws.onmessage=function(t){n.onmessage&&(t=new i.default(t.data),n.onmessage(t))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function c(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}r.default=t},{"../channel-buf":22,"neo4j-driver-core":59}],20:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("neo4j-driver-core").internal.resolver.BaseHostNameResolver,t=(o(s,i=t),s.prototype.resolve=function(t){return this._resolveToItself(t)},s);function s(){return null!==i&&i.apply(this,arguments)||this}r.default=t},{"neo4j-driver-core":59}],21:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.HostNameResolver=r.Channel=void 0;var o=n(t("./browser-channel")),t=n(t("./browser-host-name-resolver"));r.Channel=o.default,r.HostNameResolver=t.default},{"./browser-channel":19,"./browser-host-name-resolver":20}],22:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.alloc=void 0;var s,u=i(t("buffer")),t=i(t("../buf")),a=(s=t.default,o(c,s),c.prototype.getUInt8=function(t){return this._buffer.readUInt8(t)},c.prototype.getInt8=function(t){return this._buffer.readInt8(t)},c.prototype.getFloat64=function(t){return this._buffer.readDoubleBE(t)},c.prototype.putUInt8=function(t,e){this._buffer.writeUInt8(e,t)},c.prototype.putInt8=function(t,e){this._buffer.writeInt8(e,t)},c.prototype.putFloat64=function(t,e){this._buffer.writeDoubleBE(e,t)},c.prototype.putBytes=function(t,e){var r;e instanceof c?(r=Math.min(e.length-e.position,this.length-t),e._buffer.copy(this._buffer,t,e.position,e.position+r),e.position+=r):s.prototype.putBytes.call(this,t,e)},c.prototype.getSlice=function(t,e){return new c(this._buffer.slice(t,t+e))},c);function c(t){var e=this,t=(t=t)instanceof u.default.Buffer?t:"number"==typeof t&&"function"==typeof u.default.Buffer.alloc?u.default.Buffer.alloc(t):new u.default.Buffer(t);return(e=s.call(this,t.length)||this)._buffer=t,e}r.default=a,r.alloc=function(t){return new a(t)}},{"../buf":18,buffer:97}],23:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("neo4j-driver-core"),o=n.internal.util,t=o.ENCRYPTION_OFF,o=o.ENCRYPTION_ON,i=n.error.SERVICE_UNAVAILABLE,s=3e4,u=[null,void 0,!0,!1,o,t],a=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];r.default=function(t,e,r){this.address=t,this.encrypted=function(t){t=t.encrypted;if(-1!==u.indexOf(t))return t;throw(0,n.newError)("Illegal value of the encrypted setting "+t+". Expected one of "+u)}(e),this.trust=function(t){t=t.trust;if(-1!==a.indexOf(t))return t;throw(0,n.newError)("Illegal value of the trust setting "+t+". Expected one of "+a)}(e),this.trustedCertificates=e.trustedCertificates||[],this.knownHostsPath=e.knownHosts||null,this.connectionErrorCode=r||i,this.connectionTimeout=function(t){t=parseInt(t.connectionTimeout,10);return 0===t||t&&t<0?null:t||s}(e)}},{"neo4j-driver-core":59}],24:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.Dechunker=r.Chunker=void 0;var s,u=i(t("../buf/base-buf")),a=t("./channel-buf"),c=i(t("./combined-buf")),o=(s=u.default,o(l,s),l.prototype.putUInt8=function(t,e){this._ensure(1),this._buffer.writeUInt8(e)},l.prototype.putInt8=function(t,e){this._ensure(1),this._buffer.writeInt8(e)},l.prototype.putFloat64=function(t,e){this._ensure(8),this._buffer.writeFloat64(e)},l.prototype.putBytes=function(t,e){for(;0<e.remaining();)this._ensure(1),this._buffer.remaining()>e.remaining()?this._buffer.writeBytes(e):this._buffer.writeBytes(e.readSlice(this._buffer.remaining()));return this},l.prototype.flush=function(){var t;return 0<this._buffer.position&&(this._closeChunkIfOpen(),t=this._buffer,this._buffer=null,this._ch.write(t.getSlice(0,t.position)),this._buffer=(0,a.alloc)(this._bufferSize),this._chunkOpen=!1),this},l.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},l.prototype._ensure=function(t){t=this._chunkOpen?t:t+2;this._buffer.remaining()<t&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+2,this._chunkOpen=!0)},l.prototype._closeChunkIfOpen=function(){var t;this._chunkOpen&&(t=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,t),this._chunkOpen=!1)},l);function l(t,e){var r=s.call(this,0)||this;return r._bufferSize=e||1400,r._ch=t,r._buffer=(0,a.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}r.Chunker=o;f.prototype.AWAITING_CHUNK=function(t){return 2<=t.remaining()?this._onHeader(t.readUInt16()):(this._partialChunkHeader=t.readUInt8()<<8,this.IN_HEADER)},f.prototype.IN_HEADER=function(t){return this._onHeader(65535&(this._partialChunkHeader|t.readUInt8()))},f.prototype.IN_CHUNK=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)},f.prototype.CLOSED=function(t){},f.prototype._onHeader=function(t){if(0!==t)return this._chunkSize=t,this.IN_CHUNK;var e=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:e=this._currentMessage[0];break;default:e=new c.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(e),this.AWAITING_CHUNK},f.prototype.write=function(t){for(;t.hasRemaining();)this._state=this._state(t)},o=f;function f(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}r.Dechunker=o},{"../buf/base-buf":17,"./channel-buf":22,"./combined-buf":25}],25:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../buf"),u=t("./channel-buf"),o=(i=s.BaseBuffer,o(a,i),a.prototype.getUInt8=function(t){for(var e=0;e<this._buffers.length;e++){var r=this._buffers[e];if(!(t>=r.length))return r.getUInt8(t);t-=r.length}},a.prototype.getInt8=function(t){for(var e=0;e<this._buffers.length;e++){var r=this._buffers[e];if(!(t>=r.length))return r.getInt8(t);t-=r.length}},a.prototype.getFloat64=function(t){for(var e=(0,u.alloc)(8),r=0;r<8;r++)e.putUInt8(r,this.getUInt8(t+r));return e.getFloat64(0)},a);function a(t){for(var e=this,r=0,n=0;n<t.length;n++)r+=t[n].length;return(e=i.call(this,r)||this)._buffers=t,e}r.default=o},{"../buf":18,"./channel-buf":22}],26:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.utf8=r.alloc=r.ChannelConfig=void 0,o(t("./node"),r),o(t("./chunking"),r);var s=t("./channel-config");Object.defineProperty(r,"ChannelConfig",{enumerable:!0,get:function(){return i(s).default}});var u=t("./channel-buf");Object.defineProperty(r,"alloc",{enumerable:!0,get:function(){return u.alloc}});var a=t("./utf8");Object.defineProperty(r,"utf8",{enumerable:!0,get:function(){return i(a).default}})},{"./channel-buf":22,"./channel-config":23,"./chunking":24,"./node":21,"./utf8":27}],27:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t("./channel-buf")),i=t("neo4j-driver-core"),s=n(t("buffer")),u=new(t("string_decoder").StringDecoder)("utf8");r.default={encode:function(t){return new o.default((t=t,"function"==typeof s.default.Buffer.from?s.default.Buffer.from(t,"utf8"):new s.default.Buffer(t,"utf8")))},decode:function(t,e){if(Object.prototype.hasOwnProperty.call(t,"_buffer"))return n=e,o=(r=t).position,n=o+n,r.position=Math.min(n,r.length),r._buffer.toString("utf8",o,n);if(Object.prototype.hasOwnProperty.call(t,"_buffers"))return function(t,e,o,r){var i=e,s=t.position;return t._updatePos(Math.min(e,t.length-s)),t._buffers.reduce(function(t,e){if(i<=0)return t;if(s>=e.length)return s-=e.length,"";e._updatePos(s-e.position);var r=Math.min(e.length-s,i),n=e.readSlice(r);return e._updatePos(r),i=Math.max(i-n.length,0),s=0,t+o(n)},"")+r()}(t,e,function(t){return u.write(t._buffer)},function(){return u.end()});throw(0,i.newError)("Don't know how to decode strings from '"+t+"'");var r,n,o}}},{"./channel-buf":22,buffer:97,"neo4j-driver-core":59,string_decoder:299}],28:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},s=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var a,c=u(t("./connection-provider-pooled")),l=t("../connection"),u=t("neo4j-driver-core"),t=u.internal.constants,f=t.BOLT_PROTOCOL_V3,p=t.BOLT_PROTOCOL_V4_0,h=t.BOLT_PROTOCOL_V4_4,d=u.error.SERVICE_UNAVAILABLE,o=(u.error.newError,a=c.default,o(b,a),b.prototype.acquireConnection=function(t){var r=this,t=void 0===t?{}:t,n=(t.accessMode,t.database),e=(t.bookmarks,l.ConnectionErrorHandler.create({errorCode:d,handleAuthorizationExpired:function(t,e){return r._handleAuthorizationExpired(t,e,n)}}));return this._connectionPool.acquire(this._address).then(function(t){return new l.DelegateConnection(t,e)})},b.prototype._handleAuthorizationExpired=function(t,e,r){return this._log.warn("Direct driver "+this._id+" will close connection to "+e+" for database '"+r+"' because of an error "+t.code+" '"+t.message+"'"),this._connectionPool.purge(e).catch(function(){}),t},b.prototype._hasProtocolVersion=function(n){return i(this,void 0,void 0,function(){var e,r;return s(this,function(t){switch(t.label){case 0:return[4,(0,l.createChannelConnection)(this._address,this._config,this._createConnectionErrorHandler(),this._log)];case 1:return e=t.sent(),r=e.protocol()?e.protocol().version:null,[4,e.close()];case 2:return t.sent(),r?[2,n(r)]:[2,!1]}})})},b.prototype.supportsMultiDb=function(){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return p<=t})];case 1:return[2,t.sent()]}})})},b.prototype.supportsTransactionConfig=function(){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return f<=t})];case 1:return[2,t.sent()]}})})},b.prototype.supportsUserImpersonation=function(){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return h<=t})];case 1:return[2,t.sent()]}})})},b);function b(t){var e=t.id,r=t.config,n=t.log,o=t.address,i=t.userAgent,t=t.authToken,t=a.call(this,{id:e,config:r,log:n,userAgent:i,authToken:t})||this;return t._address=o,t}r.default=o},{"../connection":37,"./connection-provider-pooled":29,"neo4j-driver-core":59}],29:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return s(e,t),e},a=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},c=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}};Object.defineProperty(r,"__esModule",{value:!0});var l,f=t("../connection"),p=u(t("../pool")),t=t("neo4j-driver-core"),h=t.error.SERVICE_UNAVAILABLE,o=(l=t.ConnectionProvider,o(d,l),d.prototype._createConnectionErrorHandler=function(){return new f.ConnectionErrorHandler(h)},d.prototype._createConnection=function(t,r){var n=this;return this._createChannelConnection(t).then(function(e){return e._release=function(){return r(t,e)},(n._openConnections[e.id]=e).connect(n._userAgent,n._authToken).catch(function(t){throw n._destroyConnection(e),t})})},d.prototype._validateConnection=function(t){if(!t.isOpen())return!1;var e=this._config.maxConnectionLifetime;return Date.now()-t.creationTimestamp<=e},d.prototype._destroyConnection=function(t){return delete this._openConnections[t.id],t.close()},d.prototype.close=function(){return a(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return[4,this._connectionPool.close()];case 1:return t.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(t){return t.close()}))];case 2:return t.sent(),[2]}})})},d._installIdleObserverOnConnection=function(t,e){t._queueObserver(e)},d._removeIdleObserverOnConnection=function(t){t._updateCurrentObserver()},d);function d(t,e){var r=t.id,n=t.config,o=t.log,i=t.userAgent,t=t.authToken;void 0===e&&(e=null);var s=l.call(this)||this;return s._id=r,s._config=n,s._log=o,s._userAgent=i,s._authToken=t,s._createChannelConnection=e||function(t){return(0,f.createChannelConnection)(t,s._config,s._createConnectionErrorHandler(),s._log)},s._connectionPool=new p.default({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validate:s._validateConnection.bind(s),installIdleObserver:d._installIdleObserverOnConnection.bind(s),removeIdleObserver:d._removeIdleObserverOnConnection.bind(s),config:p.PoolConfig.fromDriverConfig(n),log:s._log}),s._openConnections={},s}r.default=o},{"../connection":37,"../pool":47,"neo4j-driver-core":59}],30:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=this&&this.__assign||function(){return(l=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return s(e,t),e},h=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},d=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},c=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},f=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var p,b=t("neo4j-driver-core"),_=u(t("../rediscovery")),y=t("../channel"),v=f(t("./connection-provider-single")),f=f(t("./connection-provider-pooled")),m=t("../load-balancing"),g=t("../connection"),O=b.error.SERVICE_UNAVAILABLE,w=b.error.SESSION_EXPIRED,S=b.internal.bookmark.Bookmark,t=b.internal.constants,E=t.ACCESS_MODE_READ,P=t.ACCESS_MODE_WRITE,j=t.BOLT_PROTOCOL_V3,T=t.BOLT_PROTOCOL_V4_0,C=t.BOLT_PROTOCOL_V4_4,x=null,I=(0,b.int)(3e4),o=(p=f.default,o(A,p),A.prototype._createConnectionErrorHandler=function(){return new g.ConnectionErrorHandler(w)},A.prototype._handleUnavailability=function(t,e,r){return this._log.warn("Routing driver "+this._id+" will forget "+e+" for database '"+r+"' because of an error "+t.code+" '"+t.message+"'"),this.forget(e,r||x),t},A.prototype._handleAuthorizationExpired=function(t,e,r){return this._log.warn("Routing driver "+this._id+" will close connections to "+e+" for database '"+r+"' because of an error "+t.code+" '"+t.message+"'"),this._connectionPool.purge(e).catch(function(){}),t},A.prototype._handleWriteFailure=function(t,e,r){return this._log.warn("Routing driver "+this._id+" will forget writer "+e+" for database '"+r+"' because of an error "+t.code+" '"+t.message+"'"),this.forgetWriter(e,r||x),(0,b.newError)("No longer possible to write to server at "+e,w)},A.prototype.acquireConnection=function(t){var t=void 0===t?{}:t,a=t.accessMode,c=t.database,l=t.bookmarks,f=t.impersonatedUser,p=t.onDatabaseNameResolved;return h(this,void 0,void 0,function(){var e,r,n,o,i,s,u=this;return d(this,function(t){switch(t.label){case 0:return n={database:c||x},o=new g.ConnectionErrorHandler(w,function(t,e){return u._handleUnavailability(t,e,n.database)},function(t,e){return u._handleWriteFailure(t,e,n.database)},function(t,e){return u._handleAuthorizationExpired(t,e,n.database)}),[4,this._freshRoutingTable({accessMode:a,database:n.database,bookmark:l,impersonatedUser:f,onDatabaseNameResolved:function(t){n.database=n.database||t,p&&p(t)}})];case 1:if(i=t.sent(),a===E)r=this._loadBalancingStrategy.selectReader(i.readers),e="read";else{if(a!==P)throw(0,b.newError)("Illegal mode "+a);r=this._loadBalancingStrategy.selectWriter(i.writers),e="write"}if(!r)throw(0,b.newError)("Failed to obtain connection towards "+e+" server. Known routing table is: "+i,w);t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this._acquireConnectionToServer(r,e,i)];case 3:return s=t.sent(),[2,new g.DelegateConnection(s,o)];case 4:throw s=t.sent(),o.handleAndTransformError(s,r);case 5:return[2]}})})},A.prototype._hasProtocolVersion=function(i){return h(this,void 0,void 0,function(){var e,r,n,o;return d(this,function(t){switch(t.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:r=t.sent(),e=0,t.label=2;case 2:if(!(e<r.length))return[3,8];t.label=3;case 3:return t.trys.push([3,6,,7]),[4,(0,g.createChannelConnection)(r[e],this._config,this._createConnectionErrorHandler(),this._log)];case 4:return r=t.sent(),n=r.protocol()?r.protocol().version:null,[4,r.close()];case 5:return t.sent(),n?[2,i(n)]:[2,!1];case 6:return o=t.sent(),o=o,[3,7];case 7:return e++,[3,2];case 8:if(o)throw o;return[2,!1]}})})},A.prototype.supportsMultiDb=function(){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return T<=t})];case 1:return[2,t.sent()]}})})},A.prototype.supportsTransactionConfig=function(){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return j<=t})];case 1:return[2,t.sent()]}})})},A.prototype.supportsUserImpersonation=function(){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return C<=t})];case 1:return[2,t.sent()]}})})},A.prototype.forget=function(e,t){this._routingTableRegistry.apply(t,{applyWhenExists:function(t){return t.forget(e)}}),this._connectionPool.purge(e).catch(function(){})},A.prototype.forgetWriter=function(e,t){this._routingTableRegistry.apply(t,{applyWhenExists:function(t){return t.forgetWriter(e)}})},A.prototype._acquireConnectionToServer=function(t,e,r){return this._connectionPool.acquire(t)},A.prototype._freshRoutingTable=function(t){var e=void 0===t?{}:t,r=e.accessMode,n=e.database,o=e.bookmark,i=e.impersonatedUser,t=e.onDatabaseNameResolved,e=this._routingTableRegistry.get(n,function(){return new _.RoutingTable({database:n})});return e.isStaleFor(r)?(this._log.info('Routing table is stale for database: "'+n+'" and access mode: "'+r+'": '+e),this._refreshRoutingTable(e,o,i,t)):e},A.prototype._refreshRoutingTable=function(t,e,r,n){var o=t.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,t,e,r,n):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,t,e,r,n)},A.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(n,o,i,s,u){return h(this,void 0,void 0,function(){var e,r;return d(this,function(t){switch(t.label){case 0:return e=[],[4,this._fetchRoutingTableUsingSeedRouter(e,this._seedRouter,o,i,s)];case 1:return(r=t.sent())?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(n,o,i,s)];case 3:r=t.sent(),t.label=4;case 4:return[4,this._applyRoutingTableIfPossible(o,r,u)];case 5:return[2,t.sent()]}})})},A.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(r,n,o,i,s){return h(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(r,n,o,i)];case 1:return(e=t.sent())?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(r,this._seedRouter,n,o,i)];case 2:e=t.sent(),t.label=3;case 3:return[4,this._applyRoutingTableIfPossible(n,e,s)];case 4:return[2,t.sent()]}})})},A.prototype._fetchRoutingTableUsingKnownRouters=function(r,n,o,i){return h(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,this._fetchRoutingTable(r,n,o,i)];case 1:return(e=t.sent())?[2,e]:(e=r.length-1,A._forgetRouter(n,r,e),[2,null])}})})},A.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,s){return h(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,this._resolveSeedRouter(n)];case 1:return e=t.sent(),e=e.filter(function(t){return r.indexOf(t)<0}),[4,this._fetchRoutingTable(e,o,i,s)];case 2:return[2,t.sent()]}})})},A.prototype._resolveSeedRouter=function(n){return h(this,void 0,void 0,function(){var e,r=this;return d(this,function(t){switch(t.label){case 0:return[4,this._hostNameResolver.resolve(n)];case 1:return e=t.sent(),[4,Promise.all(e.map(function(t){return r._dnsResolver.resolve(t)}))];case 2:return e=t.sent(),[2,[].concat.apply([],e)]}})})},A.prototype._fetchRoutingTable=function(s,u,a,c){var t=this;return s.reduce(function(n,o,i){return h(t,void 0,void 0,function(){var e,r;return d(this,function(t){switch(t.label){case 0:return[4,n];case 1:return(r=t.sent())?[2,r]:(A._forgetRouter(u,s,i-1),[4,this._createSessionForRediscovery(o,a,c)]);case 2:if(!(e=t.sent()))return[3,8];t.label=3;case 3:return t.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(e,u.database,o,c)];case 4:return[2,t.sent()];case 5:if((r=t.sent())&&"Neo.ClientError.Database.DatabaseNotFound"===r.code)throw r;return this._log.warn("unable to fetch routing table because of an error "+r),[2,null];case 6:return e.close(),[7];case 7:return[3,9];case 8:return[2,null];case 9:return[2]}})})},Promise.resolve(null))},A.prototype._createSessionForRediscovery=function(o,i,s){return h(this,void 0,void 0,function(){var e,r,n=this;return d(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this._connectionPool.acquire(o)];case 1:return e=t.sent(),r=g.ConnectionErrorHandler.create({errorCode:w,handleAuthorizationExpired:function(t,e){return n._handleAuthorizationExpired(t,e)}}),r=new v.default(new g.DelegateConnection(e,r)),e.protocol().version<4?[2,new b.Session({mode:P,bookmark:S.empty(),connectionProvider:r})]:[2,new b.Session({mode:E,database:"system",bookmark:i,connectionProvider:r,impersonatedUser:s})];case 2:if((r=t.sent())&&"Neo.ClientError.Security.Unauthorized"===r.code)throw r;return[2,null];case 3:return[2]}})})},A.prototype._applyRoutingTableIfPossible=function(e,r,n){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:if(!r)throw(0,b.newError)("Could not perform discovery. No routing servers available. Known routing table: "+e,O);return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r,n)];case 1:return t.sent(),[2,r]}})})},A.prototype._updateRoutingTable=function(e,r){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this._connectionPool.keepAll(e.allServers())];case 1:return t.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(e),r(e.database),this._log.info("Updated routing table "+e),[2]}})})},A._forgetRouter=function(t,e,r){r=e[r];t&&r&&t.forgetRouter(r)},A);function A(t){var e=t.id,r=t.address,n=t.routingContext,o=t.hostNameResolver,i=t.config,s=t.log,u=t.userAgent,a=t.authToken,t=t.routingTablePurgeDelay,c=p.call(this,{id:e,config:i,log:s,userAgent:u,authToken:a},function(t){return(0,g.createChannelConnection)(t,c._config,c._createConnectionErrorHandler(),c._log,c._routingContext)})||this;return c._routingContext=l(l({},n),{address:r.toString()}),c._seedRouter=r,c._rediscovery=new _.default(c._routingContext),c._loadBalancingStrategy=new m.LeastConnectedLoadBalancingStrategy(c._connectionPool),c._hostNameResolver=o,c._dnsResolver=new y.HostNameResolver,c._log=s,c._useSeedRouter=!0,c._routingTableRegistry=new R(t?(0,b.int)(t):I),c}r.default=o;var R=(N.prototype.register=function(t){return this._tables.set(t.database,t),this},N.prototype.apply=function(t,e){var r=void 0===e?{}:e,e=r.applyWhenExists,r=r.applyWhenDontExists,r=void 0===r?function(){}:r;return this._tables.has(t)?e(this._tables.get(t)):"string"==typeof t||null===t?r():this._forEach(e),this},N.prototype.get=function(t,e){return this._tables.has(t)?this._tables.get(t):"function"==typeof e?e():e},N.prototype.removeExpired=function(){var e=this;return this._removeIf(function(t){return t.isExpiredFor(e._routingTablePurgeDelay)})},N.prototype._forEach=function(t){var e,r;try{for(var n=a(this._tables),o=n.next();!o.done;o=n.next())t(c(o.value,2)[1])}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},N.prototype._remove=function(t){return this._tables.delete(t),this},N.prototype._removeIf=function(t){var e,r;try{for(var n=a(this._tables),o=n.next();!o.done;o=n.next()){var i=c(o.value,2),s=i[0];t(i[1])&&this._remove(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},N);function N(t){this._tables=new Map,this._routingTablePurgeDelay=t}},{"../channel":26,"../connection":37,"../load-balancing":39,"../rediscovery":50,"./connection-provider-pooled":29,"./connection-provider-single":31,"neo4j-driver-core":59}],31:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("neo4j-driver-core"),o=(i=t.ConnectionProvider,o(s,i),s.prototype.acquireConnection=function(t){t=void 0===t?{}:t,t.accessMode,t.database,t.bookmarks,t=this._connection;return this._connection=null,Promise.resolve(t)},s);function s(t){var e=i.call(this)||this;return e._connection=t,e}r.default=o},{"neo4j-driver-core":59}],32:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.RoutingConnectionProvider=r.DirectConnectionProvider=r.PooledConnectionProvider=r.SingleConnectionProvider=void 0;var o=t("./connection-provider-single");Object.defineProperty(r,"SingleConnectionProvider",{enumerable:!0,get:function(){return n(o).default}});var i=t("./connection-provider-pooled");Object.defineProperty(r,"PooledConnectionProvider",{enumerable:!0,get:function(){return n(i).default}});var s=t("./connection-provider-direct");Object.defineProperty(r,"DirectConnectionProvider",{enumerable:!0,get:function(){return n(s).default}});var u=t("./connection-provider-routing");Object.defineProperty(r,"RoutingConnectionProvider",{enumerable:!0,get:function(){return n(u).default}})},{"./connection-provider-direct":28,"./connection-provider-pooled":29,"./connection-provider-routing":30,"./connection-provider-single":31}],33:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},s=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.createChannelConnection=void 0;var f=t("../channel"),a=t("neo4j-driver-core"),c=u(t("./connection")),p=u(t("../bolt")),l=a.error.PROTOCOL_ERROR,h=a.internal.logger.Logger,d=0;r.createChannelConnection=function(i,s,u,a,c,t){void 0===c&&(c=null);var l=(t=void 0===t?function(t){return new f.Channel(t)}:t)(new f.ChannelConfig(i,s,u.errorCode()));return p.default.handshake(l).then(function(t){var r=t.protocolVersion,e=t.consumeRemainingBuffer,n=new f.Chunker(l),o=new f.Dechunker,t=new _(l,u,i,a,s.disableLosslessIntegers,c,n,function(e){return p.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:s.disableLosslessIntegers,useBigInt:s.useBigInt,serversideRouting:c,server:e.server,log:e.logger,observer:{onError:e._handleFatalError.bind(e),onFailure:e._resetOnFailure.bind(e),onProtocolError:e._handleProtocolError.bind(e),onErrorApplyTransformation:function(t){return e.handleAndTransformError(t,e._address)}}})});return e(function(t){return o.write(t)}),t}).catch(function(t){return l.close().then(function(){throw t})})};var b,_=(b=c.default,o(y,b),Object.defineProperty(y.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(t){this._dbConnectionId=t},enumerable:!1,configurable:!0}),y.prototype.connect=function(t,e){return this._initialize(t,e)},y.prototype._initialize=function(t,n){var o=this,i=this;return new Promise(function(r,e){o._protocol.initialize({userAgent:t,authToken:n,onError:function(t){return e(t)},onComplete:function(t){var e;t&&(e=t.server,o.version&&!e||(o.version=e),e=t.connection_id,o.databaseId||(o.databaseId=e),!t.hints||null!=(t=t.hints["connection.recv_timeout_seconds"])&&(t=(0,a.toNumber)(t),Number.isInteger(t)&&0<t?o._ch.setupReceiveTimeout(1e3*t):o._log.info("Server located at "+o._address+" supplied an invalid connection receive timeout value ("+t+"). Please, verify the server configuration and status because this can be the symptom of a bigger issue."))),r(i)}})})},y.prototype.protocol=function(){return this._protocol},Object.defineProperty(y.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"version",{get:function(){return this._server.version},set:function(t){this._server.version=t},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),y.prototype._handleFatalError=function(t){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||t,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by "+this._error+" ("+a.json.stringify(this._error)+")"),this._protocol.notifyFatalError(this._error)},y.prototype._queueObserver=function(t){return this._protocol.queueObserverIfProtocolIsNotBroken(t)},y.prototype.hasOngoingObservableRequests=function(){return this._protocol.hasOngoingObservableRequests()},y.prototype.resetAndFlush=function(){var r=this;return new Promise(function(t,e){r._protocol.reset({onError:function(t){r._isBroken?e(t):(t=r._handleProtocolError("Received FAILURE as a response for RESET: "+t),e(t))},onComplete:function(){t()}})})},y.prototype._resetOnFailure=function(){var t=this;this.isOpen()&&this._protocol.reset({onError:function(){t._protocol.resetFailure()},onComplete:function(){t._protocol.resetFailure()}})},y.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},y.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},y.prototype.close=function(){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return t.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},y.prototype.toString=function(){return"Connection ["+this.id+"]["+(this.databaseId||"")+"]"},y.prototype._handleProtocolError=function(t){this._protocol.resetFailure(),this._updateCurrentObserver();t=(0,a.newError)(t,l);return this._handleFatalError(t),t},y);function y(t,e,r,n,o,i,s,u){void 0===o&&(o=!1),void 0===i&&(i=null);var a,c,e=b.call(this,e)||this;return e._id=d++,e._address=r,e._server={address:r.asHostPort()},e.creationTimestamp=Date.now(),e._disableLosslessIntegers=o,e._ch=t,e._chunker=s,e._log=(a=e,new h((c=n)._level,function(t,e){return c._loggerFunction(t,a+" "+e)})),e._serversideRouting=i,e._dbConnectionId=null,e._protocol=u(e),e._isBroken=!1,e._log.isDebugEnabled()&&e._log.debug("created towards "+r),e}r.default=_},{"../bolt":12,"../channel":26,"./connection":36,"neo4j-driver-core":59}],34:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,t=i(t("./connection")),o=(s=t.default,o(u,s),Object.defineProperty(u.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(t){this._delegate.databaseId=t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"version",{get:function(){return this._delegate.version},set:function(t){this._delegate.version=t},enumerable:!1,configurable:!0}),u.prototype.isOpen=function(){return this._delegate.isOpen()},u.prototype.protocol=function(){return this._delegate.protocol()},u.prototype.connect=function(t,e){return this._delegate.connect(t,e)},u.prototype.write=function(t,e,r){return this._delegate.write(t,e,r)},u.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},u.prototype.close=function(){return this._delegate.close()},u.prototype._release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate._release()},u);function u(t,e){var r=s.call(this,e)||this;return e&&(r._originalErrorHandler=t._errorHandler,t._errorHandler=r._errorHandler),r._delegate=t,r}r.default=o},{"./connection":36}],35:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=t("neo4j-driver-core"),n=t.error.SERVICE_UNAVAILABLE,o=t.error.SESSION_EXPIRED,t=(i.create=function(t){return new i(t.errorCode,t.handleUnavailability,t.handleWriteFailure,t.handleAuthorizationExpired)},i.prototype.errorCode=function(){return this._errorCode},i.prototype.handleAndTransformError=function(t,e){return!(r=t)||"Neo.ClientError.Security.AuthorizationExpired"!==r.code&&"Neo.ClientError.Security.TokenExpired"!==r.code?function(t){if(t)return t.code===o||t.code===n||"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:this._handleAuthorizationExpired(t,e);var r},i);function i(t,e,r,n){this._errorCode=t,this._handleUnavailability=e||s,this._handleWriteFailure=r||s,this._handleAuthorizationExpired=n||s}function s(t){return t}r.default=t},{"neo4j-driver-core":59}],36:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(Object.defineProperty(o.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(t){throw new Error("not implemented")},enumerable:!1,configurable:!0}),o.prototype.isOpen=function(){throw new Error("not implemented")},o.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(o.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(t){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),o.prototype.connect=function(t,e){throw new Error("not implemented")},o.prototype.write=function(t,e,r){throw new Error("not implemented")},o.prototype.resetAndFlush=function(){throw new Error("not implemented")},o.prototype.close=function(){throw new Error("not implemented")},o.prototype.handleAndTransformError=function(t,e){return this._errorHandler?this._errorHandler.handleAndTransformError(t,e):t},o);function o(t){this._errorHandler=t}r.default=n},{}],37:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.createChannelConnection=r.ConnectionErrorHandler=r.DelegateConnection=r.ChannelConnection=r.Connection=void 0;var u=s(t("./connection"));r.Connection=u.default;var a=i(t("./connection-channel"));r.ChannelConnection=a.default,Object.defineProperty(r,"createChannelConnection",{enumerable:!0,get:function(){return a.createChannelConnection}});i=s(t("./connection-delegate"));r.DelegateConnection=i.default;t=s(t("./connection-error-handler"));r.ConnectionErrorHandler=t.default,r.default=u.default},{"./connection":36,"./connection-channel":33,"./connection-delegate":34,"./connection-error-handler":35}],38:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},s=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.pool=r.packstream=r.channel=r.buf=r.bolt=r.loadBalancing=void 0,r.loadBalancing=i(t("./load-balancing")),r.bolt=i(t("./bolt")),r.buf=i(t("./buf")),r.channel=i(t("./channel")),r.packstream=i(t("./packstream")),r.pool=i(t("./pool")),s(t("./connection-provider"),r)},{"./bolt":12,"./buf":18,"./channel":26,"./connection-provider":32,"./load-balancing":39,"./packstream":43,"./pool":47}],39:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.LeastConnectedLoadBalancingStrategy=r.LoadBalancingStrategy=void 0;var o=n(t("./load-balancing-strategy"));r.LoadBalancingStrategy=o.default;t=n(t("./least-connected-load-balancing-strategy"));r.LeastConnectedLoadBalancingStrategy=t.default,r.default=t.default},{"./least-connected-load-balancing-strategy":40,"./load-balancing-strategy":41}],40:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,u=i(t("./round-robin-array-index")),t=i(t("./load-balancing-strategy")),o=(s=t.default,o(a,s),a.prototype.selectReader=function(t){return this._select(t,this._readersIndex)},a.prototype.selectWriter=function(t){return this._select(t,this._writersIndex)},a.prototype._select=function(t,e){var r=t.length;if(0===r)return null;var n=e.next(r),o=n,i=null,s=Number.MAX_SAFE_INTEGER;do{var u=t[o],a=this._connectionPool.activeResourceCount(u)}while(a<s&&(i=u,s=a),o===r-1?o=0:o++,o!==n);return i},a);function a(t){var e=s.call(this)||this;return e._readersIndex=new u.default,e._writersIndex=new u.default,e._connectionPool=t,e}r.default=o},{"./load-balancing-strategy":41,"./round-robin-array-index":42}],41:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.selectReader=function(t){throw new Error("Abstract function")},o.prototype.selectWriter=function(t){throw new Error("Abstract function")},o);function o(){}r.default=n},{}],42:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.next=function(t){if(0===t)return-1;var e=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),e%t},o);function o(t){this._offset=t||0}r.default=n},{}],43:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.v2=r.v1=void 0;var s=i(t("./packstream-v1"));r.v1=s;t=i(t("./packstream-v2"));r.v2=t,r.default=t},{"./packstream-v1":44,"./packstream-v2":45}],44:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Structure=r.Unpacker=r.Packer=void 0;var o=t("../channel"),f=t("neo4j-driver-core"),n=f.error.PROTOCOL_ERROR,u=(i.prototype.toString=function(){for(var t="",e=0;e<this.fields.length;e++)0<e&&(t+=", "),t+=this.fields[e];return"Structure("+this.signature+", ["+t+"])"},i);function i(t,e){this.signature=t,this.fields=e}r.Structure=u;s.prototype.packable=function(i){var t,s=this;if(null===i)return function(){return s._ch.writeUInt8(192)};if(!0===i)return function(){return s._ch.writeUInt8(195)};if(!1===i)return function(){return s._ch.writeUInt8(194)};if("number"==typeof i)return function(){return s.packFloat(i)};if("string"==typeof i)return function(){return s.packString(i)};if("bigint"==typeof i)return function(){return s.packInteger((0,f.int)(i))};if((0,f.isInt)(i))return function(){return s.packInteger(i)};if(i instanceof Int8Array)return function(){return s.packBytes(i)};if(i instanceof Array)return function(){s.packListHeader(i.length);for(var t=0;t<i.length;t++)s.packable(void 0===i[t]?null:i[t])()};if(null!=(t=i)&&"function"==typeof t[Symbol.iterator])return this.packableIterable(i);if(i instanceof f.Node)return this._nonPackableValue("It is not allowed to pass nodes in query parameters, given: "+i);if(i instanceof f.Relationship)return this._nonPackableValue("It is not allowed to pass relationships in query parameters, given: "+i);if(i instanceof f.Path)return this._nonPackableValue("It is not allowed to pass paths in query parameters, given: "+i);if(i instanceof u){for(var e=[],r=0;r<i.fields.length;r++)e[r]=this.packable(i.fields[r]);return function(){return s.packStruct(i.signature,e)}}return"object"==typeof i?function(){for(var t=Object.keys(i),e=0,r=0;r<t.length;r++)void 0!==i[t[r]]&&e++;s.packMapHeader(e);for(var n=0;n<t.length;n++){var o=t[n];void 0!==i[o]&&(s.packString(o),s.packable(i[o])())}}:this._nonPackableValue("Unable to pack the given value: "+i)},s.prototype.packableIterable=function(e){try{var t=Array.from(e);return this.packable(t)}catch(t){throw(0,f.newError)("Cannot pack given iterable, "+t.message+": "+e)}},s.prototype.packStruct=function(t,e){this.packStructHeader((e=e||[]).length,t);for(var r=0;r<e.length;r++)e[r]()},s.prototype.packInteger=function(t){var e=t.high,r=t.low;t.greaterThanOrEqual(-16)&&t.lessThan(128)?this._ch.writeInt8(r):t.greaterThanOrEqual(-128)&&t.lessThan(-16)?(this._ch.writeUInt8(200),this._ch.writeInt8(r)):t.greaterThanOrEqual(-32768)&&t.lessThan(32768)?(this._ch.writeUInt8(201),this._ch.writeInt16(r)):(t.greaterThanOrEqual(-2147483648)&&t.lessThan(2147483648)?this._ch.writeUInt8(202):(this._ch.writeUInt8(203),this._ch.writeInt32(e)),this._ch.writeInt32(r))},s.prototype.packFloat=function(t){this._ch.writeUInt8(193),this._ch.writeFloat64(t)},s.prototype.packString=function(t){var e=o.utf8.encode(t),t=e.length;if(t<16)this._ch.writeUInt8(128|t),this._ch.writeBytes(e);else if(t<256)this._ch.writeUInt8(208),this._ch.writeUInt8(t),this._ch.writeBytes(e);else if(t<65536)this._ch.writeUInt8(209),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256),this._ch.writeBytes(e);else{if(!(t<4294967296))throw(0,f.newError)("UTF-8 strings of size "+t+" are not supported");this._ch.writeUInt8(210),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),this._ch.writeBytes(e)}},s.prototype.packListHeader=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,f.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)}},s.prototype.packBytes=function(t){if(!this._byteArraysSupported)throw(0,f.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(t.length);for(var e=0;e<t.length;e++)this._ch.writeInt8(t[e])},s.prototype.packBytesHeader=function(t){if(t<256)this._ch.writeUInt8(204),this._ch.writeUInt8(t);else if(t<65536)this._ch.writeUInt8(205),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,f.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)}},s.prototype.packMapHeader=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,f.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)}},s.prototype.packStructHeader=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,f.newError)("Structures of size "+t+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256)}},s.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},s.prototype._nonPackableValue=function(t){return function(){throw(0,f.newError)(t,n)}},t=s;function s(t){this._ch=t,this._byteArraysSupported=!0}r.Packer=t;a.prototype.unpack=function(t){var e=t.readUInt8(),r=240&e,n=15&e;if(192===e)return null;var o=this._unpackBoolean(e);if(null!==o)return o;o=this._unpackNumberOrInteger(e,t);if(null!==o){if((0,f.isInt)(o)){if(this._useBigInt)return o.toBigInt();if(this._disableLosslessIntegers)return o.toNumberOrInfinity()}return o}o=this._unpackString(e,r,n,t);if(null!==o)return o;o=this._unpackList(e,r,n,t);if(null!==o)return o;o=this._unpackByteArray(e,t);if(null!==o)return o;o=this._unpackMap(e,r,n,t);if(null!==o)return o;t=this._unpackStruct(e,r,n,t);if(null!==t)return t;throw(0,f.newError)("Unknown packed value with marker "+e.toString(16))},a.prototype.unpackInteger=function(t){var e=t.readUInt8(),t=this._unpackInteger(e,t);if(null==t)throw(0,f.newError)("Unable to unpack integer value with marker "+e.toString(16));return t},a.prototype._unpackBoolean=function(t){return 195===t||194!==t&&null},a.prototype._unpackNumberOrInteger=function(t,e){return 193===t?e.readFloat64():this._unpackInteger(t,e)},a.prototype._unpackInteger=function(t,e){if(0<=t&&t<128)return(0,f.int)(t);if(240<=t&&t<256)return(0,f.int)(t-256);if(200===t)return(0,f.int)(e.readInt8());if(201===t)return(0,f.int)(e.readInt16());if(202===t){var r=e.readInt32();return(0,f.int)(r)}if(203!==t)return null;t=e.readInt32(),e=e.readInt32();return new f.Integer(e,t)},a.prototype._unpackString=function(t,e,r,n){return 128===e?o.utf8.decode(n,r):208===t?o.utf8.decode(n,n.readUInt8()):209===t?o.utf8.decode(n,n.readUInt16()):210===t?o.utf8.decode(n,n.readUInt32()):null},a.prototype._unpackList=function(t,e,r,n){return 144===e?this._unpackListWithSize(r,n):212===t?this._unpackListWithSize(n.readUInt8(),n):213===t?this._unpackListWithSize(n.readUInt16(),n):214===t?this._unpackListWithSize(n.readUInt32(),n):null},a.prototype._unpackListWithSize=function(t,e){for(var r=[],n=0;n<t;n++)r.push(this.unpack(e));return r},a.prototype._unpackByteArray=function(t,e){return 204===t?this._unpackByteArrayWithSize(e.readUInt8(),e):205===t?this._unpackByteArrayWithSize(e.readUInt16(),e):206===t?this._unpackByteArrayWithSize(e.readUInt32(),e):null},a.prototype._unpackByteArrayWithSize=function(t,e){for(var r=new Int8Array(t),n=0;n<t;n++)r[n]=e.readInt8();return r},a.prototype._unpackMap=function(t,e,r,n){return 160===e?this._unpackMapWithSize(r,n):216===t?this._unpackMapWithSize(n.readUInt8(),n):217===t?this._unpackMapWithSize(n.readUInt16(),n):218===t?this._unpackMapWithSize(n.readUInt32(),n):null},a.prototype._unpackMapWithSize=function(t,e){for(var r={},n=0;n<t;n++)r[this.unpack(e)]=this.unpack(e);return r},a.prototype._unpackStruct=function(t,e,r,n){return 176===e?this._unpackStructWithSize(r,n):220===t?this._unpackStructWithSize(n.readUInt8(),n):221===t?this._unpackStructWithSize(n.readUInt16(),n):null},a.prototype._unpackStructWithSize=function(t,e){var r=e.readUInt8();return 78===r?this._unpackNode(t,e):82===r?this._unpackRelationship(t,e):114===r?this._unpackUnboundRelationship(t,e):80===r?this._unpackPath(t,e):this._unpackUnknownStruct(r,t,e)},a.prototype._unpackNode=function(t,e){return this._verifyStructSize("Node",3,t),new f.Node(this.unpack(e),this.unpack(e),this.unpack(e))},a.prototype._unpackRelationship=function(t,e){return this._verifyStructSize("Relationship",5,t),new f.Relationship(this.unpack(e),this.unpack(e),this.unpack(e),this.unpack(e),this.unpack(e))},a.prototype._unpackUnboundRelationship=function(t,e){return this._verifyStructSize("UnboundRelationship",3,t),new f.UnboundRelationship(this.unpack(e),this.unpack(e),this.unpack(e))},a.prototype._unpackPath=function(t,e){this._verifyStructSize("Path",3,t);for(var r=this.unpack(e),n=this.unpack(e),o=this.unpack(e),i=[],s=r[0],u=0;u<o.length;u+=2){var a=r[o[u+1]],c=(0,f.toNumber)(o[u]),l=void 0;0<c?(l=n[c-1])instanceof f.UnboundRelationship&&(n[c-1]=l=l.bind(s.identity,a.identity)):(l=n[-c-1])instanceof f.UnboundRelationship&&(n[-c-1]=l=l.bind(a.identity,s.identity)),i.push(new f.PathSegment(s,l,a)),s=a}return new f.Path(r[0],r[r.length-1],i)},a.prototype._unpackUnknownStruct=function(t,e,r){for(var n=new u(t,[]),o=0;o<e;o++)n.fields.push(this.unpack(r));return n},a.prototype._verifyStructSize=function(t,e,r){if(e!==r)throw(0,f.newError)("Wrong struct size for "+t+", expected "+e+" but was "+r,n)},t=a;function a(t,e){void 0===e&&(e=!1),this._disableLosslessIntegers=t=void 0===t?!1:t,this._useBigInt=e}r.Unpacker=t},{"../channel":26,"neo4j-driver-core":59}],45:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return s(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.Unpacker=r.Packer=void 0;var a,u=u(t("./packstream-v1")),c=t("neo4j-driver-core"),l=t("./temporal-factory"),t=c.internal.temporalUtil,f=t.dateToEpochDay,p=t.localDateTimeToEpochSecond,h=t.localTimeToNanoOfDay,d=88,b=3,_=89,y=4,v=69,m=4,g=116,O=1,w=84,S=2,E=68,P=1,j=100,T=2,C=70,x=3,I=102,A=3,t=(a=u.Packer,o(R,a),R.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},R.prototype.packable=function(i){var s=this;return(0,c.isPoint)(i)?function(){var t,e;e=s,(null===(t=i).z||void 0===t.z?function(t,e){t=[e.packable((0,c.int)(t.srid)),e.packable(t.x),e.packable(t.y)];e.packStruct(d,t)}:function(t,e){t=[e.packable((0,c.int)(t.srid)),e.packable(t.x),e.packable(t.y),e.packable(t.z)];e.packStruct(_,t)})(t,e)}:(0,c.isDuration)(i)?function(){var t,e,r,n,o;t=i,e=s,r=(0,c.int)(t.months),n=(0,c.int)(t.days),o=(0,c.int)(t.seconds),t=(0,c.int)(t.nanoseconds),t=[e.packable(r),e.packable(n),e.packable(o),e.packable(t)],e.packStruct(v,t)}:(0,c.isLocalTime)(i)?function(){return function(t,e){t=h(t.hour,t.minute,t.second,t.nanosecond),t=[e.packable(t)];e.packStruct(g,t)}(i,s)}:(0,c.isTime)(i)?function(){var t,e,r;e=s,r=h((t=i).hour,t.minute,t.second,t.nanosecond),t=(0,c.int)(t.timeZoneOffsetSeconds),t=[e.packable(r),e.packable(t)],e.packStruct(w,t)}:(0,c.isDate)(i)?function(){return function(t,e){t=f(t.year,t.month,t.day),t=[e.packable(t)];e.packStruct(E,t)}(i,s)}:(0,c.isLocalDateTime)(i)?function(){var t,e,r;e=s,r=p((t=i).year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),t=(0,c.int)(t.nanosecond),t=[e.packable(r),e.packable(t)],e.packStruct(j,t)}:(0,c.isDateTime)(i)?function(){var t,e;e=s,((t=i).timeZoneId?function(t,e){var r=p(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),n=(0,c.int)(t.nanosecond),t=t.timeZoneId,t=[e.packable(r),e.packable(n),e.packable(t)];e.packStruct(I,t)}:function(t,e){var r=p(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),n=(0,c.int)(t.nanosecond),t=(0,c.int)(t.timeZoneOffsetSeconds),t=[e.packable(r),e.packable(n),e.packable(t)];e.packStruct(C,t)})(t,e)}:a.prototype.packable.call(this,i)},R);function R(){return null!==a&&a.apply(this,arguments)||this}r.Packer=t;var N,o=(N=u.Unpacker,o(k,N),k.prototype._unpackUnknownStruct=function(t,e,r){return t===d?(o=e,i=r,(n=this)._verifyStructSize("Point2D",b,o),new c.Point(n.unpack(i),n.unpack(i),n.unpack(i),void 0)):t===_?(o=e,n=r,(i=this)._verifyStructSize("Point3D",y,o),new c.Point(i.unpack(n),i.unpack(n),i.unpack(n),i.unpack(n))):t===v?function(t,e,r){t._verifyStructSize("Duration",m,e);var n=t.unpack(r),o=t.unpack(r),e=t.unpack(r),r=t.unpack(r);return new c.Duration(n,o,e,r)}(this,e,r):t===g?function(t,e,r,n){t._verifyStructSize("LocalTime",O,e);r=t.unpackInteger(r);return M((0,l.nanoOfDayToLocalTime)(r),n)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===w?function(t,e,r,n,o){t._verifyStructSize("Time",S,e);e=t.unpackInteger(r),r=t.unpackInteger(r),e=(0,l.nanoOfDayToLocalTime)(e);return M(new c.Time(e.hour,e.minute,e.second,e.nanosecond,r),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===E?function(t,e,r,n,o){t._verifyStructSize("Date",P,e);r=t.unpackInteger(r);return M((0,l.epochDayToDate)(r),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===j?function(t,e,r,n,o){t._verifyStructSize("LocalDateTime",T,e);e=t.unpackInteger(r),r=t.unpackInteger(r);return M((0,l.epochSecondAndNanoToLocalDateTime)(e,r),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===C?function(t,e,r,n,o){t._verifyStructSize("DateTimeWithZoneOffset",x,e);var i=t.unpackInteger(r),e=t.unpackInteger(r),r=t.unpackInteger(r),e=(0,l.epochSecondAndNanoToLocalDateTime)(i,e);return M(new c.DateTime(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond,r,null),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===I?function(t,e,r,n,o){t._verifyStructSize("DateTimeWithZoneId",A,e);var i=t.unpackInteger(r),e=t.unpackInteger(r),r=t.unpack(r),e=(0,l.epochSecondAndNanoToLocalDateTime)(i,e);return M(new c.DateTime(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond,null,r),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):N.prototype._unpackUnknownStruct.call(this,t,e,r,this._disableLosslessIntegers,this._useBigInt);var n,o,i},k);function k(t,e){return N.call(this,t=void 0===t?!1:t,e=void 0===e?!1:e)||this}function M(t,e,r){if(!e&&!r)return t;var n,o,i,s=Object.create(Object.getPrototypeOf(t));for(n in t)t.hasOwnProperty(n)&&(o=t[n],s[n]=(0,c.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(s),s}r.Unpacker=o},{"./packstream-v1":44,"./temporal-factory":46,"neo4j-driver-core":59}],46:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.epochSecondAndNanoToLocalDateTime=r.nanoOfDayToLocalTime=r.epochDayToDate=void 0;var o=t("neo4j-driver-core"),t=o.internal.temporalUtil,i=t.DAYS_0000_TO_1970,s=t.DAYS_PER_400_YEAR_CYCLE,u=t.NANOS_PER_HOUR,a=t.NANOS_PER_MINUTE,c=t.NANOS_PER_SECOND,n=t.SECONDS_PER_DAY,l=t.floorDiv,f=t.floorMod;function p(t){var e=(t=(0,o.int)(t)).add(i).subtract(60),r=(0,o.int)(0);e.lessThan(0)&&(r=(n=e.add(1).div(s).subtract(1)).multiply(400),e=e.add(n.multiply(-s)));var t=e.multiply(400).add(591).div(s),n=e.subtract(t.multiply(365).add(t.div(4)).subtract(t.div(100)).add(t.div(400)));n.lessThan(0)&&(t=t.subtract(1),n=e.subtract(t.multiply(365).add(t.div(4)).subtract(t.div(100)).add(t.div(400))));t=t.add(r),e=n,r=e.multiply(5).add(2).div(153),n=r.add(2).modulo(12).add(1),e=e.subtract(r.multiply(306).add(5).div(10)).add(1);return t=t.add(r.div(10)),new o.Date(t,n,e)}function h(t){var e=(t=(0,o.int)(t)).div(u),r=(t=t.subtract(e.multiply(u))).div(a),n=(t=t.subtract(r.multiply(a))).div(c),t=t.subtract(n.multiply(c));return new o.LocalTime(e,r,n,t)}r.epochDayToDate=p,r.nanoOfDayToLocalTime=h,r.epochSecondAndNanoToLocalDateTime=function(t,e){var r=l(t,n),e=f(t,n).multiply(c).add(e),r=p(r),e=h(e);return new o.LocalDateTime(r.year,r.month,r.day,e.hour,e.minute,e.second,e.nanosecond)}},{"neo4j-driver-core":59}],47:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_MAX_SIZE=r.DEFAULT_ACQUISITION_TIMEOUT=r.PoolConfig=r.Pool=void 0;var u=i(t("./pool-config"));r.PoolConfig=u.default,Object.defineProperty(r,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return u.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(r,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return u.DEFAULT_MAX_SIZE}});t=s(t("./pool"));r.Pool=t.default,r.default=t.default},{"./pool":49,"./pool-config":48}],48:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_ACQUISITION_TIMEOUT=r.DEFAULT_MAX_SIZE=void 0;r.DEFAULT_MAX_SIZE=100;r.DEFAULT_ACQUISITION_TIMEOUT=6e4;var n=(o.defaultConfig=function(){return new o(100,6e4)},o.fromDriverConfig=function(t){return new o(s(t.maxConnectionPoolSize)?t.maxConnectionPoolSize:100,s(t.connectionAcquisitionTimeout)?t.connectionAcquisitionTimeout:6e4)},o);function o(t,e){this.maxSize=i(t,100),this.acquisitionTimeout=i(e,6e4)}function i(t,e){return 0===t||t?t:e}function s(t){return 0===t||t}r.default=n},{}],49:[function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},l=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var u=n(t("./pool-config")),a=t("neo4j-driver-core"),c=a.internal.logger.Logger,t=(i.prototype.acquire=function(s){var u=this;return this._acquire(s).then(function(t){var o=s.asKey();if(t)return t;var i=u._acquireRequests;return i[o]||(i[o]=[]),new Promise(function(t,e){var r=setTimeout(function(){var t,e=i[o];e&&(i[o]=e.filter(function(t){return t!==n})),n.isCompleted()||(t=u.activeResourceCount(s),e=u.has(s)?u._pools[o].length:0,n.reject((0,a.newError)("Connection acquisition timed out in "+u._acquisitionTimeout+" ms. Pool status: Active conn count = "+t+", Idle conn count = "+e+".")))},u._acquisitionTimeout),n=new p(o,t,e,r,u._log);i[o].push(n)})})},i.prototype.purge=function(t){return this._purgeKey(t.asKey())},i.prototype.close=function(){return o(this,void 0,void 0,function(){var e=this;return l(this,function(t){switch(t.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(t){return e._purgeKey(t)}))];case 1:return[2,t.sent()]}})})},i.prototype.keepAll=function(t){var e=this,r=t.map(function(t){return t.asKey()}),t=Object.keys(this._pools).filter(function(t){return-1===r.indexOf(t)});return Promise.all(t.map(function(t){return e._purgeKey(t)}))},i.prototype.has=function(t){return t.asKey()in this._pools},i.prototype.activeResourceCount=function(t){return this._activeResourceCounts[t.asKey()]||0},i.prototype._acquire=function(u){return o(this,void 0,void 0,function(){var e,r,n,o,i,s=this;return l(this,function(t){switch(t.label){case 0:if(this._closed)throw(0,a.newError)("Pool is closed, it is no more able to serve requests.");e=u.asKey(),r=this._pools[e],n=this._poolState[e],r||(r=[],n=new h,this._pools[e]=r,this._pendingCreates[e]=0,this._poolState[e]=n),t.label=1;case 1:return r.length?(o=r.pop(),this._validate(o)?(this._removeIdleObserver&&this._removeIdleObserver(o),f(e,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug(o+" acquired from the pool "+e),[2,o]):[3,2]):[3,5];case 2:return[4,this._destroy(o)];case 3:t.sent(),t.label=4;case 4:return[3,1];case 5:if(0<this._maxSize&&this.activeResourceCount(u)+this._pendingCreates[e]>=this._maxSize)return[2,null];this._pendingCreates[e]=this._pendingCreates[e]+1,t.label=6;case 6:return t.trys.push([6,,8,9]),[4,this._create(u,function(t,e){return s._release(n,t,e)})];case 7:return i=t.sent(),f(e,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug(i+" created for the pool "+e),[3,9];case 8:return this._pendingCreates[e]=this._pendingCreates[e]-1,[7];case 9:return[2,i]}})})},i.prototype._release=function(u,a,c){return o(this,void 0,void 0,function(){var o,i,s=this;return l(this,function(t){switch(t.label){case 0:return(o=a.asKey(),(i=this._pools[o])&&u.isActive())?this._validate(c)?[3,2]:(this._log.isDebugEnabled()&&this._log.debug(c+" destroyed and can't be released to the pool "+o+" because it is not functional"),[4,this._destroy(c)]):[3,4];case 1:return t.sent(),[3,3];case 2:this._installIdleObserver&&this._installIdleObserver(c,{onError:function(t){s._log.debug("Idle connection "+c+" destroyed because of error: "+t);t=s._pools[o];t&&(s._pools[o]=t.filter(function(t){return t!==c})),s._destroy(c).catch(function(){})}}),i.push(c),this._log.isDebugEnabled()&&this._log.debug(c+" released to the pool "+o),t.label=3;case 3:return[3,6];case 4:return this._log.isDebugEnabled()&&this._log.debug(c+" destroyed and can't be released to the pool "+o+" because pool has been purged"),[4,this._destroy(c)];case 5:t.sent(),t.label=6;case 6:return e=o,r=this._activeResourceCounts,0<(n=(r[e]||0)-1)?r[e]=n:delete r[e],this._processPendingAcquireRequests(a),[2]}var e,r,n})})},i.prototype._purgeKey=function(n){return o(this,void 0,void 0,function(){var e,r;return l(this,function(t){switch(t.label){case 0:r=this._pools[n]||[],e=this._poolState[n]||new h,t.label=1;case 1:return r.length?(r=r.pop(),this._removeIdleObserver&&this._removeIdleObserver(r),[4,this._destroy(r)]):[3,3];case 2:return t.sent(),[3,1];case 3:return e.close(),delete this._pools[n],delete this._poolState[n],[2]}})})},i.prototype._processPendingAcquireRequests=function(e){var r,n=this,t=e.asKey(),o=this._acquireRequests[t],i=this._poolState[t];o&&((r=o.shift())?this._acquire(e).catch(function(t){return r.reject(t),null}).then(function(t){t&&(r.isCompleted()?n._release(i,e,t):r.resolve(t))}):delete this._acquireRequests[t])},i);function i(t){var e=void 0===t?{}:t,r=e.create,n=void 0===r?function(t,e){return Promise.resolve()}:r,o=e.destroy,i=void 0===o?function(t){return Promise.resolve()}:o,s=e.validate,t=void 0===s?function(t){return!0}:s,r=e.installIdleObserver,o=void 0===r?function(t,e){}:r,s=e.removeIdleObserver,r=void 0===s?function(t){}:s,s=e.config,s=void 0===s?u.default.defaultConfig():s,e=e.log,e=void 0===e?c.noOp():e;this._create=n,this._destroy=i,this._validate=t,this._installIdleObserver=o,this._removeIdleObserver=r,this._maxSize=s.maxSize,this._acquisitionTimeout=s.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._poolState={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function f(t,e){var r=e[t]||0;e[t]=r+1}var p=(s.prototype.isCompleted=function(){return this._completed},s.prototype.resolve=function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug(t+" acquired from the pool "+this._key),this._resolve(t))},s.prototype.reject=function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(t))},s);function s(t,e,r,n,o){this._key=t,this._resolve=e,this._reject=r,this._timeoutId=n,this._log=o,this._completed=!1}var h=(d.prototype.isActive=function(){return this._active},d.prototype.close=function(){this._active=!1},d);function d(){this._active=!0}r.default=t},{"./pool-config":48,"neo4j-driver-core":59}],50:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.RoutingTable=r.Rediscovery=void 0;var o=n(t("./rediscovery"));r.Rediscovery=o.default;t=n(t("./routing-table"));r.RoutingTable=t.default,r.default=o.default},{"./rediscovery":51,"./routing-table":52}],51:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s=n(t("./routing-table")),a=t("../bolt"),c=t("neo4j-driver-core"),l=c.error.SERVICE_UNAVAILABLE,t=(o.prototype.lookupRoutingTableOnRouter=function(e,r,n,o){var i=this;return e._acquireConnection(function(t){return i._requestRawRoutingTable(t,e,r,n,o).then(function(t){return t.isNull?null:s.default.fromRawRoutingTable(r,n,t)})})},o.prototype._requestRawRoutingTable=function(t,n,o,i,s){var u=this;return new Promise(function(e,r){t.protocol().requestRoutingInformation({routingContext:u._routingContext,databaseName:o,impersonatedUser:s,sessionContext:{bookmark:n._lastBookmark,mode:n._mode,database:n._database,afterComplete:n._onComplete},onCompleted:e,onError:function(t){"Neo.ClientError.Database.DatabaseNotFound"===t.code?r(t):"Neo.ClientError.Procedure.ProcedureNotFound"===t.code?r((0,c.newError)("Server at "+i.asHostPort()+" can't perform routing. Make sure you are connecting to a causal cluster",l)):e(a.RawRoutingTable.ofNull())}})})},o);function o(t){this._routingContext=t}r.default=t},{"../bolt":12,"./routing-table":52,"neo4j-driver-core":59}],52:[function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||((n=n||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(r,"__esModule",{value:!0}),r.createValidRoutingTable=void 0;var a=t("neo4j-driver-core"),t=a.internal.constants,i=t.ACCESS_MODE_WRITE,s=t.ACCESS_MODE_READ,c=a.internal.serverAddress.ServerAddress,l=a.error.PROTOCOL_ERROR,f=(u.fromRawRoutingTable=h,u.prototype.forget=function(t){this.readers=p(this.readers,t),this.writers=p(this.writers,t)},u.prototype.forgetRouter=function(t){this.routers=p(this.routers,t)},u.prototype.forgetWriter=function(t){this.writers=p(this.writers,t)},u.prototype.isStaleFor=function(t){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||t===s&&0===this.readers.length||t===i&&0===this.writers.length},u.prototype.isExpiredFor=function(t){return this.expirationTime.add(t).lessThan(Date.now())},u.prototype.allServers=function(){return o(o(o([],n(this.routers),!1),n(this.readers),!1),n(this.writers),!1)},u.prototype.toString=function(){return"RoutingTable[database="+this.databaseName+", expirationTime="+this.expirationTime+", currentTime="+Date.now()+", routers=["+this.routers+"], readers=["+this.readers+"], writers=["+this.writers+"]]"},u);function u(t){var e=void 0===t?{}:t,r=e.database,n=e.routers,o=e.readers,i=e.writers,t=e.expirationTime,e=e.ttl;this.database=r||null,this.databaseName=r||"default database",this.routers=n||[],this.readers=o||[],this.writers=i||[],this.expirationTime=t||(0,a.int)(0),this.ttl=e}function p(t,e){return t.filter(function(t){return t.asKey()!==e.asKey()})}function h(t,e,r){var n=r.ttl,o=function(e,r){try{var t=(0,a.int)(Date.now()),n=(0,a.int)(e.ttl).multiply(1e3).add(t);return n.lessThan(t)?a.Integer.MAX_VALUE:n}catch(t){throw(0,a.newError)("Unable to parse TTL entry from router "+r+" from raw routing table:\n"+a.json.stringify(e)+"\nError message: "+t.message,l)}}(r,e),i=function(e,r){try{var n=[],o=[],i=[];return e.servers.forEach(function(t){var e=t.role,t=t.addresses;"ROUTE"===e?n=b(t).map(function(t){return c.fromUrl(t)}):"WRITE"===e?i=b(t).map(function(t){return c.fromUrl(t)}):"READ"===e&&(o=b(t).map(function(t){return c.fromUrl(t)}))}),{routers:n,readers:o,writers:i}}catch(t){throw(0,a.newError)("Unable to parse servers entry from router "+r+" from addresses:\n"+a.json.stringify(e.servers)+"\nError message: "+t.message,l)}}(r,e),s=i.routers,u=i.readers,i=i.writers;return d(s,"routers",e),d(u,"readers",e),new f({database:t||r.db,routers:s,readers:u,writers:i,expirationTime:o,ttl:n})}function d(t,e,r){if(0===t.length)throw(0,a.newError)("Received no "+e+" from router "+r,l)}function b(t){if(!Array.isArray(t))throw new TypeError("Array expected but got: "+t);return Array.from(t)}r.default=f,r.createValidRoutingTable=h},{"neo4j-driver-core":59}],53:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default={basic:function(t,e,r){return r?{scheme:"basic",principal:t,credentials:e,realm:r}:{scheme:"basic",principal:t,credentials:e}},kerberos:function(t){return{scheme:"kerberos",principal:"",credentials:t}},bearer:function(t){return{scheme:"bearer",credentials:t}},custom:function(t,e,r,n,o){return o?{scheme:n,principal:t,credentials:e,realm:r,parameters:o}:{scheme:n,principal:t,credentials:e,realm:r}}}},{}],54:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.acquireConnection=function(t){throw Error("Not implemented")},o.prototype.supportsMultiDb=function(){throw Error("Not implemented")},o.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},o.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},o.prototype.close=function(){throw Error("Not implemented")},o);function o(){}r.default=n},{}],55:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.isOpen=function(){return!1},o.prototype.protocol=function(){throw Error("Not implemented")},o.prototype.connect=function(t,e){throw Error("Not implemented")},o.prototype.write=function(t,e,r){throw Error("Not implemented")},o.prototype.resetAndFlush=function(){throw Error("Not implemented")},o.prototype.close=function(){throw Error("Not implemented")},o.prototype._release=function(){return Promise.resolve()},o);function o(){this.id="",this.databaseId=""}r.default=n},{}],56:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.WRITE=r.READ=r.Driver=void 0;var u=t("./internal/bookmark"),o=t("./internal/connectivity-verifier"),i=n(t("./internal/resolver/configured-custom-resolver")),s=t("./internal/constants"),a=t("./internal/logger"),c=n(t("./session")),l=t("./internal/util"),f=36e5,p=1e3,t=s.ACCESS_MODE_READ;r.READ=t;var h=s.ACCESS_MODE_WRITE;r.WRITE=h;var d=0,t=(b.prototype.verifyConnectivity=function(t){var e=(void 0===t?{}:t).database,t=void 0===e?"":e,e=this._getOrCreateConnectionProvider();return new o.ConnectivityVerifier(e).verify({database:t})},b.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},b.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},b.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},b.prototype._supportsRouting=function(){return this._meta.routing},b.prototype._isEncrypted=function(){return this._config.encrypted===l.ENCRYPTION_ON},b.prototype._getTrust=function(){return this._config.trust},b.prototype.session=function(t){var e=void 0===t?{}:t,r=e.defaultAccessMode,n=e.bookmarks,o=e.database,t=e.impersonatedUser,e=e.fetchSize;return this._newSession({defaultAccessMode:void 0===r?h:r,bookmarkOrBookmarks:n,database:void 0===o?"":o,reactive:!1,impersonatedUser:t,fetchSize:y(e,this._config.fetchSize)})},b.prototype.close=function(){return this._log.info("Driver "+this._id+" closing"),this._connectionProvider?this._connectionProvider.close():Promise.resolve()},b.prototype._afterConstruction=function(){this._log.info(this._meta.typename+" driver "+this._id+" created for server address "+this._meta.address)},b.prototype._newSession=function(t){var e=t.defaultAccessMode,r=t.bookmarkOrBookmarks,n=t.database,o=t.reactive,i=t.impersonatedUser,s=t.fetchSize,t=c.default._validateSessionMode(e),e=this._getOrCreateConnectionProvider(),r=r?new u.Bookmark(r):u.Bookmark.empty();return this._createSession({mode:t,database:n||"",connectionProvider:e,bookmark:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:s})},b.prototype._getOrCreateConnectionProvider=function(){var t;return this._connectionProvider||(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(t=this._config,new i.default(t.resolver)))),this._connectionProvider},b);function b(t,e,r,n){var o;void 0===n&&(n=function(t){return new c.default(t)}),(o=e=void 0===e?{}:e).maxConnectionLifetime=_(o.maxConnectionLifetime,f),o.maxConnectionPoolSize=_(o.maxConnectionPoolSize,s.DEFAULT_POOL_MAX_SIZE),o.connectionAcquisitionTimeout=_(o.connectionAcquisitionTimeout,s.DEFAULT_POOL_ACQUISITION_TIMEOUT),o.fetchSize=y(o.fetchSize,p),function(t){var e=t.resolver;if(e&&"function"!=typeof e)throw new TypeError("Configured resolver should be a function. Got: "+e)}(e),this._id=d++,this._meta=t,this._config=e,this._log=a.Logger.create(e),this._createConnectionProvider=r,this._createSession=n,this._connectionProvider=null,this._afterConstruction()}function _(t,e){t=parseInt(t,10);return 0<t||0===t?t:t<0?Number.MAX_SAFE_INTEGER:e}function y(t,e){t=parseInt(t,10);if(0<t||t===s.FETCH_ALL)return t;if(0===t||t<0)throw new Error("The fetch size can only be a positive value or "+s.FETCH_ALL+" for ALL. However fetchSize = "+t);return e}r.Driver=t,r.default=t},{"./internal/bookmark":61,"./internal/connectivity-verifier":63,"./internal/constants":64,"./internal/logger":66,"./internal/resolver/configured-custom-resolver":69,"./internal/util":77,"./session":82}],57:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0}),r.PROTOCOL_ERROR=r.SESSION_EXPIRED=r.SERVICE_UNAVAILABLE=r.Neo4jError=r.newError=void 0;r.SERVICE_UNAVAILABLE="ServiceUnavailable";r.SESSION_EXPIRED="SessionExpired";r.PROTOCOL_ERROR="ProtocolError";var i,s="N/A",u=(i=Error,o(a,i),a);function a(t,e){t=i.call(this,t)||this;return t.constructor=a,t.__proto__=a.prototype,t.code=e,t.name="Neo4jError",t}r.Neo4jError=u,r.newError=function(t,e){return new u(t,null!=e?e:s)}},{}],58:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isPathSegment=r.PathSegment=r.isPath=r.Path=r.isUnboundRelationship=r.UnboundRelationship=r.isRelationship=r.Relationship=r.isNode=r.Node=void 0;var n=t("./json"),o={value:!0,enumerable:!1,configurable:!1,writable:!1},i="__isNode__",s="__isRelationship__",u="__isUnboundRelationship__",a="__isPath__",c="__isPathSegment__";function l(t,e){return!0===(t&&t[e])}f.prototype.toString=function(){for(var t="("+this.identity,e=0;e<this.labels.length;e++)t+=":"+this.labels[e];var r=Object.keys(this.properties);if(0<r.length){t+=" {";for(e=0;e<r.length;e++)0<e&&(t+=","),t+=r[e]+":"+(0,n.stringify)(this.properties[r[e]]);t+="}"}return t+=")"},t=f;function f(t,e,r){this.identity=t,this.labels=e,this.properties=r}r.Node=t,Object.defineProperty(t.prototype,i,o),r.isNode=function(t){return l(t,i)};var p=(h.prototype.toString=function(){var t="("+this.start+")-[:"+this.type,e=Object.keys(this.properties);if(0<e.length){t+=" {";for(var r=0;r<e.length;r++)0<r&&(t+=","),t+=e[r]+":"+(0,n.stringify)(this.properties[e[r]]);t+="}"}return t+="]->("+this.end+")"},h);function h(t,e,r,n,o){this.identity=t,this.start=e,this.end=r,this.type=n,this.properties=o}r.Relationship=p,Object.defineProperty(p.prototype,s,o),r.isRelationship=function(t){return l(t,s)};d.prototype.bind=function(t,e){return new p(this.identity,t,e,this.type,this.properties)},d.prototype.toString=function(){var t="-[:"+this.type,e=Object.keys(this.properties);if(0<e.length){t+=" {";for(var r=0;r<e.length;r++)0<r&&(t+=","),t+=e[r]+":"+(0,n.stringify)(this.properties[e[r]]);t+="}"}return t+="]->"},t=d;function d(t,e,r){this.identity=t,this.type=e,this.properties=r}r.UnboundRelationship=t,Object.defineProperty(t.prototype,u,o),r.isUnboundRelationship=function(t){return l(t,u)};t=function(t,e,r){this.start=t,this.relationship=e,this.end=r};r.PathSegment=t,Object.defineProperty(t.prototype,c,o),r.isPathSegment=function(t){return l(t,c)};t=function(t,e,r){this.start=t,this.end=e,this.segments=r,this.length=r.length};r.Path=t,Object.defineProperty(t.prototype,a,o),r.isPath=function(t){return l(t,a)}},{"./json":78}],59:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.types=r.Driver=r.Session=r.Transaction=r.Connection=r.ConnectionProvider=r.Result=r.Stats=r.QueryStatistics=r.ProfiledPlan=r.Plan=r.Notification=r.ServerInfo=r.queryType=r.ResultSummary=r.Record=r.isPathSegment=r.PathSegment=r.isPath=r.Path=r.isUnboundRelationship=r.UnboundRelationship=r.isRelationship=r.Relationship=r.isNode=r.Node=r.Time=r.LocalTime=r.LocalDateTime=r.isTime=r.isLocalTime=r.isLocalDateTime=r.isDuration=r.isDateTime=r.isDate=r.Duration=r.DateTime=r.Date=r.Point=r.isPoint=r.internal=r.toString=r.toNumber=r.inSafeRange=r.isInt=r.int=r.Integer=r.error=r.Neo4jError=r.newError=void 0,r.auth=r.json=r.driver=void 0;var u=t("./error");Object.defineProperty(r,"newError",{enumerable:!0,get:function(){return u.newError}}),Object.defineProperty(r,"Neo4jError",{enumerable:!0,get:function(){return u.Neo4jError}});var a=i(t("./integer"));r.Integer=a.default,Object.defineProperty(r,"int",{enumerable:!0,get:function(){return a.int}}),Object.defineProperty(r,"isInt",{enumerable:!0,get:function(){return a.isInt}}),Object.defineProperty(r,"inSafeRange",{enumerable:!0,get:function(){return a.inSafeRange}}),Object.defineProperty(r,"toNumber",{enumerable:!0,get:function(){return a.toNumber}}),Object.defineProperty(r,"toString",{enumerable:!0,get:function(){return a.toString}});var c=t("./temporal-types");Object.defineProperty(r,"Date",{enumerable:!0,get:function(){return c.Date}}),Object.defineProperty(r,"DateTime",{enumerable:!0,get:function(){return c.DateTime}}),Object.defineProperty(r,"Duration",{enumerable:!0,get:function(){return c.Duration}}),Object.defineProperty(r,"isDate",{enumerable:!0,get:function(){return c.isDate}}),Object.defineProperty(r,"isDateTime",{enumerable:!0,get:function(){return c.isDateTime}}),Object.defineProperty(r,"isDuration",{enumerable:!0,get:function(){return c.isDuration}}),Object.defineProperty(r,"isLocalDateTime",{enumerable:!0,get:function(){return c.isLocalDateTime}}),Object.defineProperty(r,"isLocalTime",{enumerable:!0,get:function(){return c.isLocalTime}}),Object.defineProperty(r,"isTime",{enumerable:!0,get:function(){return c.isTime}}),Object.defineProperty(r,"LocalDateTime",{enumerable:!0,get:function(){return c.LocalDateTime}}),Object.defineProperty(r,"LocalTime",{enumerable:!0,get:function(){return c.LocalTime}}),Object.defineProperty(r,"Time",{enumerable:!0,get:function(){return c.Time}});var l=t("./graph-types");Object.defineProperty(r,"Node",{enumerable:!0,get:function(){return l.Node}}),Object.defineProperty(r,"isNode",{enumerable:!0,get:function(){return l.isNode}}),Object.defineProperty(r,"Relationship",{enumerable:!0,get:function(){return l.Relationship}}),Object.defineProperty(r,"isRelationship",{enumerable:!0,get:function(){return l.isRelationship}}),Object.defineProperty(r,"UnboundRelationship",{enumerable:!0,get:function(){return l.UnboundRelationship}}),Object.defineProperty(r,"isUnboundRelationship",{enumerable:!0,get:function(){return l.isUnboundRelationship}}),Object.defineProperty(r,"Path",{enumerable:!0,get:function(){return l.Path}}),Object.defineProperty(r,"isPath",{enumerable:!0,get:function(){return l.isPath}}),Object.defineProperty(r,"PathSegment",{enumerable:!0,get:function(){return l.PathSegment}}),Object.defineProperty(r,"isPathSegment",{enumerable:!0,get:function(){return l.isPathSegment}});var f=s(t("./record"));r.Record=f.default;var p=t("./spatial-types");Object.defineProperty(r,"isPoint",{enumerable:!0,get:function(){return p.isPoint}}),Object.defineProperty(r,"Point",{enumerable:!0,get:function(){return p.Point}});var h=i(t("./result-summary"));r.ResultSummary=h.default,Object.defineProperty(r,"queryType",{enumerable:!0,get:function(){return h.queryType}}),Object.defineProperty(r,"ServerInfo",{enumerable:!0,get:function(){return h.ServerInfo}}),Object.defineProperty(r,"Notification",{enumerable:!0,get:function(){return h.Notification}}),Object.defineProperty(r,"Plan",{enumerable:!0,get:function(){return h.Plan}}),Object.defineProperty(r,"ProfiledPlan",{enumerable:!0,get:function(){return h.ProfiledPlan}}),Object.defineProperty(r,"QueryStatistics",{enumerable:!0,get:function(){return h.QueryStatistics}}),Object.defineProperty(r,"Stats",{enumerable:!0,get:function(){return h.Stats}});var d=s(t("./result"));r.Result=d.default;var b=s(t("./connection-provider"));r.ConnectionProvider=b.default;var _=s(t("./connection"));r.Connection=_.default;var y=s(t("./transaction"));r.Transaction=y.default;var v=s(t("./session"));r.Session=v.default;var m=i(t("./driver")),g=m;r.Driver=m.default,r.driver=g;var O=s(t("./auth"));r.auth=O.default;b=i(t("./types"));r.types=b;s=i(t("./json"));r.json=s;i=i(t("./internal"));r.internal=i;t={SERVICE_UNAVAILABLE:u.SERVICE_UNAVAILABLE,SESSION_EXPIRED:u.SESSION_EXPIRED,PROTOCOL_ERROR:u.PROTOCOL_ERROR};r.error=t;O={newError:u.newError,Neo4jError:u.Neo4jError,error:t,Integer:a.default,int:a.int,isInt:a.isInt,inSafeRange:a.inSafeRange,toNumber:a.toNumber,toString:a.toString,internal:i,isPoint:p.isPoint,Point:p.Point,Date:c.Date,DateTime:c.DateTime,Duration:c.Duration,isDate:c.isDate,isDateTime:c.isDateTime,isDuration:c.isDuration,isLocalDateTime:c.isLocalDateTime,isLocalTime:c.isLocalTime,isTime:c.isTime,LocalDateTime:c.LocalDateTime,LocalTime:c.LocalTime,Time:c.Time,Node:l.Node,isNode:l.isNode,Relationship:l.Relationship,isRelationship:l.isRelationship,UnboundRelationship:l.UnboundRelationship,isUnboundRelationship:l.isUnboundRelationship,Path:l.Path,isPath:l.isPath,PathSegment:l.PathSegment,isPathSegment:l.isPathSegment,Record:f.default,ResultSummary:h.default,queryType:h.queryType,ServerInfo:h.ServerInfo,Notification:h.Notification,Plan:h.Plan,ProfiledPlan:h.ProfiledPlan,QueryStatistics:h.QueryStatistics,Stats:h.Stats,Result:d.default,Transaction:y.default,Session:v.default,Driver:m.default,Connection:_.default,types:b,driver:g,json:s,auth:O.default};r.default=O},{"./auth":53,"./connection":55,"./connection-provider":54,"./driver":56,"./error":57,"./graph-types":58,"./integer":60,"./internal":65,"./json":78,"./record":79,"./result":81,"./result-summary":80,"./session":82,"./spatial-types":83,"./temporal-types":84,"./transaction":85,"./types":86}],60:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.toString=r.toNumber=r.inSafeRange=r.isInt=r.int=void 0;var c=t("./error"),n=new Map,o=(p.prototype.inSafeRange=function(){return this.greaterThanOrEqual(p.MIN_SAFE_VALUE)&&this.lessThanOrEqual(p.MAX_SAFE_VALUE)},p.prototype.toInt=function(){return this.low},p.prototype.toNumber=function(){return this.high*i+(this.low>>>0)},p.prototype.toBigInt=function(){if(this.isZero())return BigInt(0);if(this.isPositive())return BigInt(this.high>>>0)*BigInt(i)+BigInt(this.low>>>0);var t=this.negate();return BigInt(-1)*(BigInt(t.high>>>0)*BigInt(i)+BigInt(t.low>>>0))},p.prototype.toNumberOrInfinity=function(){return this.lessThan(p.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(p.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},p.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix out of range: "+t);if(this.isZero())return"0";if(this.isNegative()){if(this.equals(p.MIN_VALUE)){var e=p.fromNumber(t),r=this.div(e),n=r.multiply(e).subtract(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.negate().toString(t)}var o=p.fromNumber(Math.pow(t,6));n=this;for(var i="";;){var s=n.div(o),u=(n.subtract(s.multiply(o)).toInt()>>>0).toString(t);if((n=s).isZero())return u+i;for(;u.length<6;)u="0"+u;i=""+u+i}},p.prototype.getHighBits=function(){return this.high},p.prototype.getLowBits=function(){return this.low},p.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(p.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var t=0!==this.high?this.high:this.low,e=31;0<e&&0==(t&1<<e);e--);return 0!==this.high?e+33:e+1},p.prototype.isZero=function(){return 0===this.high&&0===this.low},p.prototype.isNegative=function(){return this.high<0},p.prototype.isPositive=function(){return 0<=this.high},p.prototype.isOdd=function(){return 1==(1&this.low)},p.prototype.isEven=function(){return 0==(1&this.low)},p.prototype.equals=function(t){t=p.fromValue(t);return this.high===t.high&&this.low===t.low},p.prototype.notEquals=function(t){return!this.equals(t)},p.prototype.lessThan=function(t){return this.compare(t)<0},p.prototype.lessThanOrEqual=function(t){return this.compare(t)<=0},p.prototype.greaterThan=function(t){return 0<this.compare(t)},p.prototype.greaterThanOrEqual=function(t){return 0<=this.compare(t)},p.prototype.compare=function(t){var e=p.fromValue(t);if(this.equals(e))return 0;var r=this.isNegative(),t=e.isNegative();return r&&!t||(r||!t)&&this.subtract(e).isNegative()?-1:1},p.prototype.negate=function(){return this.equals(p.MIN_VALUE)?p.MIN_VALUE:this.not().add(p.ONE)},p.prototype.add=function(t){var e=p.fromValue(t),r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=e.high>>>16,u=65535&e.high,a=e.low>>>16,c=0,l=0,f=0,t=0;return f+=(t+=i+(65535&e.low))>>>16,l+=(f+=o+a)>>>16,c+=(l+=n+u)>>>16,c+=r+s,p.fromBits((f&=65535)<<16|(t&=65535),(c&=65535)<<16|(l&=65535))},p.prototype.subtract=function(t){t=p.fromValue(t);return this.add(t.negate())},p.prototype.multiply=function(t){if(this.isZero())return p.ZERO;var e=p.fromValue(t);if(e.isZero())return p.ZERO;if(this.equals(p.MIN_VALUE))return e.isOdd()?p.MIN_VALUE:p.ZERO;if(e.equals(p.MIN_VALUE))return this.isOdd()?p.MIN_VALUE:p.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(h)&&e.lessThan(h))return p.fromNumber(this.toNumber()*e.toNumber());var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=e.high>>>16,u=65535&e.high,a=e.low>>>16,c=65535&e.low,l=0,f=0,t=0,e=0;return t+=(e+=i*c)>>>16,f+=(t+=o*c)>>>16,t&=65535,f+=(t+=i*a)>>>16,l+=(f+=n*c)>>>16,f&=65535,l+=(f+=o*a)>>>16,f&=65535,l+=(f+=i*u)>>>16,l+=r*c+n*a+o*u+i*s,p.fromBits((t&=65535)<<16|(e&=65535),(l&=65535)<<16|(f&=65535))},p.prototype.div=function(t){var e,r,n,o=p.fromValue(t);if(o.isZero())throw(0,c.newError)("division by zero");if(this.isZero())return p.ZERO;{if(this.equals(p.MIN_VALUE))return o.equals(p.ONE)||o.equals(p.NEG_ONE)?p.MIN_VALUE:o.equals(p.MIN_VALUE)?p.ONE:(n=this.shiftRight(1).div(o).shiftLeft(1)).equals(p.ZERO)?o.isNegative()?p.ONE:p.NEG_ONE:(e=this.subtract(o.multiply(n)),r=n.add(e.div(o)));if(o.equals(p.MIN_VALUE))return p.ZERO}if(this.isNegative())return o.isNegative()?this.negate().div(o.negate()):this.negate().div(o).negate();if(o.isNegative())return this.div(o.negate()).negate();for(r=p.ZERO,e=this;e.greaterThanOrEqual(o);){n=Math.max(1,Math.floor(e.toNumber()/o.toNumber()));for(var i=Math.ceil(Math.log(n)/Math.LN2),s=i<=48?1:Math.pow(2,i-48),u=p.fromNumber(n),a=u.multiply(o);a.isNegative()||a.greaterThan(e);)a=(u=p.fromNumber(n-=s)).multiply(o);u.isZero()&&(u=p.ONE),r=r.add(u),e=e.subtract(a)}return r},p.prototype.modulo=function(t){t=p.fromValue(t);return this.subtract(this.div(t).multiply(t))},p.prototype.not=function(){return p.fromBits(~this.low,~this.high)},p.prototype.and=function(t){t=p.fromValue(t);return p.fromBits(this.low&t.low,this.high&t.high)},p.prototype.or=function(t){t=p.fromValue(t);return p.fromBits(this.low|t.low,this.high|t.high)},p.prototype.xor=function(t){t=p.fromValue(t);return p.fromBits(this.low^t.low,this.high^t.high)},p.prototype.shiftLeft=function(t){t=p.toNumber(t);return 0==(t&=63)?p.ZERO:t<32?p.fromBits(this.low<<t,this.high<<t|this.low>>>32-t):p.fromBits(0,this.low<<t-32)},p.prototype.shiftRight=function(t){var e=p.toNumber(t);return 0==(e&=63)?p.ZERO:t<32?p.fromBits(this.low>>>e|this.high<<32-e,this.high>>e):p.fromBits(this.high>>e-32,0<=this.high?0:-1)},p.isInteger=function(t){return!0===(t&&t.__isInteger__)},p.fromInt=function(t){var e;return-128<=(t|=0)&&t<128&&(e=n.get(t))||(e=new p(t,t<0?-1:0),-128<=t&&t<128&&n.set(t,e)),e},p.fromBits=function(t,e){return new p(t,e)},p.fromNumber=function(t){return isNaN(t)||!isFinite(t)?p.ZERO:t<=-s?p.MIN_VALUE:s<=t+1?p.MAX_VALUE:t<0?p.fromNumber(-t).negate():new p(t%i|0,t/i|0)},p.fromString=function(t,e){if(0===t.length)throw(0,c.newError)("number format error: empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return p.ZERO;if((e=e||10)<2||36<e)throw(0,c.newError)("radix out of range: "+e);var r;if(0<(r=t.indexOf("-")))throw(0,c.newError)('number format error: interior "-" character: '+t);if(0===r)return p.fromString(t.substring(1),e).negate();for(var n=p.fromNumber(Math.pow(e,8)),o=p.ZERO,i=0;i<t.length;i+=8){var s=Math.min(8,t.length-i),u=parseInt(t.substring(i,i+s),e);o=s<8?(s=p.fromNumber(Math.pow(e,s)),o.multiply(s).add(p.fromNumber(u))):(o=o.multiply(n)).add(p.fromNumber(u))}return o},p.fromValue=function(t){return t instanceof p?t:"number"==typeof t?p.fromNumber(t):"string"==typeof t?p.fromString(t):"bigint"==typeof t?p.fromString(t.toString()):new p(t.low,t.high)},p.toNumber=function(t){switch(typeof t){case"number":return t;case"bigint":return Number(t);default:return p.fromValue(t).toNumber()}},p.toString=function(t,e){return p.fromValue(t).toString(e)},p.inSafeRange=function(t){return p.fromValue(t).inSafeRange()},p.ZERO=p.fromInt(0),p.ONE=p.fromInt(1),p.NEG_ONE=p.fromInt(-1),p.MAX_VALUE=p.fromBits(-1,2147483647),p.MIN_VALUE=p.fromBits(0,-2147483648),p.MIN_SAFE_VALUE=p.fromBits(1,-2097152),p.MAX_SAFE_VALUE=p.fromBits(-1,2097151),p.__isInteger__=!0,p);function p(t,e){this.low=t||0,this.high=e||0}Object.defineProperty(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var i=4294967296,s=i*i/2,h=o.fromInt(1<<24),t=o.fromValue;r.int=t;t=o.isInteger;r.isInt=t;t=o.inSafeRange;r.inSafeRange=t;t=o.toNumber;r.toNumber=t;t=o.toString;r.toString=t,r.default=o},{"./error":57}],61:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.Bookmark=void 0;var s=i(t("./util")),t=(u.empty=function(){return a},u.prototype.isEmpty=function(){return 0===this._values.length},u.prototype.values=function(){return this._values},u.prototype.asBeginTransactionParameters=function(){var t;return this.isEmpty()?{}:((t={}).bookmarks=this._values,t)},u);function u(t){this._values=function(t){if(!t)return[];if(s.isString(t))return[t];if(Array.isArray(t)){for(var e=[],r=function r(t){return t.reduce(function(t,e){return Array.isArray(e)?t.concat(r(e)):t.concat(e)},[])}(t),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!s.isString(o))throw new TypeError("Bookmark value should be a string, given: '"+o+"'");e.push(o)}}return e}throw new TypeError("Bookmark should either be a string or a string array, given: '"+t+"'")}(t)}var a=new(r.Bookmark=t)(null)},{"./util":77}],62:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0}),r.EMPTY_CONNECTION_HOLDER=r.ReadOnlyConnectionHolder=r.ConnectionHolder=void 0;var i=t("../error"),s=t("./util"),u=t("./constants"),a=t("./bookmark"),c=(l.prototype.mode=function(){return this._mode},l.prototype.database=function(){return this._database},l.prototype.setDatabase=function(t){this._database=t},l.prototype.bookmark=function(){return this._bookmark},l.prototype.connectionProvider=function(){return this._connectionProvider},l.prototype.referenceCount=function(){return this._referenceCount},l.prototype.initializeConnection=function(){return 0===this._referenceCount&&this._connectionProvider?(this._connectionPromise=this._connectionProvider.acquireConnection({accessMode:this._mode,database:this._database,bookmarks:this._bookmark,impersonatedUser:this._impersonatedUser,onDatabaseNameResolved:this._onDatabaseNameResolved}),this._referenceCount++,!0):(this._referenceCount++,!1)},l.prototype.getConnection=function(){return this._connectionPromise},l.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},l.prototype.close=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection())},l.prototype._releaseConnection=function(){return this._connectionPromise=this._connectionPromise.then(function(t){return t?t.isOpen()?t.resetAndFlush().catch(b).then(function(){return t._release()}):t._release():Promise.resolve()}).catch(b),this._connectionPromise},l);function l(t){var e=void 0===t?{}:t,r=e.mode,n=void 0===r?u.ACCESS_MODE_WRITE:r,o=e.database,i=void 0===o?"":o,t=e.bookmark,r=e.connectionProvider,o=e.impersonatedUser,e=e.onDatabaseNameResolved;this._mode=n,this._database=i?(0,s.assertString)(i,"database"):"",this._bookmark=t||a.Bookmark.empty(),this._connectionProvider=r,this._impersonatedUser=o,this._referenceCount=0,this._connectionPromise=Promise.resolve(),this._onDatabaseNameResolved=e}r.ConnectionHolder=c;var f,p,t=(o(h,f=c),h.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},h.prototype.getConnection=function(){return this._connectionHolder.getConnection()},h.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve()})},h.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve()})},h);function h(t){var e=f.call(this,{mode:t.mode(),database:t.database(),bookmark:t.bookmark(),connectionProvider:t.connectionProvider()})||this;return e._connectionHolder=t,e}function d(){return null!==p&&p.apply(this,arguments)||this}r.ReadOnlyConnectionHolder=t,r.default=t;c=new(o(d,p=c),d.prototype.mode=function(){},d.prototype.database=function(){},d.prototype.initializeConnection=function(){return!0},d.prototype.getConnection=function(){return Promise.reject((0,i.newError)("This connection holder does not serve connections"))},d.prototype.releaseConnection=function(){return Promise.resolve()},d.prototype.close=function(){return Promise.resolve()},d);function b(t){}r.EMPTY_CONNECTION_HOLDER=c},{"../error":57,"./bookmark":61,"./constants":64,"./util":77}],63:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ConnectivityVerifier=void 0;var n=t("./connection-holder"),o=t("./constants"),i=t("../error"),t=(s.prototype.verify=function(t){var e,r=(void 0===t?{}:t).database;return t=this._connectionProvider,r=void 0===r?"":r,(e=new n.ConnectionHolder({mode:o.ACCESS_MODE_READ,database:r,connectionProvider:t})).initializeConnection(),e.getConnection().then(function(t){if(!t)throw(0,i.newError)("Unexpected error acquiring transaction");return e.close().then(function(){return t.server})}).catch(function(t){return e.close().catch(function(t){}).then(function(){return Promise.reject(t)})})},s);function s(t){this._connectionProvider=t}r.ConnectivityVerifier=t},{"../error":57,"./connection-holder":62,"./constants":64}],64:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BOLT_PROTOCOL_V4_4=r.BOLT_PROTOCOL_V4_3=r.BOLT_PROTOCOL_V4_2=r.BOLT_PROTOCOL_V4_1=r.BOLT_PROTOCOL_V4_0=r.BOLT_PROTOCOL_V3=r.BOLT_PROTOCOL_V2=r.BOLT_PROTOCOL_V1=r.DEFAULT_POOL_MAX_SIZE=r.DEFAULT_POOL_ACQUISITION_TIMEOUT=r.ACCESS_MODE_WRITE=r.ACCESS_MODE_READ=r.FETCH_ALL=void 0;r.FETCH_ALL=-1;r.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4;r.DEFAULT_POOL_MAX_SIZE=100;r.ACCESS_MODE_READ="READ";r.ACCESS_MODE_WRITE="WRITE";r.BOLT_PROTOCOL_V1=1;r.BOLT_PROTOCOL_V2=2;r.BOLT_PROTOCOL_V3=3;r.BOLT_PROTOCOL_V4_0=4;r.BOLT_PROTOCOL_V4_1=4.1;r.BOLT_PROTOCOL_V4_2=4.2;r.BOLT_PROTOCOL_V4_3=4.3;r.BOLT_PROTOCOL_V4_4=4.4},{}],65:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.retryStrategy=r.resolver=r.serverAddress=r.urlUtil=r.logger=r.connectivityVerifier=r.transactionExecutor=r.txConfig=r.connectionHolder=r.constants=r.bookmark=r.observer=r.temporalUtil=r.util=void 0;var s=i(t("./util"));r.util=s;s=i(t("./temporal-util"));r.temporalUtil=s;s=i(t("./observers"));r.observer=s;s=i(t("./bookmark"));r.bookmark=s;s=i(t("./constants"));r.constants=s;s=i(t("./connection-holder"));r.connectionHolder=s;s=i(t("./tx-config"));r.txConfig=s;s=i(t("./transaction-executor"));r.transactionExecutor=s;s=i(t("./connectivity-verifier"));r.connectivityVerifier=s;s=i(t("./logger"));r.logger=s;s=i(t("./url-util"));r.urlUtil=s;s=i(t("./server-address"));r.serverAddress=s;s=i(t("./resolver"));r.resolver=s;t=i(t("./retry-strategy"));r.retryStrategy=t},{"./bookmark":61,"./connection-holder":62,"./connectivity-verifier":63,"./constants":64,"./logger":66,"./observers":67,"./resolver":70,"./retry-strategy":71,"./server-address":72,"./temporal-util":73,"./transaction-executor":74,"./tx-config":75,"./url-util":76,"./util":77}],66:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0}),r.Logger=void 0;var i,s=t("../error"),u="error",a="warn",c="info",l="debug",f=c,p=((t={})[u]=0,t[a]=1,t[c]=2,t[l]=3,t),t=(h.create=function(t){if(t&&t.logging){t=t.logging;return new h(function(t){if(t&&t.level){var e=t.level,t=p[e];if(!t&&0!==t)throw(0,s.newError)("Illegal logging level: "+e+". Supported levels are: "+Object.keys(p));return e}return f}(t),function(t){if(t&&t.logger){var e=t.logger;if(e&&"function"==typeof e)return e}throw(0,s.newError)("Illegal logger function: "+t.logger)}(t))}return this.noOp()},h.noOp=function(){return b},h.prototype.isErrorEnabled=function(){return _(this._level,u)},h.prototype.error=function(t){this.isErrorEnabled()&&this._loggerFunction(u,t)},h.prototype.isWarnEnabled=function(){return _(this._level,a)},h.prototype.warn=function(t){this.isWarnEnabled()&&this._loggerFunction(a,t)},h.prototype.isInfoEnabled=function(){return _(this._level,c)},h.prototype.info=function(t){this.isInfoEnabled()&&this._loggerFunction(c,t)},h.prototype.isDebugEnabled=function(){return _(this._level,l)},h.prototype.debug=function(t){this.isDebugEnabled()&&this._loggerFunction(l,t)},h);function h(t,e){this._level=t,this._loggerFunction=e}function d(){return i.call(this,c,function(t,e){})||this}r.Logger=t;var b=new(o(d,i=t),d.prototype.isErrorEnabled=function(){return!1},d.prototype.error=function(t){},d.prototype.isWarnEnabled=function(){return!1},d.prototype.warn=function(t){},d.prototype.isInfoEnabled=function(){return!1},d.prototype.info=function(t){},d.prototype.isDebugEnabled=function(){return!1},d.prototype.debug=function(t){},d);function _(t,e){return p[t]>=p[e]}},{"../error":57}],67:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FailedObserver=r.CompletedObserver=void 0;var n=(o.prototype.subscribe=function(t){s(t,t.onKeys,[]),s(t,t.onCompleted,{})},o.prototype.cancel=function(){},o.prototype.prepareToHandleSingleResponse=function(){},o.prototype.markCompleted=function(){},o.prototype.onError=function(t){throw Error("CompletedObserver not supposed to call onError")},o);function o(){}r.CompletedObserver=n;i.prototype.subscribe=function(t){s(t,t.onError,this._error),this._observers.push(t)},i.prototype.onError=function(e){var t=this;Promise.resolve(s(this,this._beforeError,e)).then(function(){return t._observers.forEach(function(t){return s(t,t.onError,e)})})},i.prototype.cancel=function(){},i.prototype.prepareToHandleSingleResponse=function(){},i.prototype.markCompleted=function(){},n=i;function i(t){var e=t.error,t=t.onError;this._error=e,this._beforeError=t,this._observers=[],this.onError(e)}function s(t,e,r){e&&e.bind(t)(r)}r.FailedObserver=n},{}],68:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.resolve=function(){throw new Error("Abstract function")},o.prototype._resolveToItself=function(t){return Promise.resolve([t])},o);function o(){}r.default=n},{}],69:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../server-address");function o(t){return Promise.resolve([t])}i.prototype.resolve=function(e){var r=this;return new Promise(function(t){return t(r._resolverFunction(e.asHostPort()))}).then(function(t){if(!Array.isArray(t))throw new TypeError("Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses.Each address is '<host>:<port>'. Got: "+t);return t.map(function(t){return n.ServerAddress.fromUrl(t)})})},t=i;function i(t){this._resolverFunction=t||o}r.default=t},{"../server-address":72}],70:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.ConfiguredCustomResolver=r.BaseHostNameResolver=void 0;var o=n(t("./base-host-name-resolver"));r.BaseHostNameResolver=o.default;t=n(t("./configured-custom-resolver"));r.ConfiguredCustomResolver=t.default},{"./base-host-name-resolver":68,"./configured-custom-resolver":69}],71:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.canRetryOn=void 0;var n=t("../error");r.canRetryOn=function(t){return t&&t instanceof n.Neo4jError&&t.code&&(t.code===n.SERVICE_UNAVAILABLE||t.code===n.SESSION_EXPIRED||"Neo.ClientError.Security.AuthorizationExpired"===t.code||function(t){t=t.code;if(0<=t.indexOf("TransientError"))return"Neo.TransientError.Transaction.Terminated"!==t&&"Neo.TransientError.Transaction.LockClientStopped"!==t;return!1}(t))}},{"../error":57}],72:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.ServerAddress=void 0;var s=t("./util"),u=i(t("./url-util")),t=(a.prototype.host=function(){return this._host},a.prototype.resolvedHost=function(){return this._resolved||this._host},a.prototype.port=function(){return this._port},a.prototype.resolveWith=function(t){return new a(this._host,t,this._port,this._hostPort)},a.prototype.asHostPort=function(){return this._hostPort},a.prototype.asKey=function(){return this._hostPort},a.prototype.toString=function(){return this._stringValue},a.fromUrl=function(t){t=u.parseDatabaseUrl(t);return new a(t.host,null,t.port,t.hostAndPort)},a);function a(t,e,r,n){this._host=(0,s.assertString)(t,"host"),this._resolved=e?(0,s.assertString)(e,"resolved"):null,this._port=(0,s.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=e?n+"("+e+")":""+n}r.ServerAddress=t},{"./url-util":76,"./util":77}],73:[function(t,e,u){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(u,"__esModule",{value:!0}),u.floorMod=u.floorDiv=u.assertValidNanosecond=u.assertValidSecond=u.assertValidMinute=u.assertValidHour=u.assertValidDay=u.assertValidMonth=u.assertValidYear=u.timeZoneOffsetInSeconds=u.totalNanoseconds=u.dateToIsoString=u.timeZoneOffsetToIsoString=u.timeToIsoString=u.durationToIsoString=u.dateToEpochDay=u.localDateTimeToEpochSecond=u.localTimeToNanoOfDay=u.normalizeNanosecondsForDuration=u.normalizeSecondsForDuration=u.SECONDS_PER_DAY=u.DAYS_PER_400_YEAR_CYCLE=u.DAYS_0000_TO_1970=u.NANOS_PER_HOUR=u.NANOS_PER_MINUTE=u.NANOS_PER_MILLISECOND=u.NANOS_PER_SECOND=u.SECONDS_PER_HOUR=u.SECONDS_PER_MINUTE=u.MINUTES_PER_HOUR=u.NANOSECOND_OF_SECOND_RANGE=u.SECOND_OF_MINUTE_RANGE=u.MINUTE_OF_HOUR_RANGE=u.HOUR_OF_DAY_RANGE=u.DAY_OF_MONTH_RANGE=u.MONTH_OF_YEAR_RANGE=u.YEAR_RANGE=void 0;var a=r(t("../integer")),i=t("../error"),s=t("./util"),t=(c.prototype.contains=function(t){if((0,a.isInt)(t)&&t instanceof a.default)return t.greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger);if("bigint"!=typeof t)return t>=this._minNumber&&t<=this._maxNumber;t=(0,a.int)(t);return t.greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger)},c.prototype.toString=function(){return"["+this._minNumber+", "+this._maxNumber+"]"},c);function c(t,e){this._minNumber=t,this._maxNumber=e,this._minInteger=(0,a.int)(t),this._maxInteger=(0,a.int)(e)}function l(t,e,r){t=(0,a.int)(t),e=(0,a.int)(e),r=(0,a.int)(r);var n=t.multiply(365);return n=(n=(n=t.greaterThanOrEqual(0)?n.add(t.add(3).div(4).subtract(t.add(99).div(100)).add(t.add(399).div(400))):n.subtract(t.div(-4).subtract(t.div(-100)).add(t.div(-400)))).add(e.multiply(367).subtract(362).div(12))).add(r.subtract(1)),e.greaterThan(2)&&(n=n.subtract(1),t=t,(t=(0,a.int)(t)).modulo(4).equals(0)&&(!t.modulo(100).equals(0)||t.modulo(400).equals(0))||(n=n.subtract(1))),n.subtract(u.DAYS_0000_TO_1970)}function f(t,e,r){if((0,s.assertNumberOrInteger)(t,r),!e.contains(t))throw(0,i.newError)(r+" is expected to be in range "+e+" but was: "+t);return t}function p(t,e){t=(0,a.int)(t),e=(0,a.int)(e);var r=t.div(e);return r=t.isPositive()!==e.isPositive()&&r.multiply(e).notEquals(t)?r.subtract(1):r}function h(t,e){return t=(0,a.int)(t),e=(0,a.int)(e),t.subtract(p(t,e).multiply(e))}function d(t){return(t=(0,a.int)(t)).equals(0)?"":"."+b(t,9)}function b(t,e){var r=(t=(0,a.int)(t)).isNegative(),n=(t=r?t.negate():t).toString();if(e)for(;n.length<e;)n="0"+n;return r?"-"+n:n}u.YEAR_RANGE=new t(-999999999,999999999),u.MONTH_OF_YEAR_RANGE=new t(1,12),u.DAY_OF_MONTH_RANGE=new t(1,31),u.HOUR_OF_DAY_RANGE=new t(0,23),u.MINUTE_OF_HOUR_RANGE=new t(0,59),u.SECOND_OF_MINUTE_RANGE=new t(0,59),u.NANOSECOND_OF_SECOND_RANGE=new t(0,999999999),u.MINUTES_PER_HOUR=60,u.SECONDS_PER_MINUTE=60,u.SECONDS_PER_HOUR=u.SECONDS_PER_MINUTE*u.MINUTES_PER_HOUR,u.NANOS_PER_SECOND=1e9,u.NANOS_PER_MILLISECOND=1e6,u.NANOS_PER_MINUTE=u.NANOS_PER_SECOND*u.SECONDS_PER_MINUTE,u.NANOS_PER_HOUR=u.NANOS_PER_MINUTE*u.MINUTES_PER_HOUR,u.DAYS_0000_TO_1970=719528,u.DAYS_PER_400_YEAR_CYCLE=146097,u.SECONDS_PER_DAY=86400,u.normalizeSecondsForDuration=function(t,e){return(0,a.int)(t).add(p(e,u.NANOS_PER_SECOND))},u.normalizeNanosecondsForDuration=function(t){return h(t,u.NANOS_PER_SECOND)},u.localTimeToNanoOfDay=function(t,e,r,n){return t=(0,a.int)(t),e=(0,a.int)(e),r=(0,a.int)(r),n=(0,a.int)(n),(t=(t=(t=t.multiply(u.NANOS_PER_HOUR)).add(e.multiply(u.NANOS_PER_MINUTE))).add(r.multiply(u.NANOS_PER_SECOND))).add(n)},u.localDateTimeToEpochSecond=function(t,e,r,n,o,i,s){return r=l(t,e,r),i=function(t,e,r){t=(0,a.int)(t),e=(0,a.int)(e),r=(0,a.int)(r);t=t.multiply(u.SECONDS_PER_HOUR);return(t=t.add(e.multiply(u.SECONDS_PER_MINUTE))).add(r)}(n,o,i),r.multiply(u.SECONDS_PER_DAY).add(i)},u.dateToEpochDay=l,u.durationToIsoString=function(t,e,r,n){return"P"+b(t)+"M"+b(e)+"DT"+function(t,e){var r;t=(0,a.int)(t),e=(0,a.int)(e);var n=t.isNegative(),o=e.greaterThan(0);t=n&&o?t.equals(-1)?"-0":t.add(1).toString():t.toString();o&&(r=d((n?e.negate().add(2*u.NANOS_PER_SECOND):e.add(u.NANOS_PER_SECOND)).modulo(u.NANOS_PER_SECOND)));return r?t+r:t}(r,n)+"S"},u.timeToIsoString=function(t,e,r,n){return b(t,2)+":"+b(e,2)+":"+b(r,2)+d(n)},u.timeZoneOffsetToIsoString=function(t){if((t=(0,a.int)(t)).equals(0))return"Z";var e=(n=t.isNegative())?"-":"+",r=b((t=n?t.multiply(-1):t).div(u.SECONDS_PER_HOUR),2),n=b(t.div(u.SECONDS_PER_MINUTE).modulo(u.MINUTES_PER_HOUR),2);return(t=(t=t.modulo(u.SECONDS_PER_MINUTE)).equals(0)?null:b(t,2))?e+r+":"+n+":"+t:e+r+":"+n},u.dateToIsoString=function(t,e,r){var n=(t=(0,a.int)(t)).isNegative(),t=b(t=n?t.multiply(-1):t,4);return(t=n?"-"+t:t)+"-"+b(e,2)+"-"+b(r,2)},u.totalNanoseconds=function(t,e){return function(t,e){{if(t instanceof a.default)return t.add(e);if("bigint"==typeof t)return t+BigInt(e)}return t+e}(e=e||0,t.getMilliseconds()*u.NANOS_PER_MILLISECOND)},u.timeZoneOffsetInSeconds=function(t){return 0===(t=t.getTimezoneOffset())?0:-1*t*u.SECONDS_PER_MINUTE},u.assertValidYear=function(t){return f(t,u.YEAR_RANGE,"Year")},u.assertValidMonth=function(t){return f(t,u.MONTH_OF_YEAR_RANGE,"Month")},u.assertValidDay=function(t){return f(t,u.DAY_OF_MONTH_RANGE,"Day")},u.assertValidHour=function(t){return f(t,u.HOUR_OF_DAY_RANGE,"Hour")},u.assertValidMinute=function(t){return f(t,u.MINUTE_OF_HOUR_RANGE,"Minute")},u.assertValidSecond=function(t){return f(t,u.SECOND_OF_MINUTE_RANGE,"Second")},u.assertValidNanosecond=function(t){return f(t,u.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},u.floorDiv=p,u.floorMod=h},{"../error":57,"../integer":60,"./util":77}],74:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TransactionExecutor=void 0;var n=t("../error"),a=t("./retry-strategy"),t=(o.prototype.execute=function(n,o){var i=this;return new Promise(function(t,e){i._executeTransactionInsidePromise(n,o,t,e)}).catch(function(t){var e=Date.now(),r=i._initialRetryDelayMs;return i._retryTransactionPromise(n,o,t,e,r)})},o.prototype.close=function(){this._inFlightTimeoutIds.forEach(function(t){return clearTimeout(t)}),this._inFlightTimeoutIds=[]},o.prototype._retryTransactionPromise=function(o,i,t,r,s){var u=this;return Date.now()-r>this._maxRetryTimeMs||!(0,a.canRetryOn)(t)?Promise.reject(t):new Promise(function(t,e){var r=u._computeDelayWithJitter(s),n=setTimeout(function(){u._inFlightTimeoutIds=u._inFlightTimeoutIds.filter(function(t){return t!==n}),u._executeTransactionInsidePromise(o,i,t,e)},r);u._inFlightTimeoutIds.push(n)}).catch(function(t){var e=s*u._multiplier;return u._retryTransactionPromise(o,i,t,r,e)})},o.prototype._executeTransactionInsidePromise=function(t,e,r,n){var o,i=this;try{o=t()}catch(t){return void n(t)}this._safeExecuteTransactionWork(o,e).then(function(t){return i._handleTransactionWorkSuccess(t,o,r,n)}).catch(function(t){return i._handleTransactionWorkFailure(t,o,n)})},o.prototype._safeExecuteTransactionWork=function(t,e){try{var r=e(t);return Promise.resolve(r)}catch(t){return Promise.reject(t)}},o.prototype._handleTransactionWorkSuccess=function(t,e,r,n){e.isOpen()?e.commit().then(function(){r(t)}).catch(function(t){n(t)}):r(t)},o.prototype._handleTransactionWorkFailure=function(t,e,r){e.isOpen()?e.rollback().catch(function(t){}).then(function(){return r(t)}):r(t)},o.prototype._computeDelayWithJitter=function(t){var e=t*this._jitterFactor,r=t-e,e=t+e;return Math.random()*(e-r)+r},o.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,n.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs);if(this._initialRetryDelayMs<0)throw(0,n.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs);if(this._multiplier<1)throw(0,n.newError)("Multiplier should be >= 1.0: "+this._multiplier);if(this._jitterFactor<0||1<this._jitterFactor)throw(0,n.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor)},o);function o(t,e,r,n){this._maxRetryTimeMs=i(t,3e4),this._initialRetryDelayMs=i(e,1e3),this._multiplier=i(r,2),this._jitterFactor=i(n,.2),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}function i(t,e){return t||0===t?t:e}r.TransactionExecutor=t},{"../error":57,"./retry-strategy":71}],75:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.TxConfig=void 0;var s=i(t("./util")),u=t("../error"),a=t("../integer"),t=(c.empty=function(){return l},c.prototype.isEmpty=function(){return Object.values(this).every(function(t){return null==t})},c);function c(t){var e;(e=t)&&s.assertObject(e,"Transaction config"),this.timeout=function(t){if(!s.isObject(t)||!t.timeout&&0!==t.timeout)return null;s.assertNumberOrInteger(t.timeout,"Transaction timeout");t=(0,a.int)(t.timeout);if(t.isZero())throw(0,u.newError)("Transaction timeout should not be zero");if(t.isNegative())throw(0,u.newError)("Transaction timeout should not be negative");return t}(t),this.metadata=function(t){if(s.isObject(t)&&t.metadata){t=t.metadata;if(s.assertObject(t,"config.metadata"),0!==Object.keys(t).length)return t}return null}(t)}var l=new(r.TxConfig=t)({})},{"../error":57,"../integer":60,"./util":77}],76:[function(t,e,r){"use strict";var s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},u=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(r,"__esModule",{value:!0}),r.Url=r.formatIPv6Address=r.formatIPv4Address=r.defaultPortForScheme=r.parseDatabaseUrl=void 0;var a=t("./util"),n=7687,o=7474,i=7473,c=function(t,e,r,n,o){this.scheme=t,this.host=e,this.port=r,this.hostAndPort=n,this.query=o};function l(t,e,r){if(!(t=(t||"").trim()))throw new Error("Illegal empty "+e+" in URL query '"+r+"'");return t}function f(t){var e="["===t.charAt(0),r="]"===t.charAt(t.length-1);if(e||r){if(e&&r)return t;throw new Error("Illegal IPv6 address "+t)}return"["+t+"]"}function p(t){return"http"===t?o:"https"===t?i:n}r.Url=c,r.parseDatabaseUrl=function(t){(0,a.assertString)(t,"URL");var e=function(t){function i(t,e){e=t.indexOf(e);return 0<=e?[t.substring(0,e),t[e],t.substring(e+1)]:[t,"",""]}function e(t){var e,r={};(o="@")===(e=0<=(o=(n=t).lastIndexOf(o))?[n.substring(0,o),n[o],n.substring(o+1)]:["","",n])[1]&&(r.userInfo=decodeURIComponent(e[0]),t=e[2]);var n,o,n=u((o="]",n=i(t,n="["),[(o=i(n[2],o))[0],o[2]]),2),o=n[0],n=n[1];return""!==o?(r.host=o,e=i(n,":")):(e=i(t,":"),r.host=e[0]),":"===e[1]&&(r.port=e[2]),r}var r,n={};":"===(r=i(t,":"))[1]&&(n.scheme=decodeURIComponent(r[0]),t=r[2]);"#"===(r=i(t,"#"))[1]&&(n.fragment=decodeURIComponent(r[2]),t=r[0]);"?"===(r=i(t,"?"))[1]&&(n.query=r[2],t=r[0]);t.startsWith("//")?(r=i(t.substr(2),"/"),(n=s(s({},n),e(r[0]))).path=r[1]+r[2]):n.path=t;return n}((i=-1!==(o=(o=t).trim()).indexOf("://")?{schemeMissing:!1,url:o}:{schemeMissing:!0,url:"none://"+o}).url),r=i.schemeMissing?null:function(t){if(t)return t=":"===(t=t.trim()).charAt(t.length-1)?t.substring(0,t.length-1):t;return null}(e.scheme),n=function(t,e){if(t)return t.trim();throw new Error("Unable to extract host from "+e)}(e.host),o=function(t){if(t)return 0<=t.indexOf(":")?f(t):t;throw new Error("Illegal host "+t)}(n),i=function(t,e){t="string"==typeof t?parseInt(t,10):t;return 0===t||t?t:p(e)}(e.port,r),o=o+":"+i,t=function(t,r){var t=t?function(t){(t=(t||"").trim())&&"?"===t.charAt(0)&&(t=t.substring(1,t.length));return t}(t):null,n={};t&&t.split("&").forEach(function(t){var e=t.split("=");if(2!==e.length)throw new Error("Invalid parameters: '"+e+"' in URL '"+r+"'.");t=l(e[0],"key",r),e=l(e[1],"value",r);if(n[t])throw new Error("Duplicated query parameters with key '"+t+"' in URL '"+r+"'");n[t]=e});return n}(e.query||function(t){if("string"!=typeof t)return null;t=u(t.split("?"),2),t[0];return t[1]}(e.resourceName),t);return new c(r,n,i,o,t)},r.formatIPv4Address=function(t,e){return t+":"+e},r.formatIPv6Address=function(t,e){return f(t)+":"+e},r.defaultPortForScheme=p},{"./util":77}],77:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ENCRYPTION_OFF=r.ENCRYPTION_ON=r.validateQueryAndParameters=r.assertValidDate=r.assertNumberOrInteger=r.assertNumber=r.assertString=r.assertObject=r.isString=r.isObject=r.isEmptyObjectOrNull=void 0;var n=t("../integer"),o=t("../json");r.ENCRYPTION_ON="ENCRYPTION_ON";function i(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}function s(t,e){if(!u(t))throw new TypeError(e+" expected to be string but was: "+(0,o.stringify)(t));return t}function u(t){return"[object String]"===Object.prototype.toString.call(t)}r.ENCRYPTION_OFF="ENCRYPTION_OFF",r.isEmptyObjectOrNull=function(t){if(null===t)return!0;if(!i(t))return!1;for(var e in t)if(Object.prototype.hasOwnProperty.bind(t,e))return!1;return!0},r.isObject=i,r.validateQueryAndParameters=function(t,e,r){var n="",e=e||{},r=(null==r?void 0:r.skipAsserts)||!1;return"string"==typeof t?n=t:t instanceof String?n=t.toString():"object"==typeof t&&t.text&&(n=t.text,e=t.parameters||{}),r||(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(!i(t)){var e=t.constructor?" "+t.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:"+e+" "+t)}}(e)),{validatedQuery:n,params:e}},r.assertObject=function(t,e){if(!i(t))throw new TypeError(e+" expected to be an object but was: "+(0,o.stringify)(t));return t},r.assertString=s,r.assertNumber=function(t,e){if("number"!=typeof t)throw new TypeError(e+" expected to be a number but was: "+(0,o.stringify)(t));return t},r.assertNumberOrInteger=function(t,e){if("number"!=typeof t&&"bigint"!=typeof t&&!(0,n.isInt)(t))throw new TypeError(e+" expected to be either a number or an Integer object but was: "+(0,o.stringify)(t));return t},r.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: "+(0,o.stringify)(t));if(Number.isNaN(t.getTime()))throw new TypeError(e+" expected to be valid JavaScript Date but its time was NaN: "+(0,o.stringify)(t));return t},r.isString=u},{"../integer":60,"../json":78}],78:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.stringify=void 0,r.stringify=function(t){return JSON.stringify(t,function(t,e){return"bigint"==typeof e?e+"n":e})}},{}],79:[function(t,e,r){"use strict";var n=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},c=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(r,"__esModule",{value:!0});var o=t("./error");i.prototype.forEach=function(t){var e,r;try{for(var n=c(this.entries()),o=n.next();!o.done;o=n.next()){var i=l(o.value,2),s=i[0];t(i[1],s,this)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},i.prototype.map=function(t){var e,r,n=[];try{for(var o=c(this.entries()),i=o.next();!i.done;i=o.next()){var s=l(i.value,2),u=s[0],a=s[1];n.push(t(a,u,this))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},i.prototype.entries=function(){var e;return n(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.keys.length?[4,[this.keys[e],this._fields[e]]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})},i.prototype.values=function(){var e;return n(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.keys.length?[4,this._fields[e]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})},i.prototype[Symbol.iterator]=function(){var e;return n(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.keys.length?[4,this._fields[e]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})},i.prototype.toObject=function(){var e,t,r={};try{for(var n=c(this.entries()),o=n.next();!o.done;o=n.next()){var i=l(o.value,2),s=i[0],u=i[1];r[s]=u}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},i.prototype.get=function(t){var e;if("number"!=typeof t){if(void 0===(e=this._fieldLookup[t]))throw(0,o.newError)("This record has no field with key '"+t+"', available key are: ["+this.keys+"].")}else e=t;if(e>this._fields.length-1||e<0)throw(0,o.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]},i.prototype.has=function(t){return"number"==typeof t?0<=t&&t<this._fields.length:void 0!==this._fieldLookup[t]},t=i;function i(t,e,r){var n;this.keys=t,this.length=t.length,this._fields=e,this._fieldLookup=r||(n={},t.forEach(function(t,e){n[t]=e}),n)}r.default=t},{"./error":57}],80:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.Stats=r.QueryStatistics=r.ProfiledPlan=r.Plan=r.Notification=r.ServerInfo=r.queryType=void 0;var s=i(t("./integer")),t=(u.prototype._buildNotifications=function(t){return t?t.map(function(t){return new h(t)}):[]},u.prototype.hasPlan=function(){return this.plan instanceof a},u.prototype.hasProfile=function(){return this.profile instanceof c},u);function u(t,e,r,n){this.query={text:t,parameters:e},this.queryType=r.type,this.counters=new f(r.stats||{}),this.updateStatistics=this.counters,this.plan=!(!r.plan&&!r.profile)&&new a(r.plan||r.profile),this.profile=!!r.profile&&new c(r.profile),this.notifications=this._buildNotifications(r.notifications),this.server=new b(r.server,n),this.resultConsumedAfter=r.result_consumed_after,this.resultAvailableAfter=r.result_available_after,this.database={name:r.db||null}}var a=function e(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.children=t.children?t.children.map(function(t){return new e(t)}):[]};r.Plan=a;var c=(l.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},l);function l(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.dbHits=y("dbHits",t),this.rows=y("rows",t),this.pageCacheMisses=y("pageCacheMisses",t),this.pageCacheHits=y("pageCacheHits",t),this.pageCacheHitRatio=y("pageCacheHitRatio",t),this.time=y("time",t),this.children=t.children?t.children.map(function(t){return new l(t)}):[]}r.ProfiledPlan=c,r.Stats=function(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0};var f=(p.prototype.containsUpdates=function(){var r=this;return 0<Object.keys(this._stats).reduce(function(t,e){return t+r._stats[e]},0)},p.prototype.updates=function(){return this._stats},p.prototype.containsSystemUpdates=function(){return 0<this._systemUpdates},p.prototype.systemUpdates=function(){return this._systemUpdates},p);function p(r){var n=this;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(r).forEach(function(t){var e=t.replace(/(-\w)/g,function(t){return t[1].toUpperCase()});e in n._stats?n._stats[e]=_(r[t]):"systemUpdates"===e&&(n._systemUpdates=_(r[t]))}),this._stats=Object.freeze(this._stats)}r.QueryStatistics=f;var h=(d._constructPosition=function(t){return t?{offset:_(t.offset),line:_(t.line),column:_(t.column)}:{}},d);function d(t){this.code=t.code,this.title=t.title,this.description=t.description,this.severity=t.severity,this.position=d._constructPosition(t.position)}r.Notification=h;var b=function(t,e){t&&(this.address=t.address,this.version=t.version,this.agent=t.version),this.protocolVersion=e};function _(t){return t instanceof s.default?t.toInt():"bigint"==typeof t?(0,s.int)(t).toInt():t}function y(t,e,r){return void 0===r&&(r=0),t in e?_(e[t]):r}r.ServerInfo=b;r.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},r.default=t},{"./integer":60}],81:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});function s(t){console.log("Uncaught error when processing result: "+t)}function u(t){}var i=n(t("./result-summary")),a=t("./internal"),o=a.connectionHolder.EMPTY_CONNECTION_HOLDER,t=(c.prototype.keys=function(){var t=this;return new Promise(function(e,r){t._streamObserverPromise.then(function(t){return t.subscribe({onKeys:function(t){return e(t)},onError:function(t){return r(t)}})}).catch(r)})},c.prototype.summary=function(){var n=this;return new Promise(function(e,r){n._streamObserverPromise.then(function(t){t.cancel(),t.subscribe({onCompleted:function(t){return n._createSummary(t).then(e,r)},onError:function(t){return r(t)}})}).catch(r)})},c.prototype._getOrCreatePromise=function(){var t=this;return this._p||(this._p=new Promise(function(e,r){var n=[];t.subscribe({onNext:function(t){n.push(t)},onCompleted:function(t){e({records:n,summary:t})},onError:function(t){r(t)}})})),this._p},c.prototype.then=function(t,e){return this._getOrCreatePromise().then(t,e)},c.prototype.catch=function(t){return this._getOrCreatePromise().catch(t)},c.prototype.finally=function(t){return this._getOrCreatePromise().finally(t)},c.prototype.subscribe=function(n){var o=this,e=n.onCompleted||u;n.onCompleted=function(t){o._createSummary(t).then(function(t){return e.call(n,t)})};var i=n.onError||s;n.onError=function(r){o._connectionHolder.releaseConnection().then(function(){var t,e;t=r,(e=o._stack)&&(t.stack=t.toString()+"\n"+e),i.call(n,r)})},this._streamObserverPromise.then(function(t){return t.subscribe(n)}).catch(function(t){return n.onError(t)})},c.prototype._cancel=function(){this._streamObserverPromise.then(function(t){return t.cancel()})},c.prototype._createSummary=function(e){var t=a.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=t.validatedQuery,n=t.params,o=this._connectionHolder;return o.getConnection().then(function(t){return o.releaseConnection().then(function(){return t?t.protocol().version:void 0})},function(t){}).then(function(t){return new i.default(r,n,e,t)})},c);function c(t,e,r,n){this._stack=function(){var t=new Error("");if(t.stack)return t.stack.replace(/^Error(\n\r)*/,"");return null}(),this._streamObserverPromise=t,this._p=null,this._query=e,this._parameters=r||{},this._connectionHolder=n||o}Symbol.toStringTag,r.default=t},{"./internal":65,"./result-summary":80}],82:[function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},i=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s=t("./internal/observers"),u=t("./internal/util"),a=t("./error"),c=n(t("./result")),l=n(t("./transaction")),f=t("./internal/connection-holder"),p=t("./internal/constants"),h=t("./internal/transaction-executor"),d=t("./internal/bookmark"),b=t("./internal/tx-config"),t=(_.prototype.run=function(t,e,r){var n=this,e=(0,u.validateQueryAndParameters)(t,e),o=e.validatedQuery,i=e.params,s=r?new b.TxConfig(r):b.TxConfig.empty();return this._run(o,i,function(t){return n._assertSessionIsOpen(),t.protocol().run(o,i,{bookmark:n._lastBookmark,txConfig:s,mode:n._mode,database:n._database,impersonatedUser:n._impersonatedUser,afterComplete:n._onComplete,reactive:n._reactive,fetchSize:n._fetchSize})})},_.prototype._run=function(t,e,r){var n=this._connectionHolderWithMode(this._mode),o=this._open?!this._hasTx&&n.initializeConnection()?n.getConnection().then(function(t){return r(t)}).catch(function(t){return Promise.resolve(new s.FailedObserver({error:t}))}):Promise.resolve(new s.FailedObserver({error:(0,a.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 s.FailedObserver({error:(0,a.newError)("Cannot run query in a closed session.")}));return new c.default(o,t,e,n)},_.prototype._acquireConnection=function(e){return o(this,void 0,void 0,function(){var r,n=this;return i(this,function(t){return r=this._connectionHolderWithMode(this._mode),[2,this._open?!this._hasTx&&r.initializeConnection()?r.getConnection().then(function(t){return e(t)}).then(function(e){return o(n,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,r.releaseConnection()];case 1:return t.sent(),[2,e]}})})}):Promise.reject((0,a.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.reject((0,a.newError)("Cannot run query in a closed session."))]})})},_.prototype.beginTransaction=function(t){var e=t,t=b.TxConfig.empty();return e&&(t=new b.TxConfig(e)),this._beginTransaction(this._mode,t)},_.prototype._beginTransaction=function(t,e){if(!this._open)throw(0,a.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,a.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");t=_._validateSessionMode(t),t=this._connectionHolderWithMode(t);t.initializeConnection(),this._hasTx=!0;t=new l.default({connectionHolder:t,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmark:this._updateBookmark.bind(this),onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize});return t._begin(this._lastBookmark,e),t},_.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,a.newError)("You cannot run more transactions on a closed session.")},_.prototype._transactionClosed=function(){this._hasTx=!1},_.prototype.lastBookmark=function(){return this._lastBookmark.values()},_.prototype.readTransaction=function(t,e){e=new b.TxConfig(e);return this._runTransaction(p.ACCESS_MODE_READ,e,t)},_.prototype.writeTransaction=function(t,e){e=new b.TxConfig(e);return this._runTransaction(p.ACCESS_MODE_WRITE,e,t)},_.prototype._runTransaction=function(t,e,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(t,e)},r)},_.prototype._onDatabaseNameResolved=function(t){this._databaseNameResolved||(this._database=t=t||"",this._readConnectionHolder.setDatabase(t),this._writeConnectionHolder.setDatabase(t),this._databaseNameResolved=!0)},_.prototype._updateBookmark=function(t){t&&!t.isEmpty()&&(this._lastBookmark=t)},_.prototype.close=function(){return o(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this._open?(this._open=!1,this._transactionExecutor.close(),[4,this._readConnectionHolder.close()]):[3,3];case 1:return t.sent(),[4,this._writeConnectionHolder.close()];case 2:t.sent(),t.label=3;case 3:return[2]}})})},_.prototype._connectionHolderWithMode=function(t){if(t===p.ACCESS_MODE_READ)return this._readConnectionHolder;if(t===p.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,a.newError)("Unknown access mode: "+t)},_.prototype._onCompleteCallback=function(t){this._updateBookmark(new d.Bookmark(t.bookmark))},_._validateSessionMode=function(t){t=t||p.ACCESS_MODE_WRITE;if(t!==p.ACCESS_MODE_READ&&t!==p.ACCESS_MODE_WRITE)throw(0,a.newError)("Illegal session mode "+t);return t},_);function _(t){var e=t.mode,r=t.connectionProvider,n=t.bookmark,o=t.database,i=t.config,s=t.reactive,u=t.fetchSize,t=t.impersonatedUser;this._mode=e,this._database=o,this._reactive=s,this._fetchSize=u,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._readConnectionHolder=new f.ConnectionHolder({mode:p.ACCESS_MODE_READ,database:o,bookmark:n,connectionProvider:r,impersonatedUser:t,onDatabaseNameResolved:this._onDatabaseNameResolved}),this._writeConnectionHolder=new f.ConnectionHolder({mode:p.ACCESS_MODE_WRITE,database:o,bookmark:n,connectionProvider:r,impersonatedUser:t,onDatabaseNameResolved:this._onDatabaseNameResolved}),this._open=!0,this._hasTx=!1,this._impersonatedUser=t,this._lastBookmark=n||d.Bookmark.empty(),this._transactionExecutor=function(t){t=t&&t.maxTransactionRetryTime?t.maxTransactionRetryTime:null;return new h.TransactionExecutor(t)}(i),this._onComplete=this._onCompleteCallback.bind(this),this._databaseNameResolved=""!==this._database}r.default=t},{"./error":57,"./internal/bookmark":61,"./internal/connection-holder":62,"./internal/constants":64,"./internal/observers":67,"./internal/transaction-executor":74,"./internal/tx-config":75,"./internal/util":77,"./result":81,"./transaction":85}],83:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isPoint=r.Point=void 0;var o=t("./internal/util"),n="__isPoint__",t=(i.prototype.toString=function(){return this.z||0===this.z?"Point{srid="+s(this.srid)+", x="+s(this.x)+", y="+s(this.y)+", z="+s(this.z)+"}":"Point{srid="+s(this.srid)+", x="+s(this.x)+", y="+s(this.y)+"}"},i);function i(t,e,r,n){this.srid=(0,o.assertNumberOrInteger)(t,"SRID"),this.x=(0,o.assertNumber)(e,"X coordinate"),this.y=(0,o.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,o.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function s(t){return Number.isInteger(t)?t+".0":t.toString()}r.Point=t,Object.defineProperty(t.prototype,n,{value:!0,enumerable:!1,configurable:!1,writable:!1}),r.isPoint=function(t){return!0===(t&&t[n])}},{"./internal/util":77}],84:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},c=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(r,"__esModule",{value:!0}),r.isDateTime=r.DateTime=r.isLocalDateTime=r.LocalDateTime=r.isDate=r.Date=r.isTime=r.Time=r.isLocalTime=r.LocalTime=r.isDuration=r.Duration=void 0;var l=i(t("./internal/temporal-util")),f=t("./internal/util"),p=t("./error"),s=i(t("./integer")),i={value:!0,enumerable:!1,configurable:!1,writable:!1},u="__isDuration__",a="__isLocalTime__",h="__isTime__",d="__isDate__",b="__isLocalDateTime__",_="__isDateTime__",t=(y.prototype.toString=function(){return l.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},y);function y(t,e,r,n){this.months=(0,f.assertNumberOrInteger)(t,"Months"),this.days=(0,f.assertNumberOrInteger)(e,"Days"),(0,f.assertNumberOrInteger)(r,"Seconds"),(0,f.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=l.normalizeSecondsForDuration(r,n),this.nanoseconds=l.normalizeNanosecondsForDuration(n),Object.freeze(this)}r.Duration=t,Object.defineProperty(t.prototype,u,i),r.isDuration=function(t){return S(t,u)};v.fromStandardDate=function(t,e){P(t,e);e=l.totalNanoseconds(t,e);return new v(t.getHours(),t.getMinutes(),t.getSeconds(),e instanceof s.default?e.toInt():"bigint"==typeof e?(0,s.int)(e).toInt():e)},v.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},t=v;function v(t,e,r,n){this.hour=l.assertValidHour(t),this.minute=l.assertValidMinute(e),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),Object.freeze(this)}r.LocalTime=t,Object.defineProperty(t.prototype,a,i),r.isLocalTime=function(t){return S(t,a)};m.fromStandardDate=function(t,e){return P(t,e),new m(t.getHours(),t.getMinutes(),t.getSeconds(),(0,s.toNumber)(l.totalNanoseconds(t,e)),l.timeZoneOffsetInSeconds(t))},m.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+l.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},t=m;function m(t,e,r,n,o){this.hour=l.assertValidHour(t),this.minute=l.assertValidMinute(e),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,f.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}r.Time=t,Object.defineProperty(t.prototype,h,i),r.isTime=function(t){return S(t,h)};g.fromStandardDate=function(t){return P(t),new g(t.getFullYear(),t.getMonth()+1,t.getDate())},g.prototype.toString=function(){return l.dateToIsoString(this.year,this.month,this.day)},t=g;function g(t,e,r){this.year=l.assertValidYear(t),this.month=l.assertValidMonth(e),this.day=l.assertValidDay(r),Object.freeze(this)}r.Date=t,Object.defineProperty(t.prototype,d,i),r.isDate=function(t){return S(t,d)};O.fromStandardDate=function(t,e){return P(t,e),new O(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),(0,s.toNumber)(l.totalNanoseconds(t,e)))},O.prototype.toString=function(){return E(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},t=O;function O(t,e,r,n,o,i,s){this.year=l.assertValidYear(t),this.month=l.assertValidMonth(e),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(s),Object.freeze(this)}r.LocalDateTime=t,Object.defineProperty(t.prototype,b,i),r.isLocalDateTime=function(t){return S(t,b)};w.fromStandardDate=function(t,e){return P(t,e),new w(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),(0,s.toNumber)(l.totalNanoseconds(t,e)),l.timeZoneOffsetInSeconds(t),null)},w.prototype.toString=function(){return E(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(this.timeZoneId?"["+this.timeZoneId+"]":l.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds||0))},t=w;function w(t,e,r,n,o,i,s,u,a){this.year=l.assertValidYear(t),this.month=l.assertValidMonth(e),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(s);u=c(function(t,e){var r=t||0===t,n=e&&""!==e;{if(r&&!n)return(0,f.assertNumberOrInteger)(t,"Time zone offset in seconds"),[t,void 0];if(!r&&n)return(0,f.assertString)(e,"Time zone ID"),[void 0,e];throw r&&n?(0,p.newError)("Unable to create DateTime with both time zone offset and id. Please specify either of them. Given offset: "+t+" and id: "+e):(0,p.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: "+t+" and id: "+e)}}(u,a),2),a=u[0],u=u[1];this.timeZoneOffsetSeconds=a,this.timeZoneId=u||void 0,Object.freeze(this)}function S(t,e){return!0===(t&&t[e])}function E(t,e,r,n,o,i,s){return l.dateToIsoString(t,e,r)+"T"+l.timeToIsoString(n,o,i,s)}function P(t,e){(0,f.assertValidDate)(t,"Standard date"),null!=e&&(0,f.assertNumberOrInteger)(e,"Nanosecond")}r.DateTime=t,Object.defineProperty(t.prototype,_,i),r.isDateTime=function(t){return S(t,_)}},{"./error":57,"./integer":60,"./internal/temporal-util":73,"./internal/util":77}],85:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=t("./internal/util"),i=t("./internal/connection-holder"),c=t("./internal/bookmark"),l=t("./internal/tx-config"),f=t("./internal/observers"),p=t("./error"),u=n(t("./result")),t=(s.prototype._begin=function(e,r){var n=this;this._connectionHolder.getConnection().then(function(t){if(n._onConnection(),t)return t.protocol().beginTransaction({bookmark:e,txConfig:r,mode:n._connectionHolder.mode(),database:n._connectionHolder.database(),impersonatedUser:n._impersonatedUser,beforeError:n._onError,afterComplete:n._onComplete});throw(0,p.newError)("No connection available")}).catch(function(t){return n._onError(t)})},s.prototype.run=function(t,e){t=(0,o.validateQueryAndParameters)(t,e),e=t.validatedQuery,t=t.params,t=this._state.run(e,t,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,reactive:this._reactive,fetchSize:this._fetchSize});return this._results.push(t),t},s.prototype.commit=function(){var r=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results});return this._state=r.state,this._onClose(),new Promise(function(t,e){r.result.subscribe({onCompleted:function(){return t()},onError:function(t){return e(t)}})})},s.prototype.rollback=function(){var r=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results});return this._state=r.state,this._onClose(),new Promise(function(t,e){r.result.subscribe({onCompleted:function(){return t()},onError:function(t){return e(t)}})})},s.prototype.isOpen=function(){return this._state===a.ACTIVE},s.prototype._onErrorCallback=function(t){return this._state=a.FAILED,this._onClose(),this._connectionHolder.releaseConnection()},s.prototype._onCompleteCallback=function(t){this._onBookmark(new c.Bookmark(t.bookmark))},s);function s(t){var e=t.connectionHolder,r=t.onClose,n=t.onBookmark,o=t.onConnection,i=t.reactive,s=t.fetchSize,t=t.impersonatedUser;this._connectionHolder=e,this._reactive=i,this._state=a.ACTIVE,this._onClose=r,this._onBookmark=n,this._onConnection=o,this._onError=this._onErrorCallback.bind(this),this._onComplete=this._onCompleteCallback.bind(this),this._fetchSize=s,this._results=[],this._impersonatedUser=t}var a={ACTIVE:{commit:function(t){return{result:h(!0,t.connectionHolder,t.onError,t.onComplete,t.onConnection,t.pendingResults),state:a.SUCCEEDED}},rollback:function(t){return{result:h(!1,t.connectionHolder,t.onError,t.onComplete,t.onConnection,t.pendingResults),state:a.ROLLED_BACK}},run:function(e,r,t){var n=t.connectionHolder,o=t.onError,i=t.onComplete,s=t.onConnection,u=t.reactive,a=t.fetchSize;return d(n.getConnection().then(function(t){if(s(),t)return t.protocol().run(e,r,{bookmark:c.Bookmark.empty(),txConfig:l.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:u,fetchSize:a});throw(0,p.newError)("No connection available")}).catch(function(t){return new f.FailedObserver({error:t,onError:o})}),e,r,n)}},FAILED:{commit:function(t){var e=t.connectionHolder,r=t.onError;t.onComplete;return{result:d(new f.FailedObserver({error:(0,p.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),"COMMIT",{},e),state:a.FAILED}},rollback:function(t){var e=t.connectionHolder;t.onError,t.onComplete;return{result:d(new f.CompletedObserver,"ROLLBACK",{},e),state:a.FAILED}},run:function(t,e,r){var n=r.connectionHolder,o=r.onError;r.onComplete;return d(new f.FailedObserver({error:(0,p.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:o}),t,e,n)}},SUCCEEDED:{commit:function(t){var e=t.connectionHolder,r=t.onError;t.onComplete;return{result:d(new f.FailedObserver({error:(0,p.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{}),state:a.SUCCEEDED,connectionHolder:e}},rollback:function(t){var e=t.connectionHolder,r=t.onError;t.onComplete;return{result:d(new f.FailedObserver({error:(0,p.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{}),state:a.SUCCEEDED,connectionHolder:e}},run:function(t,e,r){var n=r.connectionHolder,o=r.onError;r.onComplete;return d(new f.FailedObserver({error:(0,p.newError)("Cannot run query in this transaction, because it has already been committed."),onError:o}),t,e,n)}},ROLLED_BACK:{commit:function(t){var e=t.connectionHolder,r=t.onError;t.onComplete;return{result:d(new f.FailedObserver({error:(0,p.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},e),state:a.ROLLED_BACK}},rollback:function(t){var e=t.connectionHolder;t.onError,t.onComplete;return{result:d(new f.FailedObserver({error:(0,p.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},e),state:a.ROLLED_BACK}},run:function(t,e,r){var n=r.connectionHolder,o=r.onError;r.onComplete;return d(new f.FailedObserver({error:(0,p.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),t,e,n)}}};function h(r,t,n,o,i,s){var e=t.getConnection().then(function(e){return i(),s.forEach(function(t){return t._cancel()}),Promise.all(s).then(function(t){if(e)return r?e.protocol().commitTransaction({beforeError:n,afterComplete:o}):e.protocol().rollbackTransaction({beforeError:n,afterComplete:o});throw(0,p.newError)("No connection available")})}).catch(function(t){return new f.FailedObserver({error:t,onError:n})});return new u.default(e,r?"COMMIT":"ROLLBACK",{},t)}function d(t,e,r,n){return void 0===n&&(n=i.EMPTY_CONNECTION_HOLDER),new u.default(Promise.resolve(t),e,r,new i.ReadOnlyConnectionHolder(n||i.EMPTY_CONNECTION_HOLDER))}r.default=t},{"./error":57,"./internal/bookmark":61,"./internal/connection-holder":62,"./internal/observers":67,"./internal/tx-config":75,"./internal/util":77,"./result":81}],86:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},{}],87:[function(t,e,r){e.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},e.exports.default=e.exports,e.exports.__esModule=!0},{}],88:[function(t,e,r){e.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},{}],89:[function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}e.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},e.exports.default=e.exports,e.exports.__esModule=!0},{}],90:[function(t,e,r){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},{}],91:[function(t,e,r){var n=t("./setPrototypeOf.js");e.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&&n(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0},{"./setPrototypeOf.js":94}],92:[function(t,e,r){e.exports=function(t){return t&&t.__esModule?t:{default:t}},e.exports.default=e.exports,e.exports.__esModule=!0},{}],93:[function(t,e,r){var n=t("@babel/runtime/helpers/typeof").default,o=t("./assertThisInitialized.js");e.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e},e.exports.default=e.exports,e.exports.__esModule=!0},{"./assertThisInitialized.js":87,"@babel/runtime/helpers/typeof":95}],94:[function(t,r,e){function n(t,e){return r.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r.exports.default=r.exports,r.exports.__esModule=!0,n(t,e)}r.exports=n,r.exports.default=r.exports,r.exports.__esModule=!0},{}],95:[function(t,e,r){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(t){return typeof t}:e.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},{}],96:[function(t,e,r){"use strict";r.byteLength=function(t){var e=l(t),t=e[0],e=e[1];return 3*(t+e)/4-e},r.toByteArray=function(t){var e,r,n=l(t),o=n[0],n=n[1],i=new c(function(t,e){return 3*(t+e)/4-e}(o,n)),s=0,u=0<n?o-4:o;for(r=0;r<u;r+=4)e=a[t.charCodeAt(r)]<<18|a[t.charCodeAt(r+1)]<<12|a[t.charCodeAt(r+2)]<<6|a[t.charCodeAt(r+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=255&e;2===n&&(e=a[t.charCodeAt(r)]<<2|a[t.charCodeAt(r+1)]>>4,i[s++]=255&e);1===n&&(e=a[t.charCodeAt(r)]<<10|a[t.charCodeAt(r+1)]<<4|a[t.charCodeAt(r+2)]>>2,i[s++]=e>>8&255,i[s++]=255&e);return i},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],i=0,s=r-n;i<s;i+=16383)o.push(function(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(function(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}(n));return o.join("")}(t,i,s<i+16383?s:i+16383));1==n?(e=t[r-1],o.push(u[e>>2]+u[e<<4&63]+"==")):2==n&&(e=(t[r-2]<<8)+t[r-1],o.push(u[e>>10]+u[e>>4&63]+u[e<<2&63]+"="));return o.join("")};for(var u=[],a=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=n.length;o<i;++o)u[o]=n[o],a[n.charCodeAt(o)]=o;function l(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");t=t.indexOf("=");return[t=-1===t?e:t,t===e?0:4-t%4]}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],97:[function(A,t,R){!function(t){!function(){"use strict";var u=A("base64-js"),i=A("ieee754");R.Buffer=f,R.SlowBuffer=function(t){+t!=t&&(t=0);return f.alloc(+t)},R.INSPECT_MAX_BYTES=50;var e=2147483647;function o(t){if(e<t)throw new RangeError('The value "'+t+'" is invalid for option "size"');t=new Uint8Array(t);return t.__proto__=f.prototype,t}function f(t,e,r){if("number"!=typeof t)return n(t,e,r);if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return a(t)}function n(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|p(t,e),n=o(r),e=n.write(t,e);e!==r&&(n=n.slice(0,e));return n}(t,e);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(x(t,ArrayBuffer)||t&&x(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');r=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return r.__proto__=f.prototype,r}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);n=function(t){if(f.isBuffer(t)){var e=0|l(t.length),r=o(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(void 0!==t.length)return"number"!=typeof t.length||I(t.length)?o(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function a(t){return s(t),o(t<0?0:0|l(t))}function c(t){for(var e=t.length<0?0:0|l(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function l(t){if(e<=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e.toString(16)+" bytes");return 0|t}function p(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||x(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return T(t).length;default:if(o)return n?-1:j(t).length;e=(""+e).toLowerCase(),o=!0}}function r(t,e,r){var n,o,i,s=!1;if((e=void 0===e||e<0?0:e)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0);(!r||r<0||n<r)&&(r=n);for(var o="",i=e;i<r;++i)o+=function(t){return t<16?"0"+t.toString(16):t.toString(16)}(t[i]);return o}(this,e,r);case"utf8":case"utf-8":return v(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}(this,e,r);case"base64":return n=this,i=r,0===(o=e)&&i===n.length?u.fromByteArray(n):u.fromByteArray(n.slice(o,i));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}(this,e,r);default:if(s)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}}function h(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=I(r=+r)?o?0:t.length-1:r)<0?t.length+r:r)>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,r):b(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,o){var i=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s/=i=2,u/=2,r/=2}function a(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o)for(var c=-1,l=r;l<s;l++)if(a(t,l)===a(e,-1===c?0:l-c)){if(l-(c=-1===c?l:c)+1===u)return c*i}else-1!==c&&(l-=l-c),c=-1;else for(l=r=s<r+u?s-u:r;0<=l;l--){for(var f=!0,p=0;p<u;p++)if(a(t,l+p)!==a(e,p)){f=!1;break}if(f)return l}return-1}function _(t,e,r,n){return C(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function y(t,e,r,n){return C(function(t,e){for(var r,n,o=[],i=0;i<t.length&&!((e-=2)<0);++i)n=t.charCodeAt(i),r=n>>8,n=n%256,o.push(n),o.push(r);return o}(e,t.length-r),t,r,n)}function v(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,u,a,c=t[o],l=null,f=239<c?4:223<c?3:191<c?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&127<(a=(31&c)<<6|63&i)&&(l=a);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&2047<(a=(15&c)<<12|(63&i)<<6|63&s)&&(a<55296||57343<a)&&(l=a);break;case 4:i=t[o+1],s=t[o+2],u=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&u)&&65535<(a=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&u)&&a<1114112&&(l=a)}null===l?(l=65533,f=1):65535<l&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(t){var e=t.length;if(e<=m)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=m));return r}(n)}R.kMaxLength=e,(f.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192,f.from=n,f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,f.alloc=function(t,e,r){return e=e,r=r,s(t=t),!(t<=0)&&void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)},f.allocUnsafe=a,f.allocUnsafeSlow=a,f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,e){if(x(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),x(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);if(void 0===e)for(o=e=0;o<t.length;++o)e+=t[o].length;for(var r=f.allocUnsafe(e),n=0,o=0;o<t.length;++o){var i=t[o];if(x(i,Uint8Array)&&(i=f.from(i)),!f.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,n),n+=i.length}return r},f.byteLength=p,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)h(this,e,e+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)h(this,e,e+3),h(this,e+1,e+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)h(this,e,e+7),h(this,e+1,e+6),h(this,e+2,e+5),h(this,e+3,e+4);return this},f.prototype.toLocaleString=f.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?v(this,0,t):r.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",e=R.INSPECT_MAX_BYTES,t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim();return this.length>e&&(t+=" ... "),"<Buffer "+t+">"},f.prototype.compare=function(t,e,r,n,o){if(x(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),(e=void 0===e?0:e)<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=e)return 0;if(o<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),u=Math.min(i,s),a=this.slice(n,o),c=t.slice(e,r),l=0;l<u;++l)if(a[l]!==c[l]){i=a[l],s=c[l];break}return i<s?-1:s<i?1:0},f.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},f.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)},f.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||o<r)&&(r=o),0<t.length&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var i,s,u,a=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var o=t.length-r;(!n||o<(n=Number(n)))&&(n=o),(o=e.length)/2<n&&(n=o/2);for(var i=0;i<n;++i){var s=parseInt(e.substr(2*i,2),16);if(I(s))return i;t[r+i]=s}return i}(this,t,e,r);case"utf8":case"utf-8":return s=e,u=r,C(j(t,(i=this).length-s),i,s,u);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return i=this,s=e,u=r,C(T(t),i,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var m=4096;function g(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(r<t+e)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,o,i){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<e||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function w(t,e,r,n){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function S(t,e,r,n,o){return e=+e,r>>>=0,o||w(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function E(t,e,r,n,o){return e=+e,r>>>=0,o||w(t,0,r,8),i.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r);e=this.subarray(t,e=e<t?t:e);return e.__proto__=f.prototype,e},f.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||g(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},f.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||g(t,e,this.length);for(var n=this[t+--e],o=1;0<e&&(o*=256);)n+=this[t+--e]*o;return n},f.prototype.readUInt8=function(t,e){return t>>>=0,e||g(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||g(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||g(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||g(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||g(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||g(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return(o*=128)<=n&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||g(t,e,this.length);for(var n=e,o=1,i=this[t+--n];0<n&&(o*=256);)i+=this[t+--n]*o;return(o*=128)<=i&&(i-=Math.pow(2,8*e)),i},f.prototype.readInt8=function(t,e){return t>>>=0,e||g(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||g(t,2,this.length);t=this[t]|this[t+1]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt16BE=function(t,e){t>>>=0,e||g(t,2,this.length);t=this[t+1]|this[t]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||g(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||g(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return t>>>=0,e||g(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||g(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||g(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||g(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},f.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeIntLE=function(t,e,r,n){t=+t,e>>>=0,n||O(this,t,e,r,(n=Math.pow(2,8*r-1))-1,-n);var o=0,i=1,s=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/i>>0)-s&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){t=+t,e>>>=0,n||O(this,t,e,r,(n=Math.pow(2,8*r-1))-1,-n);var o=r-1,i=1,s=0;for(this[e+o]=255&t;0<=--o&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i>>0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,127,-128),this[e]=255&(t=t<0?255+t+1:t),e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),this[e]=(t=t<0?4294967295+t+1:t)>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeFloatLE=function(t,e,r){return S(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return S(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return E(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return E(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),e>=t.length&&(e=t.length),(n=0<n&&n<r?r:n)===r)return 0;if(0===t.length||0===this.length)return 0;if((e=e||0)<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var o=(n=t.length-e<n-r?t.length-e+r:n)-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var i=o-1;0<=i;--i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return o},f.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o;1===t.length&&(o=t.charCodeAt(0),("utf8"===n&&o<128||"latin1"===n)&&(t=o))}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(t=t||0))for(i=e;i<r;++i)this[i]=t;else{var s=f.isBuffer(t)?t:f.from(t,n),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=s[i%u]}return this};var P=/[^+/0-9A-Za-z-_]/g;function j(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],s=0;s<n;++s){if(55295<(r=t.charCodeAt(s))&&r<57344){if(!o){if(56319<r){-1<(e-=3)&&i.push(239,191,189);continue}if(s+1===n){-1<(e-=3)&&i.push(239,191,189);continue}o=r;continue}if(r<56320){-1<(e-=3)&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&-1<(e-=3)&&i.push(239,191,189);if(o=null,r<128){if(--e<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function T(t){return u.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function C(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function x(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function I(t){return t!=t}}.call(this)}.call(this,A("buffer").Buffer)},{"base64-js":96,buffer:97,ieee754:98}],98:[function(t,e,r){r.read=function(t,e,r,n,o){var i,s,u=8*o-n-1,a=(1<<u)-1,c=a>>1,l=-7,f=r?o-1:0,p=r?-1:1,r=t[e+f];for(f+=p,i=r&(1<<-l)-1,r>>=-l,l+=u;0<l;i=256*i+t[e+f],f+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;0<l;s=256*s+t[e+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===a)return s?NaN:1/0*(r?-1:1);s+=Math.pow(2,n),i-=c}return(r?-1:1)*s*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var s,u,a=8*i-o-1,c=(1<<a)-1,l=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,i=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(n=Math.pow(2,-s))<1&&(s--,n*=2),2<=(e+=1<=s+l?f/n:f*Math.pow(2,1-l))*n&&(s++,n/=2),c<=s+l?(u=0,s=c):1<=s+l?(u=(e*n-1)*Math.pow(2,o),s+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,o),s=0));8<=o;t[r+p]=255&u,p+=h,u/=256,o-=8);for(s=s<<o|u,a+=o;0<a;t[r+p]=255&s,p+=h,s/=256,a-=8);t[r+p-h]|=128*i}},{}],99:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./internal/Observable");r.Observable=n.Observable;n=t("./internal/observable/ConnectableObservable");r.ConnectableObservable=n.ConnectableObservable;n=t("./internal/operators/groupBy");r.GroupedObservable=n.GroupedObservable;n=t("./internal/symbol/observable");r.observable=n.observable;n=t("./internal/Subject");r.Subject=n.Subject;n=t("./internal/BehaviorSubject");r.BehaviorSubject=n.BehaviorSubject;n=t("./internal/ReplaySubject");r.ReplaySubject=n.ReplaySubject;n=t("./internal/AsyncSubject");r.AsyncSubject=n.AsyncSubject;n=t("./internal/scheduler/asap");r.asap=n.asap,r.asapScheduler=n.asapScheduler;n=t("./internal/scheduler/async");r.async=n.async,r.asyncScheduler=n.asyncScheduler;n=t("./internal/scheduler/queue");r.queue=n.queue,r.queueScheduler=n.queueScheduler;n=t("./internal/scheduler/animationFrame");r.animationFrame=n.animationFrame,r.animationFrameScheduler=n.animationFrameScheduler;n=t("./internal/scheduler/VirtualTimeScheduler");r.VirtualTimeScheduler=n.VirtualTimeScheduler,r.VirtualAction=n.VirtualAction;n=t("./internal/Scheduler");r.Scheduler=n.Scheduler;n=t("./internal/Subscription");r.Subscription=n.Subscription;n=t("./internal/Subscriber");r.Subscriber=n.Subscriber;n=t("./internal/Notification");r.Notification=n.Notification,r.NotificationKind=n.NotificationKind;n=t("./internal/util/pipe");r.pipe=n.pipe;n=t("./internal/util/noop");r.noop=n.noop;n=t("./internal/util/identity");r.identity=n.identity;n=t("./internal/util/isObservable");r.isObservable=n.isObservable;n=t("./internal/util/ArgumentOutOfRangeError");r.ArgumentOutOfRangeError=n.ArgumentOutOfRangeError;n=t("./internal/util/EmptyError");r.EmptyError=n.EmptyError;n=t("./internal/util/ObjectUnsubscribedError");r.ObjectUnsubscribedError=n.ObjectUnsubscribedError;n=t("./internal/util/UnsubscriptionError");r.UnsubscriptionError=n.UnsubscriptionError;n=t("./internal/util/TimeoutError");r.TimeoutError=n.TimeoutError;n=t("./internal/observable/bindCallback");r.bindCallback=n.bindCallback;n=t("./internal/observable/bindNodeCallback");r.bindNodeCallback=n.bindNodeCallback;n=t("./internal/observable/combineLatest");r.combineLatest=n.combineLatest;n=t("./internal/observable/concat");r.concat=n.concat;n=t("./internal/observable/defer");r.defer=n.defer;n=t("./internal/observable/empty");r.empty=n.empty;n=t("./internal/observable/forkJoin");r.forkJoin=n.forkJoin;n=t("./internal/observable/from");r.from=n.from;n=t("./internal/observable/fromEvent");r.fromEvent=n.fromEvent;n=t("./internal/observable/fromEventPattern");r.fromEventPattern=n.fromEventPattern;n=t("./internal/observable/generate");r.generate=n.generate;n=t("./internal/observable/iif");r.iif=n.iif;n=t("./internal/observable/interval");r.interval=n.interval;n=t("./internal/observable/merge");r.merge=n.merge;n=t("./internal/observable/never");r.never=n.never;n=t("./internal/observable/of");r.of=n.of;n=t("./internal/observable/onErrorResumeNext");r.onErrorResumeNext=n.onErrorResumeNext;n=t("./internal/observable/pairs");r.pairs=n.pairs;n=t("./internal/observable/partition");r.partition=n.partition;n=t("./internal/observable/race");r.race=n.race;n=t("./internal/observable/range");r.range=n.range;n=t("./internal/observable/throwError");r.throwError=n.throwError;n=t("./internal/observable/timer");r.timer=n.timer;n=t("./internal/observable/using");r.using=n.using;n=t("./internal/observable/zip");r.zip=n.zip;n=t("./internal/scheduled/scheduled");r.scheduled=n.scheduled;n=t("./internal/observable/empty");r.EMPTY=n.EMPTY;n=t("./internal/observable/never");r.NEVER=n.NEVER;t=t("./internal/config");r.config=t.config},{"./internal/AsyncSubject":100,"./internal/BehaviorSubject":101,"./internal/Notification":103,"./internal/Observable":104,"./internal/ReplaySubject":107,"./internal/Scheduler":108,"./internal/Subject":109,"./internal/Subscriber":111,"./internal/Subscription":112,"./internal/config":113,"./internal/observable/ConnectableObservable":115,"./internal/observable/bindCallback":117,"./internal/observable/bindNodeCallback":118,"./internal/observable/combineLatest":119,"./internal/observable/concat":120,"./internal/observable/defer":121,"./internal/observable/empty":122,"./internal/observable/forkJoin":123,"./internal/observable/from":124,"./internal/observable/fromEvent":126,"./internal/observable/fromEventPattern":127,"./internal/observable/generate":128,"./internal/observable/iif":129,"./internal/observable/interval":130,"./internal/observable/merge":131,"./internal/observable/never":132,"./internal/observable/of":133,"./internal/observable/onErrorResumeNext":134,"./internal/observable/pairs":135,"./internal/observable/partition":136,"./internal/observable/race":137,"./internal/observable/range":138,"./internal/observable/throwError":139,"./internal/observable/timer":140,"./internal/observable/using":141,"./internal/observable/zip":142,"./internal/operators/groupBy":178,"./internal/scheduled/scheduled":250,"./internal/scheduler/VirtualTimeScheduler":260,"./internal/scheduler/animationFrame":261,"./internal/scheduler/asap":262,"./internal/scheduler/async":263,"./internal/scheduler/queue":264,"./internal/symbol/observable":266,"./internal/util/ArgumentOutOfRangeError":268,"./internal/util/EmptyError":269,"./internal/util/ObjectUnsubscribedError":271,"./internal/util/TimeoutError":272,"./internal/util/UnsubscriptionError":273,"./internal/util/identity":276,"./internal/util/isObservable":285,"./internal/util/noop":288,"./internal/util/pipe":290}],100:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Subject"),u=t("./Subscription"),o=(i=s.Subject,o(a,i),a.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),u.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),u.Subscription.EMPTY):i.prototype._subscribe.call(this,t)},a.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},a.prototype.error=function(t){this.hasCompleted||i.prototype.error.call(this,t)},a.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&i.prototype.next.call(this,this.value),i.prototype.complete.call(this)},a);function a(){var t=null!==i&&i.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}r.AsyncSubject=o},{"./Subject":109,"./Subscription":112}],101:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Subject"),u=t("./util/ObjectUnsubscribedError"),o=(i=s.Subject,o(a,i),Object.defineProperty(a.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),a.prototype._subscribe=function(t){var e=i.prototype._subscribe.call(this,t);return e&&!e.closed&&t.next(this._value),e},a.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new u.ObjectUnsubscribedError;return this._value},a.prototype.next=function(t){i.prototype.next.call(this,this._value=t)},a);function a(t){var e=i.call(this)||this;return e._value=t,e}r.BehaviorSubject=o},{"./Subject":109,"./util/ObjectUnsubscribedError":271}],102:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./Subscriber"),o=(i=t.Subscriber,o(s,i),s.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},s.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},s.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},s);function s(t,e,r){var n=i.call(this)||this;return n.parent=t,n.outerValue=e,n.outerIndex=r,n.index=0,n}r.InnerSubscriber=o},{"./Subscriber":111}],103:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./observable/empty"),o=t("./observable/of"),i=t("./observable/throwError");(t=r.NotificationKind||(r.NotificationKind={})).NEXT="N",t.ERROR="E",t.COMPLETE="C";s.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()}},s.prototype.do=function(t,e,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}},s.prototype.accept=function(t,e,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,r)},s.prototype.toObservable=function(){switch(this.kind){case"N":return o.of(this.value);case"E":return i.throwError(this.error);case"C":return n.empty()}throw new Error("unexpected notification kind value")},s.createNext=function(t){return void 0!==t?new s("N",t):s.undefinedValueNotification},s.createError=function(t){return new s("E",void 0,t)},s.createComplete=function(){return s.completeNotification},s.completeNotification=new s("C"),s.undefinedValueNotification=new s("N",void 0),t=s;function s(t,e,r){this.kind=t,this.value=e,this.error=r,this.hasValue="N"===t}r.Notification=t},{"./observable/empty":122,"./observable/of":133,"./observable/throwError":139}],104:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./util/canReportError"),o=t("./util/toSubscriber"),i=t("./symbol/observable"),s=t("./util/pipe"),u=t("./config"),i=(a.prototype.lift=function(t){var e=new a;return e.source=this,e.operator=t,e},a.prototype.subscribe=function(t,e,r){var n=this.operator,r=o.toSubscriber(t,e,r);if(n?r.add(n.call(r,this.source)):r.add(this.source||u.config.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),u.config.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r},a.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){u.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},a.prototype.forEach=function(n,t){var o=this;return new(t=c(t))(function(t,e){var r=o.subscribe(function(t){try{n(t)}catch(t){e(t),r&&r.unsubscribe()}},e,t)})},a.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},a.prototype[i.observable]=function(){return this},a.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:s.pipeFromArray(t)(this)},a.prototype.toPromise=function(t){var n=this;return new(t=c(t))(function(t,e){var r;n.subscribe(function(t){return r=t},function(t){return e(t)},function(){return t(r)})})},a.create=function(t){return new a(t)},a);function a(t){this._isScalar=!1,t&&(this._subscribe=t)}function c(t){if(!(t=t||(u.config.Promise||Promise)))throw new Error("no Promise impl found");return t}r.Observable=i},{"./config":113,"./symbol/observable":266,"./util/canReportError":274,"./util/pipe":290,"./util/toSubscriber":297}],105:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./config"),o=t("./util/hostReportError");r.empty={closed:!0,next:function(t){},error:function(t){if(n.config.useDeprecatedSynchronousErrorHandling)throw t;o.hostReportError(t)},complete:function(){}}},{"./config":113,"./util/hostReportError":275}],106:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./Subscriber"),o=(i=t.Subscriber,o(s,i),s.prototype.notifyNext=function(t,e,r,n,o){this.destination.next(e)},s.prototype.notifyError=function(t,e){this.destination.error(t)},s.prototype.notifyComplete=function(t){this.destination.complete()},s);function s(){return null!==i&&i.apply(this,arguments)||this}r.OuterSubscriber=o},{"./Subscriber":111}],107:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Subject"),u=t("./scheduler/queue"),a=t("./Subscription"),c=t("./operators/observeOn"),l=t("./util/ObjectUnsubscribedError"),f=t("./SubjectSubscription"),o=(i=s.Subject,o(p,i),p.prototype.nextInfiniteTimeWindow=function(t){var e;this.isStopped||((e=this._events).push(t),e.length>this._bufferSize&&e.shift()),i.prototype.next.call(this,t)},p.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new h(this._getNow(),t)),this._trimBufferThenGetEvents()),i.prototype.next.call(this,t)},p.prototype._subscribe=function(t){var e,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new l.ObjectUnsubscribedError;if(e=this.isStopped||this.hasError?a.Subscription.EMPTY:(this.observers.push(t),new f.SubjectSubscription(this,t)),o&&t.add(t=new c.ObserveOnSubscriber(t,o)),r)for(var s=0;s<i&&!t.closed;s++)t.next(n[s]);else for(s=0;s<i&&!t.closed;s++)t.next(n[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},p.prototype._getNow=function(){return(this.scheduler||u.queue).now()},p.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(t-n[i].time<r);)i++;return 0<(i=e<o?Math.max(i,o-e):i)&&n.splice(0,i),n},p);function p(t,e,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===e&&(e=Number.POSITIVE_INFINITY);var n=i.call(this)||this;return n.scheduler=r,n._events=[],n._infiniteTimeWindow=!1,n._bufferSize=t<1?1:t,n._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(n._infiniteTimeWindow=!0,n.next=n.nextInfiniteTimeWindow):n.next=n.nextTimeWindow,n}r.ReplaySubject=o;var h=function(t,e){this.time=t,this.value=e}},{"./Subject":109,"./SubjectSubscription":110,"./Subscription":112,"./operators/observeOn":193,"./scheduler/queue":264,"./util/ObjectUnsubscribedError":271}],108:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},o.now=function(){return Date.now()},o);function o(t,e){void 0===e&&(e=o.now),this.SchedulerAction=t,this.now=e}r.Scheduler=n},{}],109:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Observable"),u=t("./Subscriber"),a=t("./Subscription"),c=t("./util/ObjectUnsubscribedError"),l=t("./SubjectSubscription"),t=t("../internal/symbol/rxSubscriber"),f=(i=u.Subscriber,o(p,i),p);function p(t){var e=i.call(this,t)||this;return e.destination=t,e}r.SubjectSubscriber=f;var h,t=(h=s.Observable,o(d,h),d.prototype[t.rxSubscriber]=function(){return new f(this)},d.prototype.lift=function(t){var e=new _(this,this);return e.operator=t,e},d.prototype.next=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,r=e.length,n=e.slice(),o=0;o<r;o++)n[o].next(t)},d.prototype.error=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,r=e.length,n=e.slice(),o=0;o<r;o++)n[o].error(t);this.observers.length=0},d.prototype.complete=function(){if(this.closed)throw new c.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,r=t.slice(),n=0;n<e;n++)r[n].complete();this.observers.length=0},d.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},d.prototype._trySubscribe=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;return h.prototype._trySubscribe.call(this,t)},d.prototype._subscribe=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.isStopped?(t.complete(),a.Subscription.EMPTY):(this.observers.push(t),new l.SubjectSubscription(this,t))},d.prototype.asObservable=function(){var t=new s.Observable;return t.source=this,t},d.create=function(t,e){return new _(t,e)},d);function d(){var t=h.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}r.Subject=t;var b,_=(o(y,b=t),y.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},y.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},y.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},y.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):a.Subscription.EMPTY},y);function y(t,e){var r=b.call(this)||this;return r.destination=t,r.source=e,r}r.AnonymousSubject=_},{"../internal/symbol/rxSubscriber":267,"./Observable":104,"./SubjectSubscription":110,"./Subscriber":111,"./Subscription":112,"./util/ObjectUnsubscribedError":271}],110:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./Subscription"),o=(i=t.Subscription,o(s,i),s.prototype.unsubscribe=function(){var t,e;this.closed||(this.closed=!0,t=(e=this.subject).observers,this.subject=null,!t||0===t.length||e.isStopped||e.closed||-1!==(e=t.indexOf(this.subscriber))&&t.splice(e,1))},s);function s(t,e){var r=i.call(this)||this;return r.subject=t,r.subscriber=e,r.closed=!1,r}r.SubjectSubscription=o},{"./Subscription":112}],111:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./util/isFunction"),u=t("./Observer"),a=t("./Subscription"),c=t("../internal/symbol/rxSubscriber"),l=t("./config"),f=t("./util/hostReportError"),c=(i=a.Subscription,o(p,i),p.prototype[c.rxSubscriber]=function(){return this},p.create=function(t,e,r){r=new p(t,e,r);return r.syncErrorThrowable=!1,r},p.prototype.next=function(t){this.isStopped||this._next(t)},p.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},p.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},p.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this))},p.prototype._next=function(t){this.destination.next(t)},p.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},p.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},p.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},p);function p(t,e,r){var n=i.call(this)||this;switch(n.syncErrorValue=null,n.syncErrorThrown=!1,n.syncErrorThrowable=!1,n.isStopped=!1,arguments.length){case 0:n.destination=u.empty;break;case 1:if(!t){n.destination=u.empty;break}if("object"==typeof t){t instanceof p?(n.syncErrorThrowable=t.syncErrorThrowable,(n.destination=t).add(n)):(n.syncErrorThrowable=!0,n.destination=new d(n,t));break}default:n.syncErrorThrowable=!0,n.destination=new d(n,t,e,r)}return n}r.Subscriber=c;var h,d=(o(b,h=c),b.prototype.next=function(t){var e;!this.isStopped&&this._next&&(e=this._parentSubscriber,l.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t))},b.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,r=l.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&e.syncErrorThrowable?this.__tryOrSetError(e,this._error,t):this.__tryOrUnsub(this._error,t),this.unsubscribe();else if(e.syncErrorThrowable)r?(e.syncErrorValue=t,e.syncErrorThrown=!0):f.hostReportError(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;f.hostReportError(t)}}},b.prototype.complete=function(){var t,e,r=this;this.isStopped||(t=this._parentSubscriber,this._complete&&(e=function(){return r._complete.call(r._context)},l.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,e):this.__tryOrUnsub(e)),this.unsubscribe())},b.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),l.config.useDeprecatedSynchronousErrorHandling)throw t;f.hostReportError(t)}},b.prototype.__tryOrSetError=function(e,t,r){if(!l.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(t){return l.config.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0):(f.hostReportError(t),!0)}return!1},b.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},b);function b(t,e,r,n){var o,i=h.call(this)||this;i._parentSubscriber=t;t=i;return s.isFunction(e)?o=e:e&&(o=e.next,r=e.error,n=e.complete,e!==u.empty&&(t=Object.create(e),s.isFunction(t.unsubscribe)&&i.add(t.unsubscribe.bind(t)),t.unsubscribe=i.unsubscribe.bind(i))),i._context=t,i._next=o,i._error=r,i._complete=n,i}r.SafeSubscriber=d},{"../internal/symbol/rxSubscriber":267,"./Observer":105,"./Subscription":112,"./config":113,"./util/hostReportError":275,"./util/isFunction":280}],112:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=t("./util/isArray"),c=t("./util/isObject"),l=t("./util/isFunction"),f=t("./util/UnsubscriptionError"),t=(p.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this._parentOrParents,r=this._ctorUnsubscribe,n=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof p)t.remove(this);else if(null!==t)for(var i=0;i<t.length;++i)t[i].remove(this);if(l.isFunction(n)){r&&(this._unsubscribe=void 0);try{n.call(this)}catch(t){e=t instanceof f.UnsubscriptionError?h(t.errors):[t]}}if(a.isArray(o))for(var i=-1,s=o.length;++i<s;){var u=o[i];if(c.isObject(u))try{u.unsubscribe()}catch(t){e=e||[],t instanceof f.UnsubscriptionError?e=e.concat(h(t.errors)):e.push(t)}}if(e)throw new f.UnsubscriptionError(e)}},p.prototype.add=function(t){var e,r=t;if(!t)return p.EMPTY;switch(typeof t){case"function":r=new p(t);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;r instanceof p||(e=r,(r=new p)._subscriptions=[e]);break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var n=r._parentOrParents;if(null===n)r._parentOrParents=this;else if(n instanceof p){if(n===this)return r;r._parentOrParents=[n,this]}else{if(-1!==n.indexOf(this))return r;n.push(this)}n=this._subscriptions;return null===n?this._subscriptions=[r]:n.push(r),r},p.prototype.remove=function(t){var e=this._subscriptions;!e||-1!==(t=e.indexOf(t))&&e.splice(t,1)},p.EMPTY=((t=new p).closed=!0,t),p);function p(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}function h(t){return t.reduce(function(t,e){return t.concat(e instanceof f.UnsubscriptionError?e.errors:e)},[])}r.Subscription=t},{"./util/UnsubscriptionError":273,"./util/isArray":277,"./util/isFunction":280,"./util/isObject":284}],113:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=!1;r.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){var e;t?(e=new Error,console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)):n&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),n=t},get useDeprecatedSynchronousErrorHandling(){return n}}},{}],114:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Subscriber"),u=t("./Observable"),a=t("./util/subscribeTo"),t=(i=s.Subscriber,o(c,i),c.prototype._next=function(t){this.parent.notifyNext(t)},c.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},c.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},c);function c(t){var e=i.call(this)||this;return e.parent=t,e}r.SimpleInnerSubscriber=t;var l,t=(l=s.Subscriber,o(f,l),f.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this)},f.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},f.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},f);function f(t,e,r){var n=l.call(this)||this;return n.parent=t,n.outerValue=e,n.outerIndex=r,n}r.ComplexInnerSubscriber=t;var p,t=(p=s.Subscriber,o(h,p),h.prototype.notifyNext=function(t){this.destination.next(t)},h.prototype.notifyError=function(t){this.destination.error(t)},h.prototype.notifyComplete=function(){this.destination.complete()},h);function h(){return null!==p&&p.apply(this,arguments)||this}r.SimpleOuterSubscriber=t;var d,o=(d=s.Subscriber,o(b,d),b.prototype.notifyNext=function(t,e,r,n){this.destination.next(e)},b.prototype.notifyError=function(t){this.destination.error(t)},b.prototype.notifyComplete=function(t){this.destination.complete()},b);function b(){return null!==d&&d.apply(this,arguments)||this}r.ComplexOuterSubscriber=o,r.innerSubscribe=function(t,e){if(!e.closed){if(t instanceof u.Observable)return t.subscribe(e);var r;try{r=a.subscribeTo(t)(e)}catch(t){e.error(t)}return r}}},{"./Observable":104,"./Subscriber":111,"./util/subscribeTo":291}],115:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../Subject"),u=t("../Observable"),a=t("../Subscriber"),c=t("../Subscription"),l=t("../operators/refCount"),u=(i=u.Observable,o(f,i),f.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},f.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},f.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new c.Subscription).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=c.Subscription.EMPTY)),t},f.prototype.refCount=function(){return l.refCount()(this)},f);function f(t,e){var r=i.call(this)||this;return r.source=t,r.subjectFactory=e,r._refCount=0,r._isComplete=!1,r}r.ConnectableObservable=u,r.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(u=u.prototype)._subscribe},_isComplete:{value:u._isComplete,writable:!0},getSubject:{value:u.getSubject},connect:{value:u.connect},refCount:{value:u.refCount}};var p,h=(p=s.SubjectSubscriber,o(d,p),d.prototype._error=function(t){this._unsubscribe(),p.prototype._error.call(this,t)},d.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),p.prototype._complete.call(this)},d.prototype._unsubscribe=function(){var t,e=this.connectable;e&&(this.connectable=null,t=e._connection,e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe())},d);function d(t,e){t=p.call(this,t)||this;return t.connectable=e,t}b.prototype.call=function(t,e){var r=this.connectable;r._refCount++;t=new y(t,r),e=e.subscribe(t);return t.closed||(t.connection=r.connect()),e};function b(t){this.connectable=t}var _,y=(_=a.Subscriber,o(v,_),v.prototype._unsubscribe=function(){var t,e=this.connectable;e?(this.connectable=null,(t=e._refCount)<=0?this.connection=null:(e._refCount=t-1,1<t?this.connection=null:(t=this.connection,e=e._connection,this.connection=null,!e||t&&e!==t||e.unsubscribe()))):this.connection=null},v);function v(t,e){t=_.call(this,t)||this;return t.connectable=e,t}},{"../Observable":104,"../Subject":109,"../Subscriber":111,"../Subscription":112,"../operators/refCount":204}],116:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../Observable"),u=t("../scheduler/asap"),a=t("../util/isNumeric"),o=(i=s.Observable,o(c,i),c.create=function(t,e,r){return new c(t,e=void 0===e?0:e,r=void 0===r?u.asap:r)},c.dispatch=function(t){var e=t.source,t=t.subscriber;return this.add(e.subscribe(t))},c.prototype._subscribe=function(t){var e=this.delayTime,r=this.source;return this.scheduler.schedule(c.dispatch,e,{source:r,subscriber:t})},c);function c(t,e,r){void 0===e&&(e=0),void 0===r&&(r=u.asap);var n=i.call(this)||this;return n.source=t,n.delayTime=e,n.scheduler=r,(!a.isNumeric(e)||e<0)&&(n.delayTime=0),r&&"function"==typeof r.schedule||(n.scheduler=u.asap),n}r.SubscribeOnObservable=o},{"../Observable":104,"../scheduler/asap":262,"../util/isNumeric":283}],117:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=t("../Observable"),a=t("../AsyncSubject"),o=t("../operators/map"),c=t("../util/canReportError"),l=t("../util/isArray"),f=t("../util/isScheduler");function p(t){var n=this,e=t.args,r=t.subscriber,o=t.params,i=o.callbackFunc,t=o.context,s=o.scheduler;if(!(u=o.subject)){var u=o.subject=new a.AsyncSubject;try{i.apply(t,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.length<=1?t[0]:t;n.add(s.schedule(h,0,{value:r,subject:u}))}]))}catch(t){u.error(t)}}this.add(u.subscribe(r))}function h(t){var e=t.value,t=t.subject;t.next(e),t.complete()}r.bindCallback=function r(i,n,s){if(n){if(!f.isScheduler(n))return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(i,s).apply(void 0,t).pipe(o.map(function(t){return l.isArray(t)?n.apply(void 0,t):n(t)}))};s=n}return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r,n=this,o={context:n,subject:r,callbackFunc:i,scheduler:s};return new u.Observable(function(t){if(s)return s.schedule(p,0,{args:e,subscriber:t,params:o});if(!r){r=new a.AsyncSubject;try{i.apply(n,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];r.next(t.length<=1?t[0]:t),r.complete()}]))}catch(t){c.canReportError(r)?r.error(t):console.warn(t)}}return r.subscribe(t)})}}},{"../AsyncSubject":100,"../Observable":104,"../operators/map":182,"../util/canReportError":274,"../util/isArray":277,"../util/isScheduler":287}],118:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=t("../Observable"),a=t("../AsyncSubject"),o=t("../operators/map"),c=t("../util/canReportError"),l=t("../util/isScheduler"),f=t("../util/isArray");function p(t){var n=this,e=t.params,r=t.subscriber,o=t.context,i=e.callbackFunc,t=e.args,s=e.scheduler;if(!(u=e.subject)){var u=e.subject=new a.AsyncSubject;try{i.apply(o,t.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.shift();r?n.add(s.schedule(d,0,{err:r,subject:u})):(r=t.length<=1?t[0]:t,n.add(s.schedule(h,0,{value:r,subject:u})))}]))}catch(t){this.add(s.schedule(d,0,{err:t,subject:u}))}}this.add(u.subscribe(r))}function h(t){var e=t.value,t=t.subject;t.next(e),t.complete()}function d(t){var e=t.err;t.subject.error(e)}r.bindNodeCallback=function r(i,n,s){if(n){if(!l.isScheduler(n))return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(i,s).apply(void 0,t).pipe(o.map(function(t){return f.isArray(t)?n.apply(void 0,t):n(t)}))};s=n}return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var o={subject:void 0,args:r,callbackFunc:i,scheduler:s,context:this};return new u.Observable(function(t){var e=o.context,n=o.subject;if(s)return s.schedule(p,0,{params:o,subscriber:t,context:e});if(!n){n=o.subject=new a.AsyncSubject;try{i.apply(e,r.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.shift();r?n.error(r):(n.next(t.length<=1?t[0]:t),n.complete())}]))}catch(t){c.canReportError(n)?n.error(t):console.warn(t)}}return n.subscribe(t)})}}},{"../AsyncSubject":100,"../Observable":104,"../operators/map":182,"../util/canReportError":274,"../util/isArray":277,"../util/isScheduler":287}],119:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../util/isScheduler"),s=t("../util/isArray"),u=t("../OuterSubscriber"),a=t("../util/subscribeToResult"),c=t("./fromArray"),l={};r.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=void 0,n=void 0;return i.isScheduler(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(r=t.pop()),1===t.length&&s.isArray(t[0])&&(t=t[0]),c.fromArray(t,n).lift(new f(r))};var f=(p.prototype.call=function(t,e){return e.subscribe(new d(t,this.resultSelector))},p);function p(t){this.resultSelector=t}r.CombineLatestOperator=f;var h,d=(h=u.OuterSubscriber,o(b,h),b.prototype._next=function(t){this.values.push(l),this.observables.push(t)},b.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var r=0;r<e;r++){var n=t[r];this.add(a.subscribeToResult(this,n,void 0,r))}}},b.prototype.notifyComplete=function(t){0==--this.active&&this.destination.complete()},b.prototype.notifyNext=function(t,e,r){var n=this.values,o=n[r],o=this.toRespond?o===l?--this.toRespond:this.toRespond:0;n[r]=e,0===o&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},b.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},b);function b(t,e){t=h.call(this,t)||this;return t.resultSelector=e,t.active=0,t.values=[],t.observables=[],t}r.CombineLatestSubscriber=d},{"../OuterSubscriber":106,"../util/isArray":277,"../util/isScheduler":287,"../util/subscribeToResult":296,"./fromArray":125}],120:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./of"),o=t("../operators/concatAll");r.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.concatAll()(n.of.apply(void 0,t))}},{"../operators/concatAll":154,"./of":133}],121:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),o=t("./from"),i=t("./empty");r.defer=function(r){return new n.Observable(function(e){var t;try{t=r()}catch(t){return void e.error(t)}return(t?o.from(t):i.empty()).subscribe(e)})}},{"../Observable":104,"./empty":122,"./from":124}],122:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable");r.EMPTY=new n.Observable(function(t){return t.complete()}),r.empty=function(t){return t?(e=t,new n.Observable(function(t){return e.schedule(function(){return t.complete()})})):r.EMPTY;var e}},{"../Observable":104}],123:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),i=t("../util/isArray"),s=t("../operators/map"),u=t("../util/isObject"),l=t("./from");function a(a,c){return new n.Observable(function(n){var o=a.length;if(0!==o)for(var i=new Array(o),s=0,u=0,t=0;t<o;t++)!function(e){var t=l.from(a[e]),r=!1;n.add(t.subscribe({next:function(t){r||(r=!0,u++),i[e]=t},error:function(t){return n.error(t)},complete:function(){++s!==o&&r||(u===o&&n.next(c?c.reduce(function(t,e,r){return t[e]=i[r],t},{}):i),n.complete())}}))}(t);else n.complete()})}r.forkJoin=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var r=t[0];if(i.isArray(r))return a(r,null);if(u.isObject(r)&&Object.getPrototypeOf(r)===Object.prototype){var n=Object.keys(r);return a(n.map(function(t){return r[t]}),n)}}if("function"!=typeof t[t.length-1])return a(t,null);var o=t.pop();return a(t=1===t.length&&i.isArray(t[0])?t[0]:t,null).pipe(s.map(function(t){return o.apply(void 0,t)}))}},{"../Observable":104,"../operators/map":182,"../util/isArray":277,"../util/isObject":284,"./from":124}],124:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),o=t("../util/subscribeTo"),i=t("../scheduled/scheduled");r.from=function(t,e){return e?i.scheduled(t,e):t instanceof n.Observable?t:new n.Observable(o.subscribeTo(t))}},{"../Observable":104,"../scheduled/scheduled":250,"../util/subscribeTo":291}],125:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),o=t("../util/subscribeToArray"),i=t("../scheduled/scheduleArray");r.fromArray=function(t,e){return e?i.scheduleArray(t,e):new n.Observable(o.subscribeToArray(t))}},{"../Observable":104,"../scheduled/scheduleArray":246,"../util/subscribeToArray":292}],126:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../util/isArray"),u=t("../util/isFunction"),a=t("../operators/map");Object.prototype.toString;function p(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}function h(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}function d(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}r.fromEvent=function t(r,n,o,e){return u.isFunction(o)&&(e=o,o=void 0),e?t(r,n,o).pipe(a.map(function(t){return s.isArray(t)?e.apply(void 0,t):e(t)})):new i.Observable(function(e){!function t(e,r,n,o,i){var s;if(d(e)){var u=e;e.addEventListener(r,n,i),s=function(){return u.removeEventListener(r,n,i)}}else if(h(e)){var a=e;e.on(r,n),s=function(){return a.off(r,n)}}else if(p(e)){var c=e;e.addListener(r,n),s=function(){return c.removeListener(r,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,f=e.length;l<f;l++)t(e[l],r,n,o,i)}o.add(s)}(r,n,function(t){1<arguments.length?e.next(Array.prototype.slice.call(arguments)):e.next(t)},e,o)})}},{"../Observable":104,"../operators/map":182,"../util/isArray":277,"../util/isFunction":280}],127:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../util/isArray"),u=t("../util/isFunction"),a=t("../operators/map");r.fromEventPattern=function t(n,o,e){return e?t(n,o).pipe(a.map(function(t){return s.isArray(t)?e.apply(void 0,t):e(t)})):new i.Observable(function(r){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.next(1===t.length?t[0]:t)}var e;try{e=n(t)}catch(t){return void r.error(t)}if(u.isFunction(o))return function(){return o(t,e)}})}},{"../Observable":104,"../operators/map":182,"../util/isArray":277,"../util/isFunction":280}],128:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=t("../Observable"),c=t("../util/identity"),l=t("../util/isScheduler");function f(t){var e,r=t.subscriber,n=t.condition;if(!r.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void r.error(t)}else t.needIterate=!0;if(n){var o=void 0;try{o=n(t.state)}catch(t){return void r.error(t)}if(!o)return void r.complete();if(r.closed)return}try{e=t.resultSelector(t.state)}catch(t){return void r.error(t)}if(!r.closed&&(r.next(e),!r.closed))return this.schedule(t)}}r.generate=function(t,n,o,e,i){var s,u;return 1==arguments.length?(u=t.initialState,n=t.condition,o=t.iterate,s=t.resultSelector||c.identity,i=t.scheduler):void 0===e||l.isScheduler(e)?(u=t,s=c.identity,i=e):(u=t,s=e),new a.Observable(function(e){var t=u;if(i)return i.schedule(f,0,{subscriber:e,iterate:o,condition:n,resultSelector:s,state:t});for(;;){if(n){var r=void 0;try{r=n(t)}catch(t){return void e.error(t)}if(!r){e.complete();break}}r=void 0;try{r=s(t)}catch(t){return void e.error(t)}if(e.next(r),e.closed)break;try{t=o(t)}catch(t){return void e.error(t)}}})}},{"../Observable":104,"../util/identity":276,"../util/isScheduler":287}],129:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./defer"),o=t("./empty");r.iif=function(t,e,r){return void 0===e&&(e=o.EMPTY),void 0===r&&(r=o.EMPTY),n.defer(function(){return t()?e:r})}},{"./defer":121,"./empty":122}],130:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),o=t("../scheduler/async"),i=t("../util/isNumeric");function s(t){var e=t.subscriber,r=t.counter,t=t.period;e.next(r),this.schedule({subscriber:e,counter:r+1,period:t},t)}r.interval=function(e,r){return void 0===r&&(r=o.async),(!i.isNumeric(e=void 0===e?0:e)||e<0)&&(e=0),r&&"function"==typeof r.schedule||(r=o.async),new n.Observable(function(t){return t.add(r.schedule(s,e,{subscriber:t,counter:0,period:e})),t})}},{"../Observable":104,"../scheduler/async":263,"../util/isNumeric":283}],131:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../util/isScheduler"),u=t("../operators/mergeAll"),a=t("./fromArray");r.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Number.POSITIVE_INFINITY,n=null,o=t[t.length-1];return s.isScheduler(o)?(n=t.pop(),1<t.length&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof o&&(r=t.pop()),null===n&&1===t.length&&t[0]instanceof i.Observable?t[0]:u.mergeAll(r)(a.fromArray(t,n))}},{"../Observable":104,"../operators/mergeAll":187,"../util/isScheduler":287,"./fromArray":125}],132:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),t=t("../util/noop");r.NEVER=new n.Observable(t.noop),r.never=function(){return r.NEVER}},{"../Observable":104,"../util/noop":288}],133:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/isScheduler"),o=t("./fromArray"),i=t("../scheduled/scheduleArray");r.of=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return n.isScheduler(r)?(t.pop(),i.scheduleArray(t,r)):o.fromArray(t)}},{"../scheduled/scheduleArray":246,"../util/isScheduler":287,"./fromArray":125}],134:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../Observable"),i=t("./from"),s=t("../util/isArray"),u=t("./empty");function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return u.EMPTY;var r=t[0],n=t.slice(1);return 1===t.length&&s.isArray(r)?a.apply(void 0,r):new o.Observable(function(e){function t(){return e.add(a.apply(void 0,n).subscribe(e))}return i.from(r).subscribe({next:function(t){e.next(t)},error:t,complete:t})})}r.onErrorResumeNext=a},{"../Observable":104,"../util/isArray":277,"./empty":122,"./from":124}],135:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../Subscription");function u(t){var e=t.keys,r=t.index,n=t.subscriber,o=t.subscription,i=t.obj;n.closed||(r<e.length?(t=e[r],n.next([t,i[t]]),o.add(this.schedule({keys:e,index:r+1,subscriber:n,subscription:o,obj:i}))):n.complete())}r.pairs=function(o,n){return n?new i.Observable(function(t){var e=Object.keys(o),r=new s.Subscription;return r.add(n.schedule(u,0,{keys:e,index:0,subscriber:t,subscription:r,obj:o})),r}):new i.Observable(function(t){for(var e=Object.keys(o),r=0;r<e.length&&!t.closed;r++){var n=e[r];o.hasOwnProperty(n)&&t.next([n,o[n]])}t.complete()})},r.dispatch=u},{"../Observable":104,"../Subscription":112}],136:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/not"),o=t("../util/subscribeTo"),i=t("../operators/filter"),s=t("../Observable");r.partition=function(t,e,r){return[i.filter(e,r)(new s.Observable(o.subscribeTo(t))),i.filter(n.not(e,r))(new s.Observable(o.subscribeTo(t)))]}},{"../Observable":104,"../operators/filter":173,"../util/not":289,"../util/subscribeTo":291}],137:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../util/isArray"),s=t("./fromArray"),u=t("../OuterSubscriber"),a=t("../util/subscribeToResult");r.race=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!i.isArray(t[0]))return t[0];t=t[0]}return s.fromArray(t,void 0).lift(new c)};var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t))},l);function l(){}r.RaceOperator=c;var f,p=(f=u.OuterSubscriber,o(h,f),h.prototype._next=function(t){this.observables.push(t)},h.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var r=0;r<e&&!this.hasFirst;r++){var n=t[r],n=a.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(n),this.add(n)}this.observables=null}},h.prototype.notifyNext=function(t,e,r){if(!this.hasFirst){this.hasFirst=!0;for(var n,o=0;o<this.subscriptions.length;o++)o!==r&&((n=this.subscriptions[o]).unsubscribe(),this.remove(n));this.subscriptions=null}this.destination.next(e)},h);function h(t){t=f.call(this,t)||this;return t.hasFirst=!1,t.observables=[],t.subscriptions=[],t}r.RaceSubscriber=p},{"../OuterSubscriber":106,"../util/isArray":277,"../util/subscribeToResult":296,"./fromArray":125}],138:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=t("../Observable");function u(t){var e=t.start,r=t.index,n=t.count,o=t.subscriber;n<=r?o.complete():(o.next(e),o.closed||(t.index=r+1,t.start=e+1,this.schedule(t)))}r.range=function(n,o,i){return void 0===n&&(n=0),new s.Observable(function(t){void 0===o&&(o=n,n=0);var e=0,r=n;if(i)return i.schedule(u,0,{index:e,count:o,start:n,subscriber:t});for(;;){if(e++>=o){t.complete();break}if(t.next(r++),t.closed)break}})},r.dispatch=u},{"../Observable":104}],139:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable");function o(t){var e=t.error;t.subscriber.error(e)}r.throwError=function(e,r){return r?new n.Observable(function(t){return r.schedule(o,0,{error:e,subscriber:t})}):new n.Observable(function(t){return t.error(e)})}},{"../Observable":104}],140:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../scheduler/async"),u=t("../util/isNumeric"),a=t("../util/isScheduler");function c(t){var e=t.index,r=t.period,n=t.subscriber;if(n.next(e),!n.closed){if(-1===r)return n.complete();t.index=e+1,this.schedule(t,r)}}r.timer=function(r,t,n){void 0===r&&(r=0);var o=-1;return u.isNumeric(t)?o=Number(t)<1?1:Number(t):a.isScheduler(t)&&(n=t),a.isScheduler(n)||(n=s.async),new i.Observable(function(t){var e=u.isNumeric(r)?r:+r-n.now();return n.schedule(c,e,{index:0,period:o,subscriber:t})})}},{"../Observable":104,"../scheduler/async":263,"../util/isNumeric":283,"../util/isScheduler":287}],141:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),s=t("./from"),u=t("./empty");r.using=function(o,i){return new n.Observable(function(e){var t,r;try{t=o()}catch(t){return void e.error(t)}try{r=i(t)}catch(t){return void e.error(t)}var n=(r?s.from(r):u.EMPTY).subscribe(e);return function(){n.unsubscribe(),t&&t.unsubscribe()}})}},{"../Observable":104,"./empty":122,"./from":124}],142:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("./fromArray"),s=t("../util/isArray"),u=t("../Subscriber"),a=t("../../internal/symbol/iterator"),c=t("../innerSubscribe");r.zip=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return"function"==typeof r&&t.pop(),i.fromArray(t,void 0).lift(new l(r))};var l=(f.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},f);function f(t){this.resultSelector=t}r.ZipOperator=l;var p,h=(p=u.Subscriber,o(d,p),d.prototype._next=function(t){var e=this.iterators;s.isArray(t)?e.push(new y(t)):"function"==typeof t[a.iterator]?e.push(new b(t[a.iterator]())):e.push(new g(this.destination,this,t))},d.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var r=0;r<e;r++){var n=t[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}}else this.destination.complete()},d.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},d.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,r=this.destination,n=0;n<e;n++)if("function"==typeof(s=t[n]).hasValue&&!s.hasValue())return;for(var o=!1,i=[],n=0;n<e;n++){var s,u=(s=t[n]).next();if(s.hasCompleted()&&(o=!0),u.done)return void r.complete();i.push(u.value)}this.resultSelector?this._tryresultSelector(i):r.next(i),o&&r.complete()},d.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},d);function d(t,e,r){void 0===r&&(r=Object.create(null));t=p.call(this,t)||this;return t.resultSelector=e,t.iterators=[],t.active=0,t.resultSelector="function"==typeof e?e:void 0,t}r.ZipSubscriber=h;var b=(_.prototype.hasValue=function(){return!0},_.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},_.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},_);function _(t){this.iterator=t,this.nextResult=t.next()}var y=(v.prototype[a.iterator]=function(){return this},v.prototype.next=function(t){var e=this.index++,r=this.array;return e<this.length?{value:r[e],done:!1}:{value:null,done:!0}},v.prototype.hasValue=function(){return this.array.length>this.index},v.prototype.hasCompleted=function(){return this.array.length===this.index},v);function v(t){this.array=t,this.index=0,this.length=0,this.length=t.length}var m,g=(m=c.SimpleOuterSubscriber,o(O,m),O.prototype[a.iterator]=function(){return this},O.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},O.prototype.hasValue=function(){return 0<this.buffer.length},O.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},O.prototype.notifyComplete=function(){0<this.buffer.length?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},O.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},O.prototype.subscribe=function(){return c.innerSubscribe(this.observable,new c.SimpleInnerSubscriber(this))},O);function O(t,e,r){t=m.call(this,t)||this;return t.parent=e,t.observable=r,t.stillUnsubscribed=!0,t.buffer=[],t.isComplete=!1,t}},{"../../internal/symbol/iterator":265,"../Subscriber":111,"../innerSubscribe":114,"../util/isArray":277,"./fromArray":125}],143:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.audit=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector))},u);function u(t){this.durationSelector=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.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)}e=i.innerSubscribe(e,new i.SimpleInnerSubscriber(this));!e||e.closed?this.clearThrottle():this.add(this.throttled=e)}},l.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},l.prototype.notifyNext=function(){this.clearThrottle()},l.prototype.notifyComplete=function(){this.clearThrottle()},l);function l(t,e){t=a.call(this,t)||this;return t.durationSelector=e,t.hasValue=!1,t}},{"../innerSubscribe":114}],144:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../scheduler/async"),o=t("./audit"),i=t("../observable/timer");r.auditTime=function(t,e){return void 0===e&&(e=n.async),o.audit(function(){return i.timer(t,e)})}},{"../observable/timer":140,"../scheduler/async":263,"./audit":143}],145:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.buffer=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.closingNotifier))},u);function u(t){this.closingNotifier=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){this.buffer.push(t)},l.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},l);function l(t,e){t=a.call(this,t)||this;return t.buffer=[],t.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(t))),t}},{"../innerSubscribe":114}],146:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.bufferCount=function(e,r){return void 0===r&&(r=null),function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},s);function s(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?f:a}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},c.prototype._complete=function(){var t=this.buffer;0<t.length&&this.destination.next(t),u.prototype._complete.call(this)},c);function c(t,e){t=u.call(this,t)||this;return t.bufferSize=e,t.buffer=[],t}var l,f=(l=t.Subscriber,o(p,l),p.prototype._next=function(t){var e=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var s=n[i];s.push(t),s.length===e&&(n.splice(i,1),this.destination.next(s))}},p.prototype._complete=function(){for(var t=this.buffers,e=this.destination;0<t.length;){var r=t.shift();0<r.length&&e.next(r)}l.prototype._complete.call(this)},p);function p(t,e,r){t=l.call(this,t)||this;return t.bufferSize=e,t.startBufferEvery=r,t.buffers=[],t.count=0,t}},{"../Subscriber":111}],147:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../scheduler/async"),s=t("../Subscriber"),u=t("../util/isScheduler");r.bufferTime=function(e){var t=arguments.length,r=i.async;u.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;2<=t&&(n=arguments[1]);var o=Number.POSITIVE_INFINITY;return 3<=t&&(o=arguments[2]),function(t){return t.lift(new a(e,n,o,r))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new p(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},c);function c(t,e,r,n){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=r,this.scheduler=n}var l,f=function(){this.buffer=[]},p=(l=s.Subscriber,o(h,l),h.prototype._next=function(t){for(var e,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],s=i.buffer;s.push(t),s.length==this.maxBufferSize&&(e=i)}e&&this.onBufferFull(e)},h.prototype._error=function(t){this.contexts.length=0,l.prototype._error.call(this,t)},h.prototype._complete=function(){for(var t=this.contexts,e=this.destination;0<t.length;){var r=t.shift();e.next(r.buffer)}l.prototype._complete.call(this)},h.prototype._unsubscribe=function(){this.contexts=null},h.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly&&(t=this.openContext(),e=this.bufferTimeSpan,this.add(t.closeAction=this.scheduler.schedule(d,e,{subscriber:this,context:t,bufferTimeSpan:e})))},h.prototype.openContext=function(){var t=new f;return this.contexts.push(t),t},h.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;0<=(e?e.indexOf(t):-1)&&e.splice(e.indexOf(t),1)},h);function h(t,e,r,n,o){var i=l.call(this,t)||this;i.bufferTimeSpan=e,i.bufferCreationInterval=r,i.maxBufferSize=n,i.scheduler=o,i.contexts=[];t=i.openContext();return i.timespanOnly=null==r||r<0,i.timespanOnly?i.add(t.closeAction=o.schedule(d,e,{subscriber:i,context:t,bufferTimeSpan:e})):(n={bufferTimeSpan:e,bufferCreationInterval:r,subscriber:i,scheduler:o},i.add(t.closeAction=o.schedule(_,e,{subscriber:i,context:t})),i.add(o.schedule(b,r,n))),i}function d(t){var e=t.subscriber,r=t.context;r&&e.closeContext(r),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function b(t){var e=t.bufferCreationInterval,r=t.bufferTimeSpan,n=t.subscriber,o=t.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=o.schedule(_,r,{subscriber:n,context:i})),this.schedule(t,e))}function _(t){var e=t.subscriber,t=t.context;e.closeContext(t)}},{"../Subscriber":111,"../scheduler/async":263,"../util/isScheduler":287}],148:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscription"),s=t("../util/subscribeToResult"),t=t("../OuterSubscriber");r.bufferToggle=function(e,r){return function(t){return t.lift(new u(e,r))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.openings,this.closingSelector))},a);function a(t,e){this.openings=t,this.closingSelector=e}var c,l=(c=t.OuterSubscriber,o(f,c),f.prototype._next=function(t){for(var e=this.contexts,r=e.length,n=0;n<r;n++)e[n].buffer.push(t)},f.prototype._error=function(t){for(var e=this.contexts;0<e.length;){var r=e.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,c.prototype._error.call(this,t)},f.prototype._complete=function(){for(var t=this.contexts;0<t.length;){var e=t.shift();this.destination.next(e.buffer),e.subscription.unsubscribe(),e.buffer=null,e.subscription=null}this.contexts=null,c.prototype._complete.call(this)},f.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},f.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},f.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},f.prototype.closeBuffer=function(t){var e,r,n=this.contexts;n&&t&&(e=t.buffer,r=t.subscription,this.destination.next(e),n.splice(n.indexOf(t),1),this.remove(r),r.unsubscribe())},f.prototype.trySubscribe=function(t){var e=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};e.push(n);t=s.subscribeToResult(this,t,n);!t||t.closed?this.closeBuffer(n):(t.context=n,this.add(t),r.add(t))},f);function f(t,e,r){t=c.call(this,t)||this;return t.closingSelector=r,t.contexts=[],t.add(s.subscribeToResult(t,e)),t}},{"../OuterSubscriber":106,"../Subscription":112,"../util/subscribeToResult":296}],149:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscription"),s=t("../innerSubscribe");r.bufferWhen=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.closingSelector))},a);function a(t){this.closingSelector=t}var c,l=(c=s.SimpleOuterSubscriber,o(f,c),f.prototype._next=function(t){this.buffer.push(t)},f.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),c.prototype._complete.call(this)},f.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},f.prototype.notifyNext=function(){this.openBuffer()},f.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},f.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e=this.buffer;this.buffer&&this.destination.next(e),this.buffer=[];try{var r=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(s.innerSubscribe(r,new s.SimpleInnerSubscriber(this))),this.subscribing=!1},f);function f(t,e){t=c.call(this,t)||this;return t.closingSelector=e,t.subscribing=!1,t.openBuffer(),t}},{"../Subscription":112,"../innerSubscribe":114}],150:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.catchError=function(r){return function(t){var e=new s(r),t=t.lift(e);return e.caught=t}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.selector,this.caught))},u);function u(t){this.selector=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype.error=function(t){if(!this.isStopped){var e=void 0;try{e=this.selector(t,this.caught)}catch(t){return void a.prototype.error.call(this,t)}this._unsubscribeAndRecycle();t=new i.SimpleInnerSubscriber(this);this.add(t);e=i.innerSubscribe(e,t);e!==t&&this.add(e)}},l);function l(t,e,r){t=a.call(this,t)||this;return t.selector=e,t.caught=r,t}},{"../innerSubscribe":114}],151:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/combineLatest");r.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},{"../observable/combineLatest":119}],152:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/isArray"),o=t("../observable/combineLatest"),i=t("../observable/from");r.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(r))}}},{"../observable/combineLatest":119,"../observable/from":124,"../util/isArray":277}],153:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/concat");r.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},{"../observable/concat":120}],154:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./mergeAll");r.concatAll=function(){return n.mergeAll(1)}},{"./mergeAll":187}],155:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./mergeMap");r.concatMap=function(t,e){return n.mergeMap(t,e,1)}},{"./mergeMap":188}],156:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./concatMap");r.concatMapTo=function(t,e){return n.concatMap(function(){return t},e)}},{"./concatMap":155}],157:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.count=function(e){return function(t){return t.lift(new i(e,t))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.source))},s);function s(t,e){this.predicate=t,this.source=e}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},c.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},c.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},c);function c(t,e,r){t=u.call(this,t)||this;return t.predicate=e,t.source=r,t.count=0,t.index=0,t}},{"../Subscriber":111}],158:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.debounce=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector))},u);function u(t){this.durationSelector=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},l.prototype._complete=function(){this.emitValue(),this.destination.complete()},l.prototype._tryNext=function(t,e){var r=this.durationSubscription;this.value=t,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},l.prototype.notifyNext=function(){this.emitValue()},l.prototype.notifyComplete=function(){this.emitValue()},l.prototype.emitValue=function(){var t,e;this.hasValue&&(t=this.value,(e=this.durationSubscription)&&(this.durationSubscription=void 0,e.unsubscribe(),this.remove(e)),this.value=void 0,this.hasValue=!1,a.prototype._next.call(this,t))},l);function l(t,e){t=a.call(this,t)||this;return t.durationSelector=e,t.hasValue=!1,t}},{"../innerSubscribe":114}],159:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../scheduler/async");r.debounceTime=function(e,r){return void 0===r&&(r=s.async),function(t){return t.lift(new u(e,r))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.dueTime,this.scheduler))},a);function a(t,e){this.dueTime=t,this.scheduler=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(p,this.dueTime,this))},f.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},f.prototype.debouncedNext=function(){var t;this.clearDebounce(),this.hasValue&&(t=this.lastValue,this.lastValue=null,this.hasValue=!1,this.destination.next(t))},f.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},f);function f(t,e,r){t=c.call(this,t)||this;return t.dueTime=e,t.scheduler=r,t.debouncedSubscription=null,t.lastValue=null,t.hasValue=!1,t}function p(t){t.debouncedNext()}},{"../Subscriber":111,"../scheduler/async":263}],160:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new i(e))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.defaultValue))},s);function s(t){this.defaultValue=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},c.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},c);function c(t,e){t=u.call(this,t)||this;return t.defaultValue=e,t.isEmpty=!0,t}},{"../Subscriber":111}],161:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../scheduler/async"),s=t("../util/isDate"),u=t("../Subscriber"),a=t("../Notification");r.delay=function(t,e){void 0===e&&(e=i.async);var r=s.isDate(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new c(r,e))}};var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t,this.delay,this.scheduler))},l);function l(t,e){this.delay=t,this.scheduler=e}var f,p=(f=u.Subscriber,o(h,f),h.dispatch=function(t){for(var e,r=t.source,n=r.queue,o=t.scheduler,i=t.destination;0<n.length&&n[0].time-o.now()<=0;)n.shift().notification.observe(i);0<n.length?(e=Math.max(0,n[0].time-o.now()),this.schedule(t,e)):(this.unsubscribe(),r.active=!1)},h.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(h.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},h.prototype.scheduleNotification=function(t){var e;!0!==this.errored&&(e=this.scheduler,t=new d(e.now()+this.delay,t),this.queue.push(t),!1===this.active&&this._schedule(e))},h.prototype._next=function(t){this.scheduleNotification(a.Notification.createNext(t))},h.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},h.prototype._complete=function(){this.scheduleNotification(a.Notification.createComplete()),this.unsubscribe()},h);function h(t,e,r){t=f.call(this,t)||this;return t.delay=e,t.scheduler=r,t.queue=[],t.active=!1,t.errored=!1,t}var d=function(t,e){this.time=t,this.notification=e}},{"../Notification":103,"../Subscriber":111,"../scheduler/async":263,"../util/isDate":279}],162:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Observable"),u=t("../OuterSubscriber"),a=t("../util/subscribeToResult");r.delayWhen=function(e,r){return r?function(t){return new b(t,r).lift(new c(e))}:function(t){return t.lift(new c(e))}};var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t,this.delayDurationSelector))},l);function l(t){this.delayDurationSelector=t}var f,p=(f=u.OuterSubscriber,o(h,f),h.prototype.notifyNext=function(t,e,r,n,o){this.destination.next(t),this.removeSubscription(o),this.tryComplete()},h.prototype.notifyError=function(t,e){this._error(t)},h.prototype.notifyComplete=function(t){t=this.removeSubscription(t);t&&this.destination.next(t),this.tryComplete()},h.prototype._next=function(t){var e=this.index++;try{var r=this.delayDurationSelector(t,e);r&&this.tryDelay(r,t)}catch(t){this.destination.error(t)}},h.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},h.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},h.prototype.tryDelay=function(t,e){e=a.subscribeToResult(this,t,e);e&&!e.closed&&(this.destination.add(e),this.delayNotifierSubscriptions.push(e))},h.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},h);function h(t,e){t=f.call(this,t)||this;return t.delayDurationSelector=e,t.completed=!1,t.delayNotifierSubscriptions=[],t.index=0,t}var d,b=(d=s.Observable,o(_,d),_.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new v(t,this.source))},_);function _(t,e){var r=d.call(this)||this;return r.source=t,r.subscriptionDelay=e,r}var y,v=(y=i.Subscriber,o(m,y),m.prototype._next=function(t){this.subscribeToSource()},m.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},m.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},m.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},m);function m(t,e){var r=y.call(this)||this;return r.parent=t,r.source=e,r.sourceSubscribed=!1,r}},{"../Observable":104,"../OuterSubscriber":106,"../Subscriber":111,"../util/subscribeToResult":296}],163:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.dematerialize=function(){return function(t){return t.lift(new i)}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t))},s);function s(){}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){t.observe(this.destination)},c);function c(t){return u.call(this,t)||this}},{"../Subscriber":111}],164:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.distinct=function(e,r){return function(t){return t.lift(new s(e,r))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.keySelector,this.flushes))},u);function u(t,e){this.keySelector=t,this.flushes=e}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype.notifyNext=function(){this.values.clear()},l.prototype.notifyError=function(t){this._error(t)},l.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},l.prototype._useKeySelector=function(t){var e,r=this.destination;try{e=this.keySelector(t)}catch(t){return void r.error(t)}this._finalizeNext(e,t)},l.prototype._finalizeNext=function(t,e){var r=this.values;r.has(t)||(r.add(t),this.destination.next(e))},l);function l(t,e,r){t=a.call(this,t)||this;return t.keySelector=e,t.values=new Set,r&&t.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(t))),t}r.DistinctSubscriber=c},{"../innerSubscribe":114}],165:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.distinctUntilChanged=function(e,r){return function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.compare,this.keySelector))},s);function s(t,e){this.compare=t,this.keySelector=e}var u,a=(u=t.Subscriber,o(c,u),c.prototype.compare=function(t,e){return t===e},c.prototype._next=function(t){try{var e=this.keySelector,r=e?e(t):t}catch(t){return this.destination.error(t)}e=!1;if(this.hasKey)try{e=(0,this.compare)(this.key,r)}catch(t){return this.destination.error(t)}else this.hasKey=!0;e||(this.key=r,this.destination.next(t))},c);function c(t,e,r){t=u.call(this,t)||this;return t.keySelector=r,t.hasKey=!1,"function"==typeof e&&(t.compare=e),t}},{"../Subscriber":111}],166:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("./distinctUntilChanged");r.distinctUntilKeyChanged=function(r,n){return o.distinctUntilChanged(function(t,e){return n?n(t[r],e[r]):t[r]===e[r]})}},{"./distinctUntilChanged":165}],167:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../util/ArgumentOutOfRangeError"),i=t("./filter"),s=t("./throwIfEmpty"),u=t("./defaultIfEmpty"),a=t("./take");r.elementAt=function(r,e){if(r<0)throw new o.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(t){return t.pipe(i.filter(function(t,e){return e===r}),a.take(1),n?u.defaultIfEmpty(e):s.throwIfEmpty(function(){return new o.ArgumentOutOfRangeError}))}}},{"../util/ArgumentOutOfRangeError":268,"./defaultIfEmpty":160,"./filter":173,"./take":225,"./throwIfEmpty":232}],168:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/concat"),o=t("../observable/of");r.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,o.of.apply(void 0,e))}}},{"../observable/concat":120,"../observable/of":133}],169:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.every=function(e,r){return function(t){return t.lift(new i(e,r,t))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg,this.source))},s);function s(t,e,r){this.predicate=t,this.thisArg=e,this.source=r}var u,a=(u=t.Subscriber,o(c,u),c.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},c.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},c.prototype._complete=function(){this.notifyComplete(!0)},c);function c(t,e,r,n){t=u.call(this,t)||this;return t.predicate=e,t.thisArg=r,t.source=n,t.index=0,t.thisArg=r||t,t}},{"../Subscriber":111}],170:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.exhaust=function(){return function(t){return t.lift(new s)}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t))},u);function u(){}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(t,new i.SimpleInnerSubscriber(this))))},l.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},l.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},l);function l(t){t=a.call(this,t)||this;return t.hasCompleted=!1,t.hasSubscription=!1,t}},{"../innerSubscribe":114}],171:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var s=t("./map"),u=t("../observable/from"),i=t("../innerSubscribe");r.exhaustMap=function e(o,i){return i?function(t){return t.pipe(e(function(r,n){return u.from(o(r,n)).pipe(s.map(function(t,e){return i(r,t,n,e)}))}))}:function(t){return t.lift(new a(o))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.project))},c);function c(t){this.project=t}var l,f=(l=i.SimpleOuterSubscriber,o(p,l),p.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},p.prototype.tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e)},p.prototype._innerSub=function(t){var e=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(e);t=i.innerSubscribe(t,e);t!==e&&r.add(t)},p.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},p.prototype.notifyNext=function(t){this.destination.next(t)},p.prototype.notifyError=function(t){this.destination.error(t)},p.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},p);function p(t,e){t=l.call(this,t)||this;return t.project=e,t.hasSubscription=!1,t.hasCompleted=!1,t.index=0,t}},{"../innerSubscribe":114,"../observable/from":124,"./map":182}],172:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.expand=function(e,r,n){return r=((r=void 0===r?Number.POSITIVE_INFINITY:r)||0)<1?Number.POSITIVE_INFINITY:r,function(t){return t.lift(new s(e,r,n))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.concurrent,this.scheduler))},u);function u(t,e,r){this.project=t,this.concurrent=e,this.scheduler=r}r.ExpandOperator=s;var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.dispatch=function(t){var e=t.subscriber,r=t.result,n=t.value,t=t.index;e.subscribeToProjection(r,n,t)},l.prototype._next=function(t){var e=this.destination;if(e.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){e.next(t);try{var n,o=(0,this.project)(t,r);this.scheduler?(n={subscriber:this,result:o,value:t,index:r},this.destination.add(this.scheduler.schedule(l.dispatch,0,n))):this.subscribeToProjection(o,t,r)}catch(t){e.error(t)}}else this.buffer.push(t)}},l.prototype.subscribeToProjection=function(t,e,r){this.active++,this.destination.add(i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},l.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},l.prototype.notifyNext=function(t){this._next(t)},l.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&0<t.length&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},l);function l(t,e,r,n){t=a.call(this,t)||this;return t.project=e,t.concurrent=r,t.scheduler=n,t.index=0,t.active=0,t.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(t.buffer=[]),t}r.ExpandSubscriber=c},{"../innerSubscribe":114}],173:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.filter=function(e,r){return function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},s);function s(t,e){this.predicate=t,this.thisArg=e}var u,a=(u=t.Subscriber,o(c,u),c.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)},c);function c(t,e,r){t=u.call(this,t)||this;return t.predicate=e,t.thisArg=r,t.count=0,t}},{"../Subscriber":111}],174:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Subscription");r.finalize=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.callback))},a);function a(t){this.callback=t}var c,l=(c=i.Subscriber,o(f,c),f);function f(t,e){t=c.call(this,t)||this;return t.add(new s.Subscription(e)),t}},{"../Subscriber":111,"../Subscription":112}],175:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.find=function(e,r){if("function"!=typeof e)throw new TypeError("predicate is not a function");return function(t){return t.lift(new i(e,t,!1,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},s);function s(t,e,r,n){this.predicate=t,this.source=e,this.yieldIndex=r,this.thisArg=n}r.FindValueOperator=i;var u,a=(u=t.Subscriber,o(c,u),c.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},c.prototype._next=function(t){var e=this.predicate,r=this.thisArg,n=this.index++;try{e.call(r||this,t,n,this.source)&&this.notifyComplete(this.yieldIndex?n:t)}catch(t){this.destination.error(t)}},c.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},c);function c(t,e,r,n,o){t=u.call(this,t)||this;return t.predicate=e,t.source=r,t.yieldIndex=n,t.thisArg=o,t.index=0,t}r.FindValueSubscriber=a},{"../Subscriber":111}],176:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../operators/find");r.findIndex=function(e,r){return function(t){return t.lift(new n.FindValueOperator(e,t,!0,r))}}},{"../operators/find":175}],177:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../util/EmptyError"),i=t("./filter"),s=t("./take"),u=t("./defaultIfEmpty"),a=t("./throwIfEmpty"),c=t("../util/identity");r.first=function(n,t){var e=2<=arguments.length;return function(r){return r.pipe(n?i.filter(function(t,e){return n(t,e,r)}):c.identity,s.take(1),e?u.defaultIfEmpty(t):a.throwIfEmpty(function(){return new o.EmptyError}))}}},{"../util/EmptyError":269,"../util/identity":276,"./defaultIfEmpty":160,"./filter":173,"./take":225,"./throwIfEmpty":232}],178:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Subscription"),u=t("../Observable"),a=t("../Subject");r.groupBy=function(e,r,n,o){return function(t){return t.lift(new c(e,r,n,o))}};var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},l);function l(t,e,r,n){this.keySelector=t,this.elementSelector=e,this.durationSelector=r,this.subjectSelector=n}var f,p=(f=i.Subscriber,o(h,f),h.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},h.prototype._group=function(t,e){var r,n=this.groups,o=(n=n||(this.groups=new Map)).get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!o){o=this.subjectSelector?this.subjectSelector():new a.Subject,n.set(e,o);n=new v(e,o,this);if(this.destination.next(n),this.durationSelector){n=void 0;try{n=this.durationSelector(new v(e,o))}catch(t){return void this.error(t)}this.add(n.subscribe(new b(e,o,this)))}}o.closed||o.next(r)},h.prototype._error=function(r){var t=this.groups;t&&(t.forEach(function(t,e){t.error(r)}),t.clear()),this.destination.error(r)},h.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(t,e){t.complete()}),t.clear()),this.destination.complete()},h.prototype.removeGroup=function(t){this.groups.delete(t)},h.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&f.prototype.unsubscribe.call(this))},h);function h(t,e,r,n,o){t=f.call(this,t)||this;return t.keySelector=e,t.elementSelector=r,t.durationSelector=n,t.subjectSelector=o,t.groups=null,t.attemptedToUnsubscribe=!1,t.count=0,t}var d,b=(d=i.Subscriber,o(_,d),_.prototype._next=function(t){this.complete()},_.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},_);function _(t,e,r){var n=d.call(this,e)||this;return n.key=t,n.group=e,n.parent=r,n}var y,v=(y=u.Observable,o(m,y),m.prototype._subscribe=function(t){var e=new s.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&e.add(new O(r)),e.add(n.subscribe(t)),e},m);function m(t,e,r){var n=y.call(this)||this;return n.key=t,n.groupSubject=e,n.refCountSubscription=r,n}r.GroupedObservable=v;var g,O=(g=s.Subscription,o(w,g),w.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(g.prototype.unsubscribe.call(this),--t.count,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},w);function w(t){var e=g.call(this)||this;return(e.parent=t).count++,e}},{"../Observable":104,"../Subject":109,"../Subscriber":111,"../Subscription":112}],179:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.ignoreElements=function(){return function(t){return t.lift(new i)}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t))},s);function s(){}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){},c);function c(){return null!==u&&u.apply(this,arguments)||this}},{"../Subscriber":111}],180:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.isEmpty=function(){return function(t){return t.lift(new i)}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t))},s);function s(){}var u,a=(u=t.Subscriber,o(c,u),c.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},c.prototype._next=function(t){this.notifyComplete(!1)},c.prototype._complete=function(){this.notifyComplete(!0)},c);function c(t){return u.call(this,t)||this}},{"../Subscriber":111}],181:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../util/EmptyError"),i=t("./filter"),s=t("./takeLast"),u=t("./throwIfEmpty"),a=t("./defaultIfEmpty"),c=t("../util/identity");r.last=function(n,t){var e=2<=arguments.length;return function(r){return r.pipe(n?i.filter(function(t,e){return n(t,e,r)}):c.identity,s.takeLast(1),e?a.defaultIfEmpty(t):u.throwIfEmpty(function(){return new o.EmptyError}))}}},{"../util/EmptyError":269,"../util/identity":276,"./defaultIfEmpty":160,"./filter":173,"./takeLast":226,"./throwIfEmpty":232}],182:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.map=function(e,r){return function(t){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},s);function s(t,e){this.project=t,this.thisArg=e}r.MapOperator=i;var u,a=(u=t.Subscriber,o(c,u),c.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)},c);function c(t,e,r){t=u.call(this,t)||this;return t.project=e,t.count=0,t.thisArg=r||t,t}},{"../Subscriber":111}],183:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.mapTo=function(e){return function(t){return t.lift(new i(e))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.value))},s);function s(t){this.value=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){this.destination.next(this.value)},c);function c(t,e){t=u.call(this,t)||this;return t.value=e,t}},{"../Subscriber":111}],184:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Notification");r.materialize=function(){return function(t){return t.lift(new u)}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t))},a);function a(){}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){this.destination.next(s.Notification.createNext(t))},f.prototype._error=function(t){var e=this.destination;e.next(s.Notification.createError(t)),e.complete()},f.prototype._complete=function(){var t=this.destination;t.next(s.Notification.createComplete()),t.complete()},f);function f(t){return c.call(this,t)||this}},{"../Notification":103,"../Subscriber":111}],185:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./reduce");r.max=function(r){return n.reduce("function"==typeof r?function(t,e){return 0<r(t,e)?t:e}:function(t,e){return e<t?t:e})}},{"./reduce":203}],186:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/merge");r.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},{"../observable/merge":131}],187:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./mergeMap"),o=t("../util/identity");r.mergeAll=function(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),n.mergeMap(o.identity,t)}},{"../util/identity":276,"./mergeMap":188}],188:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("./map"),s=t("../observable/from"),u=t("../innerSubscribe");function a(e,o,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof o?function(t){return t.pipe(a(function(r,n){return s.from(e(r,n)).pipe(i.map(function(t,e){return o(r,t,n,e)}))},r))}:("number"==typeof o&&(r=o),function(t){return t.lift(new c(e,r))})}r.mergeMap=a;var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t,this.project,this.concurrent))},l);function l(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}r.MergeMapOperator=c;var f,p=(f=u.SimpleOuterSubscriber,o(h,f),h.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},h.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e)},h.prototype._innerSub=function(t){var e=new u.SimpleInnerSubscriber(this),r=this.destination;r.add(e);t=u.innerSubscribe(t,e);t!==e&&r.add(t)},h.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},h.prototype.notifyNext=function(t){this.destination.next(t)},h.prototype.notifyComplete=function(){var t=this.buffer;this.active--,0<t.length?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},h);function h(t,e,r){void 0===r&&(r=Number.POSITIVE_INFINITY);t=f.call(this,t)||this;return t.project=e,t.concurrent=r,t.hasCompleted=!1,t.buffer=[],t.active=0,t.index=0,t}r.MergeMapSubscriber=p,r.flatMap=a},{"../innerSubscribe":114,"../observable/from":124,"./map":182}],189:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./mergeMap");r.mergeMapTo=function(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof e?n.mergeMap(function(){return t},e,r):n.mergeMap(function(){return t},r="number"==typeof e?e:r)}},{"./mergeMap":188}],190:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.mergeScan=function(e,r,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(t){return t.lift(new s(e,r,n))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.accumulator,this.seed,this.concurrent))},u);function u(t,e,r){this.accumulator=t,this.seed=e,this.concurrent=r}r.MergeScanOperator=s;var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,t,e)}catch(t){return r.error(t)}this.active++,this._innerSub(n)}else this.buffer.push(t)},l.prototype._innerSub=function(t){var e=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(e);t=i.innerSubscribe(t,e);t!==e&&r.add(t)},l.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},l.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t)},l.prototype.notifyComplete=function(){var t=this.buffer;this.active--,0<t.length?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},l);function l(t,e,r,n){t=a.call(this,t)||this;return t.accumulator=e,t.acc=r,t.concurrent=n,t.hasValue=!1,t.hasCompleted=!1,t.buffer=[],t.active=0,t.index=0,t}r.MergeScanSubscriber=c},{"../innerSubscribe":114}],191:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./reduce");r.min=function(r){return n.reduce("function"==typeof r?function(t,e){return r(t,e)<0?t:e}:function(t,e){return t<e?t:e})}},{"./reduce":203}],192:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../observable/ConnectableObservable");r.multicast=function(n,o){return function(t){var e="function"==typeof n?n:function(){return n};if("function"==typeof o)return t.lift(new s(e,o));var r=Object.create(t,i.connectableObservableDescriptor);return r.source=t,r.subjectFactory=e,r}};var s=(n.prototype.call=function(t,e){var r=this.selector,n=this.subjectFactory(),t=r(n).subscribe(t);return t.add(e.subscribe(n)),t},n);function n(t,e){this.subjectFactory=t,this.selector=e}r.MulticastOperator=s},{"../observable/ConnectableObservable":115}],193:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Notification");r.observeOn=function(e,r){return void 0===r&&(r=0),function(t){return t.lift(new u(e,r))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.scheduler,this.delay))},a);function a(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}r.ObserveOnOperator=u;var c,l=(c=i.Subscriber,o(f,c),f.dispatch=function(t){var e=t.notification,t=t.destination;e.observe(t),this.unsubscribe()},f.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(f.dispatch,this.delay,new p(t,this.destination)))},f.prototype._next=function(t){this.scheduleMessage(s.Notification.createNext(t))},f.prototype._error=function(t){this.scheduleMessage(s.Notification.createError(t)),this.unsubscribe()},f.prototype._complete=function(){this.scheduleMessage(s.Notification.createComplete()),this.unsubscribe()},f);function f(t,e,r){void 0===r&&(r=0);t=c.call(this,t)||this;return t.scheduler=e,t.delay=r,t}r.ObserveOnSubscriber=l;var p=function(t,e){this.notification=t,this.destination=e};r.ObserveOnMessage=p},{"../Notification":103,"../Subscriber":111}],194:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../observable/from"),s=t("../util/isArray"),u=t("../innerSubscribe");r.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&s.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new a(e))}},r.onErrorResumeNextStatic=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(t=1===t.length&&s.isArray(t[0])?t[0]:t).shift();return i.from(r).lift(new a(t))};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.nextSources))},c);function c(t){this.nextSources=t}var l,f=(l=u.SimpleOuterSubscriber,o(p,l),p.prototype.notifyError=function(){this.subscribeToNextSource()},p.prototype.notifyComplete=function(){this.subscribeToNextSource()},p.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},p.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},p.prototype.subscribeToNextSource=function(){var t,e,r=this.nextSources.shift();r?(t=new u.SimpleInnerSubscriber(this),(e=this.destination).add(t),(r=u.innerSubscribe(r,t))!==t&&e.add(r)):this.destination.complete()},p);function p(t,e){var r=l.call(this,t)||this;return r.destination=t,r.nextSources=e,r}},{"../innerSubscribe":114,"../observable/from":124,"../util/isArray":277}],195:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.pairwise=function(){return function(t){return t.lift(new i)}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t))},s);function s(){}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},c);function c(t){t=u.call(this,t)||this;return t.hasPrev=!1,t}},{"../Subscriber":111}],196:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/not"),o=t("./filter");r.partition=function(e,r){return function(t){return[o.filter(e,r)(t),o.filter(n.not(e,r))(t)]}}},{"../util/not":289,"./filter":173}],197:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./map");r.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return function(t){return n.map((o=e,i=r,function(t){for(var e=t,r=0;r<i;r++){var n=null!=e?e[o[r]]:void 0;if(void 0===n)return;e=n}return e}))(t);var o,i}}},{"./map":182}],198:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Subject"),o=t("./multicast");r.publish=function(t){return t?o.multicast(function(){return new n.Subject},t):o.multicast(new n.Subject)}},{"../Subject":109,"./multicast":192}],199:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../BehaviorSubject"),o=t("./multicast");r.publishBehavior=function(e){return function(t){return o.multicast(new n.BehaviorSubject(e))(t)}}},{"../BehaviorSubject":101,"./multicast":192}],200:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../AsyncSubject"),o=t("./multicast");r.publishLast=function(){return function(t){return o.multicast(new n.AsyncSubject)(t)}}},{"../AsyncSubject":100,"./multicast":192}],201:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=t("../ReplaySubject"),u=t("./multicast");r.publishReplay=function(t,e,r,n){var o="function"==typeof r?r:void 0,i=new s.ReplaySubject(t,e,n=r&&"function"!=typeof r?r:n);return function(t){return u.multicast(function(){return i},o)(t)}}},{"../ReplaySubject":107,"./multicast":192}],202:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/isArray"),o=t("../observable/race");r.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},{"../observable/race":137,"../util/isArray":277}],203:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("./scan"),i=t("./takeLast"),s=t("./defaultIfEmpty"),u=t("../util/pipe");r.reduce=function(n,e){return 2<=arguments.length?function(t){return u.pipe(o.scan(n,e),i.takeLast(1),s.defaultIfEmpty(e))(t)}:function(t){return u.pipe(o.scan(function(t,e,r){return n(t,e,r+1)}),i.takeLast(1))(t)}}},{"../util/pipe":290,"./defaultIfEmpty":160,"./scan":211,"./takeLast":226}],204:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.refCount=function(){return function(t){return t.lift(new i(t))}};var i=(s.prototype.call=function(t,e){var r=this.connectable;r._refCount++;t=new a(t,r),e=e.subscribe(t);return t.closed||(t.connection=r.connect()),e},s);function s(t){this.connectable=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._unsubscribe=function(){var t,e=this.connectable;e?(this.connectable=null,(t=e._refCount)<=0?this.connection=null:(e._refCount=t-1,1<t?this.connection=null:(t=this.connection,e=e._connection,this.connection=null,!e||t&&e!==t||e.unsubscribe()))):this.connection=null},c);function c(t,e){t=u.call(this,t)||this;return t.connectable=e,t}},{"../Subscriber":111}],205:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../observable/empty");r.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?s.empty():e<0?t.lift(new u(-1,t)):t.lift(new u(e-1,t))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.count,this.source))},a);function a(t,e){this.count=t,this.source=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype.complete=function(){if(!this.isStopped){var t=this.source,e=this.count;if(0===e)return c.prototype.complete.call(this);-1<e&&(this.count=e-1),t.subscribe(this._unsubscribeAndRecycle())}},f);function f(t,e,r){t=c.call(this,t)||this;return t.count=e,t.source=r,t}},{"../Subscriber":111,"../observable/empty":122}],206:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../innerSubscribe");r.repeatWhen=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.notifier,e))},a);function a(t){this.notifier=t}var c,l=(c=s.SimpleOuterSubscriber,o(f,c),f.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},f.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return c.prototype.complete.call(this)},f.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return c.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},f.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},f.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,c.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},f.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t=(0,this.notifier)(this.notifications)}catch(t){return c.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=s.innerSubscribe(t,new s.SimpleInnerSubscriber(this))},f);function f(t,e,r){t=c.call(this,t)||this;return t.notifier=e,t.source=r,t.sourceIsBeingSubscribedTo=!0,t}},{"../Subject":109,"../innerSubscribe":114}],207:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new i(e,t))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.count,this.source))},s);function s(t,e){this.count=t,this.source=e}var u,a=(u=t.Subscriber,o(c,u),c.prototype.error=function(t){if(!this.isStopped){var e=this.source,r=this.count;if(0===r)return u.prototype.error.call(this,t);-1<r&&(this.count=r-1),e.subscribe(this._unsubscribeAndRecycle())}},c);function c(t,e,r){t=u.call(this,t)||this;return t.count=e,t.source=r,t}},{"../Subscriber":111}],208:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../innerSubscribe");r.retryWhen=function(e){return function(t){return t.lift(new u(e,t))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.notifier,this.source))},a);function a(t,e){this.notifier=t,this.source=e}var c,l=(c=s.SimpleOuterSubscriber,o(f,c),f.prototype.error=function(t){if(!this.isStopped){var e=this.errors,r=this.retries,n=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{e=new i.Subject;try{r=(0,this.notifier)(e)}catch(t){return c.prototype.error.call(this,t)}n=s.innerSubscribe(r,new s.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=e,this.retries=r,this.retriesSubscription=n,e.next(t)}},f.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},f.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},f);function f(t,e,r){t=c.call(this,t)||this;return t.notifier=e,t.source=r,t}},{"../Subject":109,"../innerSubscribe":114}],209:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.sample=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){t=new c(t),e=e.subscribe(t);return e.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(t))),e},u);function u(t){this.notifier=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){this.value=t,this.hasValue=!0},l.prototype.notifyNext=function(){this.emitValue()},l.prototype.notifyComplete=function(){this.emitValue()},l.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},l);function l(){var t=null!==a&&a.apply(this,arguments)||this;return t.hasValue=!1,t}},{"../innerSubscribe":114}],210:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../scheduler/async");r.sampleTime=function(e,r){return void 0===r&&(r=s.async),function(t){return t.lift(new u(e,r))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.period,this.scheduler))},a);function a(t,e){this.period=t,this.scheduler=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},f.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},f);function f(t,e,r){t=c.call(this,t)||this;return t.period=e,t.scheduler=r,t.hasValue=!1,t.add(r.schedule(p,e,{subscriber:t,period:e})),t}function p(t){var e=t.subscriber,r=t.period;e.notifyNext(),this.schedule(t,r)}},{"../Subscriber":111,"../scheduler/async":263}],211:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.scan=function(e,r){var n=2<=arguments.length?!0:!1;return function(t){return t.lift(new i(e,r,n))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.accumulator,this.seed,this.hasSeed))},s);function s(t,e,r){void 0===r&&(r=!1),this.accumulator=t,this.seed=e,this.hasSeed=r}var u,a=(u=t.Subscriber,o(c,u),Object.defineProperty(c.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),c.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},c.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.accumulator(this.seed,t,r)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},c);function c(t,e,r,n){t=u.call(this,t)||this;return t.accumulator=e,t._seed=r,t.hasSeed=n,t.index=0,t}},{"../Subscriber":111}],212:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.sequenceEqual=function(e,r){return function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.compareTo,this.comparator))},s);function s(t,e){this.compareTo=t,this.comparator=e}r.SequenceEqualOperator=i;var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},c.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},c.prototype.checkValues=function(){for(var t=this._a,e=this._b,r=this.comparator;0<t.length&&0<e.length;){var n=t.shift(),o=e.shift(),i=!1;try{i=r?r(n,o):n===o}catch(t){this.destination.error(t)}i||this.emit(!1)}},c.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},c.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},c.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},c);function c(t,e,r){var n=u.call(this,t)||this;return n.compareTo=e,n.comparator=r,n._a=[],n._b=[],n._oneComplete=!1,n.destination.add(e.subscribe(new f(t,n))),n}r.SequenceEqualSubscriber=a;var l,f=(l=t.Subscriber,o(p,l),p.prototype._next=function(t){this.parent.nextB(t)},p.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},p.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},p);function p(t,e){t=l.call(this,t)||this;return t.parent=e,t}},{"../Subscriber":111}],213:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./multicast"),o=t("./refCount"),i=t("../Subject");function s(){return new i.Subject}r.share=function(){return function(t){return o.refCount()(n.multicast(s)(t))}}},{"../Subject":109,"./multicast":192,"./refCount":204}],214:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var p=t("../ReplaySubject");r.shareReplay=function(t,e,r){var f=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:r};return function(t){return t.lift((t=(e=f).bufferSize,o=void 0===t?Number.POSITIVE_INFINITY:t,t=e.windowTime,i=void 0===t?Number.POSITIVE_INFINITY:t,s=e.refCount,u=e.scheduler,a=0,l=c=!1,function(t){var e;a++,!r||c?(c=!1,r=new p.ReplaySubject(o,i,u),e=r.subscribe(this),n=t.subscribe({next:function(t){r.next(t)},error:function(t){c=!0,r.error(t)},complete:function(){l=!0,n=void 0,r.complete()}}),l&&(n=void 0)):e=r.subscribe(this),this.add(function(){a--,e.unsubscribe(),e=void 0,n&&!l&&s&&0===a&&(n.unsubscribe(),r=n=void 0)})}));var e,r,n,o,i,s,u,a,c,l}}},{"../ReplaySubject":107}],215:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/EmptyError");r.single=function(e){return function(t){return t.lift(new u(e,t))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.predicate,this.source))},a);function a(t,e){this.predicate=t,this.source=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},f.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},f.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},f.prototype._complete=function(){var t=this.destination;0<this.index?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new s.EmptyError)},f);function f(t,e,r){t=c.call(this,t)||this;return t.predicate=e,t.source=r,t.seenValue=!1,t.index=0,t}},{"../Subscriber":111,"../util/EmptyError":269}],216:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.skip=function(e){return function(t){return t.lift(new i(e))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.total))},s);function s(t){this.total=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},c);function c(t,e){t=u.call(this,t)||this;return t.total=e,t.count=0,t}},{"../Subscriber":111}],217:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/ArgumentOutOfRangeError");r.skipLast=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new i.Subscriber(t)):e.subscribe(new l(t,this._skipCount))},a);function a(t){if(this._skipCount=t,this._skipCount<0)throw new s.ArgumentOutOfRangeError}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){var e,r=this._skipCount,n=this._count++;n<r?this._ring[n]=t:(r=(e=this._ring)[n=n%r],e[n]=t,this.destination.next(r))},f);function f(t,e){t=c.call(this,t)||this;return t._skipCount=e,t._count=0,t._ring=new Array(e),t}},{"../Subscriber":111,"../util/ArgumentOutOfRangeError":268}],218:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.skipUntil=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.notifier))},u);function u(t){this.notifier=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){this.hasValue&&a.prototype._next.call(this,t)},l.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},l.prototype.notifyComplete=function(){},l);function l(t,e){var r=a.call(this,t)||this;r.hasValue=!1;t=new i.SimpleInnerSubscriber(r);r.add(t),r.innerSubscription=t;e=i.innerSubscribe(e,t);return e!==t&&(r.add(e),r.innerSubscription=e),r}},{"../innerSubscribe":114}],219:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.skipWhile=function(e){return function(t){return t.lift(new i(e))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate))},s);function s(t){this.predicate=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},c.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},c);function c(t,e){t=u.call(this,t)||this;return t.predicate=e,t.skipping=!0,t.index=0,t}},{"../Subscriber":111}],220:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/concat"),o=t("../util/isScheduler");r.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return o.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},{"../observable/concat":120,"../util/isScheduler":287}],221:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/SubscribeOnObservable");r.subscribeOn=function(e,r){return void 0===r&&(r=0),function(t){return t.lift(new o(e,r))}};var o=(i.prototype.call=function(t,e){return new n.SubscribeOnObservable(e,this.delay,this.scheduler).subscribe(t)},i);function i(t,e){this.scheduler=t,this.delay=e}},{"../observable/SubscribeOnObservable":116}],222:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./switchMap"),o=t("../util/identity");r.switchAll=function(){return n.switchMap(o.identity)}},{"../util/identity":276,"./switchMap":223}],223:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var s=t("./map"),u=t("../observable/from"),i=t("../innerSubscribe");r.switchMap=function e(o,i){return"function"==typeof i?function(t){return t.pipe(e(function(r,n){return u.from(o(r,n)).pipe(s.map(function(t,e){return i(r,t,n,e)}))}))}:function(t){return t.lift(new a(o))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.project))},c);function c(t){this.project=t}var l,f=(l=i.SimpleOuterSubscriber,o(p,l),p.prototype._next=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this._innerSub(e)},p.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var r=new i.SimpleInnerSubscriber(this),e=this.destination;e.add(r),this.innerSubscription=i.innerSubscribe(t,r),this.innerSubscription!==r&&e.add(this.innerSubscription)},p.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||l.prototype._complete.call(this),this.unsubscribe()},p.prototype._unsubscribe=function(){this.innerSubscription=void 0},p.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&l.prototype._complete.call(this)},p.prototype.notifyNext=function(t){this.destination.next(t)},p);function p(t,e){t=l.call(this,t)||this;return t.project=e,t.index=0,t}},{"../innerSubscribe":114,"../observable/from":124,"./map":182}],224:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./switchMap");r.switchMapTo=function(t,e){return e?n.switchMap(function(){return t},e):n.switchMap(function(){return t})}},{"./switchMap":223}],225:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/ArgumentOutOfRangeError"),u=t("../observable/empty");r.take=function(e){return function(t){return 0===e?u.empty():t.lift(new a(e))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.total))},c);function c(t){if(this.total=t,this.total<0)throw new s.ArgumentOutOfRangeError}var l,f=(l=i.Subscriber,o(p,l),p.prototype._next=function(t){var e=this.total,r=++this.count;r<=e&&(this.destination.next(t),r===e&&(this.destination.complete(),this.unsubscribe()))},p);function p(t,e){t=l.call(this,t)||this;return t.total=e,t.count=0,t}},{"../Subscriber":111,"../observable/empty":122,"../util/ArgumentOutOfRangeError":268}],226:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/ArgumentOutOfRangeError"),u=t("../observable/empty");r.takeLast=function(e){return function(t){return 0===e?u.empty():t.lift(new a(e))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.total))},c);function c(t){if(this.total=t,this.total<0)throw new s.ArgumentOutOfRangeError}var l,f=(l=i.Subscriber,o(p,l),p.prototype._next=function(t){var e=this.ring,r=this.total,n=this.count++;e.length<r?e.push(t):e[n%r]=t},p.prototype._complete=function(){var t=this.destination,e=this.count;if(0<e)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=e++%r;t.next(n[i])}t.complete()},p);function p(t,e){t=l.call(this,t)||this;return t.total=e,t.ring=new Array,t.count=0,t}},{"../Subscriber":111,"../observable/empty":122,"../util/ArgumentOutOfRangeError":268}],227:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.takeUntil=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){var r=new c(t),t=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r));return t&&!r.seenValue?(r.add(t),e.subscribe(r)):r},u);function u(t){this.notifier=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},l.prototype.notifyComplete=function(){},l);function l(t){t=a.call(this,t)||this;return t.seenValue=!1,t}},{"../innerSubscribe":114}],228:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.takeWhile=function(e,r){return void 0===r&&(r=!1),function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.inclusive))},s);function s(t,e){this.predicate=t,this.inclusive=e}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){var e,r=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void r.error(t)}this.nextOrComplete(t,e)},c.prototype.nextOrComplete=function(t,e){var r=this.destination;Boolean(e)?r.next(t):(this.inclusive&&r.next(t),r.complete())},c);function c(t,e,r){t=u.call(this,t)||this;return t.predicate=e,t.inclusive=r,t.index=0,t}},{"../Subscriber":111}],229:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/noop"),u=t("../util/isFunction");r.tap=function(e,r,n){return function(t){return t.lift(new a(e,r,n))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.nextOrObserver,this.error,this.complete))},c);function c(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}var l,f=(l=i.Subscriber,o(p,l),p.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},p.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},p.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},p);function p(t,e,r,n){t=l.call(this,t)||this;return t._tapNext=s.noop,t._tapError=s.noop,t._tapComplete=s.noop,t._tapError=r||s.noop,t._tapComplete=n||s.noop,u.isFunction(e)?(t._context=t)._tapNext=e:e&&(t._context=e,t._tapNext=e.next||s.noop,t._tapError=e.error||s.noop,t._tapComplete=e.complete||s.noop),t}},{"../Subscriber":111,"../util/isFunction":280,"../util/noop":288}],230:[function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(n,"__esModule",{value:!0});var i=t("../innerSubscribe");n.defaultThrottleConfig={leading:!0,trailing:!1},n.throttle=function(e,r){return void 0===r&&(r=n.defaultThrottleConfig),function(t){return t.lift(new s(e,!!r.leading,!!r.trailing))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector,this.leading,this.trailing))},u);function u(t,e,r){this.durationSelector=t,this.leading=e,this.trailing=r}var a,c=(a=i.SimpleOuterSubscriber,r(l,a),l.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},l.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0},l.prototype.throttle=function(t){t=this.tryDurationSelector(t);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},l.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},l.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send()},l.prototype.notifyNext=function(){this.throttlingDone()},l.prototype.notifyComplete=function(){this.throttlingDone()},l);function l(t,e,r,n){var o=a.call(this,t)||this;return o.destination=t,o.durationSelector=e,o._leading=r,o._trailing=n,o._hasValue=!1,o}},{"../innerSubscribe":114}],231:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../scheduler/async"),u=t("./throttle");r.throttleTime=function(e,r,n){return void 0===r&&(r=s.async),void 0===n&&(n=u.defaultThrottleConfig),function(t){return t.lift(new a(e,r,n.leading,n.trailing))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.duration,this.scheduler,this.leading,this.trailing))},c);function c(t,e,r,n){this.duration=t,this.scheduler=e,this.leading=r,this.trailing=n}var l,f=(l=i.Subscriber,o(p,l),p.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(h,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},p.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},p.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},p);function p(t,e,r,n,o){t=l.call(this,t)||this;return t.duration=e,t.scheduler=r,t.leading=n,t.trailing=o,t._hasTrailingValue=!1,t._trailingValue=null,t}function h(t){t.subscriber.clearThrottle()}},{"../Subscriber":111,"../scheduler/async":263,"./throttle":230}],232:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../util/EmptyError"),t=t("../Subscriber");r.throwIfEmpty=function(e){return void 0===e&&(e=f),function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.errorFactory))},u);function u(t){this.errorFactory=t}var a,c=(a=t.Subscriber,o(l,a),l.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},l.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},l);function l(t,e){t=a.call(this,t)||this;return t.errorFactory=e,t.hasValue=!1,t}function f(){return new i.EmptyError}},{"../Subscriber":111,"../util/EmptyError":269}],233:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../scheduler/async"),o=t("./scan"),i=t("../observable/defer"),s=t("./map");r.timeInterval=function(r){return void 0===r&&(r=n.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,e){t=t.current;return{value:e,current:r.now(),last:t}},{current:r.now(),value:void 0,last:void 0}),s.map(function(t){var e=t.current,r=t.last,t=t.value;return new u(t,e-r)}))})}};var u=function(t,e){this.value=t,this.interval=e};r.TimeInterval=u},{"../observable/defer":121,"../scheduler/async":263,"./map":182,"./scan":211}],234:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../scheduler/async"),o=t("../util/TimeoutError"),i=t("./timeoutWith"),s=t("../observable/throwError");r.timeout=function(t,e){return void 0===e&&(e=n.async),i.timeoutWith(t,s.throwError(new o.TimeoutError),e)}},{"../observable/throwError":139,"../scheduler/async":263,"../util/TimeoutError":272,"./timeoutWith":235}],235:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var s=t("../scheduler/async"),u=t("../util/isDate"),i=t("../innerSubscribe");r.timeoutWith=function(n,o,i){return void 0===i&&(i=s.async),function(t){var e=u.isDate(n),r=e?+n-i.now():Math.abs(n);return t.lift(new a(r,e,o,i))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},c);function c(t,e,r,n){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=r,this.scheduler=n}var l,f=(l=i.SimpleOuterSubscriber,o(p,l),p.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(t)))},p.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(p.dispatchTimeout,this.waitFor,this))},p.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),l.prototype._next.call(this,t)},p.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},p);function p(t,e,r,n,o){t=l.call(this,t)||this;return t.absoluteTimeout=e,t.waitFor=r,t.withObservable=n,t.scheduler=o,t.scheduleTimeout(),t}},{"../innerSubscribe":114,"../scheduler/async":263,"../util/isDate":279}],236:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../scheduler/async"),o=t("./map");r.timestamp=function(e){return void 0===e&&(e=n.async),o.map(function(t){return new i(t,e.now())})};var i=function(t,e){this.value=t,this.timestamp=e};r.Timestamp=i},{"../scheduler/async":263,"./map":182}],237:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./reduce");function o(t,e,r){return 0===r?[e]:(t.push(e),t)}r.toArray=function(){return n.reduce(o,[])}},{"./reduce":203}],238:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../innerSubscribe");r.window=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){t=new l(t),e=e.subscribe(t);return e.closed||t.add(s.innerSubscribe(this.windowBoundaries,new s.SimpleInnerSubscriber(t))),e},a);function a(t){this.windowBoundaries=t}var c,l=(c=s.SimpleOuterSubscriber,o(f,c),f.prototype.notifyNext=function(){this.openWindow()},f.prototype.notifyError=function(t){this._error(t)},f.prototype.notifyComplete=function(){this._complete()},f.prototype._next=function(t){this.window.next(t)},f.prototype._error=function(t){this.window.error(t),this.destination.error(t)},f.prototype._complete=function(){this.window.complete(),this.destination.complete()},f.prototype._unsubscribe=function(){this.window=null},f.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,t=this.window=new i.Subject;e.next(t)},f);function f(t){var e=c.call(this,t)||this;return e.window=new i.Subject,t.next(e.window),e}},{"../Subject":109,"../innerSubscribe":114}],239:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),u=t("../Subject");r.windowCount=function(e,r){return void 0===r&&(r=0),function(t){return t.lift(new s(e,r))}};var s=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.windowSize,this.startWindowEvery))},a);function a(t,e){this.windowSize=t,this.startWindowEvery=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){for(var e=0<this.startWindowEvery?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(t);n=this.count-n+1;0<=n&&n%e==0&&!this.closed&&o.shift().complete(),++this.count%e!=0||this.closed||(e=new u.Subject,o.push(e),r.next(e))},f.prototype._error=function(t){var e=this.windows;if(e)for(;0<e.length&&!this.closed;)e.shift().error(t);this.destination.error(t)},f.prototype._complete=function(){var t=this.windows;if(t)for(;0<t.length&&!this.closed;)t.shift().complete();this.destination.complete()},f.prototype._unsubscribe=function(){this.count=0,this.windows=null},f);function f(t,e,r){var n=c.call(this,t)||this;return n.destination=t,n.windowSize=e,n.startWindowEvery=r,n.windows=[new u.Subject],n.count=0,t.next(n.windows[0]),n}},{"../Subject":109,"../Subscriber":111}],240:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../scheduler/async"),u=t("../Subscriber"),a=t("../util/isNumeric"),c=t("../util/isScheduler");r.windowTime=function(e){var r=s.async,n=null,o=Number.POSITIVE_INFINITY;return c.isScheduler(arguments[3])&&(r=arguments[3]),c.isScheduler(arguments[2])?r=arguments[2]:a.isNumeric(arguments[2])&&(o=Number(arguments[2])),c.isScheduler(arguments[1])?r=arguments[1]:a.isNumeric(arguments[1])&&(n=Number(arguments[1])),function(t){return t.lift(new l(e,n,o,r))}};var l=(f.prototype.call=function(t,e){return e.subscribe(new _(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},f);function f(t,e,r,n){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=r,this.scheduler=n}var p,h=(p=i.Subject,o(d,p),d.prototype.next=function(t){this._numberOfNextedValues++,p.prototype.next.call(this,t)},Object.defineProperty(d.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),d);function d(){var t=null!==p&&p.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}var b,_=(b=u.Subscriber,o(y,b),y.prototype._next=function(t){for(var e=this.windows,r=e.length,n=0;n<r;n++){var o=e[n];o.closed||(o.next(t),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},y.prototype._error=function(t){for(var e=this.windows;0<e.length;)e.shift().error(t);this.destination.error(t)},y.prototype._complete=function(){for(var t=this.windows;0<t.length;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},y.prototype.openWindow=function(){var t=new h;return this.windows.push(t),this.destination.next(t),t},y.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},y);function y(t,e,r,n,o){var i=b.call(this,t)||this;i.destination=t,i.windowTimeSpan=e,i.windowCreationInterval=r,i.maxWindowSize=n,i.scheduler=o,i.windows=[];t=i.openWindow();return null!==r&&0<=r?(n={windowTimeSpan:e,windowCreationInterval:r,subscriber:i,scheduler:o},i.add(o.schedule(g,e,{subscriber:i,window:t,context:null})),i.add(o.schedule(m,r,n))):i.add(o.schedule(v,e,{subscriber:i,window:t,windowTimeSpan:e})),i}function v(t){var e=t.subscriber,r=t.windowTimeSpan,n=t.window;n&&e.closeWindow(n),t.window=e.openWindow(),this.schedule(t,r)}function m(t){var e=t.windowTimeSpan,r=t.subscriber,n=t.scheduler,o=t.windowCreationInterval,i=r.openWindow(),s={action:this,subscription:null};s.subscription=n.schedule(g,e,{subscriber:r,window:i,context:s}),this.add(s.subscription),this.schedule(t,o)}function g(t){var e=t.subscriber,r=t.window,t=t.context;t&&t.action&&t.subscription&&t.action.remove(t.subscription),e.closeWindow(r)}},{"../Subject":109,"../Subscriber":111,"../scheduler/async":263,"../util/isNumeric":283,"../util/isScheduler":287}],241:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var a=t("../Subject"),c=t("../Subscription"),i=t("../OuterSubscriber"),l=t("../util/subscribeToResult");r.windowToggle=function(e,r){return function(t){return t.lift(new s(e,r))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new p(t,this.openings,this.closingSelector))},u);function u(t,e){this.openings=t,this.closingSelector=e}var f,p=(f=i.OuterSubscriber,o(h,f),h.prototype._next=function(t){var e=this.contexts;if(e)for(var r=e.length,n=0;n<r;n++)e[n].window.next(t)},h.prototype._error=function(t){var e=this.contexts;if(this.contexts=null,e)for(var r=e.length,n=-1;++n<r;){var o=e[n];o.window.error(t),o.subscription.unsubscribe()}f.prototype._error.call(this,t)},h.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,r=-1;++r<e;){var n=t[r];n.window.complete(),n.subscription.unsubscribe()}f.prototype._complete.call(this)},h.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,r=-1;++r<e;){var n=t[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},h.prototype.notifyNext=function(t,e,r,n,o){if(t===this.openings){var i=void 0;try{i=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var s=new a.Subject,u=new c.Subscription,e={window:s,subscription:u};this.contexts.push(e);i=l.subscribeToResult(this,i,e);i.closed?this.closeWindow(this.contexts.length-1):(i.context=e,u.add(i)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(t))},h.prototype.notifyError=function(t){this.error(t)},h.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},h.prototype.closeWindow=function(t){var e,r,n;-1!==t&&(r=(n=(e=this.contexts)[t]).window,n=n.subscription,e.splice(t,1),r.complete(),n.unsubscribe())},h);function h(t,e,r){t=f.call(this,t)||this;return t.openings=e,t.closingSelector=r,t.contexts=[],t.add(t.openSubscription=l.subscribeToResult(t,e,e)),t}},{"../OuterSubscriber":106,"../Subject":109,"../Subscription":112,"../util/subscribeToResult":296}],242:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../OuterSubscriber"),u=t("../util/subscribeToResult");r.windowWhen=function(e){return function(t){return t.lift(new a(e))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.closingSelector))},c);function c(t){this.closingSelector=t}var l,f=(l=s.OuterSubscriber,o(p,l),p.prototype.notifyNext=function(t,e,r,n,o){this.openWindow(o)},p.prototype.notifyError=function(t){this._error(t)},p.prototype.notifyComplete=function(t){this.openWindow(t)},p.prototype._next=function(t){this.window.next(t)},p.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},p.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},p.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},p.prototype.openWindow=function(t){(t=void 0===t?null:t)&&(this.remove(t),t.unsubscribe());t=this.window;t&&t.complete();t=this.window=new i.Subject;this.destination.next(t);try{var e=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=u.subscribeToResult(this,e))},p);function p(t,e){var r=l.call(this,t)||this;return r.destination=t,r.closingSelector=e,r.openWindow(),r}},{"../OuterSubscriber":106,"../Subject":109,"../util/subscribeToResult":296}],243:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../OuterSubscriber"),u=t("../util/subscribeToResult");r.withLatestFrom=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return function(t){var e;"function"==typeof r[r.length-1]&&(e=r.pop());return t.lift(new s(r,e))}};var s=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.observables,this.project))},a);function a(t,e){this.observables=t,this.project=e}var c,l=(c=i.OuterSubscriber,o(f,c),f.prototype.notifyNext=function(t,e,r){this.values[r]=e;e=this.toRespond;0<e.length&&(-1!==(r=e.indexOf(r))&&e.splice(r,1))},f.prototype.notifyComplete=function(){},f.prototype._next=function(t){0===this.toRespond.length&&(t=[t].concat(this.values),this.project?this._tryProject(t):this.destination.next(t))},f.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)},f);function f(t,e,r){var n=c.call(this,t)||this;n.observables=e,n.project=r,n.toRespond=[];var o=e.length;n.values=new Array(o);for(var i=0;i<o;i++)n.toRespond.push(i);for(i=0;i<o;i++){var s=e[i];n.add(u.subscribeToResult(n,s,void 0,i))}return n}},{"../OuterSubscriber":106,"../util/subscribeToResult":296}],244:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/zip");r.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},{"../observable/zip":142}],245:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/zip");r.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},{"../observable/zip":142}],246:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../Subscription");r.scheduleArray=function(n,o){return new i.Observable(function(t){var e=new s.Subscription,r=0;return e.add(o.schedule(function(){r!==n.length?(t.next(n[r++]),t.closed||e.add(this.schedule())):t.complete()})),e})}},{"../Observable":104,"../Subscription":112}],247:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),i=t("../Subscription"),s=t("../symbol/iterator");r.scheduleIterable=function(e,r){if(!e)throw new Error("Iterable cannot be null");return new n.Observable(function(n){var o,t=new i.Subscription;return t.add(function(){o&&"function"==typeof o.return&&o.return()}),t.add(r.schedule(function(){o=e[s.iterator](),t.add(r.schedule(function(){if(!n.closed){try{var t=o.next(),e=t.value,r=t.done}catch(t){return void n.error(t)}r?n.complete():(n.next(e),this.schedule())}}))})),t})}},{"../Observable":104,"../Subscription":112,"../symbol/iterator":265}],248:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../Subscription"),u=t("../symbol/observable");r.scheduleObservable=function(n,o){return new i.Observable(function(e){var r=new s.Subscription;return r.add(o.schedule(function(){var t=n[u.observable]();r.add(t.subscribe({next:function(t){r.add(o.schedule(function(){return e.next(t)}))},error:function(t){r.add(o.schedule(function(){return e.error(t)}))},complete:function(){r.add(o.schedule(function(){return e.complete()}))}}))})),r})}},{"../Observable":104,"../Subscription":112,"../symbol/observable":266}],249:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../Observable"),i=t("../Subscription");r.schedulePromise=function(t,n){return new o.Observable(function(e){var r=new i.Subscription;return r.add(n.schedule(function(){return t.then(function(t){r.add(n.schedule(function(){e.next(t),r.add(n.schedule(function(){return e.complete()}))}))},function(t){r.add(n.schedule(function(){return e.error(t)}))})})),r})}},{"../Observable":104,"../Subscription":112}],250:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./scheduleObservable"),o=t("./schedulePromise"),i=t("./scheduleArray"),s=t("./scheduleIterable"),u=t("../util/isInteropObservable"),a=t("../util/isPromise"),c=t("../util/isArrayLike"),l=t("../util/isIterable");r.scheduled=function(t,e){if(null!=t){if(u.isInteropObservable(t))return n.scheduleObservable(t,e);if(a.isPromise(t))return o.schedulePromise(t,e);if(c.isArrayLike(t))return i.scheduleArray(t,e);if(l.isIterable(t)||"string"==typeof t)return s.scheduleIterable(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},{"../util/isArrayLike":278,"../util/isInteropObservable":281,"../util/isIterable":282,"../util/isPromise":286,"./scheduleArray":246,"./scheduleIterable":247,"./scheduleObservable":248,"./schedulePromise":249}],251:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("../Subscription"),o=(i=t.Subscription,o(s,i),s.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},s);function s(t,e){return i.call(this)||this}r.Action=o},{"../Subscription":112}],252:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncAction"),o=(i=t.AsyncAction,o(s,i),s.prototype.requestAsyncId=function(t,e,r){return null!==(r=void 0===r?0:r)&&0<r?i.prototype.requestAsyncId.call(this,t,e,r):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(function(){return t.flush(null)})))},s.prototype.recycleAsyncId=function(t,e,r){if(null!==(r=void 0===r?0:r)&&0<r||null===r&&0<this.delay)return i.prototype.recycleAsyncId.call(this,t,e,r);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)},s);function s(t,e){var r=i.call(this,t,e)||this;return r.scheduler=t,r.work=e,r}r.AnimationFrameAction=o},{"./AsyncAction":256}],253:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncScheduler"),o=(i=t.AsyncScheduler,o(s,i),s.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,o=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<o&&(t=r.shift()));if(this.active=!1,e){for(;++n<o&&(t=r.shift());)t.unsubscribe();throw e}},s);function s(){return null!==i&&i.apply(this,arguments)||this}r.AnimationFrameScheduler=o},{"./AsyncScheduler":257}],254:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../util/Immediate"),t=t("./AsyncAction"),o=(i=t.AsyncAction,o(u,i),u.prototype.requestAsyncId=function(t,e,r){return null!==(r=void 0===r?0:r)&&0<r?i.prototype.requestAsyncId.call(this,t,e,r):(t.actions.push(this),t.scheduled||(t.scheduled=s.Immediate.setImmediate(t.flush.bind(t,null))))},u.prototype.recycleAsyncId=function(t,e,r){if(null!==(r=void 0===r?0:r)&&0<r||null===r&&0<this.delay)return i.prototype.recycleAsyncId.call(this,t,e,r);0===t.actions.length&&(s.Immediate.clearImmediate(e),t.scheduled=void 0)},u);function u(t,e){var r=i.call(this,t,e)||this;return r.scheduler=t,r.work=e,r}r.AsapAction=o},{"../util/Immediate":270,"./AsyncAction":256}],255:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncScheduler"),o=(i=t.AsyncScheduler,o(s,i),s.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,o=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<o&&(t=r.shift()));if(this.active=!1,e){for(;++n<o&&(t=r.shift());)t.unsubscribe();throw e}},s);function s(){return null!==i&&i.apply(this,arguments)||this}r.AsapScheduler=o},{"./AsyncScheduler":257}],256:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./Action"),o=(i=t.Action,o(s,i),s.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var r=this.id,t=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(t,r,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(t,this.id,e),this},s.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),setInterval(t.flush.bind(t,this),r)},s.prototype.recycleAsyncId=function(t,e,r){if(null!==(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return e;clearInterval(e)},s.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;e=this._execute(t,e);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},s.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},s.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},s);function s(t,e){var r=i.call(this,t,e)||this;return r.scheduler=t,r.work=e,r.pending=!1,r}r.AsyncAction=o},{"./Action":251}],257:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../Scheduler"),o=(i=s.Scheduler,o(u,i),u.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),u.delegate&&u.delegate!==this?u.delegate.schedule(t,e,r):i.prototype.schedule.call(this,t,e,r)},u.prototype.flush=function(t){var e,r=this.actions;if(this.active)r.push(t);else{this.active=!0;do{if(e=t.execute(t.state,t.delay))break}while(t=r.shift());if(this.active=!1,e){for(;t=r.shift();)t.unsubscribe();throw e}}},u);function u(t,e){void 0===e&&(e=s.Scheduler.now);var r=i.call(this,t,function(){return u.delegate&&u.delegate!==r?u.delegate.now():e()})||this;return r.actions=[],r.active=!1,r.scheduled=void 0,r}r.AsyncScheduler=o},{"../Scheduler":108}],258:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncAction"),o=(i=t.AsyncAction,o(s,i),s.prototype.schedule=function(t,e){return 0<(e=void 0===e?0:e)?i.prototype.schedule.call(this,t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)},s.prototype.execute=function(t,e){return 0<e||this.closed?i.prototype.execute.call(this,t,e):this._execute(t,e)},s.prototype.requestAsyncId=function(t,e,r){return null!==(r=void 0===r?0:r)&&0<r||null===r&&0<this.delay?i.prototype.requestAsyncId.call(this,t,e,r):t.flush(this)},s);function s(t,e){var r=i.call(this,t,e)||this;return r.scheduler=t,r.work=e,r}r.QueueAction=o},{"./AsyncAction":256}],259:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncScheduler"),o=(i=t.AsyncScheduler,o(s,i),s);function s(){return null!==i&&i.apply(this,arguments)||this}r.QueueScheduler=o},{"./AsyncScheduler":257}],260:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./AsyncAction"),t=t("./AsyncScheduler"),t=(i=t.AsyncScheduler,o(u,i),u.prototype.flush=function(){for(var t,e,r=this.actions,n=this.maxFrames;(e=r[0])&&e.delay<=n&&(r.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=r.shift();)e.unsubscribe();throw t}},u.frameTimeFactor=10,u);function u(t,e){void 0===t&&(t=c),void 0===e&&(e=Number.POSITIVE_INFINITY);var r=i.call(this,t,function(){return r.frame})||this;return r.maxFrames=e,r.frame=0,r.index=-1,r}r.VirtualTimeScheduler=t;var a,c=(a=s.AsyncAction,o(l,a),l.prototype.schedule=function(t,e){if(void 0===e&&(e=0),!this.id)return a.prototype.schedule.call(this,t,e);this.active=!1;var r=new l(this.scheduler,this.work);return this.add(r),r.schedule(t,e)},l.prototype.requestAsyncId=function(t,e,r){this.delay=t.frame+(r=void 0===r?0:r);t=t.actions;return t.push(this),t.sort(l.sortActions),!0},l.prototype.recycleAsyncId=function(t,e,r){void 0===r&&(r=0)},l.prototype._execute=function(t,e){if(!0===this.active)return a.prototype._execute.call(this,t,e)},l.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},l);function l(t,e,r){void 0===r&&(r=t.index+=1);var n=a.call(this,t,e)||this;return n.scheduler=t,n.work=e,n.index=r,n.active=!0,n.index=t.index=r,n}r.VirtualAction=c},{"./AsyncAction":256,"./AsyncScheduler":257}],261:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./AnimationFrameAction"),t=t("./AnimationFrameScheduler");r.animationFrameScheduler=new t.AnimationFrameScheduler(n.AnimationFrameAction),r.animationFrame=r.animationFrameScheduler},{"./AnimationFrameAction":252,"./AnimationFrameScheduler":253}],262:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./AsapAction"),t=t("./AsapScheduler");r.asapScheduler=new t.AsapScheduler(n.AsapAction),r.asap=r.asapScheduler},{"./AsapAction":254,"./AsapScheduler":255}],263:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./AsyncAction"),t=t("./AsyncScheduler");r.asyncScheduler=new t.AsyncScheduler(n.AsyncAction),r.async=r.asyncScheduler},{"./AsyncAction":256,"./AsyncScheduler":257}],264:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./QueueAction"),t=t("./QueueScheduler");r.queueScheduler=new t.QueueScheduler(n.QueueAction),r.queue=r.queueScheduler},{"./QueueAction":258,"./QueueScheduler":259}],265:[function(t,e,r){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(r,"__esModule",{value:!0}),r.getSymbolIterator=n,r.iterator=n(),r.$$iterator=r.iterator},{}],266:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},{}],267:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),r.$$rxSubscriber=r.rxSubscriber},{}],268:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}r.ArgumentOutOfRangeError=n},{}],269:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}r.EmptyError=n},{}],270:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=1,o=Promise.resolve(),i={};function s(t){return t in i&&(delete i[t],!0)}r.Immediate={setImmediate:function(t){var e=n++;return i[e]=!0,o.then(function(){return s(e)&&t()}),e},clearImmediate:function(t){s(t)}},r.TestTools={pending:function(){return Object.keys(i).length}}},{}],271:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}r.ObjectUnsubscribedError=n},{}],272:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}r.TimeoutError=n},{}],273:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}r.UnsubscriptionError=n},{}],274:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../Subscriber");r.canReportError=function(t){for(;t;){var e=t.closed,r=t.destination,n=t.isStopped;if(e||n)return!1;t=r&&r instanceof o.Subscriber?r:null}return!0}},{"../Subscriber":111}],275:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hostReportError=function(t){setTimeout(function(){throw t},0)}},{}],276:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.identity=function(t){return t}},{}],277:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},{}],278:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isArrayLike=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},{}],279:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isDate=function(t){return t instanceof Date&&!isNaN(+t)}},{}],280:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isFunction=function(t){return"function"==typeof t}},{}],281:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../symbol/observable");r.isInteropObservable=function(t){return t&&"function"==typeof t[n.observable]}},{"../symbol/observable":266}],282:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../symbol/iterator");r.isIterable=function(t){return t&&"function"==typeof t[n.iterator]}},{"../symbol/iterator":265}],283:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./isArray");r.isNumeric=function(t){return!n.isArray(t)&&0<=t-parseFloat(t)+1}},{"./isArray":277}],284:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isObject=function(t){return null!==t&&"object"==typeof t}},{}],285:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable");r.isObservable=function(t){return!!t&&(t instanceof n.Observable||"function"==typeof t.lift&&"function"==typeof t.subscribe)}},{"../Observable":104}],286:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isPromise=function(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}},{}],287:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isScheduler=function(t){return t&&"function"==typeof t.schedule}},{}],288:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.noop=function(){}},{}],289:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.not=function(t,e){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=t,r.thisArg=e,r}},{}],290:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./identity");function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(t,e){return e(t)},t)}}r.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)},r.pipeFromArray=o},{"./identity":276}],291:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./subscribeToArray"),o=t("./subscribeToPromise"),i=t("./subscribeToIterable"),s=t("./subscribeToObservable"),u=t("./isArrayLike"),a=t("./isPromise"),c=t("./isObject"),l=t("../symbol/iterator"),f=t("../symbol/observable");r.subscribeTo=function(t){if(t&&"function"==typeof t[f.observable])return s.subscribeToObservable(t);if(u.isArrayLike(t))return n.subscribeToArray(t);if(a.isPromise(t))return o.subscribeToPromise(t);if(t&&"function"==typeof t[l.iterator])return i.subscribeToIterable(t);t=c.isObject(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},{"../symbol/iterator":265,"../symbol/observable":266,"./isArrayLike":278,"./isObject":284,"./isPromise":286,"./subscribeToArray":292,"./subscribeToIterable":293,"./subscribeToObservable":294,"./subscribeToPromise":295}],292:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.subscribeToArray=function(n){return function(t){for(var e=0,r=n.length;e<r&&!t.closed;e++)t.next(n[e]);t.complete()}}},{}],293:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../symbol/iterator");r.subscribeToIterable=function(n){return function(e){for(var t=n[o.iterator]();;){var r=void 0;try{r=t.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof t.return&&e.add(function(){t.return&&t.return()}),e}}},{"../symbol/iterator":265}],294:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../symbol/observable");r.subscribeToObservable=function(r){return function(t){var e=r[n.observable]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)}}},{"../symbol/observable":266}],295:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./hostReportError");r.subscribeToPromise=function(t){return function(e){return t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,n.hostReportError),e}}},{"./hostReportError":275}],296:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../InnerSubscriber"),s=t("./subscribeTo"),u=t("../Observable");r.subscribeToResult=function(t,e,r,n,o){if(!(o=void 0===o?new i.InnerSubscriber(t,r,n):o).closed)return e instanceof u.Observable?e.subscribe(o):s.subscribeTo(e)(o)}},{"../InnerSubscriber":102,"../Observable":104,"./subscribeTo":291}],297:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Subscriber"),o=t("../symbol/rxSubscriber"),i=t("../Observer");r.toSubscriber=function(t,e,r){if(t){if(t instanceof n.Subscriber)return t;if(t[o.rxSubscriber])return t[o.rxSubscriber]()}return t||e||r?new n.Subscriber(t,e,r):new n.Subscriber(i.empty)}},{"../Observer":105,"../Subscriber":111,"../symbol/rxSubscriber":267}],298:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../internal/operators/audit");r.audit=n.audit;n=t("../internal/operators/auditTime");r.auditTime=n.auditTime;n=t("../internal/operators/buffer");r.buffer=n.buffer;n=t("../internal/operators/bufferCount");r.bufferCount=n.bufferCount;n=t("../internal/operators/bufferTime");r.bufferTime=n.bufferTime;n=t("../internal/operators/bufferToggle");r.bufferToggle=n.bufferToggle;n=t("../internal/operators/bufferWhen");r.bufferWhen=n.bufferWhen;n=t("../internal/operators/catchError");r.catchError=n.catchError;n=t("../internal/operators/combineAll");r.combineAll=n.combineAll;n=t("../internal/operators/combineLatest");r.combineLatest=n.combineLatest;n=t("../internal/operators/concat");r.concat=n.concat;n=t("../internal/operators/concatAll");r.concatAll=n.concatAll;n=t("../internal/operators/concatMap");r.concatMap=n.concatMap;n=t("../internal/operators/concatMapTo");r.concatMapTo=n.concatMapTo;n=t("../internal/operators/count");r.count=n.count;n=t("../internal/operators/debounce");r.debounce=n.debounce;n=t("../internal/operators/debounceTime");r.debounceTime=n.debounceTime;n=t("../internal/operators/defaultIfEmpty");r.defaultIfEmpty=n.defaultIfEmpty;n=t("../internal/operators/delay");r.delay=n.delay;n=t("../internal/operators/delayWhen");r.delayWhen=n.delayWhen;n=t("../internal/operators/dematerialize");r.dematerialize=n.dematerialize;n=t("../internal/operators/distinct");r.distinct=n.distinct;n=t("../internal/operators/distinctUntilChanged");r.distinctUntilChanged=n.distinctUntilChanged;n=t("../internal/operators/distinctUntilKeyChanged");r.distinctUntilKeyChanged=n.distinctUntilKeyChanged;n=t("../internal/operators/elementAt");r.elementAt=n.elementAt;n=t("../internal/operators/endWith");r.endWith=n.endWith;n=t("../internal/operators/every");r.every=n.every;n=t("../internal/operators/exhaust");r.exhaust=n.exhaust;n=t("../internal/operators/exhaustMap");r.exhaustMap=n.exhaustMap;n=t("../internal/operators/expand");r.expand=n.expand;n=t("../internal/operators/filter");r.filter=n.filter;n=t("../internal/operators/finalize");r.finalize=n.finalize;n=t("../internal/operators/find");r.find=n.find;n=t("../internal/operators/findIndex");r.findIndex=n.findIndex;n=t("../internal/operators/first");r.first=n.first;n=t("../internal/operators/groupBy");r.groupBy=n.groupBy;n=t("../internal/operators/ignoreElements");r.ignoreElements=n.ignoreElements;n=t("../internal/operators/isEmpty");r.isEmpty=n.isEmpty;n=t("../internal/operators/last");r.last=n.last;n=t("../internal/operators/map");r.map=n.map;n=t("../internal/operators/mapTo");r.mapTo=n.mapTo;n=t("../internal/operators/materialize");r.materialize=n.materialize;n=t("../internal/operators/max");r.max=n.max;n=t("../internal/operators/merge");r.merge=n.merge;n=t("../internal/operators/mergeAll");r.mergeAll=n.mergeAll;n=t("../internal/operators/mergeMap");r.mergeMap=n.mergeMap,r.flatMap=n.flatMap;n=t("../internal/operators/mergeMapTo");r.mergeMapTo=n.mergeMapTo;n=t("../internal/operators/mergeScan");r.mergeScan=n.mergeScan;n=t("../internal/operators/min");r.min=n.min;n=t("../internal/operators/multicast");r.multicast=n.multicast;n=t("../internal/operators/observeOn");r.observeOn=n.observeOn;n=t("../internal/operators/onErrorResumeNext");r.onErrorResumeNext=n.onErrorResumeNext;n=t("../internal/operators/pairwise");r.pairwise=n.pairwise;n=t("../internal/operators/partition");r.partition=n.partition;n=t("../internal/operators/pluck");r.pluck=n.pluck;n=t("../internal/operators/publish");r.publish=n.publish;n=t("../internal/operators/publishBehavior");r.publishBehavior=n.publishBehavior;n=t("../internal/operators/publishLast");r.publishLast=n.publishLast;n=t("../internal/operators/publishReplay");r.publishReplay=n.publishReplay;n=t("../internal/operators/race");r.race=n.race;n=t("../internal/operators/reduce");r.reduce=n.reduce;n=t("../internal/operators/repeat");r.repeat=n.repeat;n=t("../internal/operators/repeatWhen");r.repeatWhen=n.repeatWhen;n=t("../internal/operators/retry");r.retry=n.retry;n=t("../internal/operators/retryWhen");r.retryWhen=n.retryWhen;n=t("../internal/operators/refCount");r.refCount=n.refCount;n=t("../internal/operators/sample");r.sample=n.sample;n=t("../internal/operators/sampleTime");r.sampleTime=n.sampleTime;n=t("../internal/operators/scan");r.scan=n.scan;n=t("../internal/operators/sequenceEqual");r.sequenceEqual=n.sequenceEqual;n=t("../internal/operators/share");r.share=n.share;n=t("../internal/operators/shareReplay");r.shareReplay=n.shareReplay;n=t("../internal/operators/single");r.single=n.single;n=t("../internal/operators/skip");r.skip=n.skip;n=t("../internal/operators/skipLast");r.skipLast=n.skipLast;n=t("../internal/operators/skipUntil");r.skipUntil=n.skipUntil;n=t("../internal/operators/skipWhile");r.skipWhile=n.skipWhile;n=t("../internal/operators/startWith");r.startWith=n.startWith;n=t("../internal/operators/subscribeOn");r.subscribeOn=n.subscribeOn;n=t("../internal/operators/switchAll");r.switchAll=n.switchAll;n=t("../internal/operators/switchMap");r.switchMap=n.switchMap;n=t("../internal/operators/switchMapTo");r.switchMapTo=n.switchMapTo;n=t("../internal/operators/take");r.take=n.take;n=t("../internal/operators/takeLast");r.takeLast=n.takeLast;n=t("../internal/operators/takeUntil");r.takeUntil=n.takeUntil;n=t("../internal/operators/takeWhile");r.takeWhile=n.takeWhile;n=t("../internal/operators/tap");r.tap=n.tap;n=t("../internal/operators/throttle");r.throttle=n.throttle;n=t("../internal/operators/throttleTime");r.throttleTime=n.throttleTime;n=t("../internal/operators/throwIfEmpty");r.throwIfEmpty=n.throwIfEmpty;n=t("../internal/operators/timeInterval");r.timeInterval=n.timeInterval;n=t("../internal/operators/timeout");r.timeout=n.timeout;n=t("../internal/operators/timeoutWith");r.timeoutWith=n.timeoutWith;n=t("../internal/operators/timestamp");r.timestamp=n.timestamp;n=t("../internal/operators/toArray");r.toArray=n.toArray;n=t("../internal/operators/window");r.window=n.window;n=t("../internal/operators/windowCount");r.windowCount=n.windowCount;n=t("../internal/operators/windowTime");r.windowTime=n.windowTime;n=t("../internal/operators/windowToggle");r.windowToggle=n.windowToggle;n=t("../internal/operators/windowWhen");r.windowWhen=n.windowWhen;n=t("../internal/operators/withLatestFrom");r.withLatestFrom=n.withLatestFrom;n=t("../internal/operators/zip");r.zip=n.zip;t=t("../internal/operators/zipAll");r.zipAll=t.zipAll},{"../internal/operators/audit":143,"../internal/operators/auditTime":144,"../internal/operators/buffer":145,"../internal/operators/bufferCount":146,"../internal/operators/bufferTime":147,"../internal/operators/bufferToggle":148,"../internal/operators/bufferWhen":149,"../internal/operators/catchError":150,"../internal/operators/combineAll":151,"../internal/operators/combineLatest":152,"../internal/operators/concat":153,"../internal/operators/concatAll":154,"../internal/operators/concatMap":155,"../internal/operators/concatMapTo":156,"../internal/operators/count":157,"../internal/operators/debounce":158,"../internal/operators/debounceTime":159,"../internal/operators/defaultIfEmpty":160,"../internal/operators/delay":161,"../internal/operators/delayWhen":162,"../internal/operators/dematerialize":163,"../internal/operators/distinct":164,"../internal/operators/distinctUntilChanged":165,"../internal/operators/distinctUntilKeyChanged":166,"../internal/operators/elementAt":167,"../internal/operators/endWith":168,"../internal/operators/every":169,"../internal/operators/exhaust":170,"../internal/operators/exhaustMap":171,"../internal/operators/expand":172,"../internal/operators/filter":173,"../internal/operators/finalize":174,"../internal/operators/find":175,"../internal/operators/findIndex":176,"../internal/operators/first":177,"../internal/operators/groupBy":178,"../internal/operators/ignoreElements":179,"../internal/operators/isEmpty":180,"../internal/operators/last":181,"../internal/operators/map":182,"../internal/operators/mapTo":183,"../internal/operators/materialize":184,"../internal/operators/max":185,"../internal/operators/merge":186,"../internal/operators/mergeAll":187,"../internal/operators/mergeMap":188,"../internal/operators/mergeMapTo":189,"../internal/operators/mergeScan":190,"../internal/operators/min":191,"../internal/operators/multicast":192,"../internal/operators/observeOn":193,"../internal/operators/onErrorResumeNext":194,"../internal/operators/pairwise":195,"../internal/operators/partition":196,"../internal/operators/pluck":197,"../internal/operators/publish":198,"../internal/operators/publishBehavior":199,"../internal/operators/publishLast":200,"../internal/operators/publishReplay":201,"../internal/operators/race":202,"../internal/operators/reduce":203,"../internal/operators/refCount":204,"../internal/operators/repeat":205,"../internal/operators/repeatWhen":206,"../internal/operators/retry":207,"../internal/operators/retryWhen":208,"../internal/operators/sample":209,"../internal/operators/sampleTime":210,"../internal/operators/scan":211,"../internal/operators/sequenceEqual":212,"../internal/operators/share":213,"../internal/operators/shareReplay":214,"../internal/operators/single":215,"../internal/operators/skip":216,"../internal/operators/skipLast":217,"../internal/operators/skipUntil":218,"../internal/operators/skipWhile":219,"../internal/operators/startWith":220,"../internal/operators/subscribeOn":221,"../internal/operators/switchAll":222,"../internal/operators/switchMap":223,"../internal/operators/switchMapTo":224,"../internal/operators/take":225,"../internal/operators/takeLast":226,"../internal/operators/takeUntil":227,"../internal/operators/takeWhile":228,"../internal/operators/tap":229,"../internal/operators/throttle":230,"../internal/operators/throttleTime":231,"../internal/operators/throwIfEmpty":232,"../internal/operators/timeInterval":233,"../internal/operators/timeout":234,"../internal/operators/timeoutWith":235,"../internal/operators/timestamp":236,"../internal/operators/toArray":237,"../internal/operators/window":238,"../internal/operators/windowCount":239,"../internal/operators/windowTime":240,"../internal/operators/windowToggle":241,"../internal/operators/windowWhen":242,"../internal/operators/withLatestFrom":243,"../internal/operators/zip":244,"../internal/operators/zipAll":245}],299:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,o=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===o||!o(t)))throw new Error("Unknown encoding: "+t);return e||t}function s(t){var e;switch(this.encoding=i(t),this.encoding){case"utf16le":this.text=c,this.end=l,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=p,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function u(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e,r,n=this.lastTotal-this.lastNeed,e=(e=this,128!=(192&(r=t)[0])?(e.lastNeed=0,"�"):1<e.lastNeed&&1<r.length?128!=(192&r[1])?(e.lastNeed=1,"�"):2<e.lastNeed&&2<r.length&&128!=(192&r[2])?(e.lastNeed=2,"�"):void 0:void 0);return void 0!==e?e:this.lastNeed<=t.length?(t.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,n,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1);var r=t.toString("utf16le",e);if(r){e=r.charCodeAt(r.length-1);if(55296<=e&&e<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){t=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,t)}return e}function f(t,e){var r=(t.length-e)%3;return 0==r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function p(t){t=t&&t.length?this.write(t):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}(r.StringDecoder=s).prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},s.prototype.end=function(t){t=t&&t.length?this.write(t):"";return this.lastNeed?t+"�":t},s.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var o=u(e[n]);if(0<=o)return 0<o&&(t.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=u(e[n])))return 0<o&&(t.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=u(e[n])))return 0<o&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;r=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":300}],300:[function(t,e,r){var n=t("buffer"),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return o(t,e,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,r),r.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");t=o(t);return void 0!==e?"string"==typeof r?t.fill(e,r):t.fill(e):t.fill(0),t},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:97}],301:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.WRITE=r.READ=r.Driver=void 0;var o=n(t("@babel/runtime/helpers/classCallCheck")),i=n(t("@babel/runtime/helpers/createClass")),s=n(t("@babel/runtime/helpers/inherits")),u=n(t("@babel/runtime/helpers/possibleConstructorReturn")),a=n(t("@babel/runtime/helpers/getPrototypeOf")),c=t("neo4j-driver-core"),l=n(t("./session-rx"));function f(r){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=(0,a.default)(r);return e=n?(t=(0,a.default)(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),(0,u.default)(this,e)}}var p=c.internal.constants.FETCH_ALL,t=c.driver.READ,h=c.driver.WRITE;r.WRITE=h,r.READ=t;c=function(t){(0,s.default)(r,t);var e=f(r);function r(){return(0,o.default)(this,r),e.apply(this,arguments)}return(0,i.default)(r,[{key:"rxSession",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.defaultAccessMode,r=t.bookmarks,n=t.database,o=t.fetchSize,t=t.impersonatedUser;return new l.default({session:this._newSession({defaultAccessMode:void 0===e?h:e,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:t,reactive:!0,fetchSize:function(t,e){t=parseInt(t,10);{if(0<t||t===p)return t;if(0===t||t<0)throw new Error("The fetch size can only be a positive value or ".concat(p," for ALL. However fetchSize = ").concat(t));return e}}(o,this._config.fetchSize)}),config:this._config})}}]),r}(c.Driver);r.Driver=c,r.default=c},{"./session-rx":305,"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/getPrototypeOf":90,"@babel/runtime/helpers/inherits":91,"@babel/runtime/helpers/interopRequireDefault":92,"@babel/runtime/helpers/possibleConstructorReturn":93,"neo4j-driver-core":59}],302:[function(m,t,g){!function(v){!function(){"use strict";var t=m("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(g,"__esModule",{value:!0}),g.driver=o,Object.defineProperty(g,"Neo4jError",{enumerable:!0,get:function(){return r.Neo4jError}}),Object.defineProperty(g,"error",{enumerable:!0,get:function(){return r.error}}),Object.defineProperty(g,"int",{enumerable:!0,get:function(){return r.int}}),Object.defineProperty(g,"isInt",{enumerable:!0,get:function(){return r.isInt}}),Object.defineProperty(g,"isPoint",{enumerable:!0,get:function(){return r.isPoint}}),Object.defineProperty(g,"isDate",{enumerable:!0,get:function(){return r.isDate}}),Object.defineProperty(g,"isDateTime",{enumerable:!0,get:function(){return r.isDateTime}}),Object.defineProperty(g,"isDuration",{enumerable:!0,get:function(){return r.isDuration}}),Object.defineProperty(g,"isLocalDateTime",{enumerable:!0,get:function(){return r.isLocalDateTime}}),Object.defineProperty(g,"isLocalTime",{enumerable:!0,get:function(){return r.isLocalTime}}),Object.defineProperty(g,"isTime",{enumerable:!0,get:function(){return r.isTime}}),Object.defineProperty(g,"auth",{enumerable:!0,get:function(){return r.auth}}),g.default=g.temporal=g.spatial=g.session=g.types=g.logging=g.integer=void 0;var a=m("./driver"),e=t(m("./version")),r=m("neo4j-driver-core"),c=m("neo4j-driver-bolt-connection"),n=r.internal.util,l=n.ENCRYPTION_ON,f=(n.ENCRYPTION_OFF,n.assertString),p=n.isEmptyObjectOrNull,h=r.internal.serverAddress.ServerAddress,d=r.internal.urlUtil;function o(t,o){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};f(t,"Bolt URL");var r,i=d.parseDatabaseUrl(t),n=!1,s=!1;switch(i.scheme){case"bolt":break;case"bolt+s":s=!0,r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":s=!0,r="TRUST_ALL_CERTIFICATES";break;case"neo4j":n=!0;break;case"neo4j+s":r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",n=s=!0;break;case"neo4j+ssc":r="TRUST_ALL_CERTIFICATES",n=s=!0;break;default:throw new Error("Unknown scheme: ".concat(i.scheme))}if(s){if("encrypted"in e||"trust"in e)throw new Error("Encryption/trust can only be configured either through URL or config, not both");e.encrypted=l,e.trust=r}(o=o||{}).scheme=o.scheme||"none",e.userAgent=e.userAgent||b;var u=h.fromUrl(i.hostAndPort);return new a.Driver({address:u,typename:n?"Routing":"Direct",routing:n},e,function(){{if(n)return function(t,e,r,n){return new c.RoutingConnectionProvider({id:t,config:e,log:r,hostNameResolver:n,authToken:o,address:u,userAgent:e.userAgent,routingContext:i.query})};if(!p(i.query))throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(t,"'"));return function(t,e,r){return new c.DirectConnectionProvider({id:t,config:e,log:r,authToken:o,address:u,userAgent:e.userAgent})}}}())}var i,b="neo4j-javascript/"+e.default,s={console:(i=function(t){return{level:t,logger:function(t,e){return console.log("".concat(v.Date.now()," ").concat(t.toUpperCase()," ").concat(e))}}},u.toString=function(){return i.toString()},u)};function u(t){return i.apply(this,arguments)}g.logging=s;var _={Node:r.Node,Relationship:r.Relationship,UnboundRelationship:r.UnboundRelationship,PathSegment:r.PathSegment,Path:r.Path,Result:r.Result,ResultSummary:r.ResultSummary,Record:r.Record,Point:r.Point,Date:r.Date,DateTime:r.DateTime,Duration:r.Duration,LocalDateTime:r.LocalDateTime,LocalTime:r.LocalTime,Time:r.Time,Integer:r.Integer};g.types=_;var y={READ:a.READ,WRITE:a.WRITE};g.session=y;t={toNumber:r.toNumber,toString:r.toString,inSafeRange:r.inSafeRange};g.integer=t;n={isPoint:r.isPoint};g.spatial=n;e={isDuration:r.isDuration,isLocalTime:r.isLocalTime,isTime:r.isTime,isDate:r.isDate,isLocalDateTime:r.isLocalDateTime,isDateTime:r.isDateTime};g.temporal=e;e={driver:o,int:r.int,isInt:r.isInt,isPoint:r.isPoint,isDuration:r.isDuration,isLocalTime:r.isLocalTime,isTime:r.isTime,isDate:r.isDate,isLocalDateTime:r.isLocalDateTime,isDateTime:r.isDateTime,integer:t,Neo4jError:r.Neo4jError,auth:r.auth,logging:s,types:_,session:y,error:r.error,spatial:n,temporal:e};g.default=e}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./driver":301,"./version":307,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-bolt-connection":38,"neo4j-driver-core":59}],303:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=n(t("@babel/runtime/helpers/classCallCheck")),o=n(t("@babel/runtime/helpers/createClass")),u=t("neo4j-driver-core"),a=t("rxjs"),c=t("rxjs/operators"),l=(u.internal.logger.Logger,u.internal.retryStrategy.canRetryOn),f=u.error.SERVICE_UNAVAILABLE,p=(u.error.SESSION_EXPIRED,3e4),h=1e3,d=2,b=.2;function _(t,e){return t||0===t?t:e}r.default=function(){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.maxRetryTimeout,r=void 0===e?p:e,n=t.initialDelay,o=void 0===n?h:n,e=t.delayMultiplier,n=void 0===e?d:e,e=t.delayJitter,e=void 0===e?b:e,t=t.logger,t=void 0===t?null:t;(0,s.default)(this,i),this._maxRetryTimeout=_(r,p),this._initialDelay=_(o,h),this._delayMultiplier=_(n,d),this._delayJitter=_(e,b),this._logger=t}return(0,o.default)(i,[{key:"retry",value:function(t){var s=this;return t.pipe((0,c.retryWhen)(function(t){var r=[],n=Date.now(),o=1,i=s._initialDelay;return t.pipe((0,c.flatMap)(function(t){if(!l(t))return(0,a.throwError)(t);if(r.push(t),2<=o&&Date.now()-n>=s._maxRetryTimeout){var e=(0,u.newError)("Failed after retried for ".concat(o," times in ").concat(s._maxRetryTimeout," ms. Make sure that your database is online and retry again."),f);return e.seenErrors=r,(0,a.throwError)(e)}e=s._computeNextDelay(i);return i*=s._delayMultiplier,o++,s._logger&&s._logger.warn("Transaction failed and will be retried in ".concat(e)),(0,a.of)(1).pipe((0,c.delay)(e))}))}))}},{key:"_computeNextDelay",value:function(t){var e=t*this._delayJitter;return t-e+2*e*Math.random()}}]),i}()},{"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-core":59,rxjs:99,"rxjs/operators":298}],304:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("@babel/runtime/helpers/classCallCheck")),i=n(t("@babel/runtime/helpers/createClass")),s=t("neo4j-driver-core"),u=t("rxjs"),a=t("rxjs/operators"),c={READY:0,STREAMING:1,COMPLETED:2};r.default=function(){function e(t){(0,o.default)(this,e);t=t.pipe((0,a.publishReplay)(1),(0,a.refCount)());this._result=t,this._keys=t.pipe((0,a.flatMap)(function(t){return(0,u.from)(t.keys())}),(0,a.publishReplay)(1),(0,a.refCount)()),this._records=new u.Subject,this._summary=new u.ReplaySubject,this._state=c.READY}return(0,i.default)(e,[{key:"keys",value:function(){return this._keys}},{key:"records",value:function(){var r=this;return this._result.pipe((0,a.flatMap)(function(e){return new u.Observable(function(t){return r._startStreaming({result:e,recordsObserver:t})})}))}},{key:"consume",value:function(){var r=this;return this._result.pipe((0,a.flatMap)(function(e){return new u.Observable(function(t){return r._startStreaming({result:e,summaryObserver:t})})}))}},{key:"_startStreaming",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=t.result,n=t.recordsObserver,n=void 0===n?null:n,t=t.summaryObserver,t=void 0===t?null:t,o=[];return t&&o.push(this._summary.subscribe(t)),this._state<c.STREAMING?(this._state=c.STREAMING,n&&o.push(this._records.subscribe(n)),o.push({unsubscribe:function(){r._cancel&&r._cancel()}}),0===this._records.observers.length&&r._cancel(),r.subscribe({onNext:function(t){e._records.next(t)},onCompleted:function(t){e._records.complete(),e._summary.next(t),e._summary.complete(),e._state=c.COMPLETED},onError:function(t){e._records.error(t),e._summary.error(t),e._state=c.COMPLETED}})):n&&n.error((0,s.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){o.forEach(function(t){return t.unsubscribe()})}}}]),e}()},{"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-core":59,rxjs:99,"rxjs/operators":298}],305:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("@babel/runtime/helpers/classCallCheck")),i=n(t("@babel/runtime/helpers/createClass")),s=t("rxjs"),u=t("rxjs/operators"),a=n(t("./result-rx")),c=t("neo4j-driver-core"),l=n(t("./transaction-rx")),f=n(t("./internal/retry-logic-rx")),t=c.internal.constants,p=t.ACCESS_MODE_READ,h=t.ACCESS_MODE_WRITE,d=c.internal.txConfig.TxConfig;r.default=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.session,t=t.config;(0,o.default)(this,r),this._session=e,this._retryLogic=function(t){t=t&&t.maxTransactionRetryTime?t.maxTransactionRetryTime:null;return new f.default({maxRetryTimeout:t})}(t)}return(0,i.default)(r,[{key:"run",value:function(t,r,n){var o=this;return new a.default(new s.Observable(function(e){try{e.next(o._session.run(t,r,n)),e.complete()}catch(t){e.error(t)}return function(){}}))}},{key:"beginTransaction",value:function(t){return this._beginTransaction(this._session._mode,t)}},{key:"readTransaction",value:function(t,e){return this._runTransaction(p,t,e)}},{key:"writeTransaction",value:function(t,e){return this._runTransaction(h,t,e)}},{key:"close",value:function(){var t=this;return new s.Observable(function(e){t._session.close().then(function(){e.complete()}).catch(function(t){return e.error(t)})})}},{key:"lastBookmark",value:function(){return this._session.lastBookmark()}},{key:"_beginTransaction",value:function(t,e){var r=this,n=d.empty();return e&&(n=new d(e)),new s.Observable(function(e){try{e.next(new l.default(r._session._beginTransaction(t,n))),e.complete()}catch(t){e.error(t)}return function(){}})}},{key:"_runTransaction",value:function(t,r,e){d.empty();return e&&new d(e),this._retryLogic.retry(this._beginTransaction(t,e).pipe((0,u.flatMap)(function(e){return(0,s.defer)(function(){try{return r(e)}catch(t){return(0,s.throwError)(t)}}).pipe((0,u.catchError)(function(t){return e.rollback().pipe((0,u.concat)((0,s.throwError)(t)))}),(0,u.concat)(e.commit()))})))}}]),r}()},{"./internal/retry-logic-rx":303,"./result-rx":304,"./transaction-rx":306,"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-core":59,rxjs:99,"rxjs/operators":298}],306:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("@babel/runtime/helpers/classCallCheck")),i=n(t("@babel/runtime/helpers/createClass")),s=t("rxjs"),u=n(t("./result-rx"));n(t("neo4j-driver-core"));r.default=function(){function e(t){(0,o.default)(this,e),this._txc=t}return(0,i.default)(e,[{key:"run",value:function(t,r){var n=this;return new u.default(new s.Observable(function(e){try{e.next(n._txc.run(t,r)),e.complete()}catch(t){e.error(t)}return function(){}}))}},{key:"commit",value:function(){var t=this;return new s.Observable(function(e){t._txc.commit().then(function(){e.complete()}).catch(function(t){return e.error(t)})})}},{key:"rollback",value:function(){var t=this;return new s.Observable(function(e){t._txc.rollback().then(function(){e.complete()}).catch(function(t){return e.error(t)})})}}]),e}()},{"./result-rx":304,"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-core":59,rxjs:99}],307:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default="0.0.0-dev"},{}]},{},[302])(302)});
1
+ !function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).neo4j=t()}(function(){return function n(o,i,s){function u(e,t){if(!i[e]){if(!o[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(a)return a(e,!0);throw(r=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",r}r=i[e]={exports:{}},o[e][0].call(r.exports,function(t){return u(o[e][1][t]||t)},r,r.exports,n,o,i,s)}return i[e].exports}for(var a="function"==typeof require&&require,t=0;t<s.length;t++)u(s[t]);return u}({1:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.assertImpersonatedUserIsEmpty=r.assertTxConfigIsEmpty=r.assertDatabaseIsEmpty=void 0;var n=t("neo4j-driver-core");r.assertTxConfigIsEmpty=function(t,e,r){if(void 0===e&&(e=function(){}),t&&!t.isEmpty()){t=(0,n.newError)("Driver is connected to the database that does not support transaction configuration. Please upgrade to neo4j 3.5.0 or later in order to use this functionality");throw e(t.message),r.onError(t),t}},r.assertDatabaseIsEmpty=function(t,e,r){if(void 0===e&&(e=function(){}),t){t=(0,n.newError)("Driver is connected to the database that does not support multiple databases. Please upgrade to neo4j 4.0.0 or later in order to use this functionality");throw e(t.message),r.onError(t),t}},r.assertImpersonatedUserIsEmpty=function(t,e,r){if(void 0===e&&(e=function(){}),t){t=(0,n.newError)("Driver is connected to the database that does not support user impersonation. Please upgrade to neo4j 4.4.0 or later in order to use this functionality. Trying to impersonate "+t+".");throw e(t.message),r.onError(t),t}}},{"neo4j-driver-core":59}],2:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var p=t("./bolt-protocol-util"),o=t("../packstream"),h=n(t("./request-message")),d=t("./stream-observers"),n=t("neo4j-driver-core"),i=n.internal.bookmark.Bookmark,t=n.internal.constants,s=t.ACCESS_MODE_WRITE,u=t.BOLT_PROTOCOL_V1,a=(n.internal.logger.Logger,n.internal.txConfig.TxConfig),n=(Object.defineProperty(c.prototype,"version",{get:function(){return u},enumerable:!1,configurable:!0}),c.prototype.packer=function(){return this._packer},c.prototype.unpacker=function(){return this._unpacker},c.prototype.transformMetadata=function(t){return t},c.prototype.initialize=function(t){var e=this,r=void 0===t?{}:t,n=r.userAgent,t=r.authToken,o=r.onError,i=r.onComplete,r=new d.LoginObserver({onError:function(t){return e._onLoginError(t,o)},onCompleted:function(t){return e._onLoginCompleted(t,i)}});return this.write(h.default.init(n,t),r,!0),r},c.prototype.prepareToClose=function(){},c.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,r=e.bookmark,n=e.txConfig,o=e.database,i=e.mode,s=e.impersonatedUser,u=e.beforeError,a=e.afterError,t=e.beforeComplete,e=e.afterComplete;return this.run("BEGIN",r?r.asBeginTransactionParameters():{},{bookmark:r,txConfig:n,database:o,mode:i,impersonatedUser:s,beforeError:u,afterError:a,beforeComplete:t,afterComplete:e,flush:!1})},c.prototype.commitTransaction=function(t){var e=void 0===t?{}:t,r=e.beforeError,n=e.afterError,t=e.beforeComplete,e=e.afterComplete;return this.run("COMMIT",{},{bookmark:i.empty(),txConfig:a.empty(),mode:s,beforeError:r,afterError:n,beforeComplete:t,afterComplete:e})},c.prototype.rollbackTransaction=function(t){var e=void 0===t?{}:t,r=e.beforeError,n=e.afterError,t=e.beforeComplete,e=e.afterComplete;return this.run("ROLLBACK",{},{bookmark:i.empty(),txConfig:a.empty(),mode:s,beforeError:r,afterError:n,beforeComplete:t,afterComplete:e})},c.prototype.run=function(t,e,r){var n=void 0===r?{}:r,o=(n.bookmark,n.txConfig),i=n.database,s=(n.mode,n.impersonatedUser),u=n.beforeKeys,a=n.afterKeys,c=n.beforeError,l=n.afterError,f=n.beforeComplete,r=n.afterComplete,n=n.flush,n=void 0===n||n,r=new d.ResultStreamObserver({server:this._server,beforeKeys:u,afterKeys:a,beforeError:c,afterError:l,beforeComplete:f,afterComplete:r});return(0,p.assertTxConfigIsEmpty)(o,this._onProtocolError,r),(0,p.assertDatabaseIsEmpty)(i,this._onProtocolError,r),(0,p.assertImpersonatedUserIsEmpty)(s,this._onProtocolError,r),this.write(h.default.run(t,e),r,!1),this.write(h.default.pullAll(),r,n),r},Object.defineProperty(c.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),c.prototype.reset=function(t){var e=void 0===t?{}:t,t=e.onError,e=e.onComplete,e=new d.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(h.default.reset(),e,!0),e},c.prototype._createPacker=function(t){return new o.v1.Packer(t)},c.prototype._createUnpacker=function(t,e){return new o.v1.Unpacker(t,e)},c.prototype.write=function(t,e,r){var n=this;this.queueObserverIfProtocolIsNotBroken(e)&&(this._log.isDebugEnabled()&&this._log.debug("C: "+t),this.packer().packStruct(t.signature,t.fields.map(function(t){return n.packer().packable(t)})),this._chunker.messageBoundary(),r&&this._chunker.flush())},c.prototype.notifyFatalError=function(t){return this._fatalError=t,this._responseHandler._notifyErrorToObservers(t)},c.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},c.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},c.prototype.queueObserverIfProtocolIsNotBroken=function(t){return this.isBroken()?(this.notifyFatalErrorToObserver(t),!1):this._responseHandler._queueObserver(t)},c.prototype.isBroken=function(){return!!this._fatalError},c.prototype.notifyFatalErrorToObserver=function(t){t&&t.onError&&t.onError(this._fatalError)},c.prototype.resetFailure=function(){this._responseHandler._resetFailure()},c.prototype._onLoginCompleted=function(t,e){var r;t&&(r=t.server,this._server.version||(this._server.version=r)),e&&e(t)},c.prototype._onLoginError=function(t,e){this._onProtocolError(t.message),e&&e(t)},c);function c(t,e,r,n,o,i){var s=void 0===r?{}:r,r=s.disableLosslessIntegers,s=s.useBigInt;void 0===n&&(n=function(){return null}),this._server=t||{},this._chunker=e,this._packer=this._createPacker(e),this._unpacker=this._createUnpacker(r,s),this._responseHandler=n(this),this._log=o,this._onProtocolError=i,this._fatalError=null}r.default=n},{"../packstream":43,"./bolt-protocol-util":1,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],3:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,u=i(t("./bolt-protocol-v1")),a=i(t("../packstream")),c=t("neo4j-driver-core").internal.constants.BOLT_PROTOCOL_V2,o=(s=u.default,o(l,s),l.prototype._createPacker=function(t){return new a.default.Packer(t)},l.prototype._createUnpacker=function(t,e){return new a.default.Unpacker(t,e)},Object.defineProperty(l.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),l);function l(){return null!==s&&s.apply(this,arguments)||this}r.default=o},{"../packstream":43,"./bolt-protocol-v1":2,"neo4j-driver-core":59}],4:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var u,a=s(t("./bolt-protocol-v2")),d=s(t("./request-message")),b=t("./bolt-protocol-util"),_=t("./stream-observers"),t=t("neo4j-driver-core"),c=(t.internal.bookmark.Bookmark,t.internal.constants.BOLT_PROTOCOL_V3),l=t.internal.txConfig.TxConfig,f="context",p=new _.StreamObserver,o=(u=a.default,o(h,u),Object.defineProperty(h.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),h.prototype.transformMetadata=function(t){return"t_first"in t&&(t.result_available_after=t.t_first,delete t.t_first),"t_last"in t&&(t.result_consumed_after=t.t_last,delete t.t_last),t},h.prototype.initialize=function(t){var e=this,r=void 0===t?{}:t,n=r.userAgent,t=r.authToken,o=r.onError,i=r.onComplete,r=new _.LoginObserver({onError:function(t){return e._onLoginError(t,o)},onCompleted:function(t){return e._onLoginCompleted(t,i)}});return this.write(d.default.hello(n,t),r,!0),r},h.prototype.prepareToClose=function(){this.write(d.default.goodbye(),p,!0)},h.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,r=e.bookmark,n=e.txConfig,o=e.database,i=e.impersonatedUser,s=e.mode,u=e.beforeError,a=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new _.ResultStreamObserver({server:this._server,beforeError:u,afterError:a,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),(0,b.assertDatabaseIsEmpty)(o,this._onProtocolError,e),(0,b.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,e),this.write(d.default.begin({bookmark:r,txConfig:n,mode:s}),e,!0),e},h.prototype.commitTransaction=function(t){var e=void 0===t?{}:t,r=e.beforeError,n=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new _.ResultStreamObserver({server:this._server,beforeError:r,afterError:n,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),this.write(d.default.commit(),e,!0),e},h.prototype.rollbackTransaction=function(t){var e=void 0===t?{}:t,r=e.beforeError,n=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new _.ResultStreamObserver({server:this._server,beforeError:r,afterError:n,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),this.write(d.default.rollback(),e,!0),e},h.prototype.run=function(t,e,r){var n=void 0===r?{}:r,o=n.bookmark,i=n.txConfig,s=n.database,u=n.impersonatedUser,a=n.mode,c=n.beforeKeys,l=n.afterKeys,f=n.beforeError,p=n.afterError,h=n.beforeComplete,r=n.afterComplete,n=n.flush,n=void 0===n||n,r=new _.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:h,afterComplete:r});return(0,b.assertDatabaseIsEmpty)(s,this._onProtocolError,r),(0,b.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,r),this.write(d.default.runWithMetadata(t,e,{bookmark:o,txConfig:i,mode:a}),r,!1),this.write(d.default.pullAll(),r,n),r},h.prototype.requestRoutingInformation=function(t){var e=t.routingContext,r=t.sessionContext,n=void 0===r?{}:r,o=t.onError,r=t.onCompleted,n=this.run("CALL dbms.cluster.routing.getRoutingTable($context)",((t={})[f]=void 0===e?{}:e,t),i(i({},n),{txConfig:l.empty()}));return new _.ProcedureRouteObserver({resultObserver:n,onProtocolError:this._onProtocolError,onError:o,onCompleted:r})},h);function h(){return null!==u&&u.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-util":1,"./bolt-protocol-v2":3,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],5:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var u,a=i(t("./bolt-protocol-v3")),_=i(t("./request-message")),y=t("./bolt-protocol-util"),v=t("./stream-observers"),i=t("neo4j-driver-core"),t=(i.internal.bookmark.Bookmark,i.internal.constants),c=t.BOLT_PROTOCOL_V4_0,m=t.FETCH_ALL,l=i.internal.txConfig.TxConfig,f="context",p="database",o=(u=a.default,o(h,u),Object.defineProperty(h.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),h.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,r=e.bookmark,n=e.txConfig,o=e.database,i=e.impersonatedUser,s=e.mode,u=e.beforeError,a=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new v.ResultStreamObserver({server:this._server,beforeError:u,afterError:a,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),(0,y.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,e),this.write(_.default.begin({bookmark:r,txConfig:n,database:o,mode:s}),e,!0),e},h.prototype.run=function(t,e,r){var n=void 0===r?{}:r,o=n.bookmark,i=n.txConfig,s=n.database,u=n.impersonatedUser,a=n.mode,c=n.beforeKeys,l=n.afterKeys,f=n.beforeError,p=n.afterError,h=n.beforeComplete,d=n.afterComplete,b=n.flush,r=void 0===b||b,b=n.reactive,b=void 0!==b&&b,n=n.fetchSize,n=void 0===n?m:n,d=new v.ResultStreamObserver({server:this._server,reactive:b,fetchSize:n,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:h,afterComplete:d});(0,y.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,d);u=b;return this.write(_.default.runWithMetadata(t,e,{bookmark:o,txConfig:i,database:s,mode:a}),d,u&&r),b||this.write(_.default.pull({n:n}),d,r),d},h.prototype._requestMore=function(t,e,r){this.write(_.default.pull({stmtId:t,n:e}),r,!0)},h.prototype._requestDiscard=function(t,e){this.write(_.default.discard({stmtId:t}),e,!0)},h.prototype._noOp=function(){},h.prototype.requestRoutingInformation=function(t){var e=t.routingContext,r=t.databaseName,n=void 0===r?null:r,o=t.sessionContext,i=void 0===o?{}:o,r=t.onError,o=t.onCompleted,i=this.run("CALL dbms.routing.getRoutingTable($context, $database)",((t={})[f]=void 0===e?{}:e,t[p]=n,t),s(s({},i),{txConfig:l.empty()}));return new v.ProcedureRouteObserver({resultObserver:i,onProtocolError:this._onProtocolError,onError:r,onCompleted:o})},h);function h(){return null!==u&&u.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-util":1,"./bolt-protocol-v3":4,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],6:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var u,s=i(t("./bolt-protocol-v4x0")),a=i(t("./request-message")),c=t("./stream-observers"),l=t("neo4j-driver-core").internal.constants.BOLT_PROTOCOL_V4_1,o=(u=s.default,o(f,u),Object.defineProperty(f.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),f.prototype.initialize=function(t){var e=this,r=void 0===t?{}:t,n=r.userAgent,t=r.authToken,o=r.onError,i=r.onComplete,r=new c.LoginObserver({onError:function(t){return e._onLoginError(t,o)},onCompleted:function(t){return e._onLoginCompleted(t,i)}});return this.write(a.default.hello(n,t,this._serversideRouting),r,!0),r},f);function f(t,e,r,n,o,i,s){i=u.call(this,t,e,r,n=void 0===n?function(){return null}:n,o,i)||this;return i._serversideRouting=s,i}r.default=o},{"./bolt-protocol-v4x0":5,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],7:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,i=i(t("./bolt-protocol-v4x1")),u=t("neo4j-driver-core").internal.constants.BOLT_PROTOCOL_V4_2,o=(s=i.default,o(a,s),Object.defineProperty(a.prototype,"version",{get:function(){return u},enumerable:!1,configurable:!0}),a);function a(){return null!==s&&s.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-v4x1":6,"neo4j-driver-core":59}],8:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,u=i(t("./bolt-protocol-v4x2")),a=i(t("./request-message")),c=t("./stream-observers"),t=t("neo4j-driver-core"),l=t.internal.bookmark.Bookmark,f=t.internal.constants.BOLT_PROTOCOL_V4_3,o=(s=u.default,o(p,s),Object.defineProperty(p.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),p.prototype.requestRoutingInformation=function(t){var e=t.routingContext,r=void 0===e?{}:e,n=t.databaseName,o=void 0===n?null:n,e=t.sessionContext,n=void 0===e?{}:e,e=t.onError,t=t.onCompleted,t=new c.RouteObserver({onProtocolError:this._onProtocolError,onError:e,onCompleted:t}),n=n.bookmark||l.empty();return this.write(a.default.route(r,n.values(),o),t,!0),t},p);function p(){return null!==s&&s.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-v4x2":7,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],9:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,u=i(t("./bolt-protocol-v4x3")),a=t("neo4j-driver-core"),_=i(t("./request-message")),y=t("./stream-observers"),t=a.internal.constants,c=t.BOLT_PROTOCOL_V4_4,v=t.FETCH_ALL,l=a.internal.bookmark.Bookmark,o=(s=u.default,o(f,s),Object.defineProperty(f.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),f.prototype.requestRoutingInformation=function(t){var e=t.routingContext,r=void 0===e?{}:e,n=t.databaseName,o=void 0===n?null:n,i=t.impersonatedUser,e=void 0===i?null:i,n=t.sessionContext,i=void 0===n?{}:n,n=t.onError,t=t.onCompleted,t=new y.RouteObserver({onProtocolError:this._onProtocolError,onError:n,onCompleted:t}),i=i.bookmark||l.empty();return this.write(_.default.routeV4x4(r,i.values(),{databaseName:o,impersonatedUser:e}),t,!0),t},f.prototype.run=function(t,e,r){var n=void 0===r?{}:r,o=n.bookmark,i=n.txConfig,s=n.database,u=n.mode,a=n.impersonatedUser,c=n.beforeKeys,l=n.afterKeys,f=n.beforeError,p=n.afterError,h=n.beforeComplete,d=n.afterComplete,b=n.flush,r=void 0===b||b,b=n.reactive,b=void 0!==b&&b,n=n.fetchSize,n=void 0===n?v:n,h=new y.ResultStreamObserver({server:this._server,reactive:b,fetchSize:n,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:h,afterComplete:d}),d=b;return this.write(_.default.runWithMetadata(t,e,{bookmark:o,txConfig:i,database:s,mode:u,impersonatedUser:a}),h,d&&r),b||this.write(_.default.pull({n:n}),h,r),h},f.prototype.beginTransaction=function(t){var e=void 0===t?{}:t,r=e.bookmark,n=e.txConfig,o=e.database,i=e.mode,s=e.impersonatedUser,u=e.beforeError,a=e.afterError,t=e.beforeComplete,e=e.afterComplete,e=new y.ResultStreamObserver({server:this._server,beforeError:u,afterError:a,beforeComplete:t,afterComplete:e});return e.prepareToHandleSingleResponse(),this.write(_.default.begin({bookmark:r,txConfig:n,database:o,mode:i,impersonatedUser:s}),e,!0),e},f);function f(){return null!==s&&s.apply(this,arguments)||this}r.default=o},{"./bolt-protocol-v4x3":8,"./request-message":13,"./stream-observers":16,"neo4j-driver-core":59}],10:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var f=t("neo4j-driver-core"),p=n(t("./bolt-protocol-v1")),h=n(t("./bolt-protocol-v2")),d=n(t("./bolt-protocol-v3")),b=n(t("./bolt-protocol-v4x0")),_=n(t("./bolt-protocol-v4x1")),y=n(t("./bolt-protocol-v4x2")),v=n(t("./bolt-protocol-v4x3")),m=n(t("./bolt-protocol-v4x4")),g=n(t("./response-handler"));r.default=function(t){var e=void 0===t?{}:t,r=e.version,n=e.chunker,o=e.dechunker,i=e.channel,s=e.disableLosslessIntegers,u=e.useBigInt,a=e.serversideRouting,t=e.server,c=e.log,l=e.observer;return function(t,e,r,n,o,i,s,u){switch(t){case 1:return new p.default(e,r,n,i,u,s);case 2:return new h.default(e,r,n,i,u,s);case 3:return new d.default(e,r,n,i,u,s);case 4:return new b.default(e,r,n,i,u,s);case 4.1:return new _.default(e,r,n,i,u,s,o);case 4.2:return new y.default(e,r,n,i,u,s,o);case 4.3:return new v.default(e,r,n,i,u,s,o);case 4.4:return new m.default(e,r,n,i,u,s,o);default:throw(0,f.newError)("Unknown Bolt protocol version: "+t)}}(r,t,n,{disableLosslessIntegers:s,useBigInt:u},a,function(e){var r=new g.default({transformMetadata:e.transformMetadata.bind(e),log:c,observer:l});return i.onerror=l.onError.bind(l),i.onmessage=function(t){return o.write(t)},o.onmessage=function(t){r.handleResponse(e.unpacker().unpack(t))},r},l.onProtocolError.bind(l),c)}},{"./bolt-protocol-v1":2,"./bolt-protocol-v2":3,"./bolt-protocol-v3":4,"./bolt-protocol-v4x0":5,"./bolt-protocol-v4x1":6,"./bolt-protocol-v4x2":7,"./bolt-protocol-v4x3":8,"./bolt-protocol-v4x4":9,"./response-handler":14,"neo4j-driver-core":59}],11:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../channel"),i=t("neo4j-driver-core"),s=1616949271;function o(t,e){return{major:t,minor:e}}function u(){return function(t){if(4<t.length)throw(0,i.newError)("It should not have more than 4 versions of the protocol");var o=(0,n.alloc)(20);return o.writeInt32(s),t.forEach(function(t){var e,r,n;t instanceof Array?(r=(e=t[0]).major,n=e.minor,e=t[1].minor,o.writeInt32(n-e<<16|n<<8|r)):(r=t.major,n=t.minor,o.writeInt32(n<<8|r))}),o.reset(),o}([[o(4,4),o(4,2)],o(4,1),o(4,0),o(3,0)])}r.default=function(e){var o=this;return new Promise(function(r,n){function t(t){n(t)}e.onerror=t.bind(o),e._error&&t(e._error),e.onmessage=function(e){try{var t=function(t){if(72===(t=[t.readUInt8(),t.readUInt8(),t.readUInt8(),t.readUInt8()])[0]&&84===t[1]&&84===t[2]&&80===t[3])throw(0,i.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)");return Number(t[3]+"."+t[2])}(e);r({protocolVersion:t,consumeRemainingBuffer:function(t){e.hasRemaining()&&t(e.readSlice(e.remaining()))}})}catch(t){n(t)}},e.write(u())})}},{"../channel":26,"neo4j-driver-core":59}],12:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.RawRoutingTable=r.BoltProtocol=void 0;var s=i(t("./handshake")),u=i(t("./create")),a=i(t("./bolt-protocol-v4x3")),i=i(t("./routing-table-raw"));o(t("./stream-observers"),r),r.BoltProtocol=a.default,r.RawRoutingTable=i.default,r.default={handshake:s.default,create:u.default}},{"./bolt-protocol-v4x3":8,"./create":10,"./handshake":11,"./routing-table-raw":15,"./stream-observers":16}],13:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("neo4j-driver-core"),t=o.internal.constants,s=t.ACCESS_MODE_READ,n=t.FETCH_ALL,u=o.internal.util.assertString,t=(i.init=function(t,e){return new i(1,[t,e],function(){return"INIT "+t+" {...}"})},i.run=function(t,e){return new i(16,[t,e],function(){return"RUN "+t+" "+o.json.stringify(e)})},i.pullAll=function(){return l},i.reset=function(){return f},i.hello=function(t,e,r){void 0===r&&(r=null);e=Object.assign({user_agent:t},e);return r&&(e.routing=r),new i(1,[e],function(){return"HELLO {user_agent: '"+t+"', ...}"})},i.begin=function(t){var t=void 0===t?{}:t,e=a(t.bookmark,t.txConfig,t.database,t.mode,t.impersonatedUser);return new i(17,[e],function(){return"BEGIN "+o.json.stringify(e)})},i.commit=function(){return p},i.rollback=function(){return h},i.runWithMetadata=function(t,e,r){var r=void 0===r?{}:r,n=a(r.bookmark,r.txConfig,r.database,r.mode,r.impersonatedUser);return new i(16,[t,e,n],function(){return"RUN "+t+" "+o.json.stringify(e)+" "+o.json.stringify(n)})},i.goodbye=function(){return d},i.pull=function(t){var e=void 0===t?{}:t,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=c(null==t?-1:t,(void 0===e?n:e)||n);return new i(63,[r],function(){return"PULL "+o.json.stringify(r)})},i.discard=function(t){var e=void 0===t?{}:t,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=c(null==t?-1:t,(void 0===e?n:e)||n);return new i(47,[r],function(){return"DISCARD "+o.json.stringify(r)})},i.route=function(t,e,r){return new i(102,[t=void 0===t?{}:t,e=void 0===e?[]:e,r=void 0===r?null:r],function(){return"ROUTE "+o.json.stringify(t)+" "+o.json.stringify(e)+" "+r})},i.routeV4x4=function(t,e,r){void 0===t&&(t={}),void 0===e&&(e=[]);var n={};return(r=void 0===r?{}:r).databaseName&&(n.db=r.databaseName),r.impersonatedUser&&(n.imp_user=r.impersonatedUser),new i(102,[t,e,n],function(){return"ROUTE "+o.json.stringify(t)+" "+o.json.stringify(e)+" "+o.json.stringify(n)})},i);function i(t,e,r){this.signature=t,this.fields=e,this.toString=r}function a(t,e,r,n,o){var i={};return t.isEmpty()||(i.bookmarks=t.values()),e.timeout&&(i.tx_timeout=e.timeout),e.metadata&&(i.tx_metadata=e.metadata),r&&(i.db=u(r,"database")),o&&(i.imp_user=u(o,"impersonatedUser")),n===s&&(i.mode="r"),i}function c(t,e){e={n:(0,o.int)(e)};return-1!==t&&(e.qid=(0,o.int)(t)),e}var l=new(r.default=t)(63,[],function(){return"PULL_ALL"}),f=new t(15,[],function(){return"RESET"}),p=new t(18,[],function(){return"COMMIT"}),h=new t(19,[],function(){return"ROLLBACK"}),d=new t(2,[],function(){return"GOODBYE"})},{"neo4j-driver-core":59}],14:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("neo4j-driver-core");function n(){}function i(t){return t}var s={onNext:n,onCompleted:n,onError:n},t=(Object.defineProperty(u.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),u.prototype.handleResponse=function(t){var e=t.fields[0];switch(t.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD "+o.json.stringify(t)),this._currentObserver.onNext(e);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS "+o.json.stringify(t));try{var r=this._transformMetadata(e);this._currentObserver.onCompleted(r)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE "+o.json.stringify(t));try{var n=(0,o.newError)(e.message,e.code);this._currentFailure=this._observer.onErrorApplyTransformation(n),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED "+o.json.stringify(t));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,o.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,o.newError)("Unknown Bolt protocol message: "+t))}},u.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onPendingObserversChange(this._pendingObservers.length)},u.prototype._queueObserver=function(t){return(t=t||s).onCompleted=t.onCompleted||n,t.onError=t.onError||n,t.onNext=t.onNext||n,void 0===this._currentObserver?this._currentObserver=t:this._pendingObservers.push(t),this._observer.onPendingObserversChange(this._pendingObservers.length),!0},u.prototype._notifyErrorToObservers=function(t){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(t);0<this._pendingObservers.length;){var e=this._pendingObservers.shift();e&&e.onError&&e.onError(t)}},u.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},u.prototype._resetFailure=function(){this._currentFailure=null},u);function u(t){var e=void 0===t?{}:t,r=e.transformMetadata,t=e.log,e=e.observer;this._pendingObservers=[],this._log=t,this._transformMetadata=r||i,this._observer=Object.assign({onPendingObserversChange:n,onError:n,onFailure:n,onErrorApplyTransformation:i},e)}r.default=t},{"neo4j-driver-core":59}],15:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=(s.ofRecord=function(t){return null===t?s.ofNull():new d(t)},s.ofMessageResponse=function(t){return null===t?s.ofNull():new a(t)},s.ofNull=function(){return new f},Object.defineProperty(s.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),s);function s(){}r.default=i;var u,a=(o(c,u=i),Object.defineProperty(c.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0}),c);function c(t){var e=u.call(this)||this;return e._response=t,e}var l,f=(o(p,l=i),Object.defineProperty(p.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),p);function p(){return null!==l&&l.apply(this,arguments)||this}var h,d=(o(b,h=i),Object.defineProperty(b.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0}),b);function b(t){var e=h.call(this)||this;return e._record=t,e}},{}],16:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.ProcedureRouteObserver=r.RouteObserver=r.CompletedObserver=r.FailedObserver=r.ResetObserver=r.LoginObserver=r.ResultStreamObserver=r.StreamObserver=void 0;var s=t("neo4j-driver-core"),u=i(t("./routing-table-raw")),p=s.internal.constants.FETCH_ALL,a=s.error.PROTOCOL_ERROR,c=(l.prototype.onNext=function(t){},l.prototype.onError=function(t){},l.prototype.onCompleted=function(t){},l);function l(){}r.StreamObserver=c;var h,i=(o(f,h=c),f.prototype.onNext=function(t){var e=new s.Record(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))},f.prototype.onCompleted=function(t){this._state.onSuccess(this,t)},f.prototype.onError=function(t){this._state.onError(this,t)},f.prototype.cancel=function(){this._discard=!0},f.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(j.STREAMING)},f.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(j.SUCCEEDED)},f.prototype.subscribe=function(t){if(this._error)t.onError(this._error);else{if(this._head&&t.onKeys&&t.onKeys(this._head),0<this._queuedRecords.length&&t.onNext)for(var e=0;e<this._queuedRecords.length;e++)t.onNext(this._queuedRecords[e]),this._queuedRecords.length-e-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===j.READY&&this._handleStreaming());this._tail&&t.onCompleted&&t.onCompleted(this._tail),this._observers.push(t),this._state===j.READY&&this._handleStreaming()}},f.prototype._handleHasMore=function(t){this._setState(j.READY),this._handleStreaming(),delete t.has_more},f.prototype._handlePullSuccess=function(t){var e=this;this._setState(j.SUCCEEDED);var r=Object.assign(this._server?{server:this._server}:{},this._meta,t),n=null;this._beforeComplete&&(n=this._beforeComplete(r));t=function(){e._tail=r,e._observers.some(function(t){return t.onCompleted})&&e._observers.forEach(function(t){t.onCompleted&&t.onCompleted(r)}),e._afterComplete&&e._afterComplete(r)};n?Promise.resolve(n).then(t):t()},f.prototype._handleRunSuccess=function(t,e){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},t.fields&&0<t.fields.length){this._fieldKeys=t.fields;for(var n=0;n<t.fields.length;n++)this._fieldLookup[t.fields[n]]=n;delete t.fields}null!==t.qid&&void 0!==t.qid&&(this._queryId=t.qid,delete t.qid),this._storeMetadataForCompletion(t);var o=null;this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys));var i=function(){r._head=r._fieldKeys,r._observers.some(function(t){return t.onKeys})&&r._observers.forEach(function(t){t.onKeys&&t.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),e()};o?Promise.resolve(o).then(i):i()}},f.prototype._handleError=function(e){var t=this;this._setState(j.FAILED),this._error=e;var r=null;this._beforeError&&(r=this._beforeError(e));function n(){t._observers.some(function(t){return t.onError})&&t._observers.forEach(function(t){t.onError&&t.onError(e)}),t._afterError&&t._afterError(e)}r?Promise.resolve(r).then(n):n()},f.prototype._handleStreaming=function(){this._head&&this._observers.some(function(t){return t.onNext||t.onCompleted})&&(this._discard?(this._discardFunction(this._queryId,this),this._setState(j.STREAMING)):this._autoPull&&(this._moreFunction(this._queryId,this._fetchSize,this),this._setState(j.STREAMING)))},f.prototype._storeMetadataForCompletion=function(t){for(var e,r=Object.keys(t),n=r.length;n--;)e=r[n],this._meta[e]=t[e]},f.prototype._setState=function(t){this._state=t},f.prototype._setupAuoPull=function(t){this._autoPull=!0,t===p?(this._lowRecordWatermark=Number.MAX_VALUE,this._highRecordWatermark=Number.MAX_VALUE):(this._lowRecordWatermark=.3*t,this._highRecordWatermark=.7*t)},f);function f(t){var e=void 0===t?{}:t,r=e.reactive,n=void 0!==r&&r,o=e.moreFunction,i=e.discardFunction,s=e.fetchSize,u=void 0===s?p:s,a=e.beforeError,c=e.afterError,l=e.beforeKeys,f=e.afterKeys,t=e.beforeComplete,r=e.afterComplete,s=e.server,e=h.call(this)||this;return e._fieldKeys=null,e._fieldLookup=null,e._head=null,e._queuedRecords=[],e._tail=null,e._error=null,e._observers=[],e._meta={},e._server=s,e._beforeError=a,e._afterError=c,e._beforeKeys=l,e._afterKeys=f,e._beforeComplete=t,e._afterComplete=r,e._queryId=null,e._moreFunction=o,e._discardFunction=i,e._discard=!1,e._fetchSize=u,e._setState(n?j.READY:j.READY_STREAMING),e._setupAuoPull(u),e}r.ResultStreamObserver=i;var d,t=(o(b,d=c),b.prototype.onNext=function(t){this.onError((0,s.newError)("Received RECORD when initializing "+s.json.stringify(t)))},b.prototype.onError=function(t){this._onError&&this._onError(t)},b.prototype.onCompleted=function(t){this._onCompleted&&this._onCompleted(t)},b);function b(t){var e=void 0===t?{}:t,r=e.onError,t=e.onCompleted,e=d.call(this)||this;return e._onError=r,e._onCompleted=t,e}r.LoginObserver=t;var _,t=(o(y,_=c),y.prototype.onNext=function(t){this.onError((0,s.newError)("Received RECORD when resetting: received record is: "+s.json.stringify(t),a))},y.prototype.onError=function(t){t.code===a&&this._onProtocolError&&this._onProtocolError(t.message),this._onError&&this._onError(t)},y.prototype.onCompleted=function(t){this._onComplete&&this._onComplete(t)},y);function y(t){var e=void 0===t?{}:t,r=e.onProtocolError,n=e.onError,t=e.onComplete,e=_.call(this)||this;return e._onProtocolError=r,e._onError=n,e._onComplete=t,e}r.ResetObserver=t;var v,t=(o(m,v=i),m);function m(t){var e=t.error,t=t.onError,t=v.call(this,{beforeError:t})||this;return t.onError(e),t}r.FailedObserver=t;var g,i=(o(O,g=i),O);function O(){var t=g.call(this)||this;return g.prototype.markCompleted.call(t),t}r.CompletedObserver=i;var w,i=(o(S,w=c),S.prototype.onNext=function(t){this._records.push(t)},S.prototype.onError=function(t){t.code===a&&this._onProtocolError&&this._onProtocolError(t.message),this._onError&&this._onError(t)},S.prototype.onCompleted=function(){null===this._records||1===this._records.length?this._onCompleted&&this._onCompleted(u.default.ofRecord(this._records[0])):this.onError((0,s.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+s.json.stringify(this._records),a))},S);function S(t){var e=t.resultObserver,r=t.onProtocolError,n=t.onError,o=t.onCompleted,t=w.call(this)||this;return t._resultObserver=e,t._onError=n,t._onCompleted=o,t._records=[],t._onProtocolError=r,e.subscribe(t),t}r.ProcedureRouteObserver=i;var E,c=(o(P,E=c),P.prototype.onNext=function(t){this.onError((0,s.newError)("Received RECORD when resetting: received record is: "+s.json.stringify(t),a))},P.prototype.onError=function(t){t.code===a&&this._onProtocolError&&this._onProtocolError(t.message),this._onError&&this._onError(t)},P.prototype.onCompleted=function(t){this._onCompleted&&this._onCompleted(u.default.ofMessageResponse(t))},P);function P(t){var e=void 0===t?{}:t,r=e.onProtocolError,n=e.onError,t=e.onCompleted,e=E.call(this)||this;return e._onProtocolError=r,e._onError=n,e._onCompleted=t,e}r.RouteObserver=c;var j={READY_STREAMING:{onSuccess:function(t,e){t._handleRunSuccess(e,function(){t._setState(j.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"}}}},{"./routing-table-raw":15,"neo4j-driver-core":59}],17:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=(s.prototype.getUInt8=function(t){throw new Error("Not implemented")},s.prototype.getInt8=function(t){throw new Error("Not implemented")},s.prototype.getFloat64=function(t){throw new Error("Not implemented")},s.prototype.putUInt8=function(t,e){throw new Error("Not implemented")},s.prototype.putInt8=function(t,e){throw new Error("Not implemented")},s.prototype.putFloat64=function(t,e){throw new Error("Not implemented")},s.prototype.getInt16=function(t){return this.getInt8(t)<<8|this.getUInt8(t+1)},s.prototype.getUInt16=function(t){return this.getUInt8(t)<<8|this.getUInt8(t+1)},s.prototype.getInt32=function(t){return this.getInt8(t)<<24|this.getUInt8(t+1)<<16|this.getUInt8(t+2)<<8|this.getUInt8(t+3)},s.prototype.getUInt32=function(t){return this.getUInt8(t)<<24|this.getUInt8(t+1)<<16|this.getUInt8(t+2)<<8|this.getUInt8(t+3)},s.prototype.getInt64=function(t){return this.getInt8(t)<<56|this.getUInt8(t+1)<<48|this.getUInt8(t+2)<<40|this.getUInt8(t+3)<<32|this.getUInt8(t+4)<<24|this.getUInt8(t+5)<<16|this.getUInt8(t+6)<<8|this.getUInt8(t+7)},s.prototype.getSlice=function(t,e){return new a(t,e,this)},s.prototype.putInt16=function(t,e){this.putInt8(t,e>>8),this.putUInt8(t+1,255&e)},s.prototype.putUInt16=function(t,e){this.putUInt8(t,e>>8&255),this.putUInt8(t+1,255&e)},s.prototype.putInt32=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)},s.prototype.putUInt32=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)},s.prototype.putInt64=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)},s.prototype.putBytes=function(t,e){for(var r=0,n=e.remaining();r<n;r++)this.putUInt8(t+r,e.readUInt8())},s.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},s.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},s.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},s.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},s.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},s.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},s.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},s.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},s.prototype.writeUInt8=function(t){this.putUInt8(this._updatePos(1),t)},s.prototype.writeInt8=function(t){this.putInt8(this._updatePos(1),t)},s.prototype.writeInt16=function(t){this.putInt16(this._updatePos(2),t)},s.prototype.writeInt32=function(t){this.putInt32(this._updatePos(4),t)},s.prototype.writeUInt32=function(t){this.putUInt32(this._updatePos(4),t)},s.prototype.writeInt64=function(t){this.putInt64(this._updatePos(8),t)},s.prototype.writeFloat64=function(t){this.putFloat64(this._updatePos(8),t)},s.prototype.writeBytes=function(t){this.putBytes(this._updatePos(t.remaining()),t)},s.prototype.readSlice=function(t){return this.getSlice(this._updatePos(t),t)},s.prototype._updatePos=function(t){var e=this.position;return this.position+=t,e},s.prototype.remaining=function(){return this.length-this.position},s.prototype.hasRemaining=function(){return 0<this.remaining()},s.prototype.reset=function(){this.position=0},s.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},s.prototype.toHex=function(){for(var t="",e=0;e<this.length;e++){var r=this.getUInt8(e).toString(16);t+=r=1===r.length?"0"+r:r,e!==this.length-1&&(t+=" ")}return t},s);function s(t){this.position=0,this.length=t}r.default=i;var u,a=(o(c,u=i),c.prototype.putUInt8=function(t,e){this._inner.putUInt8(this._start+t,e)},c.prototype.getUInt8=function(t){return this._inner.getUInt8(this._start+t)},c.prototype.putInt8=function(t,e){this._inner.putInt8(this._start+t,e)},c.prototype.putFloat64=function(t,e){this._inner.putFloat64(this._start+t,e)},c.prototype.getInt8=function(t){return this._inner.getInt8(this._start+t)},c.prototype.getFloat64=function(t){return this._inner.getFloat64(this._start+t)},c);function c(t,e,r){e=u.call(this,e)||this;return e._start=t,e._inner=r,e}},{}],18:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.BaseBuffer=void 0;t=n(t("./base-buf"));r.BaseBuffer=t.default,r.default=t.default},{"./base-buf":17}],19:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../channel-buf")),s=t("neo4j-driver-core"),t=s.internal.util,u=t.ENCRYPTION_OFF,a=t.ENCRYPTION_ON,t=(o.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,s.newError)("Failed to establish connection in "+this._config.connectionTimeout+"ms",this._config.connectionErrorCode),void(this.onerror&&this.onerror(this._error));this._open&&(this._error=(0,s.newError)("WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket `readyState` is: "+this._ws.readyState,this._config.connectionErrorCode),this.onerror&&this.onerror(this._error))},o.prototype.write=function(t){if(null!==this._pending)this._pending.push(t);else{if(!(t instanceof i.default))throw(0,s.newError)("Don't know how to send buffer: "+t);try{this._ws.send(t._buffer)}catch(t){if(1===this._ws.readyState)throw t;this._handleConnectionError()}}},o.prototype.close=function(){var r=this;return new Promise(function(t,e){r._ws&&3!==r._ws.readyState?(r._open=!1,r._clearConnectionTimeout(),r._ws.onclose=function(){return t()},r._ws.close()):t()})},o.prototype.setupReceiveTimeout=function(t){},o.prototype.stopReceiveTimeout=function(){},o.prototype.startReceiveTimeout=function(){},o.prototype._setupConnectionTimeout=function(){var t=this,e=this._config.connectionTimeout;if(e){var r=this._ws;return setTimeout(function(){1!==r.readyState&&(t._connectionTimeoutFired=!0,r.close())},e)}return null},o.prototype._clearConnectionTimeout=function(){var t=this._connectionTimeoutId;!t&&0!==t||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(t))},o);function o(t,e,r){void 0===e&&(e=c),void 0===r&&(r=function(t){return new WebSocket(t)}),this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this);var n,o=function(t,e){var r=function(t){return!0===t.encrypted||t.encrypted===a}(t),n=function(t){return!1===t.encrypted||t.encrypted===u}(t),t=t.trust,e=function(t){t="function"==typeof t?t():"";return t&&0<=t.toLowerCase().indexOf("https")}(e);if(function(t,e,r){null===r||(t&&!r?console.warn("Neo4j driver is configured to use secure WebSocket on a HTTP web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to not use encryption."):e&&r&&console.warn("Neo4j driver is configured to use insecure WebSocket on a HTTPS web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to use encryption."))}(r,n,e),n)return{scheme:"ws",error:null};if(e)return{scheme:"wss",error:null};if(r)return t&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==t?{scheme:null,error:(0,s.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+t+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+u+'"` in the driver configuration.')}:{scheme:"wss",error:null};return{scheme:"ws",error:null}}(this._config=t,e),e=o.scheme,o=o.error;o?this._error=o:(this._ws=function(e,r,n){var t=e+"://"+r.asHostPort();try{return n(t)}catch(t){if(function(t,e){return"SyntaxError"===t.name&&function(t){return"["===t.charAt(0)&&-1!==t.indexOf("]")}(e.asHostPort())}(t,r)){r=function(t,e){var r=e.host().replace(new RegExp(":","g"),"-").replace("%","s");return t+"://"+r+".ipv6-literal.net:"+e.port()}(e,r);return n(r)}throw t}}(e,t.address,r),this._ws.binaryType="arraybuffer",(n=this)._ws.onclose=function(t){t&&!t.wasClean&&n._handleConnectionError(),n._open=!1},this._ws.onopen=function(){n._clearConnectionTimeout();var t=n._pending;n._pending=null;for(var e=0;e<t.length;e++)n.write(t[e])},this._ws.onmessage=function(t){n.onmessage&&(t=new i.default(t.data),n.onmessage(t))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function c(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}r.default=t},{"../channel-buf":22,"neo4j-driver-core":59}],20:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("neo4j-driver-core").internal.resolver.BaseHostNameResolver,t=(o(s,i=t),s.prototype.resolve=function(t){return this._resolveToItself(t)},s);function s(){return null!==i&&i.apply(this,arguments)||this}r.default=t},{"neo4j-driver-core":59}],21:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.HostNameResolver=r.Channel=void 0;var o=n(t("./browser-channel")),t=n(t("./browser-host-name-resolver"));r.Channel=o.default,r.HostNameResolver=t.default},{"./browser-channel":19,"./browser-host-name-resolver":20}],22:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.alloc=void 0;var s,u=i(t("buffer")),t=i(t("../buf")),a=(s=t.default,o(c,s),c.prototype.getUInt8=function(t){return this._buffer.readUInt8(t)},c.prototype.getInt8=function(t){return this._buffer.readInt8(t)},c.prototype.getFloat64=function(t){return this._buffer.readDoubleBE(t)},c.prototype.putUInt8=function(t,e){this._buffer.writeUInt8(e,t)},c.prototype.putInt8=function(t,e){this._buffer.writeInt8(e,t)},c.prototype.putFloat64=function(t,e){this._buffer.writeDoubleBE(e,t)},c.prototype.putBytes=function(t,e){var r;e instanceof c?(r=Math.min(e.length-e.position,this.length-t),e._buffer.copy(this._buffer,t,e.position,e.position+r),e.position+=r):s.prototype.putBytes.call(this,t,e)},c.prototype.getSlice=function(t,e){return new c(this._buffer.slice(t,t+e))},c);function c(t){var e=this,t=(t=t)instanceof u.default.Buffer?t:"number"==typeof t&&"function"==typeof u.default.Buffer.alloc?u.default.Buffer.alloc(t):new u.default.Buffer(t);return(e=s.call(this,t.length)||this)._buffer=t,e}r.default=a,r.alloc=function(t){return new a(t)}},{"../buf":18,buffer:97}],23:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("neo4j-driver-core"),o=n.internal.util,t=o.ENCRYPTION_OFF,o=o.ENCRYPTION_ON,i=n.error.SERVICE_UNAVAILABLE,s=3e4,u=[null,void 0,!0,!1,o,t],a=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];r.default=function(t,e,r){this.address=t,this.encrypted=function(t){t=t.encrypted;if(-1!==u.indexOf(t))return t;throw(0,n.newError)("Illegal value of the encrypted setting "+t+". Expected one of "+u)}(e),this.trust=function(t){t=t.trust;if(-1!==a.indexOf(t))return t;throw(0,n.newError)("Illegal value of the trust setting "+t+". Expected one of "+a)}(e),this.trustedCertificates=e.trustedCertificates||[],this.knownHostsPath=e.knownHosts||null,this.connectionErrorCode=r||i,this.connectionTimeout=function(t){t=parseInt(t.connectionTimeout,10);return 0===t||t&&t<0?null:t||s}(e)}},{"neo4j-driver-core":59}],24:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.Dechunker=r.Chunker=void 0;var s,u=i(t("../buf/base-buf")),a=t("./channel-buf"),c=i(t("./combined-buf")),o=(s=u.default,o(l,s),l.prototype.putUInt8=function(t,e){this._ensure(1),this._buffer.writeUInt8(e)},l.prototype.putInt8=function(t,e){this._ensure(1),this._buffer.writeInt8(e)},l.prototype.putFloat64=function(t,e){this._ensure(8),this._buffer.writeFloat64(e)},l.prototype.putBytes=function(t,e){for(;0<e.remaining();)this._ensure(1),this._buffer.remaining()>e.remaining()?this._buffer.writeBytes(e):this._buffer.writeBytes(e.readSlice(this._buffer.remaining()));return this},l.prototype.flush=function(){var t;return 0<this._buffer.position&&(this._closeChunkIfOpen(),t=this._buffer,this._buffer=null,this._ch.write(t.getSlice(0,t.position)),this._buffer=(0,a.alloc)(this._bufferSize),this._chunkOpen=!1),this},l.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},l.prototype._ensure=function(t){t=this._chunkOpen?t:t+2;this._buffer.remaining()<t&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+2,this._chunkOpen=!0)},l.prototype._closeChunkIfOpen=function(){var t;this._chunkOpen&&(t=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,t),this._chunkOpen=!1)},l);function l(t,e){var r=s.call(this,0)||this;return r._bufferSize=e||1400,r._ch=t,r._buffer=(0,a.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}r.Chunker=o;f.prototype.AWAITING_CHUNK=function(t){return 2<=t.remaining()?this._onHeader(t.readUInt16()):(this._partialChunkHeader=t.readUInt8()<<8,this.IN_HEADER)},f.prototype.IN_HEADER=function(t){return this._onHeader(65535&(this._partialChunkHeader|t.readUInt8()))},f.prototype.IN_CHUNK=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)},f.prototype.CLOSED=function(t){},f.prototype._onHeader=function(t){if(0!==t)return this._chunkSize=t,this.IN_CHUNK;var e=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:e=this._currentMessage[0];break;default:e=new c.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(e),this.AWAITING_CHUNK},f.prototype.write=function(t){for(;t.hasRemaining();)this._state=this._state(t)},o=f;function f(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}r.Dechunker=o},{"../buf/base-buf":17,"./channel-buf":22,"./combined-buf":25}],25:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../buf"),u=t("./channel-buf"),o=(i=s.BaseBuffer,o(a,i),a.prototype.getUInt8=function(t){for(var e=0;e<this._buffers.length;e++){var r=this._buffers[e];if(!(t>=r.length))return r.getUInt8(t);t-=r.length}},a.prototype.getInt8=function(t){for(var e=0;e<this._buffers.length;e++){var r=this._buffers[e];if(!(t>=r.length))return r.getInt8(t);t-=r.length}},a.prototype.getFloat64=function(t){for(var e=(0,u.alloc)(8),r=0;r<8;r++)e.putUInt8(r,this.getUInt8(t+r));return e.getFloat64(0)},a);function a(t){for(var e=this,r=0,n=0;n<t.length;n++)r+=t[n].length;return(e=i.call(this,r)||this)._buffers=t,e}r.default=o},{"../buf":18,"./channel-buf":22}],26:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.utf8=r.alloc=r.ChannelConfig=void 0,o(t("./node"),r),o(t("./chunking"),r);var s=t("./channel-config");Object.defineProperty(r,"ChannelConfig",{enumerable:!0,get:function(){return i(s).default}});var u=t("./channel-buf");Object.defineProperty(r,"alloc",{enumerable:!0,get:function(){return u.alloc}});var a=t("./utf8");Object.defineProperty(r,"utf8",{enumerable:!0,get:function(){return i(a).default}})},{"./channel-buf":22,"./channel-config":23,"./chunking":24,"./node":21,"./utf8":27}],27:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t("./channel-buf")),i=t("neo4j-driver-core"),s=n(t("buffer")),u=new(t("string_decoder").StringDecoder)("utf8");r.default={encode:function(t){return new o.default((t=t,"function"==typeof s.default.Buffer.from?s.default.Buffer.from(t,"utf8"):new s.default.Buffer(t,"utf8")))},decode:function(t,e){if(Object.prototype.hasOwnProperty.call(t,"_buffer"))return n=e,o=(r=t).position,n=o+n,r.position=Math.min(n,r.length),r._buffer.toString("utf8",o,n);if(Object.prototype.hasOwnProperty.call(t,"_buffers"))return function(t,e,o,r){var i=e,s=t.position;return t._updatePos(Math.min(e,t.length-s)),t._buffers.reduce(function(t,e){if(i<=0)return t;if(s>=e.length)return s-=e.length,"";e._updatePos(s-e.position);var r=Math.min(e.length-s,i),n=e.readSlice(r);return e._updatePos(r),i=Math.max(i-n.length,0),s=0,t+o(n)},"")+r()}(t,e,function(t){return u.write(t._buffer)},function(){return u.end()});throw(0,i.newError)("Don't know how to decode strings from '"+t+"'");var r,n,o}}},{"./channel-buf":22,buffer:97,"neo4j-driver-core":59,string_decoder:299}],28:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},s=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var a,c=u(t("./connection-provider-pooled")),l=t("../connection"),u=t("neo4j-driver-core"),t=u.internal.constants,f=t.BOLT_PROTOCOL_V3,p=t.BOLT_PROTOCOL_V4_0,h=t.BOLT_PROTOCOL_V4_4,d=u.error.SERVICE_UNAVAILABLE,o=(u.error.newError,a=c.default,o(b,a),b.prototype.acquireConnection=function(t){var r=this,t=void 0===t?{}:t,n=(t.accessMode,t.database),e=(t.bookmarks,l.ConnectionErrorHandler.create({errorCode:d,handleAuthorizationExpired:function(t,e){return r._handleAuthorizationExpired(t,e,n)}}));return this._connectionPool.acquire(this._address).then(function(t){return new l.DelegateConnection(t,e)})},b.prototype._handleAuthorizationExpired=function(t,e,r){return this._log.warn("Direct driver "+this._id+" will close connection to "+e+" for database '"+r+"' because of an error "+t.code+" '"+t.message+"'"),this._connectionPool.purge(e).catch(function(){}),t},b.prototype._hasProtocolVersion=function(n){return i(this,void 0,void 0,function(){var e,r;return s(this,function(t){switch(t.label){case 0:return[4,(0,l.createChannelConnection)(this._address,this._config,this._createConnectionErrorHandler(),this._log)];case 1:return e=t.sent(),r=e.protocol()?e.protocol().version:null,[4,e.close()];case 2:return t.sent(),r?[2,n(r)]:[2,!1]}})})},b.prototype.supportsMultiDb=function(){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return p<=t})];case 1:return[2,t.sent()]}})})},b.prototype.supportsTransactionConfig=function(){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return f<=t})];case 1:return[2,t.sent()]}})})},b.prototype.supportsUserImpersonation=function(){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return h<=t})];case 1:return[2,t.sent()]}})})},b);function b(t){var e=t.id,r=t.config,n=t.log,o=t.address,i=t.userAgent,t=t.authToken,t=a.call(this,{id:e,config:r,log:n,userAgent:i,authToken:t})||this;return t._address=o,t}r.default=o},{"../connection":37,"./connection-provider-pooled":29,"neo4j-driver-core":59}],29:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return s(e,t),e},a=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},c=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}};Object.defineProperty(r,"__esModule",{value:!0});var l,f=t("../connection"),p=u(t("../pool")),t=t("neo4j-driver-core"),h=t.error.SERVICE_UNAVAILABLE,o=(l=t.ConnectionProvider,o(d,l),d.prototype._createConnectionErrorHandler=function(){return new f.ConnectionErrorHandler(h)},d.prototype._createConnection=function(t,r){var n=this;return this._createChannelConnection(t).then(function(e){return e._release=function(){return r(t,e)},(n._openConnections[e.id]=e).connect(n._userAgent,n._authToken).catch(function(t){throw n._destroyConnection(e),t})})},d.prototype._validateConnection=function(t){if(!t.isOpen())return!1;var e=this._config.maxConnectionLifetime;return Date.now()-t.creationTimestamp<=e},d.prototype._destroyConnection=function(t){return delete this._openConnections[t.id],t.close()},d.prototype.close=function(){return a(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return[4,this._connectionPool.close()];case 1:return t.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(t){return t.close()}))];case 2:return t.sent(),[2]}})})},d._installIdleObserverOnConnection=function(t,e){t._queueObserver(e)},d._removeIdleObserverOnConnection=function(t){t._updateCurrentObserver()},d);function d(t,e){var r=t.id,n=t.config,o=t.log,i=t.userAgent,t=t.authToken;void 0===e&&(e=null);var s=l.call(this)||this;return s._id=r,s._config=n,s._log=o,s._userAgent=i,s._authToken=t,s._createChannelConnection=e||function(t){return(0,f.createChannelConnection)(t,s._config,s._createConnectionErrorHandler(),s._log)},s._connectionPool=new p.default({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validate:s._validateConnection.bind(s),installIdleObserver:d._installIdleObserverOnConnection.bind(s),removeIdleObserver:d._removeIdleObserverOnConnection.bind(s),config:p.PoolConfig.fromDriverConfig(n),log:s._log}),s._openConnections={},s}r.default=o},{"../connection":37,"../pool":47,"neo4j-driver-core":59}],30:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=this&&this.__assign||function(){return(l=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return s(e,t),e},h=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},d=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},c=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},f=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var p,b=t("neo4j-driver-core"),_=u(t("../rediscovery")),y=t("../channel"),v=f(t("./connection-provider-single")),f=f(t("./connection-provider-pooled")),m=t("../load-balancing"),g=t("../connection"),O=b.error.SERVICE_UNAVAILABLE,w=b.error.SESSION_EXPIRED,S=b.internal.bookmark.Bookmark,t=b.internal.constants,E=t.ACCESS_MODE_READ,P=t.ACCESS_MODE_WRITE,j=t.BOLT_PROTOCOL_V3,T=t.BOLT_PROTOCOL_V4_0,C=t.BOLT_PROTOCOL_V4_4,x=null,I=(0,b.int)(3e4),o=(p=f.default,o(A,p),A.prototype._createConnectionErrorHandler=function(){return new g.ConnectionErrorHandler(w)},A.prototype._handleUnavailability=function(t,e,r){return this._log.warn("Routing driver "+this._id+" will forget "+e+" for database '"+r+"' because of an error "+t.code+" '"+t.message+"'"),this.forget(e,r||x),t},A.prototype._handleAuthorizationExpired=function(t,e,r){return this._log.warn("Routing driver "+this._id+" will close connections to "+e+" for database '"+r+"' because of an error "+t.code+" '"+t.message+"'"),this._connectionPool.purge(e).catch(function(){}),t},A.prototype._handleWriteFailure=function(t,e,r){return this._log.warn("Routing driver "+this._id+" will forget writer "+e+" for database '"+r+"' because of an error "+t.code+" '"+t.message+"'"),this.forgetWriter(e,r||x),(0,b.newError)("No longer possible to write to server at "+e,w)},A.prototype.acquireConnection=function(t){var t=void 0===t?{}:t,a=t.accessMode,c=t.database,l=t.bookmarks,f=t.impersonatedUser,p=t.onDatabaseNameResolved;return h(this,void 0,void 0,function(){var e,r,n,o,i,s,u=this;return d(this,function(t){switch(t.label){case 0:return n={database:c||x},o=new g.ConnectionErrorHandler(w,function(t,e){return u._handleUnavailability(t,e,n.database)},function(t,e){return u._handleWriteFailure(t,e,n.database)},function(t,e){return u._handleAuthorizationExpired(t,e,n.database)}),[4,this._freshRoutingTable({accessMode:a,database:n.database,bookmark:l,impersonatedUser:f,onDatabaseNameResolved:function(t){n.database=n.database||t,p&&p(t)}})];case 1:if(i=t.sent(),a===E)r=this._loadBalancingStrategy.selectReader(i.readers),e="read";else{if(a!==P)throw(0,b.newError)("Illegal mode "+a);r=this._loadBalancingStrategy.selectWriter(i.writers),e="write"}if(!r)throw(0,b.newError)("Failed to obtain connection towards "+e+" server. Known routing table is: "+i,w);t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this._acquireConnectionToServer(r,e,i)];case 3:return s=t.sent(),[2,new g.DelegateConnection(s,o)];case 4:throw s=t.sent(),o.handleAndTransformError(s,r);case 5:return[2]}})})},A.prototype._hasProtocolVersion=function(i){return h(this,void 0,void 0,function(){var e,r,n,o;return d(this,function(t){switch(t.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:r=t.sent(),e=0,t.label=2;case 2:if(!(e<r.length))return[3,8];t.label=3;case 3:return t.trys.push([3,6,,7]),[4,(0,g.createChannelConnection)(r[e],this._config,this._createConnectionErrorHandler(),this._log)];case 4:return r=t.sent(),n=r.protocol()?r.protocol().version:null,[4,r.close()];case 5:return t.sent(),n?[2,i(n)]:[2,!1];case 6:return o=t.sent(),o=o,[3,7];case 7:return e++,[3,2];case 8:if(o)throw o;return[2,!1]}})})},A.prototype.supportsMultiDb=function(){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return T<=t})];case 1:return[2,t.sent()]}})})},A.prototype.supportsTransactionConfig=function(){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return j<=t})];case 1:return[2,t.sent()]}})})},A.prototype.supportsUserImpersonation=function(){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this._hasProtocolVersion(function(t){return C<=t})];case 1:return[2,t.sent()]}})})},A.prototype.forget=function(e,t){this._routingTableRegistry.apply(t,{applyWhenExists:function(t){return t.forget(e)}}),this._connectionPool.purge(e).catch(function(){})},A.prototype.forgetWriter=function(e,t){this._routingTableRegistry.apply(t,{applyWhenExists:function(t){return t.forgetWriter(e)}})},A.prototype._acquireConnectionToServer=function(t,e,r){return this._connectionPool.acquire(t)},A.prototype._freshRoutingTable=function(t){var e=void 0===t?{}:t,r=e.accessMode,n=e.database,o=e.bookmark,i=e.impersonatedUser,t=e.onDatabaseNameResolved,e=this._routingTableRegistry.get(n,function(){return new _.RoutingTable({database:n})});return e.isStaleFor(r)?(this._log.info('Routing table is stale for database: "'+n+'" and access mode: "'+r+'": '+e),this._refreshRoutingTable(e,o,i,t)):e},A.prototype._refreshRoutingTable=function(t,e,r,n){var o=t.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,t,e,r,n):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,t,e,r,n)},A.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(n,o,i,s,u){return h(this,void 0,void 0,function(){var e,r;return d(this,function(t){switch(t.label){case 0:return e=[],[4,this._fetchRoutingTableUsingSeedRouter(e,this._seedRouter,o,i,s)];case 1:return(r=t.sent())?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(n,o,i,s)];case 3:r=t.sent(),t.label=4;case 4:return[4,this._applyRoutingTableIfPossible(o,r,u)];case 5:return[2,t.sent()]}})})},A.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(r,n,o,i,s){return h(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(r,n,o,i)];case 1:return(e=t.sent())?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(r,this._seedRouter,n,o,i)];case 2:e=t.sent(),t.label=3;case 3:return[4,this._applyRoutingTableIfPossible(n,e,s)];case 4:return[2,t.sent()]}})})},A.prototype._fetchRoutingTableUsingKnownRouters=function(r,n,o,i){return h(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,this._fetchRoutingTable(r,n,o,i)];case 1:return(e=t.sent())?[2,e]:(e=r.length-1,A._forgetRouter(n,r,e),[2,null])}})})},A.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,s){return h(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,this._resolveSeedRouter(n)];case 1:return e=t.sent(),e=e.filter(function(t){return r.indexOf(t)<0}),[4,this._fetchRoutingTable(e,o,i,s)];case 2:return[2,t.sent()]}})})},A.prototype._resolveSeedRouter=function(n){return h(this,void 0,void 0,function(){var e,r=this;return d(this,function(t){switch(t.label){case 0:return[4,this._hostNameResolver.resolve(n)];case 1:return e=t.sent(),[4,Promise.all(e.map(function(t){return r._dnsResolver.resolve(t)}))];case 2:return e=t.sent(),[2,[].concat.apply([],e)]}})})},A.prototype._fetchRoutingTable=function(s,u,a,c){var t=this;return s.reduce(function(n,o,i){return h(t,void 0,void 0,function(){var e,r;return d(this,function(t){switch(t.label){case 0:return[4,n];case 1:return(r=t.sent())?[2,r]:(A._forgetRouter(u,s,i-1),[4,this._createSessionForRediscovery(o,a,c)]);case 2:if(!(e=t.sent()))return[3,8];t.label=3;case 3:return t.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(e,u.database,o,c)];case 4:return[2,t.sent()];case 5:if((r=t.sent())&&"Neo.ClientError.Database.DatabaseNotFound"===r.code)throw r;return this._log.warn("unable to fetch routing table because of an error "+r),[2,null];case 6:return e.close(),[7];case 7:return[3,9];case 8:return[2,null];case 9:return[2]}})})},Promise.resolve(null))},A.prototype._createSessionForRediscovery=function(o,i,s){return h(this,void 0,void 0,function(){var e,r,n=this;return d(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this._connectionPool.acquire(o)];case 1:return e=t.sent(),r=g.ConnectionErrorHandler.create({errorCode:w,handleAuthorizationExpired:function(t,e){return n._handleAuthorizationExpired(t,e)}}),r=new v.default(new g.DelegateConnection(e,r)),e.protocol().version<4?[2,new b.Session({mode:P,bookmark:S.empty(),connectionProvider:r})]:[2,new b.Session({mode:E,database:"system",bookmark:i,connectionProvider:r,impersonatedUser:s})];case 2:if((r=t.sent())&&"Neo.ClientError.Security.Unauthorized"===r.code)throw r;return[2,null];case 3:return[2]}})})},A.prototype._applyRoutingTableIfPossible=function(e,r,n){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:if(!r)throw(0,b.newError)("Could not perform discovery. No routing servers available. Known routing table: "+e,O);return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r,n)];case 1:return t.sent(),[2,r]}})})},A.prototype._updateRoutingTable=function(e,r){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this._connectionPool.keepAll(e.allServers())];case 1:return t.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(e),r(e.database),this._log.info("Updated routing table "+e),[2]}})})},A._forgetRouter=function(t,e,r){r=e[r];t&&r&&t.forgetRouter(r)},A);function A(t){var e=t.id,r=t.address,n=t.routingContext,o=t.hostNameResolver,i=t.config,s=t.log,u=t.userAgent,a=t.authToken,t=t.routingTablePurgeDelay,c=p.call(this,{id:e,config:i,log:s,userAgent:u,authToken:a},function(t){return(0,g.createChannelConnection)(t,c._config,c._createConnectionErrorHandler(),c._log,c._routingContext)})||this;return c._routingContext=l(l({},n),{address:r.toString()}),c._seedRouter=r,c._rediscovery=new _.default(c._routingContext),c._loadBalancingStrategy=new m.LeastConnectedLoadBalancingStrategy(c._connectionPool),c._hostNameResolver=o,c._dnsResolver=new y.HostNameResolver,c._log=s,c._useSeedRouter=!0,c._routingTableRegistry=new R(t?(0,b.int)(t):I),c}r.default=o;var R=(k.prototype.register=function(t){return this._tables.set(t.database,t),this},k.prototype.apply=function(t,e){var r=void 0===e?{}:e,e=r.applyWhenExists,r=r.applyWhenDontExists,r=void 0===r?function(){}:r;return this._tables.has(t)?e(this._tables.get(t)):"string"==typeof t||null===t?r():this._forEach(e),this},k.prototype.get=function(t,e){return this._tables.has(t)?this._tables.get(t):"function"==typeof e?e():e},k.prototype.removeExpired=function(){var e=this;return this._removeIf(function(t){return t.isExpiredFor(e._routingTablePurgeDelay)})},k.prototype._forEach=function(t){var e,r;try{for(var n=a(this._tables),o=n.next();!o.done;o=n.next())t(c(o.value,2)[1])}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},k.prototype._remove=function(t){return this._tables.delete(t),this},k.prototype._removeIf=function(t){var e,r;try{for(var n=a(this._tables),o=n.next();!o.done;o=n.next()){var i=c(o.value,2),s=i[0];t(i[1])&&this._remove(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},k);function k(t){this._tables=new Map,this._routingTablePurgeDelay=t}},{"../channel":26,"../connection":37,"../load-balancing":39,"../rediscovery":50,"./connection-provider-pooled":29,"./connection-provider-single":31,"neo4j-driver-core":59}],31:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("neo4j-driver-core"),o=(i=t.ConnectionProvider,o(s,i),s.prototype.acquireConnection=function(t){t=void 0===t?{}:t,t.accessMode,t.database,t.bookmarks,t=this._connection;return this._connection=null,Promise.resolve(t)},s);function s(t){var e=i.call(this)||this;return e._connection=t,e}r.default=o},{"neo4j-driver-core":59}],32:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.RoutingConnectionProvider=r.DirectConnectionProvider=r.PooledConnectionProvider=r.SingleConnectionProvider=void 0;var o=t("./connection-provider-single");Object.defineProperty(r,"SingleConnectionProvider",{enumerable:!0,get:function(){return n(o).default}});var i=t("./connection-provider-pooled");Object.defineProperty(r,"PooledConnectionProvider",{enumerable:!0,get:function(){return n(i).default}});var s=t("./connection-provider-direct");Object.defineProperty(r,"DirectConnectionProvider",{enumerable:!0,get:function(){return n(s).default}});var u=t("./connection-provider-routing");Object.defineProperty(r,"RoutingConnectionProvider",{enumerable:!0,get:function(){return n(u).default}})},{"./connection-provider-direct":28,"./connection-provider-pooled":29,"./connection-provider-routing":30,"./connection-provider-single":31}],33:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},s=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.createChannelConnection=void 0;var f=t("../channel"),a=t("neo4j-driver-core"),c=u(t("./connection")),p=u(t("../bolt")),l=a.error.PROTOCOL_ERROR,h=a.internal.logger.Logger,d=0;r.createChannelConnection=function(i,s,u,a,c,t){void 0===c&&(c=null);var l=(t=void 0===t?function(t){return new f.Channel(t)}:t)(new f.ChannelConfig(i,s,u.errorCode()));return p.default.handshake(l).then(function(t){var r=t.protocolVersion,e=t.consumeRemainingBuffer,n=new f.Chunker(l),o=new f.Dechunker,t=new _(l,u,i,a,s.disableLosslessIntegers,c,n,function(e){return p.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:s.disableLosslessIntegers,useBigInt:s.useBigInt,serversideRouting:c,server:e.server,log:e.logger,observer:{onPendingObserversChange:e._handleOngoingRequestsNumberChange.bind(e),onError:e._handleFatalError.bind(e),onFailure:e._resetOnFailure.bind(e),onProtocolError:e._handleProtocolError.bind(e),onErrorApplyTransformation:function(t){return e.handleAndTransformError(t,e._address)}}})});return e(function(t){return o.write(t)}),t}).catch(function(t){return l.close().then(function(){throw t})})};var b,_=(b=c.default,o(y,b),Object.defineProperty(y.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(t){this._dbConnectionId=t},enumerable:!1,configurable:!0}),y.prototype.connect=function(t,e){return this._initialize(t,e)},y.prototype._initialize=function(t,n){var o=this,i=this;return new Promise(function(r,e){o._protocol.initialize({userAgent:t,authToken:n,onError:function(t){return e(t)},onComplete:function(t){var e;t&&(e=t.server,o.version&&!e||(o.version=e),e=t.connection_id,o.databaseId||(o.databaseId=e),!t.hints||null!=(t=t.hints["connection.recv_timeout_seconds"])&&(t=(0,a.toNumber)(t),Number.isInteger(t)&&0<t?o._ch.setupReceiveTimeout(1e3*t):o._log.info("Server located at "+o._address+" supplied an invalid connection receive timeout value ("+t+"). Please, verify the server configuration and status because this can be the symptom of a bigger issue."))),r(i)}})})},y.prototype.protocol=function(){return this._protocol},Object.defineProperty(y.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"version",{get:function(){return this._server.version},set:function(t){this._server.version=t},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),y.prototype._handleFatalError=function(t){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||t,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by "+this._error+" ("+a.json.stringify(this._error)+")"),this._protocol.notifyFatalError(this._error)},y.prototype._queueObserver=function(t){return this._protocol.queueObserverIfProtocolIsNotBroken(t)},y.prototype.hasOngoingObservableRequests=function(){return this._protocol.hasOngoingObservableRequests()},y.prototype.resetAndFlush=function(){var r=this;return new Promise(function(t,e){r._protocol.reset({onError:function(t){r._isBroken?e(t):(t=r._handleProtocolError("Received FAILURE as a response for RESET: "+t),e(t))},onComplete:function(){t()}})})},y.prototype._resetOnFailure=function(){var t=this;this.isOpen()&&this._protocol.reset({onError:function(){t._protocol.resetFailure()},onComplete:function(){t._protocol.resetFailure()}})},y.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},y.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},y.prototype._handleOngoingRequestsNumberChange=function(t){0===t?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout()},y.prototype.close=function(){return i(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return t.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},y.prototype.toString=function(){return"Connection ["+this.id+"]["+(this.databaseId||"")+"]"},y.prototype._handleProtocolError=function(t){this._protocol.resetFailure(),this._updateCurrentObserver();t=(0,a.newError)(t,l);return this._handleFatalError(t),t},y);function y(t,e,r,n,o,i,s,u){void 0===o&&(o=!1),void 0===i&&(i=null);var a,c,e=b.call(this,e)||this;return e._id=d++,e._address=r,e._server={address:r.asHostPort()},e.creationTimestamp=Date.now(),e._disableLosslessIntegers=o,e._ch=t,e._chunker=s,e._log=(a=e,new h((c=n)._level,function(t,e){return c._loggerFunction(t,a+" "+e)})),e._serversideRouting=i,e._dbConnectionId=null,e._protocol=u(e),e._isBroken=!1,e._log.isDebugEnabled()&&e._log.debug("created towards "+r),e}r.default=_},{"../bolt":12,"../channel":26,"./connection":36,"neo4j-driver-core":59}],34:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,t=i(t("./connection")),o=(s=t.default,o(u,s),Object.defineProperty(u.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(t){this._delegate.databaseId=t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"version",{get:function(){return this._delegate.version},set:function(t){this._delegate.version=t},enumerable:!1,configurable:!0}),u.prototype.isOpen=function(){return this._delegate.isOpen()},u.prototype.protocol=function(){return this._delegate.protocol()},u.prototype.connect=function(t,e){return this._delegate.connect(t,e)},u.prototype.write=function(t,e,r){return this._delegate.write(t,e,r)},u.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},u.prototype.close=function(){return this._delegate.close()},u.prototype._release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate._release()},u);function u(t,e){var r=s.call(this,e)||this;return e&&(r._originalErrorHandler=t._errorHandler,t._errorHandler=r._errorHandler),r._delegate=t,r}r.default=o},{"./connection":36}],35:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=t("neo4j-driver-core"),n=t.error.SERVICE_UNAVAILABLE,o=t.error.SESSION_EXPIRED,t=(i.create=function(t){return new i(t.errorCode,t.handleUnavailability,t.handleWriteFailure,t.handleAuthorizationExpired)},i.prototype.errorCode=function(){return this._errorCode},i.prototype.handleAndTransformError=function(t,e){return!(r=t)||"Neo.ClientError.Security.AuthorizationExpired"!==r.code&&"Neo.ClientError.Security.TokenExpired"!==r.code?function(t){if(t)return t.code===o||t.code===n||"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:this._handleAuthorizationExpired(t,e);var r},i);function i(t,e,r,n){this._errorCode=t,this._handleUnavailability=e||s,this._handleWriteFailure=r||s,this._handleAuthorizationExpired=n||s}function s(t){return t}r.default=t},{"neo4j-driver-core":59}],36:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(Object.defineProperty(o.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(t){throw new Error("not implemented")},enumerable:!1,configurable:!0}),o.prototype.isOpen=function(){throw new Error("not implemented")},o.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(o.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(t){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),o.prototype.connect=function(t,e){throw new Error("not implemented")},o.prototype.write=function(t,e,r){throw new Error("not implemented")},o.prototype.resetAndFlush=function(){throw new Error("not implemented")},o.prototype.close=function(){throw new Error("not implemented")},o.prototype.handleAndTransformError=function(t,e){return this._errorHandler?this._errorHandler.handleAndTransformError(t,e):t},o);function o(t){this._errorHandler=t}r.default=n},{}],37:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.createChannelConnection=r.ConnectionErrorHandler=r.DelegateConnection=r.ChannelConnection=r.Connection=void 0;var u=s(t("./connection"));r.Connection=u.default;var a=i(t("./connection-channel"));r.ChannelConnection=a.default,Object.defineProperty(r,"createChannelConnection",{enumerable:!0,get:function(){return a.createChannelConnection}});i=s(t("./connection-delegate"));r.DelegateConnection=i.default;t=s(t("./connection-error-handler"));r.ConnectionErrorHandler=t.default,r.default=u.default},{"./connection":36,"./connection-channel":33,"./connection-delegate":34,"./connection-error-handler":35}],38:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},s=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.pool=r.packstream=r.channel=r.buf=r.bolt=r.loadBalancing=void 0,r.loadBalancing=i(t("./load-balancing")),r.bolt=i(t("./bolt")),r.buf=i(t("./buf")),r.channel=i(t("./channel")),r.packstream=i(t("./packstream")),r.pool=i(t("./pool")),s(t("./connection-provider"),r)},{"./bolt":12,"./buf":18,"./channel":26,"./connection-provider":32,"./load-balancing":39,"./packstream":43,"./pool":47}],39:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.LeastConnectedLoadBalancingStrategy=r.LoadBalancingStrategy=void 0;var o=n(t("./load-balancing-strategy"));r.LoadBalancingStrategy=o.default;t=n(t("./least-connected-load-balancing-strategy"));r.LeastConnectedLoadBalancingStrategy=t.default,r.default=t.default},{"./least-connected-load-balancing-strategy":40,"./load-balancing-strategy":41}],40:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s,u=i(t("./round-robin-array-index")),t=i(t("./load-balancing-strategy")),o=(s=t.default,o(a,s),a.prototype.selectReader=function(t){return this._select(t,this._readersIndex)},a.prototype.selectWriter=function(t){return this._select(t,this._writersIndex)},a.prototype._select=function(t,e){var r=t.length;if(0===r)return null;var n=e.next(r),o=n,i=null,s=Number.MAX_SAFE_INTEGER;do{var u=t[o],a=this._connectionPool.activeResourceCount(u)}while(a<s&&(i=u,s=a),o===r-1?o=0:o++,o!==n);return i},a);function a(t){var e=s.call(this)||this;return e._readersIndex=new u.default,e._writersIndex=new u.default,e._connectionPool=t,e}r.default=o},{"./load-balancing-strategy":41,"./round-robin-array-index":42}],41:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.selectReader=function(t){throw new Error("Abstract function")},o.prototype.selectWriter=function(t){throw new Error("Abstract function")},o);function o(){}r.default=n},{}],42:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.next=function(t){if(0===t)return-1;var e=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),e%t},o);function o(t){this._offset=t||0}r.default=n},{}],43:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.v2=r.v1=void 0;var s=i(t("./packstream-v1"));r.v1=s;t=i(t("./packstream-v2"));r.v2=t,r.default=t},{"./packstream-v1":44,"./packstream-v2":45}],44:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Structure=r.Unpacker=r.Packer=void 0;var o=t("../channel"),f=t("neo4j-driver-core"),n=f.error.PROTOCOL_ERROR,u=(i.prototype.toString=function(){for(var t="",e=0;e<this.fields.length;e++)0<e&&(t+=", "),t+=this.fields[e];return"Structure("+this.signature+", ["+t+"])"},i);function i(t,e){this.signature=t,this.fields=e}r.Structure=u;s.prototype.packable=function(i){var t,s=this;if(null===i)return function(){return s._ch.writeUInt8(192)};if(!0===i)return function(){return s._ch.writeUInt8(195)};if(!1===i)return function(){return s._ch.writeUInt8(194)};if("number"==typeof i)return function(){return s.packFloat(i)};if("string"==typeof i)return function(){return s.packString(i)};if("bigint"==typeof i)return function(){return s.packInteger((0,f.int)(i))};if((0,f.isInt)(i))return function(){return s.packInteger(i)};if(i instanceof Int8Array)return function(){return s.packBytes(i)};if(i instanceof Array)return function(){s.packListHeader(i.length);for(var t=0;t<i.length;t++)s.packable(void 0===i[t]?null:i[t])()};if(null!=(t=i)&&"function"==typeof t[Symbol.iterator])return this.packableIterable(i);if(i instanceof f.Node)return this._nonPackableValue("It is not allowed to pass nodes in query parameters, given: "+i);if(i instanceof f.Relationship)return this._nonPackableValue("It is not allowed to pass relationships in query parameters, given: "+i);if(i instanceof f.Path)return this._nonPackableValue("It is not allowed to pass paths in query parameters, given: "+i);if(i instanceof u){for(var e=[],r=0;r<i.fields.length;r++)e[r]=this.packable(i.fields[r]);return function(){return s.packStruct(i.signature,e)}}return"object"==typeof i?function(){for(var t=Object.keys(i),e=0,r=0;r<t.length;r++)void 0!==i[t[r]]&&e++;s.packMapHeader(e);for(var n=0;n<t.length;n++){var o=t[n];void 0!==i[o]&&(s.packString(o),s.packable(i[o])())}}:this._nonPackableValue("Unable to pack the given value: "+i)},s.prototype.packableIterable=function(e){try{var t=Array.from(e);return this.packable(t)}catch(t){throw(0,f.newError)("Cannot pack given iterable, "+t.message+": "+e)}},s.prototype.packStruct=function(t,e){this.packStructHeader((e=e||[]).length,t);for(var r=0;r<e.length;r++)e[r]()},s.prototype.packInteger=function(t){var e=t.high,r=t.low;t.greaterThanOrEqual(-16)&&t.lessThan(128)?this._ch.writeInt8(r):t.greaterThanOrEqual(-128)&&t.lessThan(-16)?(this._ch.writeUInt8(200),this._ch.writeInt8(r)):t.greaterThanOrEqual(-32768)&&t.lessThan(32768)?(this._ch.writeUInt8(201),this._ch.writeInt16(r)):(t.greaterThanOrEqual(-2147483648)&&t.lessThan(2147483648)?this._ch.writeUInt8(202):(this._ch.writeUInt8(203),this._ch.writeInt32(e)),this._ch.writeInt32(r))},s.prototype.packFloat=function(t){this._ch.writeUInt8(193),this._ch.writeFloat64(t)},s.prototype.packString=function(t){var e=o.utf8.encode(t),t=e.length;if(t<16)this._ch.writeUInt8(128|t),this._ch.writeBytes(e);else if(t<256)this._ch.writeUInt8(208),this._ch.writeUInt8(t),this._ch.writeBytes(e);else if(t<65536)this._ch.writeUInt8(209),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256),this._ch.writeBytes(e);else{if(!(t<4294967296))throw(0,f.newError)("UTF-8 strings of size "+t+" are not supported");this._ch.writeUInt8(210),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),this._ch.writeBytes(e)}},s.prototype.packListHeader=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,f.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)}},s.prototype.packBytes=function(t){if(!this._byteArraysSupported)throw(0,f.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(t.length);for(var e=0;e<t.length;e++)this._ch.writeInt8(t[e])},s.prototype.packBytesHeader=function(t){if(t<256)this._ch.writeUInt8(204),this._ch.writeUInt8(t);else if(t<65536)this._ch.writeUInt8(205),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256);else{if(!(t<4294967296))throw(0,f.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)}},s.prototype.packMapHeader=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,f.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)}},s.prototype.packStructHeader=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,f.newError)("Structures of size "+t+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256)}},s.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},s.prototype._nonPackableValue=function(t){return function(){throw(0,f.newError)(t,n)}},t=s;function s(t){this._ch=t,this._byteArraysSupported=!0}r.Packer=t;a.prototype.unpack=function(t){var e=t.readUInt8(),r=240&e,n=15&e;if(192===e)return null;var o=this._unpackBoolean(e);if(null!==o)return o;o=this._unpackNumberOrInteger(e,t);if(null!==o){if((0,f.isInt)(o)){if(this._useBigInt)return o.toBigInt();if(this._disableLosslessIntegers)return o.toNumberOrInfinity()}return o}o=this._unpackString(e,r,n,t);if(null!==o)return o;o=this._unpackList(e,r,n,t);if(null!==o)return o;o=this._unpackByteArray(e,t);if(null!==o)return o;o=this._unpackMap(e,r,n,t);if(null!==o)return o;t=this._unpackStruct(e,r,n,t);if(null!==t)return t;throw(0,f.newError)("Unknown packed value with marker "+e.toString(16))},a.prototype.unpackInteger=function(t){var e=t.readUInt8(),t=this._unpackInteger(e,t);if(null==t)throw(0,f.newError)("Unable to unpack integer value with marker "+e.toString(16));return t},a.prototype._unpackBoolean=function(t){return 195===t||194!==t&&null},a.prototype._unpackNumberOrInteger=function(t,e){return 193===t?e.readFloat64():this._unpackInteger(t,e)},a.prototype._unpackInteger=function(t,e){if(0<=t&&t<128)return(0,f.int)(t);if(240<=t&&t<256)return(0,f.int)(t-256);if(200===t)return(0,f.int)(e.readInt8());if(201===t)return(0,f.int)(e.readInt16());if(202===t){var r=e.readInt32();return(0,f.int)(r)}if(203!==t)return null;t=e.readInt32(),e=e.readInt32();return new f.Integer(e,t)},a.prototype._unpackString=function(t,e,r,n){return 128===e?o.utf8.decode(n,r):208===t?o.utf8.decode(n,n.readUInt8()):209===t?o.utf8.decode(n,n.readUInt16()):210===t?o.utf8.decode(n,n.readUInt32()):null},a.prototype._unpackList=function(t,e,r,n){return 144===e?this._unpackListWithSize(r,n):212===t?this._unpackListWithSize(n.readUInt8(),n):213===t?this._unpackListWithSize(n.readUInt16(),n):214===t?this._unpackListWithSize(n.readUInt32(),n):null},a.prototype._unpackListWithSize=function(t,e){for(var r=[],n=0;n<t;n++)r.push(this.unpack(e));return r},a.prototype._unpackByteArray=function(t,e){return 204===t?this._unpackByteArrayWithSize(e.readUInt8(),e):205===t?this._unpackByteArrayWithSize(e.readUInt16(),e):206===t?this._unpackByteArrayWithSize(e.readUInt32(),e):null},a.prototype._unpackByteArrayWithSize=function(t,e){for(var r=new Int8Array(t),n=0;n<t;n++)r[n]=e.readInt8();return r},a.prototype._unpackMap=function(t,e,r,n){return 160===e?this._unpackMapWithSize(r,n):216===t?this._unpackMapWithSize(n.readUInt8(),n):217===t?this._unpackMapWithSize(n.readUInt16(),n):218===t?this._unpackMapWithSize(n.readUInt32(),n):null},a.prototype._unpackMapWithSize=function(t,e){for(var r={},n=0;n<t;n++)r[this.unpack(e)]=this.unpack(e);return r},a.prototype._unpackStruct=function(t,e,r,n){return 176===e?this._unpackStructWithSize(r,n):220===t?this._unpackStructWithSize(n.readUInt8(),n):221===t?this._unpackStructWithSize(n.readUInt16(),n):null},a.prototype._unpackStructWithSize=function(t,e){var r=e.readUInt8();return 78===r?this._unpackNode(t,e):82===r?this._unpackRelationship(t,e):114===r?this._unpackUnboundRelationship(t,e):80===r?this._unpackPath(t,e):this._unpackUnknownStruct(r,t,e)},a.prototype._unpackNode=function(t,e){return this._verifyStructSize("Node",3,t),new f.Node(this.unpack(e),this.unpack(e),this.unpack(e))},a.prototype._unpackRelationship=function(t,e){return this._verifyStructSize("Relationship",5,t),new f.Relationship(this.unpack(e),this.unpack(e),this.unpack(e),this.unpack(e),this.unpack(e))},a.prototype._unpackUnboundRelationship=function(t,e){return this._verifyStructSize("UnboundRelationship",3,t),new f.UnboundRelationship(this.unpack(e),this.unpack(e),this.unpack(e))},a.prototype._unpackPath=function(t,e){this._verifyStructSize("Path",3,t);for(var r=this.unpack(e),n=this.unpack(e),o=this.unpack(e),i=[],s=r[0],u=0;u<o.length;u+=2){var a=r[o[u+1]],c=(0,f.toNumber)(o[u]),l=void 0;0<c?(l=n[c-1])instanceof f.UnboundRelationship&&(n[c-1]=l=l.bind(s.identity,a.identity)):(l=n[-c-1])instanceof f.UnboundRelationship&&(n[-c-1]=l=l.bind(a.identity,s.identity)),i.push(new f.PathSegment(s,l,a)),s=a}return new f.Path(r[0],r[r.length-1],i)},a.prototype._unpackUnknownStruct=function(t,e,r){for(var n=new u(t,[]),o=0;o<e;o++)n.fields.push(this.unpack(r));return n},a.prototype._verifyStructSize=function(t,e,r){if(e!==r)throw(0,f.newError)("Wrong struct size for "+t+", expected "+e+" but was "+r,n)},t=a;function a(t,e){void 0===e&&(e=!1),this._disableLosslessIntegers=t=void 0===t?!1:t,this._useBigInt=e}r.Unpacker=t},{"../channel":26,"neo4j-driver-core":59}],45:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return s(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.Unpacker=r.Packer=void 0;var a,u=u(t("./packstream-v1")),c=t("neo4j-driver-core"),l=t("./temporal-factory"),t=c.internal.temporalUtil,f=t.dateToEpochDay,p=t.localDateTimeToEpochSecond,h=t.localTimeToNanoOfDay,d=88,b=3,_=89,y=4,v=69,m=4,g=116,O=1,w=84,S=2,E=68,P=1,j=100,T=2,C=70,x=3,I=102,A=3,t=(a=u.Packer,o(R,a),R.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},R.prototype.packable=function(i){var s=this;return(0,c.isPoint)(i)?function(){var t,e;e=s,(null===(t=i).z||void 0===t.z?function(t,e){t=[e.packable((0,c.int)(t.srid)),e.packable(t.x),e.packable(t.y)];e.packStruct(d,t)}:function(t,e){t=[e.packable((0,c.int)(t.srid)),e.packable(t.x),e.packable(t.y),e.packable(t.z)];e.packStruct(_,t)})(t,e)}:(0,c.isDuration)(i)?function(){var t,e,r,n,o;t=i,e=s,r=(0,c.int)(t.months),n=(0,c.int)(t.days),o=(0,c.int)(t.seconds),t=(0,c.int)(t.nanoseconds),t=[e.packable(r),e.packable(n),e.packable(o),e.packable(t)],e.packStruct(v,t)}:(0,c.isLocalTime)(i)?function(){return function(t,e){t=h(t.hour,t.minute,t.second,t.nanosecond),t=[e.packable(t)];e.packStruct(g,t)}(i,s)}:(0,c.isTime)(i)?function(){var t,e,r;e=s,r=h((t=i).hour,t.minute,t.second,t.nanosecond),t=(0,c.int)(t.timeZoneOffsetSeconds),t=[e.packable(r),e.packable(t)],e.packStruct(w,t)}:(0,c.isDate)(i)?function(){return function(t,e){t=f(t.year,t.month,t.day),t=[e.packable(t)];e.packStruct(E,t)}(i,s)}:(0,c.isLocalDateTime)(i)?function(){var t,e,r;e=s,r=p((t=i).year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),t=(0,c.int)(t.nanosecond),t=[e.packable(r),e.packable(t)],e.packStruct(j,t)}:(0,c.isDateTime)(i)?function(){var t,e;e=s,((t=i).timeZoneId?function(t,e){var r=p(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),n=(0,c.int)(t.nanosecond),t=t.timeZoneId,t=[e.packable(r),e.packable(n),e.packable(t)];e.packStruct(I,t)}:function(t,e){var r=p(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond),n=(0,c.int)(t.nanosecond),t=(0,c.int)(t.timeZoneOffsetSeconds),t=[e.packable(r),e.packable(n),e.packable(t)];e.packStruct(C,t)})(t,e)}:a.prototype.packable.call(this,i)},R);function R(){return null!==a&&a.apply(this,arguments)||this}r.Packer=t;var k,o=(k=u.Unpacker,o(N,k),N.prototype._unpackUnknownStruct=function(t,e,r){return t===d?(o=e,i=r,(n=this)._verifyStructSize("Point2D",b,o),new c.Point(n.unpack(i),n.unpack(i),n.unpack(i),void 0)):t===_?(o=e,n=r,(i=this)._verifyStructSize("Point3D",y,o),new c.Point(i.unpack(n),i.unpack(n),i.unpack(n),i.unpack(n))):t===v?function(t,e,r){t._verifyStructSize("Duration",m,e);var n=t.unpack(r),o=t.unpack(r),e=t.unpack(r),r=t.unpack(r);return new c.Duration(n,o,e,r)}(this,e,r):t===g?function(t,e,r,n){t._verifyStructSize("LocalTime",O,e);r=t.unpackInteger(r);return M((0,l.nanoOfDayToLocalTime)(r),n)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===w?function(t,e,r,n,o){t._verifyStructSize("Time",S,e);e=t.unpackInteger(r),r=t.unpackInteger(r),e=(0,l.nanoOfDayToLocalTime)(e);return M(new c.Time(e.hour,e.minute,e.second,e.nanosecond,r),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===E?function(t,e,r,n,o){t._verifyStructSize("Date",P,e);r=t.unpackInteger(r);return M((0,l.epochDayToDate)(r),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===j?function(t,e,r,n,o){t._verifyStructSize("LocalDateTime",T,e);e=t.unpackInteger(r),r=t.unpackInteger(r);return M((0,l.epochSecondAndNanoToLocalDateTime)(e,r),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===C?function(t,e,r,n,o){t._verifyStructSize("DateTimeWithZoneOffset",x,e);var i=t.unpackInteger(r),e=t.unpackInteger(r),r=t.unpackInteger(r),e=(0,l.epochSecondAndNanoToLocalDateTime)(i,e);return M(new c.DateTime(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond,r,null),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):t===I?function(t,e,r,n,o){t._verifyStructSize("DateTimeWithZoneId",A,e);var i=t.unpackInteger(r),e=t.unpackInteger(r),r=t.unpack(r),e=(0,l.epochSecondAndNanoToLocalDateTime)(i,e);return M(new c.DateTime(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond,null,r),n,o)}(this,e,r,this._disableLosslessIntegers,this._useBigInt):k.prototype._unpackUnknownStruct.call(this,t,e,r,this._disableLosslessIntegers,this._useBigInt);var n,o,i},N);function N(t,e){return k.call(this,t=void 0===t?!1:t,e=void 0===e?!1:e)||this}function M(t,e,r){if(!e&&!r)return t;var n,o,i,s=Object.create(Object.getPrototypeOf(t));for(n in t)t.hasOwnProperty(n)&&(o=t[n],s[n]=(0,c.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(s),s}r.Unpacker=o},{"./packstream-v1":44,"./temporal-factory":46,"neo4j-driver-core":59}],46:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.epochSecondAndNanoToLocalDateTime=r.nanoOfDayToLocalTime=r.epochDayToDate=void 0;var o=t("neo4j-driver-core"),t=o.internal.temporalUtil,i=t.DAYS_0000_TO_1970,s=t.DAYS_PER_400_YEAR_CYCLE,u=t.NANOS_PER_HOUR,a=t.NANOS_PER_MINUTE,c=t.NANOS_PER_SECOND,n=t.SECONDS_PER_DAY,l=t.floorDiv,f=t.floorMod;function p(t){var e=(t=(0,o.int)(t)).add(i).subtract(60),r=(0,o.int)(0);e.lessThan(0)&&(r=(n=e.add(1).div(s).subtract(1)).multiply(400),e=e.add(n.multiply(-s)));var t=e.multiply(400).add(591).div(s),n=e.subtract(t.multiply(365).add(t.div(4)).subtract(t.div(100)).add(t.div(400)));n.lessThan(0)&&(t=t.subtract(1),n=e.subtract(t.multiply(365).add(t.div(4)).subtract(t.div(100)).add(t.div(400))));t=t.add(r),e=n,r=e.multiply(5).add(2).div(153),n=r.add(2).modulo(12).add(1),e=e.subtract(r.multiply(306).add(5).div(10)).add(1);return t=t.add(r.div(10)),new o.Date(t,n,e)}function h(t){var e=(t=(0,o.int)(t)).div(u),r=(t=t.subtract(e.multiply(u))).div(a),n=(t=t.subtract(r.multiply(a))).div(c),t=t.subtract(n.multiply(c));return new o.LocalTime(e,r,n,t)}r.epochDayToDate=p,r.nanoOfDayToLocalTime=h,r.epochSecondAndNanoToLocalDateTime=function(t,e){var r=l(t,n),e=f(t,n).multiply(c).add(e),r=p(r),e=h(e);return new o.LocalDateTime(r.year,r.month,r.day,e.hour,e.minute,e.second,e.nanosecond)}},{"neo4j-driver-core":59}],47:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_MAX_SIZE=r.DEFAULT_ACQUISITION_TIMEOUT=r.PoolConfig=r.Pool=void 0;var u=i(t("./pool-config"));r.PoolConfig=u.default,Object.defineProperty(r,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return u.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(r,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return u.DEFAULT_MAX_SIZE}});t=s(t("./pool"));r.Pool=t.default,r.default=t.default},{"./pool":49,"./pool-config":48}],48:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_ACQUISITION_TIMEOUT=r.DEFAULT_MAX_SIZE=void 0;r.DEFAULT_MAX_SIZE=100;r.DEFAULT_ACQUISITION_TIMEOUT=6e4;var n=(o.defaultConfig=function(){return new o(100,6e4)},o.fromDriverConfig=function(t){return new o(s(t.maxConnectionPoolSize)?t.maxConnectionPoolSize:100,s(t.connectionAcquisitionTimeout)?t.connectionAcquisitionTimeout:6e4)},o);function o(t,e){this.maxSize=i(t,100),this.acquisitionTimeout=i(e,6e4)}function i(t,e){return 0===t||t?t:e}function s(t){return 0===t||t}r.default=n},{}],49:[function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},l=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var u=n(t("./pool-config")),a=t("neo4j-driver-core"),c=a.internal.logger.Logger,t=(i.prototype.acquire=function(s){var u=this;return this._acquire(s).then(function(t){var o=s.asKey();if(t)return t;var i=u._acquireRequests;return i[o]||(i[o]=[]),new Promise(function(t,e){var r=setTimeout(function(){var t,e=i[o];e&&(i[o]=e.filter(function(t){return t!==n})),n.isCompleted()||(t=u.activeResourceCount(s),e=u.has(s)?u._pools[o].length:0,n.reject((0,a.newError)("Connection acquisition timed out in "+u._acquisitionTimeout+" ms. Pool status: Active conn count = "+t+", Idle conn count = "+e+".")))},u._acquisitionTimeout),n=new p(o,t,e,r,u._log);i[o].push(n)})})},i.prototype.purge=function(t){return this._purgeKey(t.asKey())},i.prototype.close=function(){return o(this,void 0,void 0,function(){var e=this;return l(this,function(t){switch(t.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(t){return e._purgeKey(t)}))];case 1:return[2,t.sent()]}})})},i.prototype.keepAll=function(t){var e=this,r=t.map(function(t){return t.asKey()}),t=Object.keys(this._pools).filter(function(t){return-1===r.indexOf(t)});return Promise.all(t.map(function(t){return e._purgeKey(t)}))},i.prototype.has=function(t){return t.asKey()in this._pools},i.prototype.activeResourceCount=function(t){return this._activeResourceCounts[t.asKey()]||0},i.prototype._acquire=function(u){return o(this,void 0,void 0,function(){var e,r,n,o,i,s=this;return l(this,function(t){switch(t.label){case 0:if(this._closed)throw(0,a.newError)("Pool is closed, it is no more able to serve requests.");e=u.asKey(),r=this._pools[e],n=this._poolState[e],r||(r=[],n=new h,this._pools[e]=r,this._pendingCreates[e]=0,this._poolState[e]=n),t.label=1;case 1:return r.length?(o=r.pop(),this._validate(o)?(this._removeIdleObserver&&this._removeIdleObserver(o),f(e,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug(o+" acquired from the pool "+e),[2,o]):[3,2]):[3,5];case 2:return[4,this._destroy(o)];case 3:t.sent(),t.label=4;case 4:return[3,1];case 5:if(0<this._maxSize&&this.activeResourceCount(u)+this._pendingCreates[e]>=this._maxSize)return[2,null];this._pendingCreates[e]=this._pendingCreates[e]+1,t.label=6;case 6:return t.trys.push([6,,8,9]),[4,this._create(u,function(t,e){return s._release(n,t,e)})];case 7:return i=t.sent(),f(e,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug(i+" created for the pool "+e),[3,9];case 8:return this._pendingCreates[e]=this._pendingCreates[e]-1,[7];case 9:return[2,i]}})})},i.prototype._release=function(u,a,c){return o(this,void 0,void 0,function(){var o,i,s=this;return l(this,function(t){switch(t.label){case 0:return(o=a.asKey(),(i=this._pools[o])&&u&&u.isActive())?this._validate(c)?[3,2]:(this._log.isDebugEnabled()&&this._log.debug(c+" destroyed and can't be released to the pool "+o+" because it is not functional"),[4,this._destroy(c)]):[3,4];case 1:return t.sent(),[3,3];case 2:this._installIdleObserver&&this._installIdleObserver(c,{onError:function(t){s._log.debug("Idle connection "+c+" destroyed because of error: "+t);t=s._pools[o];t&&(s._pools[o]=t.filter(function(t){return t!==c})),s._destroy(c).catch(function(){})}}),i.push(c),this._log.isDebugEnabled()&&this._log.debug(c+" released to the pool "+o),t.label=3;case 3:return[3,6];case 4:return this._log.isDebugEnabled()&&this._log.debug(c+" destroyed and can't be released to the pool "+o+" because pool has been purged"),[4,this._destroy(c)];case 5:t.sent(),t.label=6;case 6:return e=o,r=this._activeResourceCounts,0<(n=(r[e]||0)-1)?r[e]=n:delete r[e],this._processPendingAcquireRequests(a),[2]}var e,r,n})})},i.prototype._purgeKey=function(n){return o(this,void 0,void 0,function(){var e,r;return l(this,function(t){switch(t.label){case 0:r=this._pools[n]||[],e=this._poolState[n]||new h,t.label=1;case 1:return r.length?(r=r.pop(),this._removeIdleObserver&&this._removeIdleObserver(r),[4,this._destroy(r)]):[3,3];case 2:return t.sent(),[3,1];case 3:return e.close(),delete this._pools[n],delete this._poolState[n],[2]}})})},i.prototype._processPendingAcquireRequests=function(e){var r,n=this,t=e.asKey(),o=this._acquireRequests[t],i=this._poolState[t];o&&((r=o.shift())?this._acquire(e).catch(function(t){return r.reject(t),null}).then(function(t){t&&(r.isCompleted()?n._release(i,e,t):r.resolve(t))}):delete this._acquireRequests[t])},i);function i(t){var e=void 0===t?{}:t,r=e.create,n=void 0===r?function(t,e){return Promise.resolve()}:r,o=e.destroy,i=void 0===o?function(t){return Promise.resolve()}:o,s=e.validate,t=void 0===s?function(t){return!0}:s,r=e.installIdleObserver,o=void 0===r?function(t,e){}:r,s=e.removeIdleObserver,r=void 0===s?function(t){}:s,s=e.config,s=void 0===s?u.default.defaultConfig():s,e=e.log,e=void 0===e?c.noOp():e;this._create=n,this._destroy=i,this._validate=t,this._installIdleObserver=o,this._removeIdleObserver=r,this._maxSize=s.maxSize,this._acquisitionTimeout=s.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._poolState={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function f(t,e){var r=e[t]||0;e[t]=r+1}var p=(s.prototype.isCompleted=function(){return this._completed},s.prototype.resolve=function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug(t+" acquired from the pool "+this._key),this._resolve(t))},s.prototype.reject=function(t){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(t))},s);function s(t,e,r,n,o){this._key=t,this._resolve=e,this._reject=r,this._timeoutId=n,this._log=o,this._completed=!1}var h=(d.prototype.isActive=function(){return this._active},d.prototype.close=function(){this._active=!1},d);function d(){this._active=!0}r.default=t},{"./pool-config":48,"neo4j-driver-core":59}],50:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.RoutingTable=r.Rediscovery=void 0;var o=n(t("./rediscovery"));r.Rediscovery=o.default;t=n(t("./routing-table"));r.RoutingTable=t.default,r.default=o.default},{"./rediscovery":51,"./routing-table":52}],51:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s=n(t("./routing-table")),a=t("../bolt"),c=t("neo4j-driver-core"),l=c.error.SERVICE_UNAVAILABLE,t=(o.prototype.lookupRoutingTableOnRouter=function(e,r,n,o){var i=this;return e._acquireConnection(function(t){return i._requestRawRoutingTable(t,e,r,n,o).then(function(t){return t.isNull?null:s.default.fromRawRoutingTable(r,n,t)})})},o.prototype._requestRawRoutingTable=function(t,n,o,i,s){var u=this;return new Promise(function(e,r){t.protocol().requestRoutingInformation({routingContext:u._routingContext,databaseName:o,impersonatedUser:s,sessionContext:{bookmark:n._lastBookmark,mode:n._mode,database:n._database,afterComplete:n._onComplete},onCompleted:e,onError:function(t){"Neo.ClientError.Database.DatabaseNotFound"===t.code?r(t):"Neo.ClientError.Procedure.ProcedureNotFound"===t.code?r((0,c.newError)("Server at "+i.asHostPort()+" can't perform routing. Make sure you are connecting to a causal cluster",l)):e(a.RawRoutingTable.ofNull())}})})},o);function o(t){this._routingContext=t}r.default=t},{"../bolt":12,"./routing-table":52,"neo4j-driver-core":59}],52:[function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||((n=n||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(r,"__esModule",{value:!0}),r.createValidRoutingTable=void 0;var a=t("neo4j-driver-core"),t=a.internal.constants,i=t.ACCESS_MODE_WRITE,s=t.ACCESS_MODE_READ,c=a.internal.serverAddress.ServerAddress,l=a.error.PROTOCOL_ERROR,f=(u.fromRawRoutingTable=h,u.prototype.forget=function(t){this.readers=p(this.readers,t),this.writers=p(this.writers,t)},u.prototype.forgetRouter=function(t){this.routers=p(this.routers,t)},u.prototype.forgetWriter=function(t){this.writers=p(this.writers,t)},u.prototype.isStaleFor=function(t){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||t===s&&0===this.readers.length||t===i&&0===this.writers.length},u.prototype.isExpiredFor=function(t){return this.expirationTime.add(t).lessThan(Date.now())},u.prototype.allServers=function(){return o(o(o([],n(this.routers),!1),n(this.readers),!1),n(this.writers),!1)},u.prototype.toString=function(){return"RoutingTable[database="+this.databaseName+", expirationTime="+this.expirationTime+", currentTime="+Date.now()+", routers=["+this.routers+"], readers=["+this.readers+"], writers=["+this.writers+"]]"},u);function u(t){var e=void 0===t?{}:t,r=e.database,n=e.routers,o=e.readers,i=e.writers,t=e.expirationTime,e=e.ttl;this.database=r||null,this.databaseName=r||"default database",this.routers=n||[],this.readers=o||[],this.writers=i||[],this.expirationTime=t||(0,a.int)(0),this.ttl=e}function p(t,e){return t.filter(function(t){return t.asKey()!==e.asKey()})}function h(t,e,r){var n=r.ttl,o=function(e,r){try{var t=(0,a.int)(Date.now()),n=(0,a.int)(e.ttl).multiply(1e3).add(t);return n.lessThan(t)?a.Integer.MAX_VALUE:n}catch(t){throw(0,a.newError)("Unable to parse TTL entry from router "+r+" from raw routing table:\n"+a.json.stringify(e)+"\nError message: "+t.message,l)}}(r,e),i=function(e,r){try{var n=[],o=[],i=[];return e.servers.forEach(function(t){var e=t.role,t=t.addresses;"ROUTE"===e?n=b(t).map(function(t){return c.fromUrl(t)}):"WRITE"===e?i=b(t).map(function(t){return c.fromUrl(t)}):"READ"===e&&(o=b(t).map(function(t){return c.fromUrl(t)}))}),{routers:n,readers:o,writers:i}}catch(t){throw(0,a.newError)("Unable to parse servers entry from router "+r+" from addresses:\n"+a.json.stringify(e.servers)+"\nError message: "+t.message,l)}}(r,e),s=i.routers,u=i.readers,i=i.writers;return d(s,"routers",e),d(u,"readers",e),new f({database:t||r.db,routers:s,readers:u,writers:i,expirationTime:o,ttl:n})}function d(t,e,r){if(0===t.length)throw(0,a.newError)("Received no "+e+" from router "+r,l)}function b(t){if(!Array.isArray(t))throw new TypeError("Array expected but got: "+t);return Array.from(t)}r.default=f,r.createValidRoutingTable=h},{"neo4j-driver-core":59}],53:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default={basic:function(t,e,r){return r?{scheme:"basic",principal:t,credentials:e,realm:r}:{scheme:"basic",principal:t,credentials:e}},kerberos:function(t){return{scheme:"kerberos",principal:"",credentials:t}},bearer:function(t){return{scheme:"bearer",credentials:t}},custom:function(t,e,r,n,o){return o?{scheme:n,principal:t,credentials:e,realm:r,parameters:o}:{scheme:n,principal:t,credentials:e,realm:r}}}},{}],54:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.acquireConnection=function(t){throw Error("Not implemented")},o.prototype.supportsMultiDb=function(){throw Error("Not implemented")},o.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},o.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},o.prototype.close=function(){throw Error("Not implemented")},o);function o(){}r.default=n},{}],55:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.isOpen=function(){return!1},o.prototype.protocol=function(){throw Error("Not implemented")},o.prototype.connect=function(t,e){throw Error("Not implemented")},o.prototype.write=function(t,e,r){throw Error("Not implemented")},o.prototype.resetAndFlush=function(){throw Error("Not implemented")},o.prototype.close=function(){throw Error("Not implemented")},o.prototype._release=function(){return Promise.resolve()},o);function o(){this.id="",this.databaseId=""}r.default=n},{}],56:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.WRITE=r.READ=r.Driver=void 0;var u=t("./internal/bookmark"),o=t("./internal/connectivity-verifier"),i=n(t("./internal/resolver/configured-custom-resolver")),s=t("./internal/constants"),a=t("./internal/logger"),c=n(t("./session")),l=t("./internal/util"),f=36e5,p=1e3,t=s.ACCESS_MODE_READ;r.READ=t;var h=s.ACCESS_MODE_WRITE;r.WRITE=h;var d=0,t=(b.prototype.verifyConnectivity=function(t){var e=(void 0===t?{}:t).database,t=void 0===e?"":e,e=this._getOrCreateConnectionProvider();return new o.ConnectivityVerifier(e).verify({database:t})},b.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},b.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},b.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},b.prototype._supportsRouting=function(){return this._meta.routing},b.prototype._isEncrypted=function(){return this._config.encrypted===l.ENCRYPTION_ON},b.prototype._getTrust=function(){return this._config.trust},b.prototype.session=function(t){var e=void 0===t?{}:t,r=e.defaultAccessMode,n=e.bookmarks,o=e.database,t=e.impersonatedUser,e=e.fetchSize;return this._newSession({defaultAccessMode:void 0===r?h:r,bookmarkOrBookmarks:n,database:void 0===o?"":o,reactive:!1,impersonatedUser:t,fetchSize:y(e,this._config.fetchSize)})},b.prototype.close=function(){return this._log.info("Driver "+this._id+" closing"),this._connectionProvider?this._connectionProvider.close():Promise.resolve()},b.prototype._afterConstruction=function(){this._log.info(this._meta.typename+" driver "+this._id+" created for server address "+this._meta.address)},b.prototype._newSession=function(t){var e=t.defaultAccessMode,r=t.bookmarkOrBookmarks,n=t.database,o=t.reactive,i=t.impersonatedUser,s=t.fetchSize,t=c.default._validateSessionMode(e),e=this._getOrCreateConnectionProvider(),r=r?new u.Bookmark(r):u.Bookmark.empty();return this._createSession({mode:t,database:n||"",connectionProvider:e,bookmark:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:s})},b.prototype._getOrCreateConnectionProvider=function(){var t;return this._connectionProvider||(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(t=this._config,new i.default(t.resolver)))),this._connectionProvider},b);function b(t,e,r,n){var o;void 0===n&&(n=function(t){return new c.default(t)}),(o=e=void 0===e?{}:e).maxConnectionLifetime=_(o.maxConnectionLifetime,f),o.maxConnectionPoolSize=_(o.maxConnectionPoolSize,s.DEFAULT_POOL_MAX_SIZE),o.connectionAcquisitionTimeout=_(o.connectionAcquisitionTimeout,s.DEFAULT_POOL_ACQUISITION_TIMEOUT),o.fetchSize=y(o.fetchSize,p),function(t){var e=t.resolver;if(e&&"function"!=typeof e)throw new TypeError("Configured resolver should be a function. Got: "+e)}(e),this._id=d++,this._meta=t,this._config=e,this._log=a.Logger.create(e),this._createConnectionProvider=r,this._createSession=n,this._connectionProvider=null,this._afterConstruction()}function _(t,e){t=parseInt(t,10);return 0<t||0===t?t:t<0?Number.MAX_SAFE_INTEGER:e}function y(t,e){t=parseInt(t,10);if(0<t||t===s.FETCH_ALL)return t;if(0===t||t<0)throw new Error("The fetch size can only be a positive value or "+s.FETCH_ALL+" for ALL. However fetchSize = "+t);return e}r.Driver=t,r.default=t},{"./internal/bookmark":61,"./internal/connectivity-verifier":63,"./internal/constants":64,"./internal/logger":66,"./internal/resolver/configured-custom-resolver":69,"./internal/util":77,"./session":82}],57:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0}),r.PROTOCOL_ERROR=r.SESSION_EXPIRED=r.SERVICE_UNAVAILABLE=r.Neo4jError=r.newError=void 0;r.SERVICE_UNAVAILABLE="ServiceUnavailable";r.SESSION_EXPIRED="SessionExpired";r.PROTOCOL_ERROR="ProtocolError";var i,s="N/A",u=(i=Error,o(a,i),a);function a(t,e){t=i.call(this,t)||this;return t.constructor=a,t.__proto__=a.prototype,t.code=e,t.name="Neo4jError",t}r.Neo4jError=u,r.newError=function(t,e){return new u(t,null!=e?e:s)}},{}],58:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isPathSegment=r.PathSegment=r.isPath=r.Path=r.isUnboundRelationship=r.UnboundRelationship=r.isRelationship=r.Relationship=r.isNode=r.Node=void 0;var n=t("./json"),o={value:!0,enumerable:!1,configurable:!1,writable:!1},i="__isNode__",s="__isRelationship__",u="__isUnboundRelationship__",a="__isPath__",c="__isPathSegment__";function l(t,e){return!0===(t&&t[e])}f.prototype.toString=function(){for(var t="("+this.identity,e=0;e<this.labels.length;e++)t+=":"+this.labels[e];var r=Object.keys(this.properties);if(0<r.length){t+=" {";for(e=0;e<r.length;e++)0<e&&(t+=","),t+=r[e]+":"+(0,n.stringify)(this.properties[r[e]]);t+="}"}return t+=")"},t=f;function f(t,e,r){this.identity=t,this.labels=e,this.properties=r}r.Node=t,Object.defineProperty(t.prototype,i,o),r.isNode=function(t){return l(t,i)};var p=(h.prototype.toString=function(){var t="("+this.start+")-[:"+this.type,e=Object.keys(this.properties);if(0<e.length){t+=" {";for(var r=0;r<e.length;r++)0<r&&(t+=","),t+=e[r]+":"+(0,n.stringify)(this.properties[e[r]]);t+="}"}return t+="]->("+this.end+")"},h);function h(t,e,r,n,o){this.identity=t,this.start=e,this.end=r,this.type=n,this.properties=o}r.Relationship=p,Object.defineProperty(p.prototype,s,o),r.isRelationship=function(t){return l(t,s)};d.prototype.bind=function(t,e){return new p(this.identity,t,e,this.type,this.properties)},d.prototype.toString=function(){var t="-[:"+this.type,e=Object.keys(this.properties);if(0<e.length){t+=" {";for(var r=0;r<e.length;r++)0<r&&(t+=","),t+=e[r]+":"+(0,n.stringify)(this.properties[e[r]]);t+="}"}return t+="]->"},t=d;function d(t,e,r){this.identity=t,this.type=e,this.properties=r}r.UnboundRelationship=t,Object.defineProperty(t.prototype,u,o),r.isUnboundRelationship=function(t){return l(t,u)};t=function(t,e,r){this.start=t,this.relationship=e,this.end=r};r.PathSegment=t,Object.defineProperty(t.prototype,c,o),r.isPathSegment=function(t){return l(t,c)};t=function(t,e,r){this.start=t,this.end=e,this.segments=r,this.length=r.length};r.Path=t,Object.defineProperty(t.prototype,a,o),r.isPath=function(t){return l(t,a)}},{"./json":78}],59:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.types=r.Driver=r.Session=r.Transaction=r.Connection=r.ConnectionProvider=r.Result=r.Stats=r.QueryStatistics=r.ProfiledPlan=r.Plan=r.Notification=r.ServerInfo=r.queryType=r.ResultSummary=r.Record=r.isPathSegment=r.PathSegment=r.isPath=r.Path=r.isUnboundRelationship=r.UnboundRelationship=r.isRelationship=r.Relationship=r.isNode=r.Node=r.Time=r.LocalTime=r.LocalDateTime=r.isTime=r.isLocalTime=r.isLocalDateTime=r.isDuration=r.isDateTime=r.isDate=r.Duration=r.DateTime=r.Date=r.Point=r.isPoint=r.internal=r.toString=r.toNumber=r.inSafeRange=r.isInt=r.int=r.Integer=r.error=r.Neo4jError=r.newError=void 0,r.auth=r.json=r.driver=void 0;var u=t("./error");Object.defineProperty(r,"newError",{enumerable:!0,get:function(){return u.newError}}),Object.defineProperty(r,"Neo4jError",{enumerable:!0,get:function(){return u.Neo4jError}});var a=i(t("./integer"));r.Integer=a.default,Object.defineProperty(r,"int",{enumerable:!0,get:function(){return a.int}}),Object.defineProperty(r,"isInt",{enumerable:!0,get:function(){return a.isInt}}),Object.defineProperty(r,"inSafeRange",{enumerable:!0,get:function(){return a.inSafeRange}}),Object.defineProperty(r,"toNumber",{enumerable:!0,get:function(){return a.toNumber}}),Object.defineProperty(r,"toString",{enumerable:!0,get:function(){return a.toString}});var c=t("./temporal-types");Object.defineProperty(r,"Date",{enumerable:!0,get:function(){return c.Date}}),Object.defineProperty(r,"DateTime",{enumerable:!0,get:function(){return c.DateTime}}),Object.defineProperty(r,"Duration",{enumerable:!0,get:function(){return c.Duration}}),Object.defineProperty(r,"isDate",{enumerable:!0,get:function(){return c.isDate}}),Object.defineProperty(r,"isDateTime",{enumerable:!0,get:function(){return c.isDateTime}}),Object.defineProperty(r,"isDuration",{enumerable:!0,get:function(){return c.isDuration}}),Object.defineProperty(r,"isLocalDateTime",{enumerable:!0,get:function(){return c.isLocalDateTime}}),Object.defineProperty(r,"isLocalTime",{enumerable:!0,get:function(){return c.isLocalTime}}),Object.defineProperty(r,"isTime",{enumerable:!0,get:function(){return c.isTime}}),Object.defineProperty(r,"LocalDateTime",{enumerable:!0,get:function(){return c.LocalDateTime}}),Object.defineProperty(r,"LocalTime",{enumerable:!0,get:function(){return c.LocalTime}}),Object.defineProperty(r,"Time",{enumerable:!0,get:function(){return c.Time}});var l=t("./graph-types");Object.defineProperty(r,"Node",{enumerable:!0,get:function(){return l.Node}}),Object.defineProperty(r,"isNode",{enumerable:!0,get:function(){return l.isNode}}),Object.defineProperty(r,"Relationship",{enumerable:!0,get:function(){return l.Relationship}}),Object.defineProperty(r,"isRelationship",{enumerable:!0,get:function(){return l.isRelationship}}),Object.defineProperty(r,"UnboundRelationship",{enumerable:!0,get:function(){return l.UnboundRelationship}}),Object.defineProperty(r,"isUnboundRelationship",{enumerable:!0,get:function(){return l.isUnboundRelationship}}),Object.defineProperty(r,"Path",{enumerable:!0,get:function(){return l.Path}}),Object.defineProperty(r,"isPath",{enumerable:!0,get:function(){return l.isPath}}),Object.defineProperty(r,"PathSegment",{enumerable:!0,get:function(){return l.PathSegment}}),Object.defineProperty(r,"isPathSegment",{enumerable:!0,get:function(){return l.isPathSegment}});var f=s(t("./record"));r.Record=f.default;var p=t("./spatial-types");Object.defineProperty(r,"isPoint",{enumerable:!0,get:function(){return p.isPoint}}),Object.defineProperty(r,"Point",{enumerable:!0,get:function(){return p.Point}});var h=i(t("./result-summary"));r.ResultSummary=h.default,Object.defineProperty(r,"queryType",{enumerable:!0,get:function(){return h.queryType}}),Object.defineProperty(r,"ServerInfo",{enumerable:!0,get:function(){return h.ServerInfo}}),Object.defineProperty(r,"Notification",{enumerable:!0,get:function(){return h.Notification}}),Object.defineProperty(r,"Plan",{enumerable:!0,get:function(){return h.Plan}}),Object.defineProperty(r,"ProfiledPlan",{enumerable:!0,get:function(){return h.ProfiledPlan}}),Object.defineProperty(r,"QueryStatistics",{enumerable:!0,get:function(){return h.QueryStatistics}}),Object.defineProperty(r,"Stats",{enumerable:!0,get:function(){return h.Stats}});var d=s(t("./result"));r.Result=d.default;var b=s(t("./connection-provider"));r.ConnectionProvider=b.default;var _=s(t("./connection"));r.Connection=_.default;var y=s(t("./transaction"));r.Transaction=y.default;var v=s(t("./session"));r.Session=v.default;var m=i(t("./driver")),g=m;r.Driver=m.default,r.driver=g;var O=s(t("./auth"));r.auth=O.default;b=i(t("./types"));r.types=b;s=i(t("./json"));r.json=s;i=i(t("./internal"));r.internal=i;t={SERVICE_UNAVAILABLE:u.SERVICE_UNAVAILABLE,SESSION_EXPIRED:u.SESSION_EXPIRED,PROTOCOL_ERROR:u.PROTOCOL_ERROR};r.error=t;O={newError:u.newError,Neo4jError:u.Neo4jError,error:t,Integer:a.default,int:a.int,isInt:a.isInt,inSafeRange:a.inSafeRange,toNumber:a.toNumber,toString:a.toString,internal:i,isPoint:p.isPoint,Point:p.Point,Date:c.Date,DateTime:c.DateTime,Duration:c.Duration,isDate:c.isDate,isDateTime:c.isDateTime,isDuration:c.isDuration,isLocalDateTime:c.isLocalDateTime,isLocalTime:c.isLocalTime,isTime:c.isTime,LocalDateTime:c.LocalDateTime,LocalTime:c.LocalTime,Time:c.Time,Node:l.Node,isNode:l.isNode,Relationship:l.Relationship,isRelationship:l.isRelationship,UnboundRelationship:l.UnboundRelationship,isUnboundRelationship:l.isUnboundRelationship,Path:l.Path,isPath:l.isPath,PathSegment:l.PathSegment,isPathSegment:l.isPathSegment,Record:f.default,ResultSummary:h.default,queryType:h.queryType,ServerInfo:h.ServerInfo,Notification:h.Notification,Plan:h.Plan,ProfiledPlan:h.ProfiledPlan,QueryStatistics:h.QueryStatistics,Stats:h.Stats,Result:d.default,Transaction:y.default,Session:v.default,Driver:m.default,Connection:_.default,types:b,driver:g,json:s,auth:O.default};r.default=O},{"./auth":53,"./connection":55,"./connection-provider":54,"./driver":56,"./error":57,"./graph-types":58,"./integer":60,"./internal":65,"./json":78,"./record":79,"./result":81,"./result-summary":80,"./session":82,"./spatial-types":83,"./temporal-types":84,"./transaction":85,"./types":86}],60:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.toString=r.toNumber=r.inSafeRange=r.isInt=r.int=void 0;var c=t("./error"),n=new Map,o=(p.prototype.inSafeRange=function(){return this.greaterThanOrEqual(p.MIN_SAFE_VALUE)&&this.lessThanOrEqual(p.MAX_SAFE_VALUE)},p.prototype.toInt=function(){return this.low},p.prototype.toNumber=function(){return this.high*i+(this.low>>>0)},p.prototype.toBigInt=function(){if(this.isZero())return BigInt(0);if(this.isPositive())return BigInt(this.high>>>0)*BigInt(i)+BigInt(this.low>>>0);var t=this.negate();return BigInt(-1)*(BigInt(t.high>>>0)*BigInt(i)+BigInt(t.low>>>0))},p.prototype.toNumberOrInfinity=function(){return this.lessThan(p.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(p.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},p.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix out of range: "+t);if(this.isZero())return"0";if(this.isNegative()){if(this.equals(p.MIN_VALUE)){var e=p.fromNumber(t),r=this.div(e),n=r.multiply(e).subtract(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.negate().toString(t)}var o=p.fromNumber(Math.pow(t,6));n=this;for(var i="";;){var s=n.div(o),u=(n.subtract(s.multiply(o)).toInt()>>>0).toString(t);if((n=s).isZero())return u+i;for(;u.length<6;)u="0"+u;i=""+u+i}},p.prototype.getHighBits=function(){return this.high},p.prototype.getLowBits=function(){return this.low},p.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(p.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var t=0!==this.high?this.high:this.low,e=31;0<e&&0==(t&1<<e);e--);return 0!==this.high?e+33:e+1},p.prototype.isZero=function(){return 0===this.high&&0===this.low},p.prototype.isNegative=function(){return this.high<0},p.prototype.isPositive=function(){return 0<=this.high},p.prototype.isOdd=function(){return 1==(1&this.low)},p.prototype.isEven=function(){return 0==(1&this.low)},p.prototype.equals=function(t){t=p.fromValue(t);return this.high===t.high&&this.low===t.low},p.prototype.notEquals=function(t){return!this.equals(t)},p.prototype.lessThan=function(t){return this.compare(t)<0},p.prototype.lessThanOrEqual=function(t){return this.compare(t)<=0},p.prototype.greaterThan=function(t){return 0<this.compare(t)},p.prototype.greaterThanOrEqual=function(t){return 0<=this.compare(t)},p.prototype.compare=function(t){var e=p.fromValue(t);if(this.equals(e))return 0;var r=this.isNegative(),t=e.isNegative();return r&&!t||(r||!t)&&this.subtract(e).isNegative()?-1:1},p.prototype.negate=function(){return this.equals(p.MIN_VALUE)?p.MIN_VALUE:this.not().add(p.ONE)},p.prototype.add=function(t){var e=p.fromValue(t),r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=e.high>>>16,u=65535&e.high,a=e.low>>>16,c=0,l=0,f=0,t=0;return f+=(t+=i+(65535&e.low))>>>16,l+=(f+=o+a)>>>16,c+=(l+=n+u)>>>16,c+=r+s,p.fromBits((f&=65535)<<16|(t&=65535),(c&=65535)<<16|(l&=65535))},p.prototype.subtract=function(t){t=p.fromValue(t);return this.add(t.negate())},p.prototype.multiply=function(t){if(this.isZero())return p.ZERO;var e=p.fromValue(t);if(e.isZero())return p.ZERO;if(this.equals(p.MIN_VALUE))return e.isOdd()?p.MIN_VALUE:p.ZERO;if(e.equals(p.MIN_VALUE))return this.isOdd()?p.MIN_VALUE:p.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(h)&&e.lessThan(h))return p.fromNumber(this.toNumber()*e.toNumber());var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=e.high>>>16,u=65535&e.high,a=e.low>>>16,c=65535&e.low,l=0,f=0,t=0,e=0;return t+=(e+=i*c)>>>16,f+=(t+=o*c)>>>16,t&=65535,f+=(t+=i*a)>>>16,l+=(f+=n*c)>>>16,f&=65535,l+=(f+=o*a)>>>16,f&=65535,l+=(f+=i*u)>>>16,l+=r*c+n*a+o*u+i*s,p.fromBits((t&=65535)<<16|(e&=65535),(l&=65535)<<16|(f&=65535))},p.prototype.div=function(t){var e,r,n,o=p.fromValue(t);if(o.isZero())throw(0,c.newError)("division by zero");if(this.isZero())return p.ZERO;{if(this.equals(p.MIN_VALUE))return o.equals(p.ONE)||o.equals(p.NEG_ONE)?p.MIN_VALUE:o.equals(p.MIN_VALUE)?p.ONE:(n=this.shiftRight(1).div(o).shiftLeft(1)).equals(p.ZERO)?o.isNegative()?p.ONE:p.NEG_ONE:(e=this.subtract(o.multiply(n)),r=n.add(e.div(o)));if(o.equals(p.MIN_VALUE))return p.ZERO}if(this.isNegative())return o.isNegative()?this.negate().div(o.negate()):this.negate().div(o).negate();if(o.isNegative())return this.div(o.negate()).negate();for(r=p.ZERO,e=this;e.greaterThanOrEqual(o);){n=Math.max(1,Math.floor(e.toNumber()/o.toNumber()));for(var i=Math.ceil(Math.log(n)/Math.LN2),s=i<=48?1:Math.pow(2,i-48),u=p.fromNumber(n),a=u.multiply(o);a.isNegative()||a.greaterThan(e);)a=(u=p.fromNumber(n-=s)).multiply(o);u.isZero()&&(u=p.ONE),r=r.add(u),e=e.subtract(a)}return r},p.prototype.modulo=function(t){t=p.fromValue(t);return this.subtract(this.div(t).multiply(t))},p.prototype.not=function(){return p.fromBits(~this.low,~this.high)},p.prototype.and=function(t){t=p.fromValue(t);return p.fromBits(this.low&t.low,this.high&t.high)},p.prototype.or=function(t){t=p.fromValue(t);return p.fromBits(this.low|t.low,this.high|t.high)},p.prototype.xor=function(t){t=p.fromValue(t);return p.fromBits(this.low^t.low,this.high^t.high)},p.prototype.shiftLeft=function(t){t=p.toNumber(t);return 0==(t&=63)?p.ZERO:t<32?p.fromBits(this.low<<t,this.high<<t|this.low>>>32-t):p.fromBits(0,this.low<<t-32)},p.prototype.shiftRight=function(t){var e=p.toNumber(t);return 0==(e&=63)?p.ZERO:t<32?p.fromBits(this.low>>>e|this.high<<32-e,this.high>>e):p.fromBits(this.high>>e-32,0<=this.high?0:-1)},p.isInteger=function(t){return!0===(t&&t.__isInteger__)},p.fromInt=function(t){var e;return-128<=(t|=0)&&t<128&&(e=n.get(t))||(e=new p(t,t<0?-1:0),-128<=t&&t<128&&n.set(t,e)),e},p.fromBits=function(t,e){return new p(t,e)},p.fromNumber=function(t){return isNaN(t)||!isFinite(t)?p.ZERO:t<=-s?p.MIN_VALUE:s<=t+1?p.MAX_VALUE:t<0?p.fromNumber(-t).negate():new p(t%i|0,t/i|0)},p.fromString=function(t,e){if(0===t.length)throw(0,c.newError)("number format error: empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return p.ZERO;if((e=e||10)<2||36<e)throw(0,c.newError)("radix out of range: "+e);var r;if(0<(r=t.indexOf("-")))throw(0,c.newError)('number format error: interior "-" character: '+t);if(0===r)return p.fromString(t.substring(1),e).negate();for(var n=p.fromNumber(Math.pow(e,8)),o=p.ZERO,i=0;i<t.length;i+=8){var s=Math.min(8,t.length-i),u=parseInt(t.substring(i,i+s),e);o=s<8?(s=p.fromNumber(Math.pow(e,s)),o.multiply(s).add(p.fromNumber(u))):(o=o.multiply(n)).add(p.fromNumber(u))}return o},p.fromValue=function(t){return t instanceof p?t:"number"==typeof t?p.fromNumber(t):"string"==typeof t?p.fromString(t):"bigint"==typeof t?p.fromString(t.toString()):new p(t.low,t.high)},p.toNumber=function(t){switch(typeof t){case"number":return t;case"bigint":return Number(t);default:return p.fromValue(t).toNumber()}},p.toString=function(t,e){return p.fromValue(t).toString(e)},p.inSafeRange=function(t){return p.fromValue(t).inSafeRange()},p.ZERO=p.fromInt(0),p.ONE=p.fromInt(1),p.NEG_ONE=p.fromInt(-1),p.MAX_VALUE=p.fromBits(-1,2147483647),p.MIN_VALUE=p.fromBits(0,-2147483648),p.MIN_SAFE_VALUE=p.fromBits(1,-2097152),p.MAX_SAFE_VALUE=p.fromBits(-1,2097151),p.__isInteger__=!0,p);function p(t,e){this.low=t||0,this.high=e||0}Object.defineProperty(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var i=4294967296,s=i*i/2,h=o.fromInt(1<<24),t=o.fromValue;r.int=t;t=o.isInteger;r.isInt=t;t=o.inSafeRange;r.inSafeRange=t;t=o.toNumber;r.toNumber=t;t=o.toString;r.toString=t,r.default=o},{"./error":57}],61:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.Bookmark=void 0;var s=i(t("./util")),t=(u.empty=function(){return a},u.prototype.isEmpty=function(){return 0===this._values.length},u.prototype.values=function(){return this._values},u.prototype.asBeginTransactionParameters=function(){var t;return this.isEmpty()?{}:((t={}).bookmarks=this._values,t)},u);function u(t){this._values=function(t){if(!t)return[];if(s.isString(t))return[t];if(Array.isArray(t)){for(var e=[],r=function r(t){return t.reduce(function(t,e){return Array.isArray(e)?t.concat(r(e)):t.concat(e)},[])}(t),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!s.isString(o))throw new TypeError("Bookmark value should be a string, given: '"+o+"'");e.push(o)}}return e}throw new TypeError("Bookmark should either be a string or a string array, given: '"+t+"'")}(t)}var a=new(r.Bookmark=t)(null)},{"./util":77}],62:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0}),r.EMPTY_CONNECTION_HOLDER=r.ReadOnlyConnectionHolder=r.ConnectionHolder=void 0;var i=t("../error"),s=t("./util"),u=t("./constants"),a=t("./bookmark"),c=(l.prototype.mode=function(){return this._mode},l.prototype.database=function(){return this._database},l.prototype.setDatabase=function(t){this._database=t},l.prototype.bookmark=function(){return this._bookmark},l.prototype.connectionProvider=function(){return this._connectionProvider},l.prototype.referenceCount=function(){return this._referenceCount},l.prototype.initializeConnection=function(){return 0===this._referenceCount&&this._connectionProvider?(this._connectionPromise=this._connectionProvider.acquireConnection({accessMode:this._mode,database:this._database,bookmarks:this._bookmark,impersonatedUser:this._impersonatedUser,onDatabaseNameResolved:this._onDatabaseNameResolved}),this._referenceCount++,!0):(this._referenceCount++,!1)},l.prototype.getConnection=function(){return this._connectionPromise},l.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},l.prototype.close=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection())},l.prototype._releaseConnection=function(){return this._connectionPromise=this._connectionPromise.then(function(t){return t?t.isOpen()?t.resetAndFlush().catch(b).then(function(){return t._release()}):t._release():Promise.resolve()}).catch(b),this._connectionPromise},l);function l(t){var e=void 0===t?{}:t,r=e.mode,n=void 0===r?u.ACCESS_MODE_WRITE:r,o=e.database,i=void 0===o?"":o,t=e.bookmark,r=e.connectionProvider,o=e.impersonatedUser,e=e.onDatabaseNameResolved;this._mode=n,this._database=i?(0,s.assertString)(i,"database"):"",this._bookmark=t||a.Bookmark.empty(),this._connectionProvider=r,this._impersonatedUser=o,this._referenceCount=0,this._connectionPromise=Promise.resolve(),this._onDatabaseNameResolved=e}r.ConnectionHolder=c;var f,p,t=(o(h,f=c),h.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},h.prototype.getConnection=function(){return this._connectionHolder.getConnection()},h.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve()})},h.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve()})},h);function h(t){var e=f.call(this,{mode:t.mode(),database:t.database(),bookmark:t.bookmark(),connectionProvider:t.connectionProvider()})||this;return e._connectionHolder=t,e}function d(){return null!==p&&p.apply(this,arguments)||this}r.ReadOnlyConnectionHolder=t,r.default=t;c=new(o(d,p=c),d.prototype.mode=function(){},d.prototype.database=function(){},d.prototype.initializeConnection=function(){return!0},d.prototype.getConnection=function(){return Promise.reject((0,i.newError)("This connection holder does not serve connections"))},d.prototype.releaseConnection=function(){return Promise.resolve()},d.prototype.close=function(){return Promise.resolve()},d);function b(t){}r.EMPTY_CONNECTION_HOLDER=c},{"../error":57,"./bookmark":61,"./constants":64,"./util":77}],63:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ConnectivityVerifier=void 0;var n=t("./connection-holder"),o=t("./constants"),i=t("../error"),t=(s.prototype.verify=function(t){var e,r=(void 0===t?{}:t).database;return t=this._connectionProvider,r=void 0===r?"":r,(e=new n.ConnectionHolder({mode:o.ACCESS_MODE_READ,database:r,connectionProvider:t})).initializeConnection(),e.getConnection().then(function(t){if(!t)throw(0,i.newError)("Unexpected error acquiring transaction");return e.close().then(function(){return t.server})}).catch(function(t){return e.close().catch(function(t){}).then(function(){return Promise.reject(t)})})},s);function s(t){this._connectionProvider=t}r.ConnectivityVerifier=t},{"../error":57,"./connection-holder":62,"./constants":64}],64:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BOLT_PROTOCOL_V4_4=r.BOLT_PROTOCOL_V4_3=r.BOLT_PROTOCOL_V4_2=r.BOLT_PROTOCOL_V4_1=r.BOLT_PROTOCOL_V4_0=r.BOLT_PROTOCOL_V3=r.BOLT_PROTOCOL_V2=r.BOLT_PROTOCOL_V1=r.DEFAULT_POOL_MAX_SIZE=r.DEFAULT_POOL_ACQUISITION_TIMEOUT=r.ACCESS_MODE_WRITE=r.ACCESS_MODE_READ=r.FETCH_ALL=void 0;r.FETCH_ALL=-1;r.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4;r.DEFAULT_POOL_MAX_SIZE=100;r.ACCESS_MODE_READ="READ";r.ACCESS_MODE_WRITE="WRITE";r.BOLT_PROTOCOL_V1=1;r.BOLT_PROTOCOL_V2=2;r.BOLT_PROTOCOL_V3=3;r.BOLT_PROTOCOL_V4_0=4;r.BOLT_PROTOCOL_V4_1=4.1;r.BOLT_PROTOCOL_V4_2=4.2;r.BOLT_PROTOCOL_V4_3=4.3;r.BOLT_PROTOCOL_V4_4=4.4},{}],65:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.retryStrategy=r.resolver=r.serverAddress=r.urlUtil=r.logger=r.connectivityVerifier=r.transactionExecutor=r.txConfig=r.connectionHolder=r.constants=r.bookmark=r.observer=r.temporalUtil=r.util=void 0;var s=i(t("./util"));r.util=s;s=i(t("./temporal-util"));r.temporalUtil=s;s=i(t("./observers"));r.observer=s;s=i(t("./bookmark"));r.bookmark=s;s=i(t("./constants"));r.constants=s;s=i(t("./connection-holder"));r.connectionHolder=s;s=i(t("./tx-config"));r.txConfig=s;s=i(t("./transaction-executor"));r.transactionExecutor=s;s=i(t("./connectivity-verifier"));r.connectivityVerifier=s;s=i(t("./logger"));r.logger=s;s=i(t("./url-util"));r.urlUtil=s;s=i(t("./server-address"));r.serverAddress=s;s=i(t("./resolver"));r.resolver=s;t=i(t("./retry-strategy"));r.retryStrategy=t},{"./bookmark":61,"./connection-holder":62,"./connectivity-verifier":63,"./constants":64,"./logger":66,"./observers":67,"./resolver":70,"./retry-strategy":71,"./server-address":72,"./temporal-util":73,"./transaction-executor":74,"./tx-config":75,"./url-util":76,"./util":77}],66:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0}),r.Logger=void 0;var i,s=t("../error"),u="error",a="warn",c="info",l="debug",f=c,p=((t={})[u]=0,t[a]=1,t[c]=2,t[l]=3,t),t=(h.create=function(t){if(t&&t.logging){t=t.logging;return new h(function(t){if(t&&t.level){var e=t.level,t=p[e];if(!t&&0!==t)throw(0,s.newError)("Illegal logging level: "+e+". Supported levels are: "+Object.keys(p));return e}return f}(t),function(t){if(t&&t.logger){var e=t.logger;if(e&&"function"==typeof e)return e}throw(0,s.newError)("Illegal logger function: "+t.logger)}(t))}return this.noOp()},h.noOp=function(){return b},h.prototype.isErrorEnabled=function(){return _(this._level,u)},h.prototype.error=function(t){this.isErrorEnabled()&&this._loggerFunction(u,t)},h.prototype.isWarnEnabled=function(){return _(this._level,a)},h.prototype.warn=function(t){this.isWarnEnabled()&&this._loggerFunction(a,t)},h.prototype.isInfoEnabled=function(){return _(this._level,c)},h.prototype.info=function(t){this.isInfoEnabled()&&this._loggerFunction(c,t)},h.prototype.isDebugEnabled=function(){return _(this._level,l)},h.prototype.debug=function(t){this.isDebugEnabled()&&this._loggerFunction(l,t)},h);function h(t,e){this._level=t,this._loggerFunction=e}function d(){return i.call(this,c,function(t,e){})||this}r.Logger=t;var b=new(o(d,i=t),d.prototype.isErrorEnabled=function(){return!1},d.prototype.error=function(t){},d.prototype.isWarnEnabled=function(){return!1},d.prototype.warn=function(t){},d.prototype.isInfoEnabled=function(){return!1},d.prototype.info=function(t){},d.prototype.isDebugEnabled=function(){return!1},d.prototype.debug=function(t){},d);function _(t,e){return p[t]>=p[e]}},{"../error":57}],67:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FailedObserver=r.CompletedObserver=void 0;var n=(o.prototype.subscribe=function(t){s(t,t.onKeys,[]),s(t,t.onCompleted,{})},o.prototype.cancel=function(){},o.prototype.prepareToHandleSingleResponse=function(){},o.prototype.markCompleted=function(){},o.prototype.onError=function(t){throw Error("CompletedObserver not supposed to call onError")},o);function o(){}r.CompletedObserver=n;i.prototype.subscribe=function(t){s(t,t.onError,this._error),this._observers.push(t)},i.prototype.onError=function(e){var t=this;Promise.resolve(s(this,this._beforeError,e)).then(function(){return t._observers.forEach(function(t){return s(t,t.onError,e)})})},i.prototype.cancel=function(){},i.prototype.prepareToHandleSingleResponse=function(){},i.prototype.markCompleted=function(){},n=i;function i(t){var e=t.error,t=t.onError;this._error=e,this._beforeError=t,this._observers=[],this.onError(e)}function s(t,e,r){e&&e.bind(t)(r)}r.FailedObserver=n},{}],68:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.resolve=function(){throw new Error("Abstract function")},o.prototype._resolveToItself=function(t){return Promise.resolve([t])},o);function o(){}r.default=n},{}],69:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../server-address");function o(t){return Promise.resolve([t])}i.prototype.resolve=function(e){var r=this;return new Promise(function(t){return t(r._resolverFunction(e.asHostPort()))}).then(function(t){if(!Array.isArray(t))throw new TypeError("Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses.Each address is '<host>:<port>'. Got: "+t);return t.map(function(t){return n.ServerAddress.fromUrl(t)})})},t=i;function i(t){this._resolverFunction=t||o}r.default=t},{"../server-address":72}],70:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.ConfiguredCustomResolver=r.BaseHostNameResolver=void 0;var o=n(t("./base-host-name-resolver"));r.BaseHostNameResolver=o.default;t=n(t("./configured-custom-resolver"));r.ConfiguredCustomResolver=t.default},{"./base-host-name-resolver":68,"./configured-custom-resolver":69}],71:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.canRetryOn=void 0;var n=t("../error");r.canRetryOn=function(t){return t&&t instanceof n.Neo4jError&&t.code&&(t.code===n.SERVICE_UNAVAILABLE||t.code===n.SESSION_EXPIRED||"Neo.ClientError.Security.AuthorizationExpired"===t.code||function(t){t=t.code;if(0<=t.indexOf("TransientError"))return"Neo.TransientError.Transaction.Terminated"!==t&&"Neo.TransientError.Transaction.LockClientStopped"!==t;return!1}(t))}},{"../error":57}],72:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.ServerAddress=void 0;var s=t("./util"),u=i(t("./url-util")),t=(a.prototype.host=function(){return this._host},a.prototype.resolvedHost=function(){return this._resolved||this._host},a.prototype.port=function(){return this._port},a.prototype.resolveWith=function(t){return new a(this._host,t,this._port,this._hostPort)},a.prototype.asHostPort=function(){return this._hostPort},a.prototype.asKey=function(){return this._hostPort},a.prototype.toString=function(){return this._stringValue},a.fromUrl=function(t){t=u.parseDatabaseUrl(t);return new a(t.host,null,t.port,t.hostAndPort)},a);function a(t,e,r,n){this._host=(0,s.assertString)(t,"host"),this._resolved=e?(0,s.assertString)(e,"resolved"):null,this._port=(0,s.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=e?n+"("+e+")":""+n}r.ServerAddress=t},{"./url-util":76,"./util":77}],73:[function(t,e,u){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(u,"__esModule",{value:!0}),u.floorMod=u.floorDiv=u.assertValidNanosecond=u.assertValidSecond=u.assertValidMinute=u.assertValidHour=u.assertValidDay=u.assertValidMonth=u.assertValidYear=u.timeZoneOffsetInSeconds=u.totalNanoseconds=u.dateToIsoString=u.timeZoneOffsetToIsoString=u.timeToIsoString=u.durationToIsoString=u.dateToEpochDay=u.localDateTimeToEpochSecond=u.localTimeToNanoOfDay=u.normalizeNanosecondsForDuration=u.normalizeSecondsForDuration=u.SECONDS_PER_DAY=u.DAYS_PER_400_YEAR_CYCLE=u.DAYS_0000_TO_1970=u.NANOS_PER_HOUR=u.NANOS_PER_MINUTE=u.NANOS_PER_MILLISECOND=u.NANOS_PER_SECOND=u.SECONDS_PER_HOUR=u.SECONDS_PER_MINUTE=u.MINUTES_PER_HOUR=u.NANOSECOND_OF_SECOND_RANGE=u.SECOND_OF_MINUTE_RANGE=u.MINUTE_OF_HOUR_RANGE=u.HOUR_OF_DAY_RANGE=u.DAY_OF_MONTH_RANGE=u.MONTH_OF_YEAR_RANGE=u.YEAR_RANGE=void 0;var a=r(t("../integer")),i=t("../error"),s=t("./util"),t=(c.prototype.contains=function(t){if((0,a.isInt)(t)&&t instanceof a.default)return t.greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger);if("bigint"!=typeof t)return t>=this._minNumber&&t<=this._maxNumber;t=(0,a.int)(t);return t.greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger)},c.prototype.toString=function(){return"["+this._minNumber+", "+this._maxNumber+"]"},c);function c(t,e){this._minNumber=t,this._maxNumber=e,this._minInteger=(0,a.int)(t),this._maxInteger=(0,a.int)(e)}function l(t,e,r){t=(0,a.int)(t),e=(0,a.int)(e),r=(0,a.int)(r);var n=t.multiply(365);return n=(n=(n=t.greaterThanOrEqual(0)?n.add(t.add(3).div(4).subtract(t.add(99).div(100)).add(t.add(399).div(400))):n.subtract(t.div(-4).subtract(t.div(-100)).add(t.div(-400)))).add(e.multiply(367).subtract(362).div(12))).add(r.subtract(1)),e.greaterThan(2)&&(n=n.subtract(1),t=t,(t=(0,a.int)(t)).modulo(4).equals(0)&&(!t.modulo(100).equals(0)||t.modulo(400).equals(0))||(n=n.subtract(1))),n.subtract(u.DAYS_0000_TO_1970)}function f(t,e,r){if((0,s.assertNumberOrInteger)(t,r),!e.contains(t))throw(0,i.newError)(r+" is expected to be in range "+e+" but was: "+t);return t}function p(t,e){t=(0,a.int)(t),e=(0,a.int)(e);var r=t.div(e);return r=t.isPositive()!==e.isPositive()&&r.multiply(e).notEquals(t)?r.subtract(1):r}function h(t,e){return t=(0,a.int)(t),e=(0,a.int)(e),t.subtract(p(t,e).multiply(e))}function d(t){return(t=(0,a.int)(t)).equals(0)?"":"."+b(t,9)}function b(t,e){var r=(t=(0,a.int)(t)).isNegative(),n=(t=r?t.negate():t).toString();if(e)for(;n.length<e;)n="0"+n;return r?"-"+n:n}u.YEAR_RANGE=new t(-999999999,999999999),u.MONTH_OF_YEAR_RANGE=new t(1,12),u.DAY_OF_MONTH_RANGE=new t(1,31),u.HOUR_OF_DAY_RANGE=new t(0,23),u.MINUTE_OF_HOUR_RANGE=new t(0,59),u.SECOND_OF_MINUTE_RANGE=new t(0,59),u.NANOSECOND_OF_SECOND_RANGE=new t(0,999999999),u.MINUTES_PER_HOUR=60,u.SECONDS_PER_MINUTE=60,u.SECONDS_PER_HOUR=u.SECONDS_PER_MINUTE*u.MINUTES_PER_HOUR,u.NANOS_PER_SECOND=1e9,u.NANOS_PER_MILLISECOND=1e6,u.NANOS_PER_MINUTE=u.NANOS_PER_SECOND*u.SECONDS_PER_MINUTE,u.NANOS_PER_HOUR=u.NANOS_PER_MINUTE*u.MINUTES_PER_HOUR,u.DAYS_0000_TO_1970=719528,u.DAYS_PER_400_YEAR_CYCLE=146097,u.SECONDS_PER_DAY=86400,u.normalizeSecondsForDuration=function(t,e){return(0,a.int)(t).add(p(e,u.NANOS_PER_SECOND))},u.normalizeNanosecondsForDuration=function(t){return h(t,u.NANOS_PER_SECOND)},u.localTimeToNanoOfDay=function(t,e,r,n){return t=(0,a.int)(t),e=(0,a.int)(e),r=(0,a.int)(r),n=(0,a.int)(n),(t=(t=(t=t.multiply(u.NANOS_PER_HOUR)).add(e.multiply(u.NANOS_PER_MINUTE))).add(r.multiply(u.NANOS_PER_SECOND))).add(n)},u.localDateTimeToEpochSecond=function(t,e,r,n,o,i,s){return r=l(t,e,r),i=function(t,e,r){t=(0,a.int)(t),e=(0,a.int)(e),r=(0,a.int)(r);t=t.multiply(u.SECONDS_PER_HOUR);return(t=t.add(e.multiply(u.SECONDS_PER_MINUTE))).add(r)}(n,o,i),r.multiply(u.SECONDS_PER_DAY).add(i)},u.dateToEpochDay=l,u.durationToIsoString=function(t,e,r,n){return"P"+b(t)+"M"+b(e)+"DT"+function(t,e){var r;t=(0,a.int)(t),e=(0,a.int)(e);var n=t.isNegative(),o=e.greaterThan(0);t=n&&o?t.equals(-1)?"-0":t.add(1).toString():t.toString();o&&(r=d((n?e.negate().add(2*u.NANOS_PER_SECOND):e.add(u.NANOS_PER_SECOND)).modulo(u.NANOS_PER_SECOND)));return r?t+r:t}(r,n)+"S"},u.timeToIsoString=function(t,e,r,n){return b(t,2)+":"+b(e,2)+":"+b(r,2)+d(n)},u.timeZoneOffsetToIsoString=function(t){if((t=(0,a.int)(t)).equals(0))return"Z";var e=(n=t.isNegative())?"-":"+",r=b((t=n?t.multiply(-1):t).div(u.SECONDS_PER_HOUR),2),n=b(t.div(u.SECONDS_PER_MINUTE).modulo(u.MINUTES_PER_HOUR),2);return(t=(t=t.modulo(u.SECONDS_PER_MINUTE)).equals(0)?null:b(t,2))?e+r+":"+n+":"+t:e+r+":"+n},u.dateToIsoString=function(t,e,r){var n=(t=(0,a.int)(t)).isNegative(),t=b(t=n?t.multiply(-1):t,4);return(t=n?"-"+t:t)+"-"+b(e,2)+"-"+b(r,2)},u.totalNanoseconds=function(t,e){return function(t,e){{if(t instanceof a.default)return t.add(e);if("bigint"==typeof t)return t+BigInt(e)}return t+e}(e=e||0,t.getMilliseconds()*u.NANOS_PER_MILLISECOND)},u.timeZoneOffsetInSeconds=function(t){return 0===(t=t.getTimezoneOffset())?0:-1*t*u.SECONDS_PER_MINUTE},u.assertValidYear=function(t){return f(t,u.YEAR_RANGE,"Year")},u.assertValidMonth=function(t){return f(t,u.MONTH_OF_YEAR_RANGE,"Month")},u.assertValidDay=function(t){return f(t,u.DAY_OF_MONTH_RANGE,"Day")},u.assertValidHour=function(t){return f(t,u.HOUR_OF_DAY_RANGE,"Hour")},u.assertValidMinute=function(t){return f(t,u.MINUTE_OF_HOUR_RANGE,"Minute")},u.assertValidSecond=function(t){return f(t,u.SECOND_OF_MINUTE_RANGE,"Second")},u.assertValidNanosecond=function(t){return f(t,u.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},u.floorDiv=p,u.floorMod=h},{"../error":57,"../integer":60,"./util":77}],74:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TransactionExecutor=void 0;var n=t("../error"),a=t("./retry-strategy"),t=(o.prototype.execute=function(n,o){var i=this;return new Promise(function(t,e){i._executeTransactionInsidePromise(n,o,t,e)}).catch(function(t){var e=Date.now(),r=i._initialRetryDelayMs;return i._retryTransactionPromise(n,o,t,e,r)})},o.prototype.close=function(){this._inFlightTimeoutIds.forEach(function(t){return clearTimeout(t)}),this._inFlightTimeoutIds=[]},o.prototype._retryTransactionPromise=function(o,i,t,r,s){var u=this;return Date.now()-r>this._maxRetryTimeMs||!(0,a.canRetryOn)(t)?Promise.reject(t):new Promise(function(t,e){var r=u._computeDelayWithJitter(s),n=setTimeout(function(){u._inFlightTimeoutIds=u._inFlightTimeoutIds.filter(function(t){return t!==n}),u._executeTransactionInsidePromise(o,i,t,e)},r);u._inFlightTimeoutIds.push(n)}).catch(function(t){var e=s*u._multiplier;return u._retryTransactionPromise(o,i,t,r,e)})},o.prototype._executeTransactionInsidePromise=function(t,e,r,n){var o,i=this;try{o=t()}catch(t){return void n(t)}this._safeExecuteTransactionWork(o,e).then(function(t){return i._handleTransactionWorkSuccess(t,o,r,n)}).catch(function(t){return i._handleTransactionWorkFailure(t,o,n)})},o.prototype._safeExecuteTransactionWork=function(t,e){try{var r=e(t);return Promise.resolve(r)}catch(t){return Promise.reject(t)}},o.prototype._handleTransactionWorkSuccess=function(t,e,r,n){e.isOpen()?e.commit().then(function(){r(t)}).catch(function(t){n(t)}):r(t)},o.prototype._handleTransactionWorkFailure=function(t,e,r){e.isOpen()?e.rollback().catch(function(t){}).then(function(){return r(t)}):r(t)},o.prototype._computeDelayWithJitter=function(t){var e=t*this._jitterFactor,r=t-e,e=t+e;return Math.random()*(e-r)+r},o.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,n.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs);if(this._initialRetryDelayMs<0)throw(0,n.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs);if(this._multiplier<1)throw(0,n.newError)("Multiplier should be >= 1.0: "+this._multiplier);if(this._jitterFactor<0||1<this._jitterFactor)throw(0,n.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor)},o);function o(t,e,r,n){this._maxRetryTimeMs=i(t,3e4),this._initialRetryDelayMs=i(e,1e3),this._multiplier=i(r,2),this._jitterFactor=i(n,.2),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}function i(t,e){return t||0===t?t:e}r.TransactionExecutor=t},{"../error":57,"./retry-strategy":71}],75:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.TxConfig=void 0;var s=i(t("./util")),u=t("../error"),a=t("../integer"),t=(c.empty=function(){return l},c.prototype.isEmpty=function(){return Object.values(this).every(function(t){return null==t})},c);function c(t){var e;(e=t)&&s.assertObject(e,"Transaction config"),this.timeout=function(t){if(!s.isObject(t)||!t.timeout&&0!==t.timeout)return null;s.assertNumberOrInteger(t.timeout,"Transaction timeout");t=(0,a.int)(t.timeout);if(t.isZero())throw(0,u.newError)("Transaction timeout should not be zero");if(t.isNegative())throw(0,u.newError)("Transaction timeout should not be negative");return t}(t),this.metadata=function(t){if(s.isObject(t)&&t.metadata){t=t.metadata;if(s.assertObject(t,"config.metadata"),0!==Object.keys(t).length)return t}return null}(t)}var l=new(r.TxConfig=t)({})},{"../error":57,"../integer":60,"./util":77}],76:[function(t,e,r){"use strict";var s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},u=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(r,"__esModule",{value:!0}),r.Url=r.formatIPv6Address=r.formatIPv4Address=r.defaultPortForScheme=r.parseDatabaseUrl=void 0;var a=t("./util"),n=7687,o=7474,i=7473,c=function(t,e,r,n,o){this.scheme=t,this.host=e,this.port=r,this.hostAndPort=n,this.query=o};function l(t,e,r){if(!(t=(t||"").trim()))throw new Error("Illegal empty "+e+" in URL query '"+r+"'");return t}function f(t){var e="["===t.charAt(0),r="]"===t.charAt(t.length-1);if(e||r){if(e&&r)return t;throw new Error("Illegal IPv6 address "+t)}return"["+t+"]"}function p(t){return"http"===t?o:"https"===t?i:n}r.Url=c,r.parseDatabaseUrl=function(t){(0,a.assertString)(t,"URL");var e=function(t){function i(t,e){e=t.indexOf(e);return 0<=e?[t.substring(0,e),t[e],t.substring(e+1)]:[t,"",""]}function e(t){var e,r={};(o="@")===(e=0<=(o=(n=t).lastIndexOf(o))?[n.substring(0,o),n[o],n.substring(o+1)]:["","",n])[1]&&(r.userInfo=decodeURIComponent(e[0]),t=e[2]);var n,o,n=u((o="]",n=i(t,n="["),[(o=i(n[2],o))[0],o[2]]),2),o=n[0],n=n[1];return""!==o?(r.host=o,e=i(n,":")):(e=i(t,":"),r.host=e[0]),":"===e[1]&&(r.port=e[2]),r}var r,n={};":"===(r=i(t,":"))[1]&&(n.scheme=decodeURIComponent(r[0]),t=r[2]);"#"===(r=i(t,"#"))[1]&&(n.fragment=decodeURIComponent(r[2]),t=r[0]);"?"===(r=i(t,"?"))[1]&&(n.query=r[2],t=r[0]);t.startsWith("//")?(r=i(t.substr(2),"/"),(n=s(s({},n),e(r[0]))).path=r[1]+r[2]):n.path=t;return n}((i=-1!==(o=(o=t).trim()).indexOf("://")?{schemeMissing:!1,url:o}:{schemeMissing:!0,url:"none://"+o}).url),r=i.schemeMissing?null:function(t){if(t)return t=":"===(t=t.trim()).charAt(t.length-1)?t.substring(0,t.length-1):t;return null}(e.scheme),n=function(t,e){if(t)return t.trim();throw new Error("Unable to extract host from "+e)}(e.host),o=function(t){if(t)return 0<=t.indexOf(":")?f(t):t;throw new Error("Illegal host "+t)}(n),i=function(t,e){t="string"==typeof t?parseInt(t,10):t;return 0===t||t?t:p(e)}(e.port,r),o=o+":"+i,t=function(t,r){var t=t?function(t){(t=(t||"").trim())&&"?"===t.charAt(0)&&(t=t.substring(1,t.length));return t}(t):null,n={};t&&t.split("&").forEach(function(t){var e=t.split("=");if(2!==e.length)throw new Error("Invalid parameters: '"+e+"' in URL '"+r+"'.");t=l(e[0],"key",r),e=l(e[1],"value",r);if(n[t])throw new Error("Duplicated query parameters with key '"+t+"' in URL '"+r+"'");n[t]=e});return n}(e.query||function(t){if("string"!=typeof t)return null;t=u(t.split("?"),2),t[0];return t[1]}(e.resourceName),t);return new c(r,n,i,o,t)},r.formatIPv4Address=function(t,e){return t+":"+e},r.formatIPv6Address=function(t,e){return f(t)+":"+e},r.defaultPortForScheme=p},{"./util":77}],77:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ENCRYPTION_OFF=r.ENCRYPTION_ON=r.validateQueryAndParameters=r.assertValidDate=r.assertNumberOrInteger=r.assertNumber=r.assertString=r.assertObject=r.isString=r.isObject=r.isEmptyObjectOrNull=void 0;var n=t("../integer"),o=t("../json");r.ENCRYPTION_ON="ENCRYPTION_ON";function i(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}function s(t,e){if(!u(t))throw new TypeError(e+" expected to be string but was: "+(0,o.stringify)(t));return t}function u(t){return"[object String]"===Object.prototype.toString.call(t)}r.ENCRYPTION_OFF="ENCRYPTION_OFF",r.isEmptyObjectOrNull=function(t){if(null===t)return!0;if(!i(t))return!1;for(var e in t)if(Object.prototype.hasOwnProperty.bind(t,e))return!1;return!0},r.isObject=i,r.validateQueryAndParameters=function(t,e,r){var n="",e=e||{},r=(null==r?void 0:r.skipAsserts)||!1;return"string"==typeof t?n=t:t instanceof String?n=t.toString():"object"==typeof t&&t.text&&(n=t.text,e=t.parameters||{}),r||(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(!i(t)){var e=t.constructor?" "+t.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:"+e+" "+t)}}(e)),{validatedQuery:n,params:e}},r.assertObject=function(t,e){if(!i(t))throw new TypeError(e+" expected to be an object but was: "+(0,o.stringify)(t));return t},r.assertString=s,r.assertNumber=function(t,e){if("number"!=typeof t)throw new TypeError(e+" expected to be a number but was: "+(0,o.stringify)(t));return t},r.assertNumberOrInteger=function(t,e){if("number"!=typeof t&&"bigint"!=typeof t&&!(0,n.isInt)(t))throw new TypeError(e+" expected to be either a number or an Integer object but was: "+(0,o.stringify)(t));return t},r.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: "+(0,o.stringify)(t));if(Number.isNaN(t.getTime()))throw new TypeError(e+" expected to be valid JavaScript Date but its time was NaN: "+(0,o.stringify)(t));return t},r.isString=u},{"../integer":60,"../json":78}],78:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.stringify=void 0,r.stringify=function(t){return JSON.stringify(t,function(t,e){return"bigint"==typeof e?e+"n":e})}},{}],79:[function(t,e,r){"use strict";var n=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},c=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(r,"__esModule",{value:!0});var o=t("./error");i.prototype.forEach=function(t){var e,r;try{for(var n=c(this.entries()),o=n.next();!o.done;o=n.next()){var i=l(o.value,2),s=i[0];t(i[1],s,this)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},i.prototype.map=function(t){var e,r,n=[];try{for(var o=c(this.entries()),i=o.next();!i.done;i=o.next()){var s=l(i.value,2),u=s[0],a=s[1];n.push(t(a,u,this))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},i.prototype.entries=function(){var e;return n(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.keys.length?[4,[this.keys[e],this._fields[e]]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})},i.prototype.values=function(){var e;return n(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.keys.length?[4,this._fields[e]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})},i.prototype[Symbol.iterator]=function(){var e;return n(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.keys.length?[4,this._fields[e]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})},i.prototype.toObject=function(){var e,t,r={};try{for(var n=c(this.entries()),o=n.next();!o.done;o=n.next()){var i=l(o.value,2),s=i[0],u=i[1];r[s]=u}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},i.prototype.get=function(t){var e;if("number"!=typeof t){if(void 0===(e=this._fieldLookup[t]))throw(0,o.newError)("This record has no field with key '"+t+"', available key are: ["+this.keys+"].")}else e=t;if(e>this._fields.length-1||e<0)throw(0,o.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]},i.prototype.has=function(t){return"number"==typeof t?0<=t&&t<this._fields.length:void 0!==this._fieldLookup[t]},t=i;function i(t,e,r){var n;this.keys=t,this.length=t.length,this._fields=e,this._fieldLookup=r||(n={},t.forEach(function(t,e){n[t]=e}),n)}r.default=t},{"./error":57}],80:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0}),r.Stats=r.QueryStatistics=r.ProfiledPlan=r.Plan=r.Notification=r.ServerInfo=r.queryType=void 0;var s=i(t("./integer")),t=(u.prototype._buildNotifications=function(t){return t?t.map(function(t){return new h(t)}):[]},u.prototype.hasPlan=function(){return this.plan instanceof a},u.prototype.hasProfile=function(){return this.profile instanceof c},u);function u(t,e,r,n){this.query={text:t,parameters:e},this.queryType=r.type,this.counters=new f(r.stats||{}),this.updateStatistics=this.counters,this.plan=!(!r.plan&&!r.profile)&&new a(r.plan||r.profile),this.profile=!!r.profile&&new c(r.profile),this.notifications=this._buildNotifications(r.notifications),this.server=new b(r.server,n),this.resultConsumedAfter=r.result_consumed_after,this.resultAvailableAfter=r.result_available_after,this.database={name:r.db||null}}var a=function e(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.children=t.children?t.children.map(function(t){return new e(t)}):[]};r.Plan=a;var c=(l.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},l);function l(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.dbHits=y("dbHits",t),this.rows=y("rows",t),this.pageCacheMisses=y("pageCacheMisses",t),this.pageCacheHits=y("pageCacheHits",t),this.pageCacheHitRatio=y("pageCacheHitRatio",t),this.time=y("time",t),this.children=t.children?t.children.map(function(t){return new l(t)}):[]}r.ProfiledPlan=c,r.Stats=function(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0};var f=(p.prototype.containsUpdates=function(){var r=this;return void 0!==this._containsUpdates?this._containsUpdates:0<Object.keys(this._stats).reduce(function(t,e){return t+r._stats[e]},0)},p.prototype.updates=function(){return this._stats},p.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},p.prototype.systemUpdates=function(){return this._systemUpdates},p);function p(r){var n=this;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(r).forEach(function(t){var e=t.replace(/(-\w)/g,function(t){return t[1].toUpperCase()});e in n._stats?n._stats[e]=_(r[t]):"systemUpdates"===e?n._systemUpdates=_(r[t]):"containsSystemUpdates"===e?n._containsSystemUpdates=r[t]:"containsUpdates"===e&&(n._containsUpdates=r[t])}),this._stats=Object.freeze(this._stats)}r.QueryStatistics=f;var h=(d._constructPosition=function(t){return t?{offset:_(t.offset),line:_(t.line),column:_(t.column)}:{}},d);function d(t){this.code=t.code,this.title=t.title,this.description=t.description,this.severity=t.severity,this.position=d._constructPosition(t.position)}r.Notification=h;var b=function(t,e){t&&(this.address=t.address,this.version=t.version,this.agent=t.version),this.protocolVersion=e};function _(t){return t instanceof s.default?t.toInt():"bigint"==typeof t?(0,s.int)(t).toInt():t}function y(t,e,r){return void 0===r&&(r=0),t in e?_(e[t]):r}r.ServerInfo=b;r.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},r.default=t},{"./integer":60}],81:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});function s(t){console.log("Uncaught error when processing result: "+t)}function u(t){}var i=n(t("./result-summary")),a=t("./internal"),o=a.connectionHolder.EMPTY_CONNECTION_HOLDER,t=(c.prototype.keys=function(){var t=this;return new Promise(function(e,r){t._streamObserverPromise.then(function(t){return t.subscribe({onKeys:function(t){return e(t)},onError:function(t){return r(t)}})}).catch(r)})},c.prototype.summary=function(){var n=this;return new Promise(function(e,r){n._streamObserverPromise.then(function(t){t.cancel(),t.subscribe({onCompleted:function(t){return n._createSummary(t).then(e,r)},onError:function(t){return r(t)}})}).catch(r)})},c.prototype._getOrCreatePromise=function(){var t=this;return this._p||(this._p=new Promise(function(e,r){var n=[];t.subscribe({onNext:function(t){n.push(t)},onCompleted:function(t){e({records:n,summary:t})},onError:function(t){r(t)}})})),this._p},c.prototype.then=function(t,e){return this._getOrCreatePromise().then(t,e)},c.prototype.catch=function(t){return this._getOrCreatePromise().catch(t)},c.prototype.finally=function(t){return this._getOrCreatePromise().finally(t)},c.prototype.subscribe=function(n){var o=this,e=n.onCompleted||u;n.onCompleted=function(t){o._createSummary(t).then(function(t){return e.call(n,t)})};var i=n.onError||s;n.onError=function(r){o._connectionHolder.releaseConnection().then(function(){var t,e;t=r,(e=o._stack)&&(t.stack=t.toString()+"\n"+e),i.call(n,r)})},this._streamObserverPromise.then(function(t){return t.subscribe(n)}).catch(function(t){return n.onError(t)})},c.prototype._cancel=function(){this._streamObserverPromise.then(function(t){return t.cancel()})},c.prototype._createSummary=function(e){var t=a.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=t.validatedQuery,n=t.params,o=this._connectionHolder;return o.getConnection().then(function(t){return o.releaseConnection().then(function(){return t?t.protocol().version:void 0})},function(t){}).then(function(t){return new i.default(r,n,e,t)})},c);function c(t,e,r,n){this._stack=function(){var t=new Error("");if(t.stack)return t.stack.replace(/^Error(\n\r)*/,"");return null}(),this._streamObserverPromise=t,this._p=null,this._query=e,this._parameters=r||{},this._connectionHolder=n||o}Symbol.toStringTag,r.default=t},{"./internal":65,"./result-summary":80}],82:[function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},i=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s=t("./internal/observers"),u=t("./internal/util"),a=t("./error"),c=n(t("./result")),l=n(t("./transaction")),f=t("./internal/connection-holder"),p=t("./internal/constants"),h=t("./internal/transaction-executor"),d=t("./internal/bookmark"),b=t("./internal/tx-config"),t=(_.prototype.run=function(t,e,r){var n=this,e=(0,u.validateQueryAndParameters)(t,e),o=e.validatedQuery,i=e.params,s=r?new b.TxConfig(r):b.TxConfig.empty();return this._run(o,i,function(t){return n._assertSessionIsOpen(),t.protocol().run(o,i,{bookmark:n._lastBookmark,txConfig:s,mode:n._mode,database:n._database,impersonatedUser:n._impersonatedUser,afterComplete:n._onComplete,reactive:n._reactive,fetchSize:n._fetchSize})})},_.prototype._run=function(t,e,r){var n=this._connectionHolderWithMode(this._mode),o=this._open?!this._hasTx&&n.initializeConnection()?n.getConnection().then(function(t){return r(t)}).catch(function(t){return Promise.resolve(new s.FailedObserver({error:t}))}):Promise.resolve(new s.FailedObserver({error:(0,a.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 s.FailedObserver({error:(0,a.newError)("Cannot run query in a closed session.")}));return new c.default(o,t,e,n)},_.prototype._acquireConnection=function(e){return o(this,void 0,void 0,function(){var r,n=this;return i(this,function(t){return r=this._connectionHolderWithMode(this._mode),[2,this._open?!this._hasTx&&r.initializeConnection()?r.getConnection().then(function(t){return e(t)}).then(function(e){return o(n,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,r.releaseConnection()];case 1:return t.sent(),[2,e]}})})}):Promise.reject((0,a.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.reject((0,a.newError)("Cannot run query in a closed session."))]})})},_.prototype.beginTransaction=function(t){var e=t,t=b.TxConfig.empty();return e&&(t=new b.TxConfig(e)),this._beginTransaction(this._mode,t)},_.prototype._beginTransaction=function(t,e){if(!this._open)throw(0,a.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,a.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");t=_._validateSessionMode(t),t=this._connectionHolderWithMode(t);t.initializeConnection(),this._hasTx=!0;t=new l.default({connectionHolder:t,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmark:this._updateBookmark.bind(this),onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize});return t._begin(this._lastBookmark,e),t},_.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,a.newError)("You cannot run more transactions on a closed session.")},_.prototype._transactionClosed=function(){this._hasTx=!1},_.prototype.lastBookmark=function(){return this._lastBookmark.values()},_.prototype.readTransaction=function(t,e){e=new b.TxConfig(e);return this._runTransaction(p.ACCESS_MODE_READ,e,t)},_.prototype.writeTransaction=function(t,e){e=new b.TxConfig(e);return this._runTransaction(p.ACCESS_MODE_WRITE,e,t)},_.prototype._runTransaction=function(t,e,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(t,e)},r)},_.prototype._onDatabaseNameResolved=function(t){this._databaseNameResolved||(this._database=t=t||"",this._readConnectionHolder.setDatabase(t),this._writeConnectionHolder.setDatabase(t),this._databaseNameResolved=!0)},_.prototype._updateBookmark=function(t){t&&!t.isEmpty()&&(this._lastBookmark=t)},_.prototype.close=function(){return o(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this._open?(this._open=!1,this._transactionExecutor.close(),[4,this._readConnectionHolder.close()]):[3,3];case 1:return t.sent(),[4,this._writeConnectionHolder.close()];case 2:t.sent(),t.label=3;case 3:return[2]}})})},_.prototype._connectionHolderWithMode=function(t){if(t===p.ACCESS_MODE_READ)return this._readConnectionHolder;if(t===p.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,a.newError)("Unknown access mode: "+t)},_.prototype._onCompleteCallback=function(t){this._updateBookmark(new d.Bookmark(t.bookmark))},_._validateSessionMode=function(t){t=t||p.ACCESS_MODE_WRITE;if(t!==p.ACCESS_MODE_READ&&t!==p.ACCESS_MODE_WRITE)throw(0,a.newError)("Illegal session mode "+t);return t},_);function _(t){var e=t.mode,r=t.connectionProvider,n=t.bookmark,o=t.database,i=t.config,s=t.reactive,u=t.fetchSize,t=t.impersonatedUser;this._mode=e,this._database=o,this._reactive=s,this._fetchSize=u,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._readConnectionHolder=new f.ConnectionHolder({mode:p.ACCESS_MODE_READ,database:o,bookmark:n,connectionProvider:r,impersonatedUser:t,onDatabaseNameResolved:this._onDatabaseNameResolved}),this._writeConnectionHolder=new f.ConnectionHolder({mode:p.ACCESS_MODE_WRITE,database:o,bookmark:n,connectionProvider:r,impersonatedUser:t,onDatabaseNameResolved:this._onDatabaseNameResolved}),this._open=!0,this._hasTx=!1,this._impersonatedUser=t,this._lastBookmark=n||d.Bookmark.empty(),this._transactionExecutor=function(t){t=t&&t.maxTransactionRetryTime?t.maxTransactionRetryTime:null;return new h.TransactionExecutor(t)}(i),this._onComplete=this._onCompleteCallback.bind(this),this._databaseNameResolved=""!==this._database}r.default=t},{"./error":57,"./internal/bookmark":61,"./internal/connection-holder":62,"./internal/constants":64,"./internal/observers":67,"./internal/transaction-executor":74,"./internal/tx-config":75,"./internal/util":77,"./result":81,"./transaction":85}],83:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isPoint=r.Point=void 0;var o=t("./internal/util"),n="__isPoint__",t=(i.prototype.toString=function(){return this.z||0===this.z?"Point{srid="+s(this.srid)+", x="+s(this.x)+", y="+s(this.y)+", z="+s(this.z)+"}":"Point{srid="+s(this.srid)+", x="+s(this.x)+", y="+s(this.y)+"}"},i);function i(t,e,r,n){this.srid=(0,o.assertNumberOrInteger)(t,"SRID"),this.x=(0,o.assertNumber)(e,"X coordinate"),this.y=(0,o.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,o.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function s(t){return Number.isInteger(t)?t+".0":t.toString()}r.Point=t,Object.defineProperty(t.prototype,n,{value:!0,enumerable:!1,configurable:!1,writable:!1}),r.isPoint=function(t){return!0===(t&&t[n])}},{"./internal/util":77}],84:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},c=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(r,"__esModule",{value:!0}),r.isDateTime=r.DateTime=r.isLocalDateTime=r.LocalDateTime=r.isDate=r.Date=r.isTime=r.Time=r.isLocalTime=r.LocalTime=r.isDuration=r.Duration=void 0;var l=i(t("./internal/temporal-util")),f=t("./internal/util"),p=t("./error"),s=i(t("./integer")),i={value:!0,enumerable:!1,configurable:!1,writable:!1},u="__isDuration__",a="__isLocalTime__",h="__isTime__",d="__isDate__",b="__isLocalDateTime__",_="__isDateTime__",t=(y.prototype.toString=function(){return l.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},y);function y(t,e,r,n){this.months=(0,f.assertNumberOrInteger)(t,"Months"),this.days=(0,f.assertNumberOrInteger)(e,"Days"),(0,f.assertNumberOrInteger)(r,"Seconds"),(0,f.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=l.normalizeSecondsForDuration(r,n),this.nanoseconds=l.normalizeNanosecondsForDuration(n),Object.freeze(this)}r.Duration=t,Object.defineProperty(t.prototype,u,i),r.isDuration=function(t){return S(t,u)};v.fromStandardDate=function(t,e){P(t,e);e=l.totalNanoseconds(t,e);return new v(t.getHours(),t.getMinutes(),t.getSeconds(),e instanceof s.default?e.toInt():"bigint"==typeof e?(0,s.int)(e).toInt():e)},v.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},t=v;function v(t,e,r,n){this.hour=l.assertValidHour(t),this.minute=l.assertValidMinute(e),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),Object.freeze(this)}r.LocalTime=t,Object.defineProperty(t.prototype,a,i),r.isLocalTime=function(t){return S(t,a)};m.fromStandardDate=function(t,e){return P(t,e),new m(t.getHours(),t.getMinutes(),t.getSeconds(),(0,s.toNumber)(l.totalNanoseconds(t,e)),l.timeZoneOffsetInSeconds(t))},m.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+l.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},t=m;function m(t,e,r,n,o){this.hour=l.assertValidHour(t),this.minute=l.assertValidMinute(e),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,f.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}r.Time=t,Object.defineProperty(t.prototype,h,i),r.isTime=function(t){return S(t,h)};g.fromStandardDate=function(t){return P(t),new g(t.getFullYear(),t.getMonth()+1,t.getDate())},g.prototype.toString=function(){return l.dateToIsoString(this.year,this.month,this.day)},t=g;function g(t,e,r){this.year=l.assertValidYear(t),this.month=l.assertValidMonth(e),this.day=l.assertValidDay(r),Object.freeze(this)}r.Date=t,Object.defineProperty(t.prototype,d,i),r.isDate=function(t){return S(t,d)};O.fromStandardDate=function(t,e){return P(t,e),new O(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),(0,s.toNumber)(l.totalNanoseconds(t,e)))},O.prototype.toString=function(){return E(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},t=O;function O(t,e,r,n,o,i,s){this.year=l.assertValidYear(t),this.month=l.assertValidMonth(e),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(s),Object.freeze(this)}r.LocalDateTime=t,Object.defineProperty(t.prototype,b,i),r.isLocalDateTime=function(t){return S(t,b)};w.fromStandardDate=function(t,e){return P(t,e),new w(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),(0,s.toNumber)(l.totalNanoseconds(t,e)),l.timeZoneOffsetInSeconds(t),null)},w.prototype.toString=function(){return E(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(this.timeZoneId?"["+this.timeZoneId+"]":l.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds||0))},t=w;function w(t,e,r,n,o,i,s,u,a){this.year=l.assertValidYear(t),this.month=l.assertValidMonth(e),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(s);u=c(function(t,e){var r=t||0===t,n=e&&""!==e;{if(r&&!n)return(0,f.assertNumberOrInteger)(t,"Time zone offset in seconds"),[t,void 0];if(!r&&n)return(0,f.assertString)(e,"Time zone ID"),[void 0,e];throw r&&n?(0,p.newError)("Unable to create DateTime with both time zone offset and id. Please specify either of them. Given offset: "+t+" and id: "+e):(0,p.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: "+t+" and id: "+e)}}(u,a),2),a=u[0],u=u[1];this.timeZoneOffsetSeconds=a,this.timeZoneId=u||void 0,Object.freeze(this)}function S(t,e){return!0===(t&&t[e])}function E(t,e,r,n,o,i,s){return l.dateToIsoString(t,e,r)+"T"+l.timeToIsoString(n,o,i,s)}function P(t,e){(0,f.assertValidDate)(t,"Standard date"),null!=e&&(0,f.assertNumberOrInteger)(e,"Nanosecond")}r.DateTime=t,Object.defineProperty(t.prototype,_,i),r.isDateTime=function(t){return S(t,_)}},{"./error":57,"./integer":60,"./internal/temporal-util":73,"./internal/util":77}],85:[function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,s,u,a){return new(u=u||Promise)(function(r,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function o(t){try{i(a.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(n,o)}i((a=a.apply(t,s||[])).next())})},o=this&&this.__generator||function(r,n){var o,i,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,i=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s=t("./internal/util"),u=t("./internal/connection-holder"),c=t("./internal/bookmark"),l=t("./internal/tx-config"),f=t("./internal/observers"),p=t("./error"),a=i(t("./result")),t=(h.prototype._begin=function(e,r){var n=this;this._connectionHolder.getConnection().then(function(t){if(n._onConnection(),t)return t.protocol().beginTransaction({bookmark:e,txConfig:r,mode:n._connectionHolder.mode(),database:n._connectionHolder.database(),impersonatedUser:n._impersonatedUser,beforeError:n._onError,afterComplete:n._onComplete});throw(0,p.newError)("No connection available")}).catch(function(t){return n._onError(t)})},h.prototype.run=function(t,e){t=(0,s.validateQueryAndParameters)(t,e),e=t.validatedQuery,t=t.params,t=this._state.run(e,t,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,reactive:this._reactive,fetchSize:this._fetchSize});return this._results.push(t),t},h.prototype.commit=function(){var r=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results});return this._state=r.state,this._onClose(),new Promise(function(t,e){r.result.subscribe({onCompleted:function(){return t()},onError:function(t){return e(t)}})})},h.prototype.rollback=function(){var r=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results});return this._state=r.state,this._onClose(),new Promise(function(t,e){r.result.subscribe({onCompleted:function(){return t()},onError:function(t){return e(t)}})})},h.prototype.isOpen=function(){return this._state===d.ACTIVE},h.prototype.close=function(){return n(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return this.isOpen()?[4,this.rollback()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},h.prototype._onErrorCallback=function(t){return this._state=d.FAILED,this._onClose(),this._connectionHolder.releaseConnection()},h.prototype._onCompleteCallback=function(t){this._onBookmark(new c.Bookmark(t.bookmark))},h);function h(t){var e=t.connectionHolder,r=t.onClose,n=t.onBookmark,o=t.onConnection,i=t.reactive,s=t.fetchSize,t=t.impersonatedUser;this._connectionHolder=e,this._reactive=i,this._state=d.ACTIVE,this._onClose=r,this._onBookmark=n,this._onConnection=o,this._onError=this._onErrorCallback.bind(this),this._onComplete=this._onCompleteCallback.bind(this),this._fetchSize=s,this._results=[],this._impersonatedUser=t}var d={ACTIVE:{commit:function(t){return{result:b(!0,t.connectionHolder,t.onError,t.onComplete,t.onConnection,t.pendingResults),state:d.SUCCEEDED}},rollback:function(t){return{result:b(!1,t.connectionHolder,t.onError,t.onComplete,t.onConnection,t.pendingResults),state:d.ROLLED_BACK}},run:function(e,r,t){var n=t.connectionHolder,o=t.onError,i=t.onComplete,s=t.onConnection,u=t.reactive,a=t.fetchSize;return _(n.getConnection().then(function(t){if(s(),t)return t.protocol().run(e,r,{bookmark:c.Bookmark.empty(),txConfig:l.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:u,fetchSize:a});throw(0,p.newError)("No connection available")}).catch(function(t){return new f.FailedObserver({error:t,onError:o})}),e,r,n)}},FAILED:{commit:function(t){var e=t.connectionHolder,r=t.onError;t.onComplete;return{result:_(new f.FailedObserver({error:(0,p.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),"COMMIT",{},e),state:d.FAILED}},rollback:function(t){var e=t.connectionHolder;t.onError,t.onComplete;return{result:_(new f.CompletedObserver,"ROLLBACK",{},e),state:d.FAILED}},run:function(t,e,r){var n=r.connectionHolder,o=r.onError;r.onComplete;return _(new f.FailedObserver({error:(0,p.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:o}),t,e,n)}},SUCCEEDED:{commit:function(t){var e=t.connectionHolder,r=t.onError;t.onComplete;return{result:_(new f.FailedObserver({error:(0,p.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{}),state:d.SUCCEEDED,connectionHolder:e}},rollback:function(t){var e=t.connectionHolder,r=t.onError;t.onComplete;return{result:_(new f.FailedObserver({error:(0,p.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{}),state:d.SUCCEEDED,connectionHolder:e}},run:function(t,e,r){var n=r.connectionHolder,o=r.onError;r.onComplete;return _(new f.FailedObserver({error:(0,p.newError)("Cannot run query in this transaction, because it has already been committed."),onError:o}),t,e,n)}},ROLLED_BACK:{commit:function(t){var e=t.connectionHolder,r=t.onError;t.onComplete;return{result:_(new f.FailedObserver({error:(0,p.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},e),state:d.ROLLED_BACK}},rollback:function(t){var e=t.connectionHolder;t.onError,t.onComplete;return{result:_(new f.FailedObserver({error:(0,p.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},e),state:d.ROLLED_BACK}},run:function(t,e,r){var n=r.connectionHolder,o=r.onError;r.onComplete;return _(new f.FailedObserver({error:(0,p.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),t,e,n)}}};function b(r,t,n,o,i,s){var e=t.getConnection().then(function(e){return i(),s.forEach(function(t){return t._cancel()}),Promise.all(s).then(function(t){if(e)return r?e.protocol().commitTransaction({beforeError:n,afterComplete:o}):e.protocol().rollbackTransaction({beforeError:n,afterComplete:o});throw(0,p.newError)("No connection available")})}).catch(function(t){return new f.FailedObserver({error:t,onError:n})});return new a.default(e,r?"COMMIT":"ROLLBACK",{},t)}function _(t,e,r,n){return void 0===n&&(n=u.EMPTY_CONNECTION_HOLDER),new a.default(Promise.resolve(t),e,r,new u.ReadOnlyConnectionHolder(n||u.EMPTY_CONNECTION_HOLDER))}r.default=t},{"./error":57,"./internal/bookmark":61,"./internal/connection-holder":62,"./internal/observers":67,"./internal/tx-config":75,"./internal/util":77,"./result":81}],86:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},{}],87:[function(t,e,r){e.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},e.exports.default=e.exports,e.exports.__esModule=!0},{}],88:[function(t,e,r){e.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},{}],89:[function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}e.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},e.exports.default=e.exports,e.exports.__esModule=!0},{}],90:[function(t,e,r){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},{}],91:[function(t,e,r){var n=t("./setPrototypeOf.js");e.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&&n(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0},{"./setPrototypeOf.js":94}],92:[function(t,e,r){e.exports=function(t){return t&&t.__esModule?t:{default:t}},e.exports.default=e.exports,e.exports.__esModule=!0},{}],93:[function(t,e,r){var n=t("@babel/runtime/helpers/typeof").default,o=t("./assertThisInitialized.js");e.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e},e.exports.default=e.exports,e.exports.__esModule=!0},{"./assertThisInitialized.js":87,"@babel/runtime/helpers/typeof":95}],94:[function(t,r,e){function n(t,e){return r.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r.exports.default=r.exports,r.exports.__esModule=!0,n(t,e)}r.exports=n,r.exports.default=r.exports,r.exports.__esModule=!0},{}],95:[function(t,e,r){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(t){return typeof t}:e.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},{}],96:[function(t,e,r){"use strict";r.byteLength=function(t){var e=l(t),t=e[0],e=e[1];return 3*(t+e)/4-e},r.toByteArray=function(t){var e,r,n=l(t),o=n[0],n=n[1],i=new c(function(t,e){return 3*(t+e)/4-e}(o,n)),s=0,u=0<n?o-4:o;for(r=0;r<u;r+=4)e=a[t.charCodeAt(r)]<<18|a[t.charCodeAt(r+1)]<<12|a[t.charCodeAt(r+2)]<<6|a[t.charCodeAt(r+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=255&e;2===n&&(e=a[t.charCodeAt(r)]<<2|a[t.charCodeAt(r+1)]>>4,i[s++]=255&e);1===n&&(e=a[t.charCodeAt(r)]<<10|a[t.charCodeAt(r+1)]<<4|a[t.charCodeAt(r+2)]>>2,i[s++]=e>>8&255,i[s++]=255&e);return i},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],i=0,s=r-n;i<s;i+=16383)o.push(function(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(function(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}(n));return o.join("")}(t,i,s<i+16383?s:i+16383));1==n?(e=t[r-1],o.push(u[e>>2]+u[e<<4&63]+"==")):2==n&&(e=(t[r-2]<<8)+t[r-1],o.push(u[e>>10]+u[e>>4&63]+u[e<<2&63]+"="));return o.join("")};for(var u=[],a=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=n.length;o<i;++o)u[o]=n[o],a[n.charCodeAt(o)]=o;function l(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");t=t.indexOf("=");return[t=-1===t?e:t,t===e?0:4-t%4]}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],97:[function(A,t,R){!function(t){!function(){"use strict";var u=A("base64-js"),i=A("ieee754");R.Buffer=f,R.SlowBuffer=function(t){+t!=t&&(t=0);return f.alloc(+t)},R.INSPECT_MAX_BYTES=50;var e=2147483647;function o(t){if(e<t)throw new RangeError('The value "'+t+'" is invalid for option "size"');t=new Uint8Array(t);return t.__proto__=f.prototype,t}function f(t,e,r){if("number"!=typeof t)return n(t,e,r);if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return a(t)}function n(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|p(t,e),n=o(r),e=n.write(t,e);e!==r&&(n=n.slice(0,e));return n}(t,e);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(x(t,ArrayBuffer)||t&&x(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');r=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return r.__proto__=f.prototype,r}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);n=function(t){if(f.isBuffer(t)){var e=0|l(t.length),r=o(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(void 0!==t.length)return"number"!=typeof t.length||I(t.length)?o(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function a(t){return s(t),o(t<0?0:0|l(t))}function c(t){for(var e=t.length<0?0:0|l(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function l(t){if(e<=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e.toString(16)+" bytes");return 0|t}function p(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||x(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return T(t).length;default:if(o)return n?-1:j(t).length;e=(""+e).toLowerCase(),o=!0}}function r(t,e,r){var n,o,i,s=!1;if((e=void 0===e||e<0?0:e)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0);(!r||r<0||n<r)&&(r=n);for(var o="",i=e;i<r;++i)o+=function(t){return t<16?"0"+t.toString(16):t.toString(16)}(t[i]);return o}(this,e,r);case"utf8":case"utf-8":return v(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}(this,e,r);case"base64":return n=this,i=r,0===(o=e)&&i===n.length?u.fromByteArray(n):u.fromByteArray(n.slice(o,i));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}(this,e,r);default:if(s)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}}function h(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=I(r=+r)?o?0:t.length-1:r)<0?t.length+r:r)>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,r):b(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,o){var i=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s/=i=2,u/=2,r/=2}function a(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o)for(var c=-1,l=r;l<s;l++)if(a(t,l)===a(e,-1===c?0:l-c)){if(l-(c=-1===c?l:c)+1===u)return c*i}else-1!==c&&(l-=l-c),c=-1;else for(l=r=s<r+u?s-u:r;0<=l;l--){for(var f=!0,p=0;p<u;p++)if(a(t,l+p)!==a(e,p)){f=!1;break}if(f)return l}return-1}function _(t,e,r,n){return C(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function y(t,e,r,n){return C(function(t,e){for(var r,n,o=[],i=0;i<t.length&&!((e-=2)<0);++i)n=t.charCodeAt(i),r=n>>8,n=n%256,o.push(n),o.push(r);return o}(e,t.length-r),t,r,n)}function v(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,u,a,c=t[o],l=null,f=239<c?4:223<c?3:191<c?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&127<(a=(31&c)<<6|63&i)&&(l=a);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&2047<(a=(15&c)<<12|(63&i)<<6|63&s)&&(a<55296||57343<a)&&(l=a);break;case 4:i=t[o+1],s=t[o+2],u=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&u)&&65535<(a=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&u)&&a<1114112&&(l=a)}null===l?(l=65533,f=1):65535<l&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(t){var e=t.length;if(e<=m)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=m));return r}(n)}R.kMaxLength=e,(f.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192,f.from=n,f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,f.alloc=function(t,e,r){return e=e,r=r,s(t=t),!(t<=0)&&void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)},f.allocUnsafe=a,f.allocUnsafeSlow=a,f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,e){if(x(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),x(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);if(void 0===e)for(o=e=0;o<t.length;++o)e+=t[o].length;for(var r=f.allocUnsafe(e),n=0,o=0;o<t.length;++o){var i=t[o];if(x(i,Uint8Array)&&(i=f.from(i)),!f.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,n),n+=i.length}return r},f.byteLength=p,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)h(this,e,e+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)h(this,e,e+3),h(this,e+1,e+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)h(this,e,e+7),h(this,e+1,e+6),h(this,e+2,e+5),h(this,e+3,e+4);return this},f.prototype.toLocaleString=f.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?v(this,0,t):r.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",e=R.INSPECT_MAX_BYTES,t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim();return this.length>e&&(t+=" ... "),"<Buffer "+t+">"},f.prototype.compare=function(t,e,r,n,o){if(x(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),(e=void 0===e?0:e)<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=e)return 0;if(o<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),u=Math.min(i,s),a=this.slice(n,o),c=t.slice(e,r),l=0;l<u;++l)if(a[l]!==c[l]){i=a[l],s=c[l];break}return i<s?-1:s<i?1:0},f.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},f.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)},f.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||o<r)&&(r=o),0<t.length&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var i,s,u,a=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var o=t.length-r;(!n||o<(n=Number(n)))&&(n=o),(o=e.length)/2<n&&(n=o/2);for(var i=0;i<n;++i){var s=parseInt(e.substr(2*i,2),16);if(I(s))return i;t[r+i]=s}return i}(this,t,e,r);case"utf8":case"utf-8":return s=e,u=r,C(j(t,(i=this).length-s),i,s,u);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return i=this,s=e,u=r,C(T(t),i,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var m=4096;function g(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(r<t+e)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,o,i){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<e||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function w(t,e,r,n){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function S(t,e,r,n,o){return e=+e,r>>>=0,o||w(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function E(t,e,r,n,o){return e=+e,r>>>=0,o||w(t,0,r,8),i.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r);e=this.subarray(t,e=e<t?t:e);return e.__proto__=f.prototype,e},f.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||g(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},f.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||g(t,e,this.length);for(var n=this[t+--e],o=1;0<e&&(o*=256);)n+=this[t+--e]*o;return n},f.prototype.readUInt8=function(t,e){return t>>>=0,e||g(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||g(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||g(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||g(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||g(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||g(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return(o*=128)<=n&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||g(t,e,this.length);for(var n=e,o=1,i=this[t+--n];0<n&&(o*=256);)i+=this[t+--n]*o;return(o*=128)<=i&&(i-=Math.pow(2,8*e)),i},f.prototype.readInt8=function(t,e){return t>>>=0,e||g(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||g(t,2,this.length);t=this[t]|this[t+1]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt16BE=function(t,e){t>>>=0,e||g(t,2,this.length);t=this[t+1]|this[t]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||g(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||g(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return t>>>=0,e||g(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||g(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||g(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||g(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},f.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeIntLE=function(t,e,r,n){t=+t,e>>>=0,n||O(this,t,e,r,(n=Math.pow(2,8*r-1))-1,-n);var o=0,i=1,s=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/i>>0)-s&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){t=+t,e>>>=0,n||O(this,t,e,r,(n=Math.pow(2,8*r-1))-1,-n);var o=r-1,i=1,s=0;for(this[e+o]=255&t;0<=--o&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i>>0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,127,-128),this[e]=255&(t=t<0?255+t+1:t),e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),this[e]=(t=t<0?4294967295+t+1:t)>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeFloatLE=function(t,e,r){return S(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return S(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return E(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return E(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),e>=t.length&&(e=t.length),(n=0<n&&n<r?r:n)===r)return 0;if(0===t.length||0===this.length)return 0;if((e=e||0)<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var o=(n=t.length-e<n-r?t.length-e+r:n)-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var i=o-1;0<=i;--i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return o},f.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o;1===t.length&&(o=t.charCodeAt(0),("utf8"===n&&o<128||"latin1"===n)&&(t=o))}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(t=t||0))for(i=e;i<r;++i)this[i]=t;else{var s=f.isBuffer(t)?t:f.from(t,n),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=s[i%u]}return this};var P=/[^+/0-9A-Za-z-_]/g;function j(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],s=0;s<n;++s){if(55295<(r=t.charCodeAt(s))&&r<57344){if(!o){if(56319<r){-1<(e-=3)&&i.push(239,191,189);continue}if(s+1===n){-1<(e-=3)&&i.push(239,191,189);continue}o=r;continue}if(r<56320){-1<(e-=3)&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&-1<(e-=3)&&i.push(239,191,189);if(o=null,r<128){if(--e<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function T(t){return u.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function C(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function x(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function I(t){return t!=t}}.call(this)}.call(this,A("buffer").Buffer)},{"base64-js":96,buffer:97,ieee754:98}],98:[function(t,e,r){r.read=function(t,e,r,n,o){var i,s,u=8*o-n-1,a=(1<<u)-1,c=a>>1,l=-7,f=r?o-1:0,p=r?-1:1,r=t[e+f];for(f+=p,i=r&(1<<-l)-1,r>>=-l,l+=u;0<l;i=256*i+t[e+f],f+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;0<l;s=256*s+t[e+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===a)return s?NaN:1/0*(r?-1:1);s+=Math.pow(2,n),i-=c}return(r?-1:1)*s*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var s,u,a=8*i-o-1,c=(1<<a)-1,l=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,i=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(n=Math.pow(2,-s))<1&&(s--,n*=2),2<=(e+=1<=s+l?f/n:f*Math.pow(2,1-l))*n&&(s++,n/=2),c<=s+l?(u=0,s=c):1<=s+l?(u=(e*n-1)*Math.pow(2,o),s+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,o),s=0));8<=o;t[r+p]=255&u,p+=h,u/=256,o-=8);for(s=s<<o|u,a+=o;0<a;t[r+p]=255&s,p+=h,s/=256,a-=8);t[r+p-h]|=128*i}},{}],99:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./internal/Observable");r.Observable=n.Observable;n=t("./internal/observable/ConnectableObservable");r.ConnectableObservable=n.ConnectableObservable;n=t("./internal/operators/groupBy");r.GroupedObservable=n.GroupedObservable;n=t("./internal/symbol/observable");r.observable=n.observable;n=t("./internal/Subject");r.Subject=n.Subject;n=t("./internal/BehaviorSubject");r.BehaviorSubject=n.BehaviorSubject;n=t("./internal/ReplaySubject");r.ReplaySubject=n.ReplaySubject;n=t("./internal/AsyncSubject");r.AsyncSubject=n.AsyncSubject;n=t("./internal/scheduler/asap");r.asap=n.asap,r.asapScheduler=n.asapScheduler;n=t("./internal/scheduler/async");r.async=n.async,r.asyncScheduler=n.asyncScheduler;n=t("./internal/scheduler/queue");r.queue=n.queue,r.queueScheduler=n.queueScheduler;n=t("./internal/scheduler/animationFrame");r.animationFrame=n.animationFrame,r.animationFrameScheduler=n.animationFrameScheduler;n=t("./internal/scheduler/VirtualTimeScheduler");r.VirtualTimeScheduler=n.VirtualTimeScheduler,r.VirtualAction=n.VirtualAction;n=t("./internal/Scheduler");r.Scheduler=n.Scheduler;n=t("./internal/Subscription");r.Subscription=n.Subscription;n=t("./internal/Subscriber");r.Subscriber=n.Subscriber;n=t("./internal/Notification");r.Notification=n.Notification,r.NotificationKind=n.NotificationKind;n=t("./internal/util/pipe");r.pipe=n.pipe;n=t("./internal/util/noop");r.noop=n.noop;n=t("./internal/util/identity");r.identity=n.identity;n=t("./internal/util/isObservable");r.isObservable=n.isObservable;n=t("./internal/util/ArgumentOutOfRangeError");r.ArgumentOutOfRangeError=n.ArgumentOutOfRangeError;n=t("./internal/util/EmptyError");r.EmptyError=n.EmptyError;n=t("./internal/util/ObjectUnsubscribedError");r.ObjectUnsubscribedError=n.ObjectUnsubscribedError;n=t("./internal/util/UnsubscriptionError");r.UnsubscriptionError=n.UnsubscriptionError;n=t("./internal/util/TimeoutError");r.TimeoutError=n.TimeoutError;n=t("./internal/observable/bindCallback");r.bindCallback=n.bindCallback;n=t("./internal/observable/bindNodeCallback");r.bindNodeCallback=n.bindNodeCallback;n=t("./internal/observable/combineLatest");r.combineLatest=n.combineLatest;n=t("./internal/observable/concat");r.concat=n.concat;n=t("./internal/observable/defer");r.defer=n.defer;n=t("./internal/observable/empty");r.empty=n.empty;n=t("./internal/observable/forkJoin");r.forkJoin=n.forkJoin;n=t("./internal/observable/from");r.from=n.from;n=t("./internal/observable/fromEvent");r.fromEvent=n.fromEvent;n=t("./internal/observable/fromEventPattern");r.fromEventPattern=n.fromEventPattern;n=t("./internal/observable/generate");r.generate=n.generate;n=t("./internal/observable/iif");r.iif=n.iif;n=t("./internal/observable/interval");r.interval=n.interval;n=t("./internal/observable/merge");r.merge=n.merge;n=t("./internal/observable/never");r.never=n.never;n=t("./internal/observable/of");r.of=n.of;n=t("./internal/observable/onErrorResumeNext");r.onErrorResumeNext=n.onErrorResumeNext;n=t("./internal/observable/pairs");r.pairs=n.pairs;n=t("./internal/observable/partition");r.partition=n.partition;n=t("./internal/observable/race");r.race=n.race;n=t("./internal/observable/range");r.range=n.range;n=t("./internal/observable/throwError");r.throwError=n.throwError;n=t("./internal/observable/timer");r.timer=n.timer;n=t("./internal/observable/using");r.using=n.using;n=t("./internal/observable/zip");r.zip=n.zip;n=t("./internal/scheduled/scheduled");r.scheduled=n.scheduled;n=t("./internal/observable/empty");r.EMPTY=n.EMPTY;n=t("./internal/observable/never");r.NEVER=n.NEVER;t=t("./internal/config");r.config=t.config},{"./internal/AsyncSubject":100,"./internal/BehaviorSubject":101,"./internal/Notification":103,"./internal/Observable":104,"./internal/ReplaySubject":107,"./internal/Scheduler":108,"./internal/Subject":109,"./internal/Subscriber":111,"./internal/Subscription":112,"./internal/config":113,"./internal/observable/ConnectableObservable":115,"./internal/observable/bindCallback":117,"./internal/observable/bindNodeCallback":118,"./internal/observable/combineLatest":119,"./internal/observable/concat":120,"./internal/observable/defer":121,"./internal/observable/empty":122,"./internal/observable/forkJoin":123,"./internal/observable/from":124,"./internal/observable/fromEvent":126,"./internal/observable/fromEventPattern":127,"./internal/observable/generate":128,"./internal/observable/iif":129,"./internal/observable/interval":130,"./internal/observable/merge":131,"./internal/observable/never":132,"./internal/observable/of":133,"./internal/observable/onErrorResumeNext":134,"./internal/observable/pairs":135,"./internal/observable/partition":136,"./internal/observable/race":137,"./internal/observable/range":138,"./internal/observable/throwError":139,"./internal/observable/timer":140,"./internal/observable/using":141,"./internal/observable/zip":142,"./internal/operators/groupBy":178,"./internal/scheduled/scheduled":250,"./internal/scheduler/VirtualTimeScheduler":260,"./internal/scheduler/animationFrame":261,"./internal/scheduler/asap":262,"./internal/scheduler/async":263,"./internal/scheduler/queue":264,"./internal/symbol/observable":266,"./internal/util/ArgumentOutOfRangeError":268,"./internal/util/EmptyError":269,"./internal/util/ObjectUnsubscribedError":271,"./internal/util/TimeoutError":272,"./internal/util/UnsubscriptionError":273,"./internal/util/identity":276,"./internal/util/isObservable":285,"./internal/util/noop":288,"./internal/util/pipe":290}],100:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Subject"),u=t("./Subscription"),o=(i=s.Subject,o(a,i),a.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),u.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),u.Subscription.EMPTY):i.prototype._subscribe.call(this,t)},a.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},a.prototype.error=function(t){this.hasCompleted||i.prototype.error.call(this,t)},a.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&i.prototype.next.call(this,this.value),i.prototype.complete.call(this)},a);function a(){var t=null!==i&&i.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}r.AsyncSubject=o},{"./Subject":109,"./Subscription":112}],101:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Subject"),u=t("./util/ObjectUnsubscribedError"),o=(i=s.Subject,o(a,i),Object.defineProperty(a.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),a.prototype._subscribe=function(t){var e=i.prototype._subscribe.call(this,t);return e&&!e.closed&&t.next(this._value),e},a.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new u.ObjectUnsubscribedError;return this._value},a.prototype.next=function(t){i.prototype.next.call(this,this._value=t)},a);function a(t){var e=i.call(this)||this;return e._value=t,e}r.BehaviorSubject=o},{"./Subject":109,"./util/ObjectUnsubscribedError":271}],102:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./Subscriber"),o=(i=t.Subscriber,o(s,i),s.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},s.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},s.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},s);function s(t,e,r){var n=i.call(this)||this;return n.parent=t,n.outerValue=e,n.outerIndex=r,n.index=0,n}r.InnerSubscriber=o},{"./Subscriber":111}],103:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./observable/empty"),o=t("./observable/of"),i=t("./observable/throwError");(t=r.NotificationKind||(r.NotificationKind={})).NEXT="N",t.ERROR="E",t.COMPLETE="C";s.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()}},s.prototype.do=function(t,e,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}},s.prototype.accept=function(t,e,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,r)},s.prototype.toObservable=function(){switch(this.kind){case"N":return o.of(this.value);case"E":return i.throwError(this.error);case"C":return n.empty()}throw new Error("unexpected notification kind value")},s.createNext=function(t){return void 0!==t?new s("N",t):s.undefinedValueNotification},s.createError=function(t){return new s("E",void 0,t)},s.createComplete=function(){return s.completeNotification},s.completeNotification=new s("C"),s.undefinedValueNotification=new s("N",void 0),t=s;function s(t,e,r){this.kind=t,this.value=e,this.error=r,this.hasValue="N"===t}r.Notification=t},{"./observable/empty":122,"./observable/of":133,"./observable/throwError":139}],104:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./util/canReportError"),o=t("./util/toSubscriber"),i=t("./symbol/observable"),s=t("./util/pipe"),u=t("./config"),i=(a.prototype.lift=function(t){var e=new a;return e.source=this,e.operator=t,e},a.prototype.subscribe=function(t,e,r){var n=this.operator,r=o.toSubscriber(t,e,r);if(n?r.add(n.call(r,this.source)):r.add(this.source||u.config.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),u.config.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r},a.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){u.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},a.prototype.forEach=function(n,t){var o=this;return new(t=c(t))(function(t,e){var r=o.subscribe(function(t){try{n(t)}catch(t){e(t),r&&r.unsubscribe()}},e,t)})},a.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},a.prototype[i.observable]=function(){return this},a.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:s.pipeFromArray(t)(this)},a.prototype.toPromise=function(t){var n=this;return new(t=c(t))(function(t,e){var r;n.subscribe(function(t){return r=t},function(t){return e(t)},function(){return t(r)})})},a.create=function(t){return new a(t)},a);function a(t){this._isScalar=!1,t&&(this._subscribe=t)}function c(t){if(!(t=t||(u.config.Promise||Promise)))throw new Error("no Promise impl found");return t}r.Observable=i},{"./config":113,"./symbol/observable":266,"./util/canReportError":274,"./util/pipe":290,"./util/toSubscriber":297}],105:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./config"),o=t("./util/hostReportError");r.empty={closed:!0,next:function(t){},error:function(t){if(n.config.useDeprecatedSynchronousErrorHandling)throw t;o.hostReportError(t)},complete:function(){}}},{"./config":113,"./util/hostReportError":275}],106:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./Subscriber"),o=(i=t.Subscriber,o(s,i),s.prototype.notifyNext=function(t,e,r,n,o){this.destination.next(e)},s.prototype.notifyError=function(t,e){this.destination.error(t)},s.prototype.notifyComplete=function(t){this.destination.complete()},s);function s(){return null!==i&&i.apply(this,arguments)||this}r.OuterSubscriber=o},{"./Subscriber":111}],107:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Subject"),u=t("./scheduler/queue"),a=t("./Subscription"),c=t("./operators/observeOn"),l=t("./util/ObjectUnsubscribedError"),f=t("./SubjectSubscription"),o=(i=s.Subject,o(p,i),p.prototype.nextInfiniteTimeWindow=function(t){var e;this.isStopped||((e=this._events).push(t),e.length>this._bufferSize&&e.shift()),i.prototype.next.call(this,t)},p.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new h(this._getNow(),t)),this._trimBufferThenGetEvents()),i.prototype.next.call(this,t)},p.prototype._subscribe=function(t){var e,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new l.ObjectUnsubscribedError;if(e=this.isStopped||this.hasError?a.Subscription.EMPTY:(this.observers.push(t),new f.SubjectSubscription(this,t)),o&&t.add(t=new c.ObserveOnSubscriber(t,o)),r)for(var s=0;s<i&&!t.closed;s++)t.next(n[s]);else for(s=0;s<i&&!t.closed;s++)t.next(n[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},p.prototype._getNow=function(){return(this.scheduler||u.queue).now()},p.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(t-n[i].time<r);)i++;return 0<(i=e<o?Math.max(i,o-e):i)&&n.splice(0,i),n},p);function p(t,e,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===e&&(e=Number.POSITIVE_INFINITY);var n=i.call(this)||this;return n.scheduler=r,n._events=[],n._infiniteTimeWindow=!1,n._bufferSize=t<1?1:t,n._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(n._infiniteTimeWindow=!0,n.next=n.nextInfiniteTimeWindow):n.next=n.nextTimeWindow,n}r.ReplaySubject=o;var h=function(t,e){this.time=t,this.value=e}},{"./Subject":109,"./SubjectSubscription":110,"./Subscription":112,"./operators/observeOn":193,"./scheduler/queue":264,"./util/ObjectUnsubscribedError":271}],108:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},o.now=function(){return Date.now()},o);function o(t,e){void 0===e&&(e=o.now),this.SchedulerAction=t,this.now=e}r.Scheduler=n},{}],109:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Observable"),u=t("./Subscriber"),a=t("./Subscription"),c=t("./util/ObjectUnsubscribedError"),l=t("./SubjectSubscription"),t=t("../internal/symbol/rxSubscriber"),f=(i=u.Subscriber,o(p,i),p);function p(t){var e=i.call(this,t)||this;return e.destination=t,e}r.SubjectSubscriber=f;var h,t=(h=s.Observable,o(d,h),d.prototype[t.rxSubscriber]=function(){return new f(this)},d.prototype.lift=function(t){var e=new _(this,this);return e.operator=t,e},d.prototype.next=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,r=e.length,n=e.slice(),o=0;o<r;o++)n[o].next(t)},d.prototype.error=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,r=e.length,n=e.slice(),o=0;o<r;o++)n[o].error(t);this.observers.length=0},d.prototype.complete=function(){if(this.closed)throw new c.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,r=t.slice(),n=0;n<e;n++)r[n].complete();this.observers.length=0},d.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},d.prototype._trySubscribe=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;return h.prototype._trySubscribe.call(this,t)},d.prototype._subscribe=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.isStopped?(t.complete(),a.Subscription.EMPTY):(this.observers.push(t),new l.SubjectSubscription(this,t))},d.prototype.asObservable=function(){var t=new s.Observable;return t.source=this,t},d.create=function(t,e){return new _(t,e)},d);function d(){var t=h.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}r.Subject=t;var b,_=(o(y,b=t),y.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},y.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},y.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},y.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):a.Subscription.EMPTY},y);function y(t,e){var r=b.call(this)||this;return r.destination=t,r.source=e,r}r.AnonymousSubject=_},{"../internal/symbol/rxSubscriber":267,"./Observable":104,"./SubjectSubscription":110,"./Subscriber":111,"./Subscription":112,"./util/ObjectUnsubscribedError":271}],110:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./Subscription"),o=(i=t.Subscription,o(s,i),s.prototype.unsubscribe=function(){var t,e;this.closed||(this.closed=!0,t=(e=this.subject).observers,this.subject=null,!t||0===t.length||e.isStopped||e.closed||-1!==(e=t.indexOf(this.subscriber))&&t.splice(e,1))},s);function s(t,e){var r=i.call(this)||this;return r.subject=t,r.subscriber=e,r.closed=!1,r}r.SubjectSubscription=o},{"./Subscription":112}],111:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./util/isFunction"),u=t("./Observer"),a=t("./Subscription"),c=t("../internal/symbol/rxSubscriber"),l=t("./config"),f=t("./util/hostReportError"),c=(i=a.Subscription,o(p,i),p.prototype[c.rxSubscriber]=function(){return this},p.create=function(t,e,r){r=new p(t,e,r);return r.syncErrorThrowable=!1,r},p.prototype.next=function(t){this.isStopped||this._next(t)},p.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},p.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},p.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this))},p.prototype._next=function(t){this.destination.next(t)},p.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},p.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},p.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},p);function p(t,e,r){var n=i.call(this)||this;switch(n.syncErrorValue=null,n.syncErrorThrown=!1,n.syncErrorThrowable=!1,n.isStopped=!1,arguments.length){case 0:n.destination=u.empty;break;case 1:if(!t){n.destination=u.empty;break}if("object"==typeof t){t instanceof p?(n.syncErrorThrowable=t.syncErrorThrowable,(n.destination=t).add(n)):(n.syncErrorThrowable=!0,n.destination=new d(n,t));break}default:n.syncErrorThrowable=!0,n.destination=new d(n,t,e,r)}return n}r.Subscriber=c;var h,d=(o(b,h=c),b.prototype.next=function(t){var e;!this.isStopped&&this._next&&(e=this._parentSubscriber,l.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t))},b.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,r=l.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&e.syncErrorThrowable?this.__tryOrSetError(e,this._error,t):this.__tryOrUnsub(this._error,t),this.unsubscribe();else if(e.syncErrorThrowable)r?(e.syncErrorValue=t,e.syncErrorThrown=!0):f.hostReportError(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;f.hostReportError(t)}}},b.prototype.complete=function(){var t,e,r=this;this.isStopped||(t=this._parentSubscriber,this._complete&&(e=function(){return r._complete.call(r._context)},l.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,e):this.__tryOrUnsub(e)),this.unsubscribe())},b.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),l.config.useDeprecatedSynchronousErrorHandling)throw t;f.hostReportError(t)}},b.prototype.__tryOrSetError=function(e,t,r){if(!l.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(t){return l.config.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0):(f.hostReportError(t),!0)}return!1},b.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},b);function b(t,e,r,n){var o,i=h.call(this)||this;i._parentSubscriber=t;t=i;return s.isFunction(e)?o=e:e&&(o=e.next,r=e.error,n=e.complete,e!==u.empty&&(t=Object.create(e),s.isFunction(t.unsubscribe)&&i.add(t.unsubscribe.bind(t)),t.unsubscribe=i.unsubscribe.bind(i))),i._context=t,i._next=o,i._error=r,i._complete=n,i}r.SafeSubscriber=d},{"../internal/symbol/rxSubscriber":267,"./Observer":105,"./Subscription":112,"./config":113,"./util/hostReportError":275,"./util/isFunction":280}],112:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=t("./util/isArray"),c=t("./util/isObject"),l=t("./util/isFunction"),f=t("./util/UnsubscriptionError"),t=(p.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this._parentOrParents,r=this._ctorUnsubscribe,n=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof p)t.remove(this);else if(null!==t)for(var i=0;i<t.length;++i)t[i].remove(this);if(l.isFunction(n)){r&&(this._unsubscribe=void 0);try{n.call(this)}catch(t){e=t instanceof f.UnsubscriptionError?h(t.errors):[t]}}if(a.isArray(o))for(var i=-1,s=o.length;++i<s;){var u=o[i];if(c.isObject(u))try{u.unsubscribe()}catch(t){e=e||[],t instanceof f.UnsubscriptionError?e=e.concat(h(t.errors)):e.push(t)}}if(e)throw new f.UnsubscriptionError(e)}},p.prototype.add=function(t){var e,r=t;if(!t)return p.EMPTY;switch(typeof t){case"function":r=new p(t);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;r instanceof p||(e=r,(r=new p)._subscriptions=[e]);break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var n=r._parentOrParents;if(null===n)r._parentOrParents=this;else if(n instanceof p){if(n===this)return r;r._parentOrParents=[n,this]}else{if(-1!==n.indexOf(this))return r;n.push(this)}n=this._subscriptions;return null===n?this._subscriptions=[r]:n.push(r),r},p.prototype.remove=function(t){var e=this._subscriptions;!e||-1!==(t=e.indexOf(t))&&e.splice(t,1)},p.EMPTY=((t=new p).closed=!0,t),p);function p(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}function h(t){return t.reduce(function(t,e){return t.concat(e instanceof f.UnsubscriptionError?e.errors:e)},[])}r.Subscription=t},{"./util/UnsubscriptionError":273,"./util/isArray":277,"./util/isFunction":280,"./util/isObject":284}],113:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=!1;r.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){var e;t?(e=new Error,console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)):n&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),n=t},get useDeprecatedSynchronousErrorHandling(){return n}}},{}],114:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./Subscriber"),u=t("./Observable"),a=t("./util/subscribeTo"),t=(i=s.Subscriber,o(c,i),c.prototype._next=function(t){this.parent.notifyNext(t)},c.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},c.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},c);function c(t){var e=i.call(this)||this;return e.parent=t,e}r.SimpleInnerSubscriber=t;var l,t=(l=s.Subscriber,o(f,l),f.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this)},f.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},f.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},f);function f(t,e,r){var n=l.call(this)||this;return n.parent=t,n.outerValue=e,n.outerIndex=r,n}r.ComplexInnerSubscriber=t;var p,t=(p=s.Subscriber,o(h,p),h.prototype.notifyNext=function(t){this.destination.next(t)},h.prototype.notifyError=function(t){this.destination.error(t)},h.prototype.notifyComplete=function(){this.destination.complete()},h);function h(){return null!==p&&p.apply(this,arguments)||this}r.SimpleOuterSubscriber=t;var d,o=(d=s.Subscriber,o(b,d),b.prototype.notifyNext=function(t,e,r,n){this.destination.next(e)},b.prototype.notifyError=function(t){this.destination.error(t)},b.prototype.notifyComplete=function(t){this.destination.complete()},b);function b(){return null!==d&&d.apply(this,arguments)||this}r.ComplexOuterSubscriber=o,r.innerSubscribe=function(t,e){if(!e.closed){if(t instanceof u.Observable)return t.subscribe(e);var r;try{r=a.subscribeTo(t)(e)}catch(t){e.error(t)}return r}}},{"./Observable":104,"./Subscriber":111,"./util/subscribeTo":291}],115:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../Subject"),u=t("../Observable"),a=t("../Subscriber"),c=t("../Subscription"),l=t("../operators/refCount"),u=(i=u.Observable,o(f,i),f.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},f.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},f.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new c.Subscription).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=c.Subscription.EMPTY)),t},f.prototype.refCount=function(){return l.refCount()(this)},f);function f(t,e){var r=i.call(this)||this;return r.source=t,r.subjectFactory=e,r._refCount=0,r._isComplete=!1,r}r.ConnectableObservable=u,r.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(u=u.prototype)._subscribe},_isComplete:{value:u._isComplete,writable:!0},getSubject:{value:u.getSubject},connect:{value:u.connect},refCount:{value:u.refCount}};var p,h=(p=s.SubjectSubscriber,o(d,p),d.prototype._error=function(t){this._unsubscribe(),p.prototype._error.call(this,t)},d.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),p.prototype._complete.call(this)},d.prototype._unsubscribe=function(){var t,e=this.connectable;e&&(this.connectable=null,t=e._connection,e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe())},d);function d(t,e){t=p.call(this,t)||this;return t.connectable=e,t}b.prototype.call=function(t,e){var r=this.connectable;r._refCount++;t=new y(t,r),e=e.subscribe(t);return t.closed||(t.connection=r.connect()),e};function b(t){this.connectable=t}var _,y=(_=a.Subscriber,o(v,_),v.prototype._unsubscribe=function(){var t,e=this.connectable;e?(this.connectable=null,(t=e._refCount)<=0?this.connection=null:(e._refCount=t-1,1<t?this.connection=null:(t=this.connection,e=e._connection,this.connection=null,!e||t&&e!==t||e.unsubscribe()))):this.connection=null},v);function v(t,e){t=_.call(this,t)||this;return t.connectable=e,t}},{"../Observable":104,"../Subject":109,"../Subscriber":111,"../Subscription":112,"../operators/refCount":204}],116:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../Observable"),u=t("../scheduler/asap"),a=t("../util/isNumeric"),o=(i=s.Observable,o(c,i),c.create=function(t,e,r){return new c(t,e=void 0===e?0:e,r=void 0===r?u.asap:r)},c.dispatch=function(t){var e=t.source,t=t.subscriber;return this.add(e.subscribe(t))},c.prototype._subscribe=function(t){var e=this.delayTime,r=this.source;return this.scheduler.schedule(c.dispatch,e,{source:r,subscriber:t})},c);function c(t,e,r){void 0===e&&(e=0),void 0===r&&(r=u.asap);var n=i.call(this)||this;return n.source=t,n.delayTime=e,n.scheduler=r,(!a.isNumeric(e)||e<0)&&(n.delayTime=0),r&&"function"==typeof r.schedule||(n.scheduler=u.asap),n}r.SubscribeOnObservable=o},{"../Observable":104,"../scheduler/asap":262,"../util/isNumeric":283}],117:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=t("../Observable"),a=t("../AsyncSubject"),o=t("../operators/map"),c=t("../util/canReportError"),l=t("../util/isArray"),f=t("../util/isScheduler");function p(t){var n=this,e=t.args,r=t.subscriber,o=t.params,i=o.callbackFunc,t=o.context,s=o.scheduler;if(!(u=o.subject)){var u=o.subject=new a.AsyncSubject;try{i.apply(t,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.length<=1?t[0]:t;n.add(s.schedule(h,0,{value:r,subject:u}))}]))}catch(t){u.error(t)}}this.add(u.subscribe(r))}function h(t){var e=t.value,t=t.subject;t.next(e),t.complete()}r.bindCallback=function r(i,n,s){if(n){if(!f.isScheduler(n))return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(i,s).apply(void 0,t).pipe(o.map(function(t){return l.isArray(t)?n.apply(void 0,t):n(t)}))};s=n}return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r,n=this,o={context:n,subject:r,callbackFunc:i,scheduler:s};return new u.Observable(function(t){if(s)return s.schedule(p,0,{args:e,subscriber:t,params:o});if(!r){r=new a.AsyncSubject;try{i.apply(n,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];r.next(t.length<=1?t[0]:t),r.complete()}]))}catch(t){c.canReportError(r)?r.error(t):console.warn(t)}}return r.subscribe(t)})}}},{"../AsyncSubject":100,"../Observable":104,"../operators/map":182,"../util/canReportError":274,"../util/isArray":277,"../util/isScheduler":287}],118:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=t("../Observable"),a=t("../AsyncSubject"),o=t("../operators/map"),c=t("../util/canReportError"),l=t("../util/isScheduler"),f=t("../util/isArray");function p(t){var n=this,e=t.params,r=t.subscriber,o=t.context,i=e.callbackFunc,t=e.args,s=e.scheduler;if(!(u=e.subject)){var u=e.subject=new a.AsyncSubject;try{i.apply(o,t.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.shift();r?n.add(s.schedule(d,0,{err:r,subject:u})):(r=t.length<=1?t[0]:t,n.add(s.schedule(h,0,{value:r,subject:u})))}]))}catch(t){this.add(s.schedule(d,0,{err:t,subject:u}))}}this.add(u.subscribe(r))}function h(t){var e=t.value,t=t.subject;t.next(e),t.complete()}function d(t){var e=t.err;t.subject.error(e)}r.bindNodeCallback=function r(i,n,s){if(n){if(!l.isScheduler(n))return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(i,s).apply(void 0,t).pipe(o.map(function(t){return f.isArray(t)?n.apply(void 0,t):n(t)}))};s=n}return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var o={subject:void 0,args:r,callbackFunc:i,scheduler:s,context:this};return new u.Observable(function(t){var e=o.context,n=o.subject;if(s)return s.schedule(p,0,{params:o,subscriber:t,context:e});if(!n){n=o.subject=new a.AsyncSubject;try{i.apply(e,r.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.shift();r?n.error(r):(n.next(t.length<=1?t[0]:t),n.complete())}]))}catch(t){c.canReportError(n)?n.error(t):console.warn(t)}}return n.subscribe(t)})}}},{"../AsyncSubject":100,"../Observable":104,"../operators/map":182,"../util/canReportError":274,"../util/isArray":277,"../util/isScheduler":287}],119:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../util/isScheduler"),s=t("../util/isArray"),u=t("../OuterSubscriber"),a=t("../util/subscribeToResult"),c=t("./fromArray"),l={};r.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=void 0,n=void 0;return i.isScheduler(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(r=t.pop()),1===t.length&&s.isArray(t[0])&&(t=t[0]),c.fromArray(t,n).lift(new f(r))};var f=(p.prototype.call=function(t,e){return e.subscribe(new d(t,this.resultSelector))},p);function p(t){this.resultSelector=t}r.CombineLatestOperator=f;var h,d=(h=u.OuterSubscriber,o(b,h),b.prototype._next=function(t){this.values.push(l),this.observables.push(t)},b.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var r=0;r<e;r++){var n=t[r];this.add(a.subscribeToResult(this,n,void 0,r))}}},b.prototype.notifyComplete=function(t){0==--this.active&&this.destination.complete()},b.prototype.notifyNext=function(t,e,r){var n=this.values,o=n[r],o=this.toRespond?o===l?--this.toRespond:this.toRespond:0;n[r]=e,0===o&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},b.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},b);function b(t,e){t=h.call(this,t)||this;return t.resultSelector=e,t.active=0,t.values=[],t.observables=[],t}r.CombineLatestSubscriber=d},{"../OuterSubscriber":106,"../util/isArray":277,"../util/isScheduler":287,"../util/subscribeToResult":296,"./fromArray":125}],120:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./of"),o=t("../operators/concatAll");r.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.concatAll()(n.of.apply(void 0,t))}},{"../operators/concatAll":154,"./of":133}],121:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),o=t("./from"),i=t("./empty");r.defer=function(r){return new n.Observable(function(e){var t;try{t=r()}catch(t){return void e.error(t)}return(t?o.from(t):i.empty()).subscribe(e)})}},{"../Observable":104,"./empty":122,"./from":124}],122:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable");r.EMPTY=new n.Observable(function(t){return t.complete()}),r.empty=function(t){return t?(e=t,new n.Observable(function(t){return e.schedule(function(){return t.complete()})})):r.EMPTY;var e}},{"../Observable":104}],123:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),i=t("../util/isArray"),s=t("../operators/map"),u=t("../util/isObject"),l=t("./from");function a(a,c){return new n.Observable(function(n){var o=a.length;if(0!==o)for(var i=new Array(o),s=0,u=0,t=0;t<o;t++)!function(e){var t=l.from(a[e]),r=!1;n.add(t.subscribe({next:function(t){r||(r=!0,u++),i[e]=t},error:function(t){return n.error(t)},complete:function(){++s!==o&&r||(u===o&&n.next(c?c.reduce(function(t,e,r){return t[e]=i[r],t},{}):i),n.complete())}}))}(t);else n.complete()})}r.forkJoin=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var r=t[0];if(i.isArray(r))return a(r,null);if(u.isObject(r)&&Object.getPrototypeOf(r)===Object.prototype){var n=Object.keys(r);return a(n.map(function(t){return r[t]}),n)}}if("function"!=typeof t[t.length-1])return a(t,null);var o=t.pop();return a(t=1===t.length&&i.isArray(t[0])?t[0]:t,null).pipe(s.map(function(t){return o.apply(void 0,t)}))}},{"../Observable":104,"../operators/map":182,"../util/isArray":277,"../util/isObject":284,"./from":124}],124:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),o=t("../util/subscribeTo"),i=t("../scheduled/scheduled");r.from=function(t,e){return e?i.scheduled(t,e):t instanceof n.Observable?t:new n.Observable(o.subscribeTo(t))}},{"../Observable":104,"../scheduled/scheduled":250,"../util/subscribeTo":291}],125:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),o=t("../util/subscribeToArray"),i=t("../scheduled/scheduleArray");r.fromArray=function(t,e){return e?i.scheduleArray(t,e):new n.Observable(o.subscribeToArray(t))}},{"../Observable":104,"../scheduled/scheduleArray":246,"../util/subscribeToArray":292}],126:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../util/isArray"),u=t("../util/isFunction"),a=t("../operators/map");Object.prototype.toString;function p(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}function h(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}function d(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}r.fromEvent=function t(r,n,o,e){return u.isFunction(o)&&(e=o,o=void 0),e?t(r,n,o).pipe(a.map(function(t){return s.isArray(t)?e.apply(void 0,t):e(t)})):new i.Observable(function(e){!function t(e,r,n,o,i){var s;if(d(e)){var u=e;e.addEventListener(r,n,i),s=function(){return u.removeEventListener(r,n,i)}}else if(h(e)){var a=e;e.on(r,n),s=function(){return a.off(r,n)}}else if(p(e)){var c=e;e.addListener(r,n),s=function(){return c.removeListener(r,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,f=e.length;l<f;l++)t(e[l],r,n,o,i)}o.add(s)}(r,n,function(t){1<arguments.length?e.next(Array.prototype.slice.call(arguments)):e.next(t)},e,o)})}},{"../Observable":104,"../operators/map":182,"../util/isArray":277,"../util/isFunction":280}],127:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../util/isArray"),u=t("../util/isFunction"),a=t("../operators/map");r.fromEventPattern=function t(n,o,e){return e?t(n,o).pipe(a.map(function(t){return s.isArray(t)?e.apply(void 0,t):e(t)})):new i.Observable(function(r){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.next(1===t.length?t[0]:t)}var e;try{e=n(t)}catch(t){return void r.error(t)}if(u.isFunction(o))return function(){return o(t,e)}})}},{"../Observable":104,"../operators/map":182,"../util/isArray":277,"../util/isFunction":280}],128:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=t("../Observable"),c=t("../util/identity"),l=t("../util/isScheduler");function f(t){var e,r=t.subscriber,n=t.condition;if(!r.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void r.error(t)}else t.needIterate=!0;if(n){var o=void 0;try{o=n(t.state)}catch(t){return void r.error(t)}if(!o)return void r.complete();if(r.closed)return}try{e=t.resultSelector(t.state)}catch(t){return void r.error(t)}if(!r.closed&&(r.next(e),!r.closed))return this.schedule(t)}}r.generate=function(t,n,o,e,i){var s,u;return 1==arguments.length?(u=t.initialState,n=t.condition,o=t.iterate,s=t.resultSelector||c.identity,i=t.scheduler):void 0===e||l.isScheduler(e)?(u=t,s=c.identity,i=e):(u=t,s=e),new a.Observable(function(e){var t=u;if(i)return i.schedule(f,0,{subscriber:e,iterate:o,condition:n,resultSelector:s,state:t});for(;;){if(n){var r=void 0;try{r=n(t)}catch(t){return void e.error(t)}if(!r){e.complete();break}}r=void 0;try{r=s(t)}catch(t){return void e.error(t)}if(e.next(r),e.closed)break;try{t=o(t)}catch(t){return void e.error(t)}}})}},{"../Observable":104,"../util/identity":276,"../util/isScheduler":287}],129:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./defer"),o=t("./empty");r.iif=function(t,e,r){return void 0===e&&(e=o.EMPTY),void 0===r&&(r=o.EMPTY),n.defer(function(){return t()?e:r})}},{"./defer":121,"./empty":122}],130:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),o=t("../scheduler/async"),i=t("../util/isNumeric");function s(t){var e=t.subscriber,r=t.counter,t=t.period;e.next(r),this.schedule({subscriber:e,counter:r+1,period:t},t)}r.interval=function(e,r){return void 0===r&&(r=o.async),(!i.isNumeric(e=void 0===e?0:e)||e<0)&&(e=0),r&&"function"==typeof r.schedule||(r=o.async),new n.Observable(function(t){return t.add(r.schedule(s,e,{subscriber:t,counter:0,period:e})),t})}},{"../Observable":104,"../scheduler/async":263,"../util/isNumeric":283}],131:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../util/isScheduler"),u=t("../operators/mergeAll"),a=t("./fromArray");r.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Number.POSITIVE_INFINITY,n=null,o=t[t.length-1];return s.isScheduler(o)?(n=t.pop(),1<t.length&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof o&&(r=t.pop()),null===n&&1===t.length&&t[0]instanceof i.Observable?t[0]:u.mergeAll(r)(a.fromArray(t,n))}},{"../Observable":104,"../operators/mergeAll":187,"../util/isScheduler":287,"./fromArray":125}],132:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),t=t("../util/noop");r.NEVER=new n.Observable(t.noop),r.never=function(){return r.NEVER}},{"../Observable":104,"../util/noop":288}],133:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/isScheduler"),o=t("./fromArray"),i=t("../scheduled/scheduleArray");r.of=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return n.isScheduler(r)?(t.pop(),i.scheduleArray(t,r)):o.fromArray(t)}},{"../scheduled/scheduleArray":246,"../util/isScheduler":287,"./fromArray":125}],134:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../Observable"),i=t("./from"),s=t("../util/isArray"),u=t("./empty");function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return u.EMPTY;var r=t[0],n=t.slice(1);return 1===t.length&&s.isArray(r)?a.apply(void 0,r):new o.Observable(function(e){function t(){return e.add(a.apply(void 0,n).subscribe(e))}return i.from(r).subscribe({next:function(t){e.next(t)},error:t,complete:t})})}r.onErrorResumeNext=a},{"../Observable":104,"../util/isArray":277,"./empty":122,"./from":124}],135:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../Subscription");function u(t){var e=t.keys,r=t.index,n=t.subscriber,o=t.subscription,i=t.obj;n.closed||(r<e.length?(t=e[r],n.next([t,i[t]]),o.add(this.schedule({keys:e,index:r+1,subscriber:n,subscription:o,obj:i}))):n.complete())}r.pairs=function(o,n){return n?new i.Observable(function(t){var e=Object.keys(o),r=new s.Subscription;return r.add(n.schedule(u,0,{keys:e,index:0,subscriber:t,subscription:r,obj:o})),r}):new i.Observable(function(t){for(var e=Object.keys(o),r=0;r<e.length&&!t.closed;r++){var n=e[r];o.hasOwnProperty(n)&&t.next([n,o[n]])}t.complete()})},r.dispatch=u},{"../Observable":104,"../Subscription":112}],136:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/not"),o=t("../util/subscribeTo"),i=t("../operators/filter"),s=t("../Observable");r.partition=function(t,e,r){return[i.filter(e,r)(new s.Observable(o.subscribeTo(t))),i.filter(n.not(e,r))(new s.Observable(o.subscribeTo(t)))]}},{"../Observable":104,"../operators/filter":173,"../util/not":289,"../util/subscribeTo":291}],137:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../util/isArray"),s=t("./fromArray"),u=t("../OuterSubscriber"),a=t("../util/subscribeToResult");r.race=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!i.isArray(t[0]))return t[0];t=t[0]}return s.fromArray(t,void 0).lift(new c)};var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t))},l);function l(){}r.RaceOperator=c;var f,p=(f=u.OuterSubscriber,o(h,f),h.prototype._next=function(t){this.observables.push(t)},h.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var r=0;r<e&&!this.hasFirst;r++){var n=t[r],n=a.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(n),this.add(n)}this.observables=null}},h.prototype.notifyNext=function(t,e,r){if(!this.hasFirst){this.hasFirst=!0;for(var n,o=0;o<this.subscriptions.length;o++)o!==r&&((n=this.subscriptions[o]).unsubscribe(),this.remove(n));this.subscriptions=null}this.destination.next(e)},h);function h(t){t=f.call(this,t)||this;return t.hasFirst=!1,t.observables=[],t.subscriptions=[],t}r.RaceSubscriber=p},{"../OuterSubscriber":106,"../util/isArray":277,"../util/subscribeToResult":296,"./fromArray":125}],138:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=t("../Observable");function u(t){var e=t.start,r=t.index,n=t.count,o=t.subscriber;n<=r?o.complete():(o.next(e),o.closed||(t.index=r+1,t.start=e+1,this.schedule(t)))}r.range=function(n,o,i){return void 0===n&&(n=0),new s.Observable(function(t){void 0===o&&(o=n,n=0);var e=0,r=n;if(i)return i.schedule(u,0,{index:e,count:o,start:n,subscriber:t});for(;;){if(e++>=o){t.complete();break}if(t.next(r++),t.closed)break}})},r.dispatch=u},{"../Observable":104}],139:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable");function o(t){var e=t.error;t.subscriber.error(e)}r.throwError=function(e,r){return r?new n.Observable(function(t){return r.schedule(o,0,{error:e,subscriber:t})}):new n.Observable(function(t){return t.error(e)})}},{"../Observable":104}],140:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../scheduler/async"),u=t("../util/isNumeric"),a=t("../util/isScheduler");function c(t){var e=t.index,r=t.period,n=t.subscriber;if(n.next(e),!n.closed){if(-1===r)return n.complete();t.index=e+1,this.schedule(t,r)}}r.timer=function(r,t,n){void 0===r&&(r=0);var o=-1;return u.isNumeric(t)?o=Number(t)<1?1:Number(t):a.isScheduler(t)&&(n=t),a.isScheduler(n)||(n=s.async),new i.Observable(function(t){var e=u.isNumeric(r)?r:+r-n.now();return n.schedule(c,e,{index:0,period:o,subscriber:t})})}},{"../Observable":104,"../scheduler/async":263,"../util/isNumeric":283,"../util/isScheduler":287}],141:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),s=t("./from"),u=t("./empty");r.using=function(o,i){return new n.Observable(function(e){var t,r;try{t=o()}catch(t){return void e.error(t)}try{r=i(t)}catch(t){return void e.error(t)}var n=(r?s.from(r):u.EMPTY).subscribe(e);return function(){n.unsubscribe(),t&&t.unsubscribe()}})}},{"../Observable":104,"./empty":122,"./from":124}],142:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("./fromArray"),s=t("../util/isArray"),u=t("../Subscriber"),a=t("../../internal/symbol/iterator"),c=t("../innerSubscribe");r.zip=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return"function"==typeof r&&t.pop(),i.fromArray(t,void 0).lift(new l(r))};var l=(f.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},f);function f(t){this.resultSelector=t}r.ZipOperator=l;var p,h=(p=u.Subscriber,o(d,p),d.prototype._next=function(t){var e=this.iterators;s.isArray(t)?e.push(new y(t)):"function"==typeof t[a.iterator]?e.push(new b(t[a.iterator]())):e.push(new g(this.destination,this,t))},d.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var r=0;r<e;r++){var n=t[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}}else this.destination.complete()},d.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},d.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,r=this.destination,n=0;n<e;n++)if("function"==typeof(s=t[n]).hasValue&&!s.hasValue())return;for(var o=!1,i=[],n=0;n<e;n++){var s,u=(s=t[n]).next();if(s.hasCompleted()&&(o=!0),u.done)return void r.complete();i.push(u.value)}this.resultSelector?this._tryresultSelector(i):r.next(i),o&&r.complete()},d.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},d);function d(t,e,r){void 0===r&&(r=Object.create(null));t=p.call(this,t)||this;return t.resultSelector=e,t.iterators=[],t.active=0,t.resultSelector="function"==typeof e?e:void 0,t}r.ZipSubscriber=h;var b=(_.prototype.hasValue=function(){return!0},_.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},_.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},_);function _(t){this.iterator=t,this.nextResult=t.next()}var y=(v.prototype[a.iterator]=function(){return this},v.prototype.next=function(t){var e=this.index++,r=this.array;return e<this.length?{value:r[e],done:!1}:{value:null,done:!0}},v.prototype.hasValue=function(){return this.array.length>this.index},v.prototype.hasCompleted=function(){return this.array.length===this.index},v);function v(t){this.array=t,this.index=0,this.length=0,this.length=t.length}var m,g=(m=c.SimpleOuterSubscriber,o(O,m),O.prototype[a.iterator]=function(){return this},O.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},O.prototype.hasValue=function(){return 0<this.buffer.length},O.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},O.prototype.notifyComplete=function(){0<this.buffer.length?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},O.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},O.prototype.subscribe=function(){return c.innerSubscribe(this.observable,new c.SimpleInnerSubscriber(this))},O);function O(t,e,r){t=m.call(this,t)||this;return t.parent=e,t.observable=r,t.stillUnsubscribed=!0,t.buffer=[],t.isComplete=!1,t}},{"../../internal/symbol/iterator":265,"../Subscriber":111,"../innerSubscribe":114,"../util/isArray":277,"./fromArray":125}],143:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.audit=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector))},u);function u(t){this.durationSelector=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.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)}e=i.innerSubscribe(e,new i.SimpleInnerSubscriber(this));!e||e.closed?this.clearThrottle():this.add(this.throttled=e)}},l.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},l.prototype.notifyNext=function(){this.clearThrottle()},l.prototype.notifyComplete=function(){this.clearThrottle()},l);function l(t,e){t=a.call(this,t)||this;return t.durationSelector=e,t.hasValue=!1,t}},{"../innerSubscribe":114}],144:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../scheduler/async"),o=t("./audit"),i=t("../observable/timer");r.auditTime=function(t,e){return void 0===e&&(e=n.async),o.audit(function(){return i.timer(t,e)})}},{"../observable/timer":140,"../scheduler/async":263,"./audit":143}],145:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.buffer=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.closingNotifier))},u);function u(t){this.closingNotifier=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){this.buffer.push(t)},l.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},l);function l(t,e){t=a.call(this,t)||this;return t.buffer=[],t.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(t))),t}},{"../innerSubscribe":114}],146:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.bufferCount=function(e,r){return void 0===r&&(r=null),function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},s);function s(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?f:a}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},c.prototype._complete=function(){var t=this.buffer;0<t.length&&this.destination.next(t),u.prototype._complete.call(this)},c);function c(t,e){t=u.call(this,t)||this;return t.bufferSize=e,t.buffer=[],t}var l,f=(l=t.Subscriber,o(p,l),p.prototype._next=function(t){var e=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var s=n[i];s.push(t),s.length===e&&(n.splice(i,1),this.destination.next(s))}},p.prototype._complete=function(){for(var t=this.buffers,e=this.destination;0<t.length;){var r=t.shift();0<r.length&&e.next(r)}l.prototype._complete.call(this)},p);function p(t,e,r){t=l.call(this,t)||this;return t.bufferSize=e,t.startBufferEvery=r,t.buffers=[],t.count=0,t}},{"../Subscriber":111}],147:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../scheduler/async"),s=t("../Subscriber"),u=t("../util/isScheduler");r.bufferTime=function(e){var t=arguments.length,r=i.async;u.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;2<=t&&(n=arguments[1]);var o=Number.POSITIVE_INFINITY;return 3<=t&&(o=arguments[2]),function(t){return t.lift(new a(e,n,o,r))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new p(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},c);function c(t,e,r,n){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=r,this.scheduler=n}var l,f=function(){this.buffer=[]},p=(l=s.Subscriber,o(h,l),h.prototype._next=function(t){for(var e,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],s=i.buffer;s.push(t),s.length==this.maxBufferSize&&(e=i)}e&&this.onBufferFull(e)},h.prototype._error=function(t){this.contexts.length=0,l.prototype._error.call(this,t)},h.prototype._complete=function(){for(var t=this.contexts,e=this.destination;0<t.length;){var r=t.shift();e.next(r.buffer)}l.prototype._complete.call(this)},h.prototype._unsubscribe=function(){this.contexts=null},h.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly&&(t=this.openContext(),e=this.bufferTimeSpan,this.add(t.closeAction=this.scheduler.schedule(d,e,{subscriber:this,context:t,bufferTimeSpan:e})))},h.prototype.openContext=function(){var t=new f;return this.contexts.push(t),t},h.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;0<=(e?e.indexOf(t):-1)&&e.splice(e.indexOf(t),1)},h);function h(t,e,r,n,o){var i=l.call(this,t)||this;i.bufferTimeSpan=e,i.bufferCreationInterval=r,i.maxBufferSize=n,i.scheduler=o,i.contexts=[];t=i.openContext();return i.timespanOnly=null==r||r<0,i.timespanOnly?i.add(t.closeAction=o.schedule(d,e,{subscriber:i,context:t,bufferTimeSpan:e})):(n={bufferTimeSpan:e,bufferCreationInterval:r,subscriber:i,scheduler:o},i.add(t.closeAction=o.schedule(_,e,{subscriber:i,context:t})),i.add(o.schedule(b,r,n))),i}function d(t){var e=t.subscriber,r=t.context;r&&e.closeContext(r),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function b(t){var e=t.bufferCreationInterval,r=t.bufferTimeSpan,n=t.subscriber,o=t.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=o.schedule(_,r,{subscriber:n,context:i})),this.schedule(t,e))}function _(t){var e=t.subscriber,t=t.context;e.closeContext(t)}},{"../Subscriber":111,"../scheduler/async":263,"../util/isScheduler":287}],148:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscription"),s=t("../util/subscribeToResult"),t=t("../OuterSubscriber");r.bufferToggle=function(e,r){return function(t){return t.lift(new u(e,r))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.openings,this.closingSelector))},a);function a(t,e){this.openings=t,this.closingSelector=e}var c,l=(c=t.OuterSubscriber,o(f,c),f.prototype._next=function(t){for(var e=this.contexts,r=e.length,n=0;n<r;n++)e[n].buffer.push(t)},f.prototype._error=function(t){for(var e=this.contexts;0<e.length;){var r=e.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,c.prototype._error.call(this,t)},f.prototype._complete=function(){for(var t=this.contexts;0<t.length;){var e=t.shift();this.destination.next(e.buffer),e.subscription.unsubscribe(),e.buffer=null,e.subscription=null}this.contexts=null,c.prototype._complete.call(this)},f.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},f.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},f.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},f.prototype.closeBuffer=function(t){var e,r,n=this.contexts;n&&t&&(e=t.buffer,r=t.subscription,this.destination.next(e),n.splice(n.indexOf(t),1),this.remove(r),r.unsubscribe())},f.prototype.trySubscribe=function(t){var e=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};e.push(n);t=s.subscribeToResult(this,t,n);!t||t.closed?this.closeBuffer(n):(t.context=n,this.add(t),r.add(t))},f);function f(t,e,r){t=c.call(this,t)||this;return t.closingSelector=r,t.contexts=[],t.add(s.subscribeToResult(t,e)),t}},{"../OuterSubscriber":106,"../Subscription":112,"../util/subscribeToResult":296}],149:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscription"),s=t("../innerSubscribe");r.bufferWhen=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.closingSelector))},a);function a(t){this.closingSelector=t}var c,l=(c=s.SimpleOuterSubscriber,o(f,c),f.prototype._next=function(t){this.buffer.push(t)},f.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),c.prototype._complete.call(this)},f.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},f.prototype.notifyNext=function(){this.openBuffer()},f.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},f.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e=this.buffer;this.buffer&&this.destination.next(e),this.buffer=[];try{var r=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(s.innerSubscribe(r,new s.SimpleInnerSubscriber(this))),this.subscribing=!1},f);function f(t,e){t=c.call(this,t)||this;return t.closingSelector=e,t.subscribing=!1,t.openBuffer(),t}},{"../Subscription":112,"../innerSubscribe":114}],150:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.catchError=function(r){return function(t){var e=new s(r),t=t.lift(e);return e.caught=t}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.selector,this.caught))},u);function u(t){this.selector=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype.error=function(t){if(!this.isStopped){var e=void 0;try{e=this.selector(t,this.caught)}catch(t){return void a.prototype.error.call(this,t)}this._unsubscribeAndRecycle();t=new i.SimpleInnerSubscriber(this);this.add(t);e=i.innerSubscribe(e,t);e!==t&&this.add(e)}},l);function l(t,e,r){t=a.call(this,t)||this;return t.selector=e,t.caught=r,t}},{"../innerSubscribe":114}],151:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/combineLatest");r.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},{"../observable/combineLatest":119}],152:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/isArray"),o=t("../observable/combineLatest"),i=t("../observable/from");r.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(r))}}},{"../observable/combineLatest":119,"../observable/from":124,"../util/isArray":277}],153:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/concat");r.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},{"../observable/concat":120}],154:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./mergeAll");r.concatAll=function(){return n.mergeAll(1)}},{"./mergeAll":187}],155:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./mergeMap");r.concatMap=function(t,e){return n.mergeMap(t,e,1)}},{"./mergeMap":188}],156:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./concatMap");r.concatMapTo=function(t,e){return n.concatMap(function(){return t},e)}},{"./concatMap":155}],157:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.count=function(e){return function(t){return t.lift(new i(e,t))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.source))},s);function s(t,e){this.predicate=t,this.source=e}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},c.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},c.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},c);function c(t,e,r){t=u.call(this,t)||this;return t.predicate=e,t.source=r,t.count=0,t.index=0,t}},{"../Subscriber":111}],158:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.debounce=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector))},u);function u(t){this.durationSelector=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},l.prototype._complete=function(){this.emitValue(),this.destination.complete()},l.prototype._tryNext=function(t,e){var r=this.durationSubscription;this.value=t,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},l.prototype.notifyNext=function(){this.emitValue()},l.prototype.notifyComplete=function(){this.emitValue()},l.prototype.emitValue=function(){var t,e;this.hasValue&&(t=this.value,(e=this.durationSubscription)&&(this.durationSubscription=void 0,e.unsubscribe(),this.remove(e)),this.value=void 0,this.hasValue=!1,a.prototype._next.call(this,t))},l);function l(t,e){t=a.call(this,t)||this;return t.durationSelector=e,t.hasValue=!1,t}},{"../innerSubscribe":114}],159:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../scheduler/async");r.debounceTime=function(e,r){return void 0===r&&(r=s.async),function(t){return t.lift(new u(e,r))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.dueTime,this.scheduler))},a);function a(t,e){this.dueTime=t,this.scheduler=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(p,this.dueTime,this))},f.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},f.prototype.debouncedNext=function(){var t;this.clearDebounce(),this.hasValue&&(t=this.lastValue,this.lastValue=null,this.hasValue=!1,this.destination.next(t))},f.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},f);function f(t,e,r){t=c.call(this,t)||this;return t.dueTime=e,t.scheduler=r,t.debouncedSubscription=null,t.lastValue=null,t.hasValue=!1,t}function p(t){t.debouncedNext()}},{"../Subscriber":111,"../scheduler/async":263}],160:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new i(e))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.defaultValue))},s);function s(t){this.defaultValue=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},c.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},c);function c(t,e){t=u.call(this,t)||this;return t.defaultValue=e,t.isEmpty=!0,t}},{"../Subscriber":111}],161:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../scheduler/async"),s=t("../util/isDate"),u=t("../Subscriber"),a=t("../Notification");r.delay=function(t,e){void 0===e&&(e=i.async);var r=s.isDate(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new c(r,e))}};var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t,this.delay,this.scheduler))},l);function l(t,e){this.delay=t,this.scheduler=e}var f,p=(f=u.Subscriber,o(h,f),h.dispatch=function(t){for(var e,r=t.source,n=r.queue,o=t.scheduler,i=t.destination;0<n.length&&n[0].time-o.now()<=0;)n.shift().notification.observe(i);0<n.length?(e=Math.max(0,n[0].time-o.now()),this.schedule(t,e)):(this.unsubscribe(),r.active=!1)},h.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(h.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},h.prototype.scheduleNotification=function(t){var e;!0!==this.errored&&(e=this.scheduler,t=new d(e.now()+this.delay,t),this.queue.push(t),!1===this.active&&this._schedule(e))},h.prototype._next=function(t){this.scheduleNotification(a.Notification.createNext(t))},h.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},h.prototype._complete=function(){this.scheduleNotification(a.Notification.createComplete()),this.unsubscribe()},h);function h(t,e,r){t=f.call(this,t)||this;return t.delay=e,t.scheduler=r,t.queue=[],t.active=!1,t.errored=!1,t}var d=function(t,e){this.time=t,this.notification=e}},{"../Notification":103,"../Subscriber":111,"../scheduler/async":263,"../util/isDate":279}],162:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Observable"),u=t("../OuterSubscriber"),a=t("../util/subscribeToResult");r.delayWhen=function(e,r){return r?function(t){return new b(t,r).lift(new c(e))}:function(t){return t.lift(new c(e))}};var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t,this.delayDurationSelector))},l);function l(t){this.delayDurationSelector=t}var f,p=(f=u.OuterSubscriber,o(h,f),h.prototype.notifyNext=function(t,e,r,n,o){this.destination.next(t),this.removeSubscription(o),this.tryComplete()},h.prototype.notifyError=function(t,e){this._error(t)},h.prototype.notifyComplete=function(t){t=this.removeSubscription(t);t&&this.destination.next(t),this.tryComplete()},h.prototype._next=function(t){var e=this.index++;try{var r=this.delayDurationSelector(t,e);r&&this.tryDelay(r,t)}catch(t){this.destination.error(t)}},h.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},h.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},h.prototype.tryDelay=function(t,e){e=a.subscribeToResult(this,t,e);e&&!e.closed&&(this.destination.add(e),this.delayNotifierSubscriptions.push(e))},h.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},h);function h(t,e){t=f.call(this,t)||this;return t.delayDurationSelector=e,t.completed=!1,t.delayNotifierSubscriptions=[],t.index=0,t}var d,b=(d=s.Observable,o(_,d),_.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new v(t,this.source))},_);function _(t,e){var r=d.call(this)||this;return r.source=t,r.subscriptionDelay=e,r}var y,v=(y=i.Subscriber,o(m,y),m.prototype._next=function(t){this.subscribeToSource()},m.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},m.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},m.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},m);function m(t,e){var r=y.call(this)||this;return r.parent=t,r.source=e,r.sourceSubscribed=!1,r}},{"../Observable":104,"../OuterSubscriber":106,"../Subscriber":111,"../util/subscribeToResult":296}],163:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.dematerialize=function(){return function(t){return t.lift(new i)}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t))},s);function s(){}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){t.observe(this.destination)},c);function c(t){return u.call(this,t)||this}},{"../Subscriber":111}],164:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.distinct=function(e,r){return function(t){return t.lift(new s(e,r))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.keySelector,this.flushes))},u);function u(t,e){this.keySelector=t,this.flushes=e}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype.notifyNext=function(){this.values.clear()},l.prototype.notifyError=function(t){this._error(t)},l.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},l.prototype._useKeySelector=function(t){var e,r=this.destination;try{e=this.keySelector(t)}catch(t){return void r.error(t)}this._finalizeNext(e,t)},l.prototype._finalizeNext=function(t,e){var r=this.values;r.has(t)||(r.add(t),this.destination.next(e))},l);function l(t,e,r){t=a.call(this,t)||this;return t.keySelector=e,t.values=new Set,r&&t.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(t))),t}r.DistinctSubscriber=c},{"../innerSubscribe":114}],165:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.distinctUntilChanged=function(e,r){return function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.compare,this.keySelector))},s);function s(t,e){this.compare=t,this.keySelector=e}var u,a=(u=t.Subscriber,o(c,u),c.prototype.compare=function(t,e){return t===e},c.prototype._next=function(t){try{var e=this.keySelector,r=e?e(t):t}catch(t){return this.destination.error(t)}e=!1;if(this.hasKey)try{e=(0,this.compare)(this.key,r)}catch(t){return this.destination.error(t)}else this.hasKey=!0;e||(this.key=r,this.destination.next(t))},c);function c(t,e,r){t=u.call(this,t)||this;return t.keySelector=r,t.hasKey=!1,"function"==typeof e&&(t.compare=e),t}},{"../Subscriber":111}],166:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("./distinctUntilChanged");r.distinctUntilKeyChanged=function(r,n){return o.distinctUntilChanged(function(t,e){return n?n(t[r],e[r]):t[r]===e[r]})}},{"./distinctUntilChanged":165}],167:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../util/ArgumentOutOfRangeError"),i=t("./filter"),s=t("./throwIfEmpty"),u=t("./defaultIfEmpty"),a=t("./take");r.elementAt=function(r,e){if(r<0)throw new o.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(t){return t.pipe(i.filter(function(t,e){return e===r}),a.take(1),n?u.defaultIfEmpty(e):s.throwIfEmpty(function(){return new o.ArgumentOutOfRangeError}))}}},{"../util/ArgumentOutOfRangeError":268,"./defaultIfEmpty":160,"./filter":173,"./take":225,"./throwIfEmpty":232}],168:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/concat"),o=t("../observable/of");r.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,o.of.apply(void 0,e))}}},{"../observable/concat":120,"../observable/of":133}],169:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.every=function(e,r){return function(t){return t.lift(new i(e,r,t))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg,this.source))},s);function s(t,e,r){this.predicate=t,this.thisArg=e,this.source=r}var u,a=(u=t.Subscriber,o(c,u),c.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},c.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},c.prototype._complete=function(){this.notifyComplete(!0)},c);function c(t,e,r,n){t=u.call(this,t)||this;return t.predicate=e,t.thisArg=r,t.source=n,t.index=0,t.thisArg=r||t,t}},{"../Subscriber":111}],170:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.exhaust=function(){return function(t){return t.lift(new s)}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t))},u);function u(){}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(t,new i.SimpleInnerSubscriber(this))))},l.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},l.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},l);function l(t){t=a.call(this,t)||this;return t.hasCompleted=!1,t.hasSubscription=!1,t}},{"../innerSubscribe":114}],171:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var s=t("./map"),u=t("../observable/from"),i=t("../innerSubscribe");r.exhaustMap=function e(o,i){return i?function(t){return t.pipe(e(function(r,n){return u.from(o(r,n)).pipe(s.map(function(t,e){return i(r,t,n,e)}))}))}:function(t){return t.lift(new a(o))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.project))},c);function c(t){this.project=t}var l,f=(l=i.SimpleOuterSubscriber,o(p,l),p.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},p.prototype.tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e)},p.prototype._innerSub=function(t){var e=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(e);t=i.innerSubscribe(t,e);t!==e&&r.add(t)},p.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},p.prototype.notifyNext=function(t){this.destination.next(t)},p.prototype.notifyError=function(t){this.destination.error(t)},p.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},p);function p(t,e){t=l.call(this,t)||this;return t.project=e,t.hasSubscription=!1,t.hasCompleted=!1,t.index=0,t}},{"../innerSubscribe":114,"../observable/from":124,"./map":182}],172:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.expand=function(e,r,n){return r=((r=void 0===r?Number.POSITIVE_INFINITY:r)||0)<1?Number.POSITIVE_INFINITY:r,function(t){return t.lift(new s(e,r,n))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.concurrent,this.scheduler))},u);function u(t,e,r){this.project=t,this.concurrent=e,this.scheduler=r}r.ExpandOperator=s;var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.dispatch=function(t){var e=t.subscriber,r=t.result,n=t.value,t=t.index;e.subscribeToProjection(r,n,t)},l.prototype._next=function(t){var e=this.destination;if(e.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){e.next(t);try{var n,o=(0,this.project)(t,r);this.scheduler?(n={subscriber:this,result:o,value:t,index:r},this.destination.add(this.scheduler.schedule(l.dispatch,0,n))):this.subscribeToProjection(o,t,r)}catch(t){e.error(t)}}else this.buffer.push(t)}},l.prototype.subscribeToProjection=function(t,e,r){this.active++,this.destination.add(i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},l.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},l.prototype.notifyNext=function(t){this._next(t)},l.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&0<t.length&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},l);function l(t,e,r,n){t=a.call(this,t)||this;return t.project=e,t.concurrent=r,t.scheduler=n,t.index=0,t.active=0,t.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(t.buffer=[]),t}r.ExpandSubscriber=c},{"../innerSubscribe":114}],173:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.filter=function(e,r){return function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},s);function s(t,e){this.predicate=t,this.thisArg=e}var u,a=(u=t.Subscriber,o(c,u),c.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)},c);function c(t,e,r){t=u.call(this,t)||this;return t.predicate=e,t.thisArg=r,t.count=0,t}},{"../Subscriber":111}],174:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Subscription");r.finalize=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.callback))},a);function a(t){this.callback=t}var c,l=(c=i.Subscriber,o(f,c),f);function f(t,e){t=c.call(this,t)||this;return t.add(new s.Subscription(e)),t}},{"../Subscriber":111,"../Subscription":112}],175:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.find=function(e,r){if("function"!=typeof e)throw new TypeError("predicate is not a function");return function(t){return t.lift(new i(e,t,!1,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},s);function s(t,e,r,n){this.predicate=t,this.source=e,this.yieldIndex=r,this.thisArg=n}r.FindValueOperator=i;var u,a=(u=t.Subscriber,o(c,u),c.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},c.prototype._next=function(t){var e=this.predicate,r=this.thisArg,n=this.index++;try{e.call(r||this,t,n,this.source)&&this.notifyComplete(this.yieldIndex?n:t)}catch(t){this.destination.error(t)}},c.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},c);function c(t,e,r,n,o){t=u.call(this,t)||this;return t.predicate=e,t.source=r,t.yieldIndex=n,t.thisArg=o,t.index=0,t}r.FindValueSubscriber=a},{"../Subscriber":111}],176:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../operators/find");r.findIndex=function(e,r){return function(t){return t.lift(new n.FindValueOperator(e,t,!0,r))}}},{"../operators/find":175}],177:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../util/EmptyError"),i=t("./filter"),s=t("./take"),u=t("./defaultIfEmpty"),a=t("./throwIfEmpty"),c=t("../util/identity");r.first=function(n,t){var e=2<=arguments.length;return function(r){return r.pipe(n?i.filter(function(t,e){return n(t,e,r)}):c.identity,s.take(1),e?u.defaultIfEmpty(t):a.throwIfEmpty(function(){return new o.EmptyError}))}}},{"../util/EmptyError":269,"../util/identity":276,"./defaultIfEmpty":160,"./filter":173,"./take":225,"./throwIfEmpty":232}],178:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Subscription"),u=t("../Observable"),a=t("../Subject");r.groupBy=function(e,r,n,o){return function(t){return t.lift(new c(e,r,n,o))}};var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},l);function l(t,e,r,n){this.keySelector=t,this.elementSelector=e,this.durationSelector=r,this.subjectSelector=n}var f,p=(f=i.Subscriber,o(h,f),h.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},h.prototype._group=function(t,e){var r,n=this.groups,o=(n=n||(this.groups=new Map)).get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!o){o=this.subjectSelector?this.subjectSelector():new a.Subject,n.set(e,o);n=new v(e,o,this);if(this.destination.next(n),this.durationSelector){n=void 0;try{n=this.durationSelector(new v(e,o))}catch(t){return void this.error(t)}this.add(n.subscribe(new b(e,o,this)))}}o.closed||o.next(r)},h.prototype._error=function(r){var t=this.groups;t&&(t.forEach(function(t,e){t.error(r)}),t.clear()),this.destination.error(r)},h.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(t,e){t.complete()}),t.clear()),this.destination.complete()},h.prototype.removeGroup=function(t){this.groups.delete(t)},h.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&f.prototype.unsubscribe.call(this))},h);function h(t,e,r,n,o){t=f.call(this,t)||this;return t.keySelector=e,t.elementSelector=r,t.durationSelector=n,t.subjectSelector=o,t.groups=null,t.attemptedToUnsubscribe=!1,t.count=0,t}var d,b=(d=i.Subscriber,o(_,d),_.prototype._next=function(t){this.complete()},_.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},_);function _(t,e,r){var n=d.call(this,e)||this;return n.key=t,n.group=e,n.parent=r,n}var y,v=(y=u.Observable,o(m,y),m.prototype._subscribe=function(t){var e=new s.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&e.add(new O(r)),e.add(n.subscribe(t)),e},m);function m(t,e,r){var n=y.call(this)||this;return n.key=t,n.groupSubject=e,n.refCountSubscription=r,n}r.GroupedObservable=v;var g,O=(g=s.Subscription,o(w,g),w.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(g.prototype.unsubscribe.call(this),--t.count,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},w);function w(t){var e=g.call(this)||this;return(e.parent=t).count++,e}},{"../Observable":104,"../Subject":109,"../Subscriber":111,"../Subscription":112}],179:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.ignoreElements=function(){return function(t){return t.lift(new i)}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t))},s);function s(){}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){},c);function c(){return null!==u&&u.apply(this,arguments)||this}},{"../Subscriber":111}],180:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.isEmpty=function(){return function(t){return t.lift(new i)}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t))},s);function s(){}var u,a=(u=t.Subscriber,o(c,u),c.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},c.prototype._next=function(t){this.notifyComplete(!1)},c.prototype._complete=function(){this.notifyComplete(!0)},c);function c(t){return u.call(this,t)||this}},{"../Subscriber":111}],181:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../util/EmptyError"),i=t("./filter"),s=t("./takeLast"),u=t("./throwIfEmpty"),a=t("./defaultIfEmpty"),c=t("../util/identity");r.last=function(n,t){var e=2<=arguments.length;return function(r){return r.pipe(n?i.filter(function(t,e){return n(t,e,r)}):c.identity,s.takeLast(1),e?a.defaultIfEmpty(t):u.throwIfEmpty(function(){return new o.EmptyError}))}}},{"../util/EmptyError":269,"../util/identity":276,"./defaultIfEmpty":160,"./filter":173,"./takeLast":226,"./throwIfEmpty":232}],182:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.map=function(e,r){return function(t){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},s);function s(t,e){this.project=t,this.thisArg=e}r.MapOperator=i;var u,a=(u=t.Subscriber,o(c,u),c.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)},c);function c(t,e,r){t=u.call(this,t)||this;return t.project=e,t.count=0,t.thisArg=r||t,t}},{"../Subscriber":111}],183:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.mapTo=function(e){return function(t){return t.lift(new i(e))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.value))},s);function s(t){this.value=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){this.destination.next(this.value)},c);function c(t,e){t=u.call(this,t)||this;return t.value=e,t}},{"../Subscriber":111}],184:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Notification");r.materialize=function(){return function(t){return t.lift(new u)}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t))},a);function a(){}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){this.destination.next(s.Notification.createNext(t))},f.prototype._error=function(t){var e=this.destination;e.next(s.Notification.createError(t)),e.complete()},f.prototype._complete=function(){var t=this.destination;t.next(s.Notification.createComplete()),t.complete()},f);function f(t){return c.call(this,t)||this}},{"../Notification":103,"../Subscriber":111}],185:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./reduce");r.max=function(r){return n.reduce("function"==typeof r?function(t,e){return 0<r(t,e)?t:e}:function(t,e){return e<t?t:e})}},{"./reduce":203}],186:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/merge");r.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},{"../observable/merge":131}],187:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./mergeMap"),o=t("../util/identity");r.mergeAll=function(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),n.mergeMap(o.identity,t)}},{"../util/identity":276,"./mergeMap":188}],188:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("./map"),s=t("../observable/from"),u=t("../innerSubscribe");function a(e,o,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof o?function(t){return t.pipe(a(function(r,n){return s.from(e(r,n)).pipe(i.map(function(t,e){return o(r,t,n,e)}))},r))}:("number"==typeof o&&(r=o),function(t){return t.lift(new c(e,r))})}r.mergeMap=a;var c=(l.prototype.call=function(t,e){return e.subscribe(new p(t,this.project,this.concurrent))},l);function l(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}r.MergeMapOperator=c;var f,p=(f=u.SimpleOuterSubscriber,o(h,f),h.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},h.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e)},h.prototype._innerSub=function(t){var e=new u.SimpleInnerSubscriber(this),r=this.destination;r.add(e);t=u.innerSubscribe(t,e);t!==e&&r.add(t)},h.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},h.prototype.notifyNext=function(t){this.destination.next(t)},h.prototype.notifyComplete=function(){var t=this.buffer;this.active--,0<t.length?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},h);function h(t,e,r){void 0===r&&(r=Number.POSITIVE_INFINITY);t=f.call(this,t)||this;return t.project=e,t.concurrent=r,t.hasCompleted=!1,t.buffer=[],t.active=0,t.index=0,t}r.MergeMapSubscriber=p,r.flatMap=a},{"../innerSubscribe":114,"../observable/from":124,"./map":182}],189:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./mergeMap");r.mergeMapTo=function(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof e?n.mergeMap(function(){return t},e,r):n.mergeMap(function(){return t},r="number"==typeof e?e:r)}},{"./mergeMap":188}],190:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.mergeScan=function(e,r,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(t){return t.lift(new s(e,r,n))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.accumulator,this.seed,this.concurrent))},u);function u(t,e,r){this.accumulator=t,this.seed=e,this.concurrent=r}r.MergeScanOperator=s;var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,t,e)}catch(t){return r.error(t)}this.active++,this._innerSub(n)}else this.buffer.push(t)},l.prototype._innerSub=function(t){var e=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(e);t=i.innerSubscribe(t,e);t!==e&&r.add(t)},l.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},l.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t)},l.prototype.notifyComplete=function(){var t=this.buffer;this.active--,0<t.length?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},l);function l(t,e,r,n){t=a.call(this,t)||this;return t.accumulator=e,t.acc=r,t.concurrent=n,t.hasValue=!1,t.hasCompleted=!1,t.buffer=[],t.active=0,t.index=0,t}r.MergeScanSubscriber=c},{"../innerSubscribe":114}],191:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./reduce");r.min=function(r){return n.reduce("function"==typeof r?function(t,e){return r(t,e)<0?t:e}:function(t,e){return t<e?t:e})}},{"./reduce":203}],192:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../observable/ConnectableObservable");r.multicast=function(n,o){return function(t){var e="function"==typeof n?n:function(){return n};if("function"==typeof o)return t.lift(new s(e,o));var r=Object.create(t,i.connectableObservableDescriptor);return r.source=t,r.subjectFactory=e,r}};var s=(n.prototype.call=function(t,e){var r=this.selector,n=this.subjectFactory(),t=r(n).subscribe(t);return t.add(e.subscribe(n)),t},n);function n(t,e){this.subjectFactory=t,this.selector=e}r.MulticastOperator=s},{"../observable/ConnectableObservable":115}],193:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../Notification");r.observeOn=function(e,r){return void 0===r&&(r=0),function(t){return t.lift(new u(e,r))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.scheduler,this.delay))},a);function a(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}r.ObserveOnOperator=u;var c,l=(c=i.Subscriber,o(f,c),f.dispatch=function(t){var e=t.notification,t=t.destination;e.observe(t),this.unsubscribe()},f.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(f.dispatch,this.delay,new p(t,this.destination)))},f.prototype._next=function(t){this.scheduleMessage(s.Notification.createNext(t))},f.prototype._error=function(t){this.scheduleMessage(s.Notification.createError(t)),this.unsubscribe()},f.prototype._complete=function(){this.scheduleMessage(s.Notification.createComplete()),this.unsubscribe()},f);function f(t,e,r){void 0===r&&(r=0);t=c.call(this,t)||this;return t.scheduler=e,t.delay=r,t}r.ObserveOnSubscriber=l;var p=function(t,e){this.notification=t,this.destination=e};r.ObserveOnMessage=p},{"../Notification":103,"../Subscriber":111}],194:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../observable/from"),s=t("../util/isArray"),u=t("../innerSubscribe");r.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&s.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new a(e))}},r.onErrorResumeNextStatic=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(t=1===t.length&&s.isArray(t[0])?t[0]:t).shift();return i.from(r).lift(new a(t))};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.nextSources))},c);function c(t){this.nextSources=t}var l,f=(l=u.SimpleOuterSubscriber,o(p,l),p.prototype.notifyError=function(){this.subscribeToNextSource()},p.prototype.notifyComplete=function(){this.subscribeToNextSource()},p.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},p.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},p.prototype.subscribeToNextSource=function(){var t,e,r=this.nextSources.shift();r?(t=new u.SimpleInnerSubscriber(this),(e=this.destination).add(t),(r=u.innerSubscribe(r,t))!==t&&e.add(r)):this.destination.complete()},p);function p(t,e){var r=l.call(this,t)||this;return r.destination=t,r.nextSources=e,r}},{"../innerSubscribe":114,"../observable/from":124,"../util/isArray":277}],195:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.pairwise=function(){return function(t){return t.lift(new i)}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t))},s);function s(){}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},c);function c(t){t=u.call(this,t)||this;return t.hasPrev=!1,t}},{"../Subscriber":111}],196:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/not"),o=t("./filter");r.partition=function(e,r){return function(t){return[o.filter(e,r)(t),o.filter(n.not(e,r))(t)]}}},{"../util/not":289,"./filter":173}],197:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./map");r.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return function(t){return n.map((o=e,i=r,function(t){for(var e=t,r=0;r<i;r++){var n=null!=e?e[o[r]]:void 0;if(void 0===n)return;e=n}return e}))(t);var o,i}}},{"./map":182}],198:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Subject"),o=t("./multicast");r.publish=function(t){return t?o.multicast(function(){return new n.Subject},t):o.multicast(new n.Subject)}},{"../Subject":109,"./multicast":192}],199:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../BehaviorSubject"),o=t("./multicast");r.publishBehavior=function(e){return function(t){return o.multicast(new n.BehaviorSubject(e))(t)}}},{"../BehaviorSubject":101,"./multicast":192}],200:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../AsyncSubject"),o=t("./multicast");r.publishLast=function(){return function(t){return o.multicast(new n.AsyncSubject)(t)}}},{"../AsyncSubject":100,"./multicast":192}],201:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=t("../ReplaySubject"),u=t("./multicast");r.publishReplay=function(t,e,r,n){var o="function"==typeof r?r:void 0,i=new s.ReplaySubject(t,e,n=r&&"function"!=typeof r?r:n);return function(t){return u.multicast(function(){return i},o)(t)}}},{"../ReplaySubject":107,"./multicast":192}],202:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../util/isArray"),o=t("../observable/race");r.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},{"../observable/race":137,"../util/isArray":277}],203:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("./scan"),i=t("./takeLast"),s=t("./defaultIfEmpty"),u=t("../util/pipe");r.reduce=function(n,e){return 2<=arguments.length?function(t){return u.pipe(o.scan(n,e),i.takeLast(1),s.defaultIfEmpty(e))(t)}:function(t){return u.pipe(o.scan(function(t,e,r){return n(t,e,r+1)}),i.takeLast(1))(t)}}},{"../util/pipe":290,"./defaultIfEmpty":160,"./scan":211,"./takeLast":226}],204:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.refCount=function(){return function(t){return t.lift(new i(t))}};var i=(s.prototype.call=function(t,e){var r=this.connectable;r._refCount++;t=new a(t,r),e=e.subscribe(t);return t.closed||(t.connection=r.connect()),e},s);function s(t){this.connectable=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._unsubscribe=function(){var t,e=this.connectable;e?(this.connectable=null,(t=e._refCount)<=0?this.connection=null:(e._refCount=t-1,1<t?this.connection=null:(t=this.connection,e=e._connection,this.connection=null,!e||t&&e!==t||e.unsubscribe()))):this.connection=null},c);function c(t,e){t=u.call(this,t)||this;return t.connectable=e,t}},{"../Subscriber":111}],205:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../observable/empty");r.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?s.empty():e<0?t.lift(new u(-1,t)):t.lift(new u(e-1,t))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.count,this.source))},a);function a(t,e){this.count=t,this.source=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype.complete=function(){if(!this.isStopped){var t=this.source,e=this.count;if(0===e)return c.prototype.complete.call(this);-1<e&&(this.count=e-1),t.subscribe(this._unsubscribeAndRecycle())}},f);function f(t,e,r){t=c.call(this,t)||this;return t.count=e,t.source=r,t}},{"../Subscriber":111,"../observable/empty":122}],206:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../innerSubscribe");r.repeatWhen=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.notifier,e))},a);function a(t){this.notifier=t}var c,l=(c=s.SimpleOuterSubscriber,o(f,c),f.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},f.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return c.prototype.complete.call(this)},f.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return c.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},f.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},f.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,c.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},f.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t=(0,this.notifier)(this.notifications)}catch(t){return c.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=s.innerSubscribe(t,new s.SimpleInnerSubscriber(this))},f);function f(t,e,r){t=c.call(this,t)||this;return t.notifier=e,t.source=r,t.sourceIsBeingSubscribedTo=!0,t}},{"../Subject":109,"../innerSubscribe":114}],207:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new i(e,t))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.count,this.source))},s);function s(t,e){this.count=t,this.source=e}var u,a=(u=t.Subscriber,o(c,u),c.prototype.error=function(t){if(!this.isStopped){var e=this.source,r=this.count;if(0===r)return u.prototype.error.call(this,t);-1<r&&(this.count=r-1),e.subscribe(this._unsubscribeAndRecycle())}},c);function c(t,e,r){t=u.call(this,t)||this;return t.count=e,t.source=r,t}},{"../Subscriber":111}],208:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../innerSubscribe");r.retryWhen=function(e){return function(t){return t.lift(new u(e,t))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.notifier,this.source))},a);function a(t,e){this.notifier=t,this.source=e}var c,l=(c=s.SimpleOuterSubscriber,o(f,c),f.prototype.error=function(t){if(!this.isStopped){var e=this.errors,r=this.retries,n=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{e=new i.Subject;try{r=(0,this.notifier)(e)}catch(t){return c.prototype.error.call(this,t)}n=s.innerSubscribe(r,new s.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=e,this.retries=r,this.retriesSubscription=n,e.next(t)}},f.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},f.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},f);function f(t,e,r){t=c.call(this,t)||this;return t.notifier=e,t.source=r,t}},{"../Subject":109,"../innerSubscribe":114}],209:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.sample=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){t=new c(t),e=e.subscribe(t);return e.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(t))),e},u);function u(t){this.notifier=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){this.value=t,this.hasValue=!0},l.prototype.notifyNext=function(){this.emitValue()},l.prototype.notifyComplete=function(){this.emitValue()},l.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},l);function l(){var t=null!==a&&a.apply(this,arguments)||this;return t.hasValue=!1,t}},{"../innerSubscribe":114}],210:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../scheduler/async");r.sampleTime=function(e,r){return void 0===r&&(r=s.async),function(t){return t.lift(new u(e,r))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.period,this.scheduler))},a);function a(t,e){this.period=t,this.scheduler=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},f.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},f);function f(t,e,r){t=c.call(this,t)||this;return t.period=e,t.scheduler=r,t.hasValue=!1,t.add(r.schedule(p,e,{subscriber:t,period:e})),t}function p(t){var e=t.subscriber,r=t.period;e.notifyNext(),this.schedule(t,r)}},{"../Subscriber":111,"../scheduler/async":263}],211:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.scan=function(e,r){var n=2<=arguments.length?!0:!1;return function(t){return t.lift(new i(e,r,n))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.accumulator,this.seed,this.hasSeed))},s);function s(t,e,r){void 0===r&&(r=!1),this.accumulator=t,this.seed=e,this.hasSeed=r}var u,a=(u=t.Subscriber,o(c,u),Object.defineProperty(c.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),c.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},c.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.accumulator(this.seed,t,r)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},c);function c(t,e,r,n){t=u.call(this,t)||this;return t.accumulator=e,t._seed=r,t.hasSeed=n,t.index=0,t}},{"../Subscriber":111}],212:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.sequenceEqual=function(e,r){return function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.compareTo,this.comparator))},s);function s(t,e){this.compareTo=t,this.comparator=e}r.SequenceEqualOperator=i;var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},c.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},c.prototype.checkValues=function(){for(var t=this._a,e=this._b,r=this.comparator;0<t.length&&0<e.length;){var n=t.shift(),o=e.shift(),i=!1;try{i=r?r(n,o):n===o}catch(t){this.destination.error(t)}i||this.emit(!1)}},c.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},c.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},c.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},c);function c(t,e,r){var n=u.call(this,t)||this;return n.compareTo=e,n.comparator=r,n._a=[],n._b=[],n._oneComplete=!1,n.destination.add(e.subscribe(new f(t,n))),n}r.SequenceEqualSubscriber=a;var l,f=(l=t.Subscriber,o(p,l),p.prototype._next=function(t){this.parent.nextB(t)},p.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},p.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},p);function p(t,e){t=l.call(this,t)||this;return t.parent=e,t}},{"../Subscriber":111}],213:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./multicast"),o=t("./refCount"),i=t("../Subject");function s(){return new i.Subject}r.share=function(){return function(t){return o.refCount()(n.multicast(s)(t))}}},{"../Subject":109,"./multicast":192,"./refCount":204}],214:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var p=t("../ReplaySubject");r.shareReplay=function(t,e,r){var f=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:r};return function(t){return t.lift((t=(e=f).bufferSize,o=void 0===t?Number.POSITIVE_INFINITY:t,t=e.windowTime,i=void 0===t?Number.POSITIVE_INFINITY:t,s=e.refCount,u=e.scheduler,a=0,l=c=!1,function(t){var e;a++,!r||c?(c=!1,r=new p.ReplaySubject(o,i,u),e=r.subscribe(this),n=t.subscribe({next:function(t){r.next(t)},error:function(t){c=!0,r.error(t)},complete:function(){l=!0,n=void 0,r.complete()}}),l&&(n=void 0)):e=r.subscribe(this),this.add(function(){a--,e.unsubscribe(),e=void 0,n&&!l&&s&&0===a&&(n.unsubscribe(),r=n=void 0)})}));var e,r,n,o,i,s,u,a,c,l}}},{"../ReplaySubject":107}],215:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/EmptyError");r.single=function(e){return function(t){return t.lift(new u(e,t))}};var u=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.predicate,this.source))},a);function a(t,e){this.predicate=t,this.source=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},f.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},f.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},f.prototype._complete=function(){var t=this.destination;0<this.index?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new s.EmptyError)},f);function f(t,e,r){t=c.call(this,t)||this;return t.predicate=e,t.source=r,t.seenValue=!1,t.index=0,t}},{"../Subscriber":111,"../util/EmptyError":269}],216:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.skip=function(e){return function(t){return t.lift(new i(e))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.total))},s);function s(t){this.total=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},c);function c(t,e){t=u.call(this,t)||this;return t.total=e,t.count=0,t}},{"../Subscriber":111}],217:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/ArgumentOutOfRangeError");r.skipLast=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new i.Subscriber(t)):e.subscribe(new l(t,this._skipCount))},a);function a(t){if(this._skipCount=t,this._skipCount<0)throw new s.ArgumentOutOfRangeError}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){var e,r=this._skipCount,n=this._count++;n<r?this._ring[n]=t:(r=(e=this._ring)[n=n%r],e[n]=t,this.destination.next(r))},f);function f(t,e){t=c.call(this,t)||this;return t._skipCount=e,t._count=0,t._ring=new Array(e),t}},{"../Subscriber":111,"../util/ArgumentOutOfRangeError":268}],218:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.skipUntil=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.notifier))},u);function u(t){this.notifier=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype._next=function(t){this.hasValue&&a.prototype._next.call(this,t)},l.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},l.prototype.notifyComplete=function(){},l);function l(t,e){var r=a.call(this,t)||this;r.hasValue=!1;t=new i.SimpleInnerSubscriber(r);r.add(t),r.innerSubscription=t;e=i.innerSubscribe(e,t);return e!==t&&(r.add(e),r.innerSubscription=e),r}},{"../innerSubscribe":114}],219:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.skipWhile=function(e){return function(t){return t.lift(new i(e))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate))},s);function s(t){this.predicate=t}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},c.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},c);function c(t,e){t=u.call(this,t)||this;return t.predicate=e,t.skipping=!0,t.index=0,t}},{"../Subscriber":111}],220:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/concat"),o=t("../util/isScheduler");r.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return o.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},{"../observable/concat":120,"../util/isScheduler":287}],221:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/SubscribeOnObservable");r.subscribeOn=function(e,r){return void 0===r&&(r=0),function(t){return t.lift(new o(e,r))}};var o=(i.prototype.call=function(t,e){return new n.SubscribeOnObservable(e,this.delay,this.scheduler).subscribe(t)},i);function i(t,e){this.scheduler=t,this.delay=e}},{"../observable/SubscribeOnObservable":116}],222:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./switchMap"),o=t("../util/identity");r.switchAll=function(){return n.switchMap(o.identity)}},{"../util/identity":276,"./switchMap":223}],223:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var s=t("./map"),u=t("../observable/from"),i=t("../innerSubscribe");r.switchMap=function e(o,i){return"function"==typeof i?function(t){return t.pipe(e(function(r,n){return u.from(o(r,n)).pipe(s.map(function(t,e){return i(r,t,n,e)}))}))}:function(t){return t.lift(new a(o))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.project))},c);function c(t){this.project=t}var l,f=(l=i.SimpleOuterSubscriber,o(p,l),p.prototype._next=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this._innerSub(e)},p.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var r=new i.SimpleInnerSubscriber(this),e=this.destination;e.add(r),this.innerSubscription=i.innerSubscribe(t,r),this.innerSubscription!==r&&e.add(this.innerSubscription)},p.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||l.prototype._complete.call(this),this.unsubscribe()},p.prototype._unsubscribe=function(){this.innerSubscription=void 0},p.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&l.prototype._complete.call(this)},p.prototype.notifyNext=function(t){this.destination.next(t)},p);function p(t,e){t=l.call(this,t)||this;return t.project=e,t.index=0,t}},{"../innerSubscribe":114,"../observable/from":124,"./map":182}],224:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./switchMap");r.switchMapTo=function(t,e){return e?n.switchMap(function(){return t},e):n.switchMap(function(){return t})}},{"./switchMap":223}],225:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/ArgumentOutOfRangeError"),u=t("../observable/empty");r.take=function(e){return function(t){return 0===e?u.empty():t.lift(new a(e))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.total))},c);function c(t){if(this.total=t,this.total<0)throw new s.ArgumentOutOfRangeError}var l,f=(l=i.Subscriber,o(p,l),p.prototype._next=function(t){var e=this.total,r=++this.count;r<=e&&(this.destination.next(t),r===e&&(this.destination.complete(),this.unsubscribe()))},p);function p(t,e){t=l.call(this,t)||this;return t.total=e,t.count=0,t}},{"../Subscriber":111,"../observable/empty":122,"../util/ArgumentOutOfRangeError":268}],226:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/ArgumentOutOfRangeError"),u=t("../observable/empty");r.takeLast=function(e){return function(t){return 0===e?u.empty():t.lift(new a(e))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.total))},c);function c(t){if(this.total=t,this.total<0)throw new s.ArgumentOutOfRangeError}var l,f=(l=i.Subscriber,o(p,l),p.prototype._next=function(t){var e=this.ring,r=this.total,n=this.count++;e.length<r?e.push(t):e[n%r]=t},p.prototype._complete=function(){var t=this.destination,e=this.count;if(0<e)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=e++%r;t.next(n[i])}t.complete()},p);function p(t,e){t=l.call(this,t)||this;return t.total=e,t.ring=new Array,t.count=0,t}},{"../Subscriber":111,"../observable/empty":122,"../util/ArgumentOutOfRangeError":268}],227:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../innerSubscribe");r.takeUntil=function(e){return function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){var r=new c(t),t=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r));return t&&!r.seenValue?(r.add(t),e.subscribe(r)):r},u);function u(t){this.notifier=t}var a,c=(a=i.SimpleOuterSubscriber,o(l,a),l.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},l.prototype.notifyComplete=function(){},l);function l(t){t=a.call(this,t)||this;return t.seenValue=!1,t}},{"../innerSubscribe":114}],228:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});t=t("../Subscriber");r.takeWhile=function(e,r){return void 0===r&&(r=!1),function(t){return t.lift(new i(e,r))}};var i=(s.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.inclusive))},s);function s(t,e){this.predicate=t,this.inclusive=e}var u,a=(u=t.Subscriber,o(c,u),c.prototype._next=function(t){var e,r=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void r.error(t)}this.nextOrComplete(t,e)},c.prototype.nextOrComplete=function(t,e){var r=this.destination;Boolean(e)?r.next(t):(this.inclusive&&r.next(t),r.complete())},c);function c(t,e,r){t=u.call(this,t)||this;return t.predicate=e,t.inclusive=r,t.index=0,t}},{"../Subscriber":111}],229:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../util/noop"),u=t("../util/isFunction");r.tap=function(e,r,n){return function(t){return t.lift(new a(e,r,n))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.nextOrObserver,this.error,this.complete))},c);function c(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}var l,f=(l=i.Subscriber,o(p,l),p.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},p.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},p.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},p);function p(t,e,r,n){t=l.call(this,t)||this;return t._tapNext=s.noop,t._tapError=s.noop,t._tapComplete=s.noop,t._tapError=r||s.noop,t._tapComplete=n||s.noop,u.isFunction(e)?(t._context=t)._tapNext=e:e&&(t._context=e,t._tapNext=e.next||s.noop,t._tapError=e.error||s.noop,t._tapComplete=e.complete||s.noop),t}},{"../Subscriber":111,"../util/isFunction":280,"../util/noop":288}],230:[function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(n,"__esModule",{value:!0});var i=t("../innerSubscribe");n.defaultThrottleConfig={leading:!0,trailing:!1},n.throttle=function(e,r){return void 0===r&&(r=n.defaultThrottleConfig),function(t){return t.lift(new s(e,!!r.leading,!!r.trailing))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector,this.leading,this.trailing))},u);function u(t,e,r){this.durationSelector=t,this.leading=e,this.trailing=r}var a,c=(a=i.SimpleOuterSubscriber,r(l,a),l.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},l.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0},l.prototype.throttle=function(t){t=this.tryDurationSelector(t);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},l.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},l.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send()},l.prototype.notifyNext=function(){this.throttlingDone()},l.prototype.notifyComplete=function(){this.throttlingDone()},l);function l(t,e,r,n){var o=a.call(this,t)||this;return o.destination=t,o.durationSelector=e,o._leading=r,o._trailing=n,o._hasValue=!1,o}},{"../innerSubscribe":114}],231:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),s=t("../scheduler/async"),u=t("./throttle");r.throttleTime=function(e,r,n){return void 0===r&&(r=s.async),void 0===n&&(n=u.defaultThrottleConfig),function(t){return t.lift(new a(e,r,n.leading,n.trailing))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.duration,this.scheduler,this.leading,this.trailing))},c);function c(t,e,r,n){this.duration=t,this.scheduler=e,this.leading=r,this.trailing=n}var l,f=(l=i.Subscriber,o(p,l),p.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(h,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},p.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},p.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},p);function p(t,e,r,n,o){t=l.call(this,t)||this;return t.duration=e,t.scheduler=r,t.leading=n,t.trailing=o,t._hasTrailingValue=!1,t._trailingValue=null,t}function h(t){t.subscriber.clearThrottle()}},{"../Subscriber":111,"../scheduler/async":263,"./throttle":230}],232:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../util/EmptyError"),t=t("../Subscriber");r.throwIfEmpty=function(e){return void 0===e&&(e=f),function(t){return t.lift(new s(e))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new c(t,this.errorFactory))},u);function u(t){this.errorFactory=t}var a,c=(a=t.Subscriber,o(l,a),l.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},l.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},l);function l(t,e){t=a.call(this,t)||this;return t.errorFactory=e,t.hasValue=!1,t}function f(){return new i.EmptyError}},{"../Subscriber":111,"../util/EmptyError":269}],233:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../scheduler/async"),o=t("./scan"),i=t("../observable/defer"),s=t("./map");r.timeInterval=function(r){return void 0===r&&(r=n.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,e){t=t.current;return{value:e,current:r.now(),last:t}},{current:r.now(),value:void 0,last:void 0}),s.map(function(t){var e=t.current,r=t.last,t=t.value;return new u(t,e-r)}))})}};var u=function(t,e){this.value=t,this.interval=e};r.TimeInterval=u},{"../observable/defer":121,"../scheduler/async":263,"./map":182,"./scan":211}],234:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../scheduler/async"),o=t("../util/TimeoutError"),i=t("./timeoutWith"),s=t("../observable/throwError");r.timeout=function(t,e){return void 0===e&&(e=n.async),i.timeoutWith(t,s.throwError(new o.TimeoutError),e)}},{"../observable/throwError":139,"../scheduler/async":263,"../util/TimeoutError":272,"./timeoutWith":235}],235:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var s=t("../scheduler/async"),u=t("../util/isDate"),i=t("../innerSubscribe");r.timeoutWith=function(n,o,i){return void 0===i&&(i=s.async),function(t){var e=u.isDate(n),r=e?+n-i.now():Math.abs(n);return t.lift(new a(r,e,o,i))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},c);function c(t,e,r,n){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=r,this.scheduler=n}var l,f=(l=i.SimpleOuterSubscriber,o(p,l),p.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(t)))},p.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(p.dispatchTimeout,this.waitFor,this))},p.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),l.prototype._next.call(this,t)},p.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},p);function p(t,e,r,n,o){t=l.call(this,t)||this;return t.absoluteTimeout=e,t.waitFor=r,t.withObservable=n,t.scheduler=o,t.scheduleTimeout(),t}},{"../innerSubscribe":114,"../scheduler/async":263,"../util/isDate":279}],236:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../scheduler/async"),o=t("./map");r.timestamp=function(e){return void 0===e&&(e=n.async),o.map(function(t){return new i(t,e.now())})};var i=function(t,e){this.value=t,this.timestamp=e};r.Timestamp=i},{"../scheduler/async":263,"./map":182}],237:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./reduce");function o(t,e,r){return 0===r?[e]:(t.push(e),t)}r.toArray=function(){return n.reduce(o,[])}},{"./reduce":203}],238:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../innerSubscribe");r.window=function(e){return function(t){return t.lift(new u(e))}};var u=(a.prototype.call=function(t,e){t=new l(t),e=e.subscribe(t);return e.closed||t.add(s.innerSubscribe(this.windowBoundaries,new s.SimpleInnerSubscriber(t))),e},a);function a(t){this.windowBoundaries=t}var c,l=(c=s.SimpleOuterSubscriber,o(f,c),f.prototype.notifyNext=function(){this.openWindow()},f.prototype.notifyError=function(t){this._error(t)},f.prototype.notifyComplete=function(){this._complete()},f.prototype._next=function(t){this.window.next(t)},f.prototype._error=function(t){this.window.error(t),this.destination.error(t)},f.prototype._complete=function(){this.window.complete(),this.destination.complete()},f.prototype._unsubscribe=function(){this.window=null},f.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,t=this.window=new i.Subject;e.next(t)},f);function f(t){var e=c.call(this,t)||this;return e.window=new i.Subject,t.next(e.window),e}},{"../Subject":109,"../innerSubscribe":114}],239:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber"),u=t("../Subject");r.windowCount=function(e,r){return void 0===r&&(r=0),function(t){return t.lift(new s(e,r))}};var s=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.windowSize,this.startWindowEvery))},a);function a(t,e){this.windowSize=t,this.startWindowEvery=e}var c,l=(c=i.Subscriber,o(f,c),f.prototype._next=function(t){for(var e=0<this.startWindowEvery?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(t);n=this.count-n+1;0<=n&&n%e==0&&!this.closed&&o.shift().complete(),++this.count%e!=0||this.closed||(e=new u.Subject,o.push(e),r.next(e))},f.prototype._error=function(t){var e=this.windows;if(e)for(;0<e.length&&!this.closed;)e.shift().error(t);this.destination.error(t)},f.prototype._complete=function(){var t=this.windows;if(t)for(;0<t.length&&!this.closed;)t.shift().complete();this.destination.complete()},f.prototype._unsubscribe=function(){this.count=0,this.windows=null},f);function f(t,e,r){var n=c.call(this,t)||this;return n.destination=t,n.windowSize=e,n.startWindowEvery=r,n.windows=[new u.Subject],n.count=0,t.next(n.windows[0]),n}},{"../Subject":109,"../Subscriber":111}],240:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../scheduler/async"),u=t("../Subscriber"),a=t("../util/isNumeric"),c=t("../util/isScheduler");r.windowTime=function(e){var r=s.async,n=null,o=Number.POSITIVE_INFINITY;return c.isScheduler(arguments[3])&&(r=arguments[3]),c.isScheduler(arguments[2])?r=arguments[2]:a.isNumeric(arguments[2])&&(o=Number(arguments[2])),c.isScheduler(arguments[1])?r=arguments[1]:a.isNumeric(arguments[1])&&(n=Number(arguments[1])),function(t){return t.lift(new l(e,n,o,r))}};var l=(f.prototype.call=function(t,e){return e.subscribe(new _(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},f);function f(t,e,r,n){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=r,this.scheduler=n}var p,h=(p=i.Subject,o(d,p),d.prototype.next=function(t){this._numberOfNextedValues++,p.prototype.next.call(this,t)},Object.defineProperty(d.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),d);function d(){var t=null!==p&&p.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}var b,_=(b=u.Subscriber,o(y,b),y.prototype._next=function(t){for(var e=this.windows,r=e.length,n=0;n<r;n++){var o=e[n];o.closed||(o.next(t),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},y.prototype._error=function(t){for(var e=this.windows;0<e.length;)e.shift().error(t);this.destination.error(t)},y.prototype._complete=function(){for(var t=this.windows;0<t.length;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},y.prototype.openWindow=function(){var t=new h;return this.windows.push(t),this.destination.next(t),t},y.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},y);function y(t,e,r,n,o){var i=b.call(this,t)||this;i.destination=t,i.windowTimeSpan=e,i.windowCreationInterval=r,i.maxWindowSize=n,i.scheduler=o,i.windows=[];t=i.openWindow();return null!==r&&0<=r?(n={windowTimeSpan:e,windowCreationInterval:r,subscriber:i,scheduler:o},i.add(o.schedule(g,e,{subscriber:i,window:t,context:null})),i.add(o.schedule(m,r,n))):i.add(o.schedule(v,e,{subscriber:i,window:t,windowTimeSpan:e})),i}function v(t){var e=t.subscriber,r=t.windowTimeSpan,n=t.window;n&&e.closeWindow(n),t.window=e.openWindow(),this.schedule(t,r)}function m(t){var e=t.windowTimeSpan,r=t.subscriber,n=t.scheduler,o=t.windowCreationInterval,i=r.openWindow(),s={action:this,subscription:null};s.subscription=n.schedule(g,e,{subscriber:r,window:i,context:s}),this.add(s.subscription),this.schedule(t,o)}function g(t){var e=t.subscriber,r=t.window,t=t.context;t&&t.action&&t.subscription&&t.action.remove(t.subscription),e.closeWindow(r)}},{"../Subject":109,"../Subscriber":111,"../scheduler/async":263,"../util/isNumeric":283,"../util/isScheduler":287}],241:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var a=t("../Subject"),c=t("../Subscription"),i=t("../OuterSubscriber"),l=t("../util/subscribeToResult");r.windowToggle=function(e,r){return function(t){return t.lift(new s(e,r))}};var s=(u.prototype.call=function(t,e){return e.subscribe(new p(t,this.openings,this.closingSelector))},u);function u(t,e){this.openings=t,this.closingSelector=e}var f,p=(f=i.OuterSubscriber,o(h,f),h.prototype._next=function(t){var e=this.contexts;if(e)for(var r=e.length,n=0;n<r;n++)e[n].window.next(t)},h.prototype._error=function(t){var e=this.contexts;if(this.contexts=null,e)for(var r=e.length,n=-1;++n<r;){var o=e[n];o.window.error(t),o.subscription.unsubscribe()}f.prototype._error.call(this,t)},h.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,r=-1;++r<e;){var n=t[r];n.window.complete(),n.subscription.unsubscribe()}f.prototype._complete.call(this)},h.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,r=-1;++r<e;){var n=t[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},h.prototype.notifyNext=function(t,e,r,n,o){if(t===this.openings){var i=void 0;try{i=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var s=new a.Subject,u=new c.Subscription,e={window:s,subscription:u};this.contexts.push(e);i=l.subscribeToResult(this,i,e);i.closed?this.closeWindow(this.contexts.length-1):(i.context=e,u.add(i)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(t))},h.prototype.notifyError=function(t){this.error(t)},h.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},h.prototype.closeWindow=function(t){var e,r,n;-1!==t&&(r=(n=(e=this.contexts)[t]).window,n=n.subscription,e.splice(t,1),r.complete(),n.unsubscribe())},h);function h(t,e,r){t=f.call(this,t)||this;return t.openings=e,t.closingSelector=r,t.contexts=[],t.add(t.openSubscription=l.subscribeToResult(t,e,e)),t}},{"../OuterSubscriber":106,"../Subject":109,"../Subscription":112,"../util/subscribeToResult":296}],242:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subject"),s=t("../OuterSubscriber"),u=t("../util/subscribeToResult");r.windowWhen=function(e){return function(t){return t.lift(new a(e))}};var a=(c.prototype.call=function(t,e){return e.subscribe(new f(t,this.closingSelector))},c);function c(t){this.closingSelector=t}var l,f=(l=s.OuterSubscriber,o(p,l),p.prototype.notifyNext=function(t,e,r,n,o){this.openWindow(o)},p.prototype.notifyError=function(t){this._error(t)},p.prototype.notifyComplete=function(t){this.openWindow(t)},p.prototype._next=function(t){this.window.next(t)},p.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},p.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},p.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},p.prototype.openWindow=function(t){(t=void 0===t?null:t)&&(this.remove(t),t.unsubscribe());t=this.window;t&&t.complete();t=this.window=new i.Subject;this.destination.next(t);try{var e=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=u.subscribeToResult(this,e))},p);function p(t,e){var r=l.call(this,t)||this;return r.destination=t,r.closingSelector=e,r.openWindow(),r}},{"../OuterSubscriber":106,"../Subject":109,"../util/subscribeToResult":296}],243:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../OuterSubscriber"),u=t("../util/subscribeToResult");r.withLatestFrom=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return function(t){var e;"function"==typeof r[r.length-1]&&(e=r.pop());return t.lift(new s(r,e))}};var s=(a.prototype.call=function(t,e){return e.subscribe(new l(t,this.observables,this.project))},a);function a(t,e){this.observables=t,this.project=e}var c,l=(c=i.OuterSubscriber,o(f,c),f.prototype.notifyNext=function(t,e,r){this.values[r]=e;e=this.toRespond;0<e.length&&(-1!==(r=e.indexOf(r))&&e.splice(r,1))},f.prototype.notifyComplete=function(){},f.prototype._next=function(t){0===this.toRespond.length&&(t=[t].concat(this.values),this.project?this._tryProject(t):this.destination.next(t))},f.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)},f);function f(t,e,r){var n=c.call(this,t)||this;n.observables=e,n.project=r,n.toRespond=[];var o=e.length;n.values=new Array(o);for(var i=0;i<o;i++)n.toRespond.push(i);for(i=0;i<o;i++){var s=e[i];n.add(u.subscribeToResult(n,s,void 0,i))}return n}},{"../OuterSubscriber":106,"../util/subscribeToResult":296}],244:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/zip");r.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},{"../observable/zip":142}],245:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../observable/zip");r.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},{"../observable/zip":142}],246:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../Subscription");r.scheduleArray=function(n,o){return new i.Observable(function(t){var e=new s.Subscription,r=0;return e.add(o.schedule(function(){r!==n.length?(t.next(n[r++]),t.closed||e.add(this.schedule())):t.complete()})),e})}},{"../Observable":104,"../Subscription":112}],247:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable"),i=t("../Subscription"),s=t("../symbol/iterator");r.scheduleIterable=function(e,r){if(!e)throw new Error("Iterable cannot be null");return new n.Observable(function(n){var o,t=new i.Subscription;return t.add(function(){o&&"function"==typeof o.return&&o.return()}),t.add(r.schedule(function(){o=e[s.iterator](),t.add(r.schedule(function(){if(!n.closed){try{var t=o.next(),e=t.value,r=t.done}catch(t){return void n.error(t)}r?n.complete():(n.next(e),this.schedule())}}))})),t})}},{"../Observable":104,"../Subscription":112,"../symbol/iterator":265}],248:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Observable"),s=t("../Subscription"),u=t("../symbol/observable");r.scheduleObservable=function(n,o){return new i.Observable(function(e){var r=new s.Subscription;return r.add(o.schedule(function(){var t=n[u.observable]();r.add(t.subscribe({next:function(t){r.add(o.schedule(function(){return e.next(t)}))},error:function(t){r.add(o.schedule(function(){return e.error(t)}))},complete:function(){r.add(o.schedule(function(){return e.complete()}))}}))})),r})}},{"../Observable":104,"../Subscription":112,"../symbol/observable":266}],249:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../Observable"),i=t("../Subscription");r.schedulePromise=function(t,n){return new o.Observable(function(e){var r=new i.Subscription;return r.add(n.schedule(function(){return t.then(function(t){r.add(n.schedule(function(){e.next(t),r.add(n.schedule(function(){return e.complete()}))}))},function(t){r.add(n.schedule(function(){return e.error(t)}))})})),r})}},{"../Observable":104,"../Subscription":112}],250:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./scheduleObservable"),o=t("./schedulePromise"),i=t("./scheduleArray"),s=t("./scheduleIterable"),u=t("../util/isInteropObservable"),a=t("../util/isPromise"),c=t("../util/isArrayLike"),l=t("../util/isIterable");r.scheduled=function(t,e){if(null!=t){if(u.isInteropObservable(t))return n.scheduleObservable(t,e);if(a.isPromise(t))return o.schedulePromise(t,e);if(c.isArrayLike(t))return i.scheduleArray(t,e);if(l.isIterable(t)||"string"==typeof t)return s.scheduleIterable(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},{"../util/isArrayLike":278,"../util/isInteropObservable":281,"../util/isIterable":282,"../util/isPromise":286,"./scheduleArray":246,"./scheduleIterable":247,"./scheduleObservable":248,"./schedulePromise":249}],251:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("../Subscription"),o=(i=t.Subscription,o(s,i),s.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},s);function s(t,e){return i.call(this)||this}r.Action=o},{"../Subscription":112}],252:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncAction"),o=(i=t.AsyncAction,o(s,i),s.prototype.requestAsyncId=function(t,e,r){return null!==(r=void 0===r?0:r)&&0<r?i.prototype.requestAsyncId.call(this,t,e,r):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(function(){return t.flush(null)})))},s.prototype.recycleAsyncId=function(t,e,r){if(null!==(r=void 0===r?0:r)&&0<r||null===r&&0<this.delay)return i.prototype.recycleAsyncId.call(this,t,e,r);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)},s);function s(t,e){var r=i.call(this,t,e)||this;return r.scheduler=t,r.work=e,r}r.AnimationFrameAction=o},{"./AsyncAction":256}],253:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncScheduler"),o=(i=t.AsyncScheduler,o(s,i),s.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,o=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<o&&(t=r.shift()));if(this.active=!1,e){for(;++n<o&&(t=r.shift());)t.unsubscribe();throw e}},s);function s(){return null!==i&&i.apply(this,arguments)||this}r.AnimationFrameScheduler=o},{"./AsyncScheduler":257}],254:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../util/Immediate"),t=t("./AsyncAction"),o=(i=t.AsyncAction,o(u,i),u.prototype.requestAsyncId=function(t,e,r){return null!==(r=void 0===r?0:r)&&0<r?i.prototype.requestAsyncId.call(this,t,e,r):(t.actions.push(this),t.scheduled||(t.scheduled=s.Immediate.setImmediate(t.flush.bind(t,null))))},u.prototype.recycleAsyncId=function(t,e,r){if(null!==(r=void 0===r?0:r)&&0<r||null===r&&0<this.delay)return i.prototype.recycleAsyncId.call(this,t,e,r);0===t.actions.length&&(s.Immediate.clearImmediate(e),t.scheduled=void 0)},u);function u(t,e){var r=i.call(this,t,e)||this;return r.scheduler=t,r.work=e,r}r.AsapAction=o},{"../util/Immediate":270,"./AsyncAction":256}],255:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncScheduler"),o=(i=t.AsyncScheduler,o(s,i),s.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,o=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<o&&(t=r.shift()));if(this.active=!1,e){for(;++n<o&&(t=r.shift());)t.unsubscribe();throw e}},s);function s(){return null!==i&&i.apply(this,arguments)||this}r.AsapScheduler=o},{"./AsyncScheduler":257}],256:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./Action"),o=(i=t.Action,o(s,i),s.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var r=this.id,t=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(t,r,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(t,this.id,e),this},s.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),setInterval(t.flush.bind(t,this),r)},s.prototype.recycleAsyncId=function(t,e,r){if(null!==(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return e;clearInterval(e)},s.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;e=this._execute(t,e);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},s.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},s.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},s);function s(t,e){var r=i.call(this,t,e)||this;return r.scheduler=t,r.work=e,r.pending=!1,r}r.AsyncAction=o},{"./Action":251}],257:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("../Scheduler"),o=(i=s.Scheduler,o(u,i),u.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),u.delegate&&u.delegate!==this?u.delegate.schedule(t,e,r):i.prototype.schedule.call(this,t,e,r)},u.prototype.flush=function(t){var e,r=this.actions;if(this.active)r.push(t);else{this.active=!0;do{if(e=t.execute(t.state,t.delay))break}while(t=r.shift());if(this.active=!1,e){for(;t=r.shift();)t.unsubscribe();throw e}}},u);function u(t,e){void 0===e&&(e=s.Scheduler.now);var r=i.call(this,t,function(){return u.delegate&&u.delegate!==r?u.delegate.now():e()})||this;return r.actions=[],r.active=!1,r.scheduled=void 0,r}r.AsyncScheduler=o},{"../Scheduler":108}],258:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncAction"),o=(i=t.AsyncAction,o(s,i),s.prototype.schedule=function(t,e){return 0<(e=void 0===e?0:e)?i.prototype.schedule.call(this,t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)},s.prototype.execute=function(t,e){return 0<e||this.closed?i.prototype.execute.call(this,t,e):this._execute(t,e)},s.prototype.requestAsyncId=function(t,e,r){return null!==(r=void 0===r?0:r)&&0<r||null===r&&0<this.delay?i.prototype.requestAsyncId.call(this,t,e,r):t.flush(this)},s);function s(t,e){var r=i.call(this,t,e)||this;return r.scheduler=t,r.work=e,r}r.QueueAction=o},{"./AsyncAction":256}],259:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,t=t("./AsyncScheduler"),o=(i=t.AsyncScheduler,o(s,i),s);function s(){return null!==i&&i.apply(this,arguments)||this}r.QueueScheduler=o},{"./AsyncScheduler":257}],260:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i,s=t("./AsyncAction"),t=t("./AsyncScheduler"),t=(i=t.AsyncScheduler,o(u,i),u.prototype.flush=function(){for(var t,e,r=this.actions,n=this.maxFrames;(e=r[0])&&e.delay<=n&&(r.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=r.shift();)e.unsubscribe();throw t}},u.frameTimeFactor=10,u);function u(t,e){void 0===t&&(t=c),void 0===e&&(e=Number.POSITIVE_INFINITY);var r=i.call(this,t,function(){return r.frame})||this;return r.maxFrames=e,r.frame=0,r.index=-1,r}r.VirtualTimeScheduler=t;var a,c=(a=s.AsyncAction,o(l,a),l.prototype.schedule=function(t,e){if(void 0===e&&(e=0),!this.id)return a.prototype.schedule.call(this,t,e);this.active=!1;var r=new l(this.scheduler,this.work);return this.add(r),r.schedule(t,e)},l.prototype.requestAsyncId=function(t,e,r){this.delay=t.frame+(r=void 0===r?0:r);t=t.actions;return t.push(this),t.sort(l.sortActions),!0},l.prototype.recycleAsyncId=function(t,e,r){void 0===r&&(r=0)},l.prototype._execute=function(t,e){if(!0===this.active)return a.prototype._execute.call(this,t,e)},l.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},l);function l(t,e,r){void 0===r&&(r=t.index+=1);var n=a.call(this,t,e)||this;return n.scheduler=t,n.work=e,n.index=r,n.active=!0,n.index=t.index=r,n}r.VirtualAction=c},{"./AsyncAction":256,"./AsyncScheduler":257}],261:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./AnimationFrameAction"),t=t("./AnimationFrameScheduler");r.animationFrameScheduler=new t.AnimationFrameScheduler(n.AnimationFrameAction),r.animationFrame=r.animationFrameScheduler},{"./AnimationFrameAction":252,"./AnimationFrameScheduler":253}],262:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./AsapAction"),t=t("./AsapScheduler");r.asapScheduler=new t.AsapScheduler(n.AsapAction),r.asap=r.asapScheduler},{"./AsapAction":254,"./AsapScheduler":255}],263:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./AsyncAction"),t=t("./AsyncScheduler");r.asyncScheduler=new t.AsyncScheduler(n.AsyncAction),r.async=r.asyncScheduler},{"./AsyncAction":256,"./AsyncScheduler":257}],264:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./QueueAction"),t=t("./QueueScheduler");r.queueScheduler=new t.QueueScheduler(n.QueueAction),r.queue=r.queueScheduler},{"./QueueAction":258,"./QueueScheduler":259}],265:[function(t,e,r){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(r,"__esModule",{value:!0}),r.getSymbolIterator=n,r.iterator=n(),r.$$iterator=r.iterator},{}],266:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},{}],267:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),r.$$rxSubscriber=r.rxSubscriber},{}],268:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}r.ArgumentOutOfRangeError=n},{}],269:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}r.EmptyError=n},{}],270:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=1,o=Promise.resolve(),i={};function s(t){return t in i&&(delete i[t],!0)}r.Immediate={setImmediate:function(t){var e=n++;return i[e]=!0,o.then(function(){return s(e)&&t()}),e},clearImmediate:function(t){s(t)}},r.TestTools={pending:function(){return Object.keys(i).length}}},{}],271:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}r.ObjectUnsubscribedError=n},{}],272:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}r.TimeoutError=n},{}],273:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=(o.prototype=Object.create(Error.prototype),o);function o(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}r.UnsubscriptionError=n},{}],274:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../Subscriber");r.canReportError=function(t){for(;t;){var e=t.closed,r=t.destination,n=t.isStopped;if(e||n)return!1;t=r&&r instanceof o.Subscriber?r:null}return!0}},{"../Subscriber":111}],275:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hostReportError=function(t){setTimeout(function(){throw t},0)}},{}],276:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.identity=function(t){return t}},{}],277:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},{}],278:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isArrayLike=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},{}],279:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isDate=function(t){return t instanceof Date&&!isNaN(+t)}},{}],280:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isFunction=function(t){return"function"==typeof t}},{}],281:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../symbol/observable");r.isInteropObservable=function(t){return t&&"function"==typeof t[n.observable]}},{"../symbol/observable":266}],282:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../symbol/iterator");r.isIterable=function(t){return t&&"function"==typeof t[n.iterator]}},{"../symbol/iterator":265}],283:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./isArray");r.isNumeric=function(t){return!n.isArray(t)&&0<=t-parseFloat(t)+1}},{"./isArray":277}],284:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isObject=function(t){return null!==t&&"object"==typeof t}},{}],285:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Observable");r.isObservable=function(t){return!!t&&(t instanceof n.Observable||"function"==typeof t.lift&&"function"==typeof t.subscribe)}},{"../Observable":104}],286:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isPromise=function(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}},{}],287:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isScheduler=function(t){return t&&"function"==typeof t.schedule}},{}],288:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.noop=function(){}},{}],289:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.not=function(t,e){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=t,r.thisArg=e,r}},{}],290:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./identity");function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(t,e){return e(t)},t)}}r.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)},r.pipeFromArray=o},{"./identity":276}],291:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./subscribeToArray"),o=t("./subscribeToPromise"),i=t("./subscribeToIterable"),s=t("./subscribeToObservable"),u=t("./isArrayLike"),a=t("./isPromise"),c=t("./isObject"),l=t("../symbol/iterator"),f=t("../symbol/observable");r.subscribeTo=function(t){if(t&&"function"==typeof t[f.observable])return s.subscribeToObservable(t);if(u.isArrayLike(t))return n.subscribeToArray(t);if(a.isPromise(t))return o.subscribeToPromise(t);if(t&&"function"==typeof t[l.iterator])return i.subscribeToIterable(t);t=c.isObject(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},{"../symbol/iterator":265,"../symbol/observable":266,"./isArrayLike":278,"./isObject":284,"./isPromise":286,"./subscribeToArray":292,"./subscribeToIterable":293,"./subscribeToObservable":294,"./subscribeToPromise":295}],292:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.subscribeToArray=function(n){return function(t){for(var e=0,r=n.length;e<r&&!t.closed;e++)t.next(n[e]);t.complete()}}},{}],293:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("../symbol/iterator");r.subscribeToIterable=function(n){return function(e){for(var t=n[o.iterator]();;){var r=void 0;try{r=t.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof t.return&&e.add(function(){t.return&&t.return()}),e}}},{"../symbol/iterator":265}],294:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../symbol/observable");r.subscribeToObservable=function(r){return function(t){var e=r[n.observable]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)}}},{"../symbol/observable":266}],295:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./hostReportError");r.subscribeToPromise=function(t){return function(e){return t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,n.hostReportError),e}}},{"./hostReportError":275}],296:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=t("../InnerSubscriber"),s=t("./subscribeTo"),u=t("../Observable");r.subscribeToResult=function(t,e,r,n,o){if(!(o=void 0===o?new i.InnerSubscriber(t,r,n):o).closed)return e instanceof u.Observable?e.subscribe(o):s.subscribeTo(e)(o)}},{"../InnerSubscriber":102,"../Observable":104,"./subscribeTo":291}],297:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Subscriber"),o=t("../symbol/rxSubscriber"),i=t("../Observer");r.toSubscriber=function(t,e,r){if(t){if(t instanceof n.Subscriber)return t;if(t[o.rxSubscriber])return t[o.rxSubscriber]()}return t||e||r?new n.Subscriber(t,e,r):new n.Subscriber(i.empty)}},{"../Observer":105,"../Subscriber":111,"../symbol/rxSubscriber":267}],298:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../internal/operators/audit");r.audit=n.audit;n=t("../internal/operators/auditTime");r.auditTime=n.auditTime;n=t("../internal/operators/buffer");r.buffer=n.buffer;n=t("../internal/operators/bufferCount");r.bufferCount=n.bufferCount;n=t("../internal/operators/bufferTime");r.bufferTime=n.bufferTime;n=t("../internal/operators/bufferToggle");r.bufferToggle=n.bufferToggle;n=t("../internal/operators/bufferWhen");r.bufferWhen=n.bufferWhen;n=t("../internal/operators/catchError");r.catchError=n.catchError;n=t("../internal/operators/combineAll");r.combineAll=n.combineAll;n=t("../internal/operators/combineLatest");r.combineLatest=n.combineLatest;n=t("../internal/operators/concat");r.concat=n.concat;n=t("../internal/operators/concatAll");r.concatAll=n.concatAll;n=t("../internal/operators/concatMap");r.concatMap=n.concatMap;n=t("../internal/operators/concatMapTo");r.concatMapTo=n.concatMapTo;n=t("../internal/operators/count");r.count=n.count;n=t("../internal/operators/debounce");r.debounce=n.debounce;n=t("../internal/operators/debounceTime");r.debounceTime=n.debounceTime;n=t("../internal/operators/defaultIfEmpty");r.defaultIfEmpty=n.defaultIfEmpty;n=t("../internal/operators/delay");r.delay=n.delay;n=t("../internal/operators/delayWhen");r.delayWhen=n.delayWhen;n=t("../internal/operators/dematerialize");r.dematerialize=n.dematerialize;n=t("../internal/operators/distinct");r.distinct=n.distinct;n=t("../internal/operators/distinctUntilChanged");r.distinctUntilChanged=n.distinctUntilChanged;n=t("../internal/operators/distinctUntilKeyChanged");r.distinctUntilKeyChanged=n.distinctUntilKeyChanged;n=t("../internal/operators/elementAt");r.elementAt=n.elementAt;n=t("../internal/operators/endWith");r.endWith=n.endWith;n=t("../internal/operators/every");r.every=n.every;n=t("../internal/operators/exhaust");r.exhaust=n.exhaust;n=t("../internal/operators/exhaustMap");r.exhaustMap=n.exhaustMap;n=t("../internal/operators/expand");r.expand=n.expand;n=t("../internal/operators/filter");r.filter=n.filter;n=t("../internal/operators/finalize");r.finalize=n.finalize;n=t("../internal/operators/find");r.find=n.find;n=t("../internal/operators/findIndex");r.findIndex=n.findIndex;n=t("../internal/operators/first");r.first=n.first;n=t("../internal/operators/groupBy");r.groupBy=n.groupBy;n=t("../internal/operators/ignoreElements");r.ignoreElements=n.ignoreElements;n=t("../internal/operators/isEmpty");r.isEmpty=n.isEmpty;n=t("../internal/operators/last");r.last=n.last;n=t("../internal/operators/map");r.map=n.map;n=t("../internal/operators/mapTo");r.mapTo=n.mapTo;n=t("../internal/operators/materialize");r.materialize=n.materialize;n=t("../internal/operators/max");r.max=n.max;n=t("../internal/operators/merge");r.merge=n.merge;n=t("../internal/operators/mergeAll");r.mergeAll=n.mergeAll;n=t("../internal/operators/mergeMap");r.mergeMap=n.mergeMap,r.flatMap=n.flatMap;n=t("../internal/operators/mergeMapTo");r.mergeMapTo=n.mergeMapTo;n=t("../internal/operators/mergeScan");r.mergeScan=n.mergeScan;n=t("../internal/operators/min");r.min=n.min;n=t("../internal/operators/multicast");r.multicast=n.multicast;n=t("../internal/operators/observeOn");r.observeOn=n.observeOn;n=t("../internal/operators/onErrorResumeNext");r.onErrorResumeNext=n.onErrorResumeNext;n=t("../internal/operators/pairwise");r.pairwise=n.pairwise;n=t("../internal/operators/partition");r.partition=n.partition;n=t("../internal/operators/pluck");r.pluck=n.pluck;n=t("../internal/operators/publish");r.publish=n.publish;n=t("../internal/operators/publishBehavior");r.publishBehavior=n.publishBehavior;n=t("../internal/operators/publishLast");r.publishLast=n.publishLast;n=t("../internal/operators/publishReplay");r.publishReplay=n.publishReplay;n=t("../internal/operators/race");r.race=n.race;n=t("../internal/operators/reduce");r.reduce=n.reduce;n=t("../internal/operators/repeat");r.repeat=n.repeat;n=t("../internal/operators/repeatWhen");r.repeatWhen=n.repeatWhen;n=t("../internal/operators/retry");r.retry=n.retry;n=t("../internal/operators/retryWhen");r.retryWhen=n.retryWhen;n=t("../internal/operators/refCount");r.refCount=n.refCount;n=t("../internal/operators/sample");r.sample=n.sample;n=t("../internal/operators/sampleTime");r.sampleTime=n.sampleTime;n=t("../internal/operators/scan");r.scan=n.scan;n=t("../internal/operators/sequenceEqual");r.sequenceEqual=n.sequenceEqual;n=t("../internal/operators/share");r.share=n.share;n=t("../internal/operators/shareReplay");r.shareReplay=n.shareReplay;n=t("../internal/operators/single");r.single=n.single;n=t("../internal/operators/skip");r.skip=n.skip;n=t("../internal/operators/skipLast");r.skipLast=n.skipLast;n=t("../internal/operators/skipUntil");r.skipUntil=n.skipUntil;n=t("../internal/operators/skipWhile");r.skipWhile=n.skipWhile;n=t("../internal/operators/startWith");r.startWith=n.startWith;n=t("../internal/operators/subscribeOn");r.subscribeOn=n.subscribeOn;n=t("../internal/operators/switchAll");r.switchAll=n.switchAll;n=t("../internal/operators/switchMap");r.switchMap=n.switchMap;n=t("../internal/operators/switchMapTo");r.switchMapTo=n.switchMapTo;n=t("../internal/operators/take");r.take=n.take;n=t("../internal/operators/takeLast");r.takeLast=n.takeLast;n=t("../internal/operators/takeUntil");r.takeUntil=n.takeUntil;n=t("../internal/operators/takeWhile");r.takeWhile=n.takeWhile;n=t("../internal/operators/tap");r.tap=n.tap;n=t("../internal/operators/throttle");r.throttle=n.throttle;n=t("../internal/operators/throttleTime");r.throttleTime=n.throttleTime;n=t("../internal/operators/throwIfEmpty");r.throwIfEmpty=n.throwIfEmpty;n=t("../internal/operators/timeInterval");r.timeInterval=n.timeInterval;n=t("../internal/operators/timeout");r.timeout=n.timeout;n=t("../internal/operators/timeoutWith");r.timeoutWith=n.timeoutWith;n=t("../internal/operators/timestamp");r.timestamp=n.timestamp;n=t("../internal/operators/toArray");r.toArray=n.toArray;n=t("../internal/operators/window");r.window=n.window;n=t("../internal/operators/windowCount");r.windowCount=n.windowCount;n=t("../internal/operators/windowTime");r.windowTime=n.windowTime;n=t("../internal/operators/windowToggle");r.windowToggle=n.windowToggle;n=t("../internal/operators/windowWhen");r.windowWhen=n.windowWhen;n=t("../internal/operators/withLatestFrom");r.withLatestFrom=n.withLatestFrom;n=t("../internal/operators/zip");r.zip=n.zip;t=t("../internal/operators/zipAll");r.zipAll=t.zipAll},{"../internal/operators/audit":143,"../internal/operators/auditTime":144,"../internal/operators/buffer":145,"../internal/operators/bufferCount":146,"../internal/operators/bufferTime":147,"../internal/operators/bufferToggle":148,"../internal/operators/bufferWhen":149,"../internal/operators/catchError":150,"../internal/operators/combineAll":151,"../internal/operators/combineLatest":152,"../internal/operators/concat":153,"../internal/operators/concatAll":154,"../internal/operators/concatMap":155,"../internal/operators/concatMapTo":156,"../internal/operators/count":157,"../internal/operators/debounce":158,"../internal/operators/debounceTime":159,"../internal/operators/defaultIfEmpty":160,"../internal/operators/delay":161,"../internal/operators/delayWhen":162,"../internal/operators/dematerialize":163,"../internal/operators/distinct":164,"../internal/operators/distinctUntilChanged":165,"../internal/operators/distinctUntilKeyChanged":166,"../internal/operators/elementAt":167,"../internal/operators/endWith":168,"../internal/operators/every":169,"../internal/operators/exhaust":170,"../internal/operators/exhaustMap":171,"../internal/operators/expand":172,"../internal/operators/filter":173,"../internal/operators/finalize":174,"../internal/operators/find":175,"../internal/operators/findIndex":176,"../internal/operators/first":177,"../internal/operators/groupBy":178,"../internal/operators/ignoreElements":179,"../internal/operators/isEmpty":180,"../internal/operators/last":181,"../internal/operators/map":182,"../internal/operators/mapTo":183,"../internal/operators/materialize":184,"../internal/operators/max":185,"../internal/operators/merge":186,"../internal/operators/mergeAll":187,"../internal/operators/mergeMap":188,"../internal/operators/mergeMapTo":189,"../internal/operators/mergeScan":190,"../internal/operators/min":191,"../internal/operators/multicast":192,"../internal/operators/observeOn":193,"../internal/operators/onErrorResumeNext":194,"../internal/operators/pairwise":195,"../internal/operators/partition":196,"../internal/operators/pluck":197,"../internal/operators/publish":198,"../internal/operators/publishBehavior":199,"../internal/operators/publishLast":200,"../internal/operators/publishReplay":201,"../internal/operators/race":202,"../internal/operators/reduce":203,"../internal/operators/refCount":204,"../internal/operators/repeat":205,"../internal/operators/repeatWhen":206,"../internal/operators/retry":207,"../internal/operators/retryWhen":208,"../internal/operators/sample":209,"../internal/operators/sampleTime":210,"../internal/operators/scan":211,"../internal/operators/sequenceEqual":212,"../internal/operators/share":213,"../internal/operators/shareReplay":214,"../internal/operators/single":215,"../internal/operators/skip":216,"../internal/operators/skipLast":217,"../internal/operators/skipUntil":218,"../internal/operators/skipWhile":219,"../internal/operators/startWith":220,"../internal/operators/subscribeOn":221,"../internal/operators/switchAll":222,"../internal/operators/switchMap":223,"../internal/operators/switchMapTo":224,"../internal/operators/take":225,"../internal/operators/takeLast":226,"../internal/operators/takeUntil":227,"../internal/operators/takeWhile":228,"../internal/operators/tap":229,"../internal/operators/throttle":230,"../internal/operators/throttleTime":231,"../internal/operators/throwIfEmpty":232,"../internal/operators/timeInterval":233,"../internal/operators/timeout":234,"../internal/operators/timeoutWith":235,"../internal/operators/timestamp":236,"../internal/operators/toArray":237,"../internal/operators/window":238,"../internal/operators/windowCount":239,"../internal/operators/windowTime":240,"../internal/operators/windowToggle":241,"../internal/operators/windowWhen":242,"../internal/operators/withLatestFrom":243,"../internal/operators/zip":244,"../internal/operators/zipAll":245}],299:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,o=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===o||!o(t)))throw new Error("Unknown encoding: "+t);return e||t}function s(t){var e;switch(this.encoding=i(t),this.encoding){case"utf16le":this.text=c,this.end=l,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=p,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function u(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e,r,n=this.lastTotal-this.lastNeed,e=(e=this,128!=(192&(r=t)[0])?(e.lastNeed=0,"�"):1<e.lastNeed&&1<r.length?128!=(192&r[1])?(e.lastNeed=1,"�"):2<e.lastNeed&&2<r.length&&128!=(192&r[2])?(e.lastNeed=2,"�"):void 0:void 0);return void 0!==e?e:this.lastNeed<=t.length?(t.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,n,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1);var r=t.toString("utf16le",e);if(r){e=r.charCodeAt(r.length-1);if(55296<=e&&e<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){t=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,t)}return e}function f(t,e){var r=(t.length-e)%3;return 0==r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function p(t){t=t&&t.length?this.write(t):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}(r.StringDecoder=s).prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},s.prototype.end=function(t){t=t&&t.length?this.write(t):"";return this.lastNeed?t+"�":t},s.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var o=u(e[n]);if(0<=o)return 0<o&&(t.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=u(e[n])))return 0<o&&(t.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=u(e[n])))return 0<o&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;r=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":300}],300:[function(t,e,r){var n=t("buffer"),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return o(t,e,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,r),r.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");t=o(t);return void 0!==e?"string"==typeof r?t.fill(e,r):t.fill(e):t.fill(0),t},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:97}],301:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.WRITE=r.READ=r.Driver=void 0;var o=n(t("@babel/runtime/helpers/classCallCheck")),i=n(t("@babel/runtime/helpers/createClass")),s=n(t("@babel/runtime/helpers/inherits")),u=n(t("@babel/runtime/helpers/possibleConstructorReturn")),a=n(t("@babel/runtime/helpers/getPrototypeOf")),c=t("neo4j-driver-core"),l=n(t("./session-rx"));function f(r){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=(0,a.default)(r);return e=n?(t=(0,a.default)(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),(0,u.default)(this,e)}}var p=c.internal.constants.FETCH_ALL,t=c.driver.READ,h=c.driver.WRITE;r.WRITE=h,r.READ=t;c=function(t){(0,s.default)(r,t);var e=f(r);function r(){return(0,o.default)(this,r),e.apply(this,arguments)}return(0,i.default)(r,[{key:"rxSession",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.defaultAccessMode,r=t.bookmarks,n=t.database,o=t.fetchSize,t=t.impersonatedUser;return new l.default({session:this._newSession({defaultAccessMode:void 0===e?h:e,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:t,reactive:!0,fetchSize:function(t,e){t=parseInt(t,10);{if(0<t||t===p)return t;if(0===t||t<0)throw new Error("The fetch size can only be a positive value or ".concat(p," for ALL. However fetchSize = ").concat(t));return e}}(o,this._config.fetchSize)}),config:this._config})}}]),r}(c.Driver);r.Driver=c,r.default=c},{"./session-rx":305,"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/getPrototypeOf":90,"@babel/runtime/helpers/inherits":91,"@babel/runtime/helpers/interopRequireDefault":92,"@babel/runtime/helpers/possibleConstructorReturn":93,"neo4j-driver-core":59}],302:[function(m,t,g){!function(v){!function(){"use strict";var t=m("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(g,"__esModule",{value:!0}),g.driver=o,Object.defineProperty(g,"Neo4jError",{enumerable:!0,get:function(){return r.Neo4jError}}),Object.defineProperty(g,"error",{enumerable:!0,get:function(){return r.error}}),Object.defineProperty(g,"int",{enumerable:!0,get:function(){return r.int}}),Object.defineProperty(g,"isInt",{enumerable:!0,get:function(){return r.isInt}}),Object.defineProperty(g,"isPoint",{enumerable:!0,get:function(){return r.isPoint}}),Object.defineProperty(g,"isDate",{enumerable:!0,get:function(){return r.isDate}}),Object.defineProperty(g,"isDateTime",{enumerable:!0,get:function(){return r.isDateTime}}),Object.defineProperty(g,"isDuration",{enumerable:!0,get:function(){return r.isDuration}}),Object.defineProperty(g,"isLocalDateTime",{enumerable:!0,get:function(){return r.isLocalDateTime}}),Object.defineProperty(g,"isLocalTime",{enumerable:!0,get:function(){return r.isLocalTime}}),Object.defineProperty(g,"isTime",{enumerable:!0,get:function(){return r.isTime}}),Object.defineProperty(g,"auth",{enumerable:!0,get:function(){return r.auth}}),g.default=g.temporal=g.spatial=g.session=g.types=g.logging=g.integer=void 0;var a=m("./driver"),e=t(m("./version")),r=m("neo4j-driver-core"),c=m("neo4j-driver-bolt-connection"),n=r.internal.util,l=n.ENCRYPTION_ON,f=(n.ENCRYPTION_OFF,n.assertString),p=n.isEmptyObjectOrNull,h=r.internal.serverAddress.ServerAddress,d=r.internal.urlUtil;function o(t,o){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};f(t,"Bolt URL");var r,i=d.parseDatabaseUrl(t),n=!1,s=!1;switch(i.scheme){case"bolt":break;case"bolt+s":s=!0,r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":s=!0,r="TRUST_ALL_CERTIFICATES";break;case"neo4j":n=!0;break;case"neo4j+s":r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",n=s=!0;break;case"neo4j+ssc":r="TRUST_ALL_CERTIFICATES",n=s=!0;break;default:throw new Error("Unknown scheme: ".concat(i.scheme))}if(s){if("encrypted"in e||"trust"in e)throw new Error("Encryption/trust can only be configured either through URL or config, not both");e.encrypted=l,e.trust=r}(o=o||{}).scheme=o.scheme||"none",e.userAgent=e.userAgent||b;var u=h.fromUrl(i.hostAndPort);return new a.Driver({address:u,typename:n?"Routing":"Direct",routing:n},e,function(){{if(n)return function(t,e,r,n){return new c.RoutingConnectionProvider({id:t,config:e,log:r,hostNameResolver:n,authToken:o,address:u,userAgent:e.userAgent,routingContext:i.query})};if(!p(i.query))throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(t,"'"));return function(t,e,r){return new c.DirectConnectionProvider({id:t,config:e,log:r,authToken:o,address:u,userAgent:e.userAgent})}}}())}var i,b="neo4j-javascript/"+e.default,s={console:(i=function(t){return{level:t,logger:function(t,e){return console.log("".concat(v.Date.now()," ").concat(t.toUpperCase()," ").concat(e))}}},u.toString=function(){return i.toString()},u)};function u(t){return i.apply(this,arguments)}g.logging=s;var _={Node:r.Node,Relationship:r.Relationship,UnboundRelationship:r.UnboundRelationship,PathSegment:r.PathSegment,Path:r.Path,Result:r.Result,ResultSummary:r.ResultSummary,Record:r.Record,Point:r.Point,Date:r.Date,DateTime:r.DateTime,Duration:r.Duration,LocalDateTime:r.LocalDateTime,LocalTime:r.LocalTime,Time:r.Time,Integer:r.Integer};g.types=_;var y={READ:a.READ,WRITE:a.WRITE};g.session=y;t={toNumber:r.toNumber,toString:r.toString,inSafeRange:r.inSafeRange};g.integer=t;n={isPoint:r.isPoint};g.spatial=n;e={isDuration:r.isDuration,isLocalTime:r.isLocalTime,isTime:r.isTime,isDate:r.isDate,isLocalDateTime:r.isLocalDateTime,isDateTime:r.isDateTime};g.temporal=e;e={driver:o,int:r.int,isInt:r.isInt,isPoint:r.isPoint,isDuration:r.isDuration,isLocalTime:r.isLocalTime,isTime:r.isTime,isDate:r.isDate,isLocalDateTime:r.isLocalDateTime,isDateTime:r.isDateTime,integer:t,Neo4jError:r.Neo4jError,auth:r.auth,logging:s,types:_,session:y,error:r.error,spatial:n,temporal:e};g.default=e}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./driver":301,"./version":307,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-bolt-connection":38,"neo4j-driver-core":59}],303:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=n(t("@babel/runtime/helpers/classCallCheck")),o=n(t("@babel/runtime/helpers/createClass")),u=t("neo4j-driver-core"),a=t("rxjs"),c=t("rxjs/operators"),l=(u.internal.logger.Logger,u.internal.retryStrategy.canRetryOn),f=u.error.SERVICE_UNAVAILABLE,p=(u.error.SESSION_EXPIRED,3e4),h=1e3,d=2,b=.2;function _(t,e){return t||0===t?t:e}r.default=function(){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.maxRetryTimeout,r=void 0===e?p:e,n=t.initialDelay,o=void 0===n?h:n,e=t.delayMultiplier,n=void 0===e?d:e,e=t.delayJitter,e=void 0===e?b:e,t=t.logger,t=void 0===t?null:t;(0,s.default)(this,i),this._maxRetryTimeout=_(r,p),this._initialDelay=_(o,h),this._delayMultiplier=_(n,d),this._delayJitter=_(e,b),this._logger=t}return(0,o.default)(i,[{key:"retry",value:function(t){var s=this;return t.pipe((0,c.retryWhen)(function(t){var r=[],n=Date.now(),o=1,i=s._initialDelay;return t.pipe((0,c.flatMap)(function(t){if(!l(t))return(0,a.throwError)(t);if(r.push(t),2<=o&&Date.now()-n>=s._maxRetryTimeout){var e=(0,u.newError)("Failed after retried for ".concat(o," times in ").concat(s._maxRetryTimeout," ms. Make sure that your database is online and retry again."),f);return e.seenErrors=r,(0,a.throwError)(e)}e=s._computeNextDelay(i);return i*=s._delayMultiplier,o++,s._logger&&s._logger.warn("Transaction failed and will be retried in ".concat(e)),(0,a.of)(1).pipe((0,c.delay)(e))}))}))}},{key:"_computeNextDelay",value:function(t){var e=t*this._delayJitter;return t-e+2*e*Math.random()}}]),i}()},{"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-core":59,rxjs:99,"rxjs/operators":298}],304:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("@babel/runtime/helpers/classCallCheck")),i=n(t("@babel/runtime/helpers/createClass")),s=t("neo4j-driver-core"),u=t("rxjs"),a=t("rxjs/operators"),c={READY:0,STREAMING:1,COMPLETED:2};r.default=function(){function e(t){(0,o.default)(this,e);t=t.pipe((0,a.publishReplay)(1),(0,a.refCount)());this._result=t,this._keys=t.pipe((0,a.flatMap)(function(t){return(0,u.from)(t.keys())}),(0,a.publishReplay)(1),(0,a.refCount)()),this._records=new u.Subject,this._summary=new u.ReplaySubject,this._state=c.READY}return(0,i.default)(e,[{key:"keys",value:function(){return this._keys}},{key:"records",value:function(){var r=this;return this._result.pipe((0,a.flatMap)(function(e){return new u.Observable(function(t){return r._startStreaming({result:e,recordsObserver:t})})}))}},{key:"consume",value:function(){var r=this;return this._result.pipe((0,a.flatMap)(function(e){return new u.Observable(function(t){return r._startStreaming({result:e,summaryObserver:t})})}))}},{key:"_startStreaming",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=t.result,n=t.recordsObserver,n=void 0===n?null:n,t=t.summaryObserver,t=void 0===t?null:t,o=[];return t&&o.push(this._summary.subscribe(t)),this._state<c.STREAMING?(this._state=c.STREAMING,n&&o.push(this._records.subscribe(n)),o.push({unsubscribe:function(){r._cancel&&r._cancel()}}),0===this._records.observers.length&&r._cancel(),r.subscribe({onNext:function(t){e._records.next(t)},onCompleted:function(t){e._records.complete(),e._summary.next(t),e._summary.complete(),e._state=c.COMPLETED},onError:function(t){e._records.error(t),e._summary.error(t),e._state=c.COMPLETED}})):n&&n.error((0,s.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){o.forEach(function(t){return t.unsubscribe()})}}}]),e}()},{"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-core":59,rxjs:99,"rxjs/operators":298}],305:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("@babel/runtime/helpers/classCallCheck")),i=n(t("@babel/runtime/helpers/createClass")),s=t("rxjs"),u=t("rxjs/operators"),a=n(t("./result-rx")),c=t("neo4j-driver-core"),l=n(t("./transaction-rx")),f=n(t("./internal/retry-logic-rx")),t=c.internal.constants,p=t.ACCESS_MODE_READ,h=t.ACCESS_MODE_WRITE,d=c.internal.txConfig.TxConfig;r.default=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.session,t=t.config;(0,o.default)(this,r),this._session=e,this._retryLogic=function(t){t=t&&t.maxTransactionRetryTime?t.maxTransactionRetryTime:null;return new f.default({maxRetryTimeout:t})}(t)}return(0,i.default)(r,[{key:"run",value:function(t,r,n){var o=this;return new a.default(new s.Observable(function(e){try{e.next(o._session.run(t,r,n)),e.complete()}catch(t){e.error(t)}return function(){}}))}},{key:"beginTransaction",value:function(t){return this._beginTransaction(this._session._mode,t)}},{key:"readTransaction",value:function(t,e){return this._runTransaction(p,t,e)}},{key:"writeTransaction",value:function(t,e){return this._runTransaction(h,t,e)}},{key:"close",value:function(){var t=this;return new s.Observable(function(e){t._session.close().then(function(){e.complete()}).catch(function(t){return e.error(t)})})}},{key:"lastBookmark",value:function(){return this._session.lastBookmark()}},{key:"_beginTransaction",value:function(t,e){var r=this,n=d.empty();return e&&(n=new d(e)),new s.Observable(function(e){try{e.next(new l.default(r._session._beginTransaction(t,n))),e.complete()}catch(t){e.error(t)}return function(){}})}},{key:"_runTransaction",value:function(t,r,e){d.empty();return e&&new d(e),this._retryLogic.retry(this._beginTransaction(t,e).pipe((0,u.flatMap)(function(e){return(0,s.defer)(function(){try{return r(e)}catch(t){return(0,s.throwError)(t)}}).pipe((0,u.catchError)(function(t){return e.rollback().pipe((0,u.concat)((0,s.throwError)(t)))}),(0,u.concat)(e.commit()))})))}}]),r}()},{"./internal/retry-logic-rx":303,"./result-rx":304,"./transaction-rx":306,"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-core":59,rxjs:99,"rxjs/operators":298}],306:[function(t,e,r){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("@babel/runtime/helpers/classCallCheck")),i=n(t("@babel/runtime/helpers/createClass")),s=t("rxjs"),u=n(t("./result-rx"));n(t("neo4j-driver-core"));r.default=function(){function e(t){(0,o.default)(this,e),this._txc=t}return(0,i.default)(e,[{key:"run",value:function(t,r){var n=this;return new u.default(new s.Observable(function(e){try{e.next(n._txc.run(t,r)),e.complete()}catch(t){e.error(t)}return function(){}}))}},{key:"commit",value:function(){var t=this;return new s.Observable(function(e){t._txc.commit().then(function(){e.complete()}).catch(function(t){return e.error(t)})})}},{key:"rollback",value:function(){var t=this;return new s.Observable(function(e){t._txc.rollback().then(function(){e.complete()}).catch(function(t){return e.error(t)})})}},{key:"close",value:function(){var t=this;return new s.Observable(function(e){t._txc.close().then(function(){e.complete()}).catch(function(t){return e.error(t)})})}}]),e}()},{"./result-rx":304,"@babel/runtime/helpers/classCallCheck":88,"@babel/runtime/helpers/createClass":89,"@babel/runtime/helpers/interopRequireDefault":92,"neo4j-driver-core":59,rxjs:99}],307:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default="4.4.5"},{}]},{},[302])(302)});