neo4j-driver 5.26.0 → 5.27.0
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(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).neo4j=t()}(this,function(){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L={},U={},e={},t={},n={},o={},F=(Object.defineProperty(o,"__esModule",{value:!0}),o.getBrokenObjectReason=o.isBrokenObject=o.createBrokenObject=void 0,"__isBrokenObject__"),B="__reason__";o.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===F||(t===B?r:void("toJSON"!==t&&n()))},set:n,apply:n,construct:n,defineProperty:n,deleteProperty:n,getOwnPropertyDescriptor:n,getPrototypeOf:n,has:n,isExtensible:n,ownKeys:n,preventExtensions:n,setPrototypeOf:n})},o.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[F]},o.getBrokenObjectReason=function(e){return e[B]},Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=void 0;var W=o;n.stringify=function(e,r){return JSON.stringify(e,function(e,t){return(0,W.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,W.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):!0!==(null==r?void 0:r.useCustomToString)||"object"!=typeof t||Array.isArray(t)||"function"!=typeof t.toString||t.toString===Object.prototype.toString?t:null==t?void 0:t.toString()})};var q,z,V={},i=(i=V,Object.defineProperty(i,"__esModule",{value:!0}),i.rawPolyfilledDiagnosticRecord=void 0,i.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(i.rawPolyfilledDiagnosticRecord),r&&r.__extends||(q=function(e,t){return(q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}q(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),H=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),G=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Y=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&H(t,e,r);return G(t,e),t},K=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.GQLError=t.Neo4jError=t.isRetriableError=t.newGQLError=t.newError=void 0,Y(n)),Z=V,Y={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"},Q=(Object.freeze(Y),Object.values(Y)),X="ServiceUnavailable",J=(t.SERVICE_UNAVAILABLE=X,"SessionExpired"),$=(t.SESSION_EXPIRED=J,t.PROTOCOL_ERROR="ProtocolError",z=Error,i(ee,z),Object.defineProperty(ee.prototype,"diagnosticRecordAsJsonString",{get:function(){return K.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),ee);function ee(e,t,r,n,o){var i=this;return(i=z.call(this,e,null!=o?{cause:o}:void 0)||this).constructor=ee,i.__proto__=ee.prototype,i.cause=null!=o?o:void 0,i.gqlStatus=t,i.gqlStatusDescription=r,i.diagnosticRecord=n,i.classification=void 0!==(e=i.diagnosticRecord)&&void 0!==e._classification&&Q.includes(e._classification)?null==e?void 0:e._classification:"UNKNOWN",i.rawClassification=null!=(o=null==n?void 0:n._classification)?o:void 0,i.name="GQLError",i}t.GQLError=$;i(ne,te=$),ne.isRetriable=function(e){return null!=e&&e instanceof ne&&e.retriable};var te,re=ne;function ne(e,t,r,n,o,i){e=te.call(this,e,r,n,o,i)||this;return e.constructor=ne,e.__proto__=ne.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===X||r===J||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=re,t.newError=function(e,t,r,n,o,i){return new re(e,null!=t?t:"N/A",null!=n?n:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:Z.rawPolyfilledDiagnosticRecord,r)},t.newGQLError=function(e,t,r,n,o){return new $(e,null!=r?r:"50N42",null!=n?n:"error: general processing exception - unexpected error. "+e,null!=o?o:Z.rawPolyfilledDiagnosticRecord,t)};Y=re.isRetriable;t.isRetriableError=Y;var i={},oe=(Object.defineProperty(i,"__esModule",{value:!0}),i.toString=i.toNumber=i.inSafeRange=i.isInt=i.int=void 0,t),ie=new Map,Y=(d.prototype.inSafeRange=function(){return this.greaterThanOrEqual(d.MIN_SAFE_VALUE)&&this.lessThanOrEqual(d.MAX_SAFE_VALUE)},d.prototype.toInt=function(){return this.low},d.prototype.toNumber=function(){return this.high*pe+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(pe)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(pe)+BigInt(e.low>>>0)))},d.prototype.toNumberOrInfinity=function(){return this.lessThan(d.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(d.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},d.prototype.toString=function(e){if((e=null!=e?e:10)<2||36<e)throw RangeError("radix out of range: "+e.toString());if(this.isZero())return"0";var t,r,n;if(this.isNegative())return this.equals(d.MIN_VALUE)?(t=d.fromNumber(e),n=(r=this.div(t)).multiply(t).subtract(this),r.toString(e)+n.toInt().toString(e)):"-"+this.negate().toString(e);for(var o=d.fromNumber(Math.pow(e,6)),i=(n=this,"");;){var u=n.div(o),a=(n.subtract(u.multiply(o)).toInt()>>>0).toString(e);if((n=u).isZero())return a+i;for(;a.length<6;)a="0"+a;i=""+a+i}},d.prototype.valueOf=function(){return this.toBigInt()},d.prototype.getHighBits=function(){return this.high},d.prototype.getLowBits=function(){return this.low},d.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(d.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,t=0,t=31;0<t&&0==(e&1<<t);t--);return 0!==this.high?t+33:t+1},d.prototype.isZero=function(){return 0===this.high&&0===this.low},d.prototype.isNegative=function(){return this.high<0},d.prototype.isPositive=function(){return 0<=this.high},d.prototype.isOdd=function(){return 1==(1&this.low)},d.prototype.isEven=function(){return 0==(1&this.low)},d.prototype.equals=function(e){e=d.fromValue(e);return this.high===e.high&&this.low===e.low},d.prototype.notEquals=function(e){return!this.equals(e)},d.prototype.lessThan=function(e){return this.compare(e)<0},d.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},d.prototype.greaterThan=function(e){return 0<this.compare(e)},d.prototype.greaterThanOrEqual=function(e){return 0<=this.compare(e)},d.prototype.compare=function(e){e=d.fromValue(e);if(this.equals(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r||(t||!r)&&this.subtract(e).isNegative()?-1:1},d.prototype.negate=function(){return this.equals(d.MIN_VALUE)?d.MIN_VALUE:this.not().add(d.ONE)},d.prototype.add=function(e){var e=d.fromValue(e),t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,s=0,c=0,l=0,f=0;return c+=(l=l+((f+=o+(65535&e.low))>>>16)+(n+a))>>>16,d.fromBits((l&=65535)<<16|(f&=65535),((s+=(c+=r+u)>>>16)+(t+i)&65535)<<16|(c&=65535))},d.prototype.subtract=function(e){e=d.fromValue(e);return this.add(e.negate())},d.prototype.multiply=function(e){if(this.isZero())return d.ZERO;e=d.fromValue(e);if(e.isZero())return d.ZERO;if(this.equals(d.MIN_VALUE))return e.isOdd()?d.MIN_VALUE:d.ZERO;if(e.equals(d.MIN_VALUE))return this.isOdd()?d.MIN_VALUE:d.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(he)&&e.lessThan(he))return d.fromNumber(this.toNumber()*e.toNumber());var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,e=65535&e.low,s=0,c=0,l=0,f=(f=0)+((c=c+((l+=o*e)>>>16)+n*e)>>>16)+((c=(c&65535)+o*a)>>>16);return d.fromBits((c&=65535)<<16|(l&=65535),((s+=(f+=r*e)>>>16)+((f=(f&65535)+n*a)>>>16)+((f=(f&65535)+o*u)>>>16)+(t*e+r*a+n*u+o*i)&65535)<<16|(f&=65535))},d.prototype.div=function(e){var t,r,n,o=d.fromValue(e);if(o.isZero())throw(0,oe.newError)("division by zero");if(this.isZero())return d.ZERO;{if(this.equals(d.MIN_VALUE))return o.equals(d.ONE)||o.equals(d.NEG_ONE)?d.MIN_VALUE:o.equals(d.MIN_VALUE)?d.ONE:(n=this.shiftRight(1).div(o).shiftLeft(1)).equals(d.ZERO)?o.isNegative()?d.ONE:d.NEG_ONE:(t=this.subtract(o.multiply(n)),n.add(t.div(o)));if(o.equals(d.MIN_VALUE))return d.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=d.ZERO,t=this;t.greaterThanOrEqual(o);){n=Math.max(1,Math.floor(t.toNumber()/o.toNumber()));for(var i=Math.ceil(Math.log(n)/Math.LN2),u=i<=48?1:Math.pow(2,i-48),a=d.fromNumber(n),s=a.multiply(o);s.isNegative()||s.greaterThan(t);)s=(a=d.fromNumber(n-=u)).multiply(o);a.isZero()&&(a=d.ONE),r=r.add(a),t=t.subtract(s)}return r},d.prototype.modulo=function(e){e=d.fromValue(e);return this.subtract(this.div(e).multiply(e))},d.prototype.not=function(){return d.fromBits(~this.low,~this.high)},d.prototype.and=function(e){e=d.fromValue(e);return d.fromBits(this.low&e.low,this.high&e.high)},d.prototype.or=function(e){e=d.fromValue(e);return d.fromBits(this.low|e.low,this.high|e.high)},d.prototype.xor=function(e){e=d.fromValue(e);return d.fromBits(this.low^e.low,this.high^e.high)},d.prototype.shiftLeft=function(e){e=d.toNumber(e);return 0==(e&=63)?d.ZERO:e<32?d.fromBits(this.low<<e,this.high<<e|this.low>>>32-e):d.fromBits(0,this.low<<e-32)},d.prototype.shiftRight=function(e){var t=d.toNumber(e),e=d.toNumber(e);return 0==(t&=63)?d.ZERO:e<32?d.fromBits(this.low>>>t|this.high<<32-t,this.high>>t):d.fromBits(this.high>>t-32,0<=this.high?0:-1)},d.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},d.fromInt=function(e){if(-128<=(e|=0)&&e<128&&null!=(t=ie.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&ie.set(e,t),t},d.fromBits=function(e,t){return new d(e,t)},d.fromNumber=function(e){return isNaN(e)||!isFinite(e)?d.ZERO:e<=-de?d.MIN_VALUE:de<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%pe|0,e/pe|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,oe.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return d.ZERO;if((t=null!=t?t:10)<2||36<t)throw(0,oe.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,oe.newError)('number format error: interior "-" character: '+e);if(0===r)return d.fromString(e.substring(1),t).negate();for(var o,i,u=d.fromNumber(Math.pow(t,8)),a=d.ZERO,s=0;s<e.length;s+=8){var c,l=Math.min(8,e.length-s),f=e.substring(s,s+l),p=parseInt(f,t);if(!0===n&&(o=f,c=p,i=t,Number.isNaN(o)||Number.isNaN(c)||function(e,t,r){e=e.toString(t),t=Math.max(r-e.length,0),r="0".repeat(t);return"".concat(r).concat(e)}(c,i,o.length)!==o.toLowerCase()))throw(0,oe.newError)('number format error: "'.concat(f,'" is NaN in radix ').concat(t,": ").concat(e));a=l<8?(c=d.fromNumber(Math.pow(t,l)),a.multiply(c).add(d.fromNumber(p))):(a=a.multiply(u)).add(d.fromNumber(p))}return a},d.fromValue=function(e,t){return void 0===t&&(t={}),e instanceof d?e:"number"==typeof e?(!0===t.ceilFloat&&(e=Math.ceil(e)),d.fromNumber(e)):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(Y.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var a,ue,ae,se,ce,le,fe,pe=4294967296,de=pe*pe/2,he=Y.fromInt(1<<24),u=Y.fromValue,u=(i.int=u,Y.isInteger),u=(i.isInt=u,Y.inSafeRange),u=(i.inSafeRange=u,Y.toNumber),u=(i.toNumber=u,Y.toString),u=(i.toString=u,i.default=Y,{}),Y={},s={},be=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ye=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&be(t,e,r);return ye(t,e),t},_e=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ve=(Object.defineProperty(s,"__esModule",{value:!0}),s.ENCRYPTION_OFF=s.ENCRYPTION_ON=s.equals=s.validateQueryAndParameters=s.toNumber=s.assertValidDate=s.assertNumberOrInteger=s.assertNumber=s.assertString=s.assertObject=s.isString=s.isObject=s.isEmptyObjectOrNull=void 0,c(i)),me=n;s.ENCRYPTION_ON="ENCRYPTION_ON";function ge(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function Oe(e,t){if(we(e))return e;throw new TypeError((0,me.stringify)(t)+" expected to be string but was: "+(0,me.stringify)(e))}function we(e){return"[object String]"===Object.prototype.toString.call(e)}function Ee(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,se.int)(e),this._maxInteger=(0,se.int)(t)}function Pe(e,t,r){e=(0,se.int)(e),t=(0,se.int)(t),r=(0,se.int)(r);var n=e.multiply(365);return n=(n=(n=e.greaterThanOrEqual(0)?n.add(e.add(3).div(4).subtract(e.add(99).div(100)).add(e.add(399).div(400))):n.subtract(e.div(-4).subtract(e.div(-100)).add(e.div(-400)))).add(t.multiply(367).subtract(362).div(12))).add(r.subtract(1)),t.greaterThan(2)&&(n=n.subtract(1),function(e){if((e=(0,se.int)(e)).modulo(4).equals(0))return!e.modulo(100).equals(0)||!!e.modulo(400).equals(0)}(e)||(n=n.subtract(1))),n.subtract(a.DAYS_0000_TO_1970)}function Se(e,t){return(0,ce.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))}function Te(e,t,r){if((0,le.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,ce.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function je(e,t){e=(0,se.int)(e),t=(0,se.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function Ce(e,t){return e=(0,se.int)(e),t=(0,se.int)(t),e.subtract(je(e,t).multiply(t))}function Re(e){return(e=(0,se.int)(e)).equals(0)?"":"."+Ie(e,9)}function Ie(e,t,r){var n=(e=(0,se.int)(e)).isNegative(),o=(e=n?e.negate():e).toString();if(null!=t)for(;o.length<t;)o="0"+o;return n?"-"+o:!0===(null==r?void 0:r.usePositiveSign)?"+"+o:o}s.ENCRYPTION_OFF="ENCRYPTION_OFF",s.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!ge(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},s.isObject=ge,s.validateQueryAndParameters=function(e,t,r){var n="",t=null!=t?t:{},r=null!=(r=null==r?void 0:r.skipAsserts)&&r;if("string"==typeof e?n=e:e instanceof String?n=e.toString():"object"==typeof e&&null!=e.text&&(n=e.text,t=null!=(e=e.parameters)?e:{}),!r){e=n;if(Oe(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!ge(r))throw e=null!=r.constructor?" "+r.constructor.name:"",new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(e," ").concat(JSON.stringify(r)))}return{validatedQuery:n,params:t}},s.assertObject=function(e,t){if(ge(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,me.stringify)(e))},s.assertString=Oe,s.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,me.stringify)(e));return e},s.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,ve.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,me.stringify)(e))},s.assertValidDate=function(e,t){if("[object Date]"!==Object.prototype.toString.call(e))throw new TypeError(t+" expected to be a standard JavaScript Date but was: "+(0,me.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,me.stringify)(e));return e},s.isString=we,s.equals=function e(t,r){var n,o;if(t===r)return!0;if(null===t||null===r)return!1;if("object"!=typeof t||"object"!=typeof r)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;try{for(var a=_e(i),s=a.next();!s.done;s=a.next()){var c=s.value;if(!e(t[c],r[c]))return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return!0},s.toNumber=function(e){return e instanceof ve.default?e.toNumber():"bigint"==typeof e?(0,ve.int)(e).toNumber():e},a=Y,ue=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ae=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ue(t,e,r);return ae(t,e),t},Object.defineProperty(a,"__esModule",{value:!0}),a.floorMod=a.floorDiv=a.assertValidZoneId=a.assertValidNanosecond=a.assertValidSecond=a.assertValidMinute=a.assertValidHour=a.assertValidDay=a.assertValidMonth=a.assertValidYear=a.timeZoneOffsetInSeconds=a.totalNanoseconds=a.newDate=a.toStandardDate=a.isoStringToStandardDate=a.dateToIsoString=a.timeZoneOffsetToIsoString=a.timeToIsoString=a.durationToIsoString=a.dateToEpochDay=a.localDateTimeToEpochSecond=a.localTimeToNanoOfDay=a.normalizeNanosecondsForDuration=a.normalizeSecondsForDuration=a.SECONDS_PER_DAY=a.DAYS_PER_400_YEAR_CYCLE=a.DAYS_0000_TO_1970=a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE=a.NANOS_PER_MILLISECOND=a.NANOS_PER_SECOND=a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE=a.MINUTES_PER_HOUR=a.NANOSECOND_OF_SECOND_RANGE=a.SECOND_OF_MINUTE_RANGE=a.MINUTE_OF_HOUR_RANGE=a.HOUR_OF_DAY_RANGE=a.DAY_OF_MONTH_RANGE=a.MONTH_OF_YEAR_RANGE=a.YEAR_RANGE=void 0,se=c(i),ce=t,le=s,Ee.prototype.contains=function(e){var t;return(0,se.isInt)(e)&&e instanceof se.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,se.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},Ee.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},c=Ee,a.YEAR_RANGE=new c(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new c(1,12),a.DAY_OF_MONTH_RANGE=new c(1,31),a.HOUR_OF_DAY_RANGE=new c(0,23),a.MINUTE_OF_HOUR_RANGE=new c(0,59),a.SECOND_OF_MINUTE_RANGE=new c(0,59),a.NANOSECOND_OF_SECOND_RANGE=new c(0,999999999),a.MINUTES_PER_HOUR=60,a.SECONDS_PER_MINUTE=60,a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE*a.MINUTES_PER_HOUR,a.NANOS_PER_SECOND=1e9,a.NANOS_PER_MILLISECOND=1e6,a.NANOS_PER_MINUTE=a.NANOS_PER_SECOND*a.SECONDS_PER_MINUTE,a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE*a.MINUTES_PER_HOUR,a.DAYS_0000_TO_1970=719528,a.DAYS_PER_400_YEAR_CYCLE=146097,a.SECONDS_PER_DAY=86400,a.normalizeSecondsForDuration=function(e,t){return(0,se.int)(e).add(je(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return Ce(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,se.int)(e),t=(0,se.int)(t),r=(0,se.int)(r),n=(0,se.int)(n),(e=(e=(e=e.multiply(a.NANOS_PER_HOUR)).add(t.multiply(a.NANOS_PER_MINUTE))).add(r.multiply(a.NANOS_PER_SECOND))).add(n)},a.localDateTimeToEpochSecond=function(e,t,r,n,o,i,u){return e=Pe(e,t,r),t=function(e,t,r){e=(0,se.int)(e),t=(0,se.int)(t),r=(0,se.int)(r);e=e.multiply(a.SECONDS_PER_HOUR);return(e=e.add(t.multiply(a.SECONDS_PER_MINUTE))).add(r)}(n,o,i),e.multiply(a.SECONDS_PER_DAY).add(t)},a.dateToEpochDay=Pe,a.durationToIsoString=function(e,t,r,n){return e=Ie(e),t=Ie(t),r=function(e,t){e=(0,se.int)(e),t=(0,se.int)(t);var r,n=e.isNegative(),o=t.greaterThan(0);e=n&&o?e.equals(-1)?"-0":e.add(1).toString():e.toString();o&&(r=Re((n?t.negate().add(2*a.NANOS_PER_SECOND):t.add(a.NANOS_PER_SECOND)).modulo(a.NANOS_PER_SECOND)));return null!=r?e+r:e}(r,n),"P".concat(e,"M").concat(t,"DT").concat(r,"S")},a.timeToIsoString=function(e,t,r,n){return e=Ie(e,2),t=Ie(t,2),r=Ie(r,2),n=Re(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,se.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=Ie((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=Ie(e.div(a.SECONDS_PER_MINUTE).modulo(a.MINUTES_PER_HOUR),2);return null!=(e=(e=e.modulo(a.SECONDS_PER_MINUTE)).equals(0)?null:Ie(e,2))?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},a.dateToIsoString=function(e,t,r){return e=function(e){e=(0,se.int)(e);if(e.isNegative()||e.greaterThan(9999))return Ie(e,6,{usePositiveSign:!0});return Ie(e,4)}(e),t=Ie(t,2),r=Ie(r,2),"".concat(e,"-").concat(t,"-").concat(r)},a.isoStringToStandardDate=function(e){return new Date(e)},a.toStandardDate=function(e){return new Date(e)},a.newDate=function(e){return new Date(e)},a.totalNanoseconds=function(e,t){return t=null!=t?t:0,e=e.getMilliseconds()*a.NANOS_PER_MILLISECOND,t instanceof se.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},a.timeZoneOffsetInSeconds=function(e){var t=e.getSeconds()>=e.getUTCSeconds()?e.getSeconds()-e.getUTCSeconds():e.getSeconds()-e.getUTCSeconds()+60;return 0===(e=e.getTimezoneOffset())?0+t:-1*e*a.SECONDS_PER_MINUTE+t},a.assertValidYear=function(e){return Te(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return Te(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return Te(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return Te(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return Te(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return Te(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return Te(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},fe=new Map,a.assertValidZoneId=function(t,r){var e=fe.get(r);if(!0!==e){if(!1===e)throw Se(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),fe.set(r,!0)}catch(e){throw fe.set(r,!1),Se(r,t)}}},a.floorDiv=je,a.floorMod=Ce;var Ae=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ke=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Ae(t,e,r);return ke(t,e),t},Me=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},l=(Object.defineProperty(u,"__esModule",{value:!0}),u.isDateTime=u.DateTime=u.isLocalDateTime=u.LocalDateTime=u.isDate=u.Date=u.isTime=u.Time=u.isLocalTime=u.LocalTime=u.isDuration=u.Duration=void 0,c(Y)),Ne=s,xe=t,De=c(i),c={value:!0,enumerable:!1,configurable:!1,writable:!1},Le="__isDuration__",Ue="__isLocalTime__",Fe="__isTime__",Be="__isDate__",We="__isLocalDateTime__",qe="__isDateTime__",f=(ze.prototype.toString=function(){return l.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},ze);function ze(e,t,r,n){this.months=(0,Ne.assertNumberOrInteger)(e,"Months"),this.days=(0,Ne.assertNumberOrInteger)(t,"Days"),(0,Ne.assertNumberOrInteger)(r,"Seconds"),(0,Ne.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=l.normalizeSecondsForDuration(r,n),this.nanoseconds=l.normalizeNanosecondsForDuration(n),Object.freeze(this)}u.Duration=f,Object.defineProperty(f.prototype,Le,c),u.isDuration=function(e){return Ze(e,Le)};Ve.fromStandardDate=function(e,t){Xe(e,t);t=l.totalNanoseconds(e,t);return new Ve(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof De.default?t.toInt():"bigint"==typeof t?(0,De.int)(t).toInt():t)},Ve.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};f=Ve;function Ve(e,t,r,n){this.hour=l.assertValidHour(e),this.minute=l.assertValidMinute(t),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),Object.freeze(this)}u.LocalTime=f,Object.defineProperty(f.prototype,Ue,c),u.isLocalTime=function(e){return Ze(e,Ue)};He.fromStandardDate=function(e,t){return Xe(e,t),new He(e.getHours(),e.getMinutes(),e.getSeconds(),(0,De.toNumber)(l.totalNanoseconds(e,t)),l.timeZoneOffsetInSeconds(e))},He.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+l.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};f=He;function He(e,t,r,n,o){this.hour=l.assertValidHour(e),this.minute=l.assertValidMinute(t),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,Ne.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}u.Time=f,Object.defineProperty(f.prototype,Fe,c),u.isTime=function(e){return Ze(e,Fe)};Ge.fromStandardDate=function(e){return Xe(e),new Ge(e.getFullYear(),e.getMonth()+1,e.getDate())},Ge.prototype.toStandardDate=function(){return l.isoStringToStandardDate(this.toString())},Ge.prototype.toString=function(){return l.dateToIsoString(this.year,this.month,this.day)};f=Ge;function Ge(e,t,r){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),Object.freeze(this)}u.Date=f,Object.defineProperty(f.prototype,Be,c),u.isDate=function(e){return Ze(e,Be)};Ye.fromStandardDate=function(e,t){return Xe(e,t),new Ye(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,De.toNumber)(l.totalNanoseconds(e,t)))},Ye.prototype.toStandardDate=function(){return l.isoStringToStandardDate(this.toString())},Ye.prototype.toString=function(){return Qe(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};f=Ye;function Ye(e,t,r,n,o,i,u){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(u),Object.freeze(this)}u.LocalDateTime=f,Object.defineProperty(f.prototype,We,c),u.isLocalDateTime=function(e){return Ze(e,We)};Ke.fromStandardDate=function(e,t){return Xe(e,t),new Ke(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,De.toNumber)(l.totalNanoseconds(e,t)),l.timeZoneOffsetInSeconds(e),null)},Ke.prototype.toStandardDate=function(){return l.toStandardDate(this._toUTC())},Ke.prototype.toString=function(){var e;return Qe(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?l.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},Ke.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=l.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,De.int)(e).multiply(1e3).add((0,De.int)(this.nanosecond).div(1e6)).toNumber()};f=Ke;function Ke(e,t,r,n,o,i,u,a,s){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(u);e=Me(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,xe.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(e," and id: ").concat(t));var o=[void 0,void 0];r&&((0,Ne.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Ne.assertString)(t,"Time zone ID"),l.assertValidZoneId("Time zone ID",t),o[1]=t);return o}(a,s),2),t=e[0],r=e[1];this.timeZoneOffsetSeconds=t,this.timeZoneId=null!=r?r:void 0,Object.freeze(this)}function Ze(e,t){return null!=e&&!0===e[t]}function Qe(e,t,r,n,o,i,u){return l.dateToIsoString(e,t,r)+"T"+l.timeToIsoString(n,o,i,u)}function Xe(e,t){(0,Ne.assertValidDate)(e,"Standard date"),null!=t&&(0,Ne.assertNumberOrInteger)(t,"Nanosecond")}u.DateTime=f,Object.defineProperty(f.prototype,qe,c),u.isDateTime=function(e){return Ze(e,qe)};var f={},Je=(Object.defineProperty(f,"__esModule",{value:!0}),f.isPathSegment=f.PathSegment=f.isPath=f.Path=f.isUnboundRelationship=f.UnboundRelationship=f.isRelationship=f.Relationship=f.isNode=f.Node=void 0,n),c={value:!0,enumerable:!1,configurable:!1,writable:!1},$e="__isNode__",et="__isRelationship__",tt="__isUnboundRelationship__",rt="__isPath__",nt="__isPathSegment__";function ot(e,t){return null!=e&&!0===e[t]}ut.prototype.toString=function(){for(var e="("+this.elementId,t=0;t<this.labels.length;t++)e+=":"+this.labels[t];var r=Object.keys(this.properties);if(0<r.length){e+=" {";for(t=0;t<r.length;t++)0<t&&(e+=","),e+=r[t]+":"+(0,Je.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var it=ut;function ut(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=pt(n,function(){return e.toString()})}f.Node=it,Object.defineProperty(it.prototype,$e,c),f.isNode=function(e){return ot(e,$e)};st.prototype.toString=function(){var e="("+this.startNodeElementId+")-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,Je.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var at=st;function st(e,t,r,n,o,i,u,a){this.identity=e,this.start=t,this.end=r,this.type=n,this.properties=o,this.elementId=pt(i,function(){return e.toString()}),this.startNodeElementId=pt(u,function(){return t.toString()}),this.endNodeElementId=pt(a,function(){return r.toString()})}f.Relationship=at,Object.defineProperty(at.prototype,et,c),f.isRelationship=function(e){return ot(e,et)};ct.prototype.bind=function(e,t){return new at(this.identity,e,t,this.type,this.properties,this.elementId)},ct.prototype.bindTo=function(e,t){return new at(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},ct.prototype.toString=function(){var e="-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,Je.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};it=ct;function ct(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=pt(n,function(){return e.toString()})}f.UnboundRelationship=it,Object.defineProperty(it.prototype,tt,c),f.isUnboundRelationship=function(e){return ot(e,tt)};function lt(e,t,r){this.start=e,this.relationship=t,this.end=r}f.PathSegment=lt,Object.defineProperty(lt.prototype,nt,c),f.isPathSegment=function(e){return ot(e,nt)};function ft(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function pt(e,t){return null==e?t():e}f.Path=ft,Object.defineProperty(ft.prototype,rt,c),f.isPath=function(e){return ot(e,rt)};var it={},dt=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ht=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bt=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yt=(Object.defineProperty(it,"__esModule",{value:!0}),t);function _t(e,t,r){var n;this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=r?r:(n={},e.forEach(function(e,t){n[e]=t}),n)}_t.prototype.forEach=function(e){var t,r;try{for(var n=ht(this.entries()),o=n.next();!o.done;o=n.next()){var i=bt(o.value,2),u=i[0];e(i[1],u,this)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},_t.prototype.map=function(e){var t,r,n=[];try{for(var o=ht(this.entries()),i=o.next();!i.done;i=o.next()){var u=bt(i.value,2),a=u[0],s=u[1];n.push(e(s,a,this))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},_t.prototype.entries=function(){var t;return dt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,[this.keys[t],this._fields[t]]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},_t.prototype.values=function(){var t;return dt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},_t.prototype[Symbol.iterator]=function(){var t;return dt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},_t.prototype.toObject=function(){var t,e,r={};try{for(var n=ht(this.entries()),o=n.next();!o.done;o=n.next()){var i=bt(o.value,2),u=i[0],a=i[1];r[u]=a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},_t.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,yt.newError)("This record has no field with key '".concat(e.toString(),"', available keys are: [")+this.keys.toString()+"].")}else t=e;if(t>this._fields.length-1||t<0)throw(0,yt.newError)("This record has no field with index '"+t.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[t]},_t.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},it.default=_t;var c={},vt=(Object.defineProperty(c,"__esModule",{value:!0}),c.isPoint=c.Point=void 0,s),mt="__isPoint__",p=(gt.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(Ot(this.srid),", x=").concat(Ot(this.x),", y=").concat(Ot(this.y),"}"):"Point{srid=".concat(Ot(this.srid),", x=").concat(Ot(this.x),", y=").concat(Ot(this.y),", z=").concat(Ot(this.z),"}")},gt);function gt(e,t,r,n){this.srid=(0,vt.assertNumberOrInteger)(e,"SRID"),this.x=(0,vt.assertNumber)(t,"X coordinate"),this.y=(0,vt.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,vt.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function Ot(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}c.Point=p,Object.defineProperty(p.prototype,mt,{value:!0,enumerable:!1,configurable:!1,writable:!1}),c.isPoint=function(e){return null!=e&&!0===e[mt]};var p={},h={},b={},y=(Object.defineProperty(b,"__esModule",{value:!0}),b.FailedObserver=b.CompletedObserver=void 0,wt.prototype.subscribe=function(e){Pt(e,e.onKeys,[]),Pt(e,e.onCompleted,{})},wt.prototype.cancel=function(){},wt.prototype.pause=function(){},wt.prototype.resume=function(){},wt.prototype.prepareToHandleSingleResponse=function(){},wt.prototype.markCompleted=function(){},wt.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},wt);function wt(){}function Et(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function Pt(e,t,r){null!=t&&t.bind(e)(r)}b.CompletedObserver=y,Et.prototype.subscribe=function(e){Pt(e,e.onError,this._error),this._observers.push(e)},Et.prototype.onError=function(t){Pt(this,this._beforeError,t),this._observers.forEach(function(e){return Pt(e,e.onError,t)})},Et.prototype.cancel=function(){},Et.prototype.pause=function(){},Et.prototype.resume=function(){},Et.prototype.markCompleted=function(){},Et.prototype.prepareToHandleSingleResponse=function(){},b.FailedObserver=Et;var y={},St=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Tt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&St(t,e,r);return Tt(t,e),t},jt=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ct=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Rt=(Object.defineProperty(y,"__esModule",{value:!0}),y.Bookmarks=void 0,_(s)),_=(It.empty=function(){return At},It.prototype.isEmpty=function(){return 0===this._values.length},It.prototype.values=function(){return this._values},It.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},It.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},It);function It(e){this._values=function(e){if(null==e||""===e)return[];if(Rt.isString(e))return[e];if(Array.isArray(e)){for(var t=new Set,r=function r(e){return e.reduce(function(e,t){return Array.isArray(t)?e.concat(r(t)):e.concat(t)},[])}(e),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!Rt.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return Ct([],jt(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var At=new(y.Bookmarks=_)(null);var kt,Mt,_={},Nt=(Object.defineProperty(_,"__esModule",{value:!0}),_.TELEMETRY_APIS=_.BOLT_PROTOCOL_V5_7=_.BOLT_PROTOCOL_V5_6=_.BOLT_PROTOCOL_V5_5=_.BOLT_PROTOCOL_V5_4=_.BOLT_PROTOCOL_V5_3=_.BOLT_PROTOCOL_V5_2=_.BOLT_PROTOCOL_V5_1=_.BOLT_PROTOCOL_V5_0=_.BOLT_PROTOCOL_V4_4=_.BOLT_PROTOCOL_V4_3=_.BOLT_PROTOCOL_V4_2=_.BOLT_PROTOCOL_V4_1=_.BOLT_PROTOCOL_V4_0=_.BOLT_PROTOCOL_V3=_.BOLT_PROTOCOL_V2=_.BOLT_PROTOCOL_V1=_.DEFAULT_POOL_MAX_SIZE=_.DEFAULT_POOL_ACQUISITION_TIMEOUT=_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=_.ACCESS_MODE_WRITE=_.ACCESS_MODE_READ=_.FETCH_ALL=void 0,_.FETCH_ALL=-1,_.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,_.DEFAULT_POOL_MAX_SIZE=100,_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,_.ACCESS_MODE_READ="READ",_.ACCESS_MODE_WRITE="WRITE",_.BOLT_PROTOCOL_V1=1,_.BOLT_PROTOCOL_V2=2,_.BOLT_PROTOCOL_V3=3,_.BOLT_PROTOCOL_V4_0=4,_.BOLT_PROTOCOL_V4_1=4.1,_.BOLT_PROTOCOL_V4_2=4.2,_.BOLT_PROTOCOL_V4_3=4.3,_.BOLT_PROTOCOL_V4_4=4.4,_.BOLT_PROTOCOL_V5_0=5,_.BOLT_PROTOCOL_V5_1=5.1,_.BOLT_PROTOCOL_V5_2=5.2,_.BOLT_PROTOCOL_V5_3=5.3,_.BOLT_PROTOCOL_V5_4=5.4,_.BOLT_PROTOCOL_V5_5=5.5,_.BOLT_PROTOCOL_V5_6=5.6,_.BOLT_PROTOCOL_V5_7=5.7,_.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),v={},m=r&&r.__extends||(kt=function(e,t){return(kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}kt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),xt=(Object.defineProperty(v,"__esModule",{value:!0}),v.Logger=void 0,t),Dt="error",Lt="warn",Ut="info",Ft="debug",Bt=((g={})[Dt]=0,g[Lt]=1,g[Ut]=2,g[Ft]=3,g),g=(Wt.create=function(e){return null!=(null==e?void 0:e.logging)?new Wt(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=Bt[e];if(null!=t||0===t)return e;throw(0,xt.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(Bt).toString()))}(e=e.logging),function(e){if(null!=(null==e?void 0:e.logger)){var t=e.logger;if(null!=t&&"function"==typeof t)return t}throw(0,xt.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},Wt.noOp=function(){return zt},Wt.prototype.isErrorEnabled=function(){return Vt(this._level,Dt)},Wt.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(Dt,e)},Wt.prototype.isWarnEnabled=function(){return Vt(this._level,Lt)},Wt.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(Lt,e)},Wt.prototype.isInfoEnabled=function(){return Vt(this._level,Ut)},Wt.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(Ut,e)},Wt.prototype.isDebugEnabled=function(){return Vt(this._level,Ft)},Wt.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(Ft,e)},Wt);function Wt(e,t){this._level=e,this._loggerFunction=t}function qt(){return Mt.call(this,Ut,function(e,t){})||this}v.Logger=g,m(qt,Mt=g),qt.prototype.isErrorEnabled=function(){return!1},qt.prototype.error=function(e){},qt.prototype.isWarnEnabled=function(){return!1},qt.prototype.warn=function(e){},qt.prototype.isInfoEnabled=function(){return!1},qt.prototype.info=function(e){},qt.prototype.isDebugEnabled=function(){return!1},qt.prototype.debug=function(e){};var zt=new qt;function Vt(e,t){return Bt[e]>=Bt[t]}var Ht,m=r&&r.__extends||(Ht=function(e,t){return(Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ht(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Gt=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Yt=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Kt=(Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.EMPTY_CONNECTION_HOLDER=Nt.ReadOnlyConnectionHolder=Nt.ConnectionHolder=void 0,t),Zt=s,Qt=_,Xt=y,Jt=v,g=($t.prototype.mode=function(){return this._mode},$t.prototype.database=function(){return this._database},$t.prototype.setDatabase=function(e){this._database=e},$t.prototype.bookmarks=function(){return this._bookmarks},$t.prototype.connectionProvider=function(){return this._connectionProvider},$t.prototype.referenceCount=function(){return this._referenceCount},$t.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},$t.prototype._createConnectionPromise=function(o){return Gt(this,void 0,void 0,function(){var t,r,n;return Yt(this,function(e){switch(e.label){case 0:return r=(t=o).acquireConnection,n={accessMode:this._mode,database:this._database},[4,this._getBookmarks()];case 1:return[4,r.apply(t,[(n.bookmarks=e.sent(),n.impersonatedUser=this._impersonatedUser,n.onDatabaseNameResolved=this._onDatabaseNameResolved,n.auth=this._auth,n)])];case 2:return[2,e.sent()]}})})},$t.prototype._getBookmarks=function(){return Gt(this,void 0,void 0,function(){return Yt(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},$t.prototype.getConnection=function(){return this._connectionPromise},$t.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},$t.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},$t.prototype.log=function(){return this._log},$t.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(or).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},$t.prototype._logError=function(e){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(e,". Stacktrace: ").concat(e.stack)),null},$t);function $t(e){var t=e.mode,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,a=e.getConnectionAcquistionBookmarks,s=e.auth,e=e.log;this._mode=null!=t?t:Qt.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,Zt.assertString)(r,"database"):"",this._bookmarks=null!=n?n:Xt.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=s,this._log=e,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=null!=a?a:function(){return Promise.resolve(Xt.Bookmarks.empty())}}Nt.ConnectionHolder=g;m(rr,er=g),rr.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},rr.prototype.getConnection=function(){return this._connectionHolder.getConnection()},rr.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},rr.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var er,tr,O=rr;function rr(e){var t=er.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider(),log:e.log()})||this;return t._connectionHolder=e,t}function nr(){return tr.call(this,{log:Jt.Logger.create({})})||this}Nt.ReadOnlyConnectionHolder=O,Nt.default=O,m(nr,tr=g),nr.prototype.mode=function(){},nr.prototype.database=function(){},nr.prototype.initializeConnection=function(){return!0},nr.prototype.getConnection=function(){return Gt(this,void 0,void 0,function(){return Yt(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,Kt.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},nr.prototype.releaseConnection=function(){return Gt(this,void 0,void 0,function(){return Yt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},nr.prototype.close=function(){return Gt(this,void 0,void 0,function(){return Yt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};O=new nr;function or(e){return null}Nt.EMPTY_CONNECTION_HOLDER=O;var m={},ir=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ur=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),g=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ir(t,e,r);return ur(t,e),t},ar=(Object.defineProperty(m,"__esModule",{value:!0}),m.TxConfig=void 0,g(s)),sr=t,cr=i,O=(lr.empty=function(){return fr},lr.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},lr);function lr(e,t){var r;null!=(r=e)&&ar.assertObject(r,"Transaction config"),this.timeout=function(e,t){if(ar.isObject(e)&&null!=e.timeout){ar.assertNumberOrInteger(e.timeout,"Transaction timeout"),!function(e){return"number"==typeof e.timeout&&!Number.isInteger(e.timeout)}(e)||!0!==(null==t?void 0:t.isInfoEnabled())||null==t||t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up."));t=(0,cr.int)(e.timeout,{ceilFloat:!0});if(t.isNegative())throw(0,sr.newError)("Transaction timeout should not be negative");return t}return null}(e,t),this.metadata=function(e){if(ar.isObject(e)&&null!=e.metadata){e=e.metadata;if(ar.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var fr=new(m.TxConfig=O)({});var g={},pr=r&&r.__assign||function(){return(pr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},dr=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},hr=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},br=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yr=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},_r=(Object.defineProperty(g,"__esModule",{value:!0}),g.TransactionExecutor=void 0,t),vr=_;function mr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,yr([e,t],br(r),!1))}function gr(e){return clearTimeout(e)}function Or(e,t,r,n,o){void 0===o&&(o={setTimeout:mr,clearTimeout:gr}),this._maxRetryTimeMs=wr(e,3e4),this._initialRetryDelayMs=wr(t,1e3),this._multiplier=wr(r,2),this._jitterFactor=wr(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=vr.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function wr(e,t){return null!=e?e:t}Or.prototype.execute=function(n,o,i){var u=this,a={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){a.apiTransactionConfig=void 0}}};return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i,a).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i,a)})},Or.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},Or.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,_r.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=c._computeDelayWithJitter(u),n=c._setTimeout(function(){c._inFlightTimeoutIds=c._inFlightTimeoutIds.filter(function(e){return e!==n}),c._executeTransactionInsidePromise(o,i,e,t,a,s).catch(t)},r);c._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*c._multiplier;return c._retryTransactionPromise(o,i,e,r,t,a,s)})},Or.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return dr(this,void 0,void 0,function(){var t,r,n,o,i=this;return hr(this,function(e){switch(e.label){case 0:return(e.trys.push([0,4,,5]),r=u(null!=(null==f?void 0:f.apiTransactionConfig)?pr({},null==f?void 0:f.apiTransactionConfig):void 0),this.pipelineBegin)?(n=r,[3,3]):[3,1];case 1:return[4,r];case 2:n=e.sent(),e.label=3;case 3:return t=n,[3,5];case 4:return o=e.sent(),c(o),[2];case 5:return o=(null!=l?l:function(e){return e})(t),this._safeExecuteTransactionWork(o,a).then(function(e){return i._handleTransactionWorkSuccess(e,t,s,c)}).catch(function(e){return i._handleTransactionWorkFailure(e,t,c)}),[2]}})})},Or.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},Or.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},Or.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},Or.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},Or.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,_r.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,_r.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,_r.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,_r.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},g.TransactionExecutor=Or;var O={},Er=r&&r.__assign||function(){return(Er=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Pr=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Sr=(Object.defineProperty(O,"__esModule",{value:!0}),O.Url=O.formatIPv6Address=O.formatIPv4Address=O.defaultPortForScheme=O.parseDatabaseUrl=void 0,s),Tr=7687,jr=7474,Cr=7473,Rr=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Ir(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function Ar(e){var t="["===e.charAt(0),r="]"===e.charAt(e.length-1);if(t||r){if(t&&r)return e;throw new Error("Illegal IPv6 address ".concat(e))}return"[".concat(e,"]")}function kr(e){return"http"===e?jr:"https"===e?Cr:Tr}O.Url=Rr,O.parseDatabaseUrl=function(e){(0,Sr.assertString)(e,"URL");var t,r=function(e){function u(e,t){t=e.indexOf(t);return 0<=t?[e.substring(0,t),e[t],e.substring(t+1)]:[e,"",""]}function t(e){var t,r={},n=((t="@")===(t=0<=(t=(o=e).lastIndexOf(t))?[o.substring(0,t),o[t],o.substring(t+1)]:["","",o])[1]&&(r.userInfo=decodeURIComponent(t[0]),e=t[2]),Pr((o="]",n=u(n=e,i="["),[(i=u(n[2],o))[0],i[2]]),2)),o=n[0],i=n[1];return""!==o?(r.host=o,t=u(i,":")):(t=u(e,":"),r.host=t[0]),":"===t[1]&&(r.port=t[2]),r}var r,n={};":"===(r=u(e,":"))[1]&&(n.scheme=decodeURIComponent(r[0]),e=r[2]);"#"===(r=u(e,"#"))[1]&&(n.fragment=decodeURIComponent(r[2]),e=r[0]);"?"===(r=u(e,"?"))[1]&&(n.query=r[2],e=r[0]);e.startsWith("//")?(r=u(e.substr(2),"/"),(n=Er(Er({},n),t(r[0]))).path=r[1]+r[2]):n.path=e;return n}((n=(n=(n=e).trim()).includes("://")?{schemeMissing:!1,url:n}:{schemeMissing:!0,url:"none://".concat(n)}).url),n=n.schemeMissing?null:function(e){if(null==e)return null;":"===(e=e.trim()).charAt(e.length-1)&&(e=e.substring(0,e.length-1));return e}(r.scheme),o=function(e){if(null!=e)return e.trim();throw new Error("Unable to extract host from null or undefined URL")}(r.host),i=function(e){if(""!==e&&null!=e)return e.includes(":")?Ar(e):e;throw new Error("Illegal host ".concat(e))}(o),u=function(e,t){e="string"==typeof e?parseInt(e,10):e;return null==e||isNaN(e)?kr(t):e}(r.port,n),i="".concat(i,":").concat(u),r=function(e,r){var e=null!=e?function(e){"?"===(null==(e=(null!=e?e:"").trim())?void 0:e.charAt(0))&&(e=e.substring(1,e.length));return e}(e):null,n={};null!=e&&e.split("&").forEach(function(e){e=e.split("=");if(2!==e.length)throw new Error("Invalid parameters: '".concat(e.toString(),"' in URL '").concat(r,"'."));var t=Ir(e[0],"key",r),e=Ir(e[1],"value",r);if(void 0!==n[t])throw new Error("Duplicated query parameters with key '".concat(t,"' in URL '").concat(r,"'"));n[t]=e});return n}(null!=(t=r.query)?t:"string"==typeof(t=r.resourceName)?Pr(t.split("?"),2)[1]:null,e);return new Rr(n,o,u,i,r)},O.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},O.formatIPv6Address=function(e,t){return e=Ar(e),"".concat(e,":").concat(t)},O.defaultPortForScheme=kr;var w={},Mr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Nr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xr=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Mr(t,e,r);return Nr(t,e),t},Dr=(Object.defineProperty(w,"__esModule",{value:!0}),w.ServerAddress=void 0,s),Lr=xr(O);function Ur(e,t,r,n){this._host=(0,Dr.assertString)(e,"host"),this._resolved=null!=t?(0,Dr.assertString)(t,"resolved"):null,this._port=(0,Dr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Ur.prototype.host=function(){return this._host},Ur.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Ur.prototype.port=function(){return this._port},Ur.prototype.resolveWith=function(e){return new Ur(this._host,e,this._port,this._hostPort)},Ur.prototype.asHostPort=function(){return this._hostPort},Ur.prototype.asKey=function(){return this._hostPort},Ur.prototype.toString=function(){return this._stringValue},Ur.fromUrl=function(e){e=Lr.parseDatabaseUrl(e);return new Ur(e.host,null,e.port,e.hostAndPort)},w.ServerAddress=Ur;var xr={},E={};function Fr(){}Object.defineProperty(E,"__esModule",{value:!0}),Fr.prototype.resolve=function(){throw new Error("Abstract function")},Fr.prototype._resolveToItself=function(e){return Promise.resolve([e])},E.default=Fr;var P={},Br=(Object.defineProperty(P,"__esModule",{value:!0}),w);function Wr(e){return Promise.resolve([e])}function qr(e){this._resolverFunction=null!=e?e:Wr}qr.prototype.resolve=function(t){var r=this;return new Promise(function(e){return e(r._resolverFunction(t.asHostPort()))}).then(function(e){if(Array.isArray(e))return e.map(function(e){return Br.ServerAddress.fromUrl(e)});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: ".concat(e))})},P.default=qr;var zr,S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E=(Object.defineProperty(xr,"__esModule",{value:!0}),xr.ConfiguredCustomResolver=xr.BaseHostNameResolver=void 0,S(E)),E=(xr.BaseHostNameResolver=E.default,S(P)),S=(xr.ConfiguredCustomResolver=E.default,{}),E={};Object.defineProperty(E,"__esModule",{value:!0}),E.fromVersion=void 0,E.fromVersion=function(e,t){var r=null!=(t=(t=void 0===t?function(){return{get userAgent(){}}}:t)()).userAgent?t.userAgent.split("(")[1].split(")")[0]:void 0,t=t.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:t}},j=S,zr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),T=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||zr(t,e,r)},Object.defineProperty(j,"__esModule",{value:!0}),T(E,j);var T={},E={},j=(Object.defineProperty(E,"__esModule",{value:!0}),E.DEFAULT_ACQUISITION_TIMEOUT=E.DEFAULT_MAX_SIZE=void 0,E.DEFAULT_MAX_SIZE=100,E.DEFAULT_ACQUISITION_TIMEOUT=6e4,Vr.defaultConfig=function(){return new Vr(100,6e4)},Vr.fromDriverConfig=function(e){return new Vr(Gr(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,Gr(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},Vr);function Vr(e,t){this.maxSize=Hr(e,100),this.acquisitionTimeout=Hr(t,6e4)}function Hr(e,t){return Gr(e)?e:t}function Gr(e){return 0===e||null!=e}E.default=j;var j={},Yr=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Kr=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Zr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qr=(Object.defineProperty(j,"__esModule",{value:!0}),Zr(E)),Xr=t,Jr=v,Zr=($r.prototype.acquire=function(a,s,c){return Yr(this,void 0,void 0,function(){var o,i,u=this;return Kr(this,function(e){switch(e.label){case 0:return o=s.asKey(),i=this._acquireRequests,null==i[o]&&(i[o]=[]),[4,new Promise(function(e,t){var r=setTimeout(function(){var e,t=i[o];null!=t&&(i[o]=t.filter(function(e){return e!==n})),n.isCompleted()||(t=u.activeResourceCount(s),e=u.has(s)?u._pools[o].length:0,n.reject((0,Xr.newError)("Connection acquisition timed out in ".concat(u._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},u._acquisitionTimeout),n=("object"==typeof r&&r.unref(),new rn(o,a,c,e,t,r,u._log));i[o].push(n),u._processPendingAcquireRequests(s)})];case 1:return[2,e.sent()]}})})},$r.prototype.purge=function(t){return Yr(this,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t.asKey())];case 1:return[2,e.sent()]}})})},$r.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},$r.prototype.close=function(){return Yr(this,void 0,void 0,function(){var r=this;return Kr(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(t){return Yr(r,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},$r.prototype.keepAll=function(o){return Yr(this,void 0,void 0,function(){var t,r,n=this;return Kr(this,function(e){switch(e.label){case 0:return t=o.map(function(e){return e.asKey()}),r=Object.keys(this._pools),r=r.filter(function(e){return!t.includes(e)}),[4,Promise.all(r.map(function(t){return Yr(n,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},$r.prototype.has=function(e){return e.asKey()in this._pools},$r.prototype.activeResourceCount=function(e){return null!=(e=this._activeResourceCounts[e.asKey()])?e:0},$r.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return null==t&&(t=new sn,this._pools[e]=t,this._pendingCreates[e]=0),t},$r.prototype._acquire=function(c,l,f){return Yr(this,void 0,void 0,function(){var t,n,r,o,i,u,a,s=this;return Kr(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,Xr.newError)("Pool is closed, it is no more able to serve requests.");if(t=l.asKey(),n=this._getOrInitializePoolFor(t),f)return[3,10];e.label=1;case 1:if(!(0<n.length))return[3,10];if(null==(r=n.pop()))return[3,1];en(t,this._activeResourceCounts),null!=this._removeIdleObserver&&this._removeIdleObserver(r),o=!1,e.label=2;case 2:return e.trys.push([2,4,,6]),[4,this._validateOnAcquire(c,r)];case 3:return o=e.sent(),[3,6];case 4:return i=e.sent(),tn(t,this._activeResourceCounts),n.removeInUse(r),[4,this._destroy(r)];case 5:throw e.sent(),i;case 6:return o?(this._log.isDebugEnabled()&&this._log.debug("".concat(r," acquired from the pool ").concat(t)),[2,{resource:r,pool:n}]):[3,7];case 7:return tn(t,this._activeResourceCounts),n.removeInUse(r),[4,this._destroy(r)];case 8:e.sent(),e.label=9;case 9:return[3,1];case 10:if(0<this._maxSize&&this.activeResourceCount(l)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:n}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=11;case 11:return(e.trys.push([11,,15,16]),this.activeResourceCount(l)+n.length>=this._maxSize&&f)?null==(a=n.pop())?[3,13]:(null!=this._removeIdleObserver&&this._removeIdleObserver(a),n.removeInUse(a),[4,this._destroy(a)]):[3,13];case 12:e.sent(),e.label=13;case 13:return[4,this._create(c,l,function(t,r){return Yr(s,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,this._release(t,r,n)];case 1:return[2,e.sent()]}})})})];case 14:return u=e.sent(),n.pushInUse(u),en(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(u," created for the pool ").concat(t)),[3,16];case 15:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 16:return[2,{resource:u,pool:n}]}})})},$r.prototype._release=function(n,o,i){return Yr(this,void 0,void 0,function(){var t,r=this;return Kr(this,function(e){switch(e.label){case 0:t=n.asKey(),e.label=1;case 1:return(e.trys.push([1,,9,10]),i.isActive())?[4,this._validateOnRelease(o)]:[3,6];case 2:return e.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(o," destroyed and can't be released to the pool ").concat(t," because it is not functional")),i.removeInUse(o),[4,this._destroy(o)]);case 3:return e.sent(),[3,5];case 4:null!=this._installIdleObserver&&this._installIdleObserver(o,{onError:function(e){r._log.debug("Idle connection ".concat(o," destroyed because of error: ").concat(e));e=r._pools[t];null!=e&&(r._pools[t]=e.filter(function(e){return e!==o}),e.removeInUse(o)),r._destroy(o).catch(function(){})}}),i.push(o),this._log.isDebugEnabled()&&this._log.debug("".concat(o," released to the pool ").concat(t)),e.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(o," destroyed and can't be released to the pool ").concat(t," because pool has been purged")),i.removeInUse(o),[4,this._destroy(o)];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:return tn(t,this._activeResourceCounts),this._processPendingAcquireRequests(n),[7];case 10:return[2]}})})},$r.prototype._purgeKey=function(o){return Yr(this,void 0,void 0,function(){var t,r,n;return Kr(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],null==t)return[3,2];for(;0<t.length;)null!=(n=t.pop())&&(null!=this._removeIdleObserver&&this._removeIdleObserver(n),r.push(this._destroy(n)));return t.close(),delete this._pools[o],[4,Promise.all(r)];case 1:e.sent(),e.label=2;case 2:return[2]}})})},$r.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];null!=e&&(null!=(n=e.shift())?this._acquire(n.context,r,n.requireNew).catch(function(e){return n.reject(e),{resource:null,pool:null}}).then(function(e){var t=e.resource,e=e.pool;null!=t&&null!=e?n.isCompleted()?o._release(r,t,e).catch(function(e){o._log.isDebugEnabled()&&o._log.debug("".concat(t," could not be release back to the pool. Cause: ").concat(e))}):n.resolve(t):n.isCompleted()||(null==o._acquireRequests[i]&&(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}).catch(function(e){return n.reject(e)}):delete this._acquireRequests[i])},$r);function $r(e){var t=e.create,t=void 0===t?function(e,t,r){return Yr(s,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,Promise.reject(new Error("Not implemented"))];case 1:return[2,e.sent()]}})})}:t,r=e.destroy,r=void 0===r?function(e){return Yr(s,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,Promise.resolve()];case 1:return[2,e.sent()]}})})}:r,n=e.validateOnAcquire,n=void 0===n?function(e,t){return!0}:n,o=e.validateOnRelease,o=void 0===o?function(e){return!0}:o,i=e.installIdleObserver,i=void 0===i?function(e,t){}:i,u=e.removeIdleObserver,u=void 0===u?function(e){}:u,a=e.config,a=void 0===a?Qr.default.defaultConfig():a,e=e.log,e=void 0===e?Jr.Logger.noOp():e,s=this;this._create=t,this._destroy=r,this._validateOnAcquire=n,this._validateOnRelease=o,this._installIdleObserver=i,this._removeIdleObserver=u,this._maxSize=a.maxSize,this._acquisitionTimeout=a.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function en(e,t){var r=null!=(r=t[e])?r:0;t[e]=r+1}function tn(e,t){var r=(null!=(r=t[e])?r:0)-1;0<r?t[e]=r:delete t[e]}Object.defineProperty(nn.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"requireNew",{get:function(){var e;return null!=(e=this._config.requireNew)&&e},enumerable:!1,configurable:!0}),nn.prototype.isCompleted=function(){return this._completed},nn.prototype.resolve=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(e," acquired from the pool ").concat(this._key)),this._resolve(e))},nn.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var rn=nn;function nn(e,t,r,n,o,i,u){this._key=e,this._context=t,this._resolve=n,this._reject=o,this._timeoutId=i,this._log=u,this._completed=!1,this._config=null!=r?r:{}}cn.prototype.isActive=function(){return this._active},cn.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},cn.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},cn.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(cn.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),cn.prototype.pop=function(){var e=this._elements.pop();return null!=e&&this._elementsInUse.add(e),e},cn.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},cn.prototype.pushInUse=function(e){this._elementsInUse.add(e)},cn.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var on,un,an,sn=cn;function cn(){this._active=!0,this._elements=[],this._elementsInUse=new Set}j.default=Zr,Zr=T,on=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),un=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pn=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&on(t,e,r);return un(t,e),t},C=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.DEFAULT_MAX_SIZE=Zr.DEFAULT_ACQUISITION_TIMEOUT=Zr.PoolConfig=Zr.Pool=void 0,an=pn(E),Zr.PoolConfig=an.default,Object.defineProperty(Zr,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return an.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(Zr,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return an.DEFAULT_MAX_SIZE}}),pn=C(j),Zr.Pool=pn.default,Zr.default=pn.default;var ln=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),fn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),E=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ln(t,e,r);return fn(t,e),t},C=(Object.defineProperty(h,"__esModule",{value:!0}),h.pool=h.boltAgent=h.objectUtil=h.resolver=h.serverAddress=h.urlUtil=h.logger=h.transactionExecutor=h.txConfig=h.connectionHolder=h.constants=h.bookmarks=h.observer=h.temporalUtil=h.util=void 0,E(s)),j=(h.util=C,E(Y)),Zr=(h.temporalUtil=j,E(b)),pn=(h.observer=Zr,E(y)),C=(h.bookmarks=pn,E(_)),Y=(h.constants=C,E(Nt)),j=(h.connectionHolder=Y,E(m)),Zr=(h.txConfig=j,E(g)),pn=(h.transactionExecutor=Zr,E(v)),C=(h.logger=pn,E(O)),Y=(h.urlUtil=C,E(w)),j=(h.serverAddress=Y,E(xr)),Zr=(h.resolver=j,E(o)),pn=(h.objectUtil=Zr,E(S)),O=(h.boltAgent=pn,E(T)),C=(h.pool=O,{}),dn=r&&r.__assign||function(){return(dn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},hn=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),bn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),w=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&hn(t,e,r);return bn(t,e),t},yn=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},_n=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},vn=(Object.defineProperty(C,"__esModule",{value:!0}),C.buildNotificationsFromMetadata=C.buildGqlStatusObjectFromMetadata=C.polyfillNotification=C.polyfillGqlStatusObject=C.GqlStatusObject=C.Notification=C.notificationClassification=C.notificationCategory=C.notificationSeverityLevel=void 0,w(n)),mn=h,gn=V,On={WARNING:{gql_status:"01N42",status_description:"warn: unknown warning"},NO_DATA:{gql_status:"02N42",status_description:"note: no data - unknown subcondition"},INFORMATION:{gql_status:"03N42",status_description:"info: unknown notification"},ERROR:{gql_status:"50N42",status_description:"error: general processing exception - unexpected error"}},wn={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},En=(C.notificationSeverityLevel=wn,Object.freeze(wn),Object.values(wn)),Y={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",SCHEMA:"SCHEMA",UNKNOWN:"UNKNOWN"},Pn=(C.notificationCategory=Y,Object.freeze(Y),Object.values(Y)),Sn=Y,Tn=(C.notificationClassification=Sn,function(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=Nn(e.position),this.severityLevel=xn(e.severity),this.rawSeverityLevel=e.severity,this.category=Dn(e.category),this.rawCategory=e.category}),jn=(C.Notification=Tn,Object.defineProperty(Cn.prototype,"diagnosticRecordAsJsonString",{get:function(){return vn.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),Cn);function Cn(e){var t;this.gqlStatus=e.gql_status,this.statusDescription=e.status_description,this.diagnosticRecord=null!=(t=e.diagnostic_record)?t:{},this.position=null!=this.diagnosticRecord._position?Nn(this.diagnosticRecord._position):void 0,this.severity=xn(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=Dn(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=null!=e.neo4j_code,Object.freeze(this)}function Rn(e){var t;if(null!=e.neo4j_code)return new Tn({code:e.neo4j_code,title:e.title,description:e.description,severity:null==(t=e.diagnostic_record)?void 0:t._severity,category:null==(t=e.diagnostic_record)?void 0:t._classification,position:null==(t=e.diagnostic_record)?void 0:t._position})}function In(e){var t=e.severity===wn.WARNING?On.WARNING:On.INFORMATION,r={gql_status:t.gql_status,status_description:null!=(r=e.description)?r:t.status_description,neo4j_code:e.code,title:e.title,diagnostic_record:dn({},gn.rawPolyfilledDiagnosticRecord)};return null!=e.severity&&(r.diagnostic_record._severity=e.severity),null!=e.category&&(r.diagnostic_record._classification=e.category),null!=e.position&&(r.diagnostic_record._position=e.position),new jn(r)}C.GqlStatusObject=jn,C.polyfillNotification=Rn,C.polyfillGqlStatusObject=In;var An={SUCCESS:new jn({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:gn.rawPolyfilledDiagnosticRecord}),NO_DATA:new jn({gql_status:"02000",status_description:"note: no data",diagnostic_record:gn.rawPolyfilledDiagnosticRecord}),NO_DATA_UNKNOWN_SUBCONDITION:new jn(dn(dn({},On.NO_DATA),{diagnostic_record:gn.rawPolyfilledDiagnosticRecord})),OMITTED_RESULT:new jn({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:gn.rawPolyfilledDiagnosticRecord})};Object.freeze(An),C.buildGqlStatusObjectFromMetadata=function(e){if(null!=e.statuses)return e.statuses.map(function(e){return new jn(e)});var t=!0===(null==(t=e.stream_summary)?void 0:t.have_records_streamed)?An.SUCCESS:!1===(null==t?void 0:t.has_keys)?An.OMITTED_RESULT:!0===(null==t?void 0:t.pulled)?An.NO_DATA:An.NO_DATA_UNKNOWN_SUBCONDITION;return _n([t],yn(null!=(e=null==(t=e.notifications)?void 0:t.map(In))?e:[]),!1).sort(function(e,t){return Mn(e)-Mn(t)})};var kn=Object.freeze({"02":0,"01":1,"00":2});function Mn(e){var e=null==(e=e.gqlStatus)?void 0:e.slice(0,2);return null!=(e=kn[e])?e:9999}function Nn(e){return null==e?{}:{offset:mn.util.toNumber(e.offset),line:mn.util.toNumber(e.line),column:mn.util.toNumber(e.column)}}function xn(e){return En.includes(e)?e:wn.UNKNOWN}function Dn(e){return Pn.includes(e)?e:Sn.UNKNOWN}C.buildNotificationsFromMetadata=function(e){return null!=e.notifications?e.notifications.map(function(e){return new Tn(e)}):null!=e.statuses?e.statuses.map(Rn).filter(function(e){return null!=e}):[]},C.default=Tn,Object.defineProperty(p,"__esModule",{value:!0}),p.Stats=p.QueryStatistics=p.ProfiledPlan=p.Plan=p.ServerInfo=p.queryType=void 0;var Ln=h,Un=C,xr=(Fn.prototype.hasPlan=function(){return this.plan instanceof Bn},Fn.prototype.hasProfile=function(){return this.profile instanceof Wn},Fn);function Fn(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new zn(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new Bn(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new Wn(r.profile),this.notifications=(0,Un.buildNotificationsFromMetadata)(r),this.gqlStatusObjects=(0,Un.buildGqlStatusObjectFromMetadata)(r),this.server=new Hn(r.server,n),this.resultConsumedAfter=r.result_consumed_after,this.resultAvailableAfter=r.result_available_after,this.database={name:null!=(e=r.db)?e:null}}var Bn=function t(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.children=null!=e.children?e.children.map(function(e){return new t(e)}):[]},Wn=(p.Plan=Bn,qn.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},qn);function qn(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=Gn("dbHits",e),this.rows=Gn("rows",e),this.pageCacheMisses=Gn("pageCacheMisses",e),this.pageCacheHits=Gn("pageCacheHits",e),this.pageCacheHitRatio=Gn("pageCacheHitRatio",e),this.time=Gn("time",e),this.children=null!=e.children?e.children.map(function(e){return new qn(e)}):[]}p.ProfiledPlan=Wn;p.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},Vn.prototype.containsUpdates=function(){var r=this;return void 0!==this._containsUpdates?this._containsUpdates:0<Object.keys(this._stats).reduce(function(e,t){return e+r._stats[t]},0)},Vn.prototype.updates=function(){return this._stats},Vn.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},Vn.prototype.systemUpdates=function(){return this._systemUpdates};var zn=Vn;function Vn(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(e){var t=e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()});t in n._stats?n._stats[t]=Ln.util.toNumber(r[e]):"systemUpdates"===t?n._systemUpdates=Ln.util.toNumber(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}p.QueryStatistics=zn;var Hn=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Gn(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?(t=t[e],Ln.util.toNumber(t)):r}p.ServerInfo=Hn;function Yn(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}function Kn(e){console.log("Uncaught error when processing result: "+e)}function Zn(e){}function Qn(e){}p.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},p.default=xr;var Xn,j={},o=(Object.defineProperty(j,"__esModule",{value:!0}),j.notificationFilterDisabledClassification=j.notificationFilterDisabledCategory=j.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),Zr=(j.notificationFilterMinimumSeverityLevel=o,Object.freeze(o),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"}),S=(j.notificationFilterDisabledCategory=Zr,Object.freeze(Zr),Zr),pn=(j.notificationFilterDisabledClassification=S,j.default=Yn,{}),Jn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},$n=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},eo=(Object.defineProperty(pn,"__esModule",{value:!0}),E(p)),to=h,ro=t,no=to.connectionHolder.EMPTY_CONNECTION_HOLDER;function oo(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[Xn]="Result",this._stack=null==(i=new Error("")).stack?null:i.stack.replace(/^Error(\n\r)*/,""),this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:no,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}oo.prototype.keys=function(){var n=this;return null!==this._keys?Promise.resolve(this._keys):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){return e.subscribe(n._decorateObserver({onKeys:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},oo.prototype.summary=function(){var n=this;return null!==this._summary?Promise.resolve(this._summary):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){e.cancel(),e.subscribe(n._decorateObserver({onCompleted:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},oo.prototype._getOrCreatePromise=function(){var e=this;return null==this._p&&(this._p=new Promise(function(t,r){var n=[];e.subscribe({onNext:function(e){n.push(e)},onCompleted:function(e){t({records:n,summary:e})},onError:function(e){r(e)}})})),this._p},oo.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,ro.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return Jn(n,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:return void 0!==u.queuedObserver?[3,2]:(u.queuedObserver=this._createQueuedResultObserver(r),t=u,[4,this._subscribe(u.queuedObserver,!0).catch(function(){})]);case 1:t.streaming=e.sent(),r(),e.label=2;case 2:return[2,u.queuedObserver]}})})}function i(e){if(void 0===e)throw(0,ro.newError)("InvalidState: Result stream finished without Summary",ro.PROTOCOL_ERROR);return 1}var u={paused:!0,firstRun:!0,finished:!1},r=function(){var e,t;null!=u.streaming&&(e=(t=null!=(t=null==(t=u.queuedObserver)?void 0:t.size)?t:0)>=n._watermarks.high,t=t<=n._watermarks.low,e&&!u.paused?(u.paused=!0,u.streaming.pause()):(t&&u.paused||u.firstRun&&!e)&&(u.firstRun=!1,u.paused=!1,u.streaming.resume()))};return{next:function(){return Jn(n,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().dequeue()];case 2:return!0===(t=e.sent()).done&&(u.finished=t.done,u.summary=t.value),[2,t]}})})},return:function(r){return Jn(n,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:null!=r?r:u.summary}]:(null!=(t=u.streaming)&&t.cancel(),[4,o()]);case 1:return[4,e.sent().dequeueUntilDone()];case 2:return t=e.sent(),u.finished=!0,t.value=null!=r?r:t.value,u.summary=t.value,[2,t]}})})},peek:function(){return Jn(n,void 0,void 0,function(){return $n(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().head()];case 2:return[2,e.sent()]}})})}}},oo.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},oo.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},oo.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},oo.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},oo.prototype.isOpen=function(){return null===this._summary&&null===this._error},oo.prototype._subscribe=function(e,t){void 0===t&&(t=!1);var r=this._decorateObserver(e);return this._streamObserverPromise.then(function(e){return t&&e.pause(),e.subscribe(r),e}).catch(function(e){return null!=r.onError&&r.onError(e),Promise.reject(e)})},oo.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:Zn,i=null!=(e=n.onError)?e:Kn,r=null!=(e=n.onKeys)?e:Qn;return{onNext:null!=n.onNext?n.onNext.bind(n):void 0,onKeys:function(e){return o._keys=e,r.call(n,e)},onCompleted:function(e){o._releaseConnectionAndGetSummary(e).then(function(e){return null!==o._summary?t.call(n,o._summary):(o._summary=e,t.call(n,e))}).catch(i)},onError:function(r){o._connectionHolder.releaseConnection().then(function(){var e,t;e=r,null!=(t=o._stack)&&(e.stack=e.toString()+"\n"+t),o._error=r,i.call(n,r)}).catch(i)}}},oo.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},oo.prototype._releaseConnectionAndGetSummary=function(t){var e=to.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(e){return o.releaseConnection().then(function(){return null==e?void 0:e.getProtocolVersion()})},function(e){}).then(function(e){return new eo.default(r,n,t,e)})},oo.prototype._createQueuedResultObserver=function(n){var e=this;function o(){var r={};return r.promise=new Promise(function(e,t){r.resolve=e,r.reject=t}),r}function i(e){return e instanceof Error}function r(){var r;return Jn(this,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,ro.newError)("Unexpected empty buffer",ro.PROTOCOL_ERROR),n(),i(t))throw t;return[2,t]}return a.resolvable=o(),[4,a.resolvable.promise];case 1:return[2,e.sent()]}})})}var u=[],a={resolvable:null},t={onNext:function(e){t._push({done:!1,value:e})},onCompleted:function(e){t._push({done:!0,value:e})},onError:function(e){t._push(e)},_push:function(e){var t;null!==a.resolvable?(t=a.resolvable,a.resolvable=null,i(e)?t.reject(e):t.resolve(e)):(u.push(e),n())},dequeue:r,dequeueUntilDone:function(){return Jn(e,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:return[4,r()];case 1:return!0===(t=e.sent()).done?[2,t]:[3,0];case 2:return[2]}})})},head:function(){return Jn(e,void 0,void 0,function(){var t,r;return $n(this,function(e){switch(e.label){case 0:if(0<u.length){if(i(t=u[0]))throw t;return[2,t]}a.resolvable=o(),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,a.resolvable.promise];case 2:return t=e.sent(),u.unshift(t),[2,t];case 3:throw r=e.sent(),u.unshift(r),r;case 4:return n(),[7];case 5:return[2]}})})},get size(){return u.length}};return t},Xn=Symbol.toStringTag,pn.default=oo;T={};Object.defineProperty(T,"__esModule",{value:!0});T.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};O={},Object.defineProperty(O,"__esModule",{value:!0}),O.Releasable=void 0,io.prototype.release=function(){throw new Error("Not implemented")},w=io;function io(){}function uo(){}O.Releasable=w,uo.prototype.acquireConnection=function(e){throw Error("Not implemented")},uo.prototype.supportsMultiDb=function(){throw Error("Not implemented")},uo.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},uo.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},uo.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},uo.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},uo.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},uo.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},uo.prototype.close=function(){throw Error("Not implemented")},O.default=uo;V={};function ao(){}Object.defineProperty(V,"__esModule",{value:!0}),ao.prototype.beginTransaction=function(e){throw new Error("Not implemented")},ao.prototype.run=function(e,t,r){throw new Error("Not implemented")},ao.prototype.commitTransaction=function(e){throw new Error("Not implemented")},ao.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},ao.prototype.resetAndFlush=function(){throw new Error("Not implemented")},ao.prototype.isOpen=function(){throw new Error("Not implemented")},ao.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},ao.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},V.default=ao;var Y={},so=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},co=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},xr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lo=(Object.defineProperty(Y,"__esModule",{value:!0}),s),fo=Nt,po=y,ho=m,bo=b,yo=t,_o=xr(pn);function vo(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,f=this;this._connectionHolder=t,this._reactive=i,this._state=mo.ACTIVE,this._onClose=r,this._onBookmarks=n,this._onConnection=o,this._onError=this._onErrorCallback.bind(this),this._fetchSize=u,this._onComplete=this._onCompleteCallback.bind(this),this._results=[],this._impersonatedUser=a,this._lowRecordWatermak=c,this._highRecordWatermark=s,this._bookmarks=po.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}vo.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return so(t,void 0,void 0,function(){var t,r=this;return co(this,function(e){switch(e.label){case 0:return(this._onConnection(),null==n)?[3,2]:(t=this,[4,o()]);case 1:return t._bookmarks=e.sent(),[2,n.beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(e){null!=u&&u.onError(e),r._onError(e).catch(function(){})},afterComplete:function(e){null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,yo.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},vo.prototype.run=function(e,t){e=(0,lo.validateQueryAndParameters)(e,t),t=e.validatedQuery,e=e.params,t=this._state.run(t,e,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,reactive:this._reactive,fetchSize:this._fetchSize,highRecordWatermark:this._highRecordWatermark,lowRecordWatermark:this._lowRecordWatermak,preparationJob:this._activePromise});return this._results.push(t),t},vo.prototype.commit=function(){var t=this,r=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:function(e){return t._onCompleteCallback(e,t._bookmarks)},onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},vo.prototype.rollback=function(){var r=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},vo.prototype.isOpen=function(){return this._state===mo.ACTIVE},vo.prototype.close=function(){return so(this,void 0,void 0,function(){return co(this,function(e){switch(e.label){case 0:return this.isOpen()?[4,this.rollback()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},vo.prototype[Symbol.asyncDispose]=function(){return this.close()},vo.prototype._onErrorCallback=function(t){return this._state===mo.FAILED?Promise.resolve(null):(this._state=mo.FAILED,this._onClose(),this._results.forEach(function(e){e.isOpen()&&e._streamObserverPromise.then(function(e){return e.onError(t)}).catch(function(e){})}),this._connectionHolder.releaseConnection())},vo.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new po.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:po.Bookmarks.empty(),null==e?void 0:e.db)};var mo={ACTIVE:{commit:function(e){return{result:go(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:mo.SUCCEEDED}},rollback:function(e){return{result:go(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:mo.ROLLED_BACK}},run:function(t,r,e){var n=e.connectionHolder,o=e.onError,i=e.onComplete,u=e.onConnection,a=e.reactive,s=e.fetchSize,c=e.highRecordWatermark,l=e.lowRecordWatermark,e=e.preparationJob,f=null!=e?e:Promise.resolve();return Oo(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:po.Bookmarks.empty(),txConfig:ho.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,yo.newError)("No connection available")}).catch(function(e){return new bo.FailedObserver({error:e,onError:o})}),t,r,n,c,l)}},FAILED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),"COMMIT",{},t,0,0),state:mo.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:Oo(new bo.CompletedObserver,"ROLLBACK",{},t,0,0),state:mo.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:o}),e,t,n,0,0)}},SUCCEEDED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},fo.EMPTY_CONNECTION_HOLDER,0,0),state:mo.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},fo.EMPTY_CONNECTION_HOLDER,0,0),state:mo.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot run query in this transaction, because it has already been committed."),onError:o}),e,t,n,0,0)}},ROLLED_BACK:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:mo.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:mo.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function go(r,e,n,o,i,u,t){var a=null!=t?t:Promise.resolve(),t=e.getConnection().then(function(e){return a.then(function(){return e})}).then(function(t){return i(),u.forEach(function(e){return e._cancel()}),Promise.all(u.map(function(e){return e.summary()})).then(function(e){if(null!=t)return r?t.commitTransaction({beforeError:n,afterComplete:o}):t.rollbackTransaction({beforeError:n,afterComplete:o});throw(0,yo.newError)("No connection available")})}).catch(function(e){return new bo.FailedObserver({error:e,onError:n})});return new _o.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function Oo(e,t,r,n,o,i){return void 0===n&&(n=fo.EMPTY_CONNECTION_HOLDER),new _o.default(Promise.resolve(e),t,r,new fo.ReadOnlyConnectionHolder(null!=n?n:fo.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}Y.default=vo;o={};function wo(e){e=e.run;this._run=e}Object.defineProperty(o,"__esModule",{value:!0}),wo.fromTransaction=function(e){return new wo({run:e.run.bind(e)})},wo.prototype.run=function(e,t){return this._run(e,t)},o.default=wo;var Eo,Po,So,Zr={},S=r&&r.__extends||(Eo=function(e,t){return(Eo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Eo(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),To=r&&r.__assign||function(){return(To=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w=(Object.defineProperty(Zr,"__esModule",{value:!0}),E(Y)),xr=(So=w.default,S(jo,So),jo.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},jo.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},jo.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},jo.prototype._getOrCreateBeginPromise=function(){var r=this;return null==this._beginPromise&&(this._beginPromise=new Promise(function(e,t){r._resolve=e,r._reject=t,null!=r._beginError&&t(r._beginError),null!=r._beginMetadata&&e(r._toTransaction())})),this._beginPromise},jo.prototype._toTransaction=function(){return To(To({},this),{run:So.prototype.run.bind(this),commit:So.prototype.commit.bind(this),rollback:So.prototype.rollback.bind(this),close:So.prototype.close.bind(this),isOpen:So.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},jo.prototype._begin=function(e,t){return So.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},jo.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},jo.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},jo);function jo(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,t=So.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:l,apiTelemetryConfig:e})||this;return t[Po]="TransactionPromise",t}Po=Symbol.toStringTag,Zr.default=xr;var E={},Co=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ro=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Io=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ao=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ko=(Object.defineProperty(E,"__esModule",{value:!0}),b),Mo=s,No=_,xo=t,Do=w(pn),Lo=Nt,Uo=g,Fo=y,Bo=m,Wo=w(Zr),qo=w(o);function zo(e){var t=e.mode,r=e.connectionProvider,n=e.bookmarks,o=e.database,i=e.config,u=e.reactive,a=e.fetchSize,s=e.impersonatedUser,c=e.bookmarkManager,l=e.notificationFilter,f=e.auth,e=e.log,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new Lo.ConnectionHolder({mode:No.ACCESS_MODE_READ,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._writeConnectionHolder=new Lo.ConnectionHolder({mode:No.ACCESS_MODE_WRITE,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:Fo.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Uo.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=l,this._log=e}zo.prototype.run=function(e,t,r){var o=this,e=(0,Mo.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Bo.TxConfig(r,this._log):Bo.TxConfig.empty(),t=this._run(i,u,function(n){return Co(o,void 0,void 0,function(){var t,r=this;return Ro(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,apiTelemetryConfig:{api:No.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(e){return r._onCompleteCallback(e,t)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter})]}})})});return this._results.push(t),t},zo.prototype._run=function(e,t,r){var r=this._acquireAndConsumeConnection(r),n=r.connectionHolder,r=r.resultPromise.catch(function(e){return Promise.resolve(new ko.FailedObserver({error:e}))}),o={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new Do.default(r,e,t,n,o)},zo.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return Co(r,void 0,void 0,function(){return Ro(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},zo.prototype._acquireAndConsumeConnection=function(t){var e=this._connectionHolderWithMode(this._mode),r=this._open?!this._hasTx&&e.initializeConnection()?e.getConnection().then(function(e){return t(e)}):Promise.reject((0,xo.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,xo.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:r}},zo.prototype.beginTransaction=function(e){var t=Bo.TxConfig.empty();return null!=e&&(t=new Bo.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:No.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},zo.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,xo.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,xo.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");e=zo._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new Wo.default({connectionHolder:e,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(e,t,r){return n._updateBookmarks(e,t,r)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:r});return e._begin(function(){return n._bookmarks()},t),e},zo.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,xo.newError)("You cannot run more transactions on a closed session.")},zo.prototype._transactionClosed=function(){this._hasTx=!1},zo.prototype.lastBookmark=function(){return this.lastBookmarks()},zo.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},zo.prototype._bookmarks=function(){var r;return Co(this,void 0,void 0,function(){var t;return Ro(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Fo.Bookmarks(Ao(Ao([],Io(t),!1),Io(this._configuredBookmarks),!1))]}})})},zo.prototype.readTransaction=function(e,t){t=new Bo.TxConfig(t,this._log);return this._runTransaction(No.ACCESS_MODE_READ,t,e)},zo.prototype.writeTransaction=function(e,t){t=new Bo.TxConfig(t,this._log);return this._runTransaction(No.ACCESS_MODE_WRITE,t,e)},zo.prototype._runTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e)},zo.prototype.executeRead=function(e,t){t=new Bo.TxConfig(t,this._log);return this._executeInTransaction(No.ACCESS_MODE_READ,t,e)},zo.prototype.executeWrite=function(e,t){t=new Bo.TxConfig(t,this._log);return this._executeInTransaction(No.ACCESS_MODE_WRITE,t,e)},zo.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,qo.default.fromTransaction)},zo.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},zo.prototype._getConnectionAcquistionBookmarks=function(){var r;return Co(this,void 0,void 0,function(){var t;return Ro(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Fo.Bookmarks(Ao(Ao([],Io(this._configuredBookmarks),!1),Io(t),!1))]}})})},zo.prototype._updateBookmarks=function(e,t,r){var n;null==e||e.isEmpty()||(null!=(n=this._bookmarkManager)&&n.updateBookmarks(null!=(n=null==t?void 0:t.values())?n:[],null!=(t=null==e?void 0:e.values())?t:[]).catch(function(){}),this._lastBookmarks=e,this._configuredBookmarks=Fo.Bookmarks.empty())},zo.prototype.close=function(){return Co(this,void 0,void 0,function(){return Ro(this,function(e){switch(e.label){case 0:return this._open?(this._open=!1,this._results.forEach(function(e){return e._cancel()}),this._transactionExecutor.close(),[4,this._readConnectionHolder.close(this._hasTx)]):[3,3];case 1:return e.sent(),[4,this._writeConnectionHolder.close(this._hasTx)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},zo.prototype[Symbol.asyncDispose]=function(){return this.close()},zo.prototype._connectionHolderWithMode=function(e){if(e===No.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===No.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,xo.newError)("Unknown access mode: "+e)},zo.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new Fo.Bookmarks(e.bookmark),t,e.db)},zo.prototype._calculateWatermaks=function(){return this._fetchSize===No.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},zo.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},zo._validateSessionMode=function(e){e=null!=e?e:No.ACCESS_MODE_WRITE;if(e!==No.ACCESS_MODE_READ&&e!==No.ACCESS_MODE_WRITE)throw(0,xo.newError)("Illegal session mode "+e);return e},E.default=zo;var S={},xr={},Vo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ho=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Go=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Yo=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ko=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},b=(Object.defineProperty(xr,"__esModule",{value:!0}),xr.bookmarkManager=void 0,Zo.prototype.updateBookmarks=function(e,t){return Vo(this,void 0,void 0,function(){return Ho(this,function(e){throw new Error("Not implemented")})})},Zo.prototype.getBookmarks=function(){return Vo(this,void 0,void 0,function(){return Ho(this,function(e){throw new Error("Not implemented")})})},Zo);function Zo(){throw new Error("Not implemented")}xr.default=b,xr.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Qo(t,e.bookmarksSupplier,e.bookmarksConsumer)};Xo.prototype.updateBookmarks=function(f,p){return Vo(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return Ho(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=Go(f),n=r.next();!n.done;n=r.next())u=n.value,t.delete(u)}catch(e){a={error:e}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}try{for(o=Go(p),i=o.next();!i.done;i=o.next())u=i.value,t.add(u)}catch(e){c={error:e}}finally{try{i&&!i.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}}return"function"!=typeof this._bookmarksConsumer?[3,2]:[4,this._bookmarksConsumer(Ko([],Yo(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Xo.prototype.getBookmarks=function(){var s;return Vo(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return Ho(this,function(e){switch(e.label){case 0:return t=new Set(this._bookmarks),"function"!=typeof this._bookmarksSupplier?[3,2]:[4,this._bookmarksSupplier()];case 1:r=null!=(s=e.sent())?s:[];try{for(n=Go(r),o=n.next();!o.done;o=n.next())i=o.value,t.add(i)}catch(e){u={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(u)throw u.error}}e.label=2;case 2:return[2,Ko([],Yo(t),!1)]}})})};var Qo=Xo;function Xo(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Nt={},Jo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},$o=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ei=(Object.defineProperty(Nt,"__esModule",{value:!0}),g(T)),ti=t;function ri(){}ri.prototype.eagerResultTransformer=function(){return ni},ri.prototype.eager=function(){return ni},ri.prototype.mappedResultTransformer=function(e){return oi(e)},ri.prototype.mapped=function(e){return oi(e)},ri.prototype.first=function(){return ii},ri.prototype.summary=function(){return ui};m=new ri;function ni(o){return Jo(this,void 0,void 0,function(){var t,r,n;return $o(this,function(e){switch(e.label){case 0:return[4,o];case 1:return r=e.sent(),t=r.summary,r=r.records,[4,o.keys()];case 2:return n=e.sent(),[2,new ei.default(n,r,t)]}})})}function oi(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,ti.newError)("Requires a map or/and a collect functions.");return function(o){return Jo(e,void 0,void 0,function(){return $o(this,function(e){switch(e.label){case 0:return[4,new Promise(function(t,r){var n={records:[],keys:[]};o.subscribe({onKeys:function(e){n.keys=e},onNext:function(e){var t;null!=i.map?void 0!==(t=i.map(e))&&n.records.push(t):n.records.push(e)},onCompleted:function(e){null!=i.collect?t(i.collect(n.records,e,n.keys)):(e={records:n.records,summary:e,keys:n.keys},t(e))},onError:function(e){r(e)}})})];case 1:return[2,e.sent()]}})})}}function ii(o){return Jo(this,void 0,void 0,function(){var t,r,n;return $o(this,function(e){switch(e.label){case 0:return[4,(t=o[Symbol.asyncIterator]()).next()];case 1:n=e.sent(),r=n.value,n=n.done,e.label=2;case 2:return e.trys.push([2,,3,6]),!0===n?[2,void 0]:[2,r];case 3:return null==t.return?[3,5]:[4,t.return()];case 4:e.sent(),e.label=5;case 5:return[7];case 6:return[2]}})})}function ui(t){return Jo(this,void 0,void 0,function(){return $o(this,function(e){switch(e.label){case 0:return[4,t.summary()];case 1:return[2,e.sent()]}})})}Object.freeze(m),Nt.default=m;var w={},ai=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},si=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ci=(Object.defineProperty(w,"__esModule",{value:!0}),_);function li(e){this._createSession=e}li.prototype.execute=function(o,i,u){return ai(this,void 0,void 0,function(){var t,r,n=this;return si(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser,auth:o.auth}),r=function(e,t,r){"function"==typeof(null==e?void 0:e.addEventListener)&&e.addEventListener(t,r);return{uninstall:function(){"function"==typeof(null==e?void 0:e.removeEventListener)&&e.removeEventListener(t,r)}}}(o.signal,"abort",function(){return ai(n,void 0,void 0,function(){return si(this,function(e){switch(e.label){case 0:return[4,t.close()];case 1:return[2,e.sent()]}})})}),t._configureTransactionExecutor(!0,ci.TELEMETRY_APIS.EXECUTE_QUERY),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READ"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return ai(n,void 0,void 0,function(){var t;return si(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})},o.transactionConfig)];case 2:return[2,e.sent()];case 3:return r.uninstall(),[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},w.default=li;function fi(){this.routing=Ri.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0,this.auth=void 0,this.signal=void 0}var pi=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},di=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hi=(Object.defineProperty(S,"__esModule",{value:!0}),S.QueryConfig=S.SessionConfig=S.routing=S.WRITE=S.READ=S.Driver=void 0,y),bi=b(P),yi=_,_i=v,vi=b(E),mi=s,gi=xr,Oi=b(Nt),wi=b(w),Ei=t,Pi=36e5,Si=1e3,Ti=yi.ACCESS_MODE_READ,ji=(S.READ=Ti,yi.ACCESS_MODE_WRITE),Ci=(S.WRITE=ji,0),Ri=(S.SessionConfig=function(){this.defaultAccessMode=ji,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.auth=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0},{WRITE:"WRITE",READ:"READ"}),g=(S.routing=Ri,Object.freeze(Ri),S.QueryConfig=fi,Object.defineProperty(Ii.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Ii.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),pi(this,void 0,void 0,function(){var t,r,n;return di(this,function(e){switch(e.label){case 0:if(t=null===u.bookmarkManager?void 0:null!=(a=u.bookmarkManager)?a:this.executeQueryBookmarkManager,r=null!=(a=u.resultTransformer)?a:Oi.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:Ri.WRITE)!==Ri.READ&&n!==Ri.WRITE)throw(0,Ei.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser,transactionConfig:u.transactionConfig,auth:u.auth,signal:u.signal},o,i)];case 1:return[2,e.sent()]}})})},Ii.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ti})},Ii.prototype.verifyAuthentication=function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return pi(this,void 0,void 0,function(){return di(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:Ti})];case 1:return[2,e.sent()]}})})},Ii.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ti})},Ii.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Ii.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Ii.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Ii.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},Ii.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Ii.prototype.isEncrypted=function(){return this._isEncrypted()},Ii.prototype._supportsRouting=function(){return this._meta.routing},Ii.prototype._isEncrypted=function(){return this._config.encrypted===mi.ENCRYPTION_ON||!0===this._config.encrypted},Ii.prototype._getTrust=function(){return this._config.trust},Ii.prototype.session=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.impersonatedUser,i=e.fetchSize,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return this._newSession({defaultAccessMode:void 0===t?ji:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:ki(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},Ii.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Ii.prototype[Symbol.asyncDispose]=function(){return this.close()},Ii.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Ii.prototype._newSession=function(e){var t=e.defaultAccessMode,r=e.bookmarkOrBookmarks,n=e.database,o=e.reactive,i=e.impersonatedUser,u=e.fetchSize,a=e.bookmarkManager,s=e.notificationFilter,e=e.auth,t=vi.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),r=null!=r?new hi.Bookmarks(r):hi.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:c,bookmarks:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:s,auth:e,log:this._log})},Ii.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new bi.default(e.resolver)))),this._connectionProvider},Ii);function Ii(e,t,r,n,o){void 0===n&&(n=function(e){return new vi.default(e)}),void 0===o&&(o=function(e){return new wi.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Ai(i.maxConnectionLifetime,Pi),i.maxConnectionPoolSize=Ai(i.maxConnectionPoolSize,yi.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Ai(i.connectionAcquisitionTimeout,yi.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=ki(i.fetchSize,Si),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?yi.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i),i.connectionLivenessCheckTimeout=function(e){if(null==e)return;e=parseInt(e,10);if(e<0||Number.isNaN(e))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(e));return e}(i.connectionLivenessCheckTimeout);var i=_i.Logger.create(t);!function(e,t){var r=e.resolver;if(null!=r&&"function"!=typeof r)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof r));e.connectionAcquisitionTimeout<e.connectionTimeout&&t.warn('Configuration for "connectionAcquisitionTimeout" should be greater than or equal to "connectionTimeout". Otherwise, the connection acquisition timeout will take precedence for over the connection timeout in scenarios where a new connection is created while it is acquired');if(null==(null==(r=e.notificationFilter)?void 0:r.disabledCategories)||null==(null==(t=e.notificationFilter)?void 0:t.disabledClassifications))return;throw new Error('The notificationFilter can\'t have both "disabledCategories" and "disabledClassifications" configured at the same time.')}(t,i),this._id=Ci++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,gi.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function Ai(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function ki(e,t){e=parseInt(e,10);if(0<e||e===yi.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(yi.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}S.Driver=g,S.default=g;m={};function Mi(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(m,"__esModule",{value:!0}),m.default={basic:function(e,t,r){return null!=r?{scheme:"basic",principal:e,credentials:t,realm:r}:{scheme:"basic",principal:e,credentials:t}},kerberos:function(e){return{scheme:"kerberos",principal:"",credentials:e}},bearer:function(e){return{scheme:"bearer",credentials:e}},none:function(){return{scheme:"none"}},custom:function(e,t,r,n,o){n={scheme:n,principal:e};return Mi(t)&&(n.credentials=t),Mi(r)&&(n.realm=r),Mi(o)&&(n.parameters=o),n}};var y={},Ni=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},xi=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Di=(Object.defineProperty(y,"__esModule",{value:!0}),y.staticAuthTokenManager=y.authTokenManagers=y.AuthTokenAndExpiration=void 0,P(m)),Li=h;function Ui(){}function Fi(){}Ui.prototype.getToken=function(){throw new Error("Not Implemented")},Ui.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},y.default=Ui,y.AuthTokenAndExpiration=function(){this.token=Di.default.none(),this.expiration=void 0},Fi.prototype.bearer=function(e){e=e.tokenProvider;if("function"!=typeof e)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof e));return new qi(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},Fi.prototype.basic=function(e){var t=this,r=e.tokenProvider;if("function"!=typeof r)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof r));return new qi(function(){return Ni(t,void 0,void 0,function(){var t;return xi(this,function(e){switch(e.label){case 0:return t={},[4,r()];case 1:return[2,(t.token=e.sent(),t)]}})})},["Neo.ClientError.Security.Unauthorized"])};_=new Fi;y.authTokenManagers=_,Object.freeze(_),y.staticAuthTokenManager=function(e){return e=e.authToken,new Vi(e)};Wi.prototype.subscribe=function(e){this._subscribers.push(e)},Wi.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},Wi.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var Bi=Wi;function Wi(e){this._subscribers=e=void 0===e?[]:e}zi.prototype.getToken=function(){var t;return Ni(this,void 0,void 0,function(){return xi(this,function(e){switch(e.label){case 0:return void 0===this._currentAuthData||void 0!==this._currentAuthData.expiration&&this._currentAuthData.expiration<new Date?[4,this._refreshAuthToken()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2,null==(t=this._currentAuthData)?void 0:t.token]}})})},zi.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(Li.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},zi.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new Bi,Promise.resolve(this._tokenProvider()).then(function(e){var t;r._currentAuthData=e,null!=(t=r._refreshObservable)&&t.onCompleted(e)}).catch(function(e){var t;null!=(t=r._refreshObservable)&&t.onError(e)}).finally(function(){r._refreshObservable=void 0})),void 0!==e&&this._refreshObservable.subscribe(e)},zi.prototype._refreshAuthToken=function(){return Ni(this,void 0,void 0,function(){var r=this;return xi(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e,t){r._scheduleRefreshAuthToken({onCompleted:e,onError:t})})];case 1:return[2,e.sent()]}})})};var qi=zi;function zi(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}Hi.prototype.getToken=function(){return this._authToken},Hi.prototype.handleSecurityException=function(e,t){return!1};var Vi=Hi;function Hi(e){this._authToken=e}function Gi(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0}var Yi,Ki,v={},s=r&&r.__extends||(Yi=function(e,t){return(Yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Yi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),b=(Object.defineProperty(v,"__esModule",{value:!0}),v.InternalConfig=v.Config=void 0,v.Config=Gi,s(Zi,Ki=Gi),Zi);function Zi(){return null!==Ki&&Ki.apply(this,arguments)||this}v.InternalConfig=b;var Qi,w={},g=r&&r.__extends||(Qi=function(e,t){return(Qi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Qi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Xi=r&&r.__assign||function(){return(Xi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ji=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),$i=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),P=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Ji(t,e,r);return $i(t,e),t},eu=(Object.defineProperty(w,"__esModule",{value:!0}),w.resolveCertificateProvider=w.clientCertificateProviders=w.RotatingClientCertificateProvider=w.ClientCertificateProvider=void 0,P(n)),_=(w.default=function(){this.certfile="",this.keyfile="",this.password=void 0},tu.prototype.hasUpdate=function(){throw new Error("Not Implemented")},tu.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},tu);function tu(){}w.ClientCertificateProvider=_;g(nu,ru=_),nu.prototype.updateCertificate=function(e){throw new Error("Not implemented")};var ru,s=nu;function nu(){return null!==ru&&ru.apply(this,arguments)||this}function ou(){}w.RotatingClientCertificateProvider=s,ou.prototype.rotating=function(e){e=e.initialCertificate;if(null==e||!iu(e))throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(eu.stringify(e)));e=Xi({},e);return new Pu(e)};b=new ou;function iu(e){return null!=e&&"object"==typeof e&&"certfile"in e&&(uu(r=e.certfile)||au(r,uu))&&"keyfile"in e&&(t(r=e.keyfile)||au(r,t))&&su("password",e);function t(e){return"string"==typeof e||null!=e&&"object"==typeof e&&"path"in e&&"string"==typeof e.path&&su("password",e)}var r}function uu(e){return"string"==typeof e}function au(e,t,r){return void 0===r&&(r=!1),Array.isArray(e)&&(r||0<e.length)&&e.filter(t).length===e.length}function su(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}w.clientCertificateProviders=b,Object.freeze(b),w.resolveCertificateProvider=function(e){if(null!=e){if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;var t;if(iu(e))return t=Xi({},e),{getClientCertificate:function(){return t},hasUpdate:function(){return!1}};throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(eu.stringify(e)))}};Su.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},Su.prototype.getClientCertificate=function(){return this._certificate},Su.prototype.updateCertificate=function(e){if(!iu(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(eu.stringify(e)));this._certificate=Xi({},e),this._updated=!0};var cu,lu,fu,pu,du,hu,bu,yu,_u,vu,mu,gu,Ou,wu,Eu,Pu=Su;function Su(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}P=e,cu=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),lu=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),g=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&cu(t,e,r);return lu(t,e),t},_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(P,"__esModule",{value:!0}),P.EagerResult=P.Result=P.Stats=P.QueryStatistics=P.ProfiledPlan=P.Plan=P.GqlStatusObject=P.Notification=P.ServerInfo=P.queryType=P.ResultSummary=P.Record=P.isPathSegment=P.PathSegment=P.isPath=P.Path=P.isUnboundRelationship=P.UnboundRelationship=P.isRelationship=P.Relationship=P.isNode=P.Node=P.Time=P.LocalTime=P.LocalDateTime=P.isTime=P.isLocalTime=P.isLocalDateTime=P.isDuration=P.isDateTime=P.isDate=P.Duration=P.DateTime=P.Date=P.Point=P.isPoint=P.internal=P.toString=P.toNumber=P.inSafeRange=P.isInt=P.int=P.Integer=P.error=P.isRetriableError=P.GQLError=P.newGQLError=P.Neo4jError=P.newError=P.authTokenManagers=void 0,P.resolveCertificateProvider=P.clientCertificateProviders=P.notificationFilterMinimumSeverityLevel=P.notificationFilterDisabledClassification=P.notificationFilterDisabledCategory=P.notificationSeverityLevel=P.notificationClassification=P.notificationCategory=P.resultTransformers=P.routing=P.staticAuthTokenManager=P.bookmarkManager=P.auth=P.json=P.driver=P.types=P.Driver=P.Session=P.TransactionPromise=P.ManagedTransaction=P.Transaction=P.Connection=P.Releasable=P.ConnectionProvider=void 0,fu=t,Object.defineProperty(P,"newError",{enumerable:!0,get:function(){return fu.newError}}),Object.defineProperty(P,"Neo4jError",{enumerable:!0,get:function(){return fu.Neo4jError}}),Object.defineProperty(P,"newGQLError",{enumerable:!0,get:function(){return fu.newGQLError}}),Object.defineProperty(P,"GQLError",{enumerable:!0,get:function(){return fu.GQLError}}),Object.defineProperty(P,"isRetriableError",{enumerable:!0,get:function(){return fu.isRetriableError}}),pu=g(i),P.Integer=pu.default,Object.defineProperty(P,"int",{enumerable:!0,get:function(){return pu.int}}),Object.defineProperty(P,"isInt",{enumerable:!0,get:function(){return pu.isInt}}),Object.defineProperty(P,"inSafeRange",{enumerable:!0,get:function(){return pu.inSafeRange}}),Object.defineProperty(P,"toNumber",{enumerable:!0,get:function(){return pu.toNumber}}),Object.defineProperty(P,"toString",{enumerable:!0,get:function(){return pu.toString}}),du=u,Object.defineProperty(P,"Date",{enumerable:!0,get:function(){return du.Date}}),Object.defineProperty(P,"DateTime",{enumerable:!0,get:function(){return du.DateTime}}),Object.defineProperty(P,"Duration",{enumerable:!0,get:function(){return du.Duration}}),Object.defineProperty(P,"isDate",{enumerable:!0,get:function(){return du.isDate}}),Object.defineProperty(P,"isDateTime",{enumerable:!0,get:function(){return du.isDateTime}}),Object.defineProperty(P,"isDuration",{enumerable:!0,get:function(){return du.isDuration}}),Object.defineProperty(P,"isLocalDateTime",{enumerable:!0,get:function(){return du.isLocalDateTime}}),Object.defineProperty(P,"isLocalTime",{enumerable:!0,get:function(){return du.isLocalTime}}),Object.defineProperty(P,"isTime",{enumerable:!0,get:function(){return du.isTime}}),Object.defineProperty(P,"LocalDateTime",{enumerable:!0,get:function(){return du.LocalDateTime}}),Object.defineProperty(P,"LocalTime",{enumerable:!0,get:function(){return du.LocalTime}}),Object.defineProperty(P,"Time",{enumerable:!0,get:function(){return du.Time}}),hu=f,Object.defineProperty(P,"Node",{enumerable:!0,get:function(){return hu.Node}}),Object.defineProperty(P,"isNode",{enumerable:!0,get:function(){return hu.isNode}}),Object.defineProperty(P,"Relationship",{enumerable:!0,get:function(){return hu.Relationship}}),Object.defineProperty(P,"isRelationship",{enumerable:!0,get:function(){return hu.isRelationship}}),Object.defineProperty(P,"UnboundRelationship",{enumerable:!0,get:function(){return hu.UnboundRelationship}}),Object.defineProperty(P,"isUnboundRelationship",{enumerable:!0,get:function(){return hu.isUnboundRelationship}}),Object.defineProperty(P,"Path",{enumerable:!0,get:function(){return hu.Path}}),Object.defineProperty(P,"isPath",{enumerable:!0,get:function(){return hu.isPath}}),Object.defineProperty(P,"PathSegment",{enumerable:!0,get:function(){return hu.PathSegment}}),Object.defineProperty(P,"isPathSegment",{enumerable:!0,get:function(){return hu.isPathSegment}}),s=_(it),P.Record=s.default,bu=c,Object.defineProperty(P,"isPoint",{enumerable:!0,get:function(){return bu.isPoint}}),Object.defineProperty(P,"Point",{enumerable:!0,get:function(){return bu.Point}}),yu=g(p),P.ResultSummary=yu.default,Object.defineProperty(P,"queryType",{enumerable:!0,get:function(){return yu.queryType}}),Object.defineProperty(P,"ServerInfo",{enumerable:!0,get:function(){return yu.ServerInfo}}),Object.defineProperty(P,"Plan",{enumerable:!0,get:function(){return yu.Plan}}),Object.defineProperty(P,"ProfiledPlan",{enumerable:!0,get:function(){return yu.ProfiledPlan}}),Object.defineProperty(P,"QueryStatistics",{enumerable:!0,get:function(){return yu.QueryStatistics}}),Object.defineProperty(P,"Stats",{enumerable:!0,get:function(){return yu.Stats}}),_u=g(C),P.Notification=_u.default,Object.defineProperty(P,"GqlStatusObject",{enumerable:!0,get:function(){return _u.GqlStatusObject}}),Object.defineProperty(P,"notificationCategory",{enumerable:!0,get:function(){return _u.notificationCategory}}),Object.defineProperty(P,"notificationClassification",{enumerable:!0,get:function(){return _u.notificationClassification}}),Object.defineProperty(P,"notificationSeverityLevel",{enumerable:!0,get:function(){return _u.notificationSeverityLevel}}),vu=j,Object.defineProperty(P,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return vu.notificationFilterDisabledCategory}}),Object.defineProperty(P,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return vu.notificationFilterDisabledClassification}}),Object.defineProperty(P,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return vu.notificationFilterMinimumSeverityLevel}}),b=_(pn),P.Result=b.default,t=_(T),P.EagerResult=t.default,mu=g(O),P.ConnectionProvider=mu.default,Object.defineProperty(P,"Releasable",{enumerable:!0,get:function(){return mu.Releasable}}),i=_(V),P.Connection=i.default,u=_(Y),P.Transaction=u.default,f=_(o),P.ManagedTransaction=f.default,it=_(Zr),P.TransactionPromise=it.default,c=_(E),P.Session=c.default,p=g(S),C=p,P.Driver=p.default,P.driver=C,j=_(m),P.auth=j.default,gu=xr,Object.defineProperty(P,"bookmarkManager",{enumerable:!0,get:function(){return gu.bookmarkManager}}),Ou=y,Object.defineProperty(P,"authTokenManagers",{enumerable:!0,get:function(){return Ou.authTokenManagers}}),Object.defineProperty(P,"staticAuthTokenManager",{enumerable:!0,get:function(){return Ou.staticAuthTokenManager}}),wu=S,Object.defineProperty(P,"routing",{enumerable:!0,get:function(){return wu.routing}}),pn=g(v),P.types=pn,T=g(n),P.json=T,_=_(Nt),P.resultTransformers=_.default,Eu=w,Object.defineProperty(P,"clientCertificateProviders",{enumerable:!0,get:function(){return Eu.clientCertificateProviders}}),Object.defineProperty(P,"resolveCertificateProvider",{enumerable:!0,get:function(){return Eu.resolveCertificateProvider}}),g=g(h),P.internal=g,O={SERVICE_UNAVAILABLE:fu.SERVICE_UNAVAILABLE,SESSION_EXPIRED:fu.SESSION_EXPIRED,PROTOCOL_ERROR:fu.PROTOCOL_ERROR},P.error=O,O={authTokenManagers:Ou.authTokenManagers,newError:fu.newError,Neo4jError:fu.Neo4jError,newGQLError:fu.newGQLError,GQLError:fu.GQLError,isRetriableError:fu.isRetriableError,error:O,Integer:pu.default,int:pu.int,isInt:pu.isInt,inSafeRange:pu.inSafeRange,toNumber:pu.toNumber,toString:pu.toString,internal:g,isPoint:bu.isPoint,Point:bu.Point,Date:du.Date,DateTime:du.DateTime,Duration:du.Duration,isDate:du.isDate,isDateTime:du.isDateTime,isDuration:du.isDuration,isLocalDateTime:du.isLocalDateTime,isLocalTime:du.isLocalTime,isTime:du.isTime,LocalDateTime:du.LocalDateTime,LocalTime:du.LocalTime,Time:du.Time,Node:hu.Node,isNode:hu.isNode,Relationship:hu.Relationship,isRelationship:hu.isRelationship,UnboundRelationship:hu.UnboundRelationship,isUnboundRelationship:hu.isUnboundRelationship,Path:hu.Path,isPath:hu.isPath,PathSegment:hu.PathSegment,isPathSegment:hu.isPathSegment,Record:s.default,ResultSummary:yu.default,queryType:yu.queryType,ServerInfo:yu.ServerInfo,Notification:_u.default,GqlStatusObject:_u.GqlStatusObject,Plan:yu.Plan,ProfiledPlan:yu.ProfiledPlan,QueryStatistics:yu.QueryStatistics,Stats:yu.Stats,Result:b.default,EagerResult:t.default,Transaction:u.default,ManagedTransaction:f.default,TransactionPromise:it.default,Session:c.default,Driver:p.default,Connection:i.default,Releasable:mu.Releasable,types:pn,driver:C,json:T,auth:j.default,bookmarkManager:gu.bookmarkManager,routing:wu.routing,resultTransformers:_.default,notificationCategory:_u.notificationCategory,notificationClassification:_u.notificationClassification,notificationSeverityLevel:_u.notificationSeverityLevel,notificationFilterDisabledCategory:vu.notificationFilterDisabledCategory,notificationFilterDisabledClassification:vu.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:vu.notificationFilterMinimumSeverityLevel,clientCertificateProviders:Eu.clientCertificateProviders,resolveCertificateProvider:Eu.resolveCertificateProvider},P.default=O;V={},Y={},o={},Zr={},E={};Object.defineProperty(E,"__esModule",{value:!0}),E.isFunction=void 0,E.isFunction=function(e){return"function"==typeof e};m={},xr={},y={};Object.defineProperty(y,"__esModule",{value:!0}),y.createErrorClass=void 0,y.createErrorClass=function(e){return(e=e(function(e){Error.call(e),e.stack=(new Error).stack})).prototype=Object.create(Error.prototype),e.prototype.constructor=e},Object.defineProperty(xr,"__esModule",{value:!0}),xr.UnsubscriptionError=void 0;S=y,xr.UnsubscriptionError=S.createErrorClass(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}),v={};Object.defineProperty(v,"__esModule",{value:!0}),v.arrRemove=void 0,v.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var Tu=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ju=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Cu=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Ru=(Object.defineProperty(m,"__esModule",{value:!0}),m.isSubscription=m.EMPTY_SUBSCRIPTION=m.Subscription=void 0,E),Iu=xr,Au=v,ku=(Mu.prototype.unsubscribe=function(){var t,e,r;if(!this.closed){this.closed=!0;var n=this._parentage;if(n)if(this._parentage=null,Array.isArray(n))try{for(var o=Tu(n),i=o.next();!i.done;i=o.next())i.value.remove(this)}catch(e){a={error:e}}finally{try{i&&!i.done&&(u=o.return)&&u.call(o)}finally{if(a)throw a.error}}else n.remove(this);var u=this.initialTeardown;if(Ru.isFunction(u))try{u()}catch(e){r=e instanceof Iu.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=Tu(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{Nu(l)}catch(e){r=null!=r?r:[],e instanceof Iu.UnsubscriptionError?r=Cu(Cu([],ju(r)),ju(e.errors)):r.push(e)}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}}if(r)throw new Iu.UnsubscriptionError(r)}},Mu.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Nu(e);else{if(e instanceof Mu){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Mu.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Mu.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Mu.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Au.arrRemove(t,e)},Mu.prototype.remove=function(e){var t=this._finalizers;t&&Au.arrRemove(t,e),e instanceof Mu&&e._removeParent(this)},Mu.EMPTY=((n=new Mu).closed=!0,n),Mu);function Mu(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function Nu(e){Ru.isFunction(e)?e():e.unsubscribe()}m.Subscription=ku,m.EMPTY_SUBSCRIPTION=ku.EMPTY,m.isSubscription=function(e){return e instanceof ku||e&&"closed"in e&&Ru.isFunction(e.remove)&&Ru.isFunction(e.add)&&Ru.isFunction(e.unsubscribe)};var xu,Du,Lu,Nt={},w=(Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.config=void 0,Nt.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),h={},Uu=(xu=h,Du=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Lu=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(xu,"__esModule",{value:!0}),xu.timeoutProvider=void 0,xu.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=xu.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,Lu([e,t],Du(r))):setTimeout.apply(void 0,Lu([e,t],Du(r)))},clearTimeout:function(e){var t=xu.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(w,"__esModule",{value:!0}),w.reportUnhandledError=void 0,Nt),Fu=h;w.reportUnhandledError=function(t){Fu.timeoutProvider.setTimeout(function(){var e=Uu.config.onUnhandledError;if(!e)throw t;e(t)})};g={};Object.defineProperty(g,"__esModule",{value:!0}),g.noop=void 0,g.noop=function(){};s={};function Bu(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(s,"__esModule",{value:!0}),s.createNotification=s.nextNotification=s.errorNotification=s.COMPLETE_NOTIFICATION=void 0,s.COMPLETE_NOTIFICATION=Bu("C",void 0,void 0),s.errorNotification=function(e){return Bu("E",void 0,e)},s.nextNotification=function(e){return Bu("N",e,void 0)},s.createNotification=Bu;var Wu,qu,zu,Vu,Hu,Gu,Yu,Ku,Zu,Qu,Xu,Ju,$u,ea,b={},ta=(Object.defineProperty(b,"__esModule",{value:!0}),b.captureError=b.errorContext=void 0,Nt),ra=null;function na(e){var t=zu.call(this)||this;return t.isStopped=!1,e?(t.destination=e,Hu.isSubscription(e)&&e.add(t)):t.destination=Wu.EMPTY_OBSERVER,t}function oa(e,t){return Xu.call(e,t)}function ia(e){this.partialObserver=e}function ua(e,t,r){var n=$u.call(this)||this;return r=Vu.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&Gu.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&oa(e.next,t),error:e.error&&oa(e.error,t),complete:e.complete&&oa(e.complete,t)}):e,n.destination=new Ju(r),n}function aa(e){Gu.config.useDeprecatedSynchronousErrorHandling?Qu.captureError(e):Yu.reportUnhandledError(e)}function sa(e,t){var r=Gu.config.onStoppedNotification;r&&Zu.timeoutProvider.setTimeout(function(){return r(e,t)})}b.errorContext=function(e){if(ta.config.useDeprecatedSynchronousErrorHandling){var t=!ra;if(t&&(ra={errorThrown:!1,error:null}),e(),t){var t=ra,r=t.errorThrown,t=t.error;if(ra=null,r)throw t}}else e()},b.captureError=function(e){ta.config.useDeprecatedSynchronousErrorHandling&&ra&&(ra.errorThrown=!0,ra.error=e)},Wu=Zr,t=r&&r.__extends||(qu=function(e,t){return(qu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}qu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.EMPTY_OBSERVER=Wu.SafeSubscriber=Wu.Subscriber=void 0,Vu=E,Gu=Nt,Yu=w,u=g,Ku=s,Zu=h,Qu=b,zu=(Hu=m).Subscription,t(na,zu),na.create=function(e,t,r){return new ea(e,t,r)},na.prototype.next=function(e){this.isStopped?sa(Ku.nextNotification(e),this):this._next(e)},na.prototype.error=function(e){this.isStopped?sa(Ku.errorNotification(e),this):(this.isStopped=!0,this._error(e))},na.prototype.complete=function(){this.isStopped?sa(Ku.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},na.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,zu.prototype.unsubscribe.call(this),this.destination=null)},na.prototype._next=function(e){this.destination.next(e)},na.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},na.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},f=na,Wu.Subscriber=f,Xu=Function.prototype.bind,ia.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){aa(e)}},ia.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){aa(e)}else aa(e)},ia.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){aa(e)}},Ju=ia,t(ua,$u=f),ea=ua,Wu.SafeSubscriber=ea,Wu.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop};it={},Object.defineProperty(it,"__esModule",{value:!0}),it.observable=void 0,it.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",c={},p={};Object.defineProperty(p,"__esModule",{value:!0}),p.identity=void 0,p.identity=function(e){return e},Object.defineProperty(c,"__esModule",{value:!0}),c.pipeFromArray=c.pipe=void 0;var ca=p;function la(t){return 0===t.length?ca.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}c.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return la(e)},c.pipeFromArray=la,Object.defineProperty(o,"__esModule",{value:!0}),o.Observable=void 0;var fa=Zr,pa=m,i=it,da=c,ha=Nt,ba=E,ya=b;function _a(e){e&&(this._subscribe=e)}function va(e){return null!=(e=null!=e?e:ha.config.Promise)?e:Promise}_a.prototype.lift=function(e){var t=new _a;return t.source=this,t.operator=e,t},_a.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof fa.Subscriber||function(e){return e&&ba.isFunction(e.next)&&ba.isFunction(e.error)&&ba.isFunction(e.complete)}(n)&&pa.isSubscription(n)?e:new fa.SafeSubscriber(e,t,r);return ya.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},_a.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},_a.prototype.forEach=function(n,e){var o=this;return new(e=va(e))(function(e,t){var r=new fa.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},_a.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},_a.prototype[i.observable]=function(){return this},_a.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return da.pipeFromArray(e)(this)},_a.prototype.toPromise=function(e){var n=this;return new(e=va(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},_a.create=function(e){return new _a(e)},o.Observable=_a;var pn={},C={},T={},ma=(Object.defineProperty(T,"__esModule",{value:!0}),T.operate=T.hasLift=void 0,E);function ga(e){return ma.isFunction(null==e?void 0:e.lift)}T.hasLift=ga,T.operate=function(t){return function(e){if(ga(e))return e.lift(function(e){try{return t(e,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}};var Oa,j={},_=r&&r.__extends||(Oa=function(e,t){return(Oa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Oa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),P=(Object.defineProperty(j,"__esModule",{value:!0}),j.OperatorSubscriber=j.createOperatorSubscriber=void 0,Zr);j.createOperatorSubscriber=function(e,t,r,n,o){return new Ea(e,t,r,n,o)};_(Pa,wa=P.Subscriber),Pa.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,wa.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var wa,Ea=Pa;function Pa(t,r,e,n,o,i){var u=wa.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:wa.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:wa.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:wa.prototype._complete,u}j.OperatorSubscriber=Ea,Object.defineProperty(C,"__esModule",{value:!0}),C.refCount=void 0;var Sa=T,Ta=j;C.refCount=function(){return Sa.operate(function(r,n){var o=null,e=(r._refCount++,Ta.createOperatorSubscriber(n,void 0,void 0,void 0,function(){var e,t;!r||r._refCount<=0||0<--r._refCount?o=null:(e=r._connection,t=o,o=null,!e||t&&e!==t||e.unsubscribe(),n.unsubscribe())}));r.subscribe(e),e.closed||(o=r.connect())})};var ja,O=r&&r.__extends||(ja=function(e,t){return(ja=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ja(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(pn,"__esModule",{value:!0}),pn.ConnectableObservable=void 0;var Ca,Ra=m,Ia=C,Aa=j,ka=T,S=(Ca=o.Observable,O(Ma,Ca),Ma.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Ma.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Ma.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Ma.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new Ra.Subscription,t=this.getSubject(),e.add(this.source.subscribe(Aa.createOperatorSubscriber(t,void 0,function(){r._teardown(),t.complete()},function(e){r._teardown(),t.error(e)},function(){return r._teardown()}))),e.closed&&(this._connection=null,e=Ra.Subscription.EMPTY)),e},Ma.prototype.refCount=function(){return Ia.refCount()(this)},Ma);function Ma(e,t){var r=Ca.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,ka.hasLift(e)&&(r.lift=e.lift),r}pn.ConnectableObservable=S;var Na,xa,Da,La,Ua,n={},s={},h=(Na=s,Object.defineProperty(Na,"__esModule",{value:!0}),Na.performanceTimestampProvider=void 0,Na.performanceTimestampProvider={now:function(){return(Na.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),Fa=(xa=h,Da=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},La=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(xa,"__esModule",{value:!0}),xa.animationFrameProvider=void 0,Ua=m,xa.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=xa.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new Ua.Subscription(function(){return null==r?void 0:r(o)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xa.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,La([],Da(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xa.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,La([],Da(e)))},delegate:void 0},Object.defineProperty(n,"__esModule",{value:!0}),n.animationFrames=void 0,o),Ba=s,Wa=h;function qa(a){return new Fa.Observable(function(r){var n=a||Ba.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=Wa.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&Wa.animationFrameProvider.cancelAnimationFrame(i)}})}n.animationFrames=function(e){return e?qa(e):Ha};var za,Va,Ha=qa(),t={},f={},u=(Object.defineProperty(f,"__esModule",{value:!0}),f.ObjectUnsubscribedError=void 0,y),i=(f.ObjectUnsubscribedError=u.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(za=function(e,t){return(za=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}za(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Ga=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ya=(Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0,o),Ka=m,Za=f,Qa=v,Xa=b,_=(Va=Ya.Observable,i(Ja,Va),Ja.prototype.lift=function(e){var t=new es(this,this);return t.operator=e,t},Ja.prototype._throwIfClosed=function(){if(this.closed)throw new Za.ObjectUnsubscribedError},Ja.prototype.next=function(o){var i=this;Xa.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=Ga(i.currentObservers),n=r.next();!n.done;n=r.next())n.value.next(o)}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}})},Ja.prototype.error=function(t){var r=this;Xa.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=t;for(var e=r.observers;e.length;)e.shift().error(t)}})},Ja.prototype.complete=function(){var t=this;Xa.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},Ja.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(Ja.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),Ja.prototype._trySubscribe=function(e){return this._throwIfClosed(),Va.prototype._trySubscribe.call(this,e)},Ja.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},Ja.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?Ka.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new Ka.Subscription(function(){t.currentObservers=null,Qa.arrRemove(o,e)}))},Ja.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},Ja.prototype.asObservable=function(){var e=new Ya.Observable;return e.source=this,e},Ja.create=function(e,t){return new es(e,t)},Ja);function Ja(){var e=Va.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}t.Subject=_;i(ts,$a=_),ts.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},ts.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},ts.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},ts.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:Ka.EMPTY_SUBSCRIPTION};var $a,es=ts;function ts(e,t){var r=$a.call(this)||this;return r.destination=e,r.source=t,r}t.AnonymousSubject=es;var rs,P={},O=r&&r.__extends||(rs=function(e,t){return(rs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}rs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(P,"__esModule",{value:!0}),P.BehaviorSubject=void 0;ns=t.Subject,O(os,ns),Object.defineProperty(os.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),os.prototype._subscribe=function(e){var t=ns.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},os.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},os.prototype.next=function(e){ns.prototype.next.call(this,this._value=e)};var ns,S=os;function os(e){var t=ns.call(this)||this;return t._value=e,t}P.BehaviorSubject=S;var is,us,s={},u={},b=(is=u,Object.defineProperty(is,"__esModule",{value:!0}),is.dateTimestampProvider=void 0,is.dateTimestampProvider={now:function(){return(is.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(us=function(e,t){return(us=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}us(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(s,"__esModule",{value:!0}),s.ReplaySubject=void 0;var as,ss=u,i=(as=t.Subject,b(cs,as),cs.prototype.next=function(e){var t=this.isStopped,r=this._buffer,n=this._infiniteTimeWindow,o=this._timestampProvider,i=this._windowTime;t||(r.push(e),n||r.push(o.now()+i)),this._trimBuffer(),as.prototype.next.call(this,e)},cs.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},cs.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,o=(n?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!n){for(var i=t.now(),u=0,a=1;a<r.length&&r[a]<=i;a+=2)u=a;u&&r.splice(0,u+1)}},cs);function cs(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=ss.dateTimestampProvider);var n=as.call(this)||this;return n._bufferSize=e,n._windowTime=t,n._timestampProvider=r,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=t===1/0,n._bufferSize=Math.max(1,e),n._windowTime=Math.max(1,t),n}s.ReplaySubject=i;var ls,_={},O=r&&r.__extends||(ls=function(e,t){return(ls=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ls(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(_,"__esModule",{value:!0}),_.AsyncSubject=void 0;fs=t.Subject,O(ps,fs),ps.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this._hasValue,n=this._value,o=this.thrownError,i=this.isStopped,u=this._isComplete;t?e.error(o):(i||u)&&(r&&e.next(n),e.complete())},ps.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},ps.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&fs.prototype.next.call(this,t),fs.prototype.complete.call(this))};var fs,S=ps;function ps(){var e=null!==fs&&fs.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}_.AsyncSubject=S;var ds,b={},i={},O={},S={},hs=r&&r.__extends||(ds=function(e,t){return(ds=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ds(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(S,"__esModule",{value:!0}),S.Action=void 0;bs=m.Subscription,hs(ys,bs),ys.prototype.schedule=function(e,t){return this};var bs,hs=ys;function ys(e,t){return bs.call(this)||this}S.Action=hs;var _s,vs,ms,gs,hs={},Os=(_s=hs,vs=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ms=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(_s,"__esModule",{value:!0}),_s.intervalProvider=void 0,_s.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=_s.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,ms([e,t],vs(r))):setInterval.apply(void 0,ms([e,t],vs(r)))},clearInterval:function(e){var t=_s.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(gs=function(e,t){return(gs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}gs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(O,"__esModule",{value:!0}),O.AsyncAction=void 0;var ws,Es=hs,Ps=v,hs=(ws=S.Action,Os(Ss,ws),Ss.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var e=this.id,r=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(r,e,t)),this.pending=!0,this.delay=t,this.id=null!=(e=this.id)?e:this.requestAsyncId(r,this.id,t),this},Ss.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Es.intervalProvider.setInterval(e.flush.bind(e,this),r)},Ss.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&Es.intervalProvider.clearInterval(t)},Ss.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;e=this._execute(e,t);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},Ss.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},Ss.prototype.unsubscribe=function(){var e,t,r;this.closed||(e=this.id,r=(t=this.scheduler).actions,this.work=this.state=this.scheduler=null,this.pending=!1,Ps.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,ws.prototype.unsubscribe.call(this))},Ss);function Ss(e,t){var r=ws.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}O.AsyncAction=hs;var Ts,js,Cs,Rs,Is,As,S={},Os={},ks=(Object.defineProperty(Os,"__esModule",{value:!0}),Os.TestTools=Os.Immediate=void 0,1),Ms={};function Ns(e){return e in Ms&&(delete Ms[e],!0)}Os.Immediate={setImmediate:function(e){var t=ks++;return Ms[t]=!0,(Ts=Ts||Promise.resolve()).then(function(){return Ns(t)&&e()}),t},clearImmediate:function(e){Ns(e)}},Os.TestTools={pending:function(){return Object.keys(Ms).length}},js=S,Cs=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Rs=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(js,"__esModule",{value:!0}),js.immediateProvider=void 0,Is=Os.Immediate.setImmediate,As=Os.Immediate.clearImmediate,js.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=js.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||Is).apply(void 0,Rs([],Cs(e)))},clearImmediate:function(e){var t=js.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||As)(e)},delegate:void 0};var xs,hs=r&&r.__extends||(xs=function(e,t){return(xs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}xs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(i,"__esModule",{value:!0}),i.AsapAction=void 0;var Ds,Ls=S,Os=(Ds=O.AsyncAction,hs(Us,Ds),Us.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Ds.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ls.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},Us.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Ds.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Ls.immediateProvider.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))},Us);function Us(e,t){var r=Ds.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}i.AsapAction=Os;var S={},hs={},Os={},Fs=(Object.defineProperty(Os,"__esModule",{value:!0}),Os.Scheduler=void 0,u);function Bs(e,t){void 0===t&&(t=Bs.now),this.schedulerActionCtor=e,this.now=t}Bs.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},Bs.now=Fs.dateTimestampProvider.now,Os.Scheduler=Bs;var Ws,qs,Fs=r&&r.__extends||(Ws=function(e,t){return(Ws=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ws(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),zs=(Object.defineProperty(hs,"__esModule",{value:!0}),hs.AsyncScheduler=void 0,Os),Fs=(qs=zs.Scheduler,Fs(Vs,qs),Vs.prototype.flush=function(e){var t,r=this.actions;if(this._active)r.push(e);else{this._active=!0;do{if(t=e.execute(e.state,e.delay))break}while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}}},Vs);function Vs(e,t){void 0===t&&(t=zs.Scheduler.now);e=qs.call(this,e,t)||this;return e.actions=[],e._active=!1,e}hs.AsyncScheduler=Fs;var Hs,Fs=r&&r.__extends||(Hs=function(e,t){return(Hs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Hs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(S,"__esModule",{value:!0}),S.AsapScheduler=void 0;Gs=hs.AsyncScheduler,Fs(Ys,Gs),Ys.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var Gs,Fs=Ys;function Ys(){return null!==Gs&&Gs.apply(this,arguments)||this}S.AsapScheduler=Fs,Fs=b,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.asap=Fs.asapScheduler=void 0,Fs.asapScheduler=new S.AsapScheduler(i.AsapAction),Fs.asap=Fs.asapScheduler;var Ks,S={},Fs=(i=S,Object.defineProperty(i,"__esModule",{value:!0}),i.async=i.asyncScheduler=void 0,i.asyncScheduler=new hs.AsyncScheduler(O.AsyncAction),i.async=i.asyncScheduler,{}),i={},Zs=r&&r.__extends||(Ks=function(e,t){return(Ks=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ks(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(i,"__esModule",{value:!0}),i.QueueAction=void 0;Qs=O.AsyncAction,Zs(Xs,Qs),Xs.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?Qs.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},Xs.prototype.execute=function(e,t){return 0<t||this.closed?Qs.prototype.execute.call(this,e,t):this._execute(e,t)},Xs.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?Qs.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var Qs,Zs=Xs;function Xs(e,t){var r=Qs.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}i.QueueAction=Zs;var Js,Zs={},$s=r&&r.__extends||(Js=function(e,t){return(Js=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Js(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.QueueScheduler=void 0;ec=hs.AsyncScheduler,$s(tc,ec);var ec,$s=tc;function tc(){return null!==ec&&ec.apply(this,arguments)||this}Zs.QueueScheduler=$s,$s=Fs,Object.defineProperty($s,"__esModule",{value:!0}),$s.queue=$s.queueScheduler=void 0,$s.queueScheduler=new Zs.QueueScheduler(i.QueueAction),$s.queue=$s.queueScheduler;var rc,Zs={},i={},$s=r&&r.__extends||(rc=function(e,t){return(rc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}rc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(i,"__esModule",{value:!0}),i.AnimationFrameAction=void 0;var nc,oc=h,h=(nc=O.AsyncAction,$s(ic,nc),ic.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?nc.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=oc.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},ic.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return nc.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(oc.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},ic);function ic(e,t){var r=nc.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}i.AnimationFrameAction=h;var uc,$s={},h=r&&r.__extends||(uc=function(e,t){return(uc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}uc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty($s,"__esModule",{value:!0}),$s.AnimationFrameScheduler=void 0;ac=hs.AsyncScheduler,h(sc,ac),sc.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var ac,h=sc;function sc(){return null!==ac&&ac.apply(this,arguments)||this}$s.AnimationFrameScheduler=h,h=Zs,Object.defineProperty(h,"__esModule",{value:!0}),h.animationFrame=h.animationFrameScheduler=void 0,h.animationFrameScheduler=new $s.AnimationFrameScheduler(i.AnimationFrameAction),h.animationFrame=h.animationFrameScheduler;var cc,lc,$s={},i=r&&r.__extends||(cc=function(e,t){return(cc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}cc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),h=(Object.defineProperty($s,"__esModule",{value:!0}),$s.VirtualAction=$s.VirtualTimeScheduler=void 0,O),fc=m,O=(lc=hs.AsyncScheduler,i(pc,lc),pc.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},pc.frameTimeFactor=10,pc);function pc(e,t){void 0===t&&(t=1/0);var r=lc.call(this,e=void 0===e?hc:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}$s.VirtualTimeScheduler=O;dc=h.AsyncAction,i(bc,dc),bc.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return dc.prototype.schedule.call(this,e,t);this.active=!1;var r=new bc(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return fc.Subscription.EMPTY},bc.prototype.requestAsyncId=function(e,t,r){this.delay=e.frame+(r=void 0===r?0:r);r=e.actions;return r.push(this),r.sort(bc.sortActions),1},bc.prototype.recycleAsyncId=function(e,t,r){},bc.prototype._execute=function(e,t){if(!0===this.active)return dc.prototype._execute.call(this,e,t)},bc.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1};var dc,hc=bc;function bc(e,t,r){void 0===r&&(r=e.index+=1);var n=dc.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}$s.VirtualAction=hc;var yc,_c,hs={},O={},h=(yc=O,Object.defineProperty(yc,"__esModule",{value:!0}),yc.empty=yc.EMPTY=void 0,_c=o,yc.EMPTY=new _c.Observable(function(e){return e.complete()}),yc.empty=function(e){return e?(t=e,new _c.Observable(function(e){return t.schedule(function(){return e.complete()})})):yc.EMPTY;var t},{}),i={},vc={},mc=(Object.defineProperty(vc,"__esModule",{value:!0}),vc.isScheduler=void 0,E);vc.isScheduler=function(e){return e&&mc.isFunction(e.schedule)},Object.defineProperty(i,"__esModule",{value:!0}),i.popNumber=i.popScheduler=i.popResultSelector=void 0;var gc=E,Oc=vc;function wc(e){return e[e.length-1]}i.popResultSelector=function(e){return gc.isFunction(wc(e))?e.pop():void 0},i.popScheduler=function(e){return Oc.isScheduler(wc(e))?e.pop():void 0},i.popNumber=function(e,t){return"number"==typeof wc(e)?e.pop():t};var Ec={},Pc={},Sc={},R={},Tc={},jc=(Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.isArrayLike=void 0,Tc.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),Cc=(Object.defineProperty(jc,"__esModule",{value:!0}),jc.isPromise=void 0,E);jc.isPromise=function(e){return Cc.isFunction(null==e?void 0:e.then)};var Rc={},Ic=(Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.isInteropObservable=void 0,it),Ac=E;Rc.isInteropObservable=function(e){return Ac.isFunction(e[Ic.observable])};var kc={},Mc=(Object.defineProperty(kc,"__esModule",{value:!0}),kc.isAsyncIterable=void 0,E);kc.isAsyncIterable=function(e){return Symbol.asyncIterator&&Mc.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Nc={};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.createInvalidObservableTypeError=void 0,Nc.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")};var xc={},Dc={};function Lc(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.iterator=Dc.getSymbolIterator=void 0,Dc.getSymbolIterator=Lc,Dc.iterator=Lc(),Object.defineProperty(xc,"__esModule",{value:!0}),xc.isIterable=void 0;var Uc=Dc,Fc=E;xc.isIterable=function(e){return Fc.isFunction(null==e?void 0:e[Uc.iterator])};var Bc={},Wc=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},qc=r&&r.__await||function(e){return this instanceof qc?(this.v=e,this):new qc(e)},zc=r&&r.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=r.apply(e,t||[]),i=[],u={};return n("next"),n("throw"),n("return"),u[Symbol.asyncIterator]=function(){return this},u;function n(n){o[n]&&(u[n]=function(r){return new Promise(function(e,t){1<i.push([n,r,e,t])||a(n,r)})})}function a(e,t){try{(r=o[e](t)).value instanceof qc?Promise.resolve(r.value.v).then(s,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},Vc=(Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.isReadableStreamLike=Bc.readableStreamLikeToAsyncGenerator=void 0,E);Bc.readableStreamLikeToAsyncGenerator=function(o){return zc(this,arguments,function(){var t,r,n;return Wc(this,function(e){switch(e.label){case 0:t=o.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,qc(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,qc(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,qc(n)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})},Bc.isReadableStreamLike=function(e){return Vc.isFunction(null==e?void 0:e.getReader)};var Hc=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Gc=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Yc=r&&r.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=u[Symbol.asyncIterator];return t?t.call(u):(u="function"==typeof Kc?Kc(u):u[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(i){e[i]=u[i]&&function(o){return new Promise(function(e,t){var r,n;o=u[i](o),r=e,e=t,n=o.done,t=o.value,Promise.resolve(t).then(function(e){r({value:e,done:n})},e)})}}},Kc=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Zc=(Object.defineProperty(R,"__esModule",{value:!0}),R.fromReadableStreamLike=R.fromAsyncIterable=R.fromIterable=R.fromPromise=R.fromArrayLike=R.fromInteropObservable=R.innerFrom=void 0,Tc),Qc=jc,Xc=o,Jc=Rc,$c=kc,el=Nc,tl=xc,rl=Bc,nl=E,ol=w,il=it;function ul(r){return new Xc.Observable(function(e){var t=r[il.observable]();if(nl.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function al(r){return new Xc.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function sl(e){return new Xc.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,ol.reportUnhandledError)})}function cl(u){return new Xc.Observable(function(e){var t,r;try{for(var n=Kc(u),o=n.next();!o.done;o=n.next()){var i=o.value;if(e.next(i),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}function ll(e){return new Xc.Observable(function(t){!function(r,n){var o,i,u,a;return Hc(this,void 0,void 0,function(){var t;return Gc(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=Yc(r),e.label=1;case 1:return[4,o.next()];case 2:if((i=e.sent()).done)return[3,4];if(t=i.value,n.next(t),n.closed)return[2];e.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return t=e.sent(),u={error:t},[3,11];case 6:return(e.trys.push([6,,9,10]),i&&!i.done&&(a=o.return))?[4,a.call(o)]:[3,8];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}(e,t).catch(function(e){return t.error(e)})})}function fl(e){return ll(rl.readableStreamLikeToAsyncGenerator(e))}R.innerFrom=function(e){if(e instanceof Xc.Observable)return e;if(null!=e){if(Jc.isInteropObservable(e))return ul(e);if(Zc.isArrayLike(e))return al(e);if(Qc.isPromise(e))return sl(e);if($c.isAsyncIterable(e))return ll(e);if(tl.isIterable(e))return cl(e);if(rl.isReadableStreamLike(e))return fl(e)}throw el.createInvalidObservableTypeError(e)},R.fromInteropObservable=ul,R.fromArrayLike=al,R.fromPromise=sl,R.fromIterable=cl,R.fromAsyncIterable=ll,R.fromReadableStreamLike=fl;var w={},pl={};Object.defineProperty(pl,"__esModule",{value:!0}),pl.executeSchedule=void 0,pl.executeSchedule=function(e,t,r,n,o){if(void 0===n&&(n=0),void 0===o&&(o=!1),t=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n),e.add(t),!o)return t},Object.defineProperty(w,"__esModule",{value:!0}),w.observeOn=void 0;var dl=pl,hl=T,bl=j;w.observeOn=function(r,n){return void 0===n&&(n=0),hl.operate(function(e,t){e.subscribe(bl.createOperatorSubscriber(t,function(e){return dl.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return dl.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return dl.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var yl={},_l=(Object.defineProperty(yl,"__esModule",{value:!0}),yl.subscribeOn=void 0,T);yl.subscribeOn=function(r,n){return void 0===n&&(n=0),_l.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.scheduleObservable=void 0;var vl=R,ml=w,gl=yl;Sc.scheduleObservable=function(e,t){return vl.innerFrom(e).pipe(gl.subscribeOn(t),ml.observeOn(t))};var Ol={},wl=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.schedulePromise=void 0,R),El=w,Pl=yl;Ol.schedulePromise=function(e,t){return wl.innerFrom(e).pipe(Pl.subscribeOn(t),El.observeOn(t))};var Sl={},Tl=(Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.scheduleArray=void 0,o);Sl.scheduleArray=function(r,n){return new Tl.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var jl={},Cl=(Object.defineProperty(jl,"__esModule",{value:!0}),jl.scheduleIterable=void 0,o),Rl=Dc,Il=E,Al=pl;jl.scheduleIterable=function(e,t){return new Cl.Observable(function(n){var o;return Al.executeSchedule(n,t,function(){o=e[Rl.iterator](),Al.executeSchedule(n,t,function(){var e,t,r;try{t=(e=o.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)},0,!0)}),function(){return Il.isFunction(null==o?void 0:o.return)&&o.return()}})};var Dc={},kl=(Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.scheduleAsyncIterable=void 0,o),Ml=pl;Dc.scheduleAsyncIterable=function(r,n){if(r)return new kl.Observable(function(t){Ml.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();Ml.executeSchedule(t,n,function(){e.next().then(function(e){e.done?t.complete():t.next(e.value)})},0,!0)})});throw new Error("Iterable cannot be null")};var Nl={},xl=(Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.scheduleReadableStreamLike=void 0,Dc),Dl=Bc;Nl.scheduleReadableStreamLike=function(e,t){return xl.scheduleAsyncIterable(Dl.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.scheduled=void 0;var Ll=Sc,Ul=Ol,Fl=Sl,Bl=jl,Wl=Dc,ql=Rc,zl=jc,Vl=Tc,Hl=xc,Gl=kc,Yl=Nc,Kl=Bc,Zl=Nl;Pc.scheduled=function(e,t){if(null!=e){if(ql.isInteropObservable(e))return Ll.scheduleObservable(e,t);if(Vl.isArrayLike(e))return Fl.scheduleArray(e,t);if(zl.isPromise(e))return Ul.schedulePromise(e,t);if(Gl.isAsyncIterable(e))return Wl.scheduleAsyncIterable(e,t);if(Hl.isIterable(e))return Bl.scheduleIterable(e,t);if(Kl.isReadableStreamLike(e))return Zl.scheduleReadableStreamLike(e,t)}throw Yl.createInvalidObservableTypeError(e)},Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.from=void 0;var Ql=Pc,Xl=R;Ec.from=function(e,t){return t?Ql.scheduled(e,t):Xl.innerFrom(e)},Object.defineProperty(h,"__esModule",{value:!0}),h.of=void 0;var Jl=i,$l=Ec;h.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Jl.popScheduler(e);return $l.from(e,r)};var ef,tf,rf,nf,Sc={},of=(Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.throwError=void 0,o),uf=E;function af(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function sf(e,t){var r,n=e.kind,o=e.value,e=e.error;if("string"!=typeof n)throw new TypeError('Invalid notification, missing "kind"');"N"===n?null!=(r=t.next)&&r.call(t,o):"E"===n?null!=(r=t.error)&&r.call(t,e):null!=(o=t.complete)&&o.call(t)}Sc.throwError=function(e,t){function r(e){return e.error(n())}var n=uf.isFunction(e)?e:function(){return e};return new of.Observable(t?function(e){return t.schedule(r,0,e)}:r)},Ol=hs,Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.observeNotification=Ol.Notification=Ol.NotificationKind=void 0,ef=O,tf=h,rf=Sc,nf=E,(Sl=Ol.NotificationKind||(Ol.NotificationKind={})).NEXT="N",Sl.ERROR="E",Sl.COMPLETE="C",af.prototype.observe=function(e){return sf(this,e)},af.prototype.do=function(e,t,r){var n=this.kind,o=this.value,i=this.error;return"N"===n?null==e?void 0:e(o):"E"===n?null==t?void 0:t(i):null==r?void 0:r()},af.prototype.accept=function(e,t,r){var n;return nf.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},af.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?tf.of(t):"E"===e?rf.throwError(function(){return r}):"C"===e?ef.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},af.createNext=function(e){return new af("N",e)},af.createError=function(e){return new af("E",void 0,e)},af.createComplete=function(){return af.completeNotification},af.completeNotification=new af("C"),Sl=af,Ol.Notification=Sl,Ol.observeNotification=sf;var Dc={},cf=(Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.isObservable=void 0,o),lf=E;Dc.isObservable=function(e){return!!e&&(e instanceof cf.Observable||lf.isFunction(e.lift)&&lf.isFunction(e.subscribe))};var Rc={},jc={},xc=(Object.defineProperty(jc,"__esModule",{value:!0}),jc.EmptyError=void 0,y),ff=(jc.EmptyError=xc.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.lastValueFrom=void 0,jc);Rc.lastValueFrom=function(o,i){var u="object"==typeof i;return new Promise(function(e,t){var r,n=!1;o.subscribe({next:function(e){r=e,n=!0},error:t,complete:function(){n?e(r):u?e(i.defaultValue):t(new ff.EmptyError)}})})};var kc={},pf=(Object.defineProperty(kc,"__esModule",{value:!0}),kc.firstValueFrom=void 0,jc),df=Zr;kc.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new df.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new pf.EmptyError)}});n.subscribe(r)})};var hf,bf,yf,_f,vf,mf,gf,Nc={},Bc=(Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.ArgumentOutOfRangeError=void 0,y),Nl=(Nc.ArgumentOutOfRangeError=Bc.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),Sl=(Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.NotFoundError=void 0,y),Ol=(Nl.NotFoundError=Sl.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),xc=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.SequenceError=void 0,y),Bc=(Ol.SequenceError=xc.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),Sl={};function Of(e){throw new hf.TimeoutError(e)}Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.isValidDate=void 0,Sl.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},hf=Bc,Object.defineProperty(hf,"__esModule",{value:!0}),hf.timeout=hf.TimeoutError=void 0,bf=S,yf=Sl,_f=T,vf=R,mf=j,gf=pl,hf.TimeoutError=y.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),hf.timeout=function(e,t){var a=(e=yf.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Of:r,l=void 0===(r=e.scheduler)?null!=t?t:bf.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return _f.operate(function(e,t){function r(e){n=gf.executeSchedule(t,l,function(){try{u.unsubscribe(),vf.innerFrom(c({meta:f,lastValue:o,seen:i})).subscribe(t)}catch(e){t.error(e)}},e)}var n,o=null,i=0,u=e.subscribe(mf.createOperatorSubscriber(t,function(e){null!=n&&n.unsubscribe(),i++,t.next(o=e),0<s&&r(s)},void 0,void 0,function(){null!=n&&n.closed||null!=n&&n.unsubscribe(),o=null}));i||r(null!=a?"number"==typeof a?a:+a-l.now():s)})};var xc={},y={},wf={},Ef={},Pf=(Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.map=void 0,T),Sf=j;Ef.map=function(n,o){return Pf.operate(function(e,t){var r=0;e.subscribe(Sf.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var Tf=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},jf=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Cf=(Object.defineProperty(wf,"__esModule",{value:!0}),wf.mapOneOrManyArgs=void 0,Ef),Rf=Array.isArray;wf.mapOneOrManyArgs=function(r){return Cf.map(function(e){return t=r,Rf(e=e)?t.apply(void 0,jf([],Tf(e))):t(e);var t})};var If=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Af=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},kf=(Object.defineProperty(y,"__esModule",{value:!0}),y.bindCallbackInternals=void 0,vc),Mf=o,Nf=yl,xf=wf,Df=w,Lf=_;y.bindCallbackInternals=function r(a,s,n,o){if(n){if(!kf.isScheduler(n))return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s,o).apply(this,e).pipe(xf.mapOneOrManyArgs(n))};o=n}return o?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s).apply(this,e).pipe(Nf.subscribeOn(o),Df.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new Lf.AsyncSubject,u=!0;return new Mf.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,Af(Af([],If(r)),[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(a){var r=e.shift();if(null!=r)return void i.error(r)}i.next(1<e.length?e:e[0]),o=!0,n&&i.complete()}])),o&&i.complete(),n=!0),e})}},Object.defineProperty(xc,"__esModule",{value:!0}),xc.bindCallback=void 0;var Uf=y;xc.bindCallback=function(e,t,r){return Uf.bindCallbackInternals(!1,e,t,r)};var Ff={},Bf=(Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.bindNodeCallback=void 0,y);Ff.bindNodeCallback=function(e,t,r){return Bf.bindCallbackInternals(!0,e,t,r)};var y={},Wf={},qf=(Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.argsArgArrayOrObject=void 0,Array.isArray),zf=Object.getPrototypeOf,Vf=Object.prototype,Hf=Object.keys;Wf.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(qf(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&zf(r)===Vf)return{args:(r=Hf(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var Gf={};Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.createObject=void 0,Gf.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(y,"__esModule",{value:!0}),y.combineLatestInit=y.combineLatest=void 0;var Yf=o,Kf=Wf,Zf=Ec,Qf=p,Xf=wf,Jf=i,$f=Gf,ep=j,tp=pl;function rp(a,s,c){return void 0===c&&(c=Qf.identity),function(u){np(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){np(s,function(){var e=Zf.from(a[r],s),t=!1;e.subscribe(ep.createOperatorSubscriber(u,function(e){n[r]=e,t||(t=!0,i--),i||u.next(c(n.slice()))},function(){--o||u.complete()}))},u)}(t)},u)}}function np(e,t,r){e?tp.executeSchedule(r,e,t):t()}y.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Jf.popScheduler(e),n=Jf.popResultSelector(e),o=Kf.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?Zf.from([],r):(o=new Yf.Observable(rp(i,r,u?function(e){return $f.createObject(u,e)}:Qf.identity)),n?o.pipe(Xf.mapOneOrManyArgs(n)):o)},y.combineLatestInit=rp;var op={},ip={},up={},ap={},sp={},cp=(Object.defineProperty(sp,"__esModule",{value:!0}),sp.mergeInternals=void 0,R),lp=pl,fp=j;sp.mergeInternals=function(e,r,n,o,i,u,a,t){var s=[],c=0,l=0,f=function(){s.length||c||r.complete()},p=function(e){return c<o?d(e):s.push(e)},d=function(e){u&&r.next(e),c++;var t=!1;cp.innerFrom(n(e,l++)).subscribe(fp.createOperatorSubscriber(r,function(e){null!=i&&i(e),u?p(e):r.next(e)},function(){t=!0},void 0,function(){if(t)try{c--;for(;s.length&&c<o;)!function(){var e=s.shift();a?lp.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(fp.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(ap,"__esModule",{value:!0}),ap.mergeMap=void 0;var pp=Ef,dp=R,hp=T,bp=sp,yp=E;ap.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),yp.isFunction(i)?e(function(r,n){return pp.map(function(e,t){return i(r,e,n,t)})(dp.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),hp.operate(function(e,t){return bp.mergeInternals(e,t,o,r)}))},Object.defineProperty(up,"__esModule",{value:!0}),up.mergeAll=void 0;var _p=ap,vp=p;up.mergeAll=function(e){return _p.mergeMap(vp.identity,e=void 0===e?1/0:e)},Object.defineProperty(ip,"__esModule",{value:!0}),ip.concatAll=void 0;var mp=up;ip.concatAll=function(){return mp.mergeAll(1)},Object.defineProperty(op,"__esModule",{value:!0}),op.concat=void 0;var gp=ip,Op=i,wp=Ec;op.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return gp.concatAll()(wp.from(e,Op.popScheduler(e)))};var Ep={},Pp={},Sp=(Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.defer=void 0,o),Tp=R;Pp.defer=function(t){return new Sp.Observable(function(e){Tp.innerFrom(t()).subscribe(e)})},Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.connectable=void 0;var jp=t,Cp=o,Rp=Pp,Ip={connector:function(){return new jp.Subject},resetOnDisconnect:!0};Ep.connectable=function(e,t){var r=null,n=(t=void 0===t?Ip:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new Cp.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=Rp.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var Ap={},kp=(Object.defineProperty(Ap,"__esModule",{value:!0}),Ap.forkJoin=void 0,o),Mp=Wf,Np=R,xp=i,Dp=j,Lp=wf,Up=Gf;Ap.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xp.popResultSelector(e),u=(n=Mp.argsArgArrayOrObject(e)).args,a=n.keys,n=new kp.Observable(function(e){var t=u.length;if(t)for(var n=new Array(t),o=t,i=t,r=0;r<t;r++)!function(t){var r=!1;Np.innerFrom(u[t]).subscribe(Dp.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?Up.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Lp.mapOneOrManyArgs(r)):n};var Wf={},Fp=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Bp=(Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.fromEvent=void 0,R),Wp=o,qp=ap,zp=Tc,Vp=E,Hp=wf,Gp=["addListener","removeListener"],Yp=["addEventListener","removeEventListener"],Kp=["on","off"];function Zp(r,n){return function(t){return function(e){return r[t](n,e)}}}Wf.fromEvent=function t(r,n,o,e){if(Vp.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(Hp.mapOneOrManyArgs(e));var e=Fp((e=r,Vp.isFunction(e.addEventListener)&&Vp.isFunction(e.removeEventListener)?Yp.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,Vp.isFunction(e.addListener)&&Vp.isFunction(e.removeListener)?Gp.map(Zp(r,n)):(e=r,Vp.isFunction(e.on)&&Vp.isFunction(e.off)?Kp.map(Zp(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&zp.isArrayLike(r))return qp.mergeMap(function(e){return t(e,n,o)})(Bp.innerFrom(r));if(i)return new Wp.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1<e.length?e:e[0])}return i(e),function(){return u(e)}});throw new TypeError("Invalid event target")};var Gf={},Qp=(Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.fromEventPattern=void 0,o),Xp=E,Jp=wf;Gf.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(Jp.mapOneOrManyArgs(t)):new Qp.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1===e.length?e[0]:e)}var t=n(e);return Xp.isFunction(o)?function(){return o(e,t)}:void 0})};var Tc={},$p=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ed=(Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.generate=void 0,p),td=vc,rd=Pp,nd=jl;Tc.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return $p(this,function(e){switch(e.label){case 0:t=a,e.label=1;case 1:return r&&!r(t)?[3,4]:[4,u(t)];case 2:e.sent(),e.label=3;case 3:return t=n(t),[3,1];case 4:return[2]}})}return 1===arguments.length?(a=e.initialState,r=e.condition,n=e.iterate,i=e.resultSelector,u=void 0===i?ed.identity:i,o=e.scheduler):(a=e,!t||td.isScheduler(t)?(u=ed.identity,o=t):u=t),rd.defer(o?function(){return nd.scheduleIterable(s(),o)}:s)};var jl={},od=(Object.defineProperty(jl,"__esModule",{value:!0}),jl.iif=void 0,Pp);jl.iif=function(e,t,r){return od.defer(function(){return e()?t:r})};var id={},ud={},ad=(Object.defineProperty(ud,"__esModule",{value:!0}),ud.timer=void 0,o),sd=S,cd=vc,ld=Sl;ud.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=sd.async);var i=-1;return null!=e&&(cd.isScheduler(e)?o=e:i=e),new ad.Observable(function(e){var t=ld.isValidDate(n)?+n-o.now():n,r=0;return o.schedule(function(){e.closed||(e.next(r++),0<=i?this.schedule(void 0,i):e.complete())},t=t<0?0:t)})},Object.defineProperty(id,"__esModule",{value:!0}),id.interval=void 0;var fd=S,pd=ud;id.interval=function(e,t){return pd.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?fd.asyncScheduler:t)};var vc={},dd=(Object.defineProperty(vc,"__esModule",{value:!0}),vc.merge=void 0,up),hd=R,bd=O,yd=i,_d=Ec;vc.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=yd.popScheduler(e),n=yd.popNumber(e,1/0),o=e;return o.length?1===o.length?hd.innerFrom(o[0]):dd.mergeAll(n)(_d.from(o,r)):bd.EMPTY};var vd,md={},gd=(vd=md,Object.defineProperty(vd,"__esModule",{value:!0}),vd.never=vd.NEVER=void 0,vd.NEVER=new o.Observable(g.noop),vd.never=function(){return vd.NEVER},{}),Od={},wd=(Object.defineProperty(Od,"__esModule",{value:!0}),Od.argsOrArgArray=void 0,Array.isArray);Od.argsOrArgArray=function(e){return 1===e.length&&wd(e[0])?e[0]:e},Object.defineProperty(gd,"__esModule",{value:!0}),gd.onErrorResumeNext=void 0;var Ed=o,Pd=Od,Sd=j,Td=g,jd=R;gd.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Pd.argsOrArgArray(e);return new Ed.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=jd.innerFrom(i[n++])}catch(e){return void o()}var t=new Sd.OperatorSubscriber(r,void 0,Td.noop,Td.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var Cd={},Rd=(Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.pairs=void 0,Ec);Cd.pairs=function(e,t){return Rd.from(Object.entries(e),t)};var Id={},Ad={};Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.not=void 0,Ad.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var kd={},Md=(Object.defineProperty(kd,"__esModule",{value:!0}),kd.filter=void 0,T),Nd=j;kd.filter=function(n,o){return Md.operate(function(e,t){var r=0;e.subscribe(Nd.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Id,"__esModule",{value:!0}),Id.partition=void 0;var xd=Ad,Dd=kd,Ld=R;Id.partition=function(e,t,r){return[Dd.filter(t,r)(Ld.innerFrom(e)),Dd.filter(xd.not(t,r))(Ld.innerFrom(e))]};var Ud={},Fd=(Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.raceInit=Ud.race=void 0,o),Bd=R,Wd=Od,qd=j;function zd(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(Bd.innerFrom(t[r]).subscribe(qd.createOperatorSubscriber(n,function(e){if(o){for(var t=0;t<o.length;t++)t!==r&&o[t].unsubscribe();o=null}n.next(e)})))}(e)}}Ud.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=Wd.argsOrArgArray(e)).length?Bd.innerFrom(e[0]):new Fd.Observable(zd(e))},Ud.raceInit=zd;var Vd={},Hd=(Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.range=void 0,o),Gd=O;Vd.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return Gd.EMPTY;var o=e+r;return new Hd.Observable(n?function(e){var t=r;return n.schedule(function(){t<o?(e.next(t++),this.schedule()):e.complete()})}:function(e){for(var t=r;t<o&&!e.closed;)e.next(t++);e.complete()})};var Yd={},Kd=(Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.using=void 0,o),Zd=R,Qd=O;Yd.using=function(n,o){return new Kd.Observable(function(e){var t=n(),r=o(t);return(r?Zd.innerFrom(r):Qd.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var Xd={},Jd=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},$d=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},eh=(Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.zip=void 0,o),th=R,rh=Od,nh=O,oh=j,ih=i;Xd.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=ih.popResultSelector(e),u=rh.argsOrArgArray(e);return u.length?new eh.Observable(function(r){for(var n=u.map(function(){return[]}),o=u.map(function(){return!1}),e=(r.add(function(){n=o=null}),0);!r.closed&&e<u.length;e++)!function(t){th.innerFrom(u[t]).subscribe(oh.createOperatorSubscriber(r,function(e){n[t].push(e),n.every(function(e){return e.length})&&(e=n.map(function(e){return e.shift()}),r.next(i?i.apply(void 0,$d([],Jd(e))):e),n.some(function(e,t){return!e.length&&o[t]})&&r.complete())},function(){o[t]=!0,n[t].length||r.complete()}))}(e);return function(){n=o=null}}):nh.EMPTY};var uh={},ah=(Object.defineProperty(uh,"__esModule",{value:!0}),{}),sh=(Object.defineProperty(ah,"__esModule",{value:!0}),ah.audit=void 0,T),ch=R,lh=j;ah.audit=function(s){return sh.operate(function(e,t){function r(){var e;null!=u&&u.unsubscribe(),u=null,o&&(o=!1,e=i,i=null,t.next(e)),a&&t.complete()}function n(){u=null,a&&t.complete()}var o=!1,i=null,u=null,a=!1;e.subscribe(lh.createOperatorSubscriber(t,function(e){o=!0,i=e,u||ch.innerFrom(s(e)).subscribe(u=lh.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var fh={},ph=(Object.defineProperty(fh,"__esModule",{value:!0}),fh.auditTime=void 0,S),dh=ah,hh=ud;fh.auditTime=function(e,t){return void 0===t&&(t=ph.asyncScheduler),dh.audit(function(){return hh.timer(e,t)})};var bh={},yh=(Object.defineProperty(bh,"__esModule",{value:!0}),bh.buffer=void 0,T),_h=g,vh=j,mh=R;bh.buffer=function(n){return yh.operate(function(e,t){var r=[];return e.subscribe(vh.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),mh.innerFrom(n).subscribe(vh.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},_h.noop)),function(){r=null}})};var gh={},Oh=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},wh=(Object.defineProperty(gh,"__esModule",{value:!0}),gh.bufferCount=void 0,T),Eh=j,Ph=v;gh.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,wh.operate(function(e,f){var p=[],d=0;e.subscribe(Eh.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=Oh(p),a=u.next();!a.done;a=u.next())(l=a.value).push(e),h<=l.length&&(i=null!=i?i:[]).push(l)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}if(i)try{for(var s=Oh(i),c=s.next();!c.done;c=s.next()){var l=c.value;Ph.arrRemove(p,l),f.next(l)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},function(){var t,e;try{for(var r=Oh(p),n=r.next();!n.done;n=r.next()){var o=n.value;f.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}f.complete()},void 0,function(){p=null}))})};var Sh={},Th=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},jh=(Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.bufferTime=void 0,m),Ch=T,Rh=j,Ih=v,Ah=S,kh=i,Mh=pl;Sh.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=kh.popScheduler(t))?e:Ah.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return Ch.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Ih.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new jh.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),Mh.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?Mh.executeSchedule(r,u,o,a,!0):n=!0,o(),Rh.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=Th(n),i=o.next();!i.done;i=o.next()){var u=i.value,a=u.buffer;a.push(e),l<=a.length&&c(u)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;null!=s&&s.length;)r.next(s.shift().buffer);null!=t&&t.unsubscribe(),r.complete(),r.unsubscribe()},void 0,function(){return s=null}));e.subscribe(t)})};var Nh={},xh=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Dh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.bufferToggle=void 0,m),Lh=T,Uh=R,Fh=j,Bh=g,Wh=v;Nh.bufferToggle=function(t,o){return Lh.operate(function(e,n){var i=[];Uh.innerFrom(t).subscribe(Fh.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new Dh.Subscription);r.add(Uh.innerFrom(o(e)).subscribe(Fh.createOperatorSubscriber(n,function(){Wh.arrRemove(i,t),n.next(t),r.unsubscribe()},Bh.noop)))},Bh.noop)),e.subscribe(Fh.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=xh(i),o=n.next();!o.done;o=n.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},function(){for(;0<i.length;)n.next(i.shift());n.complete()}))})};var qh={},zh=(Object.defineProperty(qh,"__esModule",{value:!0}),qh.bufferWhen=void 0,T),Vh=g,Hh=j,Gh=R;qh.bufferWhen=function(i){return zh.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),Gh.innerFrom(i()).subscribe(n=Hh.createOperatorSubscriber(t,o,Vh.noop))};o(),e.subscribe(Hh.createOperatorSubscriber(t,function(e){return null==r?void 0:r.push(e)},function(){r&&t.next(r),t.complete()},void 0,function(){return r=n=null}))})};var Yh={},Kh=(Object.defineProperty(Yh,"__esModule",{value:!0}),Yh.catchError=void 0,R),Zh=j,Qh=T;Yh.catchError=function u(a){return Qh.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(Zh.createOperatorSubscriber(r,void 0,void 0,function(e){n=Kh.innerFrom(a(e,u(a)(t))),o?(o.unsubscribe(),o=null,n.subscribe(r)):i=!0}));i&&(o.unsubscribe(),o=null,n.subscribe(r))})};var Xh={},Jh={},I={},$h={},eb={},tb={},rb=(Object.defineProperty(tb,"__esModule",{value:!0}),tb.scanInternals=void 0,j);tb.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(rb.createOperatorSubscriber(r,function(e){var t=i++;o=n?u(o,e,t):(n=!0,e),s&&r.next(o)},c&&function(){n&&r.next(o),r.complete()}))}},Object.defineProperty(eb,"__esModule",{value:!0}),eb.reduce=void 0;var nb=tb,ob=T;eb.reduce=function(e,t){return ob.operate(nb.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty($h,"__esModule",{value:!0}),$h.toArray=void 0;function ib(e,t){return e.push(t),e}var ub=eb,ab=T;$h.toArray=function(){return ab.operate(function(e,t){ub.reduce(ib,[])(e).subscribe(t)})},Object.defineProperty(I,"__esModule",{value:!0}),I.joinAllInternals=void 0;var sb=p,cb=wf,lb=c,fb=ap,pb=$h;I.joinAllInternals=function(t,e){return lb.pipe(pb.toArray(),fb.mergeMap(function(e){return t(e)}),e?cb.mapOneOrManyArgs(e):sb.identity)},Object.defineProperty(Jh,"__esModule",{value:!0}),Jh.combineLatestAll=void 0;var db=y,hb=I;Jh.combineLatestAll=function(e){return hb.joinAllInternals(db.combineLatest,e)},Object.defineProperty(Xh,"__esModule",{value:!0}),Xh.combineAll=void 0;Xh.combineAll=Jh.combineLatestAll;var bb={},yb={},_b=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},vb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},mb=(Object.defineProperty(yb,"__esModule",{value:!0}),yb.combineLatest=void 0,y),gb=T,Ob=Od,wb=wf,Eb=c,Pb=i;function Sb(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Pb.popResultSelector(r);return t?Eb.pipe(Sb.apply(void 0,vb([],_b(r))),wb.mapOneOrManyArgs(t)):gb.operate(function(e,t){mb.combineLatestInit(vb([e],_b(Ob.argsOrArgArray(r))))(t)})}yb.combineLatest=Sb;var Tb=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},jb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Cb=(Object.defineProperty(bb,"__esModule",{value:!0}),bb.combineLatestWith=void 0,yb);bb.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Cb.combineLatest.apply(void 0,jb([],Tb(e)))};var wf={},Rb=(Object.defineProperty(wf,"__esModule",{value:!0}),wf.concatMap=void 0,ap),Ib=E;wf.concatMap=function(e,t){return Ib.isFunction(t)?Rb.mergeMap(e,t,1):Rb.mergeMap(e,1)};var Ab={},kb=(Object.defineProperty(Ab,"__esModule",{value:!0}),Ab.concatMapTo=void 0,wf),Mb=E;Ab.concatMapTo=function(e,t){return Mb.isFunction(t)?kb.concatMap(function(){return e},t):kb.concatMap(function(){return e})};var Nb={},xb={},Db=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Lb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Ub=(Object.defineProperty(xb,"__esModule",{value:!0}),xb.concat=void 0,T),Fb=ip,Bb=i,Wb=Ec;xb.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Bb.popScheduler(r);return Ub.operate(function(e,t){Fb.concatAll()(Wb.from(Lb([e],Db(r)),n)).subscribe(t)})};var qb=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},zb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Vb=(Object.defineProperty(Nb,"__esModule",{value:!0}),Nb.concatWith=void 0,xb);Nb.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vb.concat.apply(void 0,zb([],qb(e)))};var Hb={},Gb={},Yb=(Object.defineProperty(Gb,"__esModule",{value:!0}),Gb.fromSubscribable=void 0,o);Gb.fromSubscribable=function(t){return new Yb.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(Hb,"__esModule",{value:!0}),Hb.connect=void 0;var Kb=t,Zb=R,Qb=T,Xb=Gb,Jb={connector:function(){return new Kb.Subject}};Hb.connect=function(n,e){var o=(e=void 0===e?Jb:e).connector;return Qb.operate(function(e,t){var r=o();Zb.innerFrom(n(Xb.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var Gb={},$b=(Object.defineProperty(Gb,"__esModule",{value:!0}),Gb.count=void 0,eb);Gb.count=function(n){return $b.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var ey={},ty=(Object.defineProperty(ey,"__esModule",{value:!0}),ey.debounce=void 0,T),ry=g,ny=j,oy=R;ey.debounce=function(u){return ty.operate(function(e,t){function r(){var e;null!=i&&i.unsubscribe(),i=null,n&&(n=!1,e=o,o=null,t.next(e))}var n=!1,o=null,i=null;e.subscribe(ny.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=ny.createOperatorSubscriber(t,r,ry.noop),oy.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var iy={},uy=(Object.defineProperty(iy,"__esModule",{value:!0}),iy.debounceTime=void 0,S),ay=T,sy=j;iy.debounceTime=function(a,s){return void 0===s&&(s=uy.asyncScheduler),ay.operate(function(e,r){var n=null,t=null,o=null,i=function(){var e;n&&(n.unsubscribe(),e=t,t=n=null,r.next(e))};function u(){var e=o+a,t=s.now();if(t<e)return n=this.schedule(void 0,e-t),void r.add(n);i()}e.subscribe(sy.createOperatorSubscriber(r,function(e){t=e,o=s.now(),n||(n=s.schedule(u,a),r.add(n))},function(){i(),r.complete()},void 0,function(){t=n=null}))})};var cy={},ly=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.defaultIfEmpty=void 0,T),fy=j;cy.defaultIfEmpty=function(n){return ly.operate(function(e,t){var r=!1;e.subscribe(fy.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var A={},py={},dy={},hy=(Object.defineProperty(dy,"__esModule",{value:!0}),dy.take=void 0,O),by=T,yy=j;dy.take=function(n){return n<=0?function(){return hy.EMPTY}:by.operate(function(e,t){var r=0;e.subscribe(yy.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var _y={},vy=(Object.defineProperty(_y,"__esModule",{value:!0}),_y.ignoreElements=void 0,T),my=j,gy=g;_y.ignoreElements=function(){return vy.operate(function(e,t){e.subscribe(my.createOperatorSubscriber(t,gy.noop))})};var Oy={},wy=(Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.mapTo=void 0,Ef);Oy.mapTo=function(e){return wy.map(function(){return e})},Object.defineProperty(py,"__esModule",{value:!0}),py.delayWhen=void 0;var Ey=op,Py=dy,Sy=_y,Ty=Oy,jy=ap,Cy=R;py.delayWhen=function t(r,n){return n?function(e){return Ey.concat(n.pipe(Py.take(1),Sy.ignoreElements()),e.pipe(t(r)))}:jy.mergeMap(function(e,t){return Cy.innerFrom(r(e,t)).pipe(Py.take(1),Ty.mapTo(e))})},Object.defineProperty(A,"__esModule",{value:!0}),A.delay=void 0;var Ry=S,Iy=py,Ay=ud;A.delay=function(e,t){var r=Ay.timer(e,t=void 0===t?Ry.asyncScheduler:t);return Iy.delayWhen(function(){return r})};var ky={},My=(Object.defineProperty(ky,"__esModule",{value:!0}),ky.dematerialize=void 0,hs),Ny=T,xy=j;ky.dematerialize=function(){return Ny.operate(function(e,t){e.subscribe(xy.createOperatorSubscriber(t,function(e){return My.observeNotification(e,t)}))})};var Dy={},Ly=(Object.defineProperty(Dy,"__esModule",{value:!0}),Dy.distinct=void 0,T),Uy=j,Fy=g,By=R;Dy.distinct=function(o,t){return Ly.operate(function(e,r){var n=new Set;e.subscribe(Uy.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&By.innerFrom(t).subscribe(Uy.createOperatorSubscriber(r,function(){return n.clear()},Fy.noop))})};var Wy={},qy=(Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.distinctUntilChanged=void 0,p),zy=T,Vy=j;function Hy(e,t){return e===t}Wy.distinctUntilChanged=function(i,u){return void 0===u&&(u=qy.identity),i=null!=i?i:Hy,zy.operate(function(e,r){var n,o=!0;e.subscribe(Vy.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var Gy={},Yy=(Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.distinctUntilKeyChanged=void 0,Wy);Gy.distinctUntilKeyChanged=function(r,n){return Yy.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var Ky={},Zy={},Qy=(Object.defineProperty(Zy,"__esModule",{value:!0}),Zy.throwIfEmpty=void 0,jc),Xy=T,Jy=j;function $y(){return new Qy.EmptyError}Zy.throwIfEmpty=function(n){return void 0===n&&(n=$y),Xy.operate(function(e,t){var r=!1;e.subscribe(Jy.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(Ky,"__esModule",{value:!0}),Ky.elementAt=void 0;var e_=Nc,t_=kd,r_=Zy,n_=cy,o_=dy;Ky.elementAt=function(r,t){if(r<0)throw new e_.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(t_.filter(function(e,t){return t===r}),o_.take(1),n?n_.defaultIfEmpty(t):r_.throwIfEmpty(function(){return new e_.ArgumentOutOfRangeError}))}};var i_={},u_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},a_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},s_=(Object.defineProperty(i_,"__esModule",{value:!0}),i_.endWith=void 0,op),c_=h;i_.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return s_.concat(e,c_.of.apply(void 0,a_([],u_(t))))}};var l_={},f_=(Object.defineProperty(l_,"__esModule",{value:!0}),l_.every=void 0,T),p_=j;l_.every=function(o,i){return f_.operate(function(t,r){var n=0;t.subscribe(p_.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var d_={},h_={},b_={},y_=(Object.defineProperty(b_,"__esModule",{value:!0}),b_.exhaustMap=void 0,Ef),__=R,v_=T,m_=j;b_.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return __.innerFrom(i(r,n)).pipe(y_.map(function(e,t){return o(r,e,n,t)}))}))}:v_.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(m_.createOperatorSubscriber(t,function(e){n||(n=m_.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),__.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(h_,"__esModule",{value:!0}),h_.exhaustAll=void 0;var g_=b_,O_=p;h_.exhaustAll=function(){return g_.exhaustMap(O_.identity)},Object.defineProperty(d_,"__esModule",{value:!0}),d_.exhaust=void 0;d_.exhaust=h_.exhaustAll;var w_={},E_=(Object.defineProperty(w_,"__esModule",{value:!0}),w_.expand=void 0,T),P_=sp;w_.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,E_.operate(function(e,t){return P_.mergeInternals(e,t,r,n,void 0,!0,o)})};var S_={},T_=(Object.defineProperty(S_,"__esModule",{value:!0}),S_.finalize=void 0,T);S_.finalize=function(r){return T_.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var j_={},C_=(Object.defineProperty(j_,"__esModule",{value:!0}),j_.createFind=j_.find=void 0,T),R_=j;function I_(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(R_.createOperatorSubscriber(n,function(e){var t=o++;i.call(u,e,t,r)&&(n.next(a?t:e),n.complete())},function(){n.next(a?-1:void 0),n.complete()}))}}j_.find=function(e,t){return C_.operate(I_(e,t,"value"))},j_.createFind=I_;var A_={},k_=(Object.defineProperty(A_,"__esModule",{value:!0}),A_.findIndex=void 0,T),M_=j_;A_.findIndex=function(e,t){return k_.operate(M_.createFind(e,t,"index"))};var N_={},x_=(Object.defineProperty(N_,"__esModule",{value:!0}),N_.first=void 0,jc),D_=kd,L_=dy,U_=cy,F_=Zy,B_=p;N_.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?D_.filter(function(e,t){return n(e,t,r)}):B_.identity,L_.take(1),t?U_.defaultIfEmpty(e):F_.throwIfEmpty(function(){return new x_.EmptyError}))}};var W_={},q_=(Object.defineProperty(W_,"__esModule",{value:!0}),W_.groupBy=void 0,o),z_=R,V_=t,H_=T,G_=j;W_.groupBy=function(b,t,y,_){return H_.operate(function(e,s){function c(t){return r(function(e){return e.error(t)})}t&&"function"!=typeof t?(y=t.duration,l=t.element,_=t.connector):l=t;var l,f=new Map,r=function(e){f.forEach(e),e(s)},p=0,d=!1,h=new G_.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new V_.Subject),i=n,u=o,(a=new q_.Observable(function(e){p++;var t=u.subscribe(e);return function(){t.unsubscribe(),0==--p&&d&&h.unsubscribe()}})).key=i,t=a,s.next(t),y&&(r=G_.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(z_.innerFrom(y(t)).subscribe(r)))),o.next(l?l(e):e)}catch(e){c(e)}var i,u,a},function(){return r(function(e){return e.complete()})},c,function(){return f.clear()},function(){return d=!0,0===p});e.subscribe(h)})};var Y_={},K_=(Object.defineProperty(Y_,"__esModule",{value:!0}),Y_.isEmpty=void 0,T),Z_=j;Y_.isEmpty=function(){return K_.operate(function(e,t){e.subscribe(Z_.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var Q_={},X_={},J_=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$_=(Object.defineProperty(X_,"__esModule",{value:!0}),X_.takeLast=void 0,O),ev=T,tv=j;X_.takeLast=function(t){return t<=0?function(){return $_.EMPTY}:ev.operate(function(e,i){var u=[];e.subscribe(tv.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=J_(u),n=r.next();!n.done;n=r.next()){var o=n.value;i.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}i.complete()},void 0,function(){u=null}))})},Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.last=void 0;var rv=jc,nv=kd,ov=X_,iv=Zy,uv=cy,av=p;Q_.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?nv.filter(function(e,t){return n(e,t,r)}):av.identity,ov.takeLast(1),t?uv.defaultIfEmpty(e):iv.throwIfEmpty(function(){return new rv.EmptyError}))}};var sv={},cv=(Object.defineProperty(sv,"__esModule",{value:!0}),sv.materialize=void 0,hs),lv=T,fv=j;sv.materialize=function(){return lv.operate(function(e,t){e.subscribe(fv.createOperatorSubscriber(t,function(e){t.next(cv.Notification.createNext(e))},function(){t.next(cv.Notification.createComplete()),t.complete()},function(e){t.next(cv.Notification.createError(e)),t.complete()}))})};var pv={},dv=(Object.defineProperty(pv,"__esModule",{value:!0}),pv.max=void 0,eb),hv=E;pv.max=function(r){return dv.reduce(hv.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var bv={},yv=(Object.defineProperty(bv,"__esModule",{value:!0}),bv.flatMap=void 0,ap),yv=(bv.flatMap=yv.mergeMap,{}),_v=(Object.defineProperty(yv,"__esModule",{value:!0}),yv.mergeMapTo=void 0,ap),vv=E;yv.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),vv.isFunction(t)?_v.mergeMap(function(){return e},t,r):_v.mergeMap(function(){return e},r="number"==typeof t?t:r)};var mv={},gv=(Object.defineProperty(mv,"__esModule",{value:!0}),mv.mergeScan=void 0,T),Ov=sp;mv.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),gv.operate(function(e,t){var r=o;return Ov.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var sp={},wv={},Ev=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Pv=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Sv=(Object.defineProperty(wv,"__esModule",{value:!0}),wv.merge=void 0,T),Tv=Od,jv=up,Cv=i,Rv=Ec;wv.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Cv.popScheduler(r),o=Cv.popNumber(r,1/0),r=Tv.argsOrArgArray(r);return Sv.operate(function(e,t){jv.mergeAll(o)(Rv.from(Pv([e],Ev(r)),n)).subscribe(t)})};var Iv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Av=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},kv=(Object.defineProperty(sp,"__esModule",{value:!0}),sp.mergeWith=void 0,wv);sp.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return kv.merge.apply(void 0,Av([],Iv(e)))};var Mv={},Nv=(Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.min=void 0,eb),xv=E;Mv.min=function(r){return Nv.reduce(xv.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var Dv={},Lv=(Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.multicast=void 0,pn),Uv=E,Fv=Hb;Dv.multicast=function(e,t){var r=Uv.isFunction(e)?e:function(){return e};return Uv.isFunction(t)?Fv.connect(t,{connector:r}):function(e){return new Lv.ConnectableObservable(e,r)}};var Bv={},Wv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},qv=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},zv=(Object.defineProperty(Bv,"__esModule",{value:!0}),Bv.onErrorResumeNext=Bv.onErrorResumeNextWith=void 0,Od),Vv=gd;function Hv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=zv.argsOrArgArray(e);return function(e){return Vv.onErrorResumeNext.apply(void 0,qv([e],Wv(r)))}}Bv.onErrorResumeNextWith=Hv,Bv.onErrorResumeNext=Hv;var Gv={},Yv=(Object.defineProperty(Gv,"__esModule",{value:!0}),Gv.pairwise=void 0,T),Kv=j;Gv.pairwise=function(){return Yv.operate(function(e,r){var n,o=!1;e.subscribe(Kv.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var Zv={},Qv=(Object.defineProperty(Zv,"__esModule",{value:!0}),Zv.pluck=void 0,Ef);Zv.pluck=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];var i=o.length;if(0===i)throw new Error("list of properties cannot be empty.");return Qv.map(function(e){for(var t=e,r=0;r<i;r++){var n=null==t?void 0:t[o[r]];if(void 0===n)return;t=n}return t})};var Xv={},Jv=(Object.defineProperty(Xv,"__esModule",{value:!0}),Xv.publish=void 0,t),$v=Dv,em=Hb;Xv.publish=function(t){return t?function(e){return em.connect(t)(e)}:function(e){return $v.multicast(new Jv.Subject)(e)}};var tm={},rm=(Object.defineProperty(tm,"__esModule",{value:!0}),tm.publishBehavior=void 0,P),nm=pn;tm.publishBehavior=function(r){return function(e){var t=new rm.BehaviorSubject(r);return new nm.ConnectableObservable(e,function(){return t})}};var om={},im=(Object.defineProperty(om,"__esModule",{value:!0}),om.publishLast=void 0,_),um=pn;om.publishLast=function(){return function(e){var t=new im.AsyncSubject;return new um.ConnectableObservable(e,function(){return t})}};var am={},sm=(Object.defineProperty(am,"__esModule",{value:!0}),am.publishReplay=void 0,s),cm=Dv,lm=E;am.publishReplay=function(t,r,e,n){e&&!lm.isFunction(e)&&(n=e);var o=lm.isFunction(e)?e:void 0;return function(e){return cm.multicast(new sm.ReplaySubject(t,r,n),o)(e)}};var fm={},pm=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},dm=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},hm=(Object.defineProperty(fm,"__esModule",{value:!0}),fm.raceWith=void 0,Ud),bm=T,ym=p;fm.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?bm.operate(function(e,t){hm.raceInit(dm([e],pm(r)))(t)}):ym.identity};var _m={},vm=(Object.defineProperty(_m,"__esModule",{value:!0}),_m.repeat=void 0,O),mm=T,gm=j,Om=R,wm=ud;_m.repeat=function(e){var t,a,s=1/0;return null!=e&&("object"==typeof e?(t=e.count,s=void 0===t?1/0:t,a=e.delay):s=e),s<=0?function(){return vm.EMPTY}:mm.operate(function(t,r){function n(){var e=!1;o=t.subscribe(gm.createOperatorSubscriber(r,void 0,function(){++i<s?o?u():e=!0:r.complete()})),e&&u()}var o,i=0,u=function(){var e,t;null!=o&&o.unsubscribe(),(o=null)!=a?(e="number"==typeof a?wm.timer(a):Om.innerFrom(a(i)),t=gm.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var Em={},Pm=(Object.defineProperty(Em,"__esModule",{value:!0}),Em.repeatWhen=void 0,R),Sm=t,Tm=T,jm=j;Em.repeatWhen=function(l){return Tm.operate(function(e,t){var r,n,o=!1,i=!1,u=!1,a=function(){return u&&i&&(t.complete(),!0)},s=function(){return n||(n=new Sm.Subject,Pm.innerFrom(l(n)).subscribe(jm.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(jm.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var Cm={},Rm=(Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.retry=void 0,T),Im=j,Am=p,km=ud,Mm=R;Cm.retry=function(e){var t=(e=(e=void 0===e?1/0:e)&&"object"==typeof e?e:{count:e}).count,c=void 0===t?1/0:t,l=e.delay,r=void 0!==(t=e.resetOnSuccess)&&t;return c<=0?Am.identity:Rm.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(Im.createOperatorSubscriber(i,function(e){r&&(a=0),i.next(e)},void 0,function(e){var t,r,n;a++<c?(t=function(){u?(u.unsubscribe(),u=null,s()):o=!0},null!=l?(r="number"==typeof l?km.timer(l):Mm.innerFrom(l(e,a)),n=Im.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var Nm={},xm=(Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.retryWhen=void 0,R),Dm=t,Lm=T,Um=j;Nm.retryWhen=function(u){return Lm.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(Um.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new Dm.Subject,xm.innerFrom(u(n)).subscribe(Um.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var Fm={},Bm=(Object.defineProperty(Fm,"__esModule",{value:!0}),Fm.sample=void 0,R),Wm=T,qm=g,zm=j;Fm.sample=function(o){return Wm.operate(function(e,t){var r=!1,n=null;e.subscribe(zm.createOperatorSubscriber(t,function(e){r=!0,n=e})),Bm.innerFrom(o).subscribe(zm.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},qm.noop))})};var Vm={},Hm=(Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.sampleTime=void 0,S),Gm=Fm,Ym=id;Vm.sampleTime=function(e,t){return Gm.sample(Ym.interval(e,t=void 0===t?Hm.asyncScheduler:t))};var Km={},Zm=(Object.defineProperty(Km,"__esModule",{value:!0}),Km.scan=void 0,T),Qm=tb;Km.scan=function(e,t){return Zm.operate(Qm.scanInternals(e,t,2<=arguments.length,!0))};var tb={},Xm=(Object.defineProperty(tb,"__esModule",{value:!0}),tb.sequenceEqual=void 0,T),Jm=j,$m=R;function e0(){return{buffer:[],complete:!1}}tb.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),Xm.operate(function(e,t){function r(n,o){var r=Jm.createOperatorSubscriber(t,function(e){var t=o.buffer,r=o.complete;0===t.length?r?i(!1):n.buffer.push(e):a(e,t.shift())||i(!1)},function(){n.complete=!0;var e=o.complete,t=o.buffer;e&&i(0===t.length),null!=r&&r.unsubscribe()});return r}var n=e0(),o=e0(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),$m.innerFrom(u).subscribe(r(o,n))})};var t0={},r0=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},n0=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},o0=(Object.defineProperty(t0,"__esModule",{value:!0}),t0.share=void 0,R),i0=t,u0=Zr,a0=T;function s0(e,t){for(var r,n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!0===t)e();else if(!1!==t)return r=new u0.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),o0.innerFrom(t.apply(void 0,n0([],r0(n)))).subscribe(r)}t0.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new i0.Subject}:t,d=void 0===(t=e.resetOnError)||t,h=void 0===(t=e.resetOnComplete)||t,b=void 0===(t=e.resetOnRefCountZero)||t;return function(e){function n(){var e=o;f(),null!=e&&e.unsubscribe()}var o,i,u,a=0,s=!1,c=!1,l=function(){null!=i&&i.unsubscribe(),i=void 0},f=function(){l(),o=u=void 0,s=c=!1};return a0.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=s0(n,b))}),r.subscribe(t),!o&&0<a&&(o=new u0.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=s0(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=s0(f,h),r.complete()}}),o0.innerFrom(e).subscribe(o))})(e)}};var c0={},l0=(Object.defineProperty(c0,"__esModule",{value:!0}),c0.shareReplay=void 0,s),f0=t0;c0.shareReplay=function(e,t,r){var n,o,i=!1;return e&&"object"==typeof e?(n=e.bufferSize,o=void 0===n?1/0:n,n=e.windowTime,t=void 0===n?1/0:n,i=void 0!==(n=e.refCount)&&n,r=e.scheduler):o=null!=e?e:1/0,f0.share({connector:function(){return new l0.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var p0={},d0=(Object.defineProperty(p0,"__esModule",{value:!0}),p0.single=void 0,jc),h0=Ol,b0=Nl,y0=T,_0=j;p0.single=function(a){return y0.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(_0.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new h0.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new b0.NotFoundError("No matching values"):new d0.EmptyError)}))})};var v0={},m0=(Object.defineProperty(v0,"__esModule",{value:!0}),v0.skip=void 0,kd);v0.skip=function(r){return m0.filter(function(e,t){return r<=t})};var g0={},O0=(Object.defineProperty(g0,"__esModule",{value:!0}),g0.skipLast=void 0,p),w0=T,E0=j;g0.skipLast=function(u){return u<=0?O0.identity:w0.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(E0.createOperatorSubscriber(n,function(e){var t,r=i++;r<u?o[r]=e:(t=o[r=r%u],o[r]=e,n.next(t))})),function(){o=null}})};var P0={},S0=(Object.defineProperty(P0,"__esModule",{value:!0}),P0.skipUntil=void 0,T),T0=j,j0=R,C0=g;P0.skipUntil=function(o){return S0.operate(function(e,t){var r=!1,n=T0.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},C0.noop);j0.innerFrom(o).subscribe(n),e.subscribe(T0.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var R0={},I0=(Object.defineProperty(R0,"__esModule",{value:!0}),R0.skipWhile=void 0,T),A0=j;R0.skipWhile=function(o){return I0.operate(function(e,t){var r=!1,n=0;e.subscribe(A0.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var k0={},M0=(Object.defineProperty(k0,"__esModule",{value:!0}),k0.startWith=void 0,op),N0=i,x0=T;k0.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=N0.popScheduler(r);return x0.operate(function(e,t){(n?M0.concat(r,e,n):M0.concat(r,e)).subscribe(t)})};var D0={},L0={},U0=(Object.defineProperty(L0,"__esModule",{value:!0}),L0.switchMap=void 0,R),F0=T,B0=j;L0.switchMap=function(s,c){return F0.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(B0.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;U0.innerFrom(s(t,n)).subscribe(u=B0.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(D0,"__esModule",{value:!0}),D0.switchAll=void 0;var W0=L0,q0=p;D0.switchAll=function(){return W0.switchMap(q0.identity)};var z0={},V0=(Object.defineProperty(z0,"__esModule",{value:!0}),z0.switchMapTo=void 0,L0),H0=E;z0.switchMapTo=function(e,t){return H0.isFunction(t)?V0.switchMap(function(){return e},t):V0.switchMap(function(){return e})};var G0={},Y0=(Object.defineProperty(G0,"__esModule",{value:!0}),G0.switchScan=void 0,L0),K0=T;G0.switchScan=function(n,o){return K0.operate(function(e,t){var r=o;return Y0.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var Z0={},Q0=(Object.defineProperty(Z0,"__esModule",{value:!0}),Z0.takeUntil=void 0,T),X0=j,J0=R,$0=g;Z0.takeUntil=function(r){return Q0.operate(function(e,t){J0.innerFrom(r).subscribe(X0.createOperatorSubscriber(t,function(){return t.complete()},$0.noop)),t.closed||e.subscribe(t)})};var eg={},tg=(Object.defineProperty(eg,"__esModule",{value:!0}),eg.takeWhile=void 0,T),rg=j;eg.takeWhile=function(o,i){return void 0===i&&(i=!1),tg.operate(function(e,r){var n=0;e.subscribe(rg.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var ng={},og=(Object.defineProperty(ng,"__esModule",{value:!0}),ng.tap=void 0,E),ig=T,ug=j,ag=p;ng.tap=function(e,t,r){var o=og.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?ig.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(ug.createOperatorSubscriber(r,function(e){var t;null!=(t=o.next)&&t.call(o,e),r.next(e)},function(){var e;n=!1,null!=(e=o.complete)&&e.call(o),r.complete()},function(e){var t;n=!1,null!=(t=o.error)&&t.call(o,e),r.error(e)},function(){var e;n&&null!=(e=o.unsubscribe)&&e.call(o),null!=(e=o.finalize)&&e.call(o)}))}):ag.identity};var E={},sg=(Object.defineProperty(E,"__esModule",{value:!0}),E.throttle=void 0,T),cg=j,lg=R;E.throttle=function(h,b){return sg.operate(function(e,t){function r(){var e;a&&(a=!1,e=s,s=null,t.next(e),l||d(e))}var n=null!=b?b:{},o=n.leading,i=void 0===o||o,o=n.trailing,u=void 0!==o&&o,a=!1,s=null,c=null,l=!1,f=function(){null!=c&&c.unsubscribe(),c=null,u&&(r(),l&&t.complete())},p=function(){c=null,l&&t.complete()},d=function(e){return c=lg.innerFrom(h(e)).subscribe(cg.createOperatorSubscriber(t,f,p))};e.subscribe(cg.createOperatorSubscriber(t,function(e){a=!0,s=e,c&&!c.closed||(i?r():d(e))},function(){l=!0,u&&a&&c&&!c.closed||t.complete()}))})};var fg={},pg=(Object.defineProperty(fg,"__esModule",{value:!0}),fg.throttleTime=void 0,S),dg=E,hg=ud;fg.throttleTime=function(e,t,r){var n=hg.timer(e,t=void 0===t?pg.asyncScheduler:t);return dg.throttle(function(){return n},r)};var bg={},yg=(Object.defineProperty(bg,"__esModule",{value:!0}),bg.TimeInterval=bg.timeInterval=void 0,S),_g=T,vg=j;bg.timeInterval=function(i){return void 0===i&&(i=yg.asyncScheduler),_g.operate(function(e,n){var o=i.now();e.subscribe(vg.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new mg(e,r))}))})};var mg=function(e,t){this.value=e,this.interval=t},gg=(bg.TimeInterval=mg,{}),Og=(Object.defineProperty(gg,"__esModule",{value:!0}),gg.timeoutWith=void 0,S),wg=Sl,Eg=Bc;gg.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:Og.async,wg.isValidDate(e)?n=e:"number"==typeof e&&(o=e),!t)throw new TypeError("No observable provided to switch to");if(e=function(){return t},null==n&&null==o)throw new TypeError("No timeout provided.");return Eg.timeout({first:n,each:o,scheduler:r,with:e})};var Sl={},Pg=(Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.timestamp=void 0,u),Sg=Ef;Sl.timestamp=function(t){return void 0===t&&(t=Pg.dateTimestampProvider),Sg.map(function(e){return{value:e,timestamp:t.now()}})};var u={},Tg=(Object.defineProperty(u,"__esModule",{value:!0}),u.window=void 0,t),jg=T,Cg=j,Rg=g,Ig=R;u.window=function(o){return jg.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new Tg.Subject;t.next(n.asObservable());return e.subscribe(Cg.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),Ig.innerFrom(o).subscribe(Cg.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new Tg.Subject)},Rg.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var Ag={},kg=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Mg=(Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.windowCount=void 0,t),Ng=T,xg=j;Ag.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return Ng.operate(function(e,i){var u=[new Mg.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(xg.createOperatorSubscriber(i,function(e){try{for(var t=kg(u),r=t.next();!r.done;r=t.next())r.value.next(e)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=t.return)&&o.call(t)}finally{if(n)throw n.error}}var n,o=a-s+1;0<=o&&o%c==0&&u.shift().complete(),++a%c==0&&(n=new Mg.Subject,u.push(n),i.next(n.asObservable()))},function(){for(;0<u.length;)u.shift().complete();i.complete()},function(e){for(;0<u.length;)u.shift().error(e);i.error(e)},function(){u=null}))})};var Dg={},Lg=(Object.defineProperty(Dg,"__esModule",{value:!0}),Dg.windowTime=void 0,t),Ug=S,Fg=m,Bg=T,Wg=j,qg=v,zg=i,Vg=pl;Dg.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=zg.popScheduler(t))?e:Ug.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return Bg.operate(function(e,n){function r(t){s(function(e){e=e.window;return t(e)}),t(n),n.unsubscribe()}var o=[],i=!1,u=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),qg.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new Fg.Subscription,n.add(e),t=new Lg.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),Vg.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?Vg.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(Wg.createOperatorSubscriber(n,function(t){s(function(e){e.window.next(t),p<=++e.seen&&u(e)})},function(){return r(function(e){return e.complete()})},function(t){return r(function(e){return e.error(t)})})),function(){o=null}})};var pl={},Hg=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Gg=(Object.defineProperty(pl,"__esModule",{value:!0}),pl.windowToggle=void 0,t),Yg=m,Kg=T,Zg=R,Qg=j,Xg=g,Jg=v;pl.windowToggle=function(t,a){return Kg.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];Zg.innerFrom(t).subscribe(Qg.createOperatorSubscriber(o,function(e){var t,r=new Gg.Subject,n=(u.push(r),new Yg.Subscription);try{t=Zg.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(Qg.createOperatorSubscriber(o,function(){Jg.arrRemove(u,r),r.complete(),n.unsubscribe()},Xg.noop,i)))},Xg.noop)),e.subscribe(Qg.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=Hg(n),i=o.next();!i.done;i=o.next())i.value.next(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;0<u.length;)u.shift().complete();o.complete()},i,function(){for(;0<u.length;)u.shift().unsubscribe()}))})};var v={},$g=(Object.defineProperty(v,"__esModule",{value:!0}),v.windowWhen=void 0,t),eO=T,tO=j,rO=R;v.windowWhen=function(u){return eO.operate(function(e,t){var r,n,o=function(e){r.error(e),t.error(e)},i=function(){var e;null!=n&&n.unsubscribe(),null!=r&&r.complete(),r=new $g.Subject,t.next(r.asObservable());try{e=rO.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=tO.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(tO.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var nO={},oO=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},iO=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},uO=(Object.defineProperty(nO,"__esModule",{value:!0}),nO.withLatestFrom=void 0,T),aO=j,sO=R,cO=p,lO=g,fO=i;nO.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=fO.popResultSelector(a);return uO.operate(function(e,r){for(var t=a.length,n=new Array(t),o=a.map(function(){return!1}),i=!1,u=0;u<t;u++)!function(t){sO.innerFrom(a[t]).subscribe(aO.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(cO.identity))&&(o=null))},lO.noop))}(u);e.subscribe(aO.createOperatorSubscriber(r,function(e){i&&(e=iO([e],oO(n)),r.next(s?s.apply(void 0,iO([],oO(e))):e))}))})};var j={},pO=(Object.defineProperty(j,"__esModule",{value:!0}),j.zipAll=void 0,Xd),dO=I;j.zipAll=function(e){return dO.joinAllInternals(pO.zip,e)};var R={},i={},hO=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},bO=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},yO=(Object.defineProperty(i,"__esModule",{value:!0}),i.zip=void 0,Xd),_O=T;i.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return _O.operate(function(e,t){yO.zip.apply(void 0,bO([e],hO(r))).subscribe(t)})};var vO,mO,gO,OO,wO,EO,PO,SO,TO,jO,CO,RO,IO,AO,kO,MO,NO,xO,DO,LO,UO,FO,BO,WO,qO,zO,VO,HO,GO,YO,KO,ZO,QO,XO,JO,$O,ew,tw,rw,nw,ow,iw,uw,aw,sw,cw,lw,fw,pw,dw,hw,bw,yw,_w,vw,mw,gw,Ow,ww,Ew,Pw,Sw,Tw,jw,Cw,Rw,Iw,Aw,kw,Mw,Nw,xw,Dw,Lw,Uw,Fw,Bw,Ww,qw,zw,Vw,Hw,Gw,Yw,Kw,Zw,Qw,Xw,Jw,$w,eE,tE,rE,nE,oE,iE,uE,aE,sE,cE,lE,fE,pE,dE,hE,bE,yE,_E,vE,mE,gE,OE,wE,EE,PE,SE,TE,jE,CE,RE,IE,AE,kE,ME,NE,xE,DE,LE,UE,FE,BE,WE,qE,zE,VE,HE,GE,YE,KE,ZE,QE,XE,JE,$E,eP,tP,rP,nP,oP,iP,uP,aP,sP,cP,lP,fP,pP,dP,hP,bP,yP,_P,vP,mP,gP,OP,wP,EP,PP=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},SP=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},TP=(Object.defineProperty(R,"__esModule",{value:!0}),R.zipWith=void 0,i);R.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return TP.zip.apply(void 0,SP([],PP(e)))},I=Y,vO=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),T=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||vO(t,e,r)},Object.defineProperty(I,"__esModule",{value:!0}),I.interval=I.iif=I.generate=I.fromEventPattern=I.fromEvent=I.from=I.forkJoin=I.empty=I.defer=I.connectable=I.concat=I.combineLatest=I.bindNodeCallback=I.bindCallback=I.UnsubscriptionError=I.TimeoutError=I.SequenceError=I.ObjectUnsubscribedError=I.NotFoundError=I.EmptyError=I.ArgumentOutOfRangeError=I.firstValueFrom=I.lastValueFrom=I.isObservable=I.identity=I.noop=I.pipe=I.NotificationKind=I.Notification=I.Subscriber=I.Subscription=I.Scheduler=I.VirtualAction=I.VirtualTimeScheduler=I.animationFrameScheduler=I.animationFrame=I.queueScheduler=I.queue=I.asyncScheduler=I.async=I.asapScheduler=I.asap=I.AsyncSubject=I.ReplaySubject=I.BehaviorSubject=I.Subject=I.animationFrames=I.observable=I.ConnectableObservable=I.Observable=void 0,I.filter=I.expand=I.exhaustMap=I.exhaustAll=I.exhaust=I.every=I.endWith=I.elementAt=I.distinctUntilKeyChanged=I.distinctUntilChanged=I.distinct=I.dematerialize=I.delayWhen=I.delay=I.defaultIfEmpty=I.debounceTime=I.debounce=I.count=I.connect=I.concatWith=I.concatMapTo=I.concatMap=I.concatAll=I.combineLatestWith=I.combineLatestAll=I.combineAll=I.catchError=I.bufferWhen=I.bufferToggle=I.bufferTime=I.bufferCount=I.buffer=I.auditTime=I.audit=I.config=I.NEVER=I.EMPTY=I.scheduled=I.zip=I.using=I.timer=I.throwError=I.range=I.race=I.partition=I.pairs=I.onErrorResumeNext=I.of=I.never=I.merge=void 0,I.switchMap=I.switchAll=I.subscribeOn=I.startWith=I.skipWhile=I.skipUntil=I.skipLast=I.skip=I.single=I.shareReplay=I.share=I.sequenceEqual=I.scan=I.sampleTime=I.sample=I.refCount=I.retryWhen=I.retry=I.repeatWhen=I.repeat=I.reduce=I.raceWith=I.publishReplay=I.publishLast=I.publishBehavior=I.publish=I.pluck=I.pairwise=I.onErrorResumeNextWith=I.observeOn=I.multicast=I.min=I.mergeWith=I.mergeScan=I.mergeMapTo=I.mergeMap=I.flatMap=I.mergeAll=I.max=I.materialize=I.mapTo=I.map=I.last=I.isEmpty=I.ignoreElements=I.groupBy=I.first=I.findIndex=I.find=I.finalize=void 0,I.zipWith=I.zipAll=I.withLatestFrom=I.windowWhen=I.windowToggle=I.windowTime=I.windowCount=I.window=I.toArray=I.timestamp=I.timeoutWith=I.timeout=I.timeInterval=I.throwIfEmpty=I.throttleTime=I.throttle=I.tap=I.takeWhile=I.takeUntil=I.takeLast=I.take=I.switchScan=I.switchMapTo=void 0,mO=o,Object.defineProperty(I,"Observable",{enumerable:!0,get:function(){return mO.Observable}}),gO=pn,Object.defineProperty(I,"ConnectableObservable",{enumerable:!0,get:function(){return gO.ConnectableObservable}}),OO=it,Object.defineProperty(I,"observable",{enumerable:!0,get:function(){return OO.observable}}),wO=n,Object.defineProperty(I,"animationFrames",{enumerable:!0,get:function(){return wO.animationFrames}}),EO=t,Object.defineProperty(I,"Subject",{enumerable:!0,get:function(){return EO.Subject}}),PO=P,Object.defineProperty(I,"BehaviorSubject",{enumerable:!0,get:function(){return PO.BehaviorSubject}}),SO=s,Object.defineProperty(I,"ReplaySubject",{enumerable:!0,get:function(){return SO.ReplaySubject}}),TO=_,Object.defineProperty(I,"AsyncSubject",{enumerable:!0,get:function(){return TO.AsyncSubject}}),jO=b,Object.defineProperty(I,"asap",{enumerable:!0,get:function(){return jO.asap}}),Object.defineProperty(I,"asapScheduler",{enumerable:!0,get:function(){return jO.asapScheduler}}),CO=S,Object.defineProperty(I,"async",{enumerable:!0,get:function(){return CO.async}}),Object.defineProperty(I,"asyncScheduler",{enumerable:!0,get:function(){return CO.asyncScheduler}}),RO=Fs,Object.defineProperty(I,"queue",{enumerable:!0,get:function(){return RO.queue}}),Object.defineProperty(I,"queueScheduler",{enumerable:!0,get:function(){return RO.queueScheduler}}),IO=Zs,Object.defineProperty(I,"animationFrame",{enumerable:!0,get:function(){return IO.animationFrame}}),Object.defineProperty(I,"animationFrameScheduler",{enumerable:!0,get:function(){return IO.animationFrameScheduler}}),AO=$s,Object.defineProperty(I,"VirtualTimeScheduler",{enumerable:!0,get:function(){return AO.VirtualTimeScheduler}}),Object.defineProperty(I,"VirtualAction",{enumerable:!0,get:function(){return AO.VirtualAction}}),kO=Os,Object.defineProperty(I,"Scheduler",{enumerable:!0,get:function(){return kO.Scheduler}}),MO=m,Object.defineProperty(I,"Subscription",{enumerable:!0,get:function(){return MO.Subscription}}),NO=Zr,Object.defineProperty(I,"Subscriber",{enumerable:!0,get:function(){return NO.Subscriber}}),xO=hs,Object.defineProperty(I,"Notification",{enumerable:!0,get:function(){return xO.Notification}}),Object.defineProperty(I,"NotificationKind",{enumerable:!0,get:function(){return xO.NotificationKind}}),DO=c,Object.defineProperty(I,"pipe",{enumerable:!0,get:function(){return DO.pipe}}),LO=g,Object.defineProperty(I,"noop",{enumerable:!0,get:function(){return LO.noop}}),UO=p,Object.defineProperty(I,"identity",{enumerable:!0,get:function(){return UO.identity}}),FO=Dc,Object.defineProperty(I,"isObservable",{enumerable:!0,get:function(){return FO.isObservable}}),BO=Rc,Object.defineProperty(I,"lastValueFrom",{enumerable:!0,get:function(){return BO.lastValueFrom}}),WO=kc,Object.defineProperty(I,"firstValueFrom",{enumerable:!0,get:function(){return WO.firstValueFrom}}),qO=Nc,Object.defineProperty(I,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return qO.ArgumentOutOfRangeError}}),zO=jc,Object.defineProperty(I,"EmptyError",{enumerable:!0,get:function(){return zO.EmptyError}}),VO=Nl,Object.defineProperty(I,"NotFoundError",{enumerable:!0,get:function(){return VO.NotFoundError}}),HO=f,Object.defineProperty(I,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return HO.ObjectUnsubscribedError}}),GO=Ol,Object.defineProperty(I,"SequenceError",{enumerable:!0,get:function(){return GO.SequenceError}}),YO=Bc,Object.defineProperty(I,"TimeoutError",{enumerable:!0,get:function(){return YO.TimeoutError}}),KO=xr,Object.defineProperty(I,"UnsubscriptionError",{enumerable:!0,get:function(){return KO.UnsubscriptionError}}),ZO=xc,Object.defineProperty(I,"bindCallback",{enumerable:!0,get:function(){return ZO.bindCallback}}),QO=Ff,Object.defineProperty(I,"bindNodeCallback",{enumerable:!0,get:function(){return QO.bindNodeCallback}}),XO=y,Object.defineProperty(I,"combineLatest",{enumerable:!0,get:function(){return XO.combineLatest}}),JO=op,Object.defineProperty(I,"concat",{enumerable:!0,get:function(){return JO.concat}}),$O=Ep,Object.defineProperty(I,"connectable",{enumerable:!0,get:function(){return $O.connectable}}),ew=Pp,Object.defineProperty(I,"defer",{enumerable:!0,get:function(){return ew.defer}}),tw=O,Object.defineProperty(I,"empty",{enumerable:!0,get:function(){return tw.empty}}),rw=Ap,Object.defineProperty(I,"forkJoin",{enumerable:!0,get:function(){return rw.forkJoin}}),nw=Ec,Object.defineProperty(I,"from",{enumerable:!0,get:function(){return nw.from}}),ow=Wf,Object.defineProperty(I,"fromEvent",{enumerable:!0,get:function(){return ow.fromEvent}}),iw=Gf,Object.defineProperty(I,"fromEventPattern",{enumerable:!0,get:function(){return iw.fromEventPattern}}),uw=Tc,Object.defineProperty(I,"generate",{enumerable:!0,get:function(){return uw.generate}}),aw=jl,Object.defineProperty(I,"iif",{enumerable:!0,get:function(){return aw.iif}}),sw=id,Object.defineProperty(I,"interval",{enumerable:!0,get:function(){return sw.interval}}),cw=vc,Object.defineProperty(I,"merge",{enumerable:!0,get:function(){return cw.merge}}),lw=md,Object.defineProperty(I,"never",{enumerable:!0,get:function(){return lw.never}}),fw=h,Object.defineProperty(I,"of",{enumerable:!0,get:function(){return fw.of}}),pw=gd,Object.defineProperty(I,"onErrorResumeNext",{enumerable:!0,get:function(){return pw.onErrorResumeNext}}),dw=Cd,Object.defineProperty(I,"pairs",{enumerable:!0,get:function(){return dw.pairs}}),hw=Id,Object.defineProperty(I,"partition",{enumerable:!0,get:function(){return hw.partition}}),bw=Ud,Object.defineProperty(I,"race",{enumerable:!0,get:function(){return bw.race}}),yw=Vd,Object.defineProperty(I,"range",{enumerable:!0,get:function(){return yw.range}}),_w=Sc,Object.defineProperty(I,"throwError",{enumerable:!0,get:function(){return _w.throwError}}),vw=ud,Object.defineProperty(I,"timer",{enumerable:!0,get:function(){return vw.timer}}),mw=Yd,Object.defineProperty(I,"using",{enumerable:!0,get:function(){return mw.using}}),gw=Xd,Object.defineProperty(I,"zip",{enumerable:!0,get:function(){return gw.zip}}),Ow=Pc,Object.defineProperty(I,"scheduled",{enumerable:!0,get:function(){return Ow.scheduled}}),ww=O,Object.defineProperty(I,"EMPTY",{enumerable:!0,get:function(){return ww.EMPTY}}),Ew=md,Object.defineProperty(I,"NEVER",{enumerable:!0,get:function(){return Ew.NEVER}}),T(uh,I),Pw=Nt,Object.defineProperty(I,"config",{enumerable:!0,get:function(){return Pw.config}}),Sw=ah,Object.defineProperty(I,"audit",{enumerable:!0,get:function(){return Sw.audit}}),Tw=fh,Object.defineProperty(I,"auditTime",{enumerable:!0,get:function(){return Tw.auditTime}}),jw=bh,Object.defineProperty(I,"buffer",{enumerable:!0,get:function(){return jw.buffer}}),Cw=gh,Object.defineProperty(I,"bufferCount",{enumerable:!0,get:function(){return Cw.bufferCount}}),Rw=Sh,Object.defineProperty(I,"bufferTime",{enumerable:!0,get:function(){return Rw.bufferTime}}),Iw=Nh,Object.defineProperty(I,"bufferToggle",{enumerable:!0,get:function(){return Iw.bufferToggle}}),Aw=qh,Object.defineProperty(I,"bufferWhen",{enumerable:!0,get:function(){return Aw.bufferWhen}}),kw=Yh,Object.defineProperty(I,"catchError",{enumerable:!0,get:function(){return kw.catchError}}),Mw=Xh,Object.defineProperty(I,"combineAll",{enumerable:!0,get:function(){return Mw.combineAll}}),Nw=Jh,Object.defineProperty(I,"combineLatestAll",{enumerable:!0,get:function(){return Nw.combineLatestAll}}),xw=bb,Object.defineProperty(I,"combineLatestWith",{enumerable:!0,get:function(){return xw.combineLatestWith}}),Dw=ip,Object.defineProperty(I,"concatAll",{enumerable:!0,get:function(){return Dw.concatAll}}),Lw=wf,Object.defineProperty(I,"concatMap",{enumerable:!0,get:function(){return Lw.concatMap}}),Uw=Ab,Object.defineProperty(I,"concatMapTo",{enumerable:!0,get:function(){return Uw.concatMapTo}}),Fw=Nb,Object.defineProperty(I,"concatWith",{enumerable:!0,get:function(){return Fw.concatWith}}),Bw=Hb,Object.defineProperty(I,"connect",{enumerable:!0,get:function(){return Bw.connect}}),Ww=Gb,Object.defineProperty(I,"count",{enumerable:!0,get:function(){return Ww.count}}),qw=ey,Object.defineProperty(I,"debounce",{enumerable:!0,get:function(){return qw.debounce}}),zw=iy,Object.defineProperty(I,"debounceTime",{enumerable:!0,get:function(){return zw.debounceTime}}),Vw=cy,Object.defineProperty(I,"defaultIfEmpty",{enumerable:!0,get:function(){return Vw.defaultIfEmpty}}),Hw=A,Object.defineProperty(I,"delay",{enumerable:!0,get:function(){return Hw.delay}}),Gw=py,Object.defineProperty(I,"delayWhen",{enumerable:!0,get:function(){return Gw.delayWhen}}),Yw=ky,Object.defineProperty(I,"dematerialize",{enumerable:!0,get:function(){return Yw.dematerialize}}),Kw=Dy,Object.defineProperty(I,"distinct",{enumerable:!0,get:function(){return Kw.distinct}}),Zw=Wy,Object.defineProperty(I,"distinctUntilChanged",{enumerable:!0,get:function(){return Zw.distinctUntilChanged}}),Qw=Gy,Object.defineProperty(I,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Qw.distinctUntilKeyChanged}}),Xw=Ky,Object.defineProperty(I,"elementAt",{enumerable:!0,get:function(){return Xw.elementAt}}),Jw=i_,Object.defineProperty(I,"endWith",{enumerable:!0,get:function(){return Jw.endWith}}),$w=l_,Object.defineProperty(I,"every",{enumerable:!0,get:function(){return $w.every}}),eE=d_,Object.defineProperty(I,"exhaust",{enumerable:!0,get:function(){return eE.exhaust}}),tE=h_,Object.defineProperty(I,"exhaustAll",{enumerable:!0,get:function(){return tE.exhaustAll}}),rE=b_,Object.defineProperty(I,"exhaustMap",{enumerable:!0,get:function(){return rE.exhaustMap}}),nE=w_,Object.defineProperty(I,"expand",{enumerable:!0,get:function(){return nE.expand}}),oE=kd,Object.defineProperty(I,"filter",{enumerable:!0,get:function(){return oE.filter}}),iE=S_,Object.defineProperty(I,"finalize",{enumerable:!0,get:function(){return iE.finalize}}),uE=j_,Object.defineProperty(I,"find",{enumerable:!0,get:function(){return uE.find}}),aE=A_,Object.defineProperty(I,"findIndex",{enumerable:!0,get:function(){return aE.findIndex}}),sE=N_,Object.defineProperty(I,"first",{enumerable:!0,get:function(){return sE.first}}),cE=W_,Object.defineProperty(I,"groupBy",{enumerable:!0,get:function(){return cE.groupBy}}),lE=_y,Object.defineProperty(I,"ignoreElements",{enumerable:!0,get:function(){return lE.ignoreElements}}),fE=Y_,Object.defineProperty(I,"isEmpty",{enumerable:!0,get:function(){return fE.isEmpty}}),pE=Q_,Object.defineProperty(I,"last",{enumerable:!0,get:function(){return pE.last}}),dE=Ef,Object.defineProperty(I,"map",{enumerable:!0,get:function(){return dE.map}}),hE=Oy,Object.defineProperty(I,"mapTo",{enumerable:!0,get:function(){return hE.mapTo}}),bE=sv,Object.defineProperty(I,"materialize",{enumerable:!0,get:function(){return bE.materialize}}),yE=pv,Object.defineProperty(I,"max",{enumerable:!0,get:function(){return yE.max}}),_E=up,Object.defineProperty(I,"mergeAll",{enumerable:!0,get:function(){return _E.mergeAll}}),vE=bv,Object.defineProperty(I,"flatMap",{enumerable:!0,get:function(){return vE.flatMap}}),mE=ap,Object.defineProperty(I,"mergeMap",{enumerable:!0,get:function(){return mE.mergeMap}}),gE=yv,Object.defineProperty(I,"mergeMapTo",{enumerable:!0,get:function(){return gE.mergeMapTo}}),OE=mv,Object.defineProperty(I,"mergeScan",{enumerable:!0,get:function(){return OE.mergeScan}}),wE=sp,Object.defineProperty(I,"mergeWith",{enumerable:!0,get:function(){return wE.mergeWith}}),EE=Mv,Object.defineProperty(I,"min",{enumerable:!0,get:function(){return EE.min}}),PE=Dv,Object.defineProperty(I,"multicast",{enumerable:!0,get:function(){return PE.multicast}}),SE=w,Object.defineProperty(I,"observeOn",{enumerable:!0,get:function(){return SE.observeOn}}),TE=Bv,Object.defineProperty(I,"onErrorResumeNextWith",{enumerable:!0,get:function(){return TE.onErrorResumeNextWith}}),jE=Gv,Object.defineProperty(I,"pairwise",{enumerable:!0,get:function(){return jE.pairwise}}),CE=Zv,Object.defineProperty(I,"pluck",{enumerable:!0,get:function(){return CE.pluck}}),RE=Xv,Object.defineProperty(I,"publish",{enumerable:!0,get:function(){return RE.publish}}),IE=tm,Object.defineProperty(I,"publishBehavior",{enumerable:!0,get:function(){return IE.publishBehavior}}),AE=om,Object.defineProperty(I,"publishLast",{enumerable:!0,get:function(){return AE.publishLast}}),kE=am,Object.defineProperty(I,"publishReplay",{enumerable:!0,get:function(){return kE.publishReplay}}),ME=fm,Object.defineProperty(I,"raceWith",{enumerable:!0,get:function(){return ME.raceWith}}),NE=eb,Object.defineProperty(I,"reduce",{enumerable:!0,get:function(){return NE.reduce}}),xE=_m,Object.defineProperty(I,"repeat",{enumerable:!0,get:function(){return xE.repeat}}),DE=Em,Object.defineProperty(I,"repeatWhen",{enumerable:!0,get:function(){return DE.repeatWhen}}),LE=Cm,Object.defineProperty(I,"retry",{enumerable:!0,get:function(){return LE.retry}}),UE=Nm,Object.defineProperty(I,"retryWhen",{enumerable:!0,get:function(){return UE.retryWhen}}),FE=C,Object.defineProperty(I,"refCount",{enumerable:!0,get:function(){return FE.refCount}}),BE=Fm,Object.defineProperty(I,"sample",{enumerable:!0,get:function(){return BE.sample}}),WE=Vm,Object.defineProperty(I,"sampleTime",{enumerable:!0,get:function(){return WE.sampleTime}}),qE=Km,Object.defineProperty(I,"scan",{enumerable:!0,get:function(){return qE.scan}}),zE=tb,Object.defineProperty(I,"sequenceEqual",{enumerable:!0,get:function(){return zE.sequenceEqual}}),VE=t0,Object.defineProperty(I,"share",{enumerable:!0,get:function(){return VE.share}}),HE=c0,Object.defineProperty(I,"shareReplay",{enumerable:!0,get:function(){return HE.shareReplay}}),GE=p0,Object.defineProperty(I,"single",{enumerable:!0,get:function(){return GE.single}}),YE=v0,Object.defineProperty(I,"skip",{enumerable:!0,get:function(){return YE.skip}}),KE=g0,Object.defineProperty(I,"skipLast",{enumerable:!0,get:function(){return KE.skipLast}}),ZE=P0,Object.defineProperty(I,"skipUntil",{enumerable:!0,get:function(){return ZE.skipUntil}}),QE=R0,Object.defineProperty(I,"skipWhile",{enumerable:!0,get:function(){return QE.skipWhile}}),XE=k0,Object.defineProperty(I,"startWith",{enumerable:!0,get:function(){return XE.startWith}}),JE=yl,Object.defineProperty(I,"subscribeOn",{enumerable:!0,get:function(){return JE.subscribeOn}}),$E=D0,Object.defineProperty(I,"switchAll",{enumerable:!0,get:function(){return $E.switchAll}}),eP=L0,Object.defineProperty(I,"switchMap",{enumerable:!0,get:function(){return eP.switchMap}}),tP=z0,Object.defineProperty(I,"switchMapTo",{enumerable:!0,get:function(){return tP.switchMapTo}}),rP=G0,Object.defineProperty(I,"switchScan",{enumerable:!0,get:function(){return rP.switchScan}}),nP=dy,Object.defineProperty(I,"take",{enumerable:!0,get:function(){return nP.take}}),oP=X_,Object.defineProperty(I,"takeLast",{enumerable:!0,get:function(){return oP.takeLast}}),iP=Z0,Object.defineProperty(I,"takeUntil",{enumerable:!0,get:function(){return iP.takeUntil}}),uP=eg,Object.defineProperty(I,"takeWhile",{enumerable:!0,get:function(){return uP.takeWhile}}),aP=ng,Object.defineProperty(I,"tap",{enumerable:!0,get:function(){return aP.tap}}),sP=E,Object.defineProperty(I,"throttle",{enumerable:!0,get:function(){return sP.throttle}}),cP=fg,Object.defineProperty(I,"throttleTime",{enumerable:!0,get:function(){return cP.throttleTime}}),lP=Zy,Object.defineProperty(I,"throwIfEmpty",{enumerable:!0,get:function(){return lP.throwIfEmpty}}),fP=bg,Object.defineProperty(I,"timeInterval",{enumerable:!0,get:function(){return fP.timeInterval}}),pP=Bc,Object.defineProperty(I,"timeout",{enumerable:!0,get:function(){return pP.timeout}}),dP=gg,Object.defineProperty(I,"timeoutWith",{enumerable:!0,get:function(){return dP.timeoutWith}}),hP=Sl,Object.defineProperty(I,"timestamp",{enumerable:!0,get:function(){return hP.timestamp}}),bP=$h,Object.defineProperty(I,"toArray",{enumerable:!0,get:function(){return bP.toArray}}),yP=u,Object.defineProperty(I,"window",{enumerable:!0,get:function(){return yP.window}}),_P=Ag,Object.defineProperty(I,"windowCount",{enumerable:!0,get:function(){return _P.windowCount}}),vP=Dg,Object.defineProperty(I,"windowTime",{enumerable:!0,get:function(){return vP.windowTime}}),mP=pl,Object.defineProperty(I,"windowToggle",{enumerable:!0,get:function(){return mP.windowToggle}}),gP=v,Object.defineProperty(I,"windowWhen",{enumerable:!0,get:function(){return gP.windowWhen}}),OP=nO,Object.defineProperty(I,"withLatestFrom",{enumerable:!0,get:function(){return OP.withLatestFrom}}),wP=j,Object.defineProperty(I,"zipAll",{enumerable:!0,get:function(){return wP.zipAll}}),EP=R,Object.defineProperty(I,"zipWith",{enumerable:!0,get:function(){return EP.zipWith}});var o={},pn={},jP=(Object.defineProperty(pn,"__esModule",{value:!0}),pn.partition=void 0,Ad),CP=kd;pn.partition=function(t,r){return function(e){return[CP.filter(t,r)(e),CP.filter(jP.not(t,r))(e)]}};var RP,IP,AP,kP,MP,NP,xP,DP,LP,UP,FP,BP,WP,qP,zP,VP,HP,GP,YP,KP,ZP,QP,XP,JP,$P,eS,tS,rS,nS,oS,iS,uS,aS,sS,cS,lS,fS,pS,dS,hS,bS,yS,_S,vS,mS,gS,OS,wS,ES,PS,SS,TS,jS,CS,RS,IS,AS,kS,MS,NS,xS,DS,LS,US,FS,BS,WS,qS,zS,VS,HS,GS,YS,KS,ZS,QS,XS,JS,$S,e1,t1,r1,n1,o1,i1,u1,a1,s1,c1,l1,f1,p1,d1,h1,b1,y1,_1,v1,m1,g1,O1,w1,E1,P1,S1,T1,j1,C1,R1,I1,A1,k1,M1,it={},N1=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},x1=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},D1=(Object.defineProperty(it,"__esModule",{value:!0}),it.race=void 0,Od),L1=fm;it.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return L1.raceWith.apply(void 0,x1([],N1(D1.argsOrArgArray(e))))},n=o,Object.defineProperty(n,"__esModule",{value:!0}),n.mergeAll=n.merge=n.max=n.materialize=n.mapTo=n.map=n.last=n.isEmpty=n.ignoreElements=n.groupBy=n.first=n.findIndex=n.find=n.finalize=n.filter=n.expand=n.exhaustMap=n.exhaustAll=n.exhaust=n.every=n.endWith=n.elementAt=n.distinctUntilKeyChanged=n.distinctUntilChanged=n.distinct=n.dematerialize=n.delayWhen=n.delay=n.defaultIfEmpty=n.debounceTime=n.debounce=n.count=n.connect=n.concatWith=n.concatMapTo=n.concatMap=n.concatAll=n.concat=n.combineLatestWith=n.combineLatest=n.combineLatestAll=n.combineAll=n.catchError=n.bufferWhen=n.bufferToggle=n.bufferTime=n.bufferCount=n.buffer=n.auditTime=n.audit=void 0,n.timeInterval=n.throwIfEmpty=n.throttleTime=n.throttle=n.tap=n.takeWhile=n.takeUntil=n.takeLast=n.take=n.switchScan=n.switchMapTo=n.switchMap=n.switchAll=n.subscribeOn=n.startWith=n.skipWhile=n.skipUntil=n.skipLast=n.skip=n.single=n.shareReplay=n.share=n.sequenceEqual=n.scan=n.sampleTime=n.sample=n.refCount=n.retryWhen=n.retry=n.repeatWhen=n.repeat=n.reduce=n.raceWith=n.race=n.publishReplay=n.publishLast=n.publishBehavior=n.publish=n.pluck=n.partition=n.pairwise=n.onErrorResumeNext=n.observeOn=n.multicast=n.min=n.mergeWith=n.mergeScan=n.mergeMapTo=n.mergeMap=n.flatMap=void 0,n.zipWith=n.zipAll=n.zip=n.withLatestFrom=n.windowWhen=n.windowToggle=n.windowTime=n.windowCount=n.window=n.toArray=n.timestamp=n.timeoutWith=n.timeout=void 0,RP=ah,Object.defineProperty(n,"audit",{enumerable:!0,get:function(){return RP.audit}}),IP=fh,Object.defineProperty(n,"auditTime",{enumerable:!0,get:function(){return IP.auditTime}}),AP=bh,Object.defineProperty(n,"buffer",{enumerable:!0,get:function(){return AP.buffer}}),kP=gh,Object.defineProperty(n,"bufferCount",{enumerable:!0,get:function(){return kP.bufferCount}}),MP=Sh,Object.defineProperty(n,"bufferTime",{enumerable:!0,get:function(){return MP.bufferTime}}),NP=Nh,Object.defineProperty(n,"bufferToggle",{enumerable:!0,get:function(){return NP.bufferToggle}}),xP=qh,Object.defineProperty(n,"bufferWhen",{enumerable:!0,get:function(){return xP.bufferWhen}}),DP=Yh,Object.defineProperty(n,"catchError",{enumerable:!0,get:function(){return DP.catchError}}),LP=Xh,Object.defineProperty(n,"combineAll",{enumerable:!0,get:function(){return LP.combineAll}}),UP=Jh,Object.defineProperty(n,"combineLatestAll",{enumerable:!0,get:function(){return UP.combineLatestAll}}),FP=yb,Object.defineProperty(n,"combineLatest",{enumerable:!0,get:function(){return FP.combineLatest}}),BP=bb,Object.defineProperty(n,"combineLatestWith",{enumerable:!0,get:function(){return BP.combineLatestWith}}),WP=xb,Object.defineProperty(n,"concat",{enumerable:!0,get:function(){return WP.concat}}),qP=ip,Object.defineProperty(n,"concatAll",{enumerable:!0,get:function(){return qP.concatAll}}),zP=wf,Object.defineProperty(n,"concatMap",{enumerable:!0,get:function(){return zP.concatMap}}),VP=Ab,Object.defineProperty(n,"concatMapTo",{enumerable:!0,get:function(){return VP.concatMapTo}}),HP=Nb,Object.defineProperty(n,"concatWith",{enumerable:!0,get:function(){return HP.concatWith}}),GP=Hb,Object.defineProperty(n,"connect",{enumerable:!0,get:function(){return GP.connect}}),YP=Gb,Object.defineProperty(n,"count",{enumerable:!0,get:function(){return YP.count}}),KP=ey,Object.defineProperty(n,"debounce",{enumerable:!0,get:function(){return KP.debounce}}),ZP=iy,Object.defineProperty(n,"debounceTime",{enumerable:!0,get:function(){return ZP.debounceTime}}),QP=cy,Object.defineProperty(n,"defaultIfEmpty",{enumerable:!0,get:function(){return QP.defaultIfEmpty}}),XP=A,Object.defineProperty(n,"delay",{enumerable:!0,get:function(){return XP.delay}}),JP=py,Object.defineProperty(n,"delayWhen",{enumerable:!0,get:function(){return JP.delayWhen}}),$P=ky,Object.defineProperty(n,"dematerialize",{enumerable:!0,get:function(){return $P.dematerialize}}),eS=Dy,Object.defineProperty(n,"distinct",{enumerable:!0,get:function(){return eS.distinct}}),tS=Wy,Object.defineProperty(n,"distinctUntilChanged",{enumerable:!0,get:function(){return tS.distinctUntilChanged}}),rS=Gy,Object.defineProperty(n,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return rS.distinctUntilKeyChanged}}),nS=Ky,Object.defineProperty(n,"elementAt",{enumerable:!0,get:function(){return nS.elementAt}}),oS=i_,Object.defineProperty(n,"endWith",{enumerable:!0,get:function(){return oS.endWith}}),iS=l_,Object.defineProperty(n,"every",{enumerable:!0,get:function(){return iS.every}}),uS=d_,Object.defineProperty(n,"exhaust",{enumerable:!0,get:function(){return uS.exhaust}}),aS=h_,Object.defineProperty(n,"exhaustAll",{enumerable:!0,get:function(){return aS.exhaustAll}}),sS=b_,Object.defineProperty(n,"exhaustMap",{enumerable:!0,get:function(){return sS.exhaustMap}}),cS=w_,Object.defineProperty(n,"expand",{enumerable:!0,get:function(){return cS.expand}}),lS=kd,Object.defineProperty(n,"filter",{enumerable:!0,get:function(){return lS.filter}}),fS=S_,Object.defineProperty(n,"finalize",{enumerable:!0,get:function(){return fS.finalize}}),pS=j_,Object.defineProperty(n,"find",{enumerable:!0,get:function(){return pS.find}}),dS=A_,Object.defineProperty(n,"findIndex",{enumerable:!0,get:function(){return dS.findIndex}}),hS=N_,Object.defineProperty(n,"first",{enumerable:!0,get:function(){return hS.first}}),bS=W_,Object.defineProperty(n,"groupBy",{enumerable:!0,get:function(){return bS.groupBy}}),yS=_y,Object.defineProperty(n,"ignoreElements",{enumerable:!0,get:function(){return yS.ignoreElements}}),_S=Y_,Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return _S.isEmpty}}),vS=Q_,Object.defineProperty(n,"last",{enumerable:!0,get:function(){return vS.last}}),mS=Ef,Object.defineProperty(n,"map",{enumerable:!0,get:function(){return mS.map}}),gS=Oy,Object.defineProperty(n,"mapTo",{enumerable:!0,get:function(){return gS.mapTo}}),OS=sv,Object.defineProperty(n,"materialize",{enumerable:!0,get:function(){return OS.materialize}}),wS=pv,Object.defineProperty(n,"max",{enumerable:!0,get:function(){return wS.max}}),ES=wv,Object.defineProperty(n,"merge",{enumerable:!0,get:function(){return ES.merge}}),PS=up,Object.defineProperty(n,"mergeAll",{enumerable:!0,get:function(){return PS.mergeAll}}),SS=bv,Object.defineProperty(n,"flatMap",{enumerable:!0,get:function(){return SS.flatMap}}),TS=ap,Object.defineProperty(n,"mergeMap",{enumerable:!0,get:function(){return TS.mergeMap}}),jS=yv,Object.defineProperty(n,"mergeMapTo",{enumerable:!0,get:function(){return jS.mergeMapTo}}),CS=mv,Object.defineProperty(n,"mergeScan",{enumerable:!0,get:function(){return CS.mergeScan}}),RS=sp,Object.defineProperty(n,"mergeWith",{enumerable:!0,get:function(){return RS.mergeWith}}),IS=Mv,Object.defineProperty(n,"min",{enumerable:!0,get:function(){return IS.min}}),AS=Dv,Object.defineProperty(n,"multicast",{enumerable:!0,get:function(){return AS.multicast}}),kS=w,Object.defineProperty(n,"observeOn",{enumerable:!0,get:function(){return kS.observeOn}}),MS=Bv,Object.defineProperty(n,"onErrorResumeNext",{enumerable:!0,get:function(){return MS.onErrorResumeNext}}),NS=Gv,Object.defineProperty(n,"pairwise",{enumerable:!0,get:function(){return NS.pairwise}}),xS=pn,Object.defineProperty(n,"partition",{enumerable:!0,get:function(){return xS.partition}}),DS=Zv,Object.defineProperty(n,"pluck",{enumerable:!0,get:function(){return DS.pluck}}),LS=Xv,Object.defineProperty(n,"publish",{enumerable:!0,get:function(){return LS.publish}}),US=tm,Object.defineProperty(n,"publishBehavior",{enumerable:!0,get:function(){return US.publishBehavior}}),FS=om,Object.defineProperty(n,"publishLast",{enumerable:!0,get:function(){return FS.publishLast}}),BS=am,Object.defineProperty(n,"publishReplay",{enumerable:!0,get:function(){return BS.publishReplay}}),WS=it,Object.defineProperty(n,"race",{enumerable:!0,get:function(){return WS.race}}),qS=fm,Object.defineProperty(n,"raceWith",{enumerable:!0,get:function(){return qS.raceWith}}),zS=eb,Object.defineProperty(n,"reduce",{enumerable:!0,get:function(){return zS.reduce}}),VS=_m,Object.defineProperty(n,"repeat",{enumerable:!0,get:function(){return VS.repeat}}),HS=Em,Object.defineProperty(n,"repeatWhen",{enumerable:!0,get:function(){return HS.repeatWhen}}),GS=Cm,Object.defineProperty(n,"retry",{enumerable:!0,get:function(){return GS.retry}}),YS=Nm,Object.defineProperty(n,"retryWhen",{enumerable:!0,get:function(){return YS.retryWhen}}),KS=C,Object.defineProperty(n,"refCount",{enumerable:!0,get:function(){return KS.refCount}}),ZS=Fm,Object.defineProperty(n,"sample",{enumerable:!0,get:function(){return ZS.sample}}),QS=Vm,Object.defineProperty(n,"sampleTime",{enumerable:!0,get:function(){return QS.sampleTime}}),XS=Km,Object.defineProperty(n,"scan",{enumerable:!0,get:function(){return XS.scan}}),JS=tb,Object.defineProperty(n,"sequenceEqual",{enumerable:!0,get:function(){return JS.sequenceEqual}}),$S=t0,Object.defineProperty(n,"share",{enumerable:!0,get:function(){return $S.share}}),e1=c0,Object.defineProperty(n,"shareReplay",{enumerable:!0,get:function(){return e1.shareReplay}}),t1=p0,Object.defineProperty(n,"single",{enumerable:!0,get:function(){return t1.single}}),r1=v0,Object.defineProperty(n,"skip",{enumerable:!0,get:function(){return r1.skip}}),n1=g0,Object.defineProperty(n,"skipLast",{enumerable:!0,get:function(){return n1.skipLast}}),o1=P0,Object.defineProperty(n,"skipUntil",{enumerable:!0,get:function(){return o1.skipUntil}}),i1=R0,Object.defineProperty(n,"skipWhile",{enumerable:!0,get:function(){return i1.skipWhile}}),u1=k0,Object.defineProperty(n,"startWith",{enumerable:!0,get:function(){return u1.startWith}}),a1=yl,Object.defineProperty(n,"subscribeOn",{enumerable:!0,get:function(){return a1.subscribeOn}}),s1=D0,Object.defineProperty(n,"switchAll",{enumerable:!0,get:function(){return s1.switchAll}}),c1=L0,Object.defineProperty(n,"switchMap",{enumerable:!0,get:function(){return c1.switchMap}}),l1=z0,Object.defineProperty(n,"switchMapTo",{enumerable:!0,get:function(){return l1.switchMapTo}}),f1=G0,Object.defineProperty(n,"switchScan",{enumerable:!0,get:function(){return f1.switchScan}}),p1=dy,Object.defineProperty(n,"take",{enumerable:!0,get:function(){return p1.take}}),d1=X_,Object.defineProperty(n,"takeLast",{enumerable:!0,get:function(){return d1.takeLast}}),h1=Z0,Object.defineProperty(n,"takeUntil",{enumerable:!0,get:function(){return h1.takeUntil}}),b1=eg,Object.defineProperty(n,"takeWhile",{enumerable:!0,get:function(){return b1.takeWhile}}),y1=ng,Object.defineProperty(n,"tap",{enumerable:!0,get:function(){return y1.tap}}),_1=E,Object.defineProperty(n,"throttle",{enumerable:!0,get:function(){return _1.throttle}}),v1=fg,Object.defineProperty(n,"throttleTime",{enumerable:!0,get:function(){return v1.throttleTime}}),m1=Zy,Object.defineProperty(n,"throwIfEmpty",{enumerable:!0,get:function(){return m1.throwIfEmpty}}),g1=bg,Object.defineProperty(n,"timeInterval",{enumerable:!0,get:function(){return g1.timeInterval}}),O1=Bc,Object.defineProperty(n,"timeout",{enumerable:!0,get:function(){return O1.timeout}}),w1=gg,Object.defineProperty(n,"timeoutWith",{enumerable:!0,get:function(){return w1.timeoutWith}}),E1=Sl,Object.defineProperty(n,"timestamp",{enumerable:!0,get:function(){return E1.timestamp}}),P1=$h,Object.defineProperty(n,"toArray",{enumerable:!0,get:function(){return P1.toArray}}),S1=u,Object.defineProperty(n,"window",{enumerable:!0,get:function(){return S1.window}}),T1=Ag,Object.defineProperty(n,"windowCount",{enumerable:!0,get:function(){return T1.windowCount}}),j1=Dg,Object.defineProperty(n,"windowTime",{enumerable:!0,get:function(){return j1.windowTime}}),C1=pl,Object.defineProperty(n,"windowToggle",{enumerable:!0,get:function(){return C1.windowToggle}}),R1=v,Object.defineProperty(n,"windowWhen",{enumerable:!0,get:function(){return R1.windowWhen}}),I1=nO,Object.defineProperty(n,"withLatestFrom",{enumerable:!0,get:function(){return I1.withLatestFrom}}),A1=i,Object.defineProperty(n,"zip",{enumerable:!0,get:function(){return A1.zip}}),k1=j,Object.defineProperty(n,"zipAll",{enumerable:!0,get:function(){return k1.zipAll}}),M1=R,Object.defineProperty(n,"zipWith",{enumerable:!0,get:function(){return M1.zipWith}});var t={},U1=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},F1=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},B1=(Object.defineProperty(t,"__esModule",{value:!0}),e),W1=Y,q1=o,z1=0,V1=1,H1=2;function G1(e,t){e=e.pipe((0,q1.publishReplay)(1),(0,q1.refCount)());this._result=e,this._keys=e.pipe((0,q1.mergeMap)(function(e){return(0,W1.from)(e.keys())}),(0,q1.publishReplay)(1),(0,q1.refCount)()),this._records=void 0,this._controls=new Y1,this._summary=new W1.ReplaySubject,this._state=t||z1}G1.prototype.keys=function(){return this._keys},G1.prototype.records=function(){var r=this,e=this._result.pipe((0,q1.mergeMap)(function(t){return new W1.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},G1.prototype.consume=function(){var r=this;return this._result.pipe((0,q1.mergeMap)(function(t){return new W1.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},G1.prototype.pause=function(){this._controls.pause()},G1.prototype.resume=function(){return this._controls.resume()},G1.prototype.push=function(){return this._controls.push()},G1.prototype._startStreaming=function(e){var e=void 0===e?{}:e,t=e.result,r=e.recordsObserver,r=void 0===r?null:r,e=e.summaryObserver,e=void 0===e?null:e,n=[];return e&&n.push(this._summary.subscribe(e)),this._state<V1?(this._state=V1,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,B1.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},G1.prototype._toObservable=function(){var n=this;return new W1.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new G1((t=e,new W1.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},G1.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new Y1);var a=new W1.Subject,s=function(n){return U1(e,void 0,void 0,function(){var t,r;return F1(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),u.pushing=!0,[4,n];case 1:return t=e.sent(),r=t.done,t=t.value,r?(a.complete(),i.complete()):(a.next(t),u.paused||s(o.next()).catch(function(){})),[3,4];case 2:return r=e.sent(),a.error(r),i.error(r),[3,4];case 3:return u.pushing=!1,[7];case 4:return[2]}})})};function t(t){return U1(this,void 0,void 0,function(){return F1(this,function(e){switch(e.label){case 0:return[4,s(o.next(t))];case 1:return e.sent(),[2]}})})}return(u.pusher=t)(),a}(n[Symbol.asyncIterator](),{complete:function(){return U1(t,void 0,void 0,function(){var t,r;return F1(this,function(e){switch(e.label){case 0:return this._state=H1,r=(t=this._summary).next,[4,n.summary()];case 1:return r.apply(t,[e.sent()]),this._summary.complete(),[2]}})})},error:function(e){t._state=H1,t._summary.error(e)}},this._controls),this._records)},t.default=G1;K1.prototype.pause=function(){this._paused=!0},Object.defineProperty(K1.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(K1.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),K1.prototype.resume=function(){return U1(this,void 0,void 0,function(){var t;return F1(this,function(e){switch(e.label){case 0:return t=this._paused,this._paused=!1,!t||this._pushing?[3,2]:[4,this._push()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},K1.prototype.push=function(){return U1(this,void 0,void 0,function(){return F1(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(K1.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var Y1=K1;function K1(e){void 0===e&&(e=function(){return U1(t,void 0,void 0,function(){return F1(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var P={},s=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Z1=(Object.defineProperty(P,"__esModule",{value:!0}),Y),Q1=s(t);function X1(e){this._txc=e}s(e),X1.prototype.run=function(e,r){var n=this;return new Q1.default(new Z1.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},X1.prototype.commit=function(){var e=this;return new Z1.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},X1.prototype.rollback=function(){var e=this;return new Z1.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},X1.prototype.isOpen=function(){return this._txc.isOpen()},X1.prototype.close=function(){var e=this;return new Z1.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},P.default=X1;_={},b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function J1(e){e=e.run;this._run=e}Object.defineProperty(_,"__esModule",{value:!0}),b(t),b(P),J1.fromTransaction=function(e){return new J1({run:e.run.bind(e)})},J1.prototype.run=function(e,t){return this._run(e,t)},_.default=J1;var S={},$1=(Object.defineProperty(S,"__esModule",{value:!0}),e),eT=Y,tT=o,rT=($1.internal.logger.Logger,$1.error.SERVICE_UNAVAILABLE);function nT(e){var e=void 0===e?{}:e,t=e.maxRetryTimeout,r=e.initialDelay,r=void 0===r?1e3:r,n=e.delayMultiplier,n=void 0===n?2:n,o=e.delayJitter,o=void 0===o?.2:o,e=e.logger,e=void 0===e?null:e;this._maxRetryTimeout=oT(void 0===t?3e4:t,3e4),this._initialDelay=oT(r,1e3),this._delayMultiplier=oT(n,2),this._delayJitter=oT(o,.2),this._logger=e}function oT(e,t){return e||0===e?e:t}nT.prototype.retry=function(e){var a=this;return e.pipe((0,tT.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,tT.mergeMap)(function(e){if(!(0,$1.isRetriableError)(e))return(0,eT.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,$1.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),rT)).seenErrors=n,(0,eT.throwError)(function(){return t});var r=a._computeNextDelay(u);return u*=a._delayMultiplier,i++,a._logger&&a._logger.warn("Transaction failed and will be retried in ".concat(r)),(0,eT.of)(1).pipe((0,tT.delay)(r))}))}))},nT.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},S.default=nT;var Fs=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},iT=(Object.defineProperty(V,"__esModule",{value:!0}),Y),uT=o,aT=Fs(t),Zs=e,sT=Fs(P),cT=Fs(_),lT=Fs(S),$s=Zs.internal.constants,fT=$s.ACCESS_MODE_READ,pT=$s.ACCESS_MODE_WRITE,dT=$s.TELEMETRY_APIS,hT=Zs.internal.txConfig.TxConfig;function bT(e){var e=void 0===e?{}:e,t=e.session,r=e.config,e=e.log;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new lT.default({maxRetryTimeout:e})}(r),this._log=e}bT.prototype.run=function(e,r,n){var o=this;return new aT.default(new iT.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},bT.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:dT.UNMANAGED_TRANSACTION})},bT.prototype.readTransaction=function(e,t){return this._runTransaction(fT,e,t)},bT.prototype.writeTransaction=function(e,t){return this._runTransaction(pT,e,t)},bT.prototype.executeRead=function(e,t){return this._executeInTransaction(fT,e,t)},bT.prototype.executeWrite=function(e,t){return this._executeInTransaction(pT,e,t)},bT.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new cT.default({run:e.run.bind(e)})})},bT.prototype.close=function(){var e=this;return new iT.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},bT.prototype[Symbol.asyncDispose]=function(){return this.close()},bT.prototype.lastBookmark=function(){return this.lastBookmarks()},bT.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},bT.prototype._beginTransaction=function(e,t,r){var n=this,o=hT.empty();return t&&(o=new hT(t,this._log)),new iT.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new sT.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},bT.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),hT.empty()),u=(t&&(i=new hT(t)),{apiTelemetryConfig:{api:dT.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,iT.of)(1).pipe((0,uT.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,uT.mergeMap)(function(t){return(0,iT.defer)(function(){try{return r(n(t))}catch(e){return(0,iT.throwError)(function(){return e})}}).pipe((0,uT.catchError)(function(e){return t.rollback().pipe((0,uT.concatWith)((0,iT.throwError)(function(){return e})))}),(0,uT.concatWith)(t.commit()))})))},V.default=bT;var yT,_T,Os=r&&r.__extends||(yT=function(e,t){return(yT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zr=(Object.defineProperty(U,"__esModule",{value:!0}),U.WRITE=U.READ=U.Driver=void 0,e),vT=m(V),mT=Zr.internal.constants.FETCH_ALL,hs=Zr.driver.READ,gT=Zr.driver.WRITE,c=(U.READ=hs,U.WRITE=gT,Os(OT,_T=Zr.Driver),OT.prototype.rxSession=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.fetchSize,i=e.impersonatedUser,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return new vT.default({session:this._newSession({defaultAccessMode:void 0===t?gT:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:i,auth:e,reactive:!1,fetchSize:function(e,t){e=parseInt(e,10);{if(0<e||e===mT)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(mT," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,log:this._log}),config:this._config,log:this._log})},OT);function OT(){return null!==_T&&_T.apply(this,arguments)||this}U.Driver=c,U.default=c;g={},Object.defineProperty(g,"__esModule",{value:!0}),g.default="5.26.0",p={},Dc={},Rc={};function wT(){}Object.defineProperty(Rc,"__esModule",{value:!0}),wT.prototype.selectReader=function(e){throw new Error("Abstract function")},wT.prototype.selectWriter=function(e){throw new Error("Abstract function")},Rc.default=wT;kc={},Nc={};function ET(e){this._offset=e||0}Object.defineProperty(Nc,"__esModule",{value:!0}),ET.prototype.next=function(e){if(0===e)return-1;var t=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),t%e},Nc.default=ET;var PT,ST,jc=r&&r.__extends||(PT=function(e,t){return(PT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}PT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Nl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},TT=(Object.defineProperty(kc,"__esModule",{value:!0}),Nl(Nc)),f=Nl(Rc),Ol=(ST=f.default,jc(jT,ST),jT.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},jT.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},jT.prototype._select=function(e,t){var r=e.length;if(0===r)return null;var n=t.next(r),o=n,i=null,u=Number.MAX_SAFE_INTEGER;do{var a=e[o],s=this._connectionPool.activeResourceCount(a)}while(s<u&&(i=a,u=s),o===r-1?o=0:o++,o!==n);return i},jT);function jT(e){var t=ST.call(this)||this;return t._readersIndex=new TT.default,t._writersIndex=new TT.default,t._connectionPool=e,t}kc.default=Ol;xr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.LeastConnectedLoadBalancingStrategy=Dc.LoadBalancingStrategy=void 0,xc=xr(Rc),Dc.LoadBalancingStrategy=xc.default,Ff=xr(kc),Dc.LeastConnectedLoadBalancingStrategy=Ff.default,Dc.default=Ff.default,y={},op={},Ep={},Pp={},Ap={},Ec={},Wf={},Gf={byteLength:function(e){var e=NT(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};Gf.toByteArray=function(e){var t,r,n=NT(e),o=n[0],n=n[1],i=new IT(function(e,t){return 3*(e+t)/4-t}(o,n)),u=0,a=0<n?o-4:o;for(r=0;r<a;r+=4)t=RT[e.charCodeAt(r)]<<18|RT[e.charCodeAt(r+1)]<<12|RT[e.charCodeAt(r+2)]<<6|RT[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=RT[e.charCodeAt(r)]<<2|RT[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=RT[e.charCodeAt(r)]<<10|RT[e.charCodeAt(r+1)]<<4|RT[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},Gf.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],i=0,u=r-n;i<u;i+=16383)o.push(function(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(function(e){return CT[e>>18&63]+CT[e>>12&63]+CT[e>>6&63]+CT[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(CT[t>>2]+CT[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(CT[t>>10]+CT[t>>4&63]+CT[t<<2&63]+"="));return o.join("")};for(var CT=[],RT=[],IT="undefined"!=typeof Uint8Array?Uint8Array:Array,AT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kT=0,MT=AT.length;kT<MT;++kT)CT[kT]=AT[kT],RT[AT.charCodeAt(kT)]=kT;function NT(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("="),t=(e=-1===e?t:e)===t?0:4-e%4;return[e,t]}RT["-".charCodeAt(0)]=62,RT["_".charCodeAt(0)]=63;Tc={read:function(e,t,r,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,c=s>>1,l=-7,f=r?o-1:0,p=r?-1:1,o=e[t+f];for(f+=p,i=o&(1<<-l)-1,o>>=-l,l+=a;0<l;i=256*i+e[t+f],f+=p,l-=8);for(u=i&(1<<-l)-1,i>>=-l,l+=n;0<l;u=256*u+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===s)return u?NaN:1/0*(o?-1:1);u+=Math.pow(2,n),i-=c}return(o?-1:1)*u*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var u,a,s=8*i-o-1,c=(1<<s)-1,l=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-u))<1&&(u--,n*=2),2<=(t+=1<=u+l?f/n:f*Math.pow(2,1-l))*n&&(u++,n/=2),c<=u+l?(a=0,u=c):1<=u+l?(a=(t*n-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));8<=o;e[r+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,s+=o;0<s;e[r+p]=255&u,p+=d,u/=256,s-=8);e[r+p-d]|=128*i}};{var xT=Wf;const Gx=Gf,Yx=Tc,Kx=(jl="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,xT.Buffer=k,xT.SlowBuffer=function(e){+e!=e&&(e=0);return k.alloc(+e)},xT.INSPECT_MAX_BYTES=50,2147483647);function DT(e){if(e>Kx)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,k.prototype),e}function k(e,t,r){if("number"!=typeof e)return LT(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return FT(e)}function LT(t,r,e){if("string"==typeof t){var n=t;var o=r;"string"==typeof o&&""!==o||(o="utf8");if(!k.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var i=0|zT(n,o);let e=DT(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return pj(o=t,Uint8Array)?WT((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):BT(o);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(pj(t,ArrayBuffer)||t&&pj(t.buffer,ArrayBuffer))return WT(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(pj(t,SharedArrayBuffer)||t&&pj(t.buffer,SharedArrayBuffer)))return WT(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return k.from(n,r,e);var u=function(e){{var t,r;if(k.isBuffer(e))return t=0|qT(e.length),0===(r=DT(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||dj(e.length)?DT(0):BT(e);if("Buffer"===e.type&&Array.isArray(e.data))return BT(e.data)}(t);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return k.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function UT(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function FT(e){return UT(e),DT(e<0?0:0|qT(e))}function BT(t){var r=t.length<0?0:0|qT(t.length);const n=DT(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function WT(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,k.prototype),n}function qT(e){if(e>=Kx)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Kx.toString(16)+" bytes");return 0|e}function zT(e,t){if(k.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||pj(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return cj(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return lj(e).length;default:if(o)return n?-1:cj(e).length;t=(""+t).toLowerCase(),o=!0}}function VT(e,r,n){let t=!1;if((r=void 0===r||r<0?0:r)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(r>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":{var o=this;var i=r;var u=n;var a=o.length;(!i||i<0)&&(i=0);(!u||u<0||a<u)&&(u=a);let t="";for(let e=i;e<u;++e)t+=Jx[o[e]];return t;return}case"utf8":case"utf-8":return QT(this,r,n);case"ascii":{var s=this;a=r;var c=n;let t="";c=Math.min(s.length,c);for(let e=a;e<c;++e)t+=String.fromCharCode(127&s[e]);return t;return}case"latin1":case"binary":{var l=this;i=r;var f=n;let t="";f=Math.min(l.length,f);for(let e=i;e<f;++e)t+=String.fromCharCode(l[e]);return t;return}case"base64":return d=this,b=n,0===(h=r)&&b===d.length?Gx.fromByteArray(d):Gx.fromByteArray(d.slice(h,b));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":{d=this;h=r;b=n;var p=d.slice(h,b);let t="";for(let e=0;e<p.length-1;e+=2)t+=String.fromCharCode(p[e]+256*p[e+1]);return t;return}default:if(t)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),t=!0}var d,h,b}function HT(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function GT(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=dj(r=+r)?o?0:e.length-1:r)<0?e.length+r:r)>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=k.from(t,n)),k.isBuffer(t))return 0===t.length?-1:YT(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):YT(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function YT(r,n,t,e,o){let i=1,u=r.length,a=n.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(r.length<2||n.length<2)return-1;i=2,u/=2,a/=2,t/=2}function s(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}let c;if(o){let e=-1;for(c=t;c<u;c++)if(s(r,c)===s(n,-1===e?0:c-e)){if(-1===e&&(e=c),c-e+1===a)return e*i}else-1!==e&&(c-=c-e),e=-1}else for(t+a>u&&(t=u-a),c=t;0<=c;c--){let t=!0;for(let e=0;e<a;e++)if(s(r,c+e)!==s(n,e)){t=!1;break}if(t)return c}return-1}function KT(e,t,r,n){return fj(function(t){const r=[];for(let e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(t),e,r,n)}function ZT(e,t,r,n){return fj(function(t,r){var n,o;const i=[];for(let e=0;e<t.length&&!((r-=2)<0);++e)o=t.charCodeAt(e),n=o>>8,o=o%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function QT(u,e,t){t=Math.min(u.length,t);const r=[];let a=e;for(;a<t;){var s=u[a];let o=null,i=239<s?4:223<s?3:191<s?2:1;if(a+i<=t){let e,t,r,n;switch(i){case 1:s<128&&(o=s);break;case 2:128==(192&(e=u[a+1]))&&127<(n=(31&s)<<6|63&e)&&(o=n);break;case 3:e=u[a+1],t=u[a+2],128==(192&e)&&128==(192&t)&&2047<(n=(15&s)<<12|(63&e)<<6|63&t)&&(n<55296||57343<n)&&(o=n);break;case 4:e=u[a+1],t=u[a+2],r=u[a+3],128==(192&e)&&128==(192&t)&&128==(192&r)&&65535<(n=(15&s)<<18|(63&e)<<12|(63&t)<<6|63&r)&&n<1114112&&(o=n)}}null===o?(o=65533,i=1):65535<o&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}{var n=r,o=n.length;if(o<=Zx)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=Zx));return e}}xT.kMaxLength=Kx,(k.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1);var e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(e){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(k.prototype,"parent",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}}),Object.defineProperty(k.prototype,"offset",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}}),k.poolSize=8192,k.from=LT,Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(e,t,r){return t=t,r=r,UT(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?DT(e).fill(t,r):DT(e).fill(t):DT(e)},k.allocUnsafe=FT,k.allocUnsafeSlow=FT,k.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==k.prototype},k.compare=function(r,n){if(pj(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),pj(n,Uint8Array)&&(n=k.from(n,n.offset,n.byteLength)),!k.isBuffer(r)||!k.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let o=r.length,i=n.length;for(let e=0,t=Math.min(o,i);e<t;++e)if(r[e]!==n[e]){o=r[e],i=n[e];break}return o<i?-1:i<o?1:0},k.isEncoding=function(e){switch(String(e).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}},k.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return k.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=k.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(pj(e,Uint8Array))o+e.length>n.length?(e=k.isBuffer(e)?e:k.from(e)).copy(n,o):Uint8Array.prototype.set.call(n,e,o);else{if(!k.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},k.byteLength=zT,k.prototype._isBuffer=!0,k.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)HT(this,e,e+1);return this},k.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)HT(this,e,e+3),HT(this,e+1,e+2);return this},k.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)HT(this,e,e+7),HT(this,e+1,e+6),HT(this,e+2,e+5),HT(this,e+3,e+4);return this},k.prototype.toLocaleString=k.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?QT(this,0,e):VT.apply(this,arguments)},k.prototype.equals=function(e){if(k.isBuffer(e))return this===e||0===k.compare(this,e);throw new TypeError("Argument must be a Buffer")},k.prototype.inspect=function(){let e="";var t=xT.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},jl&&(k.prototype[jl]=k.prototype.inspect),k.prototype.compare=function(e,t,r,n,o){if(pj(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),!k.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=t)return 0;if(o<=n)return-1;if(r<=t)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),u=(r>>>=0)-(t>>>=0);var a=Math.min(i,u),s=this.slice(n,o),c=e.slice(t,r);for(let e=0;e<a;++e)if(s[e]!==c[e]){i=s[e],u=c[e];break}return i<u?-1:u<i?1:0},k.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},k.prototype.indexOf=function(e,t,r){return GT(this,e,t,r,!0)},k.prototype.lastIndexOf=function(e,t,r){return GT(this,e,t,r,!1)},k.prototype.write=function(t,r,n,e){if(void 0===r)e="utf8",n=this.length,r=0;else if(void 0===n&&"string"==typeof r)e=r,n=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(n)?(n>>>=0,void 0===e&&(e="utf8")):(e=n,n=void 0)}var o,i,u,a=this.length-r;if((void 0===n||a<n)&&(n=a),0<t.length&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e=e||"utf8";let s=!1;for(;;)switch(e){case"hex":{var c=this;var l=t;var f=r;var p=n;f=Number(f)||0;var d=c.length-f;(!p||d<(p=Number(p)))&&(p=d),(d=l.length)/2<p&&(p=d/2);let e;for(e=0;e<p;++e){var h=parseInt(l.substr(2*e,2),16);if(dj(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,fj(cj(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return KT(this,t,r,n);case"base64":return i=this,u=r,o=n,fj(lj(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ZT(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),s=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Zx=4096;function XT(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function JT(e,t,r,n,o,i){if(!k.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<t||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function $T(e,t,r,n,o){uj(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r++]=n,e[r++]=n>>=8,e[r++]=n>>=8,e[r++]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,e[r++]=o>>=8,e[r++]=o>>=8,e[r++]=o>>=8,r}function ej(e,t,r,n,o){uj(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r+7]=n,e[r+6]=n>>=8,e[r+5]=n>>=8,e[r+4]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,e[r+2]=o>>=8,e[r+1]=o>>=8,e[r]=o>>=8,r+8}function tj(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function rj(e,t,r,n,o){return t=+t,r>>>=0,o||tj(e,0,r,4),Yx.write(e,t,r,n,23,4),r+4}function nj(e,t,r,n,o){return t=+t,r>>>=0,o||tj(e,0,r,8),Yx.write(e,t,r,n,52,8),r+8}k.prototype.slice=function(e,t){var r=this.length,r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e),this.subarray(e,t));return Object.setPrototypeOf(r,k.prototype),r},k.prototype.readUintLE=k.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||XT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},k.prototype.readUintBE=k.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||XT(e,t,this.length);let n=this[e+--t],o=1;for(;0<t&&(o*=256);)n+=this[e+--t]*o;return n},k.prototype.readUint8=k.prototype.readUInt8=function(e,t){return e>>>=0,t||XT(e,1,this.length),this[e]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,t){return e>>>=0,t||XT(e,2,this.length),this[e]|this[e+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,t){return e>>>=0,t||XT(e,2,this.length),this[e]<<8|this[e+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,t){return e>>>=0,t||XT(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(e,t){return e>>>=0,t||XT(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},k.prototype.readBigUInt64LE=hj(function(e){aj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||sj(e,this.length-8),t+256*this[++e]+65536*this[++e]+this[++e]*2**24),e=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(t)+(BigInt(e)<<BigInt(32))}),k.prototype.readBigUInt64BE=hj(function(e){aj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||sj(e,this.length-8),t*2**24+65536*this[++e]+256*this[++e]+this[++e]),e=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(t)<<BigInt(32))+BigInt(e)}),k.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||XT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},k.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||XT(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;0<n&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},k.prototype.readInt8=function(e,t){return e>>>=0,t||XT(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},k.prototype.readInt16LE=function(e,t){e>>>=0,t||XT(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},k.prototype.readInt16BE=function(e,t){e>>>=0,t||XT(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},k.prototype.readInt32LE=function(e,t){return e>>>=0,t||XT(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},k.prototype.readInt32BE=function(e,t){return e>>>=0,t||XT(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},k.prototype.readBigInt64LE=hj(function(e){aj(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||sj(e,this.length-8),this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24));return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),k.prototype.readBigInt64BE=hj(function(e){aj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||sj(e,this.length-8),(t<<24)+65536*this[++e]+256*this[++e]+this[++e]);return(BigInt(t)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),k.prototype.readFloatLE=function(e,t){return e>>>=0,t||XT(e,4,this.length),Yx.read(this,e,!0,23,4)},k.prototype.readFloatBE=function(e,t){return e>>>=0,t||XT(e,4,this.length),Yx.read(this,e,!1,23,4)},k.prototype.readDoubleLE=function(e,t){return e>>>=0,t||XT(e,8,this.length),Yx.read(this,e,!0,52,8)},k.prototype.readDoubleBE=function(e,t){return e>>>=0,t||XT(e,8,this.length),Yx.read(this,e,!1,52,8)},k.prototype.writeUintLE=k.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||JT(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},k.prototype.writeUintBE=k.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||JT(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+r},k.prototype.writeUint8=k.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,1,255,0),this[t]=255&e,t+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},k.prototype.writeBigUInt64LE=hj(function(e,t=0){return $T(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=hj(function(e,t=0){return ej(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||JT(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=0,i=1,u=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===u&&0!==this[t+o-1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},k.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||JT(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=r-1,i=1,u=0;for(this[t+o]=255&e;0<=--o&&(i*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},k.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},k.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},k.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},k.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},k.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},k.prototype.writeBigInt64LE=hj(function(e,t=0){return $T(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=hj(function(e,t=0){return ej(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeFloatLE=function(e,t,r){return rj(this,e,t,!0,r)},k.prototype.writeFloatBE=function(e,t,r){return rj(this,e,t,!1,r)},k.prototype.writeDoubleLE=function(e,t,r){return nj(this,e,t,!0,r)},k.prototype.writeDoubleBE=function(e,t,r){return nj(this,e,t,!1,r)},k.prototype.copy=function(e,t,r,n){if(!k.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0<n&&n<r?r:n)===r)return 0;if(0===e.length||0===this.length)return 0;if((t=t||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=e.length-t<n-r?e.length-t+r:n)-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},k.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=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&&!k.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o;1===e.length&&(o=e.charCodeAt(0),("utf8"===n&&o<128||"latin1"===n)&&(e=o))}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0;let i;if("number"==typeof(e=e||0))for(i=t;i<r;++i)this[i]=e;else{var u=k.isBuffer(e)?e:k.from(e,n),a=u.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=u[i%a]}return this};const Qx={};function oj(e,t,r){Qx[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=this.name+` [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return this.name+` [${e}]: `+this.message}}}function ij(e){let t="",r=e.length;for(var n="-"===e[0]?1:0;r>=4+n;r-=3)t="_"+e.slice(r-3,r)+t;return""+e.slice(0,r)+t}function uj(t,r,n,e,o,i){if(n<t||t<r){var u="bigint"==typeof r?"n":"";let e;throw e=3<i?0===r||r===BigInt(0)?`>= 0${u} and < 2${u} ** `+8*(i+1)+u:`>= -(2${u} ** ${8*(i+1)-1}${u}) and < 2 ** `+(8*(i+1)-1)+u:`>= ${r}${u} and <= `+n+u,new Qx.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,aj(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||sj(u,r.length-(n+1))}function aj(e,t){if("number"!=typeof e)throw new Qx.ERR_INVALID_ARG_TYPE(t,"number",e)}function sj(e,t,r){if(Math.floor(e)!==e)throw aj(e,r),new Qx.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new Qx.ERR_BUFFER_OUT_OF_BOUNDS;throw new Qx.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}oj("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),oj("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),oj("ERR_OUT_OF_RANGE",function(e,t,r){e=`The value of "${e}" is out of range.`;let n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=ij(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=ij(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const Xx=/[^+/0-9A-Za-z-_]/g;function cj(t,r){r=r||1/0;let n;var o=t.length;let i=null;const u=[];for(let e=0;e<o;++e){if(55295<(n=t.charCodeAt(e))&&n<57344){if(!i){if(56319<n){-1<(r-=3)&&u.push(239,191,189);continue}if(e+1===o){-1<(r-=3)&&u.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(r-=3)&&u.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(r-=3)&&u.push(239,191,189);if(i=null,n<128){if(--r<0)break;u.push(n)}else if(n<2048){if((r-=2)<0)break;u.push(n>>6|192,63&n|128)}else if(n<65536){if((r-=3)<0)break;u.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;u.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return u}function lj(e){return Gx.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Xx,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function fj(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function pj(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function dj(e){return e!=e}const Jx=function(){var r="0123456789abcdef";const n=new Array(256);for(let t=0;t<16;++t){var o=16*t;for(let e=0;e<16;++e)n[o+e]=r[t]+r[e]}return n}();function hj(e){return"undefined"==typeof BigInt?bj:e}function bj(){throw new Error("BigInt not supported")}}var yj,id={},vc={},h=r&&r.__extends||(yj=function(e,t){return(yj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),gd=(Object.defineProperty(vc,"__esModule",{value:!0}),M.prototype.getUInt8=function(e){throw new Error("Not implemented")},M.prototype.getInt8=function(e){throw new Error("Not implemented")},M.prototype.getFloat64=function(e){throw new Error("Not implemented")},M.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},M.prototype.putInt8=function(e,t){throw new Error("Not implemented")},M.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},M.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},M.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},M.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},M.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},M.prototype.getInt64=function(e){return this.getInt8(e)<<56|this.getUInt8(e+1)<<48|this.getUInt8(e+2)<<40|this.getUInt8(e+3)<<32|this.getUInt8(e+4)<<24|this.getUInt8(e+5)<<16|this.getUInt8(e+6)<<8|this.getUInt8(e+7)},M.prototype.getSlice=function(e,t){return new vj(e,t,this)},M.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},M.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},M.prototype.putInt32=function(e,t){this.putInt8(e,t>>24),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},M.prototype.putUInt32=function(e,t){this.putUInt8(e,t>>24&255),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},M.prototype.putInt64=function(e,t){this.putInt8(e,t>>48),this.putUInt8(e+1,t>>42&255),this.putUInt8(e+2,t>>36&255),this.putUInt8(e+3,t>>30&255),this.putUInt8(e+4,t>>24&255),this.putUInt8(e+5,t>>16&255),this.putUInt8(e+6,t>>8&255),this.putUInt8(e+7,255&t)},M.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},M.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},M.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},M.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},M.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},M.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},M.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},M.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},M.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},M.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},M.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},M.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},M.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},M.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},M.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},M.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},M.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},M.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},M.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},M.prototype.remaining=function(){return this.length-this.position},M.prototype.hasRemaining=function(){return 0<this.remaining()},M.prototype.reset=function(){this.position=0},M.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},M.prototype.toHex=function(){for(var e="",t=0;t<this.length;t++){var r=this.getUInt8(t).toString(16);e+=r=1===r.length?"0"+r:r,t!==this.length-1&&(e+=" ")}return e},M);function M(e){this.position=0,this.length=e}vc.default=gd;h(mj,_j=gd),mj.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},mj.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},mj.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},mj.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},mj.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},mj.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var _j,vj=mj;function mj(e,t,r){t=_j.call(this,t)||this;return t._start=e,t._inner=r,t}var gj,Oj,Cd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Id=(Object.defineProperty(id,"__esModule",{value:!0}),id.BaseBuffer=void 0,Cd(vc)),Ud=(id.BaseBuffer=Id.default,id.default=Id.default,r&&r.__extends||(gj=function(e,t){return(gj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}gj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Vd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},wj=(Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.alloc=void 0,Vd(Wf)),Sc=Vd(id),Ej=(Oj=Sc.default,Ud(Pj,Oj),Pj.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},Pj.prototype.getInt8=function(e){return this._buffer.readInt8(e)},Pj.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},Pj.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},Pj.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},Pj.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},Pj.prototype.putBytes=function(e,t){var r;t instanceof Pj?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):Oj.prototype.putBytes.call(this,e,t)},Pj.prototype.getSlice=function(e,t){return new Pj(this._buffer.slice(e,e+t))},Pj);function Pj(e){var t=this,e=(e=e)instanceof wj.default.Buffer?e:"number"==typeof e&&"function"==typeof wj.default.Buffer.alloc?wj.default.Buffer.alloc(e):new wj.default.Buffer(e);return(t=Oj.call(this,e.length)||this)._buffer=e,t}Ec.default=Ej,Ec.alloc=function(e){return new Ej(e)};var ud=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sj=(Object.defineProperty(Ap,"__esModule",{value:!0}),ud(Ec)),Tj=e,Yd=Tj.internal.util,jj=Yd.ENCRYPTION_OFF,Cj=Yd.ENCRYPTION_ON;function Rj(e,t,r){void 0===t&&(t=Ij),void 0===r&&(r=function(e){return new WebSocket(e)});var n,o=this,t=(this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===Cj}(e),n=function(e){return!1===e.encrypted||e.encrypted===jj}(e),e=e.trust,t=function(e){e="function"==typeof e?e():"";return e&&0<=e.toLowerCase().indexOf("https")}(t);if(function(e,t,r){null!==r&&(e&&!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."):t&&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,t),n)return{scheme:"ws",error:null};if(t)return{scheme:"wss",error:null};if(r)return e&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==e?{scheme:null,error:(0,Tj.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+e+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+jj+'"` in the driver configuration.')}:{scheme:"wss",error:null};return{scheme:"ws",error:null}}(e,t)),i=t.scheme,t=t.error;t?this._error=t:(this._ws=function(t,r,n){var o=t+"://"+r.asHostPort();try{return n(o)}catch(e){if(function(e,t){return"SyntaxError"===e.name&&function(e){return"["===e.charAt(0)&&-1!==e.indexOf("]")}(t.asHostPort())}(e,r))return o=function(e,t){var r=t.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(r,":").concat(t.port())}(t,r),n(o);throw e}}(i,e.address,r),this._ws.binaryType="arraybuffer",(n=this)._ws.onclose=function(e){e&&!e.wasClean&&n._handleConnectionError(),n._open=!1},this._ws.onopen=function(){n._clearConnectionTimeout();var e=n._pending;n._pending=null;for(var t=0;t<e.length;t++)n.write(e[t])},this._ws.onmessage=function(e){o._resetTimeout(),n.onmessage&&(e=new Sj.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function Ij(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}Rj.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,Tj.newError)("Failed to establish connection in ".concat(this._config.connectionTimeout,"ms"),this._config.connectionErrorCode),void(this.onerror&&this.onerror(this._error));this._open&&!this._timedout&&(this._error=(0,Tj.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))},Rj.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof Sj.default))throw(0,Tj.newError)("Don't know how to send buffer: "+e);try{this._ws.send(e._buffer)}catch(e){if(1===this._ws.readyState)throw e;this._handleConnectionError()}}},Rj.prototype.close=function(){var r=this;return null===this._closingPromise&&(this._closingPromise=new Promise(function(e,t){r._clearConnectionTimeout(),r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._ws.onclose=function(){e()},r._ws.close()):e()})),this._closingPromise},Rj.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},Rj.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},Rj.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},Rj.prototype._resetTimeout=function(){var e=this;this._receiveTimeoutStarted&&(null!==this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=setTimeout(function(){e._receiveTimeoutId=null,e._timedout=!0,e.stopReceiveTimeout(),e._error=(0,Tj.newError)("Connection lost. Server didn't respond in ".concat(e._receiveTimeout,"ms"),e._config.connectionErrorCode),e.close(),e.onerror&&e.onerror(e._error)},this._receiveTimeout))},Rj.prototype._setupConnectionTimeout=function(){var e,t=this,r=this._config.connectionTimeout;return r?(e=this._ws,setTimeout(function(){1!==e.readyState&&(t._connectionTimeoutFired=!0,e.close())},r)):null},Rj.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},Ap.default=Rj;var Aj,Xd={},Pc=r&&r.__extends||(Aj=function(e,t){return(Aj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Aj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Xd,"__esModule",{value:!0});var kj,O=e.internal.resolver.BaseHostNameResolver,md=(Pc(Mj,kj=O),Mj.prototype.resolve=function(e){return this._resolveToItself(e)},Mj);function Mj(){return null!==kj&&kj.apply(this,arguments)||this}Xd.default=md;var Nj,T={},xj=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Dj=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},uh=(Object.defineProperty(T,"__esModule",{value:!0}),T.default={load:function(t){return xj(this,void 0,void 0,function(){return Dj(this,function(e){return[2,t]})})}},r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}}),Nt=(Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.ClientCertificatesLoader=Pp.HostNameResolver=Pp.Channel=void 0,uh(Ap)),I=uh(Xd),Ad=uh(T),Od=(Pp.Channel=Nt.default,Pp.HostNameResolver=I.default,Pp.ClientCertificatesLoader=Ad.default,{}),ah={},fh=r&&r.__extends||(Nj=function(e,t){return(Nj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Nj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ah,"__esModule",{value:!0});var Lj,Uj=Ec,bh=(Lj=id.BaseBuffer,fh(Fj,Lj),Fj.prototype.getUInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getUInt8(e);e-=r.length}},Fj.prototype.getInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getInt8(e);e-=r.length}},Fj.prototype.getFloat64=function(e){for(var t=(0,Uj.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},Fj);function Fj(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=Lj.call(this,r)||this)._buffers=e,t}ah.default=bh;var Bj,Wj,gh=r&&r.__extends||(Bj=function(e,t){return(Bj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Bj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Sh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nh=(Object.defineProperty(Od,"__esModule",{value:!0}),Od.Dechunker=Od.Chunker=void 0,Sh(vc)),qj=Ec,zj=Sh(ah),qh=(Wj=Nh.default,gh(Vj,Wj),Vj.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},Vj.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},Vj.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},Vj.prototype.putBytes=function(e,t){for(;0<t.remaining();)this._ensure(1),this._buffer.remaining()>t.remaining()?this._buffer.writeBytes(t):this._buffer.writeBytes(t.readSlice(this._buffer.remaining()));return this},Vj.prototype.flush=function(){var e;return 0<this._buffer.position&&(this._closeChunkIfOpen(),e=this._buffer,this._buffer=null,this._ch.write(e.getSlice(0,e.position)),this._buffer=(0,qj.alloc)(this._bufferSize),this._chunkOpen=!1),this},Vj.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},Vj.prototype._ensure=function(e){e=this._chunkOpen?e:e+2;this._buffer.remaining()<e&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+2,this._chunkOpen=!0)},Vj.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},Vj);function Vj(e,t){var r=Wj.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,qj.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function Hj(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}Od.Chunker=qh,Hj.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},Hj.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},Hj.prototype.IN_CHUNK=function(e){return this._chunkSize<=e.remaining()?(this._currentMessage.push(e.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=e.remaining(),this._currentMessage.push(e.readSlice(e.remaining())),this.IN_CHUNK)},Hj.prototype.CLOSED=function(e){},Hj.prototype._onHeader=function(e){if(0!==e)return this._chunkSize=e,this.IN_CHUNK;var t=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:t=this._currentMessage[0];break;default:t=new zj.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},Hj.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},Od.Dechunker=Hj;var Yh={},Gj=(Object.defineProperty(Yh,"__esModule",{value:!0}),e),Xh=Gj.internal.util,Jh=Xh.ENCRYPTION_OFF,yb=Xh.ENCRYPTION_ON,Yj=Gj.error.SERVICE_UNAVAILABLE,Kj=[null,void 0,!0,!1,yb,Jh],Zj=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];Yh.default=function(e,t,r,n){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==Kj.indexOf(e))return e;throw(0,Gj.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(Kj))}(t),this.trust=function(e){e=e.trust;if(-1!==Zj.indexOf(e))return e;throw(0,Gj.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(Zj))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||Yj,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=n};var Qj,Xj,bb={},xb={},ip={exports:{}};function Jj(e,t){for(var r in e)t[r]=e[r]}function $j(e,t,r){return Xj(e,t,r)}Ab=(wf=ip).exports,(Xj=(Qj=Wf).Buffer).from&&Xj.alloc&&Xj.allocUnsafe&&Xj.allocUnsafeSlow?wf.exports=Qj:(Jj(Qj,Ab),Ab.Buffer=$j),$j.prototype=Object.create(Xj.prototype),Jj(Xj,$j),$j.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return Xj(e,t,r)},$j.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=Xj(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},$j.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return Xj(e)},$j.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return Qj.SlowBuffer(e)};var eC=ip.exports.Buffer,tC=eC.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function rC(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||eC.isEncoding!==tC&&tC(e))return t||e;throw new Error("Unknown encoding: "+e)}function nC(e){var t;switch(this.encoding=rC(e),this.encoding){case"utf16le":this.text=uC,this.end=aC,t=4;break;case"utf8":this.fillLast=iC,t=4;break;case"base64":this.text=sC,this.end=cC,t=3;break;default:return this.write=lC,void(this.end=fC)}this.lastNeed=0,this.lastTotal=0,this.lastChar=eC.allocUnsafe(t)}function oC(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function iC(e){var t,r=this.lastTotal-this.lastNeed,n=(t=this,128!=(192&(n=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<n.length?128!=(192&n[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<n.length&&128!=(192&n[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,r,0,e.length),void(this.lastNeed-=e.length))}function uC(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);t=e.toString("utf16le",t);if(t){var r=t.charCodeAt(t.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function aC(e){var t,e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function sC(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function cC(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function lC(e){return e.toString(this.encoding)}function fC(e){return e&&e.length?this.write(e):""}(xb.StringDecoder=nC).prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},nC.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},nC.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=oC(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=oC(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=oC(t[n])))return 0<o&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;r=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},nC.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var pC,dC,hC,bC,yC,Nb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_C=(Object.defineProperty(bb,"__esModule",{value:!0}),Nb(Ec)),vC=e,mC=Nb(Wf),gC=new xb.StringDecoder("utf8");bb.default={encode:function(e){return new _C.default((e=e,"function"==typeof mC.default.Buffer.from?mC.default.Buffer.from(e,"utf8"):new mC.default.Buffer(e,"utf8")))},decode:function(e,t){if(Object.prototype.hasOwnProperty.call(e,"_buffer"))return n=t,a=(r=e).position,n=a+n,r.position=Math.min(n,r.length),r._buffer.toString("utf8",a,n);var o,i,u,r,n,a;if(Object.prototype.hasOwnProperty.call(e,"_buffers"))return o=function(e){return gC.write(e._buffer)},r=function(){return gC.end()},i=t,u=(a=e).position,a._updatePos(Math.min(t,a.length-u)),a._buffers.reduce(function(e,t){var r,n;return i<=0?e:u>=t.length?(u-=t.length,""):(t._updatePos(u-t.position),r=Math.min(t.length-u,i),n=t.readSlice(r),t._updatePos(r),i=Math.max(i-n.length,0),u=0,e+o(n))},"")+r();throw(0,vC.newError)("Don't know how to decode strings from '".concat(e,"'"))}},Hb=Ep,pC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Gb=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||pC(t,e,r)},dC=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Hb,"__esModule",{value:!0}),Hb.utf8=Hb.alloc=Hb.ChannelConfig=void 0,Gb(Pp,Hb),Gb(Od,Hb),hC=Yh,Object.defineProperty(Hb,"ChannelConfig",{enumerable:!0,get:function(){return dC(hC).default}}),bC=Ec,Object.defineProperty(Hb,"alloc",{enumerable:!0,get:function(){return bC.alloc}}),yC=bb,Object.defineProperty(Hb,"utf8",{enumerable:!0,get:function(){return dC(yC).default}}),Object.defineProperty(op,"__esModule",{value:!0});var OC=Ep,wC=e,EC=1616949271;function PC(e,t){return{major:e,minor:t}}function SC(){var e=[[PC(5,7),PC(5,0)],[PC(4,4),PC(4,2)],PC(4,1),PC(3,0)];if(4<e.length)throw(0,wC.newError)("It should not have more than 4 versions of the protocol");var o=(0,OC.alloc)(20);return o.writeInt32(EC),e.forEach(function(e){var t,r,n;e instanceof Array?(r=(n=e[0]).major,n=n.minor,t=e[1].minor,o.writeInt32(n-t<<16|n<<8|r)):(r=e.major,n=e.minor,o.writeInt32(n<<8|r))}),o.reset(),o}op.default=function(t,o){var i=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(i),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e,t){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw t.error("Handshake failed since server responded with HTTP."),(0,wC.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(e[3]+"."+e[2])}(t,o);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(SC())})};var TC,ey={},iy={},cy={},A={},py={},ky=r&&r.__extends||(TC=function(e,t){return(TC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}TC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Dy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Wy=(Object.defineProperty(py,"__esModule",{value:!0}),Dy(e),jC.ofRecord=function(e){return null===e?jC.ofNull():new xC(e)},jC.ofMessageResponse=function(e){return null===e?jC.ofNull():new RC(e)},jC.ofNull=function(){return new kC},Object.defineProperty(jC.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(jC.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(jC.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(jC.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),jC);function jC(){}py.default=Wy;ky(IC,CC=Wy),Object.defineProperty(IC.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(IC.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(IC.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(IC.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var CC,RC=IC;function IC(e){var t=CC.call(this)||this;return t._response=e,t}ky(MC,AC=Wy),Object.defineProperty(MC.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var AC,kC=MC;function MC(){return null!==AC&&AC.apply(this,arguments)||this}ky(DC,NC=Wy),Object.defineProperty(DC.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(DC.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(DC.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(DC.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var NC,xC=DC;function DC(e){var t=NC.call(this)||this;return t._record=e,t}var Gy={},Ky={},LC=(Object.defineProperty(Ky,"__esModule",{value:!0}),Ky.reuseOngoingRequest=Ky.identity=void 0,e);Ky.identity=function(e){return e},Ky.reuseOngoingRequest=function(o,i){void 0===i&&(i=null);var u=new Map;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=LC.json.stringify(e);if(u.has(r))return u.get(r);var n=o.apply(i,e);return u.set(r,n),n.finally(function(){u.delete(r)})}};var i_={},UC=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(i_,"__esModule",{value:!0}),i_.equals=void 0,i_.equals=function(e,t){var r,n;if(e===t)return!0;if(null===e||null===t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;try{for(var u=UC(o),a=u.next();!a.done;a=u.next()){var s=a.value;if(e[s]!==t[s])return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!0};var FC,BC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),WC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&BC(t,e,r);return WC(t,e),t},d_=(Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.object=Gy.functional=void 0,Gy.functional=l_(Ky),Gy.object=l_(i_),r&&r.__extends||(FC=function(e,t){return(FC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}FC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),h_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qC=(Object.defineProperty(A,"__esModule",{value:!0}),A.TelemetryObserver=A.ProcedureRouteObserver=A.RouteObserver=A.CompletedObserver=A.FailedObserver=A.ResetObserver=A.LogoffObserver=A.LoginObserver=A.ResultStreamObserver=A.StreamObserver=void 0,e),zC=h_(py),VC=Gy,HC=qC.internal.constants.FETCH_ALL,GC=qC.error.PROTOCOL_ERROR,b_=(YC.prototype.onNext=function(e){},YC.prototype.onError=function(e){},YC.prototype.onCompleted=function(e){},YC);function YC(){}A.StreamObserver=b_;d_(ZC,KC=b_),ZC.prototype.pause=function(){this._paused=!0},ZC.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},ZC.prototype.onNext=function(e){this._haveRecordStreamed=!0;var t=new qC.Record(this._fieldKeys,e,this._fieldLookup);this._observers.some(function(e){return e.onNext})?this._observers.forEach(function(e){e.onNext&&e.onNext(t)}):(this._queuedRecords.push(t),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},ZC.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},ZC.prototype.onError=function(e){this._state.onError(this,e)},ZC.prototype.cancel=function(){this._discard=!0},ZC.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(pR.STREAMING)},ZC.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(pR.SUCCEEDED)},ZC.prototype.subscribe=function(e){if(this._head&&e.onKeys&&e.onKeys(this._head),0<this._queuedRecords.length&&e.onNext)for(var t=0;t<this._queuedRecords.length;t++)e.onNext(this._queuedRecords[t]),this._queuedRecords.length-t-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===pR.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===pR.READY&&this._handleStreaming()},ZC.prototype._handleHasMore=function(e){this._setState(pR.READY),this._handleStreaming(),delete e.has_more},ZC.prototype._handlePullSuccess=function(e){var t,r=this,n=this._enrichMetadata(Object.assign(this._server?{server:this._server}:{},this._meta,{stream_summary:{have_records_streamed:this._haveRecordStreamed,pulled:this._pulled,has_keys:0<this._fieldKeys.length}},e));[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(pR.SUCCEEDED),e=null,t=function(){r._tail=n,r._observers.some(function(e){return e.onCompleted})&&r._observers.forEach(function(e){e.onCompleted&&e.onCompleted(n)}),r._afterComplete&&r._afterComplete(n)},(e=this._beforeComplete?this._beforeComplete(n):e)?Promise.resolve(e).then(t):t()):this.onError((0,qC.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),GC))},ZC.prototype._handleRunSuccess=function(e,t){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&0<e.fields.length){this._fieldKeys=e.fields;for(var n=0;n<e.fields.length;n++)this._fieldLookup[e.fields[n]]=n}null!=e.fields&&delete e.fields,null!==e.qid&&void 0!==e.qid&&(this._queryId=e.qid,delete e.qid),this._storeMetadataForCompletion(e);var o=null,i=(this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys)),function(){r._head=r._fieldKeys,r._observers.some(function(e){return e.onKeys})&&r._observers.forEach(function(e){e.onKeys&&e.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),t()});o?Promise.resolve(o).then(i):i()}},ZC.prototype._handleError=function(t){function e(){r._observers.some(function(e){return e.onError})&&r._observers.forEach(function(e){e.onError&&e.onError(t)}),r._afterError&&r._afterError(t)}var r=this,n=(this._setState(pR.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},ZC.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},ZC.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(pR.STREAMING)},ZC.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},ZC.prototype._setState=function(e){this._state=e},ZC.prototype._setupAutoPull=function(){this._autoPull=!0};var KC,w_=ZC;function ZC(e){var e=void 0===e?{}:e,t=e.reactive,t=void 0!==t&&t,r=e.moreFunction,n=e.discardFunction,o=e.fetchSize,o=void 0===o?HC:o,i=e.beforeError,u=e.afterError,a=e.beforeKeys,s=e.afterKeys,c=e.beforeComplete,l=e.afterComplete,f=e.server,p=e.highRecordWatermark,p=void 0===p?Number.MAX_VALUE:p,d=e.lowRecordWatermark,d=void 0===d?Number.MAX_VALUE:d,e=e.enrichMetadata,h=KC.call(this)||this;return h._fieldKeys=null,h._fieldLookup=null,h._head=null,h._queuedRecords=[],h._tail=null,h._error=null,h._observers=[],h._meta={},h._server=f,h._beforeError=i,h._afterError=u,h._beforeKeys=a,h._afterKeys=s,h._beforeComplete=c,h._afterComplete=l,h._enrichMetadata=e||VC.functional.identity,h._queryId=null,h._moreFunction=r,h._discardFunction=n,h._discard=!1,h._fetchSize=o,h._lowRecordWatermark=d,h._highRecordWatermark=p,h._setState(t?pR.READY:pR.READY_STREAMING),h._setupAutoPull(),h._paused=!1,h._pulled=!t,h._haveRecordStreamed=!1,h}A.ResultStreamObserver=w_;d_(XC,QC=b_),XC.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when initializing "+qC.json.stringify(e)))},XC.prototype.onError=function(e){this._onError&&this._onError(e)},XC.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var QC,kd=XC;function XC(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=QC.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LoginObserver=kd;d_($C,JC=b_),$C.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when logging off "+qC.json.stringify(e)))},$C.prototype.onError=function(e){this._onError&&this._onError(e)},$C.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var JC,S_=$C;function $C(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=JC.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LogoffObserver=S_;d_(tR,eR=b_),tR.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when resetting: received record is: "+qC.json.stringify(e),GC))},tR.prototype.onError=function(e){e.code===GC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},tR.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var eR,j_=tR;function tR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=eR.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}A.ResetObserver=j_;d_(nR,rR=w_),nR.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when sending telemetry "+qC.json.stringify(e),GC))},nR.prototype.onError=function(e){this._onError&&this._onError(e)},nR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var rR,A_=nR;function nR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=rR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.TelemetryObserver=A_;d_(iR,oR=w_);var oR,N_=iR;function iR(e){var t=e.error,e=e.onError,e=oR.call(this,{beforeError:e})||this;return e.onError(t),e}A.FailedObserver=N_;d_(aR,uR=w_);var uR,W_=aR;function aR(){var e=uR.call(this)||this;return uR.prototype.markCompleted.call(e),e}A.CompletedObserver=W_;d_(cR,sR=b_),cR.prototype.onNext=function(e){this._records.push(e)},cR.prototype.onError=function(e){e.code===GC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},cR.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,qC.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+qC.json.stringify(this._records),GC)):this._onCompleted&&this._onCompleted(zC.default.ofRecord(this._records[0]))};var sR,_y=cR;function cR(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=sR.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}A.ProcedureRouteObserver=_y;d_(fR,lR=b_),fR.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when resetting: received record is: "+qC.json.stringify(e),GC))},fR.prototype.onError=function(e){e.code===GC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},fR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(zC.default.ofMessageResponse(e))};var lR,Y_=fR;function fR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=lR.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}A.RouteObserver=Y_;var pR={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(pR.STREAMING)})},onError:function(e,t){e._handleError(t)},name:function(){return"READY_STREAMING"},pull:function(){}},READY:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){return e._handleStreaming()})},onError:function(e,t){e._handleError(t)},name:function(){return"READY"},pull:function(e){return e._more()}},STREAMING:{onSuccess:function(e,t){t.has_more?e._handleHasMore(t):e._handlePullSuccess(t)},onError:function(e,t){e._handleError(t)},name:function(){return"STREAMING"},pull:function(){}},FAILED:{onError:function(e){},name:function(){return"FAILED"},pull:function(){}},SUCCEEDED:{name:function(){return"SUCCEEDED"},pull:function(){}}},dR=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.assertNotificationFilterIsEmpty=cy.assertImpersonatedUserIsEmpty=cy.assertTxConfigIsEmpty=cy.assertDatabaseIsEmpty=void 0,e);cy.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,dR.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")).message),r.onError(e),e},cy.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,dR.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")).message),r.onError(e),e},cy.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,dR.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 ".concat(e,"."))).message),r.onError(t),t},cy.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,dR.newError)("Driver is connected to a database that does not support user notification filters. Please upgrade to Neo4j 5.7.0 or later in order to use this functionality. "+"Trying to set notifications to ".concat(dR.json.stringify(e),"."))).message),r.onError(t),t};var Q_={},Ef={},Oy={},hR=(Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.verifyStructSize=Oy.Structure=void 0,e),bR=hR.error.PROTOCOL_ERROR,sv=(Object.defineProperty(yR.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),yR.prototype.toString=function(){for(var e="",t=0;t<this.fields.length;t++)0<t&&(e+=", "),e+=this.fields[t];return"Structure("+this.signature+", ["+e+"])"},yR);function yR(e,t){this.signature=e,this.fields=t}Oy.Structure=sv,Oy.verifyStructSize=function(e,t,r){if(t!==r)throw(0,hR.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),bR)},Oy.default=sv,Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.Unpacker=Ef.Packer=void 0;var _R=Ep,vR=Gy,mR=Oy,gR=e,OR=gR.error.PROTOCOL_ERROR;function wR(e){this._ch=e,this._byteArraysSupported=!0}function ER(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}wR.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=vR.functional.identity);try{o=i(o)}catch(e){return function(){throw e}}if(null===o)return function(){return u._ch.writeUInt8(192)};if(!0===o)return function(){return u._ch.writeUInt8(195)};if(!1===o)return function(){return u._ch.writeUInt8(194)};if("number"==typeof o)return function(){return u.packFloat(o)};if("string"==typeof o)return function(){return u.packString(o)};if("bigint"==typeof o)return function(){return u.packInteger((0,gR.int)(o))};if((0,gR.isInt)(o))return function(){return u.packInteger(o)};if(o instanceof Int8Array)return function(){return u.packBytes(o)};if(o instanceof Array)return function(){u.packListHeader(o.length);for(var e=0;e<o.length;e++)u.packable(void 0===o[e]?null:o[e],i)()};if(null!=(e=o)&&"function"==typeof e[Symbol.iterator])return this.packableIterable(o,i);if(o instanceof mR.Structure){for(var t=[],r=0;r<o.fields.length;r++)t[r]=this.packable(o.fields[r],i);return function(){return u.packStruct(o.signature,t)}}return"object"==typeof o?function(){for(var e=Object.keys(o),t=0,r=0;r<e.length;r++)void 0!==o[e[r]]&&t++;u.packMapHeader(t);for(r=0;r<e.length;r++){var n=e[r];void 0!==o[n]&&(u.packString(n),u.packable(o[n],i)())}}:this._nonPackableValue("Unable to pack the given value: ".concat(o))},wR.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,gR.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},wR.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},wR.prototype.packInteger=function(e){var t=e.high,r=e.low;e.greaterThanOrEqual(-16)&&e.lessThan(128)?this._ch.writeInt8(r):e.greaterThanOrEqual(-128)&&e.lessThan(-16)?(this._ch.writeUInt8(200),this._ch.writeInt8(r)):e.greaterThanOrEqual(-32768)&&e.lessThan(32768)?(this._ch.writeUInt8(201),this._ch.writeInt16(r)):(e.greaterThanOrEqual(-2147483648)&&e.lessThan(2147483648)?this._ch.writeUInt8(202):(this._ch.writeUInt8(203),this._ch.writeInt32(t)),this._ch.writeInt32(r))},wR.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},wR.prototype.packString=function(e){var e=_R.utf8.encode(e),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,gR.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)}},wR.prototype.packListHeader=function(e){if(e<16)this._ch.writeUInt8(144|e);else if(e<256)this._ch.writeUInt8(212),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,gR.newError)("Lists of size "+e+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},wR.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,gR.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(e.length);for(var t=0;t<e.length;t++)this._ch.writeInt8(e[t])},wR.prototype.packBytesHeader=function(e){if(e<256)this._ch.writeUInt8(204),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(205),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,gR.newError)("Byte arrays of size "+e+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},wR.prototype.packMapHeader=function(e){if(e<16)this._ch.writeUInt8(160|e);else if(e<256)this._ch.writeUInt8(216),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,gR.newError)("Maps of size "+e+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},wR.prototype.packStructHeader=function(e,t){if(e<16)this._ch.writeUInt8(176|e),this._ch.writeUInt8(t);else if(e<256)this._ch.writeUInt8(220),this._ch.writeUInt8(e),this._ch.writeUInt8(t);else{if(!(e<65536))throw(0,gR.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},wR.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},wR.prototype._nonPackableValue=function(e){return function(){throw(0,gR.newError)(e,OR)}},Ef.Packer=wR,ER.prototype.unpack=function(e,t){void 0===t&&(t=vR.functional.identity);var r=e.readUInt8(),n=240&r,o=15&r;if(192===r)return null;var i=this._unpackBoolean(r);if(null!==i)return i;i=this._unpackNumberOrInteger(r,e);if(null!==i){if((0,gR.isInt)(i)){if(this._useBigInt)return i.toBigInt();if(this._disableLosslessIntegers)return i.toNumberOrInfinity()}return i}i=this._unpackString(r,n,o,e);if(null!==i)return i;i=this._unpackList(r,n,o,e,t);if(null!==i)return i;i=this._unpackByteArray(r,e);if(null!==i)return i;i=this._unpackMap(r,n,o,e,t);if(null!==i)return i;i=this._unpackStruct(r,n,o,e,t);if(null!==i)return i;throw(0,gR.newError)("Unknown packed value with marker "+r.toString(16))},ER.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,gR.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},ER.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},ER.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},ER.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,gR.int)(e):240<=e&&e<256?(0,gR.int)(e-256):200===e?(0,gR.int)(t.readInt8()):201===e?(0,gR.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,gR.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new gR.Integer(e,r)):null},ER.prototype._unpackString=function(e,t,r,n){return 128===t?_R.utf8.decode(n,r):208===e?_R.utf8.decode(n,n.readUInt8()):209===e?_R.utf8.decode(n,n.readUInt16()):210===e?_R.utf8.decode(n,n.readUInt32()):null},ER.prototype._unpackList=function(e,t,r,n,o){return 144===t?this._unpackListWithSize(r,n,o):212===e?this._unpackListWithSize(n.readUInt8(),n,o):213===e?this._unpackListWithSize(n.readUInt16(),n,o):214===e?this._unpackListWithSize(n.readUInt32(),n,o):null},ER.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},ER.prototype._unpackByteArray=function(e,t){return 204===e?this._unpackByteArrayWithSize(t.readUInt8(),t):205===e?this._unpackByteArrayWithSize(t.readUInt16(),t):206===e?this._unpackByteArrayWithSize(t.readUInt32(),t):null},ER.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},ER.prototype._unpackMap=function(e,t,r,n,o){return 160===t?this._unpackMapWithSize(r,n,o):216===e?this._unpackMapWithSize(n.readUInt8(),n,o):217===e?this._unpackMapWithSize(n.readUInt16(),n,o):218===e?this._unpackMapWithSize(n.readUInt32(),n,o):null},ER.prototype._unpackMapWithSize=function(e,t,r){for(var n={},o=0;o<e;o++)n[this.unpack(t,r)]=this.unpack(t,r);return n},ER.prototype._unpackStruct=function(e,t,r,n,o){return 176===t?this._unpackStructWithSize(r,n,o):220===e?this._unpackStructWithSize(n.readUInt8(),n,o):221===e?this._unpackStructWithSize(n.readUInt16(),n,o):null},ER.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new mR.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},Ef.Unpacker=ER;var PR,SR,pv={},wv=r&&r.__extends||(PR=function(e,t){return(PR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}PR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),TR=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),jR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),up=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&TR(t,e,r);return jR(t,e),t},bv=(Object.defineProperty(pv,"__esModule",{value:!0}),pv.Unpacker=pv.Packer=void 0,up(Ef)),ap=(SR=bv.Packer,wv(CR,SR),CR.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},CR);function CR(){return null!==SR&&SR.apply(this,arguments)||this}pv.Packer=ap;RR=bv.Unpacker,wv(IR,RR);var RR,yv=IR;function IR(e,t){return RR.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}pv.Unpacker=yv;var AR=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),kR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mv=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&AR(t,e,r);return kR(t,e),t},sp=(Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.structure=Q_.v2=Q_.v1=void 0,mv(Ef)),Mv=(Q_.v1=sp,mv(pv)),Dv=(Q_.v2=Mv,mv(Oy)),w=(Q_.structure=Dv,Q_.default=Mv,{}),MR=(Object.defineProperty(w,"__esModule",{value:!0}),w.SIGNATURES=void 0,e),Bv=MR.internal.constants,NR=Bv.ACCESS_MODE_READ,xR=Bv.FETCH_ALL,DR=MR.internal.util.assertString,Gv=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),pn=(w.SIGNATURES=Gv,N.init=function(e,t){return new N(1,[e,t],function(){return"INIT ".concat(e," {...}")})},N.run=function(e,t){return new N(16,[e,t],function(){return"RUN ".concat(e," ").concat(MR.json.stringify(t))})},N.pullAll=function(){return WR},N.reset=function(){return qR},N.hello=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);t=Object.assign({user_agent:e},t);return r&&(t.routing=r),n&&(t.patch_bolt=n),new N(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},N.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new N(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},N.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return FR(n,t=void 0===t?null:t),r&&(n.routing=r),new N(1,[n],function(){return"HELLO ".concat(MR.json.stringify(n))})},N.hello5x3=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),FR(o,r),n&&(o.routing=n),new N(1,[o],function(){return"HELLO ".concat(MR.json.stringify(o))})},N.hello5x5=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),BR(o,r),n&&(o.routing=n),new N(1,[o],function(){return"HELLO ".concat(MR.json.stringify(o))})},N.logon=function(e){return new N(106,[e],function(){return"LOGON { ... }"})},N.logoff=function(){return new N(107,[],function(){return"LOGOFF"})},N.begin=function(e){var e=void 0===e?{}:e,t=LR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new N(17,[t],function(){return"BEGIN ".concat(MR.json.stringify(t))})},N.begin5x5=function(e){var e=void 0===e?{}:e,t=LR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter,{appendNotificationFilter:BR});return new N(17,[t],function(){return"BEGIN ".concat(MR.json.stringify(t))})},N.commit=function(){return zR},N.rollback=function(){return VR},N.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=LR(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new N(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(MR.json.stringify(t)," ").concat(MR.json.stringify(n))})},N.runWithMetadata5x5=function(e,t,r){var r=void 0===r?{}:r,n=LR(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter,{appendNotificationFilter:BR});return new N(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(MR.json.stringify(t)," ").concat(MR.json.stringify(n))})},N.goodbye=function(){return HR},N.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=UR(null==t?-1:t,(void 0===e?xR:e)||xR);return new N(63,[r],function(){return"PULL ".concat(MR.json.stringify(r))})},N.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=UR(null==t?-1:t,(void 0===e?xR:e)||xR);return new N(47,[r],function(){return"DISCARD ".concat(MR.json.stringify(r))})},N.telemetry=function(e){var e=e.api,t=(0,MR.int)(e);return new N(84,[t],function(){return"TELEMETRY ".concat(t.toString())})},N.route=function(e,t,r){return new N(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(MR.json.stringify(e)," ").concat(MR.json.stringify(t)," ").concat(r)})},N.routeV4x4=function(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]);var n={};return(r=void 0===r?{}:r).databaseName&&(n.db=r.databaseName),r.impersonatedUser&&(n.imp_user=r.impersonatedUser),new N(102,[e,t,n],function(){return"ROUTE ".concat(MR.json.stringify(e)," ").concat(MR.json.stringify(t)," ").concat(MR.json.stringify(n))})},N);function N(e,t,r){this.signature=e,this.fields=t,this.toString=r}function LR(e,t,r,n,o,i,u){void 0===u&&(u={});var a={};return e.isEmpty()||(a.bookmarks=e.values()),null!==t.timeout&&(a.tx_timeout=t.timeout),t.metadata&&(a.tx_metadata=t.metadata),r&&(a.db=DR(r,"database")),o&&(a.imp_user=DR(o,"impersonatedUser")),n===NR&&(a.mode="r"),(null!=(e=u.appendNotificationFilter)?e:FR)(a,i),a}function UR(e,t){t={n:(0,MR.int)(t)};return-1!==e&&(t.qid=(0,MR.int)(e)),t}function FR(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_categories=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_categories=t.disabledClassifications))}function BR(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_classifications=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_classifications=t.disabledClassifications))}var WR=new(w.default=pn)(63,[],function(){return"PULL_ALL"}),qR=new pn(15,[],function(){return"RESET"}),zR=new pn(18,[],function(){return"COMMIT"}),VR=new pn(19,[],function(){return"ROLLBACK"}),HR=new pn(2,[],function(){return"GOODBYE"}),Zv={},Xv={},GR=(Object.defineProperty(Xv,"__esModule",{value:!0}),Xv.TypeTransformer=void 0,Q_),YR=e.internal.objectUtil;function KR(e){this._transformers=e,this._transformersPerSignature=new Map(e.map(function(e){return[e.signature,e]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}function ZR(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;this.signature=t,this.isTypeInstance=e,this.fromStructure=r,this.toStructure=n,Object.freeze(this)}KR.prototype.fromStructure=function(e){try{return e instanceof GR.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return YR.createBrokenObject(e)}},KR.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},Xv.default=KR,ZR.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new ZR({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},Xv.TypeTransformer=ZR;var QR=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},XR=(Object.defineProperty(Zv,"__esModule",{value:!0}),e),JR=Q_,$R=Xv,eI=XR.error.PROTOCOL_ERROR;Zv.default={createNodeTransformer:function(){return new $R.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof XR.Node},toStructure:function(e){throw(0,XR.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),eI)},fromStructure:function(e){JR.structure.verifyStructSize("Node",3,e.size);var e=QR(e.fields,3),t=e[0],r=e[1],e=e[2];return new XR.Node(t,r,e)}})},createRelationshipTransformer:function(){return new $R.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof XR.Relationship},toStructure:function(e){throw(0,XR.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),eI)},fromStructure:function(e){JR.structure.verifyStructSize("Relationship",5,e.size);var e=QR(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new XR.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new $R.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof XR.UnboundRelationship},toStructure:function(e){throw(0,XR.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),eI)},fromStructure:function(e){JR.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=QR(e.fields,3),t=e[0],r=e[1],e=e[2];return new XR.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new $R.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof XR.Path},toStructure:function(e){throw(0,XR.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),eI)},fromStructure:function(e){JR.structure.verifyStructSize("Path",3,e.size);for(var e=QR(e.fields,3),t=e[0],r=e[1],n=e[2],o=[],i=t[0],u=0;u<n.length;u+=2){var a=t[n[u+1]],s=(0,XR.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof XR.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof XR.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new XR.PathSegment(i,c,a)),i=a}return new XR.Path(t[0],t[t.length-1],o)}})}};var tI=r&&r.__assign||function(){return(tI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},rI=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),nI=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),tm=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&rI(t,e,r);return nI(t,e),t},om=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},oI=(Object.defineProperty(iy,"__esModule",{value:!0}),cy),iI=Q_,uI=tm(w),aI=A,sI=e,cI=om(Zv),lI=om(Xv),fI=sI.internal.bookmarks.Bookmarks,am=sI.internal.constants,pI=am.ACCESS_MODE_WRITE,dI=am.BOLT_PROTOCOL_V1,hI=(sI.internal.logger.Logger,sI.internal.txConfig.TxConfig),bI=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),it=(Object.defineProperty(yI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new lI.default(Object.values(cI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(yI.prototype,"version",{get:function(){return dI},enumerable:!1,configurable:!0}),Object.defineProperty(yI.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(yI.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(yI.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),yI.prototype.packer=function(){return this._packer},yI.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},yI.prototype.unpacker=function(){return this._unpacker},yI.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},yI.prototype.transformMetadata=function(e){return e},yI.prototype.enrichErrorMetadata=function(e){return tI(tI({},e),{diagnostic_record:null!==e.diagnostic_record?tI(tI({},bI),e.diagnostic_record):null})},yI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new aI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,oI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(uI.default.init(r,n),e,!0),e},yI.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=(e.flush,new aI.LogoffObserver({onCompleted:t,onError:r})),t=(0,sI.newError)("Driver is connected to a database that does not support logoff. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(t.message),e.onError(t),t},yI.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=(e.flush,new aI.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,sI.newError)("Driver is connected to a database that does not support logon. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(i.message),e.onError(i),i},yI.prototype.prepareToClose=function(){},yI.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete;return this.run("BEGIN",t?t.asBeginTransactionParameters():{},{bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e,flush:!1})},yI.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("COMMIT",{},{bookmarks:fI.empty(),txConfig:hI.empty(),mode:pI,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},yI.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("ROLLBACK",{},{bookmarks:fI.empty(),txConfig:hI.empty(),mode:pI,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},yI.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=(r.bookmarks,r.txConfig),o=r.database,i=(r.mode,r.impersonatedUser),u=r.notificationFilter,a=r.beforeKeys,s=r.afterKeys,c=r.beforeError,l=r.afterError,f=r.beforeComplete,p=r.afterComplete,d=r.flush,d=void 0===d||d,h=r.highRecordWatermark,h=void 0===h?Number.MAX_VALUE:h,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,a=new aI.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,oI.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,oI.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,oI.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,oI.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(uI.default.run(e,t),a,!1),this.write(uI.default.pullAll(),a,d),a},Object.defineProperty(yI.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),yI.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,e=e.onComplete,t=new aI.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(uI.default.reset(),t,!0),t},yI.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new aI.CompletedObserver;return t&&t(),e},yI.prototype._createPacker=function(e){return new iI.v1.Packer(e)},yI.prototype._createUnpacker=function(e,t){return new iI.v1.Unpacker(e,t)},yI.prototype.write=function(e,t,r){this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature,t=new iI.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},yI.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===uI.SIGNATURES.HELLO||this._lastMessageSignature===uI.SIGNATURES.LOGON},yI.prototype.isLastMessageReset=function(){return this._lastMessageSignature===uI.SIGNATURES.RESET},yI.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},yI.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},yI.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},yI.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},yI.prototype.isBroken=function(){return!!this._fatalError},yI.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},yI.prototype.resetFailure=function(){this._responseHandler._resetFailure()},yI.prototype._onLoginCompleted=function(e,t,r){this._initialized=!0,this._authToken=t,e&&(t=e.server,this._server.version||(this._server.version=t)),r&&r(e)},yI.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},yI);function yI(e,t,r,n,o,i){var r=void 0===r?{}:r,u=r.disableLosslessIntegers,r=r.useBigInt;void 0===n&&(n=function(){return null}),this._server=e||{},this._chunker=t,this._packer=this._createPacker(t),this._unpacker=this._createUnpacker(u,r),this._responseHandler=n(this),this._log=o,this._onProtocolError=i,this._fatalError=null,this._lastMessageSignature=null,this._config={disableLosslessIntegers:u,useBigInt:r}}iy.default=it;var fm={},eb={},_m={},_I=(Object.defineProperty(_m,"__esModule",{value:!0}),_m.epochSecondAndNanoToLocalDateTime=_m.nanoOfDayToLocalTime=_m.epochDayToDate=void 0,e),Em=_I.internal.temporalUtil,vI=Em.DAYS_0000_TO_1970,mI=Em.DAYS_PER_400_YEAR_CYCLE,gI=Em.NANOS_PER_HOUR,OI=Em.NANOS_PER_MINUTE,wI=Em.NANOS_PER_SECOND,EI=Em.SECONDS_PER_DAY,PI=Em.floorDiv,SI=Em.floorMod;function TI(e){var e=(e=(0,_I.int)(e)).add(vI).subtract(60),t=(0,_I.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(mI).subtract(1)).multiply(400),e=e.add(r.multiply(-mI))),e.multiply(400).add(591).div(mI)),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400))),e=(n.lessThan(0)&&(r=r.subtract(1),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400)))),r=r.add(t),n),t=e.multiply(5).add(2).div(153),n=t.add(2).modulo(12).add(1),e=e.subtract(t.multiply(306).add(5).div(10)).add(1),r=r.add(t.div(10));return new _I.Date(r,n,e)}function jI(e){var t=(e=(0,_I.int)(e)).div(gI),r=(e=e.subtract(t.multiply(gI))).div(OI),n=(e=e.subtract(r.multiply(OI))).div(wI),e=e.subtract(n.multiply(wI));return new _I.LocalTime(t,r,n,e)}_m.epochDayToDate=TI,_m.nanoOfDayToLocalTime=jI,_m.epochSecondAndNanoToLocalDateTime=function(e,t){var r=PI(e,EI),e=SI(e,EI).multiply(wI).add(t),t=TI(r),r=jI(e);return new _I.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var CI=r&&r.__assign||function(){return(CI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},RI=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Cm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},II=(Object.defineProperty(eb,"__esModule",{value:!0}),e),AI=Q_,kI=Xv,MI=_m,Nm=Cm(Zv),C=II.internal.temporalUtil,NI=C.dateToEpochDay,xI=C.localDateTimeToEpochSecond,DI=C.localTimeToNanoOfDay;function LI(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,II.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}eb.default=CI(CI({},Nm.default),{createPoint2DTransformer:function(){return new kI.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,II.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new AI.structure.Structure(88,[(0,II.int)(e.srid),e.x,e.y])},fromStructure:function(e){AI.structure.verifyStructSize("Point2D",3,e.size);var e=RI(e.fields,3),t=e[0],r=e[1],e=e[2];return new II.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new kI.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,II.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new AI.structure.Structure(89,[(0,II.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){AI.structure.verifyStructSize("Point3D",4,e.size);var e=RI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new II.Point(t,r,n,e)}})},createDurationTransformer:function(){return new kI.TypeTransformer({signature:69,isTypeInstance:II.isDuration,toStructure:function(e){var t=(0,II.int)(e.months),r=(0,II.int)(e.days),n=(0,II.int)(e.seconds),e=(0,II.int)(e.nanoseconds);return new AI.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){AI.structure.verifyStructSize("Duration",4,e.size);var e=RI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new II.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new kI.TypeTransformer({signature:116,isTypeInstance:II.isLocalTime,toStructure:function(e){e=DI(e.hour,e.minute,e.second,e.nanosecond);return new AI.structure.Structure(116,[e])},fromStructure:function(e){AI.structure.verifyStructSize("LocalTime",1,e.size);e=RI(e.fields,1)[0];return LI((0,MI.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new kI.TypeTransformer({signature:84,isTypeInstance:II.isTime,toStructure:function(e){var t=DI(e.hour,e.minute,e.second,e.nanosecond),e=(0,II.int)(e.timeZoneOffsetSeconds);return new AI.structure.Structure(84,[t,e])},fromStructure:function(e){AI.structure.verifyStructSize("Time",2,e.size);var e=RI(e.fields,2),t=e[0],e=e[1],t=(0,MI.nanoOfDayToLocalTime)(t);return LI(new II.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new kI.TypeTransformer({signature:68,isTypeInstance:II.isDate,toStructure:function(e){e=NI(e.year,e.month,e.day);return new AI.structure.Structure(68,[e])},fromStructure:function(e){AI.structure.verifyStructSize("Date",1,e.size);e=RI(e.fields,1)[0];return LI((0,MI.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new kI.TypeTransformer({signature:100,isTypeInstance:II.isLocalDateTime,toStructure:function(e){var t=xI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,II.int)(e.nanosecond);return new AI.structure.Structure(100,[t,e])},fromStructure:function(e){AI.structure.verifyStructSize("LocalDateTime",2,e.size);var e=RI(e.fields,2),t=e[0],e=e[1];return LI((0,MI.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new kI.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,II.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=xI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,II.int)(e.nanosecond),e=e.timeZoneId;return new AI.structure.Structure(102,[t,r,e])},fromStructure:function(e){AI.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=RI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,MI.epochSecondAndNanoToLocalDateTime)(t,r);return LI(new II.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,null,e),n,o)}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new kI.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,II.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=xI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,II.int)(e.nanosecond),e=(0,II.int)(e.timeZoneOffsetSeconds);return new AI.structure.Structure(70,[t,r,e])},fromStructure:function(e){AI.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=RI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,MI.epochSecondAndNanoToLocalDateTime)(t,r);return LI(new II.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var UI,FI,Fm=r&&r.__extends||(UI=function(e,t){return(UI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}UI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Vm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Km=(Object.defineProperty(fm,"__esModule",{value:!0}),Vm(iy)),BI=Vm(Q_),tb=e,WI=Vm(eb),qI=Vm(Xv),zI=tb.internal.constants.BOLT_PROTOCOL_V2,t0=(FI=Km.default,Fm(VI,FI),VI.prototype._createPacker=function(e){return new BI.default.Packer(e)},VI.prototype._createUnpacker=function(e,t){return new BI.default.Unpacker(e,t)},Object.defineProperty(VI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new qI.default(Object.values(WI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(VI.prototype,"version",{get:function(){return zI},enumerable:!1,configurable:!0}),VI);function VI(){return null!==FI&&FI.apply(this,arguments)||this}fm.default=t0;var HI,GI,c0={},p0={},YI=r&&r.__assign||function(){return(YI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},v0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},g0=(Object.defineProperty(p0,"__esModule",{value:!0}),v0(eb)),P0=(p0.default=YI({},g0.default),r&&r.__extends||(HI=function(e,t){return(HI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}HI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),KI=r&&r.__assign||function(){return(KI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},R0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},k0=(Object.defineProperty(c0,"__esModule",{value:!0}),R0(fm)),ZI=R0(w),QI=cy,XI=A,JI=R0(p0),$I=R0(Xv),eA=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),tA=e.internal.txConfig.TxConfig,rA="context",nA="CALL dbms.cluster.routing.getRoutingTable($".concat(rA,")"),oA=new XI.StreamObserver,yl=(GI=k0.default,P0(iA,GI),Object.defineProperty(iA.prototype,"version",{get:function(){return eA},enumerable:!1,configurable:!0}),Object.defineProperty(iA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new $I.default(Object.values(JI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),iA.prototype.transformMetadata=function(e){return"t_first"in e&&(e.result_available_after=e.t_first,delete e.t_first),"t_last"in e&&(e.result_consumed_after=e.t_last,delete e.t_last),e},iA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new XI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,QI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(ZI.default.hello(r,n),e,!0),e},iA.prototype.prepareToClose=function(){this.write(ZI.default.goodbye(),oA,!0)},iA.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new XI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,QI.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,QI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,QI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(ZI.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},iA.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new XI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(ZI.default.commit(),t,!0),t},iA.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new XI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(ZI.default.rollback(),t,!0),t},iA.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.highRecordWatermark,y=void 0===y?Number.MAX_VALUE:y,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new XI.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,QI.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,QI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,QI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(ZI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(ZI.default.pullAll(),c,b),c},iA.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,r=this.run(nA,((t={})[rA]=void 0===r?{}:r,t),KI(KI({},n),{txConfig:tA.empty()}));return new XI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},iA);function iA(){return null!==GI&&GI.apply(this,arguments)||this}c0.default=yl;var uA,aA,D0={},L0={},sA=r&&r.__assign||function(){return(sA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},z0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},G0=(Object.defineProperty(L0,"__esModule",{value:!0}),z0(p0)),dy=(L0.default=sA({},G0.default),r&&r.__extends||(uA=function(e,t){return(uA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}uA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),cA=r&&r.__assign||function(){return(cA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},X_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Z0=(Object.defineProperty(D0,"__esModule",{value:!0}),X_(c0)),lA=X_(w),fA=cy,pA=A,dA=X_(L0),hA=X_(Xv),eg=(e.internal.bookmarks.Bookmarks,e.internal.constants),bA=eg.BOLT_PROTOCOL_V4_0,yA=eg.FETCH_ALL,_A=e.internal.txConfig.TxConfig,vA="context",mA="database",gA="CALL dbms.routing.getRoutingTable($".concat(vA,", $").concat(mA,")"),ng=(aA=Z0.default,dy(OA,aA),Object.defineProperty(OA.prototype,"version",{get:function(){return bA},enumerable:!1,configurable:!0}),Object.defineProperty(OA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new hA.default(Object.values(dA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),OA.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new pA.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,fA.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,fA.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(lA.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},OA.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?yA:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new pA.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,fA.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,fA.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(lA.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(lA.default.pull({n:_}),c,b),c},OA.prototype._requestMore=function(e,t,r){this.write(lA.default.pull({stmtId:e,n:t}),r,!0)},OA.prototype._requestDiscard=function(e,t){this.write(lA.default.discard({stmtId:e}),t,!0)},OA.prototype._noOp=function(){},OA.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.databaseName,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,r=this.run(gA,((t={})[vA]=void 0===r?{}:r,t[mA]=n,t),cA(cA({},o),{txConfig:_A.empty()}));return new pA.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},OA);function OA(){return null!==aA&&aA.apply(this,arguments)||this}D0.default=ng;var wA,EA,E={},fg={},PA=r&&r.__assign||function(){return(PA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Zy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bg=(Object.defineProperty(fg,"__esModule",{value:!0}),Zy(L0)),Bc=(fg.default=PA({},bg.default),r&&r.__extends||(wA=function(e,t){return(wA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}wA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),gg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sl=(Object.defineProperty(E,"__esModule",{value:!0}),gg(D0)),SA=gg(w),TA=A,$h=e,jA=cy,CA=gg(fg),RA=gg(Xv),IA=$h.internal.constants.BOLT_PROTOCOL_V4_1,u=(EA=Sl.default,Bc(AA,EA),Object.defineProperty(AA.prototype,"version",{get:function(){return IA},enumerable:!1,configurable:!0}),Object.defineProperty(AA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new RA.default(Object.values(CA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),AA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new TA.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,jA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(SA.default.hello(r,n,this._serversideRouting),e,!0),e},AA);function AA(e,t,r,n,o,i,u){e=EA.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}E.default=u;var kA,MA,Ag={},Dg={},NA=r&&r.__assign||function(){return(NA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},pl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},v=(Object.defineProperty(Dg,"__esModule",{value:!0}),pl(fg)),nO=(Dg.default=NA({},v.default),r&&r.__extends||(kA=function(e,t){return(kA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}kA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},j=(Object.defineProperty(Ag,"__esModule",{value:!0}),i(E)),R=e,xA=i(Dg),DA=i(Xv),LA=R.internal.constants.BOLT_PROTOCOL_V4_2,n=(MA=j.default,nO(UA,MA),Object.defineProperty(UA.prototype,"version",{get:function(){return LA},enumerable:!1,configurable:!0}),Object.defineProperty(UA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new DA.default(Object.values(xA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),UA);function UA(){return null!==MA&&MA.apply(this,arguments)||this}Ag.default=n;var s={},b={},FA=r&&r.__assign||function(){return(FA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(b,"__esModule",{value:!0}),Y(Dg)),Fs=(b.default=FA({},o.default),{}),S={},BA=r&&r.__assign||function(){return(BA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$s=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zs=(Object.defineProperty(S,"__esModule",{value:!0}),$s(b)),WA=(S.default=BA({},Zs.default),r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}),m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qA=(Object.defineProperty(Fs,"__esModule",{value:!0}),Q_),zA=e,VA=m(S),HA=_m,GA=Ky,YA=zA.internal.temporalUtil.localDateTimeToEpochSecond;var KA=new Map;function ZA(e,t,r){e=e,KA.has(e)||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),KA.set(e,n));var n=KA.get(e),e=(0,zA.int)(t).multiply(1e3).add((0,zA.int)(r).div(1e6)).toNumber(),r=n.formatToParts(e).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:GA.identity:"hour"===t.type?e.hour=(0,zA.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,zA.int)(t.value)),e},{}),e=(r.year=r.adjustEra(r.year),YA(r.year,r.month,r.day,r.hour,r.minute,r.second,r.nanosecond));return r.timeZoneOffsetSeconds=e.subtract(t),r.hour=r.hour.modulo(24),r}function QA(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,zA.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}Fs.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return VA.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){qA.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=WA(e.fields,3),t=e[0],r=e[1],e=e[2],t=ZA(e,t,r);return QA(new zA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,zA.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=YA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=null!=e.timeZoneOffsetSeconds?e.timeZoneOffsetSeconds:(r=e.timeZoneId,i=t,o=e.nanosecond,n=ZA(r,i,o),n=YA(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=ZA(r,i,o),YA(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i)),n=(null==e.timeZoneOffsetSeconds&&u.warn('DateTime objects without "timeZoneOffsetSeconds" property are prune to bugs related to ambiguous times. For instance, 2022-10-30T2:30:00[Europe/Berlin] could be GMT+1 or GMT+2.'),t.subtract(r)),o=(0,zA.int)(e.nanosecond),i=e.timeZoneId;return new qA.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return VA.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=YA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,zA.int)(e.nanosecond),e=(0,zA.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new qA.structure.Structure(73,[t,r,e])},fromStructure:function(e){qA.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=WA(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,zA.int)(t).add(e),t=(0,HA.epochSecondAndNanoToLocalDateTime)(t,r);return QA(new zA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var XA,JA,hs=r&&r.__extends||(XA=function(e,t){return(XA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}XA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),$A=r&&r.__assign||function(){return($A=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Os=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zr=(Object.defineProperty(s,"__esModule",{value:!0}),Os(Ag)),ek=Os(w),tk=A,rk=cy,nk=Os(b),ok=Os(Fs),ik=Os(Xv),uk=e.internal.bookmarks.Bookmarks,ak=e.internal.constants.BOLT_PROTOCOL_V4_3,c=(JA=Zr.default,hs(sk,JA),Object.defineProperty(sk.prototype,"version",{get:function(){return ak},enumerable:!1,configurable:!0}),Object.defineProperty(sk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new ik.default(Object.values(nk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),sk.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,o=new tk.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||uk.empty();return this.write(ek.default.route(t,e.values(),r),o,!0),o},sk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new tk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return void 0!==e.patch_bolt&&t._applyPatches(e.patch_bolt),t._onLoginCompleted(e,n,u)}});return(0,rk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(ek.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},sk.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},sk.prototype._applyUtcPatch=function(){var t=this;this._transformer=new ik.default(Object.values($A($A({},nk.default),ok.default)).map(function(e){return e(t._config,t._log)}))},sk);function sk(){return null!==JA&&JA.apply(this,arguments)||this}s.default=c;var ck,lk,Nc={},Nl=r&&r.__extends||(ck=function(e,t){return(ck=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ck(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),fk=r&&r.__assign||function(){return(fk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},f=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jc=(Object.defineProperty(Nc,"__esModule",{value:!0}),f(s)),Ol=e,pk=f(w),dk=A,hk=cy,bk=f(S),yk=f(Fs),_k=f(Xv),Rc=Ol.internal.constants,vk=Rc.BOLT_PROTOCOL_V4_4,mk=Rc.FETCH_ALL,gk=Ol.internal.bookmarks.Bookmarks,xc=(lk=jc.default,Nl(Ok,lk),Object.defineProperty(Ok.prototype,"version",{get:function(){return vk},enumerable:!1,configurable:!0}),Object.defineProperty(Ok.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new _k.default(Object.values(bk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Ok.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.impersonatedUser,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,i=new dk.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||gk.empty();return this.write(pk.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},Ok.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?mk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new dk.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,hk.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(pk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(pk.default.pull({n:_}),c,b),c},Ok.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new dk.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,hk.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(pk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},Ok.prototype._applyUtcPatch=function(){var t=this;this._transformer=new _k.default(Object.values(fk(fk({},bk.default),yk.default)).map(function(e){return e(t._config,t._log)}))},Ok);function Ok(){return null!==lk&&lk.apply(this,arguments)||this}Nc.default=xc;var xr={},kc={},wk=r&&r.__assign||function(){return(wk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ek=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ff=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Pk=(Object.defineProperty(kc,"__esModule",{value:!0}),Q_),Sk=e,Tk=Ff(S),Gf=Ff(Fs);kc.default=wk(wk(wk({},Tk.default),Gf.default),{createNodeTransformer:function(e){return Tk.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){Pk.structure.verifyStructSize("Node",4,e.size);var e=Ek(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new Sk.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return Tk.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){Pk.structure.verifyStructSize("Relationship",8,e.size);var e=Ek(e.fields,8),t=e[0],r=e[1],n=e[2],o=e[3],i=e[4],u=e[5],a=e[6],e=e[7];return new Sk.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return Tk.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){Pk.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=Ek(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new Sk.UnboundRelationship(t,r,n,e)}})}});var jk,Ck,Tc=r&&r.__extends||(jk=function(e,t){return(jk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}jk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),jl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},h=(Object.defineProperty(xr,"__esModule",{value:!0}),jl(Nc)),Rk=cy,Ik=jl(kc),Ak=jl(Xv),kk=jl(w),Mk=A,Nk=e.internal.constants.BOLT_PROTOCOL_V5_0,gd=(Ck=h.default,Tc(xk,Ck),Object.defineProperty(xk.prototype,"version",{get:function(){return Nk},enumerable:!1,configurable:!0}),Object.defineProperty(xk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Ak.default(Object.values(Ik.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),xk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new Mk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,Rk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(kk.default.hello(r,n,this._serversideRouting),e,!0),e},xk);function xk(){return null!==Ck&&Ck.apply(this,arguments)||this}xr.default=gd;var Dk,Lk,Cd={},Id={},Uk=r&&r.__assign||function(){return(Uk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Vd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sc=(Object.defineProperty(Id,"__esModule",{value:!0}),Vd(kc)),Ud=(Id.default=Uk({},Sc.default),r&&r.__extends||(Dk=function(e,t){return(Dk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Dk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Fk=r&&r.__assign||function(){return(Fk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ud=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yd=(Object.defineProperty(Cd,"__esModule",{value:!0}),ud(xr)),Bk=cy,Wk=ud(Id),qk=ud(Xv),zk=ud(w),Vk=A,Hk=e.internal.constants.BOLT_PROTOCOL_V5_1,Pc=(Lk=Yd.default,Ud(Gk,Lk),Object.defineProperty(Gk.prototype,"version",{get:function(){return Hk},enumerable:!1,configurable:!0}),Object.defineProperty(Gk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new qk.default(Object.values(Wk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(Gk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),Gk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new Vk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,Bk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(zk.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Fk(Fk({},e),a.metadata))},onError:i,flush:!0})},Gk.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=e.flush,i=new Vk.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(zk.default.logon(r),i,e),i},Gk.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new Vk.LogoffObserver({onCompleted:t,onError:r});return this.write(zk.default.logoff(),t,e),t},Gk);function Gk(){return null!==Lk&&Lk.apply(this,arguments)||this}Cd.default=Pc;var Yk,Kk,O={},md={},Zk=r&&r.__assign||function(){return(Zk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ap=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xd=(Object.defineProperty(md,"__esModule",{value:!0}),Ap(Id)),uh=(md.default=Zk({},Xd.default),r&&r.__extends||(Yk=function(e,t){return(Yk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Yk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Qk=r&&r.__assign||function(){return(Qk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nt=(Object.defineProperty(O,"__esModule",{value:!0}),T(Cd)),Xk=T(md),Jk=T(Xv),$k=T(w),eM=A,I=e.internal.constants,tM=I.BOLT_PROTOCOL_V5_2,rM=I.FETCH_ALL,Ad=(Kk=Nt.default,uh(nM,Kk),Object.defineProperty(nM.prototype,"version",{get:function(){return tM},enumerable:!1,configurable:!0}),Object.defineProperty(nM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Jk.default(Object.values(Xk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(nM.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),nM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new eM.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write($k.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Qk(Qk({},e),a.metadata))},onError:i,flush:!0})},nM.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new eM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write($k.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},nM.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?rM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new eM.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=y;return this.write($k.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write($k.default.pull({n:_}),c,b),c},nM);function nM(){return null!==Kk&&Kk.apply(this,arguments)||this}O.default=Ad;var oM,iM,fh={},bh={},uM=r&&r.__assign||function(){return(uM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},vc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sh=(Object.defineProperty(bh,"__esModule",{value:!0}),vc(md)),ah=(bh.default=uM({},Sh.default),r&&r.__extends||(oM=function(e,t){return(oM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}oM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),aM=r&&r.__assign||function(){return(aM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Nh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gh=(Object.defineProperty(fh,"__esModule",{value:!0}),Nh(O)),sM=Nh(bh),cM=Nh(Xv),lM=Nh(w),fM=A,pM=e.internal.constants.BOLT_PROTOCOL_V5_3,qh=(iM=gh.default,ah(dM,iM),Object.defineProperty(dM.prototype,"version",{get:function(){return pM},enumerable:!1,configurable:!0}),Object.defineProperty(dM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new cM.default(Object.values(sM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),dM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new fM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(lM.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(aM(aM({},e),s.metadata))},onError:u,flush:!0})},dM);function dM(){return null!==iM&&iM.apply(this,arguments)||this}fh.default=qh;var hM,bM,Xh={},yb={},yM=r&&r.__assign||function(){return(yM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Jh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},wf=(Object.defineProperty(yb,"__esModule",{value:!0}),Jh(bh)),Ab=(yb.default=yM({},wf.default),r&&r.__extends||(hM=function(e,t){return(hM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}hM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),ip=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nb=(Object.defineProperty(Xh,"__esModule",{value:!0}),ip(fh)),_M=ip(yb),vM=ip(w),mM=A,gM=ip(Xv),OM=e.internal.constants.BOLT_PROTOCOL_V5_4,Wf=(bM=Nb.default,Ab(wM,bM),Object.defineProperty(wM.prototype,"version",{get:function(){return OM},enumerable:!1,configurable:!0}),Object.defineProperty(wM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new gM.default(Object.values(_M.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),wM.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=t.onCompleted,t=new mM.TelemetryObserver({onCompleted:t,onError:r});return this.write(vM.default.telemetry({api:e}),t,!1),t},wM);function wM(){return null!==bM&&bM.apply(this,arguments)||this}Xh.default=Wf;var EM,PM,xb={},Pp={},SM=r&&r.__assign||function(){return(SM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Gb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Od=(Object.defineProperty(Pp,"__esModule",{value:!0}),Gb(yb)),Yh=(Pp.default=SM({},Od.default),r&&r.__extends||(EM=function(e,t){return(EM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}EM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),TM=r&&r.__assign||function(){return(TM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ec=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bb=(Object.defineProperty(xb,"__esModule",{value:!0}),Ec(Xh)),jM=Ec(Pp),CM=Ec(Xv),RM=Ec(w),IM=A,Hb=e.internal.constants,AM=Hb.BOLT_PROTOCOL_V5_5,kM=Hb.FETCH_ALL,MM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),Dy=(PM=bb.default,Yh(NM,PM),Object.defineProperty(NM.prototype,"version",{get:function(){return AM},enumerable:!1,configurable:!0}),Object.defineProperty(NM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new CM.default(Object.values(jM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),NM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new IM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(RM.default.hello5x5(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(TM(TM({},e),s.metadata))},onError:u,flush:!0})},NM.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new IM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(RM.default.begin5x5({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},NM.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?kM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new IM.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r,enrichMetadata:this._enrichMetadata}),l=y;return this.write(RM.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(RM.default.pull({n:_}),c,b),c},NM.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return TM(TM({},e),{description:null!=e.neo4j_code?e.status_description:e.description,diagnostic_record:null!==e.diagnostic_record?TM(TM({},MM),e.diagnostic_record):null})})),e},NM);function NM(){return null!==PM&&PM.apply(this,arguments)||this}xb.default=Dy;var xM,DM,ky={},Wy=r&&r.__extends||(xM=function(e,t){return(xM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}xM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),LM=r&&r.__assign||function(){return(LM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},l_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i_=(Object.defineProperty(ky,"__esModule",{value:!0}),l_(xb)),UM=l_(Pp),FM=l_(Xv),BM=e.internal.constants.BOLT_PROTOCOL_V5_6,WM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),h_=(DM=i_.default,Wy(qM,DM),Object.defineProperty(qM.prototype,"version",{get:function(){return BM},enumerable:!1,configurable:!0}),Object.defineProperty(qM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new FM.default(Object.values(UM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),qM.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return LM(LM({},e),{diagnostic_record:null!==e.diagnostic_record?LM(LM({},WM),e.diagnostic_record):null})})),e},qM);function qM(){return null!==DM&&DM.apply(this,arguments)||this}ky.default=h_;var zM,VM,kd={},S_=r&&r.__extends||(zM=function(e,t){return(zM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}zM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),HM=r&&r.__assign||function(){return(HM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},j_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},A_=(Object.defineProperty(kd,"__esModule",{value:!0}),j_(ky)),GM=j_(Pp),YM=j_(Xv),KM=e.internal.constants.BOLT_PROTOCOL_V5_7,ZM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),N_=(VM=A_.default,S_(QM,VM),Object.defineProperty(QM.prototype,"version",{get:function(){return KM},enumerable:!1,configurable:!0}),Object.defineProperty(QM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new YM.default(Object.values(GM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),QM.prototype.enrichErrorMetadata=function(e){return HM(HM({},e),{cause:null!==e.cause&&void 0!==e.cause?this.enrichErrorMetadata(e.cause):null,code:e.neo4j_code,diagnostic_record:null!==e.diagnostic_record?HM(HM({},ZM),e.diagnostic_record):null})},QM);function QM(){return null!==VM&&VM.apply(this,arguments)||this}kd.default=N_;var w_={},XM=(Object.defineProperty(w_,"__esModule",{value:!0}),e);function JM(){}function $M(e){return e}var e2={onNext:JM,onCompleted:JM,onError:JM};function t2(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.enrichErrorMetadata,n=e.log,e=e.observer;this._pendingObservers=[],this._log=n,this._transformMetadata=t||$M,this._enrichErrorMetadata=r||$M,this._observer=Object.assign({onObserversCountChange:JM,onError:JM,onFailure:JM,onErrorApplyTransformation:$M},e)}Object.defineProperty(t2.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),t2.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(XM.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(XM.json.stringify(e)));try{var r=this._transformMetadata(t);this._currentObserver.onCompleted(r)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(XM.json.stringify(e)));try{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(t)),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED ".concat(XM.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,XM.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,XM.newError)("Unknown Bolt protocol message: "+e))}},t2.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(t2.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),t2.prototype._queueObserver=function(e){return(e=e||e2).onCompleted=e.onCompleted||JM,e.onError=e.onError||JM,e.onNext=e.onNext||JM,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},t2.prototype._notifyErrorToObservers=function(e){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(e);0<this._pendingObservers.length;){var t=this._pendingObservers.shift();t&&t.onError&&t.onError(e)}},t2.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},t2.prototype._resetFailure=function(){this._currentFailure=null},t2.prototype._handleErrorPayload=function(e){var t=function(e){{if("Neo.TransientError.Transaction.Terminated"===e)return"Neo.ClientError.Transaction.Terminated";if("Neo.TransientError.Transaction.LockClientStopped"===e)return"Neo.ClientError.Transaction.LockClientStopped"}return e}(e.code),r=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,XM.newError)(e.message,t,r,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},t2.prototype._handleErrorCause=function(e){var t=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,XM.newGQLError)(e.message,t,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},w_.default=t2;var r2,W_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n2=(Object.defineProperty(ey,"__esModule",{value:!0}),e),o2=W_(iy),i2=W_(fm),u2=W_(c0),a2=W_(D0),s2=W_(E),c2=W_(Ag),l2=W_(s),f2=W_(Nc),p2=W_(xr),d2=W_(Cd),h2=W_(O),b2=W_(fh),y2=W_(Xh),_2=W_(xb),v2=W_(ky),m2=W_(kd),g2=W_(w_);ey.default=function(e){var t=(e=void 0===e?{}:e).version,r=e.chunker,n=e.dechunker,o=e.channel,i=e.disableLosslessIntegers,u=e.useBigInt,a=e.serversideRouting,s=e.server,c=e.log,l=e.observer,f=t,p=s,d=r,h={disableLosslessIntegers:i,useBigInt:u},b=a,y=function(t){var r=new g2.default({transformMetadata:t.transformMetadata.bind(t),enrichErrorMetadata:t.enrichErrorMetadata.bind(t),log:c,observer:l});return o.onerror=l.onError.bind(l),o.onmessage=function(e){return n.write(e)},n.onmessage=function(e){try{r.handleResponse(t.unpack(e))}catch(e){return l.onError(e)}},r},_=l.onProtocolError.bind(l),v=c;switch(f){case 1:return new o2.default(p,d,h,y,v,_);case 2:return new i2.default(p,d,h,y,v,_);case 3:return new u2.default(p,d,h,y,v,_);case 4:return new a2.default(p,d,h,y,v,_);case 4.1:return new s2.default(p,d,h,y,v,_,b);case 4.2:return new c2.default(p,d,h,y,v,_,b);case 4.3:return new l2.default(p,d,h,y,v,_,b);case 4.4:return new f2.default(p,d,h,y,v,_,b);case 5:return new p2.default(p,d,h,y,v,_,b);case 5.1:return new d2.default(p,d,h,y,v,_,b);case 5.2:return new h2.default(p,d,h,y,v,_,b);case 5.3:return new b2.default(p,d,h,y,v,_,b);case 5.4:return new y2.default(p,d,h,y,v,_,b);case 5.5:return new _2.default(p,d,h,y,v,_,b);case 5.6:return new v2.default(p,d,h,y,v,_,b);case 5.7:return new m2.default(p,d,h,y,v,_,b);default:throw(0,n2.newError)("Unknown Bolt protocol version: "+f)}},_y=y,r2=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),d_=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||r2(t,e,r)},b_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(_y,"__esModule",{value:!0}),_y.RawRoutingTable=_y.BoltProtocol=void 0,Y_=b_(op),sv=b_(ey),up=b_(s),b_=b_(py),d_(A,_y),_y.BoltProtocol=up.default,_y.RawRoutingTable=b_.default,_y.default={handshake:Y_.default,create:sv.default};var O2,ap={},bv={},wv=r&&r.__extends||(O2=function(e,t){return(O2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}O2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(bv,"__esModule",{value:!0});wv(E2,w2=e.ConnectionProvider),E2.prototype.acquireConnection=function(e){e=void 0===e?{}:e,e.accessMode,e.database,e.bookmarks,e=this._connection;return this._connection=null,Promise.resolve(e)};var w2,yv=E2;function E2(e){var t=w2.call(this)||this;return t._connection=e,t}bv.default=yv;var P2,Ef={},sp={},pv={},mv=r&&r.__extends||(P2=function(e,t){return(P2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}P2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(pv,"__esModule",{value:!0});mv(T2,S2=e.Connection),Object.defineProperty(T2.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),T2.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(T2.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),T2.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},T2.prototype.write=function(e,t,r){throw new Error("not implemented")},T2.prototype.close=function(){throw new Error("not implemented")},T2.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var S2,Oy=T2;function T2(e){var t=S2.call(this)||this;return t._errorHandler=e,t}pv.default=Oy;var j2,Dv={},Mv=r&&r.__extends||(j2=function(e,t){return(j2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}j2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),C2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},R2=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Bv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},I2=(Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.createChannelConnection=void 0,Ep),A2=e,Gv=Bv(pv),k2=Bv(y),M2=A2.error.PROTOCOL_ERROR,N2=A2.internal.logger.Logger,x2=0;Dv.createChannelConnection=function(i,u,a,s,e,c,t){void 0===c&&(c=null);var l=(t=void 0===t?function(e){return new I2.Channel(e)}:t)(new I2.ChannelConfig(i,u,a.errorCode(),e));return k2.default.handshake(l,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new I2.Chunker(l),o=new I2.Dechunker,t=new L2(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return k2.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onObserversCountChange:t._handleOngoingRequestsNumberChange.bind(t),onError:t._handleFatalError.bind(t),onFailure:t._resetOnFailure.bind(t),onProtocolError:t._handleProtocolError.bind(t),onErrorApplyTransformation:function(e){return t.handleAndTransformError(e,t._address)}}})},u.telemetryDisabled);return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};D2=Gv.default,Mv(U2,D2),U2.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},U2.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},U2.prototype._sendTelemetryIfEnabled=function(e){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||null==e||null==e.apiTelemetryConfig||this._protocol.telemetry({api:e.apiTelemetryConfig.api},{onCompleted:e.apiTelemetryConfig.onTelemetrySuccess,onError:e.beforeError})},U2.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},U2.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},U2.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(U2.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),U2.prototype.connect=function(t,n,o,i){return C2(this,void 0,void 0,function(){var r=this;return R2(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,A2.newError)("Connection does not support re-auth");return this._authToken=o,this._protocol.initialized?[3,2]:[4,this._initialize(t,n,o)];case 1:return[2,e.sent()];case 2:return i?[4,new Promise(function(e,t){r._protocol.logoff({onError:t}),r._protocol.logon({authToken:o,onError:t,onComplete:function(){return e(r)},flush:!0})})]:[3,4];case 3:return[2,e.sent()];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:o,flush:!0}),[2,this]}})})},U2.prototype._initialize=function(e,n,o){var i=this,u=this;return new Promise(function(r,t){i._protocol.initialize({userAgent:e,boltAgent:n,authToken:o,notificationFilter:i._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,i.version&&!t||(i.version=t),t=e.connection_id,i.databaseId||(i.databaseId=t),e.hints&&(null!=(t=e.hints["connection.recv_timeout_seconds"])&&(t=(0,A2.toNumber)(t),Number.isInteger(t)&&0<t?i._ch.setupReceiveTimeout(1e3*t):i._log.info("Server located at ".concat(i._address," supplied an invalid connection receive timeout value (").concat(t,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")),!0===e.hints["telemetry.enabled"]&&(i._telemetryDisabledConnection=!1))),r(u)}})})},U2.prototype.protocol=function(){return this._protocol},Object.defineProperty(U2.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),U2.prototype._handleFatalError=function(e){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||e,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(A2.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},U2.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},U2.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},U2.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},U2.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},U2.prototype.resetAndFlush=function(){var r=this;return new Promise(function(e,t){r._reset({onError:function(e){r._isBroken?t(e):(e=r._handleProtocolError("Received FAILURE as a response for RESET: ".concat(e)),t(e))},onComplete:function(){e()}})})},U2.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},U2.prototype._reset=function(t){var e,r=this;this._reseting?this._protocol.isLastMessageReset()?this._resetObservers.push(t):this._protocol.reset({onError:function(e){t.onError(e)},onComplete:function(){t.onComplete()}}):(this._resetObservers.push(t),this._reseting=!0,e=function(e){r._reseting=!1;var t=r._resetObservers;r._resetObservers=[],t.forEach(e)},this._protocol.reset({onError:function(t){e(function(e){return e.onError(t)})},onComplete:function(){e(function(e){return e.onComplete()})}}))},U2.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},U2.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},U2.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},U2.prototype.close=function(){return C2(this,void 0,void 0,function(){return R2(this,function(e){switch(e.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 e.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},U2.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},U2.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,A2.newError)(e,M2);return this._handleFatalError(e),e};var D2,L2=U2;function U2(e,t,r,n,o,i,u,a,s,c){void 0===o&&(o=!1),void 0===i&&(i=null);var l,f,t=D2.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=x2++,t._address=r,t._server={address:r.asHostPort()},t._creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(l=t,new N2((f=n)._level,function(e,t){return f._loggerFunction(e,"".concat(l," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._telemetryDisabledDriverConfig=!0===c,t._telemetryDisabledConnection=!0,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}Dv.default=L2;var F2,B2,pn={},tm=r&&r.__extends||(F2=function(e,t){return(F2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}F2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),om=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},am=(Object.defineProperty(pn,"__esModule",{value:!0}),om(pv)),it=(B2=am.default,tm(W2,B2),W2.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},W2.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},W2.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},W2.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},W2.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(W2.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),W2.prototype.isOpen=function(){return this._delegate.isOpen()},W2.prototype.protocol=function(){return this._delegate.protocol()},W2.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},W2.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},W2.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},W2.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},W2.prototype.close=function(){return this._delegate.close()},W2.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},W2);function W2(e,t){var r=B2.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}pn.default=it;Em={};Object.defineProperty(Em,"__esModule",{value:!0});var q2,z2,V2,H2=e.error.SERVICE_UNAVAILABLE,G2=e.error.SESSION_EXPIRED;function Y2(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||K2,this._handleWriteFailure=r||K2,this._handleSecurityError=n||K2}function K2(e){return e}Y2.create=function(e){return new Y2(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},Y2.prototype.errorCode=function(){return this._errorCode},Y2.prototype.handleAndTransformError=function(e,t,r){return null!=(n=e)&&null!=n.code&&n.code.startsWith("Neo.ClientError.Security.")?this._handleSecurityError(e,t,r):function(e){if(e)return e.code===G2||e.code===H2||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t,r):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t,r):e;var n},Em.default=Y2,Cm=sp,q2=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),z2=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zv=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&q2(t,e,r);return z2(t,e),t},C=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.createChannelConnection=Cm.ConnectionErrorHandler=Cm.DelegateConnection=Cm.ChannelConnection=Cm.Connection=void 0,Nm=C(pv),Cm.Connection=Nm.default,V2=Zv(Dv),Cm.ChannelConnection=V2.default,Object.defineProperty(Cm,"createChannelConnection",{enumerable:!0,get:function(){return V2.createChannelConnection}}),Zv=C(pn),Cm.DelegateConnection=Zv.default,Zv=C(Em),Cm.ConnectionErrorHandler=Zv.default,Cm.default=Nm.default;var Vm={},Z2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Q2=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},X2=(Object.defineProperty(Vm,"__esModule",{value:!0}),e),J2=Gy;function $2(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,X2.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}$2.prototype.authenticate=function(e){var r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return Z2(this,void 0,void 0,function(){var t;return Q2(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!J2.object.equals(r.authToken,n)&&!0!==o||!0===u),null==r.authToken||t?[4,r.connect(this._userAgent,this._boltAgent,n,i||!1)]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,r];case 3:return[4,this._authTokenManager.getToken()];case 4:return t=e.sent(),J2.object.equals(t,r.authToken)?[3,6]:[4,r.connect(this._userAgent,this._boltAgent,t,!1)];case 5:return[2,e.sent()];case 6:return[2,r]}})})},$2.prototype.handleError=function(e){var t=e.connection,e=e.code;return!(!t||!e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},Vm.default=$2;var tb={},eN=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},tN=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function rN(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(tb,"__esModule",{value:!0}),rN.prototype.check=function(r){return eN(this,void 0,void 0,function(){var t;return tN(this,function(e){switch(e.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(r)?[2,!0]:(t=Date.now()-r.idleTimestamp,0===this._connectionLivenessCheckTimeout||t>this._connectionLivenessCheckTimeout?[4,r.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,!0]}})})},Object.defineProperty(rN.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),rN.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},tb.default=rN;var Km={},nN=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},oN=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},iN=(Object.defineProperty(Km,"__esModule",{value:!0}),Ep);function uN(e){var t=e.clientCertificateProvider,e=e.loader;this._clientCertificateProvider=t,this._loader=e||iN.ClientCertificatesLoader,this._clientCertificate=null}uN.prototype.getClientCertificate=function(){return nN(this,void 0,void 0,function(){var t,r,n=this;return oN(this,function(e){switch(e.label){case 0:return(t=null!=this._clientCertificateProvider)?(r=null==this._clientCertificate)?[3,2]:[4,this._clientCertificateProvider.hasUpdate()]:[3,3];case 1:r=e.sent(),e.label=2;case 2:t=r,e.label=3;case 3:return t&&(this._clientCertificate=Promise.resolve(this._clientCertificateProvider.getClientCertificate()).then(this._loader.load).then(function(e){return n._clientCertificate=e,n._clientCertificate}).catch(function(e){throw n._clientCertificate=null,e})),[2,this._clientCertificate]}})})},Km.default=uN;var aN,sN,Fm=r&&r.__extends||(aN=function(e,t){return(aN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}aN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),cN=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},lN=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},fN=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},pN=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},t0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dN=(Object.defineProperty(Ef,"__esModule",{value:!0}),sp),hN=e,bN=t0(Vm),yN=Gy,_N=t0(tb),vN=t0(Km),mN=hN.error.SERVICE_UNAVAILABLE,gN=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],v0=hN.internal.pool,ON=v0.Pool,wN=v0.PoolConfig,eb=(sN=hN.ConnectionProvider,Fm(EN,sN),EN.prototype._createConnectionErrorHandler=function(){return new dN.ConnectionErrorHandler(mN)},EN.prototype._getClientCertificate=function(){return cN(this,void 0,void 0,function(){return lN(this,function(e){return[2,this._config.clientCertificate.getClientCertificate()]})})},EN.prototype._createConnection=function(e,r,n){var o=this,i=e.auth;return this._createChannelConnection(r).then(function(t){return t.release=function(){return t.idleTimestamp=Date.now(),n(r,t)},o._openConnections[t.id]=t,o._authenticationProvider.authenticate({connection:t,auth:i}).catch(function(e){throw o._destroyConnection(t),e})})},EN.prototype._validateConnectionOnAcquire=function(e,r){var n=e.auth,o=e.skipReAuth;return cN(this,void 0,void 0,function(){var t;return lN(this,function(e){switch(e.label){case 0:if(!this._validateConnection(r))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(r)];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not alive because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:r,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not valid because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 7:return[2]}})})},EN.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},EN.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},EN.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},EN.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return cN(this,void 0,void 0,function(){var t,r;return lN(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new hN.ServerInfo(t.server,t.protocol().version),e.label=2;case 2:return e.trys.push([2,,5,7]),t.protocol().isLastMessageLogon()?[3,4]:[4,t.resetAndFlush()];case 3:e.sent(),e.label=4;case 4:return[3,7];case 5:return[4,t.release()];case 6:return e.sent(),[7];case 7:return[2,r]}})})},EN.prototype._verifyAuthentication=function(e){var u=e.getAddress,a=e.auth;return cN(this,void 0,void 0,function(){var t,r,n,o,i;return lN(this,function(e){switch(e.label){case 0:t=[],e.label=1;case 1:return e.trys.push([1,8,9,11]),[4,u()];case 2:return r=e.sent(),[4,this._connectionPool.acquire({auth:a,skipReAuth:!0},r)];case 3:if(n=e.sent(),t.push(n),o=!n.protocol().isLastMessageLogon(),n.supportsReAuth)return o&&n.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:n,auth:a,waitReAuth:!0,forceReAuth:!0})]:[3,5];throw(0,hN.newError)("Driver is connected to a database that does not support user switch.");case 4:return e.sent(),[3,7];case 5:return!o||n.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:a},r,{requireNew:!0})];case 6:(i=e.sent())._sticky=!0,t.push(i),e.label=7;case 7:return[2,!0];case 8:if(i=e.sent(),gN.includes(i.code))return[2,!1];throw i;case 9:return[4,Promise.all(t.map(function(e){return e.release()}))];case 10:return e.sent(),[7];case 11:return[2]}})})},EN.prototype._verifyStickyConnection=function(e){var n=e.auth,o=e.connection;return e.address,cN(this,void 0,void 0,function(){var t,r;return lN(this,function(e){switch(e.label){case 0:return(t=yN.object.equals(n,o.authToken),r=!t,o._sticky=t&&!o.supportsReAuth,r||o._sticky)?[4,o.release()]:[3,2];case 1:throw e.sent(),(0,hN.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},EN.prototype.close=function(){return cN(this,void 0,void 0,function(){return lN(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.close()];case 1:return e.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(e){return e.close()}))];case 2:return e.sent(),[2]}})})},EN._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},EN._removeIdleObserverOnConnection=function(e){e._unsetIdle()},EN.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},EN);function EN(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,e=void 0===e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(ON.bind.apply(ON,pN([void 0],fN(e),!1)))}:e,s=(void 0===t&&(t=null),sN.call(this)||this);return s._id=r,s._config=n,s._log=o,s._clientCertificateHolder=new vN.default({clientCertificateProvider:s._config.clientCertificate}),s._authenticationProvider=new bN.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new _N.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(n){return cN(s,void 0,void 0,function(){var t,r;return lN(this,function(e){switch(e.label){case 0:return t=dN.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent()]))]}})})},s._connectionPool=e({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validateOnAcquire:s._validateConnectionOnAcquire.bind(s),validateOnRelease:s._validateConnectionOnRelease.bind(s),installIdleObserver:EN._installIdleObserverOnConnection.bind(s),removeIdleObserver:EN._removeIdleObserverOnConnection.bind(s),config:wN.fromDriverConfig(n),log:s._log}),s._openConnections={},s}Ef.default=eb;var PN,SN,g0={},R0=r&&r.__extends||(PN=function(e,t){return(PN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}PN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),TN=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},jN=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},k0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P0=(Object.defineProperty(g0,"__esModule",{value:!0}),k0(Ef)),CN=sp,yl=e.internal.constants,RN=yl.BOLT_PROTOCOL_V3,IN=yl.BOLT_PROTOCOL_V4_0,AN=yl.BOLT_PROTOCOL_V4_4,kN=yl.BOLT_PROTOCOL_V5_1,MN=e.error.SERVICE_UNAVAILABLE,z0=(SN=P0.default,R0(NN,SN),NN.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return TN(this,void 0,void 0,function(){var t,r,n=this;return jN(this,function(e){switch(e.label){case 0:return t=CN.ConnectionErrorHandler.create({errorCode:MN,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r,o)}}),[4,this._connectionPool.acquire({auth:i,forceReAuth:u},this._address)];case 1:return(r=e.sent(),i)?[4,this._verifyStickyConnection({auth:i,connection:r,address:this._address})]:[3,3];case 2:return e.sent(),[2,r];case 3:return[2,new CN.DelegateConnection(r,t)]}})})},NN.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),SN.prototype._handleSecurityError.call(this,e,t,r)},NN.prototype._hasProtocolVersion=function(n){return TN(this,void 0,void 0,function(){var t,r;return jN(this,function(e){switch(e.label){case 0:return[4,this._createChannelConnection(this._address)];case 1:return t=e.sent(),r=t.protocol()?t.protocol().version:null,[4,t.close()];case 2:return e.sent(),r?[2,n(r)]:[2,!1]}})})},NN.prototype.supportsMultiDb=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return IN<=e})];case 1:return[2,e.sent()]}})})},NN.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},NN.prototype.supportsTransactionConfig=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return RN<=e})];case 1:return[2,e.sent()]}})})},NN.prototype.supportsUserImpersonation=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return AN<=e})];case 1:return[2,e.sent()]}})})},NN.prototype.supportsSessionAuth=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return kN<=e})];case 1:return[2,e.sent()]}})})},NN.prototype.verifyAuthentication=function(e){var r=e.auth;return TN(this,void 0,void 0,function(){var t=this;return jN(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},NN.prototype.verifyConnectivityAndGetServerInfo=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},NN);function NN(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,t=SN.call(this,{id:t,config:r,log:n,userAgent:i,boltAgent:u,authTokenManager:a,newPool:e})||this;return t._address=o,t}g0.default=z0;var p0={},G0={},X_={},eg={},xN=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},DN=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},LN=(Object.defineProperty(eg,"__esModule",{value:!0}),eg.createValidRoutingTable=void 0,e),Z0=LN.internal.constants,UN=Z0.ACCESS_MODE_WRITE,FN=Z0.ACCESS_MODE_READ,BN=LN.internal.serverAddress.ServerAddress,WN=LN.error.PROTOCOL_ERROR,qN=(zN.fromRawRoutingTable=HN,zN.prototype.forget=function(e){this.readers=VN(this.readers,e),this.writers=VN(this.writers,e)},zN.prototype.forgetRouter=function(e){this.routers=VN(this.routers,e)},zN.prototype.forgetWriter=function(e){this.writers=VN(this.writers,e)},zN.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===FN&&0===this.readers.length||e===UN&&0===this.writers.length},zN.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},zN.prototype.allServers=function(){return DN(DN(DN([],xN(this.routers),!1),xN(this.readers),!1),xN(this.writers),!1)},zN.prototype.toString=function(){return"RoutingTable["+"database=".concat(this.databaseName,", ")+"expirationTime=".concat(this.expirationTime,", ")+"currentTime=".concat(Date.now(),", ")+"routers=[".concat(this.routers,"], ")+"readers=[".concat(this.readers,"], ")+"writers=[".concat(this.writers,"]]")},zN);function zN(e){var e=void 0===e?{}:e,t=e.database,r=e.routers,n=e.readers,o=e.writers,i=e.expirationTime,e=e.ttl;this.database=t||null,this.databaseName=t||"default database",this.routers=r||[],this.readers=n||[],this.writers=o||[],this.expirationTime=i||(0,LN.int)(0),this.ttl=e}function VN(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function HN(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,LN.int)(Date.now()),n=(0,LN.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?LN.Integer.MAX_VALUE:n}catch(e){throw(0,LN.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(LN.json.stringify(t),"\nError message: ").concat(e.message),WN)}}(r,t),i=function(t,r){try{var n=[],o=[],i=[];return t.servers.forEach(function(e){var t=e.role,e=e.addresses;"ROUTE"===t?n=YN(e).map(function(e){return BN.fromUrl(e)}):"WRITE"===t?i=YN(e).map(function(e){return BN.fromUrl(e)}):"READ"===t&&(o=YN(e).map(function(e){return BN.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,LN.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(LN.json.stringify(t.servers),"\nError message: ").concat(e.message),WN)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return GN(u,"routers",t),GN(a,"readers",t),new qN({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function GN(e,t,r){if(0===e.length)throw(0,LN.newError)("Received no "+t+" from router "+r,WN)}function YN(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}eg.default=qN,eg.createValidRoutingTable=HN;var dy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},KN=(Object.defineProperty(X_,"__esModule",{value:!0}),dy(eg));function ZN(e){this._routingContext=e}ZN.prototype.lookupRoutingTableOnRouter=function(t,r,n,o){var i=this;return t._acquireConnection(function(e){return i._requestRawRoutingTable(e,t,r,n,o).then(function(e){return e.isNull?null:KN.default.fromRawRoutingTable(r,n,e)})})},ZN.prototype._requestRawRoutingTable=function(r,n,o,e,i){var u=this;return new Promise(function(e,t){r.protocol().requestRoutingInformation({routingContext:u._routingContext,databaseName:o,impersonatedUser:i,sessionContext:{bookmarks:n._lastBookmarks,mode:n._mode,database:n._database,afterComplete:n._onComplete},onCompleted:e,onError:t})})},X_.default=ZN;var QN,XN,ng=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zy=(Object.defineProperty(G0,"__esModule",{value:!0}),G0.RoutingTable=G0.Rediscovery=void 0,ng(X_)),L0=(G0.Rediscovery=Zy.default,ng(eg)),bg=(G0.RoutingTable=L0.default,G0.default=Zy.default,r&&r.__extends||(QN=function(e,t){return(QN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}QN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),JN=r&&r.__assign||function(){return(JN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$N=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ex=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),gg=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&$N(t,e,r);return ex(t,e),t},tx=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},rx=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},nx=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ox=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},$h=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ix=(Object.defineProperty(p0,"__esModule",{value:!0}),e),ux=gg(G0),ax=Ep,sx=$h(bv),Sl=$h(Ef),cx=Dc,lx=sp,fx=Gy,px=ix.error.SERVICE_UNAVAILABLE,dx=ix.error.SESSION_EXPIRED,hx=ix.internal.bookmarks.Bookmarks,Bc=ix.internal.constants,bx=Bc.ACCESS_MODE_READ,yx=Bc.ACCESS_MODE_WRITE,_x=Bc.BOLT_PROTOCOL_V3,vx=Bc.BOLT_PROTOCOL_V4_0,mx=Bc.BOLT_PROTOCOL_V4_4,gx=Bc.BOLT_PROTOCOL_V5_1,Ox=null,wx=(0,ix.int)(3e4),u=(XN=Sl.default,bg(Ex,XN),Ex.prototype._createConnectionErrorHandler=function(){return new lx.ConnectionErrorHandler(dx)},Ex.prototype._handleUnavailability=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,r||Ox),e},Ex.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),XN.prototype._handleSecurityError.call(this,e,t,r,n)},Ex.prototype._handleWriteFailure=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forgetWriter(t,r||Ox),(0,ix.newError)("No longer possible to write to server at "+t,dx,e)},Ex.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,s=e.accessMode,c=e.database,l=e.bookmarks,f=e.impersonatedUser,p=e.onDatabaseNameResolved,d=e.auth;return tx(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return rx(this,function(e){switch(e.label){case 0:return n={database:c||Ox},o=new lx.ConnectionErrorHandler(dx,function(e,t){return a._handleUnavailability(e,t,n.database)},function(e,t){return a._handleWriteFailure(e,t,n.database)},function(e,t,r){return a._handleSecurityError(e,t,r,n.database)}),[4,this._freshRoutingTable({accessMode:s,database:n.database,bookmarks:l,impersonatedUser:f,auth:d,onDatabaseNameResolved:function(e){n.database=n.database||e,p&&p(e)}})];case 1:if(u=e.sent(),s===bx)r=this._loadBalancingStrategy.selectReader(u.readers),t="read";else{if(s!==yx)throw(0,ix.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(u.writers),t="write"}if(!r)throw(0,ix.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(u),dx);e.label=2;case 2:return e.trys.push([2,6,,7]),[4,this._connectionPool.acquire({auth:d},r)];case 3:return(i=e.sent(),d)?[4,this._verifyStickyConnection({auth:d,connection:i,address:r})]:[3,5];case 4:return e.sent(),[2,i];case 5:return[2,new lx.DelegateConnection(i,o)];case 6:throw u=e.sent(),o.handleAndTransformError(u,r);case 7:return[2]}})})},Ex.prototype._hasProtocolVersion=function(u){return tx(this,void 0,void 0,function(){var t,r,n,o,i;return rx(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=e.sent(),n=0,e.label=2;case 2:if(!(n<t.length))return[3,8];e.label=3;case 3:return e.trys.push([3,6,,7]),[4,this._createChannelConnection(t[n])];case 4:return i=e.sent(),o=i.protocol()?i.protocol().version:null,[4,i.close()];case 5:return e.sent(),o?[2,u(o)]:[2,!1];case 6:return i=e.sent(),r=i,[3,7];case 7:return n++,[3,2];case 8:if(r)throw r;return[2,!1]}})})},Ex.prototype.supportsMultiDb=function(){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return vx<=e})];case 1:return[2,e.sent()]}})})},Ex.prototype.supportsTransactionConfig=function(){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return _x<=e})];case 1:return[2,e.sent()]}})})},Ex.prototype.supportsUserImpersonation=function(){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return mx<=e})];case 1:return[2,e.sent()]}})})},Ex.prototype.supportsSessionAuth=function(){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return gx<=e})];case 1:return[2,e.sent()]}})})},Ex.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},Ex.prototype.verifyAuthentication=function(e){var n=e.database,o=e.accessMode,i=e.auth;return tx(this,void 0,void 0,function(){var t=this;return rx(this,function(e){return[2,this._verifyAuthentication({auth:i,getAddress:function(){return tx(t,void 0,void 0,function(){var t,r;return rx(this,function(e){switch(e.label){case 0:return t={database:n||Ox},[4,this._freshRoutingTable({accessMode:o,database:t.database,auth:i,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:if(r=e.sent(),0===(r=o===yx?r.writers:r.readers).length)throw(0,ix.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),px);return[2,r[0]]}})})}})]})})},Ex.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return tx(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return rx(this,function(e){switch(e.label){case 0:return t={database:l||Ox},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===yx?r.writers:r.readers,n=(0,ix.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),px),e.label=2;case 2:e.trys.push([2,9,10,11]),o=nx(r),i=o.next(),e.label=3;case 3:if(i.done)return[3,8];u=i.value,e.label=4;case 4:return e.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:u})];case 5:return[2,e.sent()];case 6:return a=e.sent(),n=a,[3,7];case 7:return i=o.next(),[3,3];case 8:return[3,11];case 9:return a=e.sent(),s={error:a},[3,11];case 10:try{i&&!i.done&&(c=o.return)&&c.call(o)}finally{if(s)throw s.error}return[7];case 11:throw n}})})},Ex.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},Ex.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},Ex.prototype._freshRoutingTable=function(e){var e=void 0===e?{}:e,t=e.accessMode,r=e.database,n=e.bookmarks,o=e.impersonatedUser,i=e.onDatabaseNameResolved,e=e.auth,u=this._routingTableRegistry.get(r,function(){return new ux.RoutingTable({database:r})});return u.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(u)),this._refreshRoutingTable(u,n,o,e).then(function(e){return i(e.database),e})):u},Ex.prototype._refreshRoutingTable=function(e,t,r,n){var o=e.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,e,t,r,n):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,e,t,r,n)},Ex.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return tx(this,void 0,void 0,function(){var t,r,n,o,i;return rx(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=ox.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],r)?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(u,a,s,c,l)];case 3:i=ox.apply(void 0,[e.sent(),2]),o=i[0],i=i[1],r=o,n=i||n,e.label=4;case 4:return[4,this._applyRoutingTableIfPossible(a,r,n)];case 5:return[2,e.sent()]}})})},Ex.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return tx(this,void 0,void 0,function(){var t,r,n;return rx(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=ox.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a,s)];case 2:n=ox.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,r)];case 4:return[2,e.sent()]}})})},Ex.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return tx(this,void 0,void 0,function(){var t,r;return rx(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=ox.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,Ex._forgetRouter(o,n,r),[2,[null,t]])}})})},Ex.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return tx(this,void 0,void 0,function(){var t;return rx(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(n)];case 1:return t=e.sent(),t=t.filter(function(e){return r.indexOf(e)<0}),[4,this._fetchRoutingTable(t,o,i,u,a)];case 2:return[2,e.sent()]}})})},Ex.prototype._resolveSeedRouter=function(n){return tx(this,void 0,void 0,function(){var t,r=this;return rx(this,function(e){switch(e.label){case 0:return[4,this._hostNameResolver.resolve(n)];case 1:return t=e.sent(),[4,Promise.all(t.map(function(e){return r._dnsResolver.resolve(e)}))];case 2:return t=e.sent(),[2,[].concat.apply([],t)]}})})},Ex.prototype._fetchRoutingTable=function(s,c,l,f,p){return tx(this,void 0,void 0,function(){var t=this;return rx(this,function(e){return[2,s.reduce(function(i,u,a){return tx(t,void 0,void 0,function(){var t,r,n,o;return rx(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=ox.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(Ex._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=ox.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],!r)return[3,8];e.label=3;case 3:return e.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(r,c.database,u,f)];case 4:return[2,[e.sent(),null]];case 5:return o=e.sent(),[2,this._handleRediscoveryError(o,u)];case 6:return r.close(),[7];case 7:return[3,9];case 8:return[2,[null,n]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},Ex.prototype._createSessionForRediscovery=function(o,i,u,a){return tx(this,void 0,void 0,function(){var t,r,n=this;return rx(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:a},o)];case 1:return(t=e.sent(),a)?[4,this._verifyStickyConnection({auth:a,connection:t,address:o})]:[3,3];case 2:e.sent(),e.label=3;case 3:return r=lx.ConnectionErrorHandler.create({errorCode:dx,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new lx.DelegateConnection(t):new lx.DelegateConnection(t,r),r=new sx.default(r),t.protocol().version<4?[2,[new ix.Session({mode:yx,bookmarks:hx.empty(),connectionProvider:r}),null]]:[2,[new ix.Session({mode:bx,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},Ex.prototype._handleRediscoveryError=function(e,t){if(["Neo.ClientError.Database.DatabaseNotFound","Neo.ClientError.Transaction.InvalidBookmark","Neo.ClientError.Transaction.InvalidBookmarkMixture","Neo.ClientError.Statement.ArgumentError","Neo.ClientError.Request.Invalid","Neo.ClientError.Statement.TypeError","N/A"].includes(e.code)||(r=e).code.startsWith("Neo.ClientError.Security.")&&!["Neo.ClientError.Security.AuthorizationExpired"].includes(r.code))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,ix.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),px,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},Ex.prototype._applyRoutingTableIfPossible=function(t,r,n){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,ix.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),px,n);case 1:return e.sent(),[2,r]}})})},Ex.prototype._updateRoutingTable=function(t){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return e.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),this._log.info("Updated routing table ".concat(t)),[2]}})})},Ex._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},Ex);function Ex(e){var t=e.id,r=e.address,n=e.routingContext,o=e.hostNameResolver,i=e.config,u=e.log,a=e.userAgent,s=e.boltAgent,c=e.authTokenManager,l=e.routingTablePurgeDelay,e=e.newPool,f=XN.call(this,{id:t,config:i,log:u,userAgent:a,boltAgent:s,authTokenManager:c,newPool:e},function(n){return tx(f,void 0,void 0,function(){var t,r;return rx(this,function(e){switch(e.label){case 0:return t=lx.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent(),this._routingContext]))]}})})})||this;return f._routingContext=JN(JN({},n),{address:r.toString()}),f._seedRouter=r,f._rediscovery=new ux.default(f._routingContext),f._loadBalancingStrategy=new cx.LeastConnectedLoadBalancingStrategy(f._connectionPool),f._hostNameResolver=o,f._dnsResolver=new ax.HostNameResolver,f._log=u,f._useSeedRouter=!0,f._routingTableRegistry=new qx(l?(0,ix.int)(l):wx),f._refreshRoutingTable=fx.functional.reuseOngoingRequest(f._refreshRoutingTable,f),f}p0.default=u;zx.prototype.register=function(e){return this._tables.set(e.database,e),this},zx.prototype.apply=function(e,t){var t=void 0===t?{}:t,r=t.applyWhenExists,t=t.applyWhenDontExists,t=void 0===t?function(){}:t;return this._tables.has(e)?r(this._tables.get(e)):"string"==typeof e||null===e?t():this._forEach(r),this},zx.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},zx.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},zx.prototype._forEach=function(e){var t,r;try{for(var n=nx(this._tables),o=n.next();!o.done;o=n.next())e(ox(o.value,2)[1])}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},zx.prototype._remove=function(e){return this._tables.delete(e),this},zx.prototype._removeIf=function(e){var t,r;try{for(var n=nx(this._tables),o=n.next();!o.done;o=n.next()){var i=ox(o.value,2),u=i[0];e(i[1])&&this._remove(u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this};var Px,Sx,Tx,jx,Cx,Rx,Ix,Ax,kx,Mx,Nx,x,xx,Dx,Lx,Ux,Fx,Bx,Wx,qx=zx;function zx(e){this._tables=new Map,this._routingTablePurgeDelay=e}function Vx(e,t,r){void 0===r&&(r={}),Lx(e,"Bolt URL");var n,o=Bx.parseDatabaseUrl(e),i=!1,u=!1;switch(o.scheme){case"bolt":break;case"bolt+s":u=!0,n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":u=!0,n="TRUST_ALL_CERTIFICATES";break;case"neo4j":i=!0;break;case"neo4j+s":n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",i=u=!0;break;case"neo4j+ssc":n="TRUST_ALL_CERTIFICATES",i=u=!0;break;default:throw new Error("Unknown scheme: ".concat(o.scheme))}if(u){if("encrypted"in r||"trust"in r)throw new Error("Encryption/trust can only be configured either through URL or config, not both");r.encrypted=Dx,r.trust=n,r.clientCertificate=(0,x.resolveCertificateProvider)(r.clientCertificate)}var a=function(e){if("object"==typeof(t=e)&&null!=t&&"getToken"in t&&"handleSecurityException"in t&&"function"==typeof t.getToken&&"function"==typeof t.handleSecurityException)return e;var t=e;return(t=t||{}).scheme=t.scheme||"none",(0,x.staticAuthTokenManager)({authToken:t})}(t),s=(r.userAgent=r.userAgent||Wx,r.boltAgent=x.internal.boltAgent.fromVersion(Nx.default),Fx.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new Mx.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new xx.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(Ux(o.query))return function(e,t,r){return new xx.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function Hx(r,n){return Ax(this,void 0,void 0,function(){var t;return kx(this,function(e){switch(e.label){case 0:t=Vx(r,{scheme:"none",principal:"",credentials:""},n),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,t.getNegotiatedProtocolVersion()];case 2:return e.sent(),[2,!0];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})}return pl=ap,Px=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(pl,"__esModule",{value:!0}),pl.RoutingConnectionProvider=pl.DirectConnectionProvider=pl.PooledConnectionProvider=pl.SingleConnectionProvider=void 0,Sx=bv,Object.defineProperty(pl,"SingleConnectionProvider",{enumerable:!0,get:function(){return Px(Sx).default}}),Tx=Ef,Object.defineProperty(pl,"PooledConnectionProvider",{enumerable:!0,get:function(){return Px(Tx).default}}),jx=g0,Object.defineProperty(pl,"DirectConnectionProvider",{enumerable:!0,get:function(){return Px(jx).default}}),Cx=p0,Object.defineProperty(pl,"RoutingConnectionProvider",{enumerable:!0,get:function(){return Px(Cx).default}}),fg=p,Rx=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Ix=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Rx(t,e,r);return Ix(t,e),t},i=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Rx(t,e,r)},Object.defineProperty(fg,"__esModule",{value:!0}),fg.packstream=fg.channel=fg.buf=fg.bolt=fg.loadBalancing=void 0,fg.loadBalancing=v(Dc),fg.bolt=v(y),fg.buf=v(id),fg.channel=v(Ep),fg.packstream=v(Q_),i(ap,fg),R=L,Ax=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},kx=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},j=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(R,"__esModule",{value:!0}),R.UnboundRelationship=R.Relationship=R.Node=R.Record=R.ServerInfo=R.GqlStatusObject=R.Notification=R.QueryStatistics=R.ProfiledPlan=R.Plan=R.ResultSummary=R.RxResult=R.RxManagedTransaction=R.RxTransaction=R.RxSession=R.EagerResult=R.Result=R.ManagedTransaction=R.Transaction=R.Session=R.Driver=R.temporal=R.spatial=R.graph=R.error=R.routing=R.session=R.types=R.logging=R.auth=R.isRetryableError=R.Neo4jError=R.integer=R.isUnboundRelationship=R.isRelationship=R.isPathSegment=R.isPath=R.isNode=R.isDateTime=R.isLocalDateTime=R.isDate=R.isTime=R.isLocalTime=R.isDuration=R.isPoint=R.isInt=R.int=R.hasReachableServer=R.driver=R.authTokenManagers=void 0,R.clientCertificateProviders=R.notificationFilterMinimumSeverityLevel=R.notificationFilterDisabledClassification=R.notificationFilterDisabledCategory=R.notificationSeverityLevel=R.notificationClassification=R.notificationCategory=R.resultTransformers=R.bookmarkManager=R.DateTime=R.LocalDateTime=R.Date=R.Time=R.LocalTime=R.Duration=R.Integer=R.Point=R.PathSegment=R.Path=void 0,Mx=U,Object.defineProperty(R,"Driver",{enumerable:!0,get:function(){return Mx.Driver}}),Nx=j(g),x=e,Object.defineProperty(R,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(R,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(R,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(R,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(R,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(R,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(R,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(R,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(R,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(R,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(R,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(R,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(R,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(R,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(R,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(R,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(R,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(R,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(R,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(R,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(R,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(R,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(R,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(R,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(R,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(R,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(R,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(R,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(R,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(R,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(R,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(R,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(R,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(R,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(R,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(R,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(R,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(R,"GqlStatusObject",{enumerable:!0,get:function(){return x.GqlStatusObject}}),Object.defineProperty(R,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(R,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(R,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(R,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(R,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(R,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(R,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(R,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(R,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(R,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(R,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(R,"notificationClassification",{enumerable:!0,get:function(){return x.notificationClassification}}),Object.defineProperty(R,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(R,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(R,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return x.notificationFilterDisabledClassification}}),Object.defineProperty(R,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(R,"clientCertificateProviders",{enumerable:!0,get:function(){return x.clientCertificateProviders}}),xx=p,nO=j(V),R.RxSession=nO.default,n=j(P),R.RxTransaction=n.default,Y=j(_),R.RxManagedTransaction=Y.default,j=j(t),R.RxResult=j.default,Dg=x.internal.util,Dx=Dg.ENCRYPTION_ON,Lx=Dg.assertString,Ux=Dg.isEmptyObjectOrNull,Fx=x.internal.serverAddress.ServerAddress,Bx=x.internal.urlUtil,Wx="neo4j-javascript/"+Nx.default,R.driver=Vx,R.hasReachableServer=Hx,Dg={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},R.logging=Dg,o={Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,PathSegment:x.PathSegment,Path:x.Path,Result:x.Result,EagerResult:x.EagerResult,ResultSummary:x.ResultSummary,Record:x.Record,Point:x.Point,Date:x.Date,DateTime:x.DateTime,Duration:x.Duration,LocalDateTime:x.LocalDateTime,LocalTime:x.LocalTime,Time:x.Time,Integer:x.Integer},R.types=o,$s={READ:Mx.READ,WRITE:Mx.WRITE},R.session=$s,Zs={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},R.integer=Zs,m={isPoint:x.isPoint},R.spatial=m,_m={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},R.temporal=_m,Ky={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},R.graph=Ky,Zs={authTokenManagers:x.authTokenManagers,driver:Vx,hasReachableServer:Hx,int:x.int,isInt:x.isInt,isPoint:x.isPoint,isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime,isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship,integer:Zs,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:Dg,types:o,session:$s,routing:x.routing,error:x.error,graph:Ky,spatial:m,temporal:_m,Driver:Mx.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:nO.default,RxTransaction:n.default,RxManagedTransaction:Y.default,RxResult:j.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,GqlStatusObject:x.GqlStatusObject,ServerInfo:x.ServerInfo,Record:x.Record,Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,Path:x.Path,PathSegment:x.PathSegment,Point:x.Point,Integer:x.Integer,Duration:x.Duration,LocalTime:x.LocalTime,Time:x.Time,Date:x.Date,LocalDateTime:x.LocalDateTime,DateTime:x.DateTime,bookmarkManager:x.bookmarkManager,resultTransformers:x.resultTransformers,notificationCategory:x.notificationCategory,notificationSeverityLevel:x.notificationSeverityLevel,notificationFilterDisabledCategory:x.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:x.notificationFilterMinimumSeverityLevel,clientCertificateProviders:x.clientCertificateProviders},R.default=Zs,D(L)});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).neo4j=t()}(this,function(){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L={},U={},e={},t={},n={},o={},F=(Object.defineProperty(o,"__esModule",{value:!0}),o.getBrokenObjectReason=o.isBrokenObject=o.createBrokenObject=void 0,"__isBrokenObject__"),B="__reason__";o.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===F||(t===B?r:void("toJSON"!==t&&n()))},set:n,apply:n,construct:n,defineProperty:n,deleteProperty:n,getOwnPropertyDescriptor:n,getPrototypeOf:n,has:n,isExtensible:n,ownKeys:n,preventExtensions:n,setPrototypeOf:n})},o.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[F]},o.getBrokenObjectReason=function(e){return e[B]},Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=void 0;var W=o;n.stringify=function(e,r){return JSON.stringify(e,function(e,t){return(0,W.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,W.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):!0!==(null==r?void 0:r.useCustomToString)||"object"!=typeof t||Array.isArray(t)||"function"!=typeof t.toString||t.toString===Object.prototype.toString?t:null==t?void 0:t.toString()})};var q,z,V={},i=(i=V,Object.defineProperty(i,"__esModule",{value:!0}),i.rawPolyfilledDiagnosticRecord=void 0,i.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(i.rawPolyfilledDiagnosticRecord),r&&r.__extends||(q=function(e,t){return(q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}q(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),H=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),G=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Y=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&H(t,e,r);return G(t,e),t},K=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.GQLError=t.Neo4jError=t.isRetriableError=t.newGQLError=t.newError=void 0,Y(n)),Z=V,Y={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"},Q=(Object.freeze(Y),Object.values(Y)),X="ServiceUnavailable",J=(t.SERVICE_UNAVAILABLE=X,"SessionExpired"),$=(t.SESSION_EXPIRED=J,t.PROTOCOL_ERROR="ProtocolError",z=Error,i(ee,z),Object.defineProperty(ee.prototype,"diagnosticRecordAsJsonString",{get:function(){return K.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),ee);function ee(e,t,r,n,o){var i=this;return(i=z.call(this,e,null!=o?{cause:o}:void 0)||this).constructor=ee,i.__proto__=ee.prototype,i.cause=null!=o?o:void 0,i.gqlStatus=t,i.gqlStatusDescription=r,i.diagnosticRecord=n,i.classification=void 0!==(e=i.diagnosticRecord)&&void 0!==e._classification&&Q.includes(e._classification)?null==e?void 0:e._classification:"UNKNOWN",i.rawClassification=null!=(o=null==n?void 0:n._classification)?o:void 0,i.name="GQLError",i}t.GQLError=$;i(ne,te=$),ne.isRetriable=function(e){return null!=e&&e instanceof ne&&e.retriable};var te,re=ne;function ne(e,t,r,n,o,i){e=te.call(this,e,r,n,o,i)||this;return e.constructor=ne,e.__proto__=ne.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===X||r===J||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=re,t.newError=function(e,t,r,n,o,i){return new re(e,null!=t?t:"N/A",null!=n?n:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:Z.rawPolyfilledDiagnosticRecord,r)},t.newGQLError=function(e,t,r,n,o){return new $(e,null!=r?r:"50N42",null!=n?n:"error: general processing exception - unexpected error. "+e,null!=o?o:Z.rawPolyfilledDiagnosticRecord,t)};Y=re.isRetriable;t.isRetriableError=Y;var i={},oe=(Object.defineProperty(i,"__esModule",{value:!0}),i.toString=i.toNumber=i.inSafeRange=i.isInt=i.int=void 0,t),ie=new Map,Y=(d.prototype.inSafeRange=function(){return this.greaterThanOrEqual(d.MIN_SAFE_VALUE)&&this.lessThanOrEqual(d.MAX_SAFE_VALUE)},d.prototype.toInt=function(){return this.low},d.prototype.toNumber=function(){return this.high*pe+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(pe)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(pe)+BigInt(e.low>>>0)))},d.prototype.toNumberOrInfinity=function(){return this.lessThan(d.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(d.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},d.prototype.toString=function(e){if((e=null!=e?e:10)<2||36<e)throw RangeError("radix out of range: "+e.toString());if(this.isZero())return"0";var t,r,n;if(this.isNegative())return this.equals(d.MIN_VALUE)?(t=d.fromNumber(e),n=(r=this.div(t)).multiply(t).subtract(this),r.toString(e)+n.toInt().toString(e)):"-"+this.negate().toString(e);for(var o=d.fromNumber(Math.pow(e,6)),i=(n=this,"");;){var u=n.div(o),a=(n.subtract(u.multiply(o)).toInt()>>>0).toString(e);if((n=u).isZero())return a+i;for(;a.length<6;)a="0"+a;i=""+a+i}},d.prototype.valueOf=function(){return this.toBigInt()},d.prototype.getHighBits=function(){return this.high},d.prototype.getLowBits=function(){return this.low},d.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(d.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,t=0,t=31;0<t&&0==(e&1<<t);t--);return 0!==this.high?t+33:t+1},d.prototype.isZero=function(){return 0===this.high&&0===this.low},d.prototype.isNegative=function(){return this.high<0},d.prototype.isPositive=function(){return 0<=this.high},d.prototype.isOdd=function(){return 1==(1&this.low)},d.prototype.isEven=function(){return 0==(1&this.low)},d.prototype.equals=function(e){e=d.fromValue(e);return this.high===e.high&&this.low===e.low},d.prototype.notEquals=function(e){return!this.equals(e)},d.prototype.lessThan=function(e){return this.compare(e)<0},d.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},d.prototype.greaterThan=function(e){return 0<this.compare(e)},d.prototype.greaterThanOrEqual=function(e){return 0<=this.compare(e)},d.prototype.compare=function(e){e=d.fromValue(e);if(this.equals(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r||(t||!r)&&this.subtract(e).isNegative()?-1:1},d.prototype.negate=function(){return this.equals(d.MIN_VALUE)?d.MIN_VALUE:this.not().add(d.ONE)},d.prototype.add=function(e){var e=d.fromValue(e),t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,s=0,c=0,l=0,f=0;return c+=(l=l+((f+=o+(65535&e.low))>>>16)+(n+a))>>>16,d.fromBits((l&=65535)<<16|(f&=65535),((s+=(c+=r+u)>>>16)+(t+i)&65535)<<16|(c&=65535))},d.prototype.subtract=function(e){e=d.fromValue(e);return this.add(e.negate())},d.prototype.multiply=function(e){if(this.isZero())return d.ZERO;e=d.fromValue(e);if(e.isZero())return d.ZERO;if(this.equals(d.MIN_VALUE))return e.isOdd()?d.MIN_VALUE:d.ZERO;if(e.equals(d.MIN_VALUE))return this.isOdd()?d.MIN_VALUE:d.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(he)&&e.lessThan(he))return d.fromNumber(this.toNumber()*e.toNumber());var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,e=65535&e.low,s=0,c=0,l=0,f=(f=0)+((c=c+((l+=o*e)>>>16)+n*e)>>>16)+((c=(c&65535)+o*a)>>>16);return d.fromBits((c&=65535)<<16|(l&=65535),((s+=(f+=r*e)>>>16)+((f=(f&65535)+n*a)>>>16)+((f=(f&65535)+o*u)>>>16)+(t*e+r*a+n*u+o*i)&65535)<<16|(f&=65535))},d.prototype.div=function(e){var t,r,n,o=d.fromValue(e);if(o.isZero())throw(0,oe.newError)("division by zero");if(this.isZero())return d.ZERO;{if(this.equals(d.MIN_VALUE))return o.equals(d.ONE)||o.equals(d.NEG_ONE)?d.MIN_VALUE:o.equals(d.MIN_VALUE)?d.ONE:(n=this.shiftRight(1).div(o).shiftLeft(1)).equals(d.ZERO)?o.isNegative()?d.ONE:d.NEG_ONE:(t=this.subtract(o.multiply(n)),n.add(t.div(o)));if(o.equals(d.MIN_VALUE))return d.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=d.ZERO,t=this;t.greaterThanOrEqual(o);){n=Math.max(1,Math.floor(t.toNumber()/o.toNumber()));for(var i=Math.ceil(Math.log(n)/Math.LN2),u=i<=48?1:Math.pow(2,i-48),a=d.fromNumber(n),s=a.multiply(o);s.isNegative()||s.greaterThan(t);)s=(a=d.fromNumber(n-=u)).multiply(o);a.isZero()&&(a=d.ONE),r=r.add(a),t=t.subtract(s)}return r},d.prototype.modulo=function(e){e=d.fromValue(e);return this.subtract(this.div(e).multiply(e))},d.prototype.not=function(){return d.fromBits(~this.low,~this.high)},d.prototype.and=function(e){e=d.fromValue(e);return d.fromBits(this.low&e.low,this.high&e.high)},d.prototype.or=function(e){e=d.fromValue(e);return d.fromBits(this.low|e.low,this.high|e.high)},d.prototype.xor=function(e){e=d.fromValue(e);return d.fromBits(this.low^e.low,this.high^e.high)},d.prototype.shiftLeft=function(e){e=d.toNumber(e);return 0==(e&=63)?d.ZERO:e<32?d.fromBits(this.low<<e,this.high<<e|this.low>>>32-e):d.fromBits(0,this.low<<e-32)},d.prototype.shiftRight=function(e){var t=d.toNumber(e),e=d.toNumber(e);return 0==(t&=63)?d.ZERO:e<32?d.fromBits(this.low>>>t|this.high<<32-t,this.high>>t):d.fromBits(this.high>>t-32,0<=this.high?0:-1)},d.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},d.fromInt=function(e){if(-128<=(e|=0)&&e<128&&null!=(t=ie.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&ie.set(e,t),t},d.fromBits=function(e,t){return new d(e,t)},d.fromNumber=function(e){return isNaN(e)||!isFinite(e)?d.ZERO:e<=-de?d.MIN_VALUE:de<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%pe|0,e/pe|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,oe.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return d.ZERO;if((t=null!=t?t:10)<2||36<t)throw(0,oe.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,oe.newError)('number format error: interior "-" character: '+e);if(0===r)return d.fromString(e.substring(1),t).negate();for(var o,i,u=d.fromNumber(Math.pow(t,8)),a=d.ZERO,s=0;s<e.length;s+=8){var c,l=Math.min(8,e.length-s),f=e.substring(s,s+l),p=parseInt(f,t);if(!0===n&&(o=f,c=p,i=t,Number.isNaN(o)||Number.isNaN(c)||function(e,t,r){e=e.toString(t),t=Math.max(r-e.length,0),r="0".repeat(t);return"".concat(r).concat(e)}(c,i,o.length)!==o.toLowerCase()))throw(0,oe.newError)('number format error: "'.concat(f,'" is NaN in radix ').concat(t,": ").concat(e));a=l<8?(c=d.fromNumber(Math.pow(t,l)),a.multiply(c).add(d.fromNumber(p))):(a=a.multiply(u)).add(d.fromNumber(p))}return a},d.fromValue=function(e,t){return void 0===t&&(t={}),e instanceof d?e:"number"==typeof e?(!0===t.ceilFloat&&(e=Math.ceil(e)),d.fromNumber(e)):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(Y.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var a,ue,ae,se,ce,le,fe,pe=4294967296,de=pe*pe/2,he=Y.fromInt(1<<24),u=Y.fromValue,u=(i.int=u,Y.isInteger),u=(i.isInt=u,Y.inSafeRange),u=(i.inSafeRange=u,Y.toNumber),u=(i.toNumber=u,Y.toString),u=(i.toString=u,i.default=Y,{}),Y={},s={},be=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ye=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&be(t,e,r);return ye(t,e),t},_e=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ve=(Object.defineProperty(s,"__esModule",{value:!0}),s.ENCRYPTION_OFF=s.ENCRYPTION_ON=s.equals=s.validateQueryAndParameters=s.toNumber=s.assertValidDate=s.assertNumberOrInteger=s.assertNumber=s.assertString=s.assertObject=s.isString=s.isObject=s.isEmptyObjectOrNull=void 0,c(i)),me=n;s.ENCRYPTION_ON="ENCRYPTION_ON";function ge(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function Oe(e,t){if(we(e))return e;throw new TypeError((0,me.stringify)(t)+" expected to be string but was: "+(0,me.stringify)(e))}function we(e){return"[object String]"===Object.prototype.toString.call(e)}function Ee(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,se.int)(e),this._maxInteger=(0,se.int)(t)}function Pe(e,t,r){e=(0,se.int)(e),t=(0,se.int)(t),r=(0,se.int)(r);var n=e.multiply(365);return n=(n=(n=e.greaterThanOrEqual(0)?n.add(e.add(3).div(4).subtract(e.add(99).div(100)).add(e.add(399).div(400))):n.subtract(e.div(-4).subtract(e.div(-100)).add(e.div(-400)))).add(t.multiply(367).subtract(362).div(12))).add(r.subtract(1)),t.greaterThan(2)&&(n=n.subtract(1),function(e){if((e=(0,se.int)(e)).modulo(4).equals(0))return!e.modulo(100).equals(0)||!!e.modulo(400).equals(0)}(e)||(n=n.subtract(1))),n.subtract(a.DAYS_0000_TO_1970)}function Se(e,t){return(0,ce.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))}function Te(e,t,r){if((0,le.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,ce.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function je(e,t){e=(0,se.int)(e),t=(0,se.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function Ce(e,t){return e=(0,se.int)(e),t=(0,se.int)(t),e.subtract(je(e,t).multiply(t))}function Re(e){return(e=(0,se.int)(e)).equals(0)?"":"."+Ie(e,9)}function Ie(e,t,r){var n=(e=(0,se.int)(e)).isNegative(),o=(e=n?e.negate():e).toString();if(null!=t)for(;o.length<t;)o="0"+o;return n?"-"+o:!0===(null==r?void 0:r.usePositiveSign)?"+"+o:o}s.ENCRYPTION_OFF="ENCRYPTION_OFF",s.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!ge(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},s.isObject=ge,s.validateQueryAndParameters=function(e,t,r){var n="",t=null!=t?t:{},r=null!=(r=null==r?void 0:r.skipAsserts)&&r;if("string"==typeof e?n=e:e instanceof String?n=e.toString():"object"==typeof e&&null!=e.text&&(n=e.text,t=null!=(e=e.parameters)?e:{}),!r){e=n;if(Oe(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!ge(r))throw e=null!=r.constructor?" "+r.constructor.name:"",new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(e," ").concat(JSON.stringify(r)))}return{validatedQuery:n,params:t}},s.assertObject=function(e,t){if(ge(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,me.stringify)(e))},s.assertString=Oe,s.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,me.stringify)(e));return e},s.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,ve.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,me.stringify)(e))},s.assertValidDate=function(e,t){if("[object Date]"!==Object.prototype.toString.call(e))throw new TypeError(t+" expected to be a standard JavaScript Date but was: "+(0,me.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,me.stringify)(e));return e},s.isString=we,s.equals=function e(t,r){var n,o;if(t===r)return!0;if(null===t||null===r)return!1;if("object"!=typeof t||"object"!=typeof r)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;try{for(var a=_e(i),s=a.next();!s.done;s=a.next()){var c=s.value;if(!e(t[c],r[c]))return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return!0},s.toNumber=function(e){return e instanceof ve.default?e.toNumber():"bigint"==typeof e?(0,ve.int)(e).toNumber():e},a=Y,ue=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ae=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ue(t,e,r);return ae(t,e),t},Object.defineProperty(a,"__esModule",{value:!0}),a.floorMod=a.floorDiv=a.assertValidZoneId=a.assertValidNanosecond=a.assertValidSecond=a.assertValidMinute=a.assertValidHour=a.assertValidDay=a.assertValidMonth=a.assertValidYear=a.timeZoneOffsetInSeconds=a.totalNanoseconds=a.newDate=a.toStandardDate=a.isoStringToStandardDate=a.dateToIsoString=a.timeZoneOffsetToIsoString=a.timeToIsoString=a.durationToIsoString=a.dateToEpochDay=a.localDateTimeToEpochSecond=a.localTimeToNanoOfDay=a.normalizeNanosecondsForDuration=a.normalizeSecondsForDuration=a.SECONDS_PER_DAY=a.DAYS_PER_400_YEAR_CYCLE=a.DAYS_0000_TO_1970=a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE=a.NANOS_PER_MILLISECOND=a.NANOS_PER_SECOND=a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE=a.MINUTES_PER_HOUR=a.NANOSECOND_OF_SECOND_RANGE=a.SECOND_OF_MINUTE_RANGE=a.MINUTE_OF_HOUR_RANGE=a.HOUR_OF_DAY_RANGE=a.DAY_OF_MONTH_RANGE=a.MONTH_OF_YEAR_RANGE=a.YEAR_RANGE=void 0,se=c(i),ce=t,le=s,Ee.prototype.contains=function(e){var t;return(0,se.isInt)(e)&&e instanceof se.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,se.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},Ee.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},c=Ee,a.YEAR_RANGE=new c(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new c(1,12),a.DAY_OF_MONTH_RANGE=new c(1,31),a.HOUR_OF_DAY_RANGE=new c(0,23),a.MINUTE_OF_HOUR_RANGE=new c(0,59),a.SECOND_OF_MINUTE_RANGE=new c(0,59),a.NANOSECOND_OF_SECOND_RANGE=new c(0,999999999),a.MINUTES_PER_HOUR=60,a.SECONDS_PER_MINUTE=60,a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE*a.MINUTES_PER_HOUR,a.NANOS_PER_SECOND=1e9,a.NANOS_PER_MILLISECOND=1e6,a.NANOS_PER_MINUTE=a.NANOS_PER_SECOND*a.SECONDS_PER_MINUTE,a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE*a.MINUTES_PER_HOUR,a.DAYS_0000_TO_1970=719528,a.DAYS_PER_400_YEAR_CYCLE=146097,a.SECONDS_PER_DAY=86400,a.normalizeSecondsForDuration=function(e,t){return(0,se.int)(e).add(je(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return Ce(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,se.int)(e),t=(0,se.int)(t),r=(0,se.int)(r),n=(0,se.int)(n),(e=(e=(e=e.multiply(a.NANOS_PER_HOUR)).add(t.multiply(a.NANOS_PER_MINUTE))).add(r.multiply(a.NANOS_PER_SECOND))).add(n)},a.localDateTimeToEpochSecond=function(e,t,r,n,o,i,u){return e=Pe(e,t,r),t=function(e,t,r){e=(0,se.int)(e),t=(0,se.int)(t),r=(0,se.int)(r);e=e.multiply(a.SECONDS_PER_HOUR);return(e=e.add(t.multiply(a.SECONDS_PER_MINUTE))).add(r)}(n,o,i),e.multiply(a.SECONDS_PER_DAY).add(t)},a.dateToEpochDay=Pe,a.durationToIsoString=function(e,t,r,n){return e=Ie(e),t=Ie(t),r=function(e,t){e=(0,se.int)(e),t=(0,se.int)(t);var r,n=e.isNegative(),o=t.greaterThan(0);e=n&&o?e.equals(-1)?"-0":e.add(1).toString():e.toString();o&&(r=Re((n?t.negate().add(2*a.NANOS_PER_SECOND):t.add(a.NANOS_PER_SECOND)).modulo(a.NANOS_PER_SECOND)));return null!=r?e+r:e}(r,n),"P".concat(e,"M").concat(t,"DT").concat(r,"S")},a.timeToIsoString=function(e,t,r,n){return e=Ie(e,2),t=Ie(t,2),r=Ie(r,2),n=Re(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,se.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=Ie((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=Ie(e.div(a.SECONDS_PER_MINUTE).modulo(a.MINUTES_PER_HOUR),2);return null!=(e=(e=e.modulo(a.SECONDS_PER_MINUTE)).equals(0)?null:Ie(e,2))?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},a.dateToIsoString=function(e,t,r){return e=function(e){e=(0,se.int)(e);if(e.isNegative()||e.greaterThan(9999))return Ie(e,6,{usePositiveSign:!0});return Ie(e,4)}(e),t=Ie(t,2),r=Ie(r,2),"".concat(e,"-").concat(t,"-").concat(r)},a.isoStringToStandardDate=function(e){return new Date(e)},a.toStandardDate=function(e){return new Date(e)},a.newDate=function(e){return new Date(e)},a.totalNanoseconds=function(e,t){return t=null!=t?t:0,e=e.getMilliseconds()*a.NANOS_PER_MILLISECOND,t instanceof se.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},a.timeZoneOffsetInSeconds=function(e){var t=e.getSeconds()>=e.getUTCSeconds()?e.getSeconds()-e.getUTCSeconds():e.getSeconds()-e.getUTCSeconds()+60;return 0===(e=e.getTimezoneOffset())?0+t:-1*e*a.SECONDS_PER_MINUTE+t},a.assertValidYear=function(e){return Te(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return Te(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return Te(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return Te(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return Te(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return Te(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return Te(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},fe=new Map,a.assertValidZoneId=function(t,r){var e=fe.get(r);if(!0!==e){if(!1===e)throw Se(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),fe.set(r,!0)}catch(e){throw fe.set(r,!1),Se(r,t)}}},a.floorDiv=je,a.floorMod=Ce;var Ae=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ke=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Ae(t,e,r);return ke(t,e),t},Me=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},l=(Object.defineProperty(u,"__esModule",{value:!0}),u.isDateTime=u.DateTime=u.isLocalDateTime=u.LocalDateTime=u.isDate=u.Date=u.isTime=u.Time=u.isLocalTime=u.LocalTime=u.isDuration=u.Duration=void 0,c(Y)),Ne=s,xe=t,De=c(i),c={value:!0,enumerable:!1,configurable:!1,writable:!1},Le="__isDuration__",Ue="__isLocalTime__",Fe="__isTime__",Be="__isDate__",We="__isLocalDateTime__",qe="__isDateTime__",f=(ze.prototype.toString=function(){return l.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},ze);function ze(e,t,r,n){this.months=(0,Ne.assertNumberOrInteger)(e,"Months"),this.days=(0,Ne.assertNumberOrInteger)(t,"Days"),(0,Ne.assertNumberOrInteger)(r,"Seconds"),(0,Ne.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=l.normalizeSecondsForDuration(r,n),this.nanoseconds=l.normalizeNanosecondsForDuration(n),Object.freeze(this)}u.Duration=f,Object.defineProperty(f.prototype,Le,c),u.isDuration=function(e){return Ze(e,Le)};Ve.fromStandardDate=function(e,t){Xe(e,t);t=l.totalNanoseconds(e,t);return new Ve(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof De.default?t.toInt():"bigint"==typeof t?(0,De.int)(t).toInt():t)},Ve.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};f=Ve;function Ve(e,t,r,n){this.hour=l.assertValidHour(e),this.minute=l.assertValidMinute(t),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),Object.freeze(this)}u.LocalTime=f,Object.defineProperty(f.prototype,Ue,c),u.isLocalTime=function(e){return Ze(e,Ue)};He.fromStandardDate=function(e,t){return Xe(e,t),new He(e.getHours(),e.getMinutes(),e.getSeconds(),(0,De.toNumber)(l.totalNanoseconds(e,t)),l.timeZoneOffsetInSeconds(e))},He.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+l.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};f=He;function He(e,t,r,n,o){this.hour=l.assertValidHour(e),this.minute=l.assertValidMinute(t),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,Ne.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}u.Time=f,Object.defineProperty(f.prototype,Fe,c),u.isTime=function(e){return Ze(e,Fe)};Ge.fromStandardDate=function(e){return Xe(e),new Ge(e.getFullYear(),e.getMonth()+1,e.getDate())},Ge.prototype.toStandardDate=function(){return l.isoStringToStandardDate(this.toString())},Ge.prototype.toString=function(){return l.dateToIsoString(this.year,this.month,this.day)};f=Ge;function Ge(e,t,r){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),Object.freeze(this)}u.Date=f,Object.defineProperty(f.prototype,Be,c),u.isDate=function(e){return Ze(e,Be)};Ye.fromStandardDate=function(e,t){return Xe(e,t),new Ye(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,De.toNumber)(l.totalNanoseconds(e,t)))},Ye.prototype.toStandardDate=function(){return l.isoStringToStandardDate(this.toString())},Ye.prototype.toString=function(){return Qe(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};f=Ye;function Ye(e,t,r,n,o,i,u){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(u),Object.freeze(this)}u.LocalDateTime=f,Object.defineProperty(f.prototype,We,c),u.isLocalDateTime=function(e){return Ze(e,We)};Ke.fromStandardDate=function(e,t){return Xe(e,t),new Ke(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,De.toNumber)(l.totalNanoseconds(e,t)),l.timeZoneOffsetInSeconds(e),null)},Ke.prototype.toStandardDate=function(){return l.toStandardDate(this._toUTC())},Ke.prototype.toString=function(){var e;return Qe(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?l.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},Ke.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=l.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,De.int)(e).multiply(1e3).add((0,De.int)(this.nanosecond).div(1e6)).toNumber()};f=Ke;function Ke(e,t,r,n,o,i,u,a,s){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(u);e=Me(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,xe.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(e," and id: ").concat(t));var o=[void 0,void 0];r&&((0,Ne.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Ne.assertString)(t,"Time zone ID"),l.assertValidZoneId("Time zone ID",t),o[1]=t);return o}(a,s),2),t=e[0],r=e[1];this.timeZoneOffsetSeconds=t,this.timeZoneId=null!=r?r:void 0,Object.freeze(this)}function Ze(e,t){return null!=e&&!0===e[t]}function Qe(e,t,r,n,o,i,u){return l.dateToIsoString(e,t,r)+"T"+l.timeToIsoString(n,o,i,u)}function Xe(e,t){(0,Ne.assertValidDate)(e,"Standard date"),null!=t&&(0,Ne.assertNumberOrInteger)(t,"Nanosecond")}u.DateTime=f,Object.defineProperty(f.prototype,qe,c),u.isDateTime=function(e){return Ze(e,qe)};var f={},Je=(Object.defineProperty(f,"__esModule",{value:!0}),f.isPathSegment=f.PathSegment=f.isPath=f.Path=f.isUnboundRelationship=f.UnboundRelationship=f.isRelationship=f.Relationship=f.isNode=f.Node=void 0,n),c={value:!0,enumerable:!1,configurable:!1,writable:!1},$e="__isNode__",et="__isRelationship__",tt="__isUnboundRelationship__",rt="__isPath__",nt="__isPathSegment__";function ot(e,t){return null!=e&&!0===e[t]}ut.prototype.toString=function(){for(var e="("+this.elementId,t=0;t<this.labels.length;t++)e+=":"+this.labels[t];var r=Object.keys(this.properties);if(0<r.length){e+=" {";for(t=0;t<r.length;t++)0<t&&(e+=","),e+=r[t]+":"+(0,Je.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var it=ut;function ut(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=pt(n,function(){return e.toString()})}f.Node=it,Object.defineProperty(it.prototype,$e,c),f.isNode=function(e){return ot(e,$e)};st.prototype.toString=function(){var e="("+this.startNodeElementId+")-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,Je.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var at=st;function st(e,t,r,n,o,i,u,a){this.identity=e,this.start=t,this.end=r,this.type=n,this.properties=o,this.elementId=pt(i,function(){return e.toString()}),this.startNodeElementId=pt(u,function(){return t.toString()}),this.endNodeElementId=pt(a,function(){return r.toString()})}f.Relationship=at,Object.defineProperty(at.prototype,et,c),f.isRelationship=function(e){return ot(e,et)};ct.prototype.bind=function(e,t){return new at(this.identity,e,t,this.type,this.properties,this.elementId)},ct.prototype.bindTo=function(e,t){return new at(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},ct.prototype.toString=function(){var e="-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,Je.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};it=ct;function ct(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=pt(n,function(){return e.toString()})}f.UnboundRelationship=it,Object.defineProperty(it.prototype,tt,c),f.isUnboundRelationship=function(e){return ot(e,tt)};function lt(e,t,r){this.start=e,this.relationship=t,this.end=r}f.PathSegment=lt,Object.defineProperty(lt.prototype,nt,c),f.isPathSegment=function(e){return ot(e,nt)};function ft(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function pt(e,t){return null==e?t():e}f.Path=ft,Object.defineProperty(ft.prototype,rt,c),f.isPath=function(e){return ot(e,rt)};var it={},dt=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ht=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bt=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yt=(Object.defineProperty(it,"__esModule",{value:!0}),t);function _t(e,t,r){var n;this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=r?r:(n={},e.forEach(function(e,t){n[e]=t}),n)}_t.prototype.forEach=function(e){var t,r;try{for(var n=ht(this.entries()),o=n.next();!o.done;o=n.next()){var i=bt(o.value,2),u=i[0];e(i[1],u,this)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},_t.prototype.map=function(e){var t,r,n=[];try{for(var o=ht(this.entries()),i=o.next();!i.done;i=o.next()){var u=bt(i.value,2),a=u[0],s=u[1];n.push(e(s,a,this))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},_t.prototype.entries=function(){var t;return dt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,[this.keys[t],this._fields[t]]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},_t.prototype.values=function(){var t;return dt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},_t.prototype[Symbol.iterator]=function(){var t;return dt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},_t.prototype.toObject=function(){var t,e,r={};try{for(var n=ht(this.entries()),o=n.next();!o.done;o=n.next()){var i=bt(o.value,2),u=i[0],a=i[1];r[u]=a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},_t.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,yt.newError)("This record has no field with key '".concat(e.toString(),"', available keys are: [")+this.keys.toString()+"].")}else t=e;if(t>this._fields.length-1||t<0)throw(0,yt.newError)("This record has no field with index '"+t.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[t]},_t.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},it.default=_t;var c={},vt=(Object.defineProperty(c,"__esModule",{value:!0}),c.isPoint=c.Point=void 0,s),mt="__isPoint__",p=(gt.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(Ot(this.srid),", x=").concat(Ot(this.x),", y=").concat(Ot(this.y),"}"):"Point{srid=".concat(Ot(this.srid),", x=").concat(Ot(this.x),", y=").concat(Ot(this.y),", z=").concat(Ot(this.z),"}")},gt);function gt(e,t,r,n){this.srid=(0,vt.assertNumberOrInteger)(e,"SRID"),this.x=(0,vt.assertNumber)(t,"X coordinate"),this.y=(0,vt.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,vt.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function Ot(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}c.Point=p,Object.defineProperty(p.prototype,mt,{value:!0,enumerable:!1,configurable:!1,writable:!1}),c.isPoint=function(e){return null!=e&&!0===e[mt]};var p={},h={},b={},y=(Object.defineProperty(b,"__esModule",{value:!0}),b.FailedObserver=b.CompletedObserver=void 0,wt.prototype.subscribe=function(e){Pt(e,e.onKeys,[]),Pt(e,e.onCompleted,{})},wt.prototype.cancel=function(){},wt.prototype.pause=function(){},wt.prototype.resume=function(){},wt.prototype.prepareToHandleSingleResponse=function(){},wt.prototype.markCompleted=function(){},wt.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},wt);function wt(){}function Et(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function Pt(e,t,r){null!=t&&t.bind(e)(r)}b.CompletedObserver=y,Et.prototype.subscribe=function(e){Pt(e,e.onError,this._error),this._observers.push(e)},Et.prototype.onError=function(t){Pt(this,this._beforeError,t),this._observers.forEach(function(e){return Pt(e,e.onError,t)})},Et.prototype.cancel=function(){},Et.prototype.pause=function(){},Et.prototype.resume=function(){},Et.prototype.markCompleted=function(){},Et.prototype.prepareToHandleSingleResponse=function(){},b.FailedObserver=Et;var y={},St=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Tt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&St(t,e,r);return Tt(t,e),t},jt=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ct=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Rt=(Object.defineProperty(y,"__esModule",{value:!0}),y.Bookmarks=void 0,_(s)),_=(It.empty=function(){return At},It.prototype.isEmpty=function(){return 0===this._values.length},It.prototype.values=function(){return this._values},It.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},It.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},It);function It(e){this._values=function(e){if(null==e||""===e)return[];if(Rt.isString(e))return[e];if(Array.isArray(e)){for(var t=new Set,r=function r(e){return e.reduce(function(e,t){return Array.isArray(t)?e.concat(r(t)):e.concat(t)},[])}(e),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!Rt.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return Ct([],jt(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var At=new(y.Bookmarks=_)(null);var kt,Mt,_={},Nt=(Object.defineProperty(_,"__esModule",{value:!0}),_.TELEMETRY_APIS=_.BOLT_PROTOCOL_V5_7=_.BOLT_PROTOCOL_V5_6=_.BOLT_PROTOCOL_V5_5=_.BOLT_PROTOCOL_V5_4=_.BOLT_PROTOCOL_V5_3=_.BOLT_PROTOCOL_V5_2=_.BOLT_PROTOCOL_V5_1=_.BOLT_PROTOCOL_V5_0=_.BOLT_PROTOCOL_V4_4=_.BOLT_PROTOCOL_V4_3=_.BOLT_PROTOCOL_V4_2=_.BOLT_PROTOCOL_V4_1=_.BOLT_PROTOCOL_V4_0=_.BOLT_PROTOCOL_V3=_.BOLT_PROTOCOL_V2=_.BOLT_PROTOCOL_V1=_.DEFAULT_POOL_MAX_SIZE=_.DEFAULT_POOL_ACQUISITION_TIMEOUT=_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=_.ACCESS_MODE_WRITE=_.ACCESS_MODE_READ=_.FETCH_ALL=void 0,_.FETCH_ALL=-1,_.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,_.DEFAULT_POOL_MAX_SIZE=100,_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,_.ACCESS_MODE_READ="READ",_.ACCESS_MODE_WRITE="WRITE",_.BOLT_PROTOCOL_V1=1,_.BOLT_PROTOCOL_V2=2,_.BOLT_PROTOCOL_V3=3,_.BOLT_PROTOCOL_V4_0=4,_.BOLT_PROTOCOL_V4_1=4.1,_.BOLT_PROTOCOL_V4_2=4.2,_.BOLT_PROTOCOL_V4_3=4.3,_.BOLT_PROTOCOL_V4_4=4.4,_.BOLT_PROTOCOL_V5_0=5,_.BOLT_PROTOCOL_V5_1=5.1,_.BOLT_PROTOCOL_V5_2=5.2,_.BOLT_PROTOCOL_V5_3=5.3,_.BOLT_PROTOCOL_V5_4=5.4,_.BOLT_PROTOCOL_V5_5=5.5,_.BOLT_PROTOCOL_V5_6=5.6,_.BOLT_PROTOCOL_V5_7=5.7,_.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),v={},m=r&&r.__extends||(kt=function(e,t){return(kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}kt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),xt=(Object.defineProperty(v,"__esModule",{value:!0}),v.Logger=void 0,t),Dt="error",Lt="warn",Ut="info",Ft="debug",Bt=((g={})[Dt]=0,g[Lt]=1,g[Ut]=2,g[Ft]=3,g),g=(Wt.create=function(e){return null!=(null==e?void 0:e.logging)?new Wt(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=Bt[e];if(null!=t||0===t)return e;throw(0,xt.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(Bt).toString()))}(e=e.logging),function(e){if(null!=(null==e?void 0:e.logger)){var t=e.logger;if(null!=t&&"function"==typeof t)return t}throw(0,xt.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},Wt.noOp=function(){return zt},Wt.prototype.isErrorEnabled=function(){return Vt(this._level,Dt)},Wt.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(Dt,e)},Wt.prototype.isWarnEnabled=function(){return Vt(this._level,Lt)},Wt.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(Lt,e)},Wt.prototype.isInfoEnabled=function(){return Vt(this._level,Ut)},Wt.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(Ut,e)},Wt.prototype.isDebugEnabled=function(){return Vt(this._level,Ft)},Wt.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(Ft,e)},Wt);function Wt(e,t){this._level=e,this._loggerFunction=t}function qt(){return Mt.call(this,Ut,function(e,t){})||this}v.Logger=g,m(qt,Mt=g),qt.prototype.isErrorEnabled=function(){return!1},qt.prototype.error=function(e){},qt.prototype.isWarnEnabled=function(){return!1},qt.prototype.warn=function(e){},qt.prototype.isInfoEnabled=function(){return!1},qt.prototype.info=function(e){},qt.prototype.isDebugEnabled=function(){return!1},qt.prototype.debug=function(e){};var zt=new qt;function Vt(e,t){return Bt[e]>=Bt[t]}var Ht,m=r&&r.__extends||(Ht=function(e,t){return(Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ht(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Gt=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Yt=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Kt=(Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.EMPTY_CONNECTION_HOLDER=Nt.ReadOnlyConnectionHolder=Nt.ConnectionHolder=void 0,t),Zt=s,Qt=_,Xt=y,Jt=v,g=($t.prototype.mode=function(){return this._mode},$t.prototype.database=function(){return this._database},$t.prototype.setDatabase=function(e){this._database=e},$t.prototype.bookmarks=function(){return this._bookmarks},$t.prototype.connectionProvider=function(){return this._connectionProvider},$t.prototype.referenceCount=function(){return this._referenceCount},$t.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},$t.prototype._createConnectionPromise=function(o){return Gt(this,void 0,void 0,function(){var t,r,n;return Yt(this,function(e){switch(e.label){case 0:return r=(t=o).acquireConnection,n={accessMode:this._mode,database:this._database},[4,this._getBookmarks()];case 1:return[4,r.apply(t,[(n.bookmarks=e.sent(),n.impersonatedUser=this._impersonatedUser,n.onDatabaseNameResolved=this._onDatabaseNameResolved,n.auth=this._auth,n)])];case 2:return[2,e.sent()]}})})},$t.prototype._getBookmarks=function(){return Gt(this,void 0,void 0,function(){return Yt(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},$t.prototype.getConnection=function(){return this._connectionPromise},$t.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},$t.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},$t.prototype.log=function(){return this._log},$t.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(or).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},$t.prototype._logError=function(e){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(e,". Stacktrace: ").concat(e.stack)),null},$t);function $t(e){var t=e.mode,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,a=e.getConnectionAcquistionBookmarks,s=e.auth,e=e.log;this._mode=null!=t?t:Qt.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,Zt.assertString)(r,"database"):"",this._bookmarks=null!=n?n:Xt.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=s,this._log=e,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=null!=a?a:function(){return Promise.resolve(Xt.Bookmarks.empty())}}Nt.ConnectionHolder=g;m(rr,er=g),rr.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},rr.prototype.getConnection=function(){return this._connectionHolder.getConnection()},rr.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},rr.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var er,tr,O=rr;function rr(e){var t=er.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider(),log:e.log()})||this;return t._connectionHolder=e,t}function nr(){return tr.call(this,{log:Jt.Logger.create({})})||this}Nt.ReadOnlyConnectionHolder=O,Nt.default=O,m(nr,tr=g),nr.prototype.mode=function(){},nr.prototype.database=function(){},nr.prototype.initializeConnection=function(){return!0},nr.prototype.getConnection=function(){return Gt(this,void 0,void 0,function(){return Yt(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,Kt.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},nr.prototype.releaseConnection=function(){return Gt(this,void 0,void 0,function(){return Yt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},nr.prototype.close=function(){return Gt(this,void 0,void 0,function(){return Yt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};O=new nr;function or(e){return null}Nt.EMPTY_CONNECTION_HOLDER=O;var m={},ir=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ur=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),g=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ir(t,e,r);return ur(t,e),t},ar=(Object.defineProperty(m,"__esModule",{value:!0}),m.TxConfig=void 0,g(s)),sr=t,cr=i,O=(lr.empty=function(){return fr},lr.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},lr);function lr(e,t){var r;null!=(r=e)&&ar.assertObject(r,"Transaction config"),this.timeout=function(e,t){if(ar.isObject(e)&&null!=e.timeout){ar.assertNumberOrInteger(e.timeout,"Transaction timeout"),!function(e){return"number"==typeof e.timeout&&!Number.isInteger(e.timeout)}(e)||!0!==(null==t?void 0:t.isInfoEnabled())||null==t||t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up."));t=(0,cr.int)(e.timeout,{ceilFloat:!0});if(t.isNegative())throw(0,sr.newError)("Transaction timeout should not be negative");return t}return null}(e,t),this.metadata=function(e){if(ar.isObject(e)&&null!=e.metadata){e=e.metadata;if(ar.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var fr=new(m.TxConfig=O)({});var g={},pr=r&&r.__assign||function(){return(pr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},dr=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},hr=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},br=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yr=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},_r=(Object.defineProperty(g,"__esModule",{value:!0}),g.TransactionExecutor=void 0,t),vr=_;function mr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,yr([e,t],br(r),!1))}function gr(e){return clearTimeout(e)}function Or(e,t,r,n,o){void 0===o&&(o={setTimeout:mr,clearTimeout:gr}),this._maxRetryTimeMs=wr(e,3e4),this._initialRetryDelayMs=wr(t,1e3),this._multiplier=wr(r,2),this._jitterFactor=wr(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=vr.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function wr(e,t){return null!=e?e:t}Or.prototype.execute=function(n,o,i){var u=this,a={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){a.apiTransactionConfig=void 0}}};return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i,a).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i,a)})},Or.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},Or.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,_r.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=c._computeDelayWithJitter(u),n=c._setTimeout(function(){c._inFlightTimeoutIds=c._inFlightTimeoutIds.filter(function(e){return e!==n}),c._executeTransactionInsidePromise(o,i,e,t,a,s).catch(t)},r);c._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*c._multiplier;return c._retryTransactionPromise(o,i,e,r,t,a,s)})},Or.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return dr(this,void 0,void 0,function(){var t,r,n,o,i=this;return hr(this,function(e){switch(e.label){case 0:return(e.trys.push([0,4,,5]),r=u(null!=(null==f?void 0:f.apiTransactionConfig)?pr({},null==f?void 0:f.apiTransactionConfig):void 0),this.pipelineBegin)?(n=r,[3,3]):[3,1];case 1:return[4,r];case 2:n=e.sent(),e.label=3;case 3:return t=n,[3,5];case 4:return o=e.sent(),c(o),[2];case 5:return o=(null!=l?l:function(e){return e})(t),this._safeExecuteTransactionWork(o,a).then(function(e){return i._handleTransactionWorkSuccess(e,t,s,c)}).catch(function(e){return i._handleTransactionWorkFailure(e,t,c)}),[2]}})})},Or.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},Or.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},Or.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},Or.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},Or.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,_r.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,_r.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,_r.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,_r.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},g.TransactionExecutor=Or;var O={},Er=r&&r.__assign||function(){return(Er=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Pr=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Sr=(Object.defineProperty(O,"__esModule",{value:!0}),O.Url=O.formatIPv6Address=O.formatIPv4Address=O.defaultPortForScheme=O.parseDatabaseUrl=void 0,s),Tr=7687,jr=7474,Cr=7473,Rr=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Ir(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function Ar(e){var t="["===e.charAt(0),r="]"===e.charAt(e.length-1);if(t||r){if(t&&r)return e;throw new Error("Illegal IPv6 address ".concat(e))}return"[".concat(e,"]")}function kr(e){return"http"===e?jr:"https"===e?Cr:Tr}O.Url=Rr,O.parseDatabaseUrl=function(e){(0,Sr.assertString)(e,"URL");var t,r=function(e){function u(e,t){t=e.indexOf(t);return 0<=t?[e.substring(0,t),e[t],e.substring(t+1)]:[e,"",""]}function t(e){var t,r={},n=((t="@")===(t=0<=(t=(o=e).lastIndexOf(t))?[o.substring(0,t),o[t],o.substring(t+1)]:["","",o])[1]&&(r.userInfo=decodeURIComponent(t[0]),e=t[2]),Pr((o="]",n=u(n=e,i="["),[(i=u(n[2],o))[0],i[2]]),2)),o=n[0],i=n[1];return""!==o?(r.host=o,t=u(i,":")):(t=u(e,":"),r.host=t[0]),":"===t[1]&&(r.port=t[2]),r}var r,n={};":"===(r=u(e,":"))[1]&&(n.scheme=decodeURIComponent(r[0]),e=r[2]);"#"===(r=u(e,"#"))[1]&&(n.fragment=decodeURIComponent(r[2]),e=r[0]);"?"===(r=u(e,"?"))[1]&&(n.query=r[2],e=r[0]);e.startsWith("//")?(r=u(e.substr(2),"/"),(n=Er(Er({},n),t(r[0]))).path=r[1]+r[2]):n.path=e;return n}((n=(n=(n=e).trim()).includes("://")?{schemeMissing:!1,url:n}:{schemeMissing:!0,url:"none://".concat(n)}).url),n=n.schemeMissing?null:function(e){if(null==e)return null;":"===(e=e.trim()).charAt(e.length-1)&&(e=e.substring(0,e.length-1));return e}(r.scheme),o=function(e){if(null!=e)return e.trim();throw new Error("Unable to extract host from null or undefined URL")}(r.host),i=function(e){if(""!==e&&null!=e)return e.includes(":")?Ar(e):e;throw new Error("Illegal host ".concat(e))}(o),u=function(e,t){e="string"==typeof e?parseInt(e,10):e;return null==e||isNaN(e)?kr(t):e}(r.port,n),i="".concat(i,":").concat(u),r=function(e,r){var e=null!=e?function(e){"?"===(null==(e=(null!=e?e:"").trim())?void 0:e.charAt(0))&&(e=e.substring(1,e.length));return e}(e):null,n={};null!=e&&e.split("&").forEach(function(e){e=e.split("=");if(2!==e.length)throw new Error("Invalid parameters: '".concat(e.toString(),"' in URL '").concat(r,"'."));var t=Ir(e[0],"key",r),e=Ir(e[1],"value",r);if(void 0!==n[t])throw new Error("Duplicated query parameters with key '".concat(t,"' in URL '").concat(r,"'"));n[t]=e});return n}(null!=(t=r.query)?t:"string"==typeof(t=r.resourceName)?Pr(t.split("?"),2)[1]:null,e);return new Rr(n,o,u,i,r)},O.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},O.formatIPv6Address=function(e,t){return e=Ar(e),"".concat(e,":").concat(t)},O.defaultPortForScheme=kr;var w={},Mr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Nr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xr=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Mr(t,e,r);return Nr(t,e),t},Dr=(Object.defineProperty(w,"__esModule",{value:!0}),w.ServerAddress=void 0,s),Lr=xr(O);function Ur(e,t,r,n){this._host=(0,Dr.assertString)(e,"host"),this._resolved=null!=t?(0,Dr.assertString)(t,"resolved"):null,this._port=(0,Dr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Ur.prototype.host=function(){return this._host},Ur.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Ur.prototype.port=function(){return this._port},Ur.prototype.resolveWith=function(e){return new Ur(this._host,e,this._port,this._hostPort)},Ur.prototype.asHostPort=function(){return this._hostPort},Ur.prototype.asKey=function(){return this._hostPort},Ur.prototype.toString=function(){return this._stringValue},Ur.fromUrl=function(e){e=Lr.parseDatabaseUrl(e);return new Ur(e.host,null,e.port,e.hostAndPort)},w.ServerAddress=Ur;var xr={},E={};function Fr(){}Object.defineProperty(E,"__esModule",{value:!0}),Fr.prototype.resolve=function(){throw new Error("Abstract function")},Fr.prototype._resolveToItself=function(e){return Promise.resolve([e])},E.default=Fr;var P={},Br=(Object.defineProperty(P,"__esModule",{value:!0}),w);function Wr(e){return Promise.resolve([e])}function qr(e){this._resolverFunction=null!=e?e:Wr}qr.prototype.resolve=function(t){var r=this;return new Promise(function(e){return e(r._resolverFunction(t.asHostPort()))}).then(function(e){if(Array.isArray(e))return e.map(function(e){return Br.ServerAddress.fromUrl(e)});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: ".concat(e))})},P.default=qr;var zr,S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E=(Object.defineProperty(xr,"__esModule",{value:!0}),xr.ConfiguredCustomResolver=xr.BaseHostNameResolver=void 0,S(E)),E=(xr.BaseHostNameResolver=E.default,S(P)),S=(xr.ConfiguredCustomResolver=E.default,{}),E={};Object.defineProperty(E,"__esModule",{value:!0}),E.fromVersion=void 0,E.fromVersion=function(e,t){var r=null!=(t=(t=void 0===t?function(){return{get userAgent(){}}}:t)()).userAgent?t.userAgent.split("(")[1].split(")")[0]:void 0,t=t.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:t}},j=S,zr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),T=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||zr(t,e,r)},Object.defineProperty(j,"__esModule",{value:!0}),T(E,j);var T={},E={},j=(Object.defineProperty(E,"__esModule",{value:!0}),E.DEFAULT_ACQUISITION_TIMEOUT=E.DEFAULT_MAX_SIZE=void 0,E.DEFAULT_MAX_SIZE=100,E.DEFAULT_ACQUISITION_TIMEOUT=6e4,Vr.defaultConfig=function(){return new Vr(100,6e4)},Vr.fromDriverConfig=function(e){return new Vr(Gr(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,Gr(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},Vr);function Vr(e,t){this.maxSize=Hr(e,100),this.acquisitionTimeout=Hr(t,6e4)}function Hr(e,t){return Gr(e)?e:t}function Gr(e){return 0===e||null!=e}E.default=j;var j={},Yr=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Kr=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Zr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qr=(Object.defineProperty(j,"__esModule",{value:!0}),Zr(E)),Xr=t,Jr=v,Zr=($r.prototype.acquire=function(a,s,c){return Yr(this,void 0,void 0,function(){var o,i,u=this;return Kr(this,function(e){switch(e.label){case 0:return o=s.asKey(),i=this._acquireRequests,null==i[o]&&(i[o]=[]),[4,new Promise(function(e,t){var r=setTimeout(function(){var e,t=i[o];null!=t&&(i[o]=t.filter(function(e){return e!==n})),n.isCompleted()||(t=u.activeResourceCount(s),e=u.has(s)?u._pools[o].length:0,n.reject((0,Xr.newError)("Connection acquisition timed out in ".concat(u._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},u._acquisitionTimeout),n=("object"==typeof r&&r.unref(),new rn(o,a,c,e,t,r,u._log));i[o].push(n),u._processPendingAcquireRequests(s)})];case 1:return[2,e.sent()]}})})},$r.prototype.purge=function(t){return Yr(this,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t.asKey())];case 1:return[2,e.sent()]}})})},$r.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},$r.prototype.close=function(){return Yr(this,void 0,void 0,function(){var r=this;return Kr(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(t){return Yr(r,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},$r.prototype.keepAll=function(o){return Yr(this,void 0,void 0,function(){var t,r,n=this;return Kr(this,function(e){switch(e.label){case 0:return t=o.map(function(e){return e.asKey()}),r=Object.keys(this._pools),r=r.filter(function(e){return!t.includes(e)}),[4,Promise.all(r.map(function(t){return Yr(n,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},$r.prototype.has=function(e){return e.asKey()in this._pools},$r.prototype.activeResourceCount=function(e){return null!=(e=this._activeResourceCounts[e.asKey()])?e:0},$r.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return null==t&&(t=new sn,this._pools[e]=t,this._pendingCreates[e]=0),t},$r.prototype._acquire=function(c,l,f){return Yr(this,void 0,void 0,function(){var t,n,r,o,i,u,a,s=this;return Kr(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,Xr.newError)("Pool is closed, it is no more able to serve requests.");if(t=l.asKey(),n=this._getOrInitializePoolFor(t),f)return[3,10];e.label=1;case 1:if(!(0<n.length))return[3,10];if(null==(r=n.pop()))return[3,1];en(t,this._activeResourceCounts),null!=this._removeIdleObserver&&this._removeIdleObserver(r),o=!1,e.label=2;case 2:return e.trys.push([2,4,,6]),[4,this._validateOnAcquire(c,r)];case 3:return o=e.sent(),[3,6];case 4:return i=e.sent(),tn(t,this._activeResourceCounts),n.removeInUse(r),[4,this._destroy(r)];case 5:throw e.sent(),i;case 6:return o?(this._log.isDebugEnabled()&&this._log.debug("".concat(r," acquired from the pool ").concat(t)),[2,{resource:r,pool:n}]):[3,7];case 7:return tn(t,this._activeResourceCounts),n.removeInUse(r),[4,this._destroy(r)];case 8:e.sent(),e.label=9;case 9:return[3,1];case 10:if(0<this._maxSize&&this.activeResourceCount(l)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:n}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=11;case 11:return(e.trys.push([11,,15,16]),this.activeResourceCount(l)+n.length>=this._maxSize&&f)?null==(a=n.pop())?[3,13]:(null!=this._removeIdleObserver&&this._removeIdleObserver(a),n.removeInUse(a),[4,this._destroy(a)]):[3,13];case 12:e.sent(),e.label=13;case 13:return[4,this._create(c,l,function(t,r){return Yr(s,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,this._release(t,r,n)];case 1:return[2,e.sent()]}})})})];case 14:return u=e.sent(),n.pushInUse(u),en(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(u," created for the pool ").concat(t)),[3,16];case 15:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 16:return[2,{resource:u,pool:n}]}})})},$r.prototype._release=function(n,o,i){return Yr(this,void 0,void 0,function(){var t,r=this;return Kr(this,function(e){switch(e.label){case 0:t=n.asKey(),e.label=1;case 1:return(e.trys.push([1,,9,10]),i.isActive())?[4,this._validateOnRelease(o)]:[3,6];case 2:return e.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(o," destroyed and can't be released to the pool ").concat(t," because it is not functional")),i.removeInUse(o),[4,this._destroy(o)]);case 3:return e.sent(),[3,5];case 4:null!=this._installIdleObserver&&this._installIdleObserver(o,{onError:function(e){r._log.debug("Idle connection ".concat(o," destroyed because of error: ").concat(e));e=r._pools[t];null!=e&&(r._pools[t]=e.filter(function(e){return e!==o}),e.removeInUse(o)),r._destroy(o).catch(function(){})}}),i.push(o),this._log.isDebugEnabled()&&this._log.debug("".concat(o," released to the pool ").concat(t)),e.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(o," destroyed and can't be released to the pool ").concat(t," because pool has been purged")),i.removeInUse(o),[4,this._destroy(o)];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:return tn(t,this._activeResourceCounts),this._processPendingAcquireRequests(n),[7];case 10:return[2]}})})},$r.prototype._purgeKey=function(o){return Yr(this,void 0,void 0,function(){var t,r,n;return Kr(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],null==t)return[3,2];for(;0<t.length;)null!=(n=t.pop())&&(null!=this._removeIdleObserver&&this._removeIdleObserver(n),r.push(this._destroy(n)));return t.close(),delete this._pools[o],[4,Promise.all(r)];case 1:e.sent(),e.label=2;case 2:return[2]}})})},$r.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];null!=e&&(null!=(n=e.shift())?this._acquire(n.context,r,n.requireNew).catch(function(e){return n.reject(e),{resource:null,pool:null}}).then(function(e){var t=e.resource,e=e.pool;null!=t&&null!=e?n.isCompleted()?o._release(r,t,e).catch(function(e){o._log.isDebugEnabled()&&o._log.debug("".concat(t," could not be release back to the pool. Cause: ").concat(e))}):n.resolve(t):n.isCompleted()||(null==o._acquireRequests[i]&&(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}).catch(function(e){return n.reject(e)}):delete this._acquireRequests[i])},$r);function $r(e){var t=e.create,t=void 0===t?function(e,t,r){return Yr(s,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,Promise.reject(new Error("Not implemented"))];case 1:return[2,e.sent()]}})})}:t,r=e.destroy,r=void 0===r?function(e){return Yr(s,void 0,void 0,function(){return Kr(this,function(e){switch(e.label){case 0:return[4,Promise.resolve()];case 1:return[2,e.sent()]}})})}:r,n=e.validateOnAcquire,n=void 0===n?function(e,t){return!0}:n,o=e.validateOnRelease,o=void 0===o?function(e){return!0}:o,i=e.installIdleObserver,i=void 0===i?function(e,t){}:i,u=e.removeIdleObserver,u=void 0===u?function(e){}:u,a=e.config,a=void 0===a?Qr.default.defaultConfig():a,e=e.log,e=void 0===e?Jr.Logger.noOp():e,s=this;this._create=t,this._destroy=r,this._validateOnAcquire=n,this._validateOnRelease=o,this._installIdleObserver=i,this._removeIdleObserver=u,this._maxSize=a.maxSize,this._acquisitionTimeout=a.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function en(e,t){var r=null!=(r=t[e])?r:0;t[e]=r+1}function tn(e,t){var r=(null!=(r=t[e])?r:0)-1;0<r?t[e]=r:delete t[e]}Object.defineProperty(nn.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"requireNew",{get:function(){var e;return null!=(e=this._config.requireNew)&&e},enumerable:!1,configurable:!0}),nn.prototype.isCompleted=function(){return this._completed},nn.prototype.resolve=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(e," acquired from the pool ").concat(this._key)),this._resolve(e))},nn.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var rn=nn;function nn(e,t,r,n,o,i,u){this._key=e,this._context=t,this._resolve=n,this._reject=o,this._timeoutId=i,this._log=u,this._completed=!1,this._config=null!=r?r:{}}cn.prototype.isActive=function(){return this._active},cn.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},cn.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},cn.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(cn.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),cn.prototype.pop=function(){var e=this._elements.pop();return null!=e&&this._elementsInUse.add(e),e},cn.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},cn.prototype.pushInUse=function(e){this._elementsInUse.add(e)},cn.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var on,un,an,sn=cn;function cn(){this._active=!0,this._elements=[],this._elementsInUse=new Set}j.default=Zr,Zr=T,on=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),un=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pn=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&on(t,e,r);return un(t,e),t},C=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.DEFAULT_MAX_SIZE=Zr.DEFAULT_ACQUISITION_TIMEOUT=Zr.PoolConfig=Zr.Pool=void 0,an=pn(E),Zr.PoolConfig=an.default,Object.defineProperty(Zr,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return an.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(Zr,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return an.DEFAULT_MAX_SIZE}}),pn=C(j),Zr.Pool=pn.default,Zr.default=pn.default;var ln=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),fn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),E=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ln(t,e,r);return fn(t,e),t},C=(Object.defineProperty(h,"__esModule",{value:!0}),h.pool=h.boltAgent=h.objectUtil=h.resolver=h.serverAddress=h.urlUtil=h.logger=h.transactionExecutor=h.txConfig=h.connectionHolder=h.constants=h.bookmarks=h.observer=h.temporalUtil=h.util=void 0,E(s)),j=(h.util=C,E(Y)),Zr=(h.temporalUtil=j,E(b)),pn=(h.observer=Zr,E(y)),C=(h.bookmarks=pn,E(_)),Y=(h.constants=C,E(Nt)),j=(h.connectionHolder=Y,E(m)),Zr=(h.txConfig=j,E(g)),pn=(h.transactionExecutor=Zr,E(v)),C=(h.logger=pn,E(O)),Y=(h.urlUtil=C,E(w)),j=(h.serverAddress=Y,E(xr)),Zr=(h.resolver=j,E(o)),pn=(h.objectUtil=Zr,E(S)),O=(h.boltAgent=pn,E(T)),C=(h.pool=O,{}),dn=r&&r.__assign||function(){return(dn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},hn=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),bn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),w=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&hn(t,e,r);return bn(t,e),t},yn=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},_n=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},vn=(Object.defineProperty(C,"__esModule",{value:!0}),C.buildNotificationsFromMetadata=C.buildGqlStatusObjectFromMetadata=C.polyfillNotification=C.polyfillGqlStatusObject=C.GqlStatusObject=C.Notification=C.notificationClassification=C.notificationCategory=C.notificationSeverityLevel=void 0,w(n)),mn=h,gn=V,On={WARNING:{gql_status:"01N42",status_description:"warn: unknown warning"},NO_DATA:{gql_status:"02N42",status_description:"note: no data - unknown subcondition"},INFORMATION:{gql_status:"03N42",status_description:"info: unknown notification"},ERROR:{gql_status:"50N42",status_description:"error: general processing exception - unexpected error"}},wn={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},En=(C.notificationSeverityLevel=wn,Object.freeze(wn),Object.values(wn)),Y={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",SCHEMA:"SCHEMA",UNKNOWN:"UNKNOWN"},Pn=(C.notificationCategory=Y,Object.freeze(Y),Object.values(Y)),Sn=Y,Tn=(C.notificationClassification=Sn,function(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=Nn(e.position),this.severityLevel=xn(e.severity),this.rawSeverityLevel=e.severity,this.category=Dn(e.category),this.rawCategory=e.category}),jn=(C.Notification=Tn,Object.defineProperty(Cn.prototype,"diagnosticRecordAsJsonString",{get:function(){return vn.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),Cn);function Cn(e){var t;this.gqlStatus=e.gql_status,this.statusDescription=e.status_description,this.diagnosticRecord=null!=(t=e.diagnostic_record)?t:{},this.position=null!=this.diagnosticRecord._position?Nn(this.diagnosticRecord._position):void 0,this.severity=xn(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=Dn(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=null!=e.neo4j_code,Object.freeze(this)}function Rn(e){var t;if(null!=e.neo4j_code)return new Tn({code:e.neo4j_code,title:e.title,description:e.description,severity:null==(t=e.diagnostic_record)?void 0:t._severity,category:null==(t=e.diagnostic_record)?void 0:t._classification,position:null==(t=e.diagnostic_record)?void 0:t._position})}function In(e){var t=e.severity===wn.WARNING?On.WARNING:On.INFORMATION,r={gql_status:t.gql_status,status_description:null!=(r=e.description)?r:t.status_description,neo4j_code:e.code,title:e.title,diagnostic_record:dn({},gn.rawPolyfilledDiagnosticRecord)};return null!=e.severity&&(r.diagnostic_record._severity=e.severity),null!=e.category&&(r.diagnostic_record._classification=e.category),null!=e.position&&(r.diagnostic_record._position=e.position),new jn(r)}C.GqlStatusObject=jn,C.polyfillNotification=Rn,C.polyfillGqlStatusObject=In;var An={SUCCESS:new jn({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:gn.rawPolyfilledDiagnosticRecord}),NO_DATA:new jn({gql_status:"02000",status_description:"note: no data",diagnostic_record:gn.rawPolyfilledDiagnosticRecord}),NO_DATA_UNKNOWN_SUBCONDITION:new jn(dn(dn({},On.NO_DATA),{diagnostic_record:gn.rawPolyfilledDiagnosticRecord})),OMITTED_RESULT:new jn({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:gn.rawPolyfilledDiagnosticRecord})};Object.freeze(An),C.buildGqlStatusObjectFromMetadata=function(e){if(null!=e.statuses)return e.statuses.map(function(e){return new jn(e)});var t=!0===(null==(t=e.stream_summary)?void 0:t.have_records_streamed)?An.SUCCESS:!1===(null==t?void 0:t.has_keys)?An.OMITTED_RESULT:!0===(null==t?void 0:t.pulled)?An.NO_DATA:An.NO_DATA_UNKNOWN_SUBCONDITION;return _n([t],yn(null!=(e=null==(t=e.notifications)?void 0:t.map(In))?e:[]),!1).sort(function(e,t){return Mn(e)-Mn(t)})};var kn=Object.freeze({"02":0,"01":1,"00":2});function Mn(e){var e=null==(e=e.gqlStatus)?void 0:e.slice(0,2);return null!=(e=kn[e])?e:9999}function Nn(e){return null==e?{}:{offset:mn.util.toNumber(e.offset),line:mn.util.toNumber(e.line),column:mn.util.toNumber(e.column)}}function xn(e){return En.includes(e)?e:wn.UNKNOWN}function Dn(e){return Pn.includes(e)?e:Sn.UNKNOWN}C.buildNotificationsFromMetadata=function(e){return null!=e.notifications?e.notifications.map(function(e){return new Tn(e)}):null!=e.statuses?e.statuses.map(Rn).filter(function(e){return null!=e}):[]},C.default=Tn,Object.defineProperty(p,"__esModule",{value:!0}),p.Stats=p.QueryStatistics=p.ProfiledPlan=p.Plan=p.ServerInfo=p.queryType=void 0;var Ln=h,Un=C,xr=(Fn.prototype.hasPlan=function(){return this.plan instanceof Bn},Fn.prototype.hasProfile=function(){return this.profile instanceof Wn},Fn);function Fn(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new zn(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new Bn(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new Wn(r.profile),this.notifications=(0,Un.buildNotificationsFromMetadata)(r),this.gqlStatusObjects=(0,Un.buildGqlStatusObjectFromMetadata)(r),this.server=new Hn(r.server,n),this.resultConsumedAfter=r.result_consumed_after,this.resultAvailableAfter=r.result_available_after,this.database={name:null!=(e=r.db)?e:null}}var Bn=function t(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.children=null!=e.children?e.children.map(function(e){return new t(e)}):[]},Wn=(p.Plan=Bn,qn.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},qn);function qn(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=Gn("dbHits",e),this.rows=Gn("rows",e),this.pageCacheMisses=Gn("pageCacheMisses",e),this.pageCacheHits=Gn("pageCacheHits",e),this.pageCacheHitRatio=Gn("pageCacheHitRatio",e),this.time=Gn("time",e),this.children=null!=e.children?e.children.map(function(e){return new qn(e)}):[]}p.ProfiledPlan=Wn;p.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},Vn.prototype.containsUpdates=function(){var r=this;return void 0!==this._containsUpdates?this._containsUpdates:0<Object.keys(this._stats).reduce(function(e,t){return e+r._stats[t]},0)},Vn.prototype.updates=function(){return this._stats},Vn.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},Vn.prototype.systemUpdates=function(){return this._systemUpdates};var zn=Vn;function Vn(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(e){var t=e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()});t in n._stats?n._stats[t]=Ln.util.toNumber(r[e]):"systemUpdates"===t?n._systemUpdates=Ln.util.toNumber(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}p.QueryStatistics=zn;var Hn=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Gn(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?(t=t[e],Ln.util.toNumber(t)):r}p.ServerInfo=Hn;function Yn(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}function Kn(e){console.log("Uncaught error when processing result: "+e)}function Zn(e){}function Qn(e){}p.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},p.default=xr;var Xn,j={},o=(Object.defineProperty(j,"__esModule",{value:!0}),j.notificationFilterDisabledClassification=j.notificationFilterDisabledCategory=j.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),Zr=(j.notificationFilterMinimumSeverityLevel=o,Object.freeze(o),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"}),S=(j.notificationFilterDisabledCategory=Zr,Object.freeze(Zr),Zr),pn=(j.notificationFilterDisabledClassification=S,j.default=Yn,{}),Jn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},$n=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},eo=(Object.defineProperty(pn,"__esModule",{value:!0}),E(p)),to=h,ro=t,no=to.connectionHolder.EMPTY_CONNECTION_HOLDER;function oo(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[Xn]="Result",this._stack=null==(i=new Error("")).stack?null:i.stack.replace(/^Error(\n\r)*/,""),this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:no,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}oo.prototype.keys=function(){var n=this;return null!==this._keys?Promise.resolve(this._keys):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){return e.subscribe(n._decorateObserver({onKeys:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},oo.prototype.summary=function(){var n=this;return null!==this._summary?Promise.resolve(this._summary):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){e.cancel(),e.subscribe(n._decorateObserver({onCompleted:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},oo.prototype._getOrCreatePromise=function(){var e=this;return null==this._p&&(this._p=new Promise(function(t,r){var n=[];e.subscribe({onNext:function(e){n.push(e)},onCompleted:function(e){t({records:n,summary:e})},onError:function(e){r(e)}})})),this._p},oo.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,ro.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return Jn(n,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:return void 0!==u.queuedObserver?[3,2]:(u.queuedObserver=this._createQueuedResultObserver(r),t=u,[4,this._subscribe(u.queuedObserver,!0).catch(function(){})]);case 1:t.streaming=e.sent(),r(),e.label=2;case 2:return[2,u.queuedObserver]}})})}function i(e){if(void 0===e)throw(0,ro.newError)("InvalidState: Result stream finished without Summary",ro.PROTOCOL_ERROR);return 1}var u={paused:!0,firstRun:!0,finished:!1},r=function(){var e,t;null!=u.streaming&&(e=(t=null!=(t=null==(t=u.queuedObserver)?void 0:t.size)?t:0)>=n._watermarks.high,t=t<=n._watermarks.low,e&&!u.paused?(u.paused=!0,u.streaming.pause()):(t&&u.paused||u.firstRun&&!e)&&(u.firstRun=!1,u.paused=!1,u.streaming.resume()))};return{next:function(){return Jn(n,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().dequeue()];case 2:return!0===(t=e.sent()).done&&(u.finished=t.done,u.summary=t.value),[2,t]}})})},return:function(r){return Jn(n,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:null!=r?r:u.summary}]:(null!=(t=u.streaming)&&t.cancel(),[4,o()]);case 1:return[4,e.sent().dequeueUntilDone()];case 2:return t=e.sent(),u.finished=!0,t.value=null!=r?r:t.value,u.summary=t.value,[2,t]}})})},peek:function(){return Jn(n,void 0,void 0,function(){return $n(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().head()];case 2:return[2,e.sent()]}})})}}},oo.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},oo.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},oo.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},oo.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},oo.prototype.isOpen=function(){return null===this._summary&&null===this._error},oo.prototype._subscribe=function(e,t){void 0===t&&(t=!1);var r=this._decorateObserver(e);return this._streamObserverPromise.then(function(e){return t&&e.pause(),e.subscribe(r),e}).catch(function(e){return null!=r.onError&&r.onError(e),Promise.reject(e)})},oo.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:Zn,i=null!=(e=n.onError)?e:Kn,r=null!=(e=n.onKeys)?e:Qn;return{onNext:null!=n.onNext?n.onNext.bind(n):void 0,onKeys:function(e){return o._keys=e,r.call(n,e)},onCompleted:function(e){o._releaseConnectionAndGetSummary(e).then(function(e){return null!==o._summary?t.call(n,o._summary):(o._summary=e,t.call(n,e))}).catch(i)},onError:function(r){o._connectionHolder.releaseConnection().then(function(){var e,t;e=r,null!=(t=o._stack)&&(e.stack=e.toString()+"\n"+t),o._error=r,i.call(n,r)}).catch(i)}}},oo.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},oo.prototype._releaseConnectionAndGetSummary=function(t){var e=to.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(e){return o.releaseConnection().then(function(){return null==e?void 0:e.getProtocolVersion()})},function(e){}).then(function(e){return new eo.default(r,n,t,e)})},oo.prototype._createQueuedResultObserver=function(n){var e=this;function o(){var r={};return r.promise=new Promise(function(e,t){r.resolve=e,r.reject=t}),r}function i(e){return e instanceof Error}function r(){var r;return Jn(this,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,ro.newError)("Unexpected empty buffer",ro.PROTOCOL_ERROR),n(),i(t))throw t;return[2,t]}return a.resolvable=o(),[4,a.resolvable.promise];case 1:return[2,e.sent()]}})})}var u=[],a={resolvable:null},t={onNext:function(e){t._push({done:!1,value:e})},onCompleted:function(e){t._push({done:!0,value:e})},onError:function(e){t._push(e)},_push:function(e){var t;null!==a.resolvable?(t=a.resolvable,a.resolvable=null,i(e)?t.reject(e):t.resolve(e)):(u.push(e),n())},dequeue:r,dequeueUntilDone:function(){return Jn(e,void 0,void 0,function(){var t;return $n(this,function(e){switch(e.label){case 0:return[4,r()];case 1:return!0===(t=e.sent()).done?[2,t]:[3,0];case 2:return[2]}})})},head:function(){return Jn(e,void 0,void 0,function(){var t,r;return $n(this,function(e){switch(e.label){case 0:if(0<u.length){if(i(t=u[0]))throw t;return[2,t]}a.resolvable=o(),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,a.resolvable.promise];case 2:return t=e.sent(),u.unshift(t),[2,t];case 3:throw r=e.sent(),u.unshift(r),r;case 4:return n(),[7];case 5:return[2]}})})},get size(){return u.length}};return t},Xn=Symbol.toStringTag,pn.default=oo;T={};Object.defineProperty(T,"__esModule",{value:!0});T.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};O={},Object.defineProperty(O,"__esModule",{value:!0}),O.Releasable=void 0,io.prototype.release=function(){throw new Error("Not implemented")},w=io;function io(){}function uo(){}O.Releasable=w,uo.prototype.acquireConnection=function(e){throw Error("Not implemented")},uo.prototype.supportsMultiDb=function(){throw Error("Not implemented")},uo.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},uo.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},uo.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},uo.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},uo.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},uo.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},uo.prototype.close=function(){throw Error("Not implemented")},O.default=uo;V={};function ao(){}Object.defineProperty(V,"__esModule",{value:!0}),ao.prototype.beginTransaction=function(e){throw new Error("Not implemented")},ao.prototype.run=function(e,t,r){throw new Error("Not implemented")},ao.prototype.commitTransaction=function(e){throw new Error("Not implemented")},ao.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},ao.prototype.resetAndFlush=function(){throw new Error("Not implemented")},ao.prototype.isOpen=function(){throw new Error("Not implemented")},ao.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},ao.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},V.default=ao;var Y={},so=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},co=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},xr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lo=(Object.defineProperty(Y,"__esModule",{value:!0}),s),fo=Nt,po=y,ho=m,bo=b,yo=t,_o=xr(pn);function vo(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,f=this;this._connectionHolder=t,this._reactive=i,this._state=mo.ACTIVE,this._onClose=r,this._onBookmarks=n,this._onConnection=o,this._onError=this._onErrorCallback.bind(this),this._fetchSize=u,this._onComplete=this._onCompleteCallback.bind(this),this._results=[],this._impersonatedUser=a,this._lowRecordWatermak=c,this._highRecordWatermark=s,this._bookmarks=po.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}vo.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return so(t,void 0,void 0,function(){var t,r=this;return co(this,function(e){switch(e.label){case 0:return(this._onConnection(),null==n)?[3,2]:(t=this,[4,o()]);case 1:return t._bookmarks=e.sent(),[2,n.beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(e){null!=u&&u.onError(e),r._onError(e).catch(function(){})},afterComplete:function(e){null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,yo.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},vo.prototype.run=function(e,t){e=(0,lo.validateQueryAndParameters)(e,t),t=e.validatedQuery,e=e.params,t=this._state.run(t,e,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,reactive:this._reactive,fetchSize:this._fetchSize,highRecordWatermark:this._highRecordWatermark,lowRecordWatermark:this._lowRecordWatermak,preparationJob:this._activePromise});return this._results.push(t),t},vo.prototype.commit=function(){var t=this,r=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:function(e){return t._onCompleteCallback(e,t._bookmarks)},onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},vo.prototype.rollback=function(){var r=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},vo.prototype.isOpen=function(){return this._state===mo.ACTIVE},vo.prototype.close=function(){return so(this,void 0,void 0,function(){return co(this,function(e){switch(e.label){case 0:return this.isOpen()?[4,this.rollback()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},vo.prototype[Symbol.asyncDispose]=function(){return this.close()},vo.prototype._onErrorCallback=function(t){return this._state===mo.FAILED?Promise.resolve(null):(this._state=mo.FAILED,this._onClose(),this._results.forEach(function(e){e.isOpen()&&e._streamObserverPromise.then(function(e){return e.onError(t)}).catch(function(e){})}),this._connectionHolder.releaseConnection())},vo.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new po.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:po.Bookmarks.empty(),null==e?void 0:e.db)};var mo={ACTIVE:{commit:function(e){return{result:go(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:mo.SUCCEEDED}},rollback:function(e){return{result:go(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:mo.ROLLED_BACK}},run:function(t,r,e){var n=e.connectionHolder,o=e.onError,i=e.onComplete,u=e.onConnection,a=e.reactive,s=e.fetchSize,c=e.highRecordWatermark,l=e.lowRecordWatermark,e=e.preparationJob,f=null!=e?e:Promise.resolve();return Oo(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:po.Bookmarks.empty(),txConfig:ho.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,yo.newError)("No connection available")}).catch(function(e){return new bo.FailedObserver({error:e,onError:o})}),t,r,n,c,l)}},FAILED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),"COMMIT",{},t,0,0),state:mo.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:Oo(new bo.CompletedObserver,"ROLLBACK",{},t,0,0),state:mo.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:o}),e,t,n,0,0)}},SUCCEEDED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},fo.EMPTY_CONNECTION_HOLDER,0,0),state:mo.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},fo.EMPTY_CONNECTION_HOLDER,0,0),state:mo.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot run query in this transaction, because it has already been committed."),onError:o}),e,t,n,0,0)}},ROLLED_BACK:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:mo.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:mo.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Oo(new bo.FailedObserver({error:(0,yo.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function go(r,e,n,o,i,u,t){var a=null!=t?t:Promise.resolve(),t=e.getConnection().then(function(e){return a.then(function(){return e})}).then(function(t){return i(),u.forEach(function(e){return e._cancel()}),Promise.all(u.map(function(e){return e.summary()})).then(function(e){if(null!=t)return r?t.commitTransaction({beforeError:n,afterComplete:o}):t.rollbackTransaction({beforeError:n,afterComplete:o});throw(0,yo.newError)("No connection available")})}).catch(function(e){return new bo.FailedObserver({error:e,onError:n})});return new _o.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function Oo(e,t,r,n,o,i){return void 0===n&&(n=fo.EMPTY_CONNECTION_HOLDER),new _o.default(Promise.resolve(e),t,r,new fo.ReadOnlyConnectionHolder(null!=n?n:fo.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}Y.default=vo;o={};function wo(e){e=e.run;this._run=e}Object.defineProperty(o,"__esModule",{value:!0}),wo.fromTransaction=function(e){return new wo({run:e.run.bind(e)})},wo.prototype.run=function(e,t){return this._run(e,t)},o.default=wo;var Eo,Po,So,Zr={},S=r&&r.__extends||(Eo=function(e,t){return(Eo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Eo(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),To=r&&r.__assign||function(){return(To=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w=(Object.defineProperty(Zr,"__esModule",{value:!0}),E(Y)),xr=(So=w.default,S(jo,So),jo.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},jo.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},jo.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},jo.prototype._getOrCreateBeginPromise=function(){var r=this;return null==this._beginPromise&&(this._beginPromise=new Promise(function(e,t){r._resolve=e,r._reject=t,null!=r._beginError&&t(r._beginError),null!=r._beginMetadata&&e(r._toTransaction())})),this._beginPromise},jo.prototype._toTransaction=function(){return To(To({},this),{run:So.prototype.run.bind(this),commit:So.prototype.commit.bind(this),rollback:So.prototype.rollback.bind(this),close:So.prototype.close.bind(this),isOpen:So.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},jo.prototype._begin=function(e,t){return So.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},jo.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},jo.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},jo);function jo(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,t=So.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:l,apiTelemetryConfig:e})||this;return t[Po]="TransactionPromise",t}Po=Symbol.toStringTag,Zr.default=xr;var E={},Co=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ro=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Io=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ao=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ko=(Object.defineProperty(E,"__esModule",{value:!0}),b),Mo=s,No=_,xo=t,Do=w(pn),Lo=Nt,Uo=g,Fo=y,Bo=m,Wo=w(Zr),qo=w(o);function zo(e){var t=e.mode,r=e.connectionProvider,n=e.bookmarks,o=e.database,i=e.config,u=e.reactive,a=e.fetchSize,s=e.impersonatedUser,c=e.bookmarkManager,l=e.notificationFilter,f=e.auth,e=e.log,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new Lo.ConnectionHolder({mode:No.ACCESS_MODE_READ,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._writeConnectionHolder=new Lo.ConnectionHolder({mode:No.ACCESS_MODE_WRITE,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:Fo.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Uo.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=l,this._log=e}zo.prototype.run=function(e,t,r){var o=this,e=(0,Mo.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Bo.TxConfig(r,this._log):Bo.TxConfig.empty(),t=this._run(i,u,function(n){return Co(o,void 0,void 0,function(){var t,r=this;return Ro(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,apiTelemetryConfig:{api:No.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(e){return r._onCompleteCallback(e,t)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter})]}})})});return this._results.push(t),t},zo.prototype._run=function(e,t,r){var r=this._acquireAndConsumeConnection(r),n=r.connectionHolder,r=r.resultPromise.catch(function(e){return Promise.resolve(new ko.FailedObserver({error:e}))}),o={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new Do.default(r,e,t,n,o)},zo.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return Co(r,void 0,void 0,function(){return Ro(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},zo.prototype._acquireAndConsumeConnection=function(t){var e=this._connectionHolderWithMode(this._mode),r=this._open?!this._hasTx&&e.initializeConnection()?e.getConnection().then(function(e){return t(e)}):Promise.reject((0,xo.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,xo.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:r}},zo.prototype.beginTransaction=function(e){var t=Bo.TxConfig.empty();return null!=e&&(t=new Bo.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:No.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},zo.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,xo.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,xo.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");e=zo._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new Wo.default({connectionHolder:e,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(e,t,r){return n._updateBookmarks(e,t,r)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:r});return e._begin(function(){return n._bookmarks()},t),e},zo.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,xo.newError)("You cannot run more transactions on a closed session.")},zo.prototype._transactionClosed=function(){this._hasTx=!1},zo.prototype.lastBookmark=function(){return this.lastBookmarks()},zo.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},zo.prototype._bookmarks=function(){var r;return Co(this,void 0,void 0,function(){var t;return Ro(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Fo.Bookmarks(Ao(Ao([],Io(t),!1),Io(this._configuredBookmarks),!1))]}})})},zo.prototype.readTransaction=function(e,t){t=new Bo.TxConfig(t,this._log);return this._runTransaction(No.ACCESS_MODE_READ,t,e)},zo.prototype.writeTransaction=function(e,t){t=new Bo.TxConfig(t,this._log);return this._runTransaction(No.ACCESS_MODE_WRITE,t,e)},zo.prototype._runTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e)},zo.prototype.executeRead=function(e,t){t=new Bo.TxConfig(t,this._log);return this._executeInTransaction(No.ACCESS_MODE_READ,t,e)},zo.prototype.executeWrite=function(e,t){t=new Bo.TxConfig(t,this._log);return this._executeInTransaction(No.ACCESS_MODE_WRITE,t,e)},zo.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,qo.default.fromTransaction)},zo.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},zo.prototype._getConnectionAcquistionBookmarks=function(){var r;return Co(this,void 0,void 0,function(){var t;return Ro(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Fo.Bookmarks(Ao(Ao([],Io(this._configuredBookmarks),!1),Io(t),!1))]}})})},zo.prototype._updateBookmarks=function(e,t,r){var n;null==e||e.isEmpty()||(null!=(n=this._bookmarkManager)&&n.updateBookmarks(null!=(n=null==t?void 0:t.values())?n:[],null!=(t=null==e?void 0:e.values())?t:[]).catch(function(){}),this._lastBookmarks=e,this._configuredBookmarks=Fo.Bookmarks.empty())},zo.prototype.close=function(){return Co(this,void 0,void 0,function(){return Ro(this,function(e){switch(e.label){case 0:return this._open?(this._open=!1,this._results.forEach(function(e){return e._cancel()}),this._transactionExecutor.close(),[4,this._readConnectionHolder.close(this._hasTx)]):[3,3];case 1:return e.sent(),[4,this._writeConnectionHolder.close(this._hasTx)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},zo.prototype[Symbol.asyncDispose]=function(){return this.close()},zo.prototype._connectionHolderWithMode=function(e){if(e===No.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===No.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,xo.newError)("Unknown access mode: "+e)},zo.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new Fo.Bookmarks(e.bookmark),t,e.db)},zo.prototype._calculateWatermaks=function(){return this._fetchSize===No.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},zo.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},zo._validateSessionMode=function(e){e=null!=e?e:No.ACCESS_MODE_WRITE;if(e!==No.ACCESS_MODE_READ&&e!==No.ACCESS_MODE_WRITE)throw(0,xo.newError)("Illegal session mode "+e);return e},E.default=zo;var S={},xr={},Vo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ho=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Go=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Yo=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ko=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},b=(Object.defineProperty(xr,"__esModule",{value:!0}),xr.bookmarkManager=void 0,Zo.prototype.updateBookmarks=function(e,t){return Vo(this,void 0,void 0,function(){return Ho(this,function(e){throw new Error("Not implemented")})})},Zo.prototype.getBookmarks=function(){return Vo(this,void 0,void 0,function(){return Ho(this,function(e){throw new Error("Not implemented")})})},Zo);function Zo(){throw new Error("Not implemented")}xr.default=b,xr.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Qo(t,e.bookmarksSupplier,e.bookmarksConsumer)};Xo.prototype.updateBookmarks=function(f,p){return Vo(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return Ho(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=Go(f),n=r.next();!n.done;n=r.next())u=n.value,t.delete(u)}catch(e){a={error:e}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}try{for(o=Go(p),i=o.next();!i.done;i=o.next())u=i.value,t.add(u)}catch(e){c={error:e}}finally{try{i&&!i.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}}return"function"!=typeof this._bookmarksConsumer?[3,2]:[4,this._bookmarksConsumer(Ko([],Yo(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Xo.prototype.getBookmarks=function(){var s;return Vo(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return Ho(this,function(e){switch(e.label){case 0:return t=new Set(this._bookmarks),"function"!=typeof this._bookmarksSupplier?[3,2]:[4,this._bookmarksSupplier()];case 1:r=null!=(s=e.sent())?s:[];try{for(n=Go(r),o=n.next();!o.done;o=n.next())i=o.value,t.add(i)}catch(e){u={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(u)throw u.error}}e.label=2;case 2:return[2,Ko([],Yo(t),!1)]}})})};var Qo=Xo;function Xo(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Nt={},Jo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},$o=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ei=(Object.defineProperty(Nt,"__esModule",{value:!0}),g(T)),ti=t;function ri(){}ri.prototype.eagerResultTransformer=function(){return ni},ri.prototype.eager=function(){return ni},ri.prototype.mappedResultTransformer=function(e){return oi(e)},ri.prototype.mapped=function(e){return oi(e)},ri.prototype.first=function(){return ii},ri.prototype.summary=function(){return ui};m=new ri;function ni(o){return Jo(this,void 0,void 0,function(){var t,r,n;return $o(this,function(e){switch(e.label){case 0:return[4,o];case 1:return r=e.sent(),t=r.summary,r=r.records,[4,o.keys()];case 2:return n=e.sent(),[2,new ei.default(n,r,t)]}})})}function oi(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,ti.newError)("Requires a map or/and a collect functions.");return function(o){return Jo(e,void 0,void 0,function(){return $o(this,function(e){switch(e.label){case 0:return[4,new Promise(function(t,r){var n={records:[],keys:[]};o.subscribe({onKeys:function(e){n.keys=e},onNext:function(e){var t;null!=i.map?void 0!==(t=i.map(e))&&n.records.push(t):n.records.push(e)},onCompleted:function(e){null!=i.collect?t(i.collect(n.records,e,n.keys)):(e={records:n.records,summary:e,keys:n.keys},t(e))},onError:function(e){r(e)}})})];case 1:return[2,e.sent()]}})})}}function ii(o){return Jo(this,void 0,void 0,function(){var t,r,n;return $o(this,function(e){switch(e.label){case 0:return[4,(t=o[Symbol.asyncIterator]()).next()];case 1:n=e.sent(),r=n.value,n=n.done,e.label=2;case 2:return e.trys.push([2,,3,6]),!0===n?[2,void 0]:[2,r];case 3:return null==t.return?[3,5]:[4,t.return()];case 4:e.sent(),e.label=5;case 5:return[7];case 6:return[2]}})})}function ui(t){return Jo(this,void 0,void 0,function(){return $o(this,function(e){switch(e.label){case 0:return[4,t.summary()];case 1:return[2,e.sent()]}})})}Object.freeze(m),Nt.default=m;var w={},ai=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},si=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ci=(Object.defineProperty(w,"__esModule",{value:!0}),_);function li(e){this._createSession=e}li.prototype.execute=function(o,i,u){return ai(this,void 0,void 0,function(){var t,r,n=this;return si(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser,auth:o.auth}),r=function(e,t,r){"function"==typeof(null==e?void 0:e.addEventListener)&&e.addEventListener(t,r);return{uninstall:function(){"function"==typeof(null==e?void 0:e.removeEventListener)&&e.removeEventListener(t,r)}}}(o.signal,"abort",function(){return ai(n,void 0,void 0,function(){return si(this,function(e){switch(e.label){case 0:return[4,t.close()];case 1:return[2,e.sent()]}})})}),t._configureTransactionExecutor(!0,ci.TELEMETRY_APIS.EXECUTE_QUERY),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READ"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return ai(n,void 0,void 0,function(){var t;return si(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})},o.transactionConfig)];case 2:return[2,e.sent()];case 3:return r.uninstall(),[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},w.default=li;function fi(){this.routing=Ri.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0,this.auth=void 0,this.signal=void 0}var pi=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},di=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hi=(Object.defineProperty(S,"__esModule",{value:!0}),S.QueryConfig=S.SessionConfig=S.routing=S.WRITE=S.READ=S.Driver=void 0,y),bi=b(P),yi=_,_i=v,vi=b(E),mi=s,gi=xr,Oi=b(Nt),wi=b(w),Ei=t,Pi=36e5,Si=1e3,Ti=yi.ACCESS_MODE_READ,ji=(S.READ=Ti,yi.ACCESS_MODE_WRITE),Ci=(S.WRITE=ji,0),Ri=(S.SessionConfig=function(){this.defaultAccessMode=ji,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.auth=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0},{WRITE:"WRITE",READ:"READ"}),g=(S.routing=Ri,Object.freeze(Ri),S.QueryConfig=fi,Object.defineProperty(Ii.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Ii.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),pi(this,void 0,void 0,function(){var t,r,n;return di(this,function(e){switch(e.label){case 0:if(t=null===u.bookmarkManager?void 0:null!=(a=u.bookmarkManager)?a:this.executeQueryBookmarkManager,r=null!=(a=u.resultTransformer)?a:Oi.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:Ri.WRITE)!==Ri.READ&&n!==Ri.WRITE)throw(0,Ei.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser,transactionConfig:u.transactionConfig,auth:u.auth,signal:u.signal},o,i)];case 1:return[2,e.sent()]}})})},Ii.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ti})},Ii.prototype.verifyAuthentication=function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return pi(this,void 0,void 0,function(){return di(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:Ti})];case 1:return[2,e.sent()]}})})},Ii.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ti})},Ii.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Ii.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Ii.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Ii.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},Ii.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Ii.prototype.isEncrypted=function(){return this._isEncrypted()},Ii.prototype._supportsRouting=function(){return this._meta.routing},Ii.prototype._isEncrypted=function(){return this._config.encrypted===mi.ENCRYPTION_ON||!0===this._config.encrypted},Ii.prototype._getTrust=function(){return this._config.trust},Ii.prototype.session=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.impersonatedUser,i=e.fetchSize,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return this._newSession({defaultAccessMode:void 0===t?ji:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:ki(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},Ii.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Ii.prototype[Symbol.asyncDispose]=function(){return this.close()},Ii.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Ii.prototype._newSession=function(e){var t=e.defaultAccessMode,r=e.bookmarkOrBookmarks,n=e.database,o=e.reactive,i=e.impersonatedUser,u=e.fetchSize,a=e.bookmarkManager,s=e.notificationFilter,e=e.auth,t=vi.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),r=null!=r?new hi.Bookmarks(r):hi.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:c,bookmarks:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:s,auth:e,log:this._log})},Ii.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new bi.default(e.resolver)))),this._connectionProvider},Ii);function Ii(e,t,r,n,o){void 0===n&&(n=function(e){return new vi.default(e)}),void 0===o&&(o=function(e){return new wi.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Ai(i.maxConnectionLifetime,Pi),i.maxConnectionPoolSize=Ai(i.maxConnectionPoolSize,yi.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Ai(i.connectionAcquisitionTimeout,yi.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=ki(i.fetchSize,Si),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?yi.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i),i.connectionLivenessCheckTimeout=function(e){if(null==e)return;e=parseInt(e,10);if(e<0||Number.isNaN(e))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(e));return e}(i.connectionLivenessCheckTimeout);var i=_i.Logger.create(t);!function(e,t){var r=e.resolver;if(null!=r&&"function"!=typeof r)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof r));e.connectionAcquisitionTimeout<e.connectionTimeout&&t.warn('Configuration for "connectionAcquisitionTimeout" should be greater than or equal to "connectionTimeout". Otherwise, the connection acquisition timeout will take precedence for over the connection timeout in scenarios where a new connection is created while it is acquired');if(null==(null==(r=e.notificationFilter)?void 0:r.disabledCategories)||null==(null==(t=e.notificationFilter)?void 0:t.disabledClassifications))return;throw new Error('The notificationFilter can\'t have both "disabledCategories" and "disabledClassifications" configured at the same time.')}(t,i),this._id=Ci++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,gi.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function Ai(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function ki(e,t){e=parseInt(e,10);if(0<e||e===yi.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(yi.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}S.Driver=g,S.default=g;m={};function Mi(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(m,"__esModule",{value:!0}),m.default={basic:function(e,t,r){return null!=r?{scheme:"basic",principal:e,credentials:t,realm:r}:{scheme:"basic",principal:e,credentials:t}},kerberos:function(e){return{scheme:"kerberos",principal:"",credentials:e}},bearer:function(e){return{scheme:"bearer",credentials:e}},none:function(){return{scheme:"none"}},custom:function(e,t,r,n,o){n={scheme:n,principal:e};return Mi(t)&&(n.credentials=t),Mi(r)&&(n.realm=r),Mi(o)&&(n.parameters=o),n}};var y={},Ni=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},xi=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Di=(Object.defineProperty(y,"__esModule",{value:!0}),y.staticAuthTokenManager=y.authTokenManagers=y.AuthTokenAndExpiration=void 0,P(m)),Li=h;function Ui(){}function Fi(){}Ui.prototype.getToken=function(){throw new Error("Not Implemented")},Ui.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},y.default=Ui,y.AuthTokenAndExpiration=function(){this.token=Di.default.none(),this.expiration=void 0},Fi.prototype.bearer=function(e){e=e.tokenProvider;if("function"!=typeof e)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof e));return new qi(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},Fi.prototype.basic=function(e){var t=this,r=e.tokenProvider;if("function"!=typeof r)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof r));return new qi(function(){return Ni(t,void 0,void 0,function(){var t;return xi(this,function(e){switch(e.label){case 0:return t={},[4,r()];case 1:return[2,(t.token=e.sent(),t)]}})})},["Neo.ClientError.Security.Unauthorized"])};_=new Fi;y.authTokenManagers=_,Object.freeze(_),y.staticAuthTokenManager=function(e){return e=e.authToken,new Vi(e)};Wi.prototype.subscribe=function(e){this._subscribers.push(e)},Wi.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},Wi.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var Bi=Wi;function Wi(e){this._subscribers=e=void 0===e?[]:e}zi.prototype.getToken=function(){var t;return Ni(this,void 0,void 0,function(){return xi(this,function(e){switch(e.label){case 0:return void 0===this._currentAuthData||void 0!==this._currentAuthData.expiration&&this._currentAuthData.expiration<new Date?[4,this._refreshAuthToken()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2,null==(t=this._currentAuthData)?void 0:t.token]}})})},zi.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(Li.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},zi.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new Bi,Promise.resolve(this._tokenProvider()).then(function(e){var t;r._currentAuthData=e,null!=(t=r._refreshObservable)&&t.onCompleted(e)}).catch(function(e){var t;null!=(t=r._refreshObservable)&&t.onError(e)}).finally(function(){r._refreshObservable=void 0})),void 0!==e&&this._refreshObservable.subscribe(e)},zi.prototype._refreshAuthToken=function(){return Ni(this,void 0,void 0,function(){var r=this;return xi(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e,t){r._scheduleRefreshAuthToken({onCompleted:e,onError:t})})];case 1:return[2,e.sent()]}})})};var qi=zi;function zi(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}Hi.prototype.getToken=function(){return this._authToken},Hi.prototype.handleSecurityException=function(e,t){return!1};var Vi=Hi;function Hi(e){this._authToken=e}function Gi(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0}var Yi,Ki,v={},s=r&&r.__extends||(Yi=function(e,t){return(Yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Yi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),b=(Object.defineProperty(v,"__esModule",{value:!0}),v.InternalConfig=v.Config=void 0,v.Config=Gi,s(Zi,Ki=Gi),Zi);function Zi(){return null!==Ki&&Ki.apply(this,arguments)||this}v.InternalConfig=b;var Qi,w={},g=r&&r.__extends||(Qi=function(e,t){return(Qi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Qi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Xi=r&&r.__assign||function(){return(Xi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ji=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),$i=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),P=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Ji(t,e,r);return $i(t,e),t},eu=(Object.defineProperty(w,"__esModule",{value:!0}),w.resolveCertificateProvider=w.clientCertificateProviders=w.RotatingClientCertificateProvider=w.ClientCertificateProvider=void 0,P(n)),_=(w.default=function(){this.certfile="",this.keyfile="",this.password=void 0},tu.prototype.hasUpdate=function(){throw new Error("Not Implemented")},tu.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},tu);function tu(){}w.ClientCertificateProvider=_;g(nu,ru=_),nu.prototype.updateCertificate=function(e){throw new Error("Not implemented")};var ru,s=nu;function nu(){return null!==ru&&ru.apply(this,arguments)||this}function ou(){}w.RotatingClientCertificateProvider=s,ou.prototype.rotating=function(e){e=e.initialCertificate;if(null==e||!iu(e))throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(eu.stringify(e)));e=Xi({},e);return new Pu(e)};b=new ou;function iu(e){return null!=e&&"object"==typeof e&&"certfile"in e&&(uu(r=e.certfile)||au(r,uu))&&"keyfile"in e&&(t(r=e.keyfile)||au(r,t))&&su("password",e);function t(e){return"string"==typeof e||null!=e&&"object"==typeof e&&"path"in e&&"string"==typeof e.path&&su("password",e)}var r}function uu(e){return"string"==typeof e}function au(e,t,r){return void 0===r&&(r=!1),Array.isArray(e)&&(r||0<e.length)&&e.filter(t).length===e.length}function su(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}w.clientCertificateProviders=b,Object.freeze(b),w.resolveCertificateProvider=function(e){if(null!=e){if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;var t;if(iu(e))return t=Xi({},e),{getClientCertificate:function(){return t},hasUpdate:function(){return!1}};throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(eu.stringify(e)))}};Su.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},Su.prototype.getClientCertificate=function(){return this._certificate},Su.prototype.updateCertificate=function(e){if(!iu(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(eu.stringify(e)));this._certificate=Xi({},e),this._updated=!0};var cu,lu,fu,pu,du,hu,bu,yu,_u,vu,mu,gu,Ou,wu,Eu,Pu=Su;function Su(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}P=e,cu=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),lu=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),g=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&cu(t,e,r);return lu(t,e),t},_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(P,"__esModule",{value:!0}),P.EagerResult=P.Result=P.Stats=P.QueryStatistics=P.ProfiledPlan=P.Plan=P.GqlStatusObject=P.Notification=P.ServerInfo=P.queryType=P.ResultSummary=P.Record=P.isPathSegment=P.PathSegment=P.isPath=P.Path=P.isUnboundRelationship=P.UnboundRelationship=P.isRelationship=P.Relationship=P.isNode=P.Node=P.Time=P.LocalTime=P.LocalDateTime=P.isTime=P.isLocalTime=P.isLocalDateTime=P.isDuration=P.isDateTime=P.isDate=P.Duration=P.DateTime=P.Date=P.Point=P.isPoint=P.internal=P.toString=P.toNumber=P.inSafeRange=P.isInt=P.int=P.Integer=P.error=P.isRetriableError=P.GQLError=P.newGQLError=P.Neo4jError=P.newError=P.authTokenManagers=void 0,P.resolveCertificateProvider=P.clientCertificateProviders=P.notificationFilterMinimumSeverityLevel=P.notificationFilterDisabledClassification=P.notificationFilterDisabledCategory=P.notificationSeverityLevel=P.notificationClassification=P.notificationCategory=P.resultTransformers=P.routing=P.staticAuthTokenManager=P.bookmarkManager=P.auth=P.json=P.driver=P.types=P.Driver=P.Session=P.TransactionPromise=P.ManagedTransaction=P.Transaction=P.Connection=P.Releasable=P.ConnectionProvider=void 0,fu=t,Object.defineProperty(P,"newError",{enumerable:!0,get:function(){return fu.newError}}),Object.defineProperty(P,"Neo4jError",{enumerable:!0,get:function(){return fu.Neo4jError}}),Object.defineProperty(P,"newGQLError",{enumerable:!0,get:function(){return fu.newGQLError}}),Object.defineProperty(P,"GQLError",{enumerable:!0,get:function(){return fu.GQLError}}),Object.defineProperty(P,"isRetriableError",{enumerable:!0,get:function(){return fu.isRetriableError}}),pu=g(i),P.Integer=pu.default,Object.defineProperty(P,"int",{enumerable:!0,get:function(){return pu.int}}),Object.defineProperty(P,"isInt",{enumerable:!0,get:function(){return pu.isInt}}),Object.defineProperty(P,"inSafeRange",{enumerable:!0,get:function(){return pu.inSafeRange}}),Object.defineProperty(P,"toNumber",{enumerable:!0,get:function(){return pu.toNumber}}),Object.defineProperty(P,"toString",{enumerable:!0,get:function(){return pu.toString}}),du=u,Object.defineProperty(P,"Date",{enumerable:!0,get:function(){return du.Date}}),Object.defineProperty(P,"DateTime",{enumerable:!0,get:function(){return du.DateTime}}),Object.defineProperty(P,"Duration",{enumerable:!0,get:function(){return du.Duration}}),Object.defineProperty(P,"isDate",{enumerable:!0,get:function(){return du.isDate}}),Object.defineProperty(P,"isDateTime",{enumerable:!0,get:function(){return du.isDateTime}}),Object.defineProperty(P,"isDuration",{enumerable:!0,get:function(){return du.isDuration}}),Object.defineProperty(P,"isLocalDateTime",{enumerable:!0,get:function(){return du.isLocalDateTime}}),Object.defineProperty(P,"isLocalTime",{enumerable:!0,get:function(){return du.isLocalTime}}),Object.defineProperty(P,"isTime",{enumerable:!0,get:function(){return du.isTime}}),Object.defineProperty(P,"LocalDateTime",{enumerable:!0,get:function(){return du.LocalDateTime}}),Object.defineProperty(P,"LocalTime",{enumerable:!0,get:function(){return du.LocalTime}}),Object.defineProperty(P,"Time",{enumerable:!0,get:function(){return du.Time}}),hu=f,Object.defineProperty(P,"Node",{enumerable:!0,get:function(){return hu.Node}}),Object.defineProperty(P,"isNode",{enumerable:!0,get:function(){return hu.isNode}}),Object.defineProperty(P,"Relationship",{enumerable:!0,get:function(){return hu.Relationship}}),Object.defineProperty(P,"isRelationship",{enumerable:!0,get:function(){return hu.isRelationship}}),Object.defineProperty(P,"UnboundRelationship",{enumerable:!0,get:function(){return hu.UnboundRelationship}}),Object.defineProperty(P,"isUnboundRelationship",{enumerable:!0,get:function(){return hu.isUnboundRelationship}}),Object.defineProperty(P,"Path",{enumerable:!0,get:function(){return hu.Path}}),Object.defineProperty(P,"isPath",{enumerable:!0,get:function(){return hu.isPath}}),Object.defineProperty(P,"PathSegment",{enumerable:!0,get:function(){return hu.PathSegment}}),Object.defineProperty(P,"isPathSegment",{enumerable:!0,get:function(){return hu.isPathSegment}}),s=_(it),P.Record=s.default,bu=c,Object.defineProperty(P,"isPoint",{enumerable:!0,get:function(){return bu.isPoint}}),Object.defineProperty(P,"Point",{enumerable:!0,get:function(){return bu.Point}}),yu=g(p),P.ResultSummary=yu.default,Object.defineProperty(P,"queryType",{enumerable:!0,get:function(){return yu.queryType}}),Object.defineProperty(P,"ServerInfo",{enumerable:!0,get:function(){return yu.ServerInfo}}),Object.defineProperty(P,"Plan",{enumerable:!0,get:function(){return yu.Plan}}),Object.defineProperty(P,"ProfiledPlan",{enumerable:!0,get:function(){return yu.ProfiledPlan}}),Object.defineProperty(P,"QueryStatistics",{enumerable:!0,get:function(){return yu.QueryStatistics}}),Object.defineProperty(P,"Stats",{enumerable:!0,get:function(){return yu.Stats}}),_u=g(C),P.Notification=_u.default,Object.defineProperty(P,"GqlStatusObject",{enumerable:!0,get:function(){return _u.GqlStatusObject}}),Object.defineProperty(P,"notificationCategory",{enumerable:!0,get:function(){return _u.notificationCategory}}),Object.defineProperty(P,"notificationClassification",{enumerable:!0,get:function(){return _u.notificationClassification}}),Object.defineProperty(P,"notificationSeverityLevel",{enumerable:!0,get:function(){return _u.notificationSeverityLevel}}),vu=j,Object.defineProperty(P,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return vu.notificationFilterDisabledCategory}}),Object.defineProperty(P,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return vu.notificationFilterDisabledClassification}}),Object.defineProperty(P,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return vu.notificationFilterMinimumSeverityLevel}}),b=_(pn),P.Result=b.default,t=_(T),P.EagerResult=t.default,mu=g(O),P.ConnectionProvider=mu.default,Object.defineProperty(P,"Releasable",{enumerable:!0,get:function(){return mu.Releasable}}),i=_(V),P.Connection=i.default,u=_(Y),P.Transaction=u.default,f=_(o),P.ManagedTransaction=f.default,it=_(Zr),P.TransactionPromise=it.default,c=_(E),P.Session=c.default,p=g(S),C=p,P.Driver=p.default,P.driver=C,j=_(m),P.auth=j.default,gu=xr,Object.defineProperty(P,"bookmarkManager",{enumerable:!0,get:function(){return gu.bookmarkManager}}),Ou=y,Object.defineProperty(P,"authTokenManagers",{enumerable:!0,get:function(){return Ou.authTokenManagers}}),Object.defineProperty(P,"staticAuthTokenManager",{enumerable:!0,get:function(){return Ou.staticAuthTokenManager}}),wu=S,Object.defineProperty(P,"routing",{enumerable:!0,get:function(){return wu.routing}}),pn=g(v),P.types=pn,T=g(n),P.json=T,_=_(Nt),P.resultTransformers=_.default,Eu=w,Object.defineProperty(P,"clientCertificateProviders",{enumerable:!0,get:function(){return Eu.clientCertificateProviders}}),Object.defineProperty(P,"resolveCertificateProvider",{enumerable:!0,get:function(){return Eu.resolveCertificateProvider}}),g=g(h),P.internal=g,O={SERVICE_UNAVAILABLE:fu.SERVICE_UNAVAILABLE,SESSION_EXPIRED:fu.SESSION_EXPIRED,PROTOCOL_ERROR:fu.PROTOCOL_ERROR},P.error=O,O={authTokenManagers:Ou.authTokenManagers,newError:fu.newError,Neo4jError:fu.Neo4jError,newGQLError:fu.newGQLError,GQLError:fu.GQLError,isRetriableError:fu.isRetriableError,error:O,Integer:pu.default,int:pu.int,isInt:pu.isInt,inSafeRange:pu.inSafeRange,toNumber:pu.toNumber,toString:pu.toString,internal:g,isPoint:bu.isPoint,Point:bu.Point,Date:du.Date,DateTime:du.DateTime,Duration:du.Duration,isDate:du.isDate,isDateTime:du.isDateTime,isDuration:du.isDuration,isLocalDateTime:du.isLocalDateTime,isLocalTime:du.isLocalTime,isTime:du.isTime,LocalDateTime:du.LocalDateTime,LocalTime:du.LocalTime,Time:du.Time,Node:hu.Node,isNode:hu.isNode,Relationship:hu.Relationship,isRelationship:hu.isRelationship,UnboundRelationship:hu.UnboundRelationship,isUnboundRelationship:hu.isUnboundRelationship,Path:hu.Path,isPath:hu.isPath,PathSegment:hu.PathSegment,isPathSegment:hu.isPathSegment,Record:s.default,ResultSummary:yu.default,queryType:yu.queryType,ServerInfo:yu.ServerInfo,Notification:_u.default,GqlStatusObject:_u.GqlStatusObject,Plan:yu.Plan,ProfiledPlan:yu.ProfiledPlan,QueryStatistics:yu.QueryStatistics,Stats:yu.Stats,Result:b.default,EagerResult:t.default,Transaction:u.default,ManagedTransaction:f.default,TransactionPromise:it.default,Session:c.default,Driver:p.default,Connection:i.default,Releasable:mu.Releasable,types:pn,driver:C,json:T,auth:j.default,bookmarkManager:gu.bookmarkManager,routing:wu.routing,resultTransformers:_.default,notificationCategory:_u.notificationCategory,notificationClassification:_u.notificationClassification,notificationSeverityLevel:_u.notificationSeverityLevel,notificationFilterDisabledCategory:vu.notificationFilterDisabledCategory,notificationFilterDisabledClassification:vu.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:vu.notificationFilterMinimumSeverityLevel,clientCertificateProviders:Eu.clientCertificateProviders,resolveCertificateProvider:Eu.resolveCertificateProvider},P.default=O;V={},Y={},o={},Zr={},E={};Object.defineProperty(E,"__esModule",{value:!0}),E.isFunction=void 0,E.isFunction=function(e){return"function"==typeof e};m={},xr={},y={};Object.defineProperty(y,"__esModule",{value:!0}),y.createErrorClass=void 0,y.createErrorClass=function(e){return(e=e(function(e){Error.call(e),e.stack=(new Error).stack})).prototype=Object.create(Error.prototype),e.prototype.constructor=e},Object.defineProperty(xr,"__esModule",{value:!0}),xr.UnsubscriptionError=void 0;S=y,xr.UnsubscriptionError=S.createErrorClass(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}),v={};Object.defineProperty(v,"__esModule",{value:!0}),v.arrRemove=void 0,v.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var Tu=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ju=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Cu=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Ru=(Object.defineProperty(m,"__esModule",{value:!0}),m.isSubscription=m.EMPTY_SUBSCRIPTION=m.Subscription=void 0,E),Iu=xr,Au=v,ku=(Mu.prototype.unsubscribe=function(){var t,e,r;if(!this.closed){this.closed=!0;var n=this._parentage;if(n)if(this._parentage=null,Array.isArray(n))try{for(var o=Tu(n),i=o.next();!i.done;i=o.next())i.value.remove(this)}catch(e){a={error:e}}finally{try{i&&!i.done&&(u=o.return)&&u.call(o)}finally{if(a)throw a.error}}else n.remove(this);var u=this.initialTeardown;if(Ru.isFunction(u))try{u()}catch(e){r=e instanceof Iu.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=Tu(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{Nu(l)}catch(e){r=null!=r?r:[],e instanceof Iu.UnsubscriptionError?r=Cu(Cu([],ju(r)),ju(e.errors)):r.push(e)}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}}if(r)throw new Iu.UnsubscriptionError(r)}},Mu.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Nu(e);else{if(e instanceof Mu){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Mu.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Mu.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Mu.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Au.arrRemove(t,e)},Mu.prototype.remove=function(e){var t=this._finalizers;t&&Au.arrRemove(t,e),e instanceof Mu&&e._removeParent(this)},Mu.EMPTY=((n=new Mu).closed=!0,n),Mu);function Mu(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function Nu(e){Ru.isFunction(e)?e():e.unsubscribe()}m.Subscription=ku,m.EMPTY_SUBSCRIPTION=ku.EMPTY,m.isSubscription=function(e){return e instanceof ku||e&&"closed"in e&&Ru.isFunction(e.remove)&&Ru.isFunction(e.add)&&Ru.isFunction(e.unsubscribe)};var xu,Du,Lu,Nt={},w=(Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.config=void 0,Nt.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),h={},Uu=(xu=h,Du=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Lu=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(xu,"__esModule",{value:!0}),xu.timeoutProvider=void 0,xu.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=xu.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,Lu([e,t],Du(r))):setTimeout.apply(void 0,Lu([e,t],Du(r)))},clearTimeout:function(e){var t=xu.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(w,"__esModule",{value:!0}),w.reportUnhandledError=void 0,Nt),Fu=h;w.reportUnhandledError=function(t){Fu.timeoutProvider.setTimeout(function(){var e=Uu.config.onUnhandledError;if(!e)throw t;e(t)})};g={};Object.defineProperty(g,"__esModule",{value:!0}),g.noop=void 0,g.noop=function(){};s={};function Bu(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(s,"__esModule",{value:!0}),s.createNotification=s.nextNotification=s.errorNotification=s.COMPLETE_NOTIFICATION=void 0,s.COMPLETE_NOTIFICATION=Bu("C",void 0,void 0),s.errorNotification=function(e){return Bu("E",void 0,e)},s.nextNotification=function(e){return Bu("N",e,void 0)},s.createNotification=Bu;var Wu,qu,zu,Vu,Hu,Gu,Yu,Ku,Zu,Qu,Xu,Ju,$u,ea,b={},ta=(Object.defineProperty(b,"__esModule",{value:!0}),b.captureError=b.errorContext=void 0,Nt),ra=null;function na(e){var t=zu.call(this)||this;return t.isStopped=!1,e?(t.destination=e,Hu.isSubscription(e)&&e.add(t)):t.destination=Wu.EMPTY_OBSERVER,t}function oa(e,t){return Xu.call(e,t)}function ia(e){this.partialObserver=e}function ua(e,t,r){var n=$u.call(this)||this;return r=Vu.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&Gu.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&oa(e.next,t),error:e.error&&oa(e.error,t),complete:e.complete&&oa(e.complete,t)}):e,n.destination=new Ju(r),n}function aa(e){Gu.config.useDeprecatedSynchronousErrorHandling?Qu.captureError(e):Yu.reportUnhandledError(e)}function sa(e,t){var r=Gu.config.onStoppedNotification;r&&Zu.timeoutProvider.setTimeout(function(){return r(e,t)})}b.errorContext=function(e){if(ta.config.useDeprecatedSynchronousErrorHandling){var t=!ra;if(t&&(ra={errorThrown:!1,error:null}),e(),t){var t=ra,r=t.errorThrown,t=t.error;if(ra=null,r)throw t}}else e()},b.captureError=function(e){ta.config.useDeprecatedSynchronousErrorHandling&&ra&&(ra.errorThrown=!0,ra.error=e)},Wu=Zr,t=r&&r.__extends||(qu=function(e,t){return(qu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}qu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.EMPTY_OBSERVER=Wu.SafeSubscriber=Wu.Subscriber=void 0,Vu=E,Gu=Nt,Yu=w,u=g,Ku=s,Zu=h,Qu=b,zu=(Hu=m).Subscription,t(na,zu),na.create=function(e,t,r){return new ea(e,t,r)},na.prototype.next=function(e){this.isStopped?sa(Ku.nextNotification(e),this):this._next(e)},na.prototype.error=function(e){this.isStopped?sa(Ku.errorNotification(e),this):(this.isStopped=!0,this._error(e))},na.prototype.complete=function(){this.isStopped?sa(Ku.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},na.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,zu.prototype.unsubscribe.call(this),this.destination=null)},na.prototype._next=function(e){this.destination.next(e)},na.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},na.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},f=na,Wu.Subscriber=f,Xu=Function.prototype.bind,ia.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){aa(e)}},ia.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){aa(e)}else aa(e)},ia.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){aa(e)}},Ju=ia,t(ua,$u=f),ea=ua,Wu.SafeSubscriber=ea,Wu.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop};it={},Object.defineProperty(it,"__esModule",{value:!0}),it.observable=void 0,it.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",c={},p={};Object.defineProperty(p,"__esModule",{value:!0}),p.identity=void 0,p.identity=function(e){return e},Object.defineProperty(c,"__esModule",{value:!0}),c.pipeFromArray=c.pipe=void 0;var ca=p;function la(t){return 0===t.length?ca.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}c.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return la(e)},c.pipeFromArray=la,Object.defineProperty(o,"__esModule",{value:!0}),o.Observable=void 0;var fa=Zr,pa=m,i=it,da=c,ha=Nt,ba=E,ya=b;function _a(e){e&&(this._subscribe=e)}function va(e){return null!=(e=null!=e?e:ha.config.Promise)?e:Promise}_a.prototype.lift=function(e){var t=new _a;return t.source=this,t.operator=e,t},_a.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof fa.Subscriber||function(e){return e&&ba.isFunction(e.next)&&ba.isFunction(e.error)&&ba.isFunction(e.complete)}(n)&&pa.isSubscription(n)?e:new fa.SafeSubscriber(e,t,r);return ya.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},_a.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},_a.prototype.forEach=function(n,e){var o=this;return new(e=va(e))(function(e,t){var r=new fa.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},_a.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},_a.prototype[i.observable]=function(){return this},_a.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return da.pipeFromArray(e)(this)},_a.prototype.toPromise=function(e){var n=this;return new(e=va(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},_a.create=function(e){return new _a(e)},o.Observable=_a;var pn={},C={},T={},ma=(Object.defineProperty(T,"__esModule",{value:!0}),T.operate=T.hasLift=void 0,E);function ga(e){return ma.isFunction(null==e?void 0:e.lift)}T.hasLift=ga,T.operate=function(t){return function(e){if(ga(e))return e.lift(function(e){try{return t(e,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}};var Oa,j={},_=r&&r.__extends||(Oa=function(e,t){return(Oa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Oa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),P=(Object.defineProperty(j,"__esModule",{value:!0}),j.OperatorSubscriber=j.createOperatorSubscriber=void 0,Zr);j.createOperatorSubscriber=function(e,t,r,n,o){return new Ea(e,t,r,n,o)};_(Pa,wa=P.Subscriber),Pa.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,wa.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var wa,Ea=Pa;function Pa(t,r,e,n,o,i){var u=wa.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:wa.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:wa.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:wa.prototype._complete,u}j.OperatorSubscriber=Ea,Object.defineProperty(C,"__esModule",{value:!0}),C.refCount=void 0;var Sa=T,Ta=j;C.refCount=function(){return Sa.operate(function(r,n){var o=null,e=(r._refCount++,Ta.createOperatorSubscriber(n,void 0,void 0,void 0,function(){var e,t;!r||r._refCount<=0||0<--r._refCount?o=null:(e=r._connection,t=o,o=null,!e||t&&e!==t||e.unsubscribe(),n.unsubscribe())}));r.subscribe(e),e.closed||(o=r.connect())})};var ja,O=r&&r.__extends||(ja=function(e,t){return(ja=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ja(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(pn,"__esModule",{value:!0}),pn.ConnectableObservable=void 0;var Ca,Ra=m,Ia=C,Aa=j,ka=T,S=(Ca=o.Observable,O(Ma,Ca),Ma.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Ma.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Ma.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Ma.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new Ra.Subscription,t=this.getSubject(),e.add(this.source.subscribe(Aa.createOperatorSubscriber(t,void 0,function(){r._teardown(),t.complete()},function(e){r._teardown(),t.error(e)},function(){return r._teardown()}))),e.closed&&(this._connection=null,e=Ra.Subscription.EMPTY)),e},Ma.prototype.refCount=function(){return Ia.refCount()(this)},Ma);function Ma(e,t){var r=Ca.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,ka.hasLift(e)&&(r.lift=e.lift),r}pn.ConnectableObservable=S;var Na,xa,Da,La,Ua,n={},s={},h=(Na=s,Object.defineProperty(Na,"__esModule",{value:!0}),Na.performanceTimestampProvider=void 0,Na.performanceTimestampProvider={now:function(){return(Na.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),Fa=(xa=h,Da=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},La=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(xa,"__esModule",{value:!0}),xa.animationFrameProvider=void 0,Ua=m,xa.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=xa.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new Ua.Subscription(function(){return null==r?void 0:r(o)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xa.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,La([],Da(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xa.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,La([],Da(e)))},delegate:void 0},Object.defineProperty(n,"__esModule",{value:!0}),n.animationFrames=void 0,o),Ba=s,Wa=h;function qa(a){return new Fa.Observable(function(r){var n=a||Ba.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=Wa.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&Wa.animationFrameProvider.cancelAnimationFrame(i)}})}n.animationFrames=function(e){return e?qa(e):Ha};var za,Va,Ha=qa(),t={},f={},u=(Object.defineProperty(f,"__esModule",{value:!0}),f.ObjectUnsubscribedError=void 0,y),i=(f.ObjectUnsubscribedError=u.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(za=function(e,t){return(za=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}za(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Ga=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ya=(Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0,o),Ka=m,Za=f,Qa=v,Xa=b,_=(Va=Ya.Observable,i(Ja,Va),Ja.prototype.lift=function(e){var t=new es(this,this);return t.operator=e,t},Ja.prototype._throwIfClosed=function(){if(this.closed)throw new Za.ObjectUnsubscribedError},Ja.prototype.next=function(o){var i=this;Xa.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=Ga(i.currentObservers),n=r.next();!n.done;n=r.next())n.value.next(o)}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}})},Ja.prototype.error=function(t){var r=this;Xa.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=t;for(var e=r.observers;e.length;)e.shift().error(t)}})},Ja.prototype.complete=function(){var t=this;Xa.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},Ja.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(Ja.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),Ja.prototype._trySubscribe=function(e){return this._throwIfClosed(),Va.prototype._trySubscribe.call(this,e)},Ja.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},Ja.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?Ka.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new Ka.Subscription(function(){t.currentObservers=null,Qa.arrRemove(o,e)}))},Ja.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},Ja.prototype.asObservable=function(){var e=new Ya.Observable;return e.source=this,e},Ja.create=function(e,t){return new es(e,t)},Ja);function Ja(){var e=Va.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}t.Subject=_;i(ts,$a=_),ts.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},ts.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},ts.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},ts.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:Ka.EMPTY_SUBSCRIPTION};var $a,es=ts;function ts(e,t){var r=$a.call(this)||this;return r.destination=e,r.source=t,r}t.AnonymousSubject=es;var rs,P={},O=r&&r.__extends||(rs=function(e,t){return(rs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}rs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(P,"__esModule",{value:!0}),P.BehaviorSubject=void 0;ns=t.Subject,O(os,ns),Object.defineProperty(os.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),os.prototype._subscribe=function(e){var t=ns.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},os.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},os.prototype.next=function(e){ns.prototype.next.call(this,this._value=e)};var ns,S=os;function os(e){var t=ns.call(this)||this;return t._value=e,t}P.BehaviorSubject=S;var is,us,s={},u={},b=(is=u,Object.defineProperty(is,"__esModule",{value:!0}),is.dateTimestampProvider=void 0,is.dateTimestampProvider={now:function(){return(is.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(us=function(e,t){return(us=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}us(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(s,"__esModule",{value:!0}),s.ReplaySubject=void 0;var as,ss=u,i=(as=t.Subject,b(cs,as),cs.prototype.next=function(e){var t=this.isStopped,r=this._buffer,n=this._infiniteTimeWindow,o=this._timestampProvider,i=this._windowTime;t||(r.push(e),n||r.push(o.now()+i)),this._trimBuffer(),as.prototype.next.call(this,e)},cs.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},cs.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,o=(n?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!n){for(var i=t.now(),u=0,a=1;a<r.length&&r[a]<=i;a+=2)u=a;u&&r.splice(0,u+1)}},cs);function cs(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=ss.dateTimestampProvider);var n=as.call(this)||this;return n._bufferSize=e,n._windowTime=t,n._timestampProvider=r,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=t===1/0,n._bufferSize=Math.max(1,e),n._windowTime=Math.max(1,t),n}s.ReplaySubject=i;var ls,_={},O=r&&r.__extends||(ls=function(e,t){return(ls=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ls(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(_,"__esModule",{value:!0}),_.AsyncSubject=void 0;fs=t.Subject,O(ps,fs),ps.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this._hasValue,n=this._value,o=this.thrownError,i=this.isStopped,u=this._isComplete;t?e.error(o):(i||u)&&(r&&e.next(n),e.complete())},ps.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},ps.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&fs.prototype.next.call(this,t),fs.prototype.complete.call(this))};var fs,S=ps;function ps(){var e=null!==fs&&fs.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}_.AsyncSubject=S;var ds,b={},i={},O={},S={},hs=r&&r.__extends||(ds=function(e,t){return(ds=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ds(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(S,"__esModule",{value:!0}),S.Action=void 0;bs=m.Subscription,hs(ys,bs),ys.prototype.schedule=function(e,t){return this};var bs,hs=ys;function ys(e,t){return bs.call(this)||this}S.Action=hs;var _s,vs,ms,gs,hs={},Os=(_s=hs,vs=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ms=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(_s,"__esModule",{value:!0}),_s.intervalProvider=void 0,_s.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=_s.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,ms([e,t],vs(r))):setInterval.apply(void 0,ms([e,t],vs(r)))},clearInterval:function(e){var t=_s.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(gs=function(e,t){return(gs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}gs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(O,"__esModule",{value:!0}),O.AsyncAction=void 0;var ws,Es=hs,Ps=v,hs=(ws=S.Action,Os(Ss,ws),Ss.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var e=this.id,r=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(r,e,t)),this.pending=!0,this.delay=t,this.id=null!=(e=this.id)?e:this.requestAsyncId(r,this.id,t),this},Ss.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Es.intervalProvider.setInterval(e.flush.bind(e,this),r)},Ss.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&Es.intervalProvider.clearInterval(t)},Ss.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;e=this._execute(e,t);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},Ss.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},Ss.prototype.unsubscribe=function(){var e,t,r;this.closed||(e=this.id,r=(t=this.scheduler).actions,this.work=this.state=this.scheduler=null,this.pending=!1,Ps.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,ws.prototype.unsubscribe.call(this))},Ss);function Ss(e,t){var r=ws.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}O.AsyncAction=hs;var Ts,js,Cs,Rs,Is,As,S={},Os={},ks=(Object.defineProperty(Os,"__esModule",{value:!0}),Os.TestTools=Os.Immediate=void 0,1),Ms={};function Ns(e){return e in Ms&&(delete Ms[e],!0)}Os.Immediate={setImmediate:function(e){var t=ks++;return Ms[t]=!0,(Ts=Ts||Promise.resolve()).then(function(){return Ns(t)&&e()}),t},clearImmediate:function(e){Ns(e)}},Os.TestTools={pending:function(){return Object.keys(Ms).length}},js=S,Cs=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Rs=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(js,"__esModule",{value:!0}),js.immediateProvider=void 0,Is=Os.Immediate.setImmediate,As=Os.Immediate.clearImmediate,js.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=js.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||Is).apply(void 0,Rs([],Cs(e)))},clearImmediate:function(e){var t=js.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||As)(e)},delegate:void 0};var xs,hs=r&&r.__extends||(xs=function(e,t){return(xs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}xs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(i,"__esModule",{value:!0}),i.AsapAction=void 0;var Ds,Ls=S,Os=(Ds=O.AsyncAction,hs(Us,Ds),Us.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Ds.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ls.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},Us.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Ds.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Ls.immediateProvider.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))},Us);function Us(e,t){var r=Ds.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}i.AsapAction=Os;var S={},hs={},Os={},Fs=(Object.defineProperty(Os,"__esModule",{value:!0}),Os.Scheduler=void 0,u);function Bs(e,t){void 0===t&&(t=Bs.now),this.schedulerActionCtor=e,this.now=t}Bs.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},Bs.now=Fs.dateTimestampProvider.now,Os.Scheduler=Bs;var Ws,qs,Fs=r&&r.__extends||(Ws=function(e,t){return(Ws=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ws(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),zs=(Object.defineProperty(hs,"__esModule",{value:!0}),hs.AsyncScheduler=void 0,Os),Fs=(qs=zs.Scheduler,Fs(Vs,qs),Vs.prototype.flush=function(e){var t,r=this.actions;if(this._active)r.push(e);else{this._active=!0;do{if(t=e.execute(e.state,e.delay))break}while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}}},Vs);function Vs(e,t){void 0===t&&(t=zs.Scheduler.now);e=qs.call(this,e,t)||this;return e.actions=[],e._active=!1,e}hs.AsyncScheduler=Fs;var Hs,Fs=r&&r.__extends||(Hs=function(e,t){return(Hs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Hs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(S,"__esModule",{value:!0}),S.AsapScheduler=void 0;Gs=hs.AsyncScheduler,Fs(Ys,Gs),Ys.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var Gs,Fs=Ys;function Ys(){return null!==Gs&&Gs.apply(this,arguments)||this}S.AsapScheduler=Fs,Fs=b,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.asap=Fs.asapScheduler=void 0,Fs.asapScheduler=new S.AsapScheduler(i.AsapAction),Fs.asap=Fs.asapScheduler;var Ks,S={},Fs=(i=S,Object.defineProperty(i,"__esModule",{value:!0}),i.async=i.asyncScheduler=void 0,i.asyncScheduler=new hs.AsyncScheduler(O.AsyncAction),i.async=i.asyncScheduler,{}),i={},Zs=r&&r.__extends||(Ks=function(e,t){return(Ks=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ks(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(i,"__esModule",{value:!0}),i.QueueAction=void 0;Qs=O.AsyncAction,Zs(Xs,Qs),Xs.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?Qs.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},Xs.prototype.execute=function(e,t){return 0<t||this.closed?Qs.prototype.execute.call(this,e,t):this._execute(e,t)},Xs.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?Qs.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var Qs,Zs=Xs;function Xs(e,t){var r=Qs.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}i.QueueAction=Zs;var Js,Zs={},$s=r&&r.__extends||(Js=function(e,t){return(Js=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Js(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.QueueScheduler=void 0;ec=hs.AsyncScheduler,$s(tc,ec);var ec,$s=tc;function tc(){return null!==ec&&ec.apply(this,arguments)||this}Zs.QueueScheduler=$s,$s=Fs,Object.defineProperty($s,"__esModule",{value:!0}),$s.queue=$s.queueScheduler=void 0,$s.queueScheduler=new Zs.QueueScheduler(i.QueueAction),$s.queue=$s.queueScheduler;var rc,Zs={},i={},$s=r&&r.__extends||(rc=function(e,t){return(rc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}rc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(i,"__esModule",{value:!0}),i.AnimationFrameAction=void 0;var nc,oc=h,h=(nc=O.AsyncAction,$s(ic,nc),ic.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?nc.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=oc.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},ic.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return nc.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(oc.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},ic);function ic(e,t){var r=nc.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}i.AnimationFrameAction=h;var uc,$s={},h=r&&r.__extends||(uc=function(e,t){return(uc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}uc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty($s,"__esModule",{value:!0}),$s.AnimationFrameScheduler=void 0;ac=hs.AsyncScheduler,h(sc,ac),sc.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var ac,h=sc;function sc(){return null!==ac&&ac.apply(this,arguments)||this}$s.AnimationFrameScheduler=h,h=Zs,Object.defineProperty(h,"__esModule",{value:!0}),h.animationFrame=h.animationFrameScheduler=void 0,h.animationFrameScheduler=new $s.AnimationFrameScheduler(i.AnimationFrameAction),h.animationFrame=h.animationFrameScheduler;var cc,lc,$s={},i=r&&r.__extends||(cc=function(e,t){return(cc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}cc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),h=(Object.defineProperty($s,"__esModule",{value:!0}),$s.VirtualAction=$s.VirtualTimeScheduler=void 0,O),fc=m,O=(lc=hs.AsyncScheduler,i(pc,lc),pc.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},pc.frameTimeFactor=10,pc);function pc(e,t){void 0===t&&(t=1/0);var r=lc.call(this,e=void 0===e?hc:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}$s.VirtualTimeScheduler=O;dc=h.AsyncAction,i(bc,dc),bc.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return dc.prototype.schedule.call(this,e,t);this.active=!1;var r=new bc(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return fc.Subscription.EMPTY},bc.prototype.requestAsyncId=function(e,t,r){this.delay=e.frame+(r=void 0===r?0:r);r=e.actions;return r.push(this),r.sort(bc.sortActions),1},bc.prototype.recycleAsyncId=function(e,t,r){},bc.prototype._execute=function(e,t){if(!0===this.active)return dc.prototype._execute.call(this,e,t)},bc.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1};var dc,hc=bc;function bc(e,t,r){void 0===r&&(r=e.index+=1);var n=dc.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}$s.VirtualAction=hc;var yc,_c,hs={},O={},h=(yc=O,Object.defineProperty(yc,"__esModule",{value:!0}),yc.empty=yc.EMPTY=void 0,_c=o,yc.EMPTY=new _c.Observable(function(e){return e.complete()}),yc.empty=function(e){return e?(t=e,new _c.Observable(function(e){return t.schedule(function(){return e.complete()})})):yc.EMPTY;var t},{}),i={},vc={},mc=(Object.defineProperty(vc,"__esModule",{value:!0}),vc.isScheduler=void 0,E);vc.isScheduler=function(e){return e&&mc.isFunction(e.schedule)},Object.defineProperty(i,"__esModule",{value:!0}),i.popNumber=i.popScheduler=i.popResultSelector=void 0;var gc=E,Oc=vc;function wc(e){return e[e.length-1]}i.popResultSelector=function(e){return gc.isFunction(wc(e))?e.pop():void 0},i.popScheduler=function(e){return Oc.isScheduler(wc(e))?e.pop():void 0},i.popNumber=function(e,t){return"number"==typeof wc(e)?e.pop():t};var Ec={},Pc={},Sc={},R={},Tc={},jc=(Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.isArrayLike=void 0,Tc.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),Cc=(Object.defineProperty(jc,"__esModule",{value:!0}),jc.isPromise=void 0,E);jc.isPromise=function(e){return Cc.isFunction(null==e?void 0:e.then)};var Rc={},Ic=(Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.isInteropObservable=void 0,it),Ac=E;Rc.isInteropObservable=function(e){return Ac.isFunction(e[Ic.observable])};var kc={},Mc=(Object.defineProperty(kc,"__esModule",{value:!0}),kc.isAsyncIterable=void 0,E);kc.isAsyncIterable=function(e){return Symbol.asyncIterator&&Mc.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Nc={};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.createInvalidObservableTypeError=void 0,Nc.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")};var xc={},Dc={};function Lc(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.iterator=Dc.getSymbolIterator=void 0,Dc.getSymbolIterator=Lc,Dc.iterator=Lc(),Object.defineProperty(xc,"__esModule",{value:!0}),xc.isIterable=void 0;var Uc=Dc,Fc=E;xc.isIterable=function(e){return Fc.isFunction(null==e?void 0:e[Uc.iterator])};var Bc={},Wc=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},qc=r&&r.__await||function(e){return this instanceof qc?(this.v=e,this):new qc(e)},zc=r&&r.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=r.apply(e,t||[]),i=[],u={};return n("next"),n("throw"),n("return"),u[Symbol.asyncIterator]=function(){return this},u;function n(n){o[n]&&(u[n]=function(r){return new Promise(function(e,t){1<i.push([n,r,e,t])||a(n,r)})})}function a(e,t){try{(r=o[e](t)).value instanceof qc?Promise.resolve(r.value.v).then(s,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},Vc=(Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.isReadableStreamLike=Bc.readableStreamLikeToAsyncGenerator=void 0,E);Bc.readableStreamLikeToAsyncGenerator=function(o){return zc(this,arguments,function(){var t,r,n;return Wc(this,function(e){switch(e.label){case 0:t=o.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,qc(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,qc(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,qc(n)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})},Bc.isReadableStreamLike=function(e){return Vc.isFunction(null==e?void 0:e.getReader)};var Hc=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Gc=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Yc=r&&r.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=u[Symbol.asyncIterator];return t?t.call(u):(u="function"==typeof Kc?Kc(u):u[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(i){e[i]=u[i]&&function(o){return new Promise(function(e,t){var r,n;o=u[i](o),r=e,e=t,n=o.done,t=o.value,Promise.resolve(t).then(function(e){r({value:e,done:n})},e)})}}},Kc=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Zc=(Object.defineProperty(R,"__esModule",{value:!0}),R.fromReadableStreamLike=R.fromAsyncIterable=R.fromIterable=R.fromPromise=R.fromArrayLike=R.fromInteropObservable=R.innerFrom=void 0,Tc),Qc=jc,Xc=o,Jc=Rc,$c=kc,el=Nc,tl=xc,rl=Bc,nl=E,ol=w,il=it;function ul(r){return new Xc.Observable(function(e){var t=r[il.observable]();if(nl.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function al(r){return new Xc.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function sl(e){return new Xc.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,ol.reportUnhandledError)})}function cl(u){return new Xc.Observable(function(e){var t,r;try{for(var n=Kc(u),o=n.next();!o.done;o=n.next()){var i=o.value;if(e.next(i),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}function ll(e){return new Xc.Observable(function(t){!function(r,n){var o,i,u,a;return Hc(this,void 0,void 0,function(){var t;return Gc(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=Yc(r),e.label=1;case 1:return[4,o.next()];case 2:if((i=e.sent()).done)return[3,4];if(t=i.value,n.next(t),n.closed)return[2];e.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return t=e.sent(),u={error:t},[3,11];case 6:return(e.trys.push([6,,9,10]),i&&!i.done&&(a=o.return))?[4,a.call(o)]:[3,8];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}(e,t).catch(function(e){return t.error(e)})})}function fl(e){return ll(rl.readableStreamLikeToAsyncGenerator(e))}R.innerFrom=function(e){if(e instanceof Xc.Observable)return e;if(null!=e){if(Jc.isInteropObservable(e))return ul(e);if(Zc.isArrayLike(e))return al(e);if(Qc.isPromise(e))return sl(e);if($c.isAsyncIterable(e))return ll(e);if(tl.isIterable(e))return cl(e);if(rl.isReadableStreamLike(e))return fl(e)}throw el.createInvalidObservableTypeError(e)},R.fromInteropObservable=ul,R.fromArrayLike=al,R.fromPromise=sl,R.fromIterable=cl,R.fromAsyncIterable=ll,R.fromReadableStreamLike=fl;var w={},pl={};Object.defineProperty(pl,"__esModule",{value:!0}),pl.executeSchedule=void 0,pl.executeSchedule=function(e,t,r,n,o){if(void 0===n&&(n=0),void 0===o&&(o=!1),t=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n),e.add(t),!o)return t},Object.defineProperty(w,"__esModule",{value:!0}),w.observeOn=void 0;var dl=pl,hl=T,bl=j;w.observeOn=function(r,n){return void 0===n&&(n=0),hl.operate(function(e,t){e.subscribe(bl.createOperatorSubscriber(t,function(e){return dl.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return dl.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return dl.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var yl={},_l=(Object.defineProperty(yl,"__esModule",{value:!0}),yl.subscribeOn=void 0,T);yl.subscribeOn=function(r,n){return void 0===n&&(n=0),_l.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.scheduleObservable=void 0;var vl=R,ml=w,gl=yl;Sc.scheduleObservable=function(e,t){return vl.innerFrom(e).pipe(gl.subscribeOn(t),ml.observeOn(t))};var Ol={},wl=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.schedulePromise=void 0,R),El=w,Pl=yl;Ol.schedulePromise=function(e,t){return wl.innerFrom(e).pipe(Pl.subscribeOn(t),El.observeOn(t))};var Sl={},Tl=(Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.scheduleArray=void 0,o);Sl.scheduleArray=function(r,n){return new Tl.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var jl={},Cl=(Object.defineProperty(jl,"__esModule",{value:!0}),jl.scheduleIterable=void 0,o),Rl=Dc,Il=E,Al=pl;jl.scheduleIterable=function(e,t){return new Cl.Observable(function(n){var o;return Al.executeSchedule(n,t,function(){o=e[Rl.iterator](),Al.executeSchedule(n,t,function(){var e,t,r;try{t=(e=o.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)},0,!0)}),function(){return Il.isFunction(null==o?void 0:o.return)&&o.return()}})};var Dc={},kl=(Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.scheduleAsyncIterable=void 0,o),Ml=pl;Dc.scheduleAsyncIterable=function(r,n){if(r)return new kl.Observable(function(t){Ml.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();Ml.executeSchedule(t,n,function(){e.next().then(function(e){e.done?t.complete():t.next(e.value)})},0,!0)})});throw new Error("Iterable cannot be null")};var Nl={},xl=(Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.scheduleReadableStreamLike=void 0,Dc),Dl=Bc;Nl.scheduleReadableStreamLike=function(e,t){return xl.scheduleAsyncIterable(Dl.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.scheduled=void 0;var Ll=Sc,Ul=Ol,Fl=Sl,Bl=jl,Wl=Dc,ql=Rc,zl=jc,Vl=Tc,Hl=xc,Gl=kc,Yl=Nc,Kl=Bc,Zl=Nl;Pc.scheduled=function(e,t){if(null!=e){if(ql.isInteropObservable(e))return Ll.scheduleObservable(e,t);if(Vl.isArrayLike(e))return Fl.scheduleArray(e,t);if(zl.isPromise(e))return Ul.schedulePromise(e,t);if(Gl.isAsyncIterable(e))return Wl.scheduleAsyncIterable(e,t);if(Hl.isIterable(e))return Bl.scheduleIterable(e,t);if(Kl.isReadableStreamLike(e))return Zl.scheduleReadableStreamLike(e,t)}throw Yl.createInvalidObservableTypeError(e)},Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.from=void 0;var Ql=Pc,Xl=R;Ec.from=function(e,t){return t?Ql.scheduled(e,t):Xl.innerFrom(e)},Object.defineProperty(h,"__esModule",{value:!0}),h.of=void 0;var Jl=i,$l=Ec;h.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Jl.popScheduler(e);return $l.from(e,r)};var ef,tf,rf,nf,Sc={},of=(Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.throwError=void 0,o),uf=E;function af(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function sf(e,t){var r,n=e.kind,o=e.value,e=e.error;if("string"!=typeof n)throw new TypeError('Invalid notification, missing "kind"');"N"===n?null!=(r=t.next)&&r.call(t,o):"E"===n?null!=(r=t.error)&&r.call(t,e):null!=(o=t.complete)&&o.call(t)}Sc.throwError=function(e,t){function r(e){return e.error(n())}var n=uf.isFunction(e)?e:function(){return e};return new of.Observable(t?function(e){return t.schedule(r,0,e)}:r)},Ol=hs,Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.observeNotification=Ol.Notification=Ol.NotificationKind=void 0,ef=O,tf=h,rf=Sc,nf=E,(Sl=Ol.NotificationKind||(Ol.NotificationKind={})).NEXT="N",Sl.ERROR="E",Sl.COMPLETE="C",af.prototype.observe=function(e){return sf(this,e)},af.prototype.do=function(e,t,r){var n=this.kind,o=this.value,i=this.error;return"N"===n?null==e?void 0:e(o):"E"===n?null==t?void 0:t(i):null==r?void 0:r()},af.prototype.accept=function(e,t,r){var n;return nf.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},af.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?tf.of(t):"E"===e?rf.throwError(function(){return r}):"C"===e?ef.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},af.createNext=function(e){return new af("N",e)},af.createError=function(e){return new af("E",void 0,e)},af.createComplete=function(){return af.completeNotification},af.completeNotification=new af("C"),Sl=af,Ol.Notification=Sl,Ol.observeNotification=sf;var Dc={},cf=(Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.isObservable=void 0,o),lf=E;Dc.isObservable=function(e){return!!e&&(e instanceof cf.Observable||lf.isFunction(e.lift)&&lf.isFunction(e.subscribe))};var Rc={},jc={},xc=(Object.defineProperty(jc,"__esModule",{value:!0}),jc.EmptyError=void 0,y),ff=(jc.EmptyError=xc.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.lastValueFrom=void 0,jc);Rc.lastValueFrom=function(o,i){var u="object"==typeof i;return new Promise(function(e,t){var r,n=!1;o.subscribe({next:function(e){r=e,n=!0},error:t,complete:function(){n?e(r):u?e(i.defaultValue):t(new ff.EmptyError)}})})};var kc={},pf=(Object.defineProperty(kc,"__esModule",{value:!0}),kc.firstValueFrom=void 0,jc),df=Zr;kc.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new df.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new pf.EmptyError)}});n.subscribe(r)})};var hf,bf,yf,_f,vf,mf,gf,Nc={},Bc=(Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.ArgumentOutOfRangeError=void 0,y),Nl=(Nc.ArgumentOutOfRangeError=Bc.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),Sl=(Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.NotFoundError=void 0,y),Ol=(Nl.NotFoundError=Sl.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),xc=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.SequenceError=void 0,y),Bc=(Ol.SequenceError=xc.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),Sl={};function Of(e){throw new hf.TimeoutError(e)}Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.isValidDate=void 0,Sl.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},hf=Bc,Object.defineProperty(hf,"__esModule",{value:!0}),hf.timeout=hf.TimeoutError=void 0,bf=S,yf=Sl,_f=T,vf=R,mf=j,gf=pl,hf.TimeoutError=y.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),hf.timeout=function(e,t){var a=(e=yf.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Of:r,l=void 0===(r=e.scheduler)?null!=t?t:bf.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return _f.operate(function(e,t){function r(e){n=gf.executeSchedule(t,l,function(){try{u.unsubscribe(),vf.innerFrom(c({meta:f,lastValue:o,seen:i})).subscribe(t)}catch(e){t.error(e)}},e)}var n,o=null,i=0,u=e.subscribe(mf.createOperatorSubscriber(t,function(e){null!=n&&n.unsubscribe(),i++,t.next(o=e),0<s&&r(s)},void 0,void 0,function(){null!=n&&n.closed||null!=n&&n.unsubscribe(),o=null}));i||r(null!=a?"number"==typeof a?a:+a-l.now():s)})};var xc={},y={},wf={},Ef={},Pf=(Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.map=void 0,T),Sf=j;Ef.map=function(n,o){return Pf.operate(function(e,t){var r=0;e.subscribe(Sf.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var Tf=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},jf=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Cf=(Object.defineProperty(wf,"__esModule",{value:!0}),wf.mapOneOrManyArgs=void 0,Ef),Rf=Array.isArray;wf.mapOneOrManyArgs=function(r){return Cf.map(function(e){return t=r,Rf(e=e)?t.apply(void 0,jf([],Tf(e))):t(e);var t})};var If=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Af=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},kf=(Object.defineProperty(y,"__esModule",{value:!0}),y.bindCallbackInternals=void 0,vc),Mf=o,Nf=yl,xf=wf,Df=w,Lf=_;y.bindCallbackInternals=function r(a,s,n,o){if(n){if(!kf.isScheduler(n))return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s,o).apply(this,e).pipe(xf.mapOneOrManyArgs(n))};o=n}return o?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s).apply(this,e).pipe(Nf.subscribeOn(o),Df.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new Lf.AsyncSubject,u=!0;return new Mf.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,Af(Af([],If(r)),[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(a){var r=e.shift();if(null!=r)return void i.error(r)}i.next(1<e.length?e:e[0]),o=!0,n&&i.complete()}])),o&&i.complete(),n=!0),e})}},Object.defineProperty(xc,"__esModule",{value:!0}),xc.bindCallback=void 0;var Uf=y;xc.bindCallback=function(e,t,r){return Uf.bindCallbackInternals(!1,e,t,r)};var Ff={},Bf=(Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.bindNodeCallback=void 0,y);Ff.bindNodeCallback=function(e,t,r){return Bf.bindCallbackInternals(!0,e,t,r)};var y={},Wf={},qf=(Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.argsArgArrayOrObject=void 0,Array.isArray),zf=Object.getPrototypeOf,Vf=Object.prototype,Hf=Object.keys;Wf.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(qf(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&zf(r)===Vf)return{args:(r=Hf(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var Gf={};Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.createObject=void 0,Gf.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(y,"__esModule",{value:!0}),y.combineLatestInit=y.combineLatest=void 0;var Yf=o,Kf=Wf,Zf=Ec,Qf=p,Xf=wf,Jf=i,$f=Gf,ep=j,tp=pl;function rp(a,s,c){return void 0===c&&(c=Qf.identity),function(u){np(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){np(s,function(){var e=Zf.from(a[r],s),t=!1;e.subscribe(ep.createOperatorSubscriber(u,function(e){n[r]=e,t||(t=!0,i--),i||u.next(c(n.slice()))},function(){--o||u.complete()}))},u)}(t)},u)}}function np(e,t,r){e?tp.executeSchedule(r,e,t):t()}y.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Jf.popScheduler(e),n=Jf.popResultSelector(e),o=Kf.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?Zf.from([],r):(o=new Yf.Observable(rp(i,r,u?function(e){return $f.createObject(u,e)}:Qf.identity)),n?o.pipe(Xf.mapOneOrManyArgs(n)):o)},y.combineLatestInit=rp;var op={},ip={},up={},ap={},sp={},cp=(Object.defineProperty(sp,"__esModule",{value:!0}),sp.mergeInternals=void 0,R),lp=pl,fp=j;sp.mergeInternals=function(e,r,n,o,i,u,a,t){var s=[],c=0,l=0,f=function(){s.length||c||r.complete()},p=function(e){return c<o?d(e):s.push(e)},d=function(e){u&&r.next(e),c++;var t=!1;cp.innerFrom(n(e,l++)).subscribe(fp.createOperatorSubscriber(r,function(e){null!=i&&i(e),u?p(e):r.next(e)},function(){t=!0},void 0,function(){if(t)try{c--;for(;s.length&&c<o;)!function(){var e=s.shift();a?lp.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(fp.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(ap,"__esModule",{value:!0}),ap.mergeMap=void 0;var pp=Ef,dp=R,hp=T,bp=sp,yp=E;ap.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),yp.isFunction(i)?e(function(r,n){return pp.map(function(e,t){return i(r,e,n,t)})(dp.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),hp.operate(function(e,t){return bp.mergeInternals(e,t,o,r)}))},Object.defineProperty(up,"__esModule",{value:!0}),up.mergeAll=void 0;var _p=ap,vp=p;up.mergeAll=function(e){return _p.mergeMap(vp.identity,e=void 0===e?1/0:e)},Object.defineProperty(ip,"__esModule",{value:!0}),ip.concatAll=void 0;var mp=up;ip.concatAll=function(){return mp.mergeAll(1)},Object.defineProperty(op,"__esModule",{value:!0}),op.concat=void 0;var gp=ip,Op=i,wp=Ec;op.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return gp.concatAll()(wp.from(e,Op.popScheduler(e)))};var Ep={},Pp={},Sp=(Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.defer=void 0,o),Tp=R;Pp.defer=function(t){return new Sp.Observable(function(e){Tp.innerFrom(t()).subscribe(e)})},Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.connectable=void 0;var jp=t,Cp=o,Rp=Pp,Ip={connector:function(){return new jp.Subject},resetOnDisconnect:!0};Ep.connectable=function(e,t){var r=null,n=(t=void 0===t?Ip:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new Cp.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=Rp.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var Ap={},kp=(Object.defineProperty(Ap,"__esModule",{value:!0}),Ap.forkJoin=void 0,o),Mp=Wf,Np=R,xp=i,Dp=j,Lp=wf,Up=Gf;Ap.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xp.popResultSelector(e),u=(n=Mp.argsArgArrayOrObject(e)).args,a=n.keys,n=new kp.Observable(function(e){var t=u.length;if(t)for(var n=new Array(t),o=t,i=t,r=0;r<t;r++)!function(t){var r=!1;Np.innerFrom(u[t]).subscribe(Dp.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?Up.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Lp.mapOneOrManyArgs(r)):n};var Wf={},Fp=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Bp=(Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.fromEvent=void 0,R),Wp=o,qp=ap,zp=Tc,Vp=E,Hp=wf,Gp=["addListener","removeListener"],Yp=["addEventListener","removeEventListener"],Kp=["on","off"];function Zp(r,n){return function(t){return function(e){return r[t](n,e)}}}Wf.fromEvent=function t(r,n,o,e){if(Vp.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(Hp.mapOneOrManyArgs(e));var e=Fp((e=r,Vp.isFunction(e.addEventListener)&&Vp.isFunction(e.removeEventListener)?Yp.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,Vp.isFunction(e.addListener)&&Vp.isFunction(e.removeListener)?Gp.map(Zp(r,n)):(e=r,Vp.isFunction(e.on)&&Vp.isFunction(e.off)?Kp.map(Zp(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&zp.isArrayLike(r))return qp.mergeMap(function(e){return t(e,n,o)})(Bp.innerFrom(r));if(i)return new Wp.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1<e.length?e:e[0])}return i(e),function(){return u(e)}});throw new TypeError("Invalid event target")};var Gf={},Qp=(Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.fromEventPattern=void 0,o),Xp=E,Jp=wf;Gf.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(Jp.mapOneOrManyArgs(t)):new Qp.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1===e.length?e[0]:e)}var t=n(e);return Xp.isFunction(o)?function(){return o(e,t)}:void 0})};var Tc={},$p=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ed=(Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.generate=void 0,p),td=vc,rd=Pp,nd=jl;Tc.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return $p(this,function(e){switch(e.label){case 0:t=a,e.label=1;case 1:return r&&!r(t)?[3,4]:[4,u(t)];case 2:e.sent(),e.label=3;case 3:return t=n(t),[3,1];case 4:return[2]}})}return 1===arguments.length?(a=e.initialState,r=e.condition,n=e.iterate,i=e.resultSelector,u=void 0===i?ed.identity:i,o=e.scheduler):(a=e,!t||td.isScheduler(t)?(u=ed.identity,o=t):u=t),rd.defer(o?function(){return nd.scheduleIterable(s(),o)}:s)};var jl={},od=(Object.defineProperty(jl,"__esModule",{value:!0}),jl.iif=void 0,Pp);jl.iif=function(e,t,r){return od.defer(function(){return e()?t:r})};var id={},ud={},ad=(Object.defineProperty(ud,"__esModule",{value:!0}),ud.timer=void 0,o),sd=S,cd=vc,ld=Sl;ud.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=sd.async);var i=-1;return null!=e&&(cd.isScheduler(e)?o=e:i=e),new ad.Observable(function(e){var t=ld.isValidDate(n)?+n-o.now():n,r=0;return o.schedule(function(){e.closed||(e.next(r++),0<=i?this.schedule(void 0,i):e.complete())},t=t<0?0:t)})},Object.defineProperty(id,"__esModule",{value:!0}),id.interval=void 0;var fd=S,pd=ud;id.interval=function(e,t){return pd.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?fd.asyncScheduler:t)};var vc={},dd=(Object.defineProperty(vc,"__esModule",{value:!0}),vc.merge=void 0,up),hd=R,bd=O,yd=i,_d=Ec;vc.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=yd.popScheduler(e),n=yd.popNumber(e,1/0),o=e;return o.length?1===o.length?hd.innerFrom(o[0]):dd.mergeAll(n)(_d.from(o,r)):bd.EMPTY};var vd,md={},gd=(vd=md,Object.defineProperty(vd,"__esModule",{value:!0}),vd.never=vd.NEVER=void 0,vd.NEVER=new o.Observable(g.noop),vd.never=function(){return vd.NEVER},{}),Od={},wd=(Object.defineProperty(Od,"__esModule",{value:!0}),Od.argsOrArgArray=void 0,Array.isArray);Od.argsOrArgArray=function(e){return 1===e.length&&wd(e[0])?e[0]:e},Object.defineProperty(gd,"__esModule",{value:!0}),gd.onErrorResumeNext=void 0;var Ed=o,Pd=Od,Sd=j,Td=g,jd=R;gd.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Pd.argsOrArgArray(e);return new Ed.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=jd.innerFrom(i[n++])}catch(e){return void o()}var t=new Sd.OperatorSubscriber(r,void 0,Td.noop,Td.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var Cd={},Rd=(Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.pairs=void 0,Ec);Cd.pairs=function(e,t){return Rd.from(Object.entries(e),t)};var Id={},Ad={};Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.not=void 0,Ad.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var kd={},Md=(Object.defineProperty(kd,"__esModule",{value:!0}),kd.filter=void 0,T),Nd=j;kd.filter=function(n,o){return Md.operate(function(e,t){var r=0;e.subscribe(Nd.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Id,"__esModule",{value:!0}),Id.partition=void 0;var xd=Ad,Dd=kd,Ld=R;Id.partition=function(e,t,r){return[Dd.filter(t,r)(Ld.innerFrom(e)),Dd.filter(xd.not(t,r))(Ld.innerFrom(e))]};var Ud={},Fd=(Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.raceInit=Ud.race=void 0,o),Bd=R,Wd=Od,qd=j;function zd(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(Bd.innerFrom(t[r]).subscribe(qd.createOperatorSubscriber(n,function(e){if(o){for(var t=0;t<o.length;t++)t!==r&&o[t].unsubscribe();o=null}n.next(e)})))}(e)}}Ud.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=Wd.argsOrArgArray(e)).length?Bd.innerFrom(e[0]):new Fd.Observable(zd(e))},Ud.raceInit=zd;var Vd={},Hd=(Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.range=void 0,o),Gd=O;Vd.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return Gd.EMPTY;var o=e+r;return new Hd.Observable(n?function(e){var t=r;return n.schedule(function(){t<o?(e.next(t++),this.schedule()):e.complete()})}:function(e){for(var t=r;t<o&&!e.closed;)e.next(t++);e.complete()})};var Yd={},Kd=(Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.using=void 0,o),Zd=R,Qd=O;Yd.using=function(n,o){return new Kd.Observable(function(e){var t=n(),r=o(t);return(r?Zd.innerFrom(r):Qd.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var Xd={},Jd=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},$d=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},eh=(Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.zip=void 0,o),th=R,rh=Od,nh=O,oh=j,ih=i;Xd.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=ih.popResultSelector(e),u=rh.argsOrArgArray(e);return u.length?new eh.Observable(function(r){for(var n=u.map(function(){return[]}),o=u.map(function(){return!1}),e=(r.add(function(){n=o=null}),0);!r.closed&&e<u.length;e++)!function(t){th.innerFrom(u[t]).subscribe(oh.createOperatorSubscriber(r,function(e){n[t].push(e),n.every(function(e){return e.length})&&(e=n.map(function(e){return e.shift()}),r.next(i?i.apply(void 0,$d([],Jd(e))):e),n.some(function(e,t){return!e.length&&o[t]})&&r.complete())},function(){o[t]=!0,n[t].length||r.complete()}))}(e);return function(){n=o=null}}):nh.EMPTY};var uh={},ah=(Object.defineProperty(uh,"__esModule",{value:!0}),{}),sh=(Object.defineProperty(ah,"__esModule",{value:!0}),ah.audit=void 0,T),ch=R,lh=j;ah.audit=function(s){return sh.operate(function(e,t){function r(){var e;null!=u&&u.unsubscribe(),u=null,o&&(o=!1,e=i,i=null,t.next(e)),a&&t.complete()}function n(){u=null,a&&t.complete()}var o=!1,i=null,u=null,a=!1;e.subscribe(lh.createOperatorSubscriber(t,function(e){o=!0,i=e,u||ch.innerFrom(s(e)).subscribe(u=lh.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var fh={},ph=(Object.defineProperty(fh,"__esModule",{value:!0}),fh.auditTime=void 0,S),dh=ah,hh=ud;fh.auditTime=function(e,t){return void 0===t&&(t=ph.asyncScheduler),dh.audit(function(){return hh.timer(e,t)})};var bh={},yh=(Object.defineProperty(bh,"__esModule",{value:!0}),bh.buffer=void 0,T),_h=g,vh=j,mh=R;bh.buffer=function(n){return yh.operate(function(e,t){var r=[];return e.subscribe(vh.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),mh.innerFrom(n).subscribe(vh.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},_h.noop)),function(){r=null}})};var gh={},Oh=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},wh=(Object.defineProperty(gh,"__esModule",{value:!0}),gh.bufferCount=void 0,T),Eh=j,Ph=v;gh.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,wh.operate(function(e,f){var p=[],d=0;e.subscribe(Eh.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=Oh(p),a=u.next();!a.done;a=u.next())(l=a.value).push(e),h<=l.length&&(i=null!=i?i:[]).push(l)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}if(i)try{for(var s=Oh(i),c=s.next();!c.done;c=s.next()){var l=c.value;Ph.arrRemove(p,l),f.next(l)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},function(){var t,e;try{for(var r=Oh(p),n=r.next();!n.done;n=r.next()){var o=n.value;f.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}f.complete()},void 0,function(){p=null}))})};var Sh={},Th=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},jh=(Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.bufferTime=void 0,m),Ch=T,Rh=j,Ih=v,Ah=S,kh=i,Mh=pl;Sh.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=kh.popScheduler(t))?e:Ah.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return Ch.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Ih.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new jh.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),Mh.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?Mh.executeSchedule(r,u,o,a,!0):n=!0,o(),Rh.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=Th(n),i=o.next();!i.done;i=o.next()){var u=i.value,a=u.buffer;a.push(e),l<=a.length&&c(u)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;null!=s&&s.length;)r.next(s.shift().buffer);null!=t&&t.unsubscribe(),r.complete(),r.unsubscribe()},void 0,function(){return s=null}));e.subscribe(t)})};var Nh={},xh=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Dh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.bufferToggle=void 0,m),Lh=T,Uh=R,Fh=j,Bh=g,Wh=v;Nh.bufferToggle=function(t,o){return Lh.operate(function(e,n){var i=[];Uh.innerFrom(t).subscribe(Fh.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new Dh.Subscription);r.add(Uh.innerFrom(o(e)).subscribe(Fh.createOperatorSubscriber(n,function(){Wh.arrRemove(i,t),n.next(t),r.unsubscribe()},Bh.noop)))},Bh.noop)),e.subscribe(Fh.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=xh(i),o=n.next();!o.done;o=n.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},function(){for(;0<i.length;)n.next(i.shift());n.complete()}))})};var qh={},zh=(Object.defineProperty(qh,"__esModule",{value:!0}),qh.bufferWhen=void 0,T),Vh=g,Hh=j,Gh=R;qh.bufferWhen=function(i){return zh.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),Gh.innerFrom(i()).subscribe(n=Hh.createOperatorSubscriber(t,o,Vh.noop))};o(),e.subscribe(Hh.createOperatorSubscriber(t,function(e){return null==r?void 0:r.push(e)},function(){r&&t.next(r),t.complete()},void 0,function(){return r=n=null}))})};var Yh={},Kh=(Object.defineProperty(Yh,"__esModule",{value:!0}),Yh.catchError=void 0,R),Zh=j,Qh=T;Yh.catchError=function u(a){return Qh.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(Zh.createOperatorSubscriber(r,void 0,void 0,function(e){n=Kh.innerFrom(a(e,u(a)(t))),o?(o.unsubscribe(),o=null,n.subscribe(r)):i=!0}));i&&(o.unsubscribe(),o=null,n.subscribe(r))})};var Xh={},Jh={},I={},$h={},eb={},tb={},rb=(Object.defineProperty(tb,"__esModule",{value:!0}),tb.scanInternals=void 0,j);tb.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(rb.createOperatorSubscriber(r,function(e){var t=i++;o=n?u(o,e,t):(n=!0,e),s&&r.next(o)},c&&function(){n&&r.next(o),r.complete()}))}},Object.defineProperty(eb,"__esModule",{value:!0}),eb.reduce=void 0;var nb=tb,ob=T;eb.reduce=function(e,t){return ob.operate(nb.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty($h,"__esModule",{value:!0}),$h.toArray=void 0;function ib(e,t){return e.push(t),e}var ub=eb,ab=T;$h.toArray=function(){return ab.operate(function(e,t){ub.reduce(ib,[])(e).subscribe(t)})},Object.defineProperty(I,"__esModule",{value:!0}),I.joinAllInternals=void 0;var sb=p,cb=wf,lb=c,fb=ap,pb=$h;I.joinAllInternals=function(t,e){return lb.pipe(pb.toArray(),fb.mergeMap(function(e){return t(e)}),e?cb.mapOneOrManyArgs(e):sb.identity)},Object.defineProperty(Jh,"__esModule",{value:!0}),Jh.combineLatestAll=void 0;var db=y,hb=I;Jh.combineLatestAll=function(e){return hb.joinAllInternals(db.combineLatest,e)},Object.defineProperty(Xh,"__esModule",{value:!0}),Xh.combineAll=void 0;Xh.combineAll=Jh.combineLatestAll;var bb={},yb={},_b=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},vb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},mb=(Object.defineProperty(yb,"__esModule",{value:!0}),yb.combineLatest=void 0,y),gb=T,Ob=Od,wb=wf,Eb=c,Pb=i;function Sb(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Pb.popResultSelector(r);return t?Eb.pipe(Sb.apply(void 0,vb([],_b(r))),wb.mapOneOrManyArgs(t)):gb.operate(function(e,t){mb.combineLatestInit(vb([e],_b(Ob.argsOrArgArray(r))))(t)})}yb.combineLatest=Sb;var Tb=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},jb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Cb=(Object.defineProperty(bb,"__esModule",{value:!0}),bb.combineLatestWith=void 0,yb);bb.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Cb.combineLatest.apply(void 0,jb([],Tb(e)))};var wf={},Rb=(Object.defineProperty(wf,"__esModule",{value:!0}),wf.concatMap=void 0,ap),Ib=E;wf.concatMap=function(e,t){return Ib.isFunction(t)?Rb.mergeMap(e,t,1):Rb.mergeMap(e,1)};var Ab={},kb=(Object.defineProperty(Ab,"__esModule",{value:!0}),Ab.concatMapTo=void 0,wf),Mb=E;Ab.concatMapTo=function(e,t){return Mb.isFunction(t)?kb.concatMap(function(){return e},t):kb.concatMap(function(){return e})};var Nb={},xb={},Db=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Lb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Ub=(Object.defineProperty(xb,"__esModule",{value:!0}),xb.concat=void 0,T),Fb=ip,Bb=i,Wb=Ec;xb.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Bb.popScheduler(r);return Ub.operate(function(e,t){Fb.concatAll()(Wb.from(Lb([e],Db(r)),n)).subscribe(t)})};var qb=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},zb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Vb=(Object.defineProperty(Nb,"__esModule",{value:!0}),Nb.concatWith=void 0,xb);Nb.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vb.concat.apply(void 0,zb([],qb(e)))};var Hb={},Gb={},Yb=(Object.defineProperty(Gb,"__esModule",{value:!0}),Gb.fromSubscribable=void 0,o);Gb.fromSubscribable=function(t){return new Yb.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(Hb,"__esModule",{value:!0}),Hb.connect=void 0;var Kb=t,Zb=R,Qb=T,Xb=Gb,Jb={connector:function(){return new Kb.Subject}};Hb.connect=function(n,e){var o=(e=void 0===e?Jb:e).connector;return Qb.operate(function(e,t){var r=o();Zb.innerFrom(n(Xb.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var Gb={},$b=(Object.defineProperty(Gb,"__esModule",{value:!0}),Gb.count=void 0,eb);Gb.count=function(n){return $b.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var ey={},ty=(Object.defineProperty(ey,"__esModule",{value:!0}),ey.debounce=void 0,T),ry=g,ny=j,oy=R;ey.debounce=function(u){return ty.operate(function(e,t){function r(){var e;null!=i&&i.unsubscribe(),i=null,n&&(n=!1,e=o,o=null,t.next(e))}var n=!1,o=null,i=null;e.subscribe(ny.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=ny.createOperatorSubscriber(t,r,ry.noop),oy.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var iy={},uy=(Object.defineProperty(iy,"__esModule",{value:!0}),iy.debounceTime=void 0,S),ay=T,sy=j;iy.debounceTime=function(a,s){return void 0===s&&(s=uy.asyncScheduler),ay.operate(function(e,r){var n=null,t=null,o=null,i=function(){var e;n&&(n.unsubscribe(),e=t,t=n=null,r.next(e))};function u(){var e=o+a,t=s.now();if(t<e)return n=this.schedule(void 0,e-t),void r.add(n);i()}e.subscribe(sy.createOperatorSubscriber(r,function(e){t=e,o=s.now(),n||(n=s.schedule(u,a),r.add(n))},function(){i(),r.complete()},void 0,function(){t=n=null}))})};var cy={},ly=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.defaultIfEmpty=void 0,T),fy=j;cy.defaultIfEmpty=function(n){return ly.operate(function(e,t){var r=!1;e.subscribe(fy.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var A={},py={},dy={},hy=(Object.defineProperty(dy,"__esModule",{value:!0}),dy.take=void 0,O),by=T,yy=j;dy.take=function(n){return n<=0?function(){return hy.EMPTY}:by.operate(function(e,t){var r=0;e.subscribe(yy.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var _y={},vy=(Object.defineProperty(_y,"__esModule",{value:!0}),_y.ignoreElements=void 0,T),my=j,gy=g;_y.ignoreElements=function(){return vy.operate(function(e,t){e.subscribe(my.createOperatorSubscriber(t,gy.noop))})};var Oy={},wy=(Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.mapTo=void 0,Ef);Oy.mapTo=function(e){return wy.map(function(){return e})},Object.defineProperty(py,"__esModule",{value:!0}),py.delayWhen=void 0;var Ey=op,Py=dy,Sy=_y,Ty=Oy,jy=ap,Cy=R;py.delayWhen=function t(r,n){return n?function(e){return Ey.concat(n.pipe(Py.take(1),Sy.ignoreElements()),e.pipe(t(r)))}:jy.mergeMap(function(e,t){return Cy.innerFrom(r(e,t)).pipe(Py.take(1),Ty.mapTo(e))})},Object.defineProperty(A,"__esModule",{value:!0}),A.delay=void 0;var Ry=S,Iy=py,Ay=ud;A.delay=function(e,t){var r=Ay.timer(e,t=void 0===t?Ry.asyncScheduler:t);return Iy.delayWhen(function(){return r})};var ky={},My=(Object.defineProperty(ky,"__esModule",{value:!0}),ky.dematerialize=void 0,hs),Ny=T,xy=j;ky.dematerialize=function(){return Ny.operate(function(e,t){e.subscribe(xy.createOperatorSubscriber(t,function(e){return My.observeNotification(e,t)}))})};var Dy={},Ly=(Object.defineProperty(Dy,"__esModule",{value:!0}),Dy.distinct=void 0,T),Uy=j,Fy=g,By=R;Dy.distinct=function(o,t){return Ly.operate(function(e,r){var n=new Set;e.subscribe(Uy.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&By.innerFrom(t).subscribe(Uy.createOperatorSubscriber(r,function(){return n.clear()},Fy.noop))})};var Wy={},qy=(Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.distinctUntilChanged=void 0,p),zy=T,Vy=j;function Hy(e,t){return e===t}Wy.distinctUntilChanged=function(i,u){return void 0===u&&(u=qy.identity),i=null!=i?i:Hy,zy.operate(function(e,r){var n,o=!0;e.subscribe(Vy.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var Gy={},Yy=(Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.distinctUntilKeyChanged=void 0,Wy);Gy.distinctUntilKeyChanged=function(r,n){return Yy.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var Ky={},Zy={},Qy=(Object.defineProperty(Zy,"__esModule",{value:!0}),Zy.throwIfEmpty=void 0,jc),Xy=T,Jy=j;function $y(){return new Qy.EmptyError}Zy.throwIfEmpty=function(n){return void 0===n&&(n=$y),Xy.operate(function(e,t){var r=!1;e.subscribe(Jy.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(Ky,"__esModule",{value:!0}),Ky.elementAt=void 0;var e_=Nc,t_=kd,r_=Zy,n_=cy,o_=dy;Ky.elementAt=function(r,t){if(r<0)throw new e_.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(t_.filter(function(e,t){return t===r}),o_.take(1),n?n_.defaultIfEmpty(t):r_.throwIfEmpty(function(){return new e_.ArgumentOutOfRangeError}))}};var i_={},u_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},a_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},s_=(Object.defineProperty(i_,"__esModule",{value:!0}),i_.endWith=void 0,op),c_=h;i_.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return s_.concat(e,c_.of.apply(void 0,a_([],u_(t))))}};var l_={},f_=(Object.defineProperty(l_,"__esModule",{value:!0}),l_.every=void 0,T),p_=j;l_.every=function(o,i){return f_.operate(function(t,r){var n=0;t.subscribe(p_.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var d_={},h_={},b_={},y_=(Object.defineProperty(b_,"__esModule",{value:!0}),b_.exhaustMap=void 0,Ef),__=R,v_=T,m_=j;b_.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return __.innerFrom(i(r,n)).pipe(y_.map(function(e,t){return o(r,e,n,t)}))}))}:v_.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(m_.createOperatorSubscriber(t,function(e){n||(n=m_.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),__.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(h_,"__esModule",{value:!0}),h_.exhaustAll=void 0;var g_=b_,O_=p;h_.exhaustAll=function(){return g_.exhaustMap(O_.identity)},Object.defineProperty(d_,"__esModule",{value:!0}),d_.exhaust=void 0;d_.exhaust=h_.exhaustAll;var w_={},E_=(Object.defineProperty(w_,"__esModule",{value:!0}),w_.expand=void 0,T),P_=sp;w_.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,E_.operate(function(e,t){return P_.mergeInternals(e,t,r,n,void 0,!0,o)})};var S_={},T_=(Object.defineProperty(S_,"__esModule",{value:!0}),S_.finalize=void 0,T);S_.finalize=function(r){return T_.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var j_={},C_=(Object.defineProperty(j_,"__esModule",{value:!0}),j_.createFind=j_.find=void 0,T),R_=j;function I_(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(R_.createOperatorSubscriber(n,function(e){var t=o++;i.call(u,e,t,r)&&(n.next(a?t:e),n.complete())},function(){n.next(a?-1:void 0),n.complete()}))}}j_.find=function(e,t){return C_.operate(I_(e,t,"value"))},j_.createFind=I_;var A_={},k_=(Object.defineProperty(A_,"__esModule",{value:!0}),A_.findIndex=void 0,T),M_=j_;A_.findIndex=function(e,t){return k_.operate(M_.createFind(e,t,"index"))};var N_={},x_=(Object.defineProperty(N_,"__esModule",{value:!0}),N_.first=void 0,jc),D_=kd,L_=dy,U_=cy,F_=Zy,B_=p;N_.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?D_.filter(function(e,t){return n(e,t,r)}):B_.identity,L_.take(1),t?U_.defaultIfEmpty(e):F_.throwIfEmpty(function(){return new x_.EmptyError}))}};var W_={},q_=(Object.defineProperty(W_,"__esModule",{value:!0}),W_.groupBy=void 0,o),z_=R,V_=t,H_=T,G_=j;W_.groupBy=function(b,t,y,_){return H_.operate(function(e,s){function c(t){return r(function(e){return e.error(t)})}t&&"function"!=typeof t?(y=t.duration,l=t.element,_=t.connector):l=t;var l,f=new Map,r=function(e){f.forEach(e),e(s)},p=0,d=!1,h=new G_.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new V_.Subject),i=n,u=o,(a=new q_.Observable(function(e){p++;var t=u.subscribe(e);return function(){t.unsubscribe(),0==--p&&d&&h.unsubscribe()}})).key=i,t=a,s.next(t),y&&(r=G_.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(z_.innerFrom(y(t)).subscribe(r)))),o.next(l?l(e):e)}catch(e){c(e)}var i,u,a},function(){return r(function(e){return e.complete()})},c,function(){return f.clear()},function(){return d=!0,0===p});e.subscribe(h)})};var Y_={},K_=(Object.defineProperty(Y_,"__esModule",{value:!0}),Y_.isEmpty=void 0,T),Z_=j;Y_.isEmpty=function(){return K_.operate(function(e,t){e.subscribe(Z_.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var Q_={},X_={},J_=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$_=(Object.defineProperty(X_,"__esModule",{value:!0}),X_.takeLast=void 0,O),ev=T,tv=j;X_.takeLast=function(t){return t<=0?function(){return $_.EMPTY}:ev.operate(function(e,i){var u=[];e.subscribe(tv.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=J_(u),n=r.next();!n.done;n=r.next()){var o=n.value;i.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}i.complete()},void 0,function(){u=null}))})},Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.last=void 0;var rv=jc,nv=kd,ov=X_,iv=Zy,uv=cy,av=p;Q_.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?nv.filter(function(e,t){return n(e,t,r)}):av.identity,ov.takeLast(1),t?uv.defaultIfEmpty(e):iv.throwIfEmpty(function(){return new rv.EmptyError}))}};var sv={},cv=(Object.defineProperty(sv,"__esModule",{value:!0}),sv.materialize=void 0,hs),lv=T,fv=j;sv.materialize=function(){return lv.operate(function(e,t){e.subscribe(fv.createOperatorSubscriber(t,function(e){t.next(cv.Notification.createNext(e))},function(){t.next(cv.Notification.createComplete()),t.complete()},function(e){t.next(cv.Notification.createError(e)),t.complete()}))})};var pv={},dv=(Object.defineProperty(pv,"__esModule",{value:!0}),pv.max=void 0,eb),hv=E;pv.max=function(r){return dv.reduce(hv.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var bv={},yv=(Object.defineProperty(bv,"__esModule",{value:!0}),bv.flatMap=void 0,ap),yv=(bv.flatMap=yv.mergeMap,{}),_v=(Object.defineProperty(yv,"__esModule",{value:!0}),yv.mergeMapTo=void 0,ap),vv=E;yv.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),vv.isFunction(t)?_v.mergeMap(function(){return e},t,r):_v.mergeMap(function(){return e},r="number"==typeof t?t:r)};var mv={},gv=(Object.defineProperty(mv,"__esModule",{value:!0}),mv.mergeScan=void 0,T),Ov=sp;mv.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),gv.operate(function(e,t){var r=o;return Ov.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var sp={},wv={},Ev=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Pv=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Sv=(Object.defineProperty(wv,"__esModule",{value:!0}),wv.merge=void 0,T),Tv=Od,jv=up,Cv=i,Rv=Ec;wv.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Cv.popScheduler(r),o=Cv.popNumber(r,1/0),r=Tv.argsOrArgArray(r);return Sv.operate(function(e,t){jv.mergeAll(o)(Rv.from(Pv([e],Ev(r)),n)).subscribe(t)})};var Iv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Av=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},kv=(Object.defineProperty(sp,"__esModule",{value:!0}),sp.mergeWith=void 0,wv);sp.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return kv.merge.apply(void 0,Av([],Iv(e)))};var Mv={},Nv=(Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.min=void 0,eb),xv=E;Mv.min=function(r){return Nv.reduce(xv.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var Dv={},Lv=(Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.multicast=void 0,pn),Uv=E,Fv=Hb;Dv.multicast=function(e,t){var r=Uv.isFunction(e)?e:function(){return e};return Uv.isFunction(t)?Fv.connect(t,{connector:r}):function(e){return new Lv.ConnectableObservable(e,r)}};var Bv={},Wv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},qv=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},zv=(Object.defineProperty(Bv,"__esModule",{value:!0}),Bv.onErrorResumeNext=Bv.onErrorResumeNextWith=void 0,Od),Vv=gd;function Hv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=zv.argsOrArgArray(e);return function(e){return Vv.onErrorResumeNext.apply(void 0,qv([e],Wv(r)))}}Bv.onErrorResumeNextWith=Hv,Bv.onErrorResumeNext=Hv;var Gv={},Yv=(Object.defineProperty(Gv,"__esModule",{value:!0}),Gv.pairwise=void 0,T),Kv=j;Gv.pairwise=function(){return Yv.operate(function(e,r){var n,o=!1;e.subscribe(Kv.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var Zv={},Qv=(Object.defineProperty(Zv,"__esModule",{value:!0}),Zv.pluck=void 0,Ef);Zv.pluck=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];var i=o.length;if(0===i)throw new Error("list of properties cannot be empty.");return Qv.map(function(e){for(var t=e,r=0;r<i;r++){var n=null==t?void 0:t[o[r]];if(void 0===n)return;t=n}return t})};var Xv={},Jv=(Object.defineProperty(Xv,"__esModule",{value:!0}),Xv.publish=void 0,t),$v=Dv,em=Hb;Xv.publish=function(t){return t?function(e){return em.connect(t)(e)}:function(e){return $v.multicast(new Jv.Subject)(e)}};var tm={},rm=(Object.defineProperty(tm,"__esModule",{value:!0}),tm.publishBehavior=void 0,P),nm=pn;tm.publishBehavior=function(r){return function(e){var t=new rm.BehaviorSubject(r);return new nm.ConnectableObservable(e,function(){return t})}};var om={},im=(Object.defineProperty(om,"__esModule",{value:!0}),om.publishLast=void 0,_),um=pn;om.publishLast=function(){return function(e){var t=new im.AsyncSubject;return new um.ConnectableObservable(e,function(){return t})}};var am={},sm=(Object.defineProperty(am,"__esModule",{value:!0}),am.publishReplay=void 0,s),cm=Dv,lm=E;am.publishReplay=function(t,r,e,n){e&&!lm.isFunction(e)&&(n=e);var o=lm.isFunction(e)?e:void 0;return function(e){return cm.multicast(new sm.ReplaySubject(t,r,n),o)(e)}};var fm={},pm=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},dm=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},hm=(Object.defineProperty(fm,"__esModule",{value:!0}),fm.raceWith=void 0,Ud),bm=T,ym=p;fm.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?bm.operate(function(e,t){hm.raceInit(dm([e],pm(r)))(t)}):ym.identity};var _m={},vm=(Object.defineProperty(_m,"__esModule",{value:!0}),_m.repeat=void 0,O),mm=T,gm=j,Om=R,wm=ud;_m.repeat=function(e){var t,a,s=1/0;return null!=e&&("object"==typeof e?(t=e.count,s=void 0===t?1/0:t,a=e.delay):s=e),s<=0?function(){return vm.EMPTY}:mm.operate(function(t,r){function n(){var e=!1;o=t.subscribe(gm.createOperatorSubscriber(r,void 0,function(){++i<s?o?u():e=!0:r.complete()})),e&&u()}var o,i=0,u=function(){var e,t;null!=o&&o.unsubscribe(),(o=null)!=a?(e="number"==typeof a?wm.timer(a):Om.innerFrom(a(i)),t=gm.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var Em={},Pm=(Object.defineProperty(Em,"__esModule",{value:!0}),Em.repeatWhen=void 0,R),Sm=t,Tm=T,jm=j;Em.repeatWhen=function(l){return Tm.operate(function(e,t){var r,n,o=!1,i=!1,u=!1,a=function(){return u&&i&&(t.complete(),!0)},s=function(){return n||(n=new Sm.Subject,Pm.innerFrom(l(n)).subscribe(jm.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(jm.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var Cm={},Rm=(Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.retry=void 0,T),Im=j,Am=p,km=ud,Mm=R;Cm.retry=function(e){var t=(e=(e=void 0===e?1/0:e)&&"object"==typeof e?e:{count:e}).count,c=void 0===t?1/0:t,l=e.delay,r=void 0!==(t=e.resetOnSuccess)&&t;return c<=0?Am.identity:Rm.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(Im.createOperatorSubscriber(i,function(e){r&&(a=0),i.next(e)},void 0,function(e){var t,r,n;a++<c?(t=function(){u?(u.unsubscribe(),u=null,s()):o=!0},null!=l?(r="number"==typeof l?km.timer(l):Mm.innerFrom(l(e,a)),n=Im.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var Nm={},xm=(Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.retryWhen=void 0,R),Dm=t,Lm=T,Um=j;Nm.retryWhen=function(u){return Lm.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(Um.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new Dm.Subject,xm.innerFrom(u(n)).subscribe(Um.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var Fm={},Bm=(Object.defineProperty(Fm,"__esModule",{value:!0}),Fm.sample=void 0,R),Wm=T,qm=g,zm=j;Fm.sample=function(o){return Wm.operate(function(e,t){var r=!1,n=null;e.subscribe(zm.createOperatorSubscriber(t,function(e){r=!0,n=e})),Bm.innerFrom(o).subscribe(zm.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},qm.noop))})};var Vm={},Hm=(Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.sampleTime=void 0,S),Gm=Fm,Ym=id;Vm.sampleTime=function(e,t){return Gm.sample(Ym.interval(e,t=void 0===t?Hm.asyncScheduler:t))};var Km={},Zm=(Object.defineProperty(Km,"__esModule",{value:!0}),Km.scan=void 0,T),Qm=tb;Km.scan=function(e,t){return Zm.operate(Qm.scanInternals(e,t,2<=arguments.length,!0))};var tb={},Xm=(Object.defineProperty(tb,"__esModule",{value:!0}),tb.sequenceEqual=void 0,T),Jm=j,$m=R;function e0(){return{buffer:[],complete:!1}}tb.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),Xm.operate(function(e,t){function r(n,o){var r=Jm.createOperatorSubscriber(t,function(e){var t=o.buffer,r=o.complete;0===t.length?r?i(!1):n.buffer.push(e):a(e,t.shift())||i(!1)},function(){n.complete=!0;var e=o.complete,t=o.buffer;e&&i(0===t.length),null!=r&&r.unsubscribe()});return r}var n=e0(),o=e0(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),$m.innerFrom(u).subscribe(r(o,n))})};var t0={},r0=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},n0=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},o0=(Object.defineProperty(t0,"__esModule",{value:!0}),t0.share=void 0,R),i0=t,u0=Zr,a0=T;function s0(e,t){for(var r,n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!0===t)e();else if(!1!==t)return r=new u0.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),o0.innerFrom(t.apply(void 0,n0([],r0(n)))).subscribe(r)}t0.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new i0.Subject}:t,d=void 0===(t=e.resetOnError)||t,h=void 0===(t=e.resetOnComplete)||t,b=void 0===(t=e.resetOnRefCountZero)||t;return function(e){function n(){var e=o;f(),null!=e&&e.unsubscribe()}var o,i,u,a=0,s=!1,c=!1,l=function(){null!=i&&i.unsubscribe(),i=void 0},f=function(){l(),o=u=void 0,s=c=!1};return a0.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=s0(n,b))}),r.subscribe(t),!o&&0<a&&(o=new u0.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=s0(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=s0(f,h),r.complete()}}),o0.innerFrom(e).subscribe(o))})(e)}};var c0={},l0=(Object.defineProperty(c0,"__esModule",{value:!0}),c0.shareReplay=void 0,s),f0=t0;c0.shareReplay=function(e,t,r){var n,o,i=!1;return e&&"object"==typeof e?(n=e.bufferSize,o=void 0===n?1/0:n,n=e.windowTime,t=void 0===n?1/0:n,i=void 0!==(n=e.refCount)&&n,r=e.scheduler):o=null!=e?e:1/0,f0.share({connector:function(){return new l0.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var p0={},d0=(Object.defineProperty(p0,"__esModule",{value:!0}),p0.single=void 0,jc),h0=Ol,b0=Nl,y0=T,_0=j;p0.single=function(a){return y0.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(_0.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new h0.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new b0.NotFoundError("No matching values"):new d0.EmptyError)}))})};var v0={},m0=(Object.defineProperty(v0,"__esModule",{value:!0}),v0.skip=void 0,kd);v0.skip=function(r){return m0.filter(function(e,t){return r<=t})};var g0={},O0=(Object.defineProperty(g0,"__esModule",{value:!0}),g0.skipLast=void 0,p),w0=T,E0=j;g0.skipLast=function(u){return u<=0?O0.identity:w0.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(E0.createOperatorSubscriber(n,function(e){var t,r=i++;r<u?o[r]=e:(t=o[r=r%u],o[r]=e,n.next(t))})),function(){o=null}})};var P0={},S0=(Object.defineProperty(P0,"__esModule",{value:!0}),P0.skipUntil=void 0,T),T0=j,j0=R,C0=g;P0.skipUntil=function(o){return S0.operate(function(e,t){var r=!1,n=T0.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},C0.noop);j0.innerFrom(o).subscribe(n),e.subscribe(T0.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var R0={},I0=(Object.defineProperty(R0,"__esModule",{value:!0}),R0.skipWhile=void 0,T),A0=j;R0.skipWhile=function(o){return I0.operate(function(e,t){var r=!1,n=0;e.subscribe(A0.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var k0={},M0=(Object.defineProperty(k0,"__esModule",{value:!0}),k0.startWith=void 0,op),N0=i,x0=T;k0.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=N0.popScheduler(r);return x0.operate(function(e,t){(n?M0.concat(r,e,n):M0.concat(r,e)).subscribe(t)})};var D0={},L0={},U0=(Object.defineProperty(L0,"__esModule",{value:!0}),L0.switchMap=void 0,R),F0=T,B0=j;L0.switchMap=function(s,c){return F0.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(B0.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;U0.innerFrom(s(t,n)).subscribe(u=B0.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(D0,"__esModule",{value:!0}),D0.switchAll=void 0;var W0=L0,q0=p;D0.switchAll=function(){return W0.switchMap(q0.identity)};var z0={},V0=(Object.defineProperty(z0,"__esModule",{value:!0}),z0.switchMapTo=void 0,L0),H0=E;z0.switchMapTo=function(e,t){return H0.isFunction(t)?V0.switchMap(function(){return e},t):V0.switchMap(function(){return e})};var G0={},Y0=(Object.defineProperty(G0,"__esModule",{value:!0}),G0.switchScan=void 0,L0),K0=T;G0.switchScan=function(n,o){return K0.operate(function(e,t){var r=o;return Y0.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var Z0={},Q0=(Object.defineProperty(Z0,"__esModule",{value:!0}),Z0.takeUntil=void 0,T),X0=j,J0=R,$0=g;Z0.takeUntil=function(r){return Q0.operate(function(e,t){J0.innerFrom(r).subscribe(X0.createOperatorSubscriber(t,function(){return t.complete()},$0.noop)),t.closed||e.subscribe(t)})};var eg={},tg=(Object.defineProperty(eg,"__esModule",{value:!0}),eg.takeWhile=void 0,T),rg=j;eg.takeWhile=function(o,i){return void 0===i&&(i=!1),tg.operate(function(e,r){var n=0;e.subscribe(rg.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var ng={},og=(Object.defineProperty(ng,"__esModule",{value:!0}),ng.tap=void 0,E),ig=T,ug=j,ag=p;ng.tap=function(e,t,r){var o=og.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?ig.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(ug.createOperatorSubscriber(r,function(e){var t;null!=(t=o.next)&&t.call(o,e),r.next(e)},function(){var e;n=!1,null!=(e=o.complete)&&e.call(o),r.complete()},function(e){var t;n=!1,null!=(t=o.error)&&t.call(o,e),r.error(e)},function(){var e;n&&null!=(e=o.unsubscribe)&&e.call(o),null!=(e=o.finalize)&&e.call(o)}))}):ag.identity};var E={},sg=(Object.defineProperty(E,"__esModule",{value:!0}),E.throttle=void 0,T),cg=j,lg=R;E.throttle=function(h,b){return sg.operate(function(e,t){function r(){var e;a&&(a=!1,e=s,s=null,t.next(e),l||d(e))}var n=null!=b?b:{},o=n.leading,i=void 0===o||o,o=n.trailing,u=void 0!==o&&o,a=!1,s=null,c=null,l=!1,f=function(){null!=c&&c.unsubscribe(),c=null,u&&(r(),l&&t.complete())},p=function(){c=null,l&&t.complete()},d=function(e){return c=lg.innerFrom(h(e)).subscribe(cg.createOperatorSubscriber(t,f,p))};e.subscribe(cg.createOperatorSubscriber(t,function(e){a=!0,s=e,c&&!c.closed||(i?r():d(e))},function(){l=!0,u&&a&&c&&!c.closed||t.complete()}))})};var fg={},pg=(Object.defineProperty(fg,"__esModule",{value:!0}),fg.throttleTime=void 0,S),dg=E,hg=ud;fg.throttleTime=function(e,t,r){var n=hg.timer(e,t=void 0===t?pg.asyncScheduler:t);return dg.throttle(function(){return n},r)};var bg={},yg=(Object.defineProperty(bg,"__esModule",{value:!0}),bg.TimeInterval=bg.timeInterval=void 0,S),_g=T,vg=j;bg.timeInterval=function(i){return void 0===i&&(i=yg.asyncScheduler),_g.operate(function(e,n){var o=i.now();e.subscribe(vg.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new mg(e,r))}))})};var mg=function(e,t){this.value=e,this.interval=t},gg=(bg.TimeInterval=mg,{}),Og=(Object.defineProperty(gg,"__esModule",{value:!0}),gg.timeoutWith=void 0,S),wg=Sl,Eg=Bc;gg.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:Og.async,wg.isValidDate(e)?n=e:"number"==typeof e&&(o=e),!t)throw new TypeError("No observable provided to switch to");if(e=function(){return t},null==n&&null==o)throw new TypeError("No timeout provided.");return Eg.timeout({first:n,each:o,scheduler:r,with:e})};var Sl={},Pg=(Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.timestamp=void 0,u),Sg=Ef;Sl.timestamp=function(t){return void 0===t&&(t=Pg.dateTimestampProvider),Sg.map(function(e){return{value:e,timestamp:t.now()}})};var u={},Tg=(Object.defineProperty(u,"__esModule",{value:!0}),u.window=void 0,t),jg=T,Cg=j,Rg=g,Ig=R;u.window=function(o){return jg.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new Tg.Subject;t.next(n.asObservable());return e.subscribe(Cg.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),Ig.innerFrom(o).subscribe(Cg.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new Tg.Subject)},Rg.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var Ag={},kg=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Mg=(Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.windowCount=void 0,t),Ng=T,xg=j;Ag.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return Ng.operate(function(e,i){var u=[new Mg.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(xg.createOperatorSubscriber(i,function(e){try{for(var t=kg(u),r=t.next();!r.done;r=t.next())r.value.next(e)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=t.return)&&o.call(t)}finally{if(n)throw n.error}}var n,o=a-s+1;0<=o&&o%c==0&&u.shift().complete(),++a%c==0&&(n=new Mg.Subject,u.push(n),i.next(n.asObservable()))},function(){for(;0<u.length;)u.shift().complete();i.complete()},function(e){for(;0<u.length;)u.shift().error(e);i.error(e)},function(){u=null}))})};var Dg={},Lg=(Object.defineProperty(Dg,"__esModule",{value:!0}),Dg.windowTime=void 0,t),Ug=S,Fg=m,Bg=T,Wg=j,qg=v,zg=i,Vg=pl;Dg.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=zg.popScheduler(t))?e:Ug.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return Bg.operate(function(e,n){function r(t){s(function(e){e=e.window;return t(e)}),t(n),n.unsubscribe()}var o=[],i=!1,u=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),qg.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new Fg.Subscription,n.add(e),t=new Lg.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),Vg.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?Vg.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(Wg.createOperatorSubscriber(n,function(t){s(function(e){e.window.next(t),p<=++e.seen&&u(e)})},function(){return r(function(e){return e.complete()})},function(t){return r(function(e){return e.error(t)})})),function(){o=null}})};var pl={},Hg=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Gg=(Object.defineProperty(pl,"__esModule",{value:!0}),pl.windowToggle=void 0,t),Yg=m,Kg=T,Zg=R,Qg=j,Xg=g,Jg=v;pl.windowToggle=function(t,a){return Kg.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];Zg.innerFrom(t).subscribe(Qg.createOperatorSubscriber(o,function(e){var t,r=new Gg.Subject,n=(u.push(r),new Yg.Subscription);try{t=Zg.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(Qg.createOperatorSubscriber(o,function(){Jg.arrRemove(u,r),r.complete(),n.unsubscribe()},Xg.noop,i)))},Xg.noop)),e.subscribe(Qg.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=Hg(n),i=o.next();!i.done;i=o.next())i.value.next(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;0<u.length;)u.shift().complete();o.complete()},i,function(){for(;0<u.length;)u.shift().unsubscribe()}))})};var v={},$g=(Object.defineProperty(v,"__esModule",{value:!0}),v.windowWhen=void 0,t),eO=T,tO=j,rO=R;v.windowWhen=function(u){return eO.operate(function(e,t){var r,n,o=function(e){r.error(e),t.error(e)},i=function(){var e;null!=n&&n.unsubscribe(),null!=r&&r.complete(),r=new $g.Subject,t.next(r.asObservable());try{e=rO.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=tO.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(tO.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var nO={},oO=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},iO=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},uO=(Object.defineProperty(nO,"__esModule",{value:!0}),nO.withLatestFrom=void 0,T),aO=j,sO=R,cO=p,lO=g,fO=i;nO.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=fO.popResultSelector(a);return uO.operate(function(e,r){for(var t=a.length,n=new Array(t),o=a.map(function(){return!1}),i=!1,u=0;u<t;u++)!function(t){sO.innerFrom(a[t]).subscribe(aO.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(cO.identity))&&(o=null))},lO.noop))}(u);e.subscribe(aO.createOperatorSubscriber(r,function(e){i&&(e=iO([e],oO(n)),r.next(s?s.apply(void 0,iO([],oO(e))):e))}))})};var j={},pO=(Object.defineProperty(j,"__esModule",{value:!0}),j.zipAll=void 0,Xd),dO=I;j.zipAll=function(e){return dO.joinAllInternals(pO.zip,e)};var R={},i={},hO=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},bO=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},yO=(Object.defineProperty(i,"__esModule",{value:!0}),i.zip=void 0,Xd),_O=T;i.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return _O.operate(function(e,t){yO.zip.apply(void 0,bO([e],hO(r))).subscribe(t)})};var vO,mO,gO,OO,wO,EO,PO,SO,TO,jO,CO,RO,IO,AO,kO,MO,NO,xO,DO,LO,UO,FO,BO,WO,qO,zO,VO,HO,GO,YO,KO,ZO,QO,XO,JO,$O,ew,tw,rw,nw,ow,iw,uw,aw,sw,cw,lw,fw,pw,dw,hw,bw,yw,_w,vw,mw,gw,Ow,ww,Ew,Pw,Sw,Tw,jw,Cw,Rw,Iw,Aw,kw,Mw,Nw,xw,Dw,Lw,Uw,Fw,Bw,Ww,qw,zw,Vw,Hw,Gw,Yw,Kw,Zw,Qw,Xw,Jw,$w,eE,tE,rE,nE,oE,iE,uE,aE,sE,cE,lE,fE,pE,dE,hE,bE,yE,_E,vE,mE,gE,OE,wE,EE,PE,SE,TE,jE,CE,RE,IE,AE,kE,ME,NE,xE,DE,LE,UE,FE,BE,WE,qE,zE,VE,HE,GE,YE,KE,ZE,QE,XE,JE,$E,eP,tP,rP,nP,oP,iP,uP,aP,sP,cP,lP,fP,pP,dP,hP,bP,yP,_P,vP,mP,gP,OP,wP,EP,PP=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},SP=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},TP=(Object.defineProperty(R,"__esModule",{value:!0}),R.zipWith=void 0,i);R.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return TP.zip.apply(void 0,SP([],PP(e)))},I=Y,vO=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),T=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||vO(t,e,r)},Object.defineProperty(I,"__esModule",{value:!0}),I.interval=I.iif=I.generate=I.fromEventPattern=I.fromEvent=I.from=I.forkJoin=I.empty=I.defer=I.connectable=I.concat=I.combineLatest=I.bindNodeCallback=I.bindCallback=I.UnsubscriptionError=I.TimeoutError=I.SequenceError=I.ObjectUnsubscribedError=I.NotFoundError=I.EmptyError=I.ArgumentOutOfRangeError=I.firstValueFrom=I.lastValueFrom=I.isObservable=I.identity=I.noop=I.pipe=I.NotificationKind=I.Notification=I.Subscriber=I.Subscription=I.Scheduler=I.VirtualAction=I.VirtualTimeScheduler=I.animationFrameScheduler=I.animationFrame=I.queueScheduler=I.queue=I.asyncScheduler=I.async=I.asapScheduler=I.asap=I.AsyncSubject=I.ReplaySubject=I.BehaviorSubject=I.Subject=I.animationFrames=I.observable=I.ConnectableObservable=I.Observable=void 0,I.filter=I.expand=I.exhaustMap=I.exhaustAll=I.exhaust=I.every=I.endWith=I.elementAt=I.distinctUntilKeyChanged=I.distinctUntilChanged=I.distinct=I.dematerialize=I.delayWhen=I.delay=I.defaultIfEmpty=I.debounceTime=I.debounce=I.count=I.connect=I.concatWith=I.concatMapTo=I.concatMap=I.concatAll=I.combineLatestWith=I.combineLatestAll=I.combineAll=I.catchError=I.bufferWhen=I.bufferToggle=I.bufferTime=I.bufferCount=I.buffer=I.auditTime=I.audit=I.config=I.NEVER=I.EMPTY=I.scheduled=I.zip=I.using=I.timer=I.throwError=I.range=I.race=I.partition=I.pairs=I.onErrorResumeNext=I.of=I.never=I.merge=void 0,I.switchMap=I.switchAll=I.subscribeOn=I.startWith=I.skipWhile=I.skipUntil=I.skipLast=I.skip=I.single=I.shareReplay=I.share=I.sequenceEqual=I.scan=I.sampleTime=I.sample=I.refCount=I.retryWhen=I.retry=I.repeatWhen=I.repeat=I.reduce=I.raceWith=I.publishReplay=I.publishLast=I.publishBehavior=I.publish=I.pluck=I.pairwise=I.onErrorResumeNextWith=I.observeOn=I.multicast=I.min=I.mergeWith=I.mergeScan=I.mergeMapTo=I.mergeMap=I.flatMap=I.mergeAll=I.max=I.materialize=I.mapTo=I.map=I.last=I.isEmpty=I.ignoreElements=I.groupBy=I.first=I.findIndex=I.find=I.finalize=void 0,I.zipWith=I.zipAll=I.withLatestFrom=I.windowWhen=I.windowToggle=I.windowTime=I.windowCount=I.window=I.toArray=I.timestamp=I.timeoutWith=I.timeout=I.timeInterval=I.throwIfEmpty=I.throttleTime=I.throttle=I.tap=I.takeWhile=I.takeUntil=I.takeLast=I.take=I.switchScan=I.switchMapTo=void 0,mO=o,Object.defineProperty(I,"Observable",{enumerable:!0,get:function(){return mO.Observable}}),gO=pn,Object.defineProperty(I,"ConnectableObservable",{enumerable:!0,get:function(){return gO.ConnectableObservable}}),OO=it,Object.defineProperty(I,"observable",{enumerable:!0,get:function(){return OO.observable}}),wO=n,Object.defineProperty(I,"animationFrames",{enumerable:!0,get:function(){return wO.animationFrames}}),EO=t,Object.defineProperty(I,"Subject",{enumerable:!0,get:function(){return EO.Subject}}),PO=P,Object.defineProperty(I,"BehaviorSubject",{enumerable:!0,get:function(){return PO.BehaviorSubject}}),SO=s,Object.defineProperty(I,"ReplaySubject",{enumerable:!0,get:function(){return SO.ReplaySubject}}),TO=_,Object.defineProperty(I,"AsyncSubject",{enumerable:!0,get:function(){return TO.AsyncSubject}}),jO=b,Object.defineProperty(I,"asap",{enumerable:!0,get:function(){return jO.asap}}),Object.defineProperty(I,"asapScheduler",{enumerable:!0,get:function(){return jO.asapScheduler}}),CO=S,Object.defineProperty(I,"async",{enumerable:!0,get:function(){return CO.async}}),Object.defineProperty(I,"asyncScheduler",{enumerable:!0,get:function(){return CO.asyncScheduler}}),RO=Fs,Object.defineProperty(I,"queue",{enumerable:!0,get:function(){return RO.queue}}),Object.defineProperty(I,"queueScheduler",{enumerable:!0,get:function(){return RO.queueScheduler}}),IO=Zs,Object.defineProperty(I,"animationFrame",{enumerable:!0,get:function(){return IO.animationFrame}}),Object.defineProperty(I,"animationFrameScheduler",{enumerable:!0,get:function(){return IO.animationFrameScheduler}}),AO=$s,Object.defineProperty(I,"VirtualTimeScheduler",{enumerable:!0,get:function(){return AO.VirtualTimeScheduler}}),Object.defineProperty(I,"VirtualAction",{enumerable:!0,get:function(){return AO.VirtualAction}}),kO=Os,Object.defineProperty(I,"Scheduler",{enumerable:!0,get:function(){return kO.Scheduler}}),MO=m,Object.defineProperty(I,"Subscription",{enumerable:!0,get:function(){return MO.Subscription}}),NO=Zr,Object.defineProperty(I,"Subscriber",{enumerable:!0,get:function(){return NO.Subscriber}}),xO=hs,Object.defineProperty(I,"Notification",{enumerable:!0,get:function(){return xO.Notification}}),Object.defineProperty(I,"NotificationKind",{enumerable:!0,get:function(){return xO.NotificationKind}}),DO=c,Object.defineProperty(I,"pipe",{enumerable:!0,get:function(){return DO.pipe}}),LO=g,Object.defineProperty(I,"noop",{enumerable:!0,get:function(){return LO.noop}}),UO=p,Object.defineProperty(I,"identity",{enumerable:!0,get:function(){return UO.identity}}),FO=Dc,Object.defineProperty(I,"isObservable",{enumerable:!0,get:function(){return FO.isObservable}}),BO=Rc,Object.defineProperty(I,"lastValueFrom",{enumerable:!0,get:function(){return BO.lastValueFrom}}),WO=kc,Object.defineProperty(I,"firstValueFrom",{enumerable:!0,get:function(){return WO.firstValueFrom}}),qO=Nc,Object.defineProperty(I,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return qO.ArgumentOutOfRangeError}}),zO=jc,Object.defineProperty(I,"EmptyError",{enumerable:!0,get:function(){return zO.EmptyError}}),VO=Nl,Object.defineProperty(I,"NotFoundError",{enumerable:!0,get:function(){return VO.NotFoundError}}),HO=f,Object.defineProperty(I,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return HO.ObjectUnsubscribedError}}),GO=Ol,Object.defineProperty(I,"SequenceError",{enumerable:!0,get:function(){return GO.SequenceError}}),YO=Bc,Object.defineProperty(I,"TimeoutError",{enumerable:!0,get:function(){return YO.TimeoutError}}),KO=xr,Object.defineProperty(I,"UnsubscriptionError",{enumerable:!0,get:function(){return KO.UnsubscriptionError}}),ZO=xc,Object.defineProperty(I,"bindCallback",{enumerable:!0,get:function(){return ZO.bindCallback}}),QO=Ff,Object.defineProperty(I,"bindNodeCallback",{enumerable:!0,get:function(){return QO.bindNodeCallback}}),XO=y,Object.defineProperty(I,"combineLatest",{enumerable:!0,get:function(){return XO.combineLatest}}),JO=op,Object.defineProperty(I,"concat",{enumerable:!0,get:function(){return JO.concat}}),$O=Ep,Object.defineProperty(I,"connectable",{enumerable:!0,get:function(){return $O.connectable}}),ew=Pp,Object.defineProperty(I,"defer",{enumerable:!0,get:function(){return ew.defer}}),tw=O,Object.defineProperty(I,"empty",{enumerable:!0,get:function(){return tw.empty}}),rw=Ap,Object.defineProperty(I,"forkJoin",{enumerable:!0,get:function(){return rw.forkJoin}}),nw=Ec,Object.defineProperty(I,"from",{enumerable:!0,get:function(){return nw.from}}),ow=Wf,Object.defineProperty(I,"fromEvent",{enumerable:!0,get:function(){return ow.fromEvent}}),iw=Gf,Object.defineProperty(I,"fromEventPattern",{enumerable:!0,get:function(){return iw.fromEventPattern}}),uw=Tc,Object.defineProperty(I,"generate",{enumerable:!0,get:function(){return uw.generate}}),aw=jl,Object.defineProperty(I,"iif",{enumerable:!0,get:function(){return aw.iif}}),sw=id,Object.defineProperty(I,"interval",{enumerable:!0,get:function(){return sw.interval}}),cw=vc,Object.defineProperty(I,"merge",{enumerable:!0,get:function(){return cw.merge}}),lw=md,Object.defineProperty(I,"never",{enumerable:!0,get:function(){return lw.never}}),fw=h,Object.defineProperty(I,"of",{enumerable:!0,get:function(){return fw.of}}),pw=gd,Object.defineProperty(I,"onErrorResumeNext",{enumerable:!0,get:function(){return pw.onErrorResumeNext}}),dw=Cd,Object.defineProperty(I,"pairs",{enumerable:!0,get:function(){return dw.pairs}}),hw=Id,Object.defineProperty(I,"partition",{enumerable:!0,get:function(){return hw.partition}}),bw=Ud,Object.defineProperty(I,"race",{enumerable:!0,get:function(){return bw.race}}),yw=Vd,Object.defineProperty(I,"range",{enumerable:!0,get:function(){return yw.range}}),_w=Sc,Object.defineProperty(I,"throwError",{enumerable:!0,get:function(){return _w.throwError}}),vw=ud,Object.defineProperty(I,"timer",{enumerable:!0,get:function(){return vw.timer}}),mw=Yd,Object.defineProperty(I,"using",{enumerable:!0,get:function(){return mw.using}}),gw=Xd,Object.defineProperty(I,"zip",{enumerable:!0,get:function(){return gw.zip}}),Ow=Pc,Object.defineProperty(I,"scheduled",{enumerable:!0,get:function(){return Ow.scheduled}}),ww=O,Object.defineProperty(I,"EMPTY",{enumerable:!0,get:function(){return ww.EMPTY}}),Ew=md,Object.defineProperty(I,"NEVER",{enumerable:!0,get:function(){return Ew.NEVER}}),T(uh,I),Pw=Nt,Object.defineProperty(I,"config",{enumerable:!0,get:function(){return Pw.config}}),Sw=ah,Object.defineProperty(I,"audit",{enumerable:!0,get:function(){return Sw.audit}}),Tw=fh,Object.defineProperty(I,"auditTime",{enumerable:!0,get:function(){return Tw.auditTime}}),jw=bh,Object.defineProperty(I,"buffer",{enumerable:!0,get:function(){return jw.buffer}}),Cw=gh,Object.defineProperty(I,"bufferCount",{enumerable:!0,get:function(){return Cw.bufferCount}}),Rw=Sh,Object.defineProperty(I,"bufferTime",{enumerable:!0,get:function(){return Rw.bufferTime}}),Iw=Nh,Object.defineProperty(I,"bufferToggle",{enumerable:!0,get:function(){return Iw.bufferToggle}}),Aw=qh,Object.defineProperty(I,"bufferWhen",{enumerable:!0,get:function(){return Aw.bufferWhen}}),kw=Yh,Object.defineProperty(I,"catchError",{enumerable:!0,get:function(){return kw.catchError}}),Mw=Xh,Object.defineProperty(I,"combineAll",{enumerable:!0,get:function(){return Mw.combineAll}}),Nw=Jh,Object.defineProperty(I,"combineLatestAll",{enumerable:!0,get:function(){return Nw.combineLatestAll}}),xw=bb,Object.defineProperty(I,"combineLatestWith",{enumerable:!0,get:function(){return xw.combineLatestWith}}),Dw=ip,Object.defineProperty(I,"concatAll",{enumerable:!0,get:function(){return Dw.concatAll}}),Lw=wf,Object.defineProperty(I,"concatMap",{enumerable:!0,get:function(){return Lw.concatMap}}),Uw=Ab,Object.defineProperty(I,"concatMapTo",{enumerable:!0,get:function(){return Uw.concatMapTo}}),Fw=Nb,Object.defineProperty(I,"concatWith",{enumerable:!0,get:function(){return Fw.concatWith}}),Bw=Hb,Object.defineProperty(I,"connect",{enumerable:!0,get:function(){return Bw.connect}}),Ww=Gb,Object.defineProperty(I,"count",{enumerable:!0,get:function(){return Ww.count}}),qw=ey,Object.defineProperty(I,"debounce",{enumerable:!0,get:function(){return qw.debounce}}),zw=iy,Object.defineProperty(I,"debounceTime",{enumerable:!0,get:function(){return zw.debounceTime}}),Vw=cy,Object.defineProperty(I,"defaultIfEmpty",{enumerable:!0,get:function(){return Vw.defaultIfEmpty}}),Hw=A,Object.defineProperty(I,"delay",{enumerable:!0,get:function(){return Hw.delay}}),Gw=py,Object.defineProperty(I,"delayWhen",{enumerable:!0,get:function(){return Gw.delayWhen}}),Yw=ky,Object.defineProperty(I,"dematerialize",{enumerable:!0,get:function(){return Yw.dematerialize}}),Kw=Dy,Object.defineProperty(I,"distinct",{enumerable:!0,get:function(){return Kw.distinct}}),Zw=Wy,Object.defineProperty(I,"distinctUntilChanged",{enumerable:!0,get:function(){return Zw.distinctUntilChanged}}),Qw=Gy,Object.defineProperty(I,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Qw.distinctUntilKeyChanged}}),Xw=Ky,Object.defineProperty(I,"elementAt",{enumerable:!0,get:function(){return Xw.elementAt}}),Jw=i_,Object.defineProperty(I,"endWith",{enumerable:!0,get:function(){return Jw.endWith}}),$w=l_,Object.defineProperty(I,"every",{enumerable:!0,get:function(){return $w.every}}),eE=d_,Object.defineProperty(I,"exhaust",{enumerable:!0,get:function(){return eE.exhaust}}),tE=h_,Object.defineProperty(I,"exhaustAll",{enumerable:!0,get:function(){return tE.exhaustAll}}),rE=b_,Object.defineProperty(I,"exhaustMap",{enumerable:!0,get:function(){return rE.exhaustMap}}),nE=w_,Object.defineProperty(I,"expand",{enumerable:!0,get:function(){return nE.expand}}),oE=kd,Object.defineProperty(I,"filter",{enumerable:!0,get:function(){return oE.filter}}),iE=S_,Object.defineProperty(I,"finalize",{enumerable:!0,get:function(){return iE.finalize}}),uE=j_,Object.defineProperty(I,"find",{enumerable:!0,get:function(){return uE.find}}),aE=A_,Object.defineProperty(I,"findIndex",{enumerable:!0,get:function(){return aE.findIndex}}),sE=N_,Object.defineProperty(I,"first",{enumerable:!0,get:function(){return sE.first}}),cE=W_,Object.defineProperty(I,"groupBy",{enumerable:!0,get:function(){return cE.groupBy}}),lE=_y,Object.defineProperty(I,"ignoreElements",{enumerable:!0,get:function(){return lE.ignoreElements}}),fE=Y_,Object.defineProperty(I,"isEmpty",{enumerable:!0,get:function(){return fE.isEmpty}}),pE=Q_,Object.defineProperty(I,"last",{enumerable:!0,get:function(){return pE.last}}),dE=Ef,Object.defineProperty(I,"map",{enumerable:!0,get:function(){return dE.map}}),hE=Oy,Object.defineProperty(I,"mapTo",{enumerable:!0,get:function(){return hE.mapTo}}),bE=sv,Object.defineProperty(I,"materialize",{enumerable:!0,get:function(){return bE.materialize}}),yE=pv,Object.defineProperty(I,"max",{enumerable:!0,get:function(){return yE.max}}),_E=up,Object.defineProperty(I,"mergeAll",{enumerable:!0,get:function(){return _E.mergeAll}}),vE=bv,Object.defineProperty(I,"flatMap",{enumerable:!0,get:function(){return vE.flatMap}}),mE=ap,Object.defineProperty(I,"mergeMap",{enumerable:!0,get:function(){return mE.mergeMap}}),gE=yv,Object.defineProperty(I,"mergeMapTo",{enumerable:!0,get:function(){return gE.mergeMapTo}}),OE=mv,Object.defineProperty(I,"mergeScan",{enumerable:!0,get:function(){return OE.mergeScan}}),wE=sp,Object.defineProperty(I,"mergeWith",{enumerable:!0,get:function(){return wE.mergeWith}}),EE=Mv,Object.defineProperty(I,"min",{enumerable:!0,get:function(){return EE.min}}),PE=Dv,Object.defineProperty(I,"multicast",{enumerable:!0,get:function(){return PE.multicast}}),SE=w,Object.defineProperty(I,"observeOn",{enumerable:!0,get:function(){return SE.observeOn}}),TE=Bv,Object.defineProperty(I,"onErrorResumeNextWith",{enumerable:!0,get:function(){return TE.onErrorResumeNextWith}}),jE=Gv,Object.defineProperty(I,"pairwise",{enumerable:!0,get:function(){return jE.pairwise}}),CE=Zv,Object.defineProperty(I,"pluck",{enumerable:!0,get:function(){return CE.pluck}}),RE=Xv,Object.defineProperty(I,"publish",{enumerable:!0,get:function(){return RE.publish}}),IE=tm,Object.defineProperty(I,"publishBehavior",{enumerable:!0,get:function(){return IE.publishBehavior}}),AE=om,Object.defineProperty(I,"publishLast",{enumerable:!0,get:function(){return AE.publishLast}}),kE=am,Object.defineProperty(I,"publishReplay",{enumerable:!0,get:function(){return kE.publishReplay}}),ME=fm,Object.defineProperty(I,"raceWith",{enumerable:!0,get:function(){return ME.raceWith}}),NE=eb,Object.defineProperty(I,"reduce",{enumerable:!0,get:function(){return NE.reduce}}),xE=_m,Object.defineProperty(I,"repeat",{enumerable:!0,get:function(){return xE.repeat}}),DE=Em,Object.defineProperty(I,"repeatWhen",{enumerable:!0,get:function(){return DE.repeatWhen}}),LE=Cm,Object.defineProperty(I,"retry",{enumerable:!0,get:function(){return LE.retry}}),UE=Nm,Object.defineProperty(I,"retryWhen",{enumerable:!0,get:function(){return UE.retryWhen}}),FE=C,Object.defineProperty(I,"refCount",{enumerable:!0,get:function(){return FE.refCount}}),BE=Fm,Object.defineProperty(I,"sample",{enumerable:!0,get:function(){return BE.sample}}),WE=Vm,Object.defineProperty(I,"sampleTime",{enumerable:!0,get:function(){return WE.sampleTime}}),qE=Km,Object.defineProperty(I,"scan",{enumerable:!0,get:function(){return qE.scan}}),zE=tb,Object.defineProperty(I,"sequenceEqual",{enumerable:!0,get:function(){return zE.sequenceEqual}}),VE=t0,Object.defineProperty(I,"share",{enumerable:!0,get:function(){return VE.share}}),HE=c0,Object.defineProperty(I,"shareReplay",{enumerable:!0,get:function(){return HE.shareReplay}}),GE=p0,Object.defineProperty(I,"single",{enumerable:!0,get:function(){return GE.single}}),YE=v0,Object.defineProperty(I,"skip",{enumerable:!0,get:function(){return YE.skip}}),KE=g0,Object.defineProperty(I,"skipLast",{enumerable:!0,get:function(){return KE.skipLast}}),ZE=P0,Object.defineProperty(I,"skipUntil",{enumerable:!0,get:function(){return ZE.skipUntil}}),QE=R0,Object.defineProperty(I,"skipWhile",{enumerable:!0,get:function(){return QE.skipWhile}}),XE=k0,Object.defineProperty(I,"startWith",{enumerable:!0,get:function(){return XE.startWith}}),JE=yl,Object.defineProperty(I,"subscribeOn",{enumerable:!0,get:function(){return JE.subscribeOn}}),$E=D0,Object.defineProperty(I,"switchAll",{enumerable:!0,get:function(){return $E.switchAll}}),eP=L0,Object.defineProperty(I,"switchMap",{enumerable:!0,get:function(){return eP.switchMap}}),tP=z0,Object.defineProperty(I,"switchMapTo",{enumerable:!0,get:function(){return tP.switchMapTo}}),rP=G0,Object.defineProperty(I,"switchScan",{enumerable:!0,get:function(){return rP.switchScan}}),nP=dy,Object.defineProperty(I,"take",{enumerable:!0,get:function(){return nP.take}}),oP=X_,Object.defineProperty(I,"takeLast",{enumerable:!0,get:function(){return oP.takeLast}}),iP=Z0,Object.defineProperty(I,"takeUntil",{enumerable:!0,get:function(){return iP.takeUntil}}),uP=eg,Object.defineProperty(I,"takeWhile",{enumerable:!0,get:function(){return uP.takeWhile}}),aP=ng,Object.defineProperty(I,"tap",{enumerable:!0,get:function(){return aP.tap}}),sP=E,Object.defineProperty(I,"throttle",{enumerable:!0,get:function(){return sP.throttle}}),cP=fg,Object.defineProperty(I,"throttleTime",{enumerable:!0,get:function(){return cP.throttleTime}}),lP=Zy,Object.defineProperty(I,"throwIfEmpty",{enumerable:!0,get:function(){return lP.throwIfEmpty}}),fP=bg,Object.defineProperty(I,"timeInterval",{enumerable:!0,get:function(){return fP.timeInterval}}),pP=Bc,Object.defineProperty(I,"timeout",{enumerable:!0,get:function(){return pP.timeout}}),dP=gg,Object.defineProperty(I,"timeoutWith",{enumerable:!0,get:function(){return dP.timeoutWith}}),hP=Sl,Object.defineProperty(I,"timestamp",{enumerable:!0,get:function(){return hP.timestamp}}),bP=$h,Object.defineProperty(I,"toArray",{enumerable:!0,get:function(){return bP.toArray}}),yP=u,Object.defineProperty(I,"window",{enumerable:!0,get:function(){return yP.window}}),_P=Ag,Object.defineProperty(I,"windowCount",{enumerable:!0,get:function(){return _P.windowCount}}),vP=Dg,Object.defineProperty(I,"windowTime",{enumerable:!0,get:function(){return vP.windowTime}}),mP=pl,Object.defineProperty(I,"windowToggle",{enumerable:!0,get:function(){return mP.windowToggle}}),gP=v,Object.defineProperty(I,"windowWhen",{enumerable:!0,get:function(){return gP.windowWhen}}),OP=nO,Object.defineProperty(I,"withLatestFrom",{enumerable:!0,get:function(){return OP.withLatestFrom}}),wP=j,Object.defineProperty(I,"zipAll",{enumerable:!0,get:function(){return wP.zipAll}}),EP=R,Object.defineProperty(I,"zipWith",{enumerable:!0,get:function(){return EP.zipWith}});var o={},pn={},jP=(Object.defineProperty(pn,"__esModule",{value:!0}),pn.partition=void 0,Ad),CP=kd;pn.partition=function(t,r){return function(e){return[CP.filter(t,r)(e),CP.filter(jP.not(t,r))(e)]}};var RP,IP,AP,kP,MP,NP,xP,DP,LP,UP,FP,BP,WP,qP,zP,VP,HP,GP,YP,KP,ZP,QP,XP,JP,$P,eS,tS,rS,nS,oS,iS,uS,aS,sS,cS,lS,fS,pS,dS,hS,bS,yS,_S,vS,mS,gS,OS,wS,ES,PS,SS,TS,jS,CS,RS,IS,AS,kS,MS,NS,xS,DS,LS,US,FS,BS,WS,qS,zS,VS,HS,GS,YS,KS,ZS,QS,XS,JS,$S,e1,t1,r1,n1,o1,i1,u1,a1,s1,c1,l1,f1,p1,d1,h1,b1,y1,_1,v1,m1,g1,O1,w1,E1,P1,S1,T1,j1,C1,R1,I1,A1,k1,M1,it={},N1=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},x1=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},D1=(Object.defineProperty(it,"__esModule",{value:!0}),it.race=void 0,Od),L1=fm;it.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return L1.raceWith.apply(void 0,x1([],N1(D1.argsOrArgArray(e))))},n=o,Object.defineProperty(n,"__esModule",{value:!0}),n.mergeAll=n.merge=n.max=n.materialize=n.mapTo=n.map=n.last=n.isEmpty=n.ignoreElements=n.groupBy=n.first=n.findIndex=n.find=n.finalize=n.filter=n.expand=n.exhaustMap=n.exhaustAll=n.exhaust=n.every=n.endWith=n.elementAt=n.distinctUntilKeyChanged=n.distinctUntilChanged=n.distinct=n.dematerialize=n.delayWhen=n.delay=n.defaultIfEmpty=n.debounceTime=n.debounce=n.count=n.connect=n.concatWith=n.concatMapTo=n.concatMap=n.concatAll=n.concat=n.combineLatestWith=n.combineLatest=n.combineLatestAll=n.combineAll=n.catchError=n.bufferWhen=n.bufferToggle=n.bufferTime=n.bufferCount=n.buffer=n.auditTime=n.audit=void 0,n.timeInterval=n.throwIfEmpty=n.throttleTime=n.throttle=n.tap=n.takeWhile=n.takeUntil=n.takeLast=n.take=n.switchScan=n.switchMapTo=n.switchMap=n.switchAll=n.subscribeOn=n.startWith=n.skipWhile=n.skipUntil=n.skipLast=n.skip=n.single=n.shareReplay=n.share=n.sequenceEqual=n.scan=n.sampleTime=n.sample=n.refCount=n.retryWhen=n.retry=n.repeatWhen=n.repeat=n.reduce=n.raceWith=n.race=n.publishReplay=n.publishLast=n.publishBehavior=n.publish=n.pluck=n.partition=n.pairwise=n.onErrorResumeNext=n.observeOn=n.multicast=n.min=n.mergeWith=n.mergeScan=n.mergeMapTo=n.mergeMap=n.flatMap=void 0,n.zipWith=n.zipAll=n.zip=n.withLatestFrom=n.windowWhen=n.windowToggle=n.windowTime=n.windowCount=n.window=n.toArray=n.timestamp=n.timeoutWith=n.timeout=void 0,RP=ah,Object.defineProperty(n,"audit",{enumerable:!0,get:function(){return RP.audit}}),IP=fh,Object.defineProperty(n,"auditTime",{enumerable:!0,get:function(){return IP.auditTime}}),AP=bh,Object.defineProperty(n,"buffer",{enumerable:!0,get:function(){return AP.buffer}}),kP=gh,Object.defineProperty(n,"bufferCount",{enumerable:!0,get:function(){return kP.bufferCount}}),MP=Sh,Object.defineProperty(n,"bufferTime",{enumerable:!0,get:function(){return MP.bufferTime}}),NP=Nh,Object.defineProperty(n,"bufferToggle",{enumerable:!0,get:function(){return NP.bufferToggle}}),xP=qh,Object.defineProperty(n,"bufferWhen",{enumerable:!0,get:function(){return xP.bufferWhen}}),DP=Yh,Object.defineProperty(n,"catchError",{enumerable:!0,get:function(){return DP.catchError}}),LP=Xh,Object.defineProperty(n,"combineAll",{enumerable:!0,get:function(){return LP.combineAll}}),UP=Jh,Object.defineProperty(n,"combineLatestAll",{enumerable:!0,get:function(){return UP.combineLatestAll}}),FP=yb,Object.defineProperty(n,"combineLatest",{enumerable:!0,get:function(){return FP.combineLatest}}),BP=bb,Object.defineProperty(n,"combineLatestWith",{enumerable:!0,get:function(){return BP.combineLatestWith}}),WP=xb,Object.defineProperty(n,"concat",{enumerable:!0,get:function(){return WP.concat}}),qP=ip,Object.defineProperty(n,"concatAll",{enumerable:!0,get:function(){return qP.concatAll}}),zP=wf,Object.defineProperty(n,"concatMap",{enumerable:!0,get:function(){return zP.concatMap}}),VP=Ab,Object.defineProperty(n,"concatMapTo",{enumerable:!0,get:function(){return VP.concatMapTo}}),HP=Nb,Object.defineProperty(n,"concatWith",{enumerable:!0,get:function(){return HP.concatWith}}),GP=Hb,Object.defineProperty(n,"connect",{enumerable:!0,get:function(){return GP.connect}}),YP=Gb,Object.defineProperty(n,"count",{enumerable:!0,get:function(){return YP.count}}),KP=ey,Object.defineProperty(n,"debounce",{enumerable:!0,get:function(){return KP.debounce}}),ZP=iy,Object.defineProperty(n,"debounceTime",{enumerable:!0,get:function(){return ZP.debounceTime}}),QP=cy,Object.defineProperty(n,"defaultIfEmpty",{enumerable:!0,get:function(){return QP.defaultIfEmpty}}),XP=A,Object.defineProperty(n,"delay",{enumerable:!0,get:function(){return XP.delay}}),JP=py,Object.defineProperty(n,"delayWhen",{enumerable:!0,get:function(){return JP.delayWhen}}),$P=ky,Object.defineProperty(n,"dematerialize",{enumerable:!0,get:function(){return $P.dematerialize}}),eS=Dy,Object.defineProperty(n,"distinct",{enumerable:!0,get:function(){return eS.distinct}}),tS=Wy,Object.defineProperty(n,"distinctUntilChanged",{enumerable:!0,get:function(){return tS.distinctUntilChanged}}),rS=Gy,Object.defineProperty(n,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return rS.distinctUntilKeyChanged}}),nS=Ky,Object.defineProperty(n,"elementAt",{enumerable:!0,get:function(){return nS.elementAt}}),oS=i_,Object.defineProperty(n,"endWith",{enumerable:!0,get:function(){return oS.endWith}}),iS=l_,Object.defineProperty(n,"every",{enumerable:!0,get:function(){return iS.every}}),uS=d_,Object.defineProperty(n,"exhaust",{enumerable:!0,get:function(){return uS.exhaust}}),aS=h_,Object.defineProperty(n,"exhaustAll",{enumerable:!0,get:function(){return aS.exhaustAll}}),sS=b_,Object.defineProperty(n,"exhaustMap",{enumerable:!0,get:function(){return sS.exhaustMap}}),cS=w_,Object.defineProperty(n,"expand",{enumerable:!0,get:function(){return cS.expand}}),lS=kd,Object.defineProperty(n,"filter",{enumerable:!0,get:function(){return lS.filter}}),fS=S_,Object.defineProperty(n,"finalize",{enumerable:!0,get:function(){return fS.finalize}}),pS=j_,Object.defineProperty(n,"find",{enumerable:!0,get:function(){return pS.find}}),dS=A_,Object.defineProperty(n,"findIndex",{enumerable:!0,get:function(){return dS.findIndex}}),hS=N_,Object.defineProperty(n,"first",{enumerable:!0,get:function(){return hS.first}}),bS=W_,Object.defineProperty(n,"groupBy",{enumerable:!0,get:function(){return bS.groupBy}}),yS=_y,Object.defineProperty(n,"ignoreElements",{enumerable:!0,get:function(){return yS.ignoreElements}}),_S=Y_,Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return _S.isEmpty}}),vS=Q_,Object.defineProperty(n,"last",{enumerable:!0,get:function(){return vS.last}}),mS=Ef,Object.defineProperty(n,"map",{enumerable:!0,get:function(){return mS.map}}),gS=Oy,Object.defineProperty(n,"mapTo",{enumerable:!0,get:function(){return gS.mapTo}}),OS=sv,Object.defineProperty(n,"materialize",{enumerable:!0,get:function(){return OS.materialize}}),wS=pv,Object.defineProperty(n,"max",{enumerable:!0,get:function(){return wS.max}}),ES=wv,Object.defineProperty(n,"merge",{enumerable:!0,get:function(){return ES.merge}}),PS=up,Object.defineProperty(n,"mergeAll",{enumerable:!0,get:function(){return PS.mergeAll}}),SS=bv,Object.defineProperty(n,"flatMap",{enumerable:!0,get:function(){return SS.flatMap}}),TS=ap,Object.defineProperty(n,"mergeMap",{enumerable:!0,get:function(){return TS.mergeMap}}),jS=yv,Object.defineProperty(n,"mergeMapTo",{enumerable:!0,get:function(){return jS.mergeMapTo}}),CS=mv,Object.defineProperty(n,"mergeScan",{enumerable:!0,get:function(){return CS.mergeScan}}),RS=sp,Object.defineProperty(n,"mergeWith",{enumerable:!0,get:function(){return RS.mergeWith}}),IS=Mv,Object.defineProperty(n,"min",{enumerable:!0,get:function(){return IS.min}}),AS=Dv,Object.defineProperty(n,"multicast",{enumerable:!0,get:function(){return AS.multicast}}),kS=w,Object.defineProperty(n,"observeOn",{enumerable:!0,get:function(){return kS.observeOn}}),MS=Bv,Object.defineProperty(n,"onErrorResumeNext",{enumerable:!0,get:function(){return MS.onErrorResumeNext}}),NS=Gv,Object.defineProperty(n,"pairwise",{enumerable:!0,get:function(){return NS.pairwise}}),xS=pn,Object.defineProperty(n,"partition",{enumerable:!0,get:function(){return xS.partition}}),DS=Zv,Object.defineProperty(n,"pluck",{enumerable:!0,get:function(){return DS.pluck}}),LS=Xv,Object.defineProperty(n,"publish",{enumerable:!0,get:function(){return LS.publish}}),US=tm,Object.defineProperty(n,"publishBehavior",{enumerable:!0,get:function(){return US.publishBehavior}}),FS=om,Object.defineProperty(n,"publishLast",{enumerable:!0,get:function(){return FS.publishLast}}),BS=am,Object.defineProperty(n,"publishReplay",{enumerable:!0,get:function(){return BS.publishReplay}}),WS=it,Object.defineProperty(n,"race",{enumerable:!0,get:function(){return WS.race}}),qS=fm,Object.defineProperty(n,"raceWith",{enumerable:!0,get:function(){return qS.raceWith}}),zS=eb,Object.defineProperty(n,"reduce",{enumerable:!0,get:function(){return zS.reduce}}),VS=_m,Object.defineProperty(n,"repeat",{enumerable:!0,get:function(){return VS.repeat}}),HS=Em,Object.defineProperty(n,"repeatWhen",{enumerable:!0,get:function(){return HS.repeatWhen}}),GS=Cm,Object.defineProperty(n,"retry",{enumerable:!0,get:function(){return GS.retry}}),YS=Nm,Object.defineProperty(n,"retryWhen",{enumerable:!0,get:function(){return YS.retryWhen}}),KS=C,Object.defineProperty(n,"refCount",{enumerable:!0,get:function(){return KS.refCount}}),ZS=Fm,Object.defineProperty(n,"sample",{enumerable:!0,get:function(){return ZS.sample}}),QS=Vm,Object.defineProperty(n,"sampleTime",{enumerable:!0,get:function(){return QS.sampleTime}}),XS=Km,Object.defineProperty(n,"scan",{enumerable:!0,get:function(){return XS.scan}}),JS=tb,Object.defineProperty(n,"sequenceEqual",{enumerable:!0,get:function(){return JS.sequenceEqual}}),$S=t0,Object.defineProperty(n,"share",{enumerable:!0,get:function(){return $S.share}}),e1=c0,Object.defineProperty(n,"shareReplay",{enumerable:!0,get:function(){return e1.shareReplay}}),t1=p0,Object.defineProperty(n,"single",{enumerable:!0,get:function(){return t1.single}}),r1=v0,Object.defineProperty(n,"skip",{enumerable:!0,get:function(){return r1.skip}}),n1=g0,Object.defineProperty(n,"skipLast",{enumerable:!0,get:function(){return n1.skipLast}}),o1=P0,Object.defineProperty(n,"skipUntil",{enumerable:!0,get:function(){return o1.skipUntil}}),i1=R0,Object.defineProperty(n,"skipWhile",{enumerable:!0,get:function(){return i1.skipWhile}}),u1=k0,Object.defineProperty(n,"startWith",{enumerable:!0,get:function(){return u1.startWith}}),a1=yl,Object.defineProperty(n,"subscribeOn",{enumerable:!0,get:function(){return a1.subscribeOn}}),s1=D0,Object.defineProperty(n,"switchAll",{enumerable:!0,get:function(){return s1.switchAll}}),c1=L0,Object.defineProperty(n,"switchMap",{enumerable:!0,get:function(){return c1.switchMap}}),l1=z0,Object.defineProperty(n,"switchMapTo",{enumerable:!0,get:function(){return l1.switchMapTo}}),f1=G0,Object.defineProperty(n,"switchScan",{enumerable:!0,get:function(){return f1.switchScan}}),p1=dy,Object.defineProperty(n,"take",{enumerable:!0,get:function(){return p1.take}}),d1=X_,Object.defineProperty(n,"takeLast",{enumerable:!0,get:function(){return d1.takeLast}}),h1=Z0,Object.defineProperty(n,"takeUntil",{enumerable:!0,get:function(){return h1.takeUntil}}),b1=eg,Object.defineProperty(n,"takeWhile",{enumerable:!0,get:function(){return b1.takeWhile}}),y1=ng,Object.defineProperty(n,"tap",{enumerable:!0,get:function(){return y1.tap}}),_1=E,Object.defineProperty(n,"throttle",{enumerable:!0,get:function(){return _1.throttle}}),v1=fg,Object.defineProperty(n,"throttleTime",{enumerable:!0,get:function(){return v1.throttleTime}}),m1=Zy,Object.defineProperty(n,"throwIfEmpty",{enumerable:!0,get:function(){return m1.throwIfEmpty}}),g1=bg,Object.defineProperty(n,"timeInterval",{enumerable:!0,get:function(){return g1.timeInterval}}),O1=Bc,Object.defineProperty(n,"timeout",{enumerable:!0,get:function(){return O1.timeout}}),w1=gg,Object.defineProperty(n,"timeoutWith",{enumerable:!0,get:function(){return w1.timeoutWith}}),E1=Sl,Object.defineProperty(n,"timestamp",{enumerable:!0,get:function(){return E1.timestamp}}),P1=$h,Object.defineProperty(n,"toArray",{enumerable:!0,get:function(){return P1.toArray}}),S1=u,Object.defineProperty(n,"window",{enumerable:!0,get:function(){return S1.window}}),T1=Ag,Object.defineProperty(n,"windowCount",{enumerable:!0,get:function(){return T1.windowCount}}),j1=Dg,Object.defineProperty(n,"windowTime",{enumerable:!0,get:function(){return j1.windowTime}}),C1=pl,Object.defineProperty(n,"windowToggle",{enumerable:!0,get:function(){return C1.windowToggle}}),R1=v,Object.defineProperty(n,"windowWhen",{enumerable:!0,get:function(){return R1.windowWhen}}),I1=nO,Object.defineProperty(n,"withLatestFrom",{enumerable:!0,get:function(){return I1.withLatestFrom}}),A1=i,Object.defineProperty(n,"zip",{enumerable:!0,get:function(){return A1.zip}}),k1=j,Object.defineProperty(n,"zipAll",{enumerable:!0,get:function(){return k1.zipAll}}),M1=R,Object.defineProperty(n,"zipWith",{enumerable:!0,get:function(){return M1.zipWith}});var t={},U1=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},F1=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},B1=(Object.defineProperty(t,"__esModule",{value:!0}),e),W1=Y,q1=o,z1=0,V1=1,H1=2;function G1(e,t){e=e.pipe((0,q1.publishReplay)(1),(0,q1.refCount)());this._result=e,this._keys=e.pipe((0,q1.mergeMap)(function(e){return(0,W1.from)(e.keys())}),(0,q1.publishReplay)(1),(0,q1.refCount)()),this._records=void 0,this._controls=new Y1,this._summary=new W1.ReplaySubject,this._state=t||z1}G1.prototype.keys=function(){return this._keys},G1.prototype.records=function(){var r=this,e=this._result.pipe((0,q1.mergeMap)(function(t){return new W1.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},G1.prototype.consume=function(){var r=this;return this._result.pipe((0,q1.mergeMap)(function(t){return new W1.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},G1.prototype.pause=function(){this._controls.pause()},G1.prototype.resume=function(){return this._controls.resume()},G1.prototype.push=function(){return this._controls.push()},G1.prototype._startStreaming=function(e){var e=void 0===e?{}:e,t=e.result,r=e.recordsObserver,r=void 0===r?null:r,e=e.summaryObserver,e=void 0===e?null:e,n=[];return e&&n.push(this._summary.subscribe(e)),this._state<V1?(this._state=V1,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,B1.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},G1.prototype._toObservable=function(){var n=this;return new W1.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new G1((t=e,new W1.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},G1.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new Y1);var a=new W1.Subject,s=function(n){return U1(e,void 0,void 0,function(){var t,r;return F1(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),u.pushing=!0,[4,n];case 1:return t=e.sent(),r=t.done,t=t.value,r?(a.complete(),i.complete()):(a.next(t),u.paused||s(o.next()).catch(function(){})),[3,4];case 2:return r=e.sent(),a.error(r),i.error(r),[3,4];case 3:return u.pushing=!1,[7];case 4:return[2]}})})};function t(t){return U1(this,void 0,void 0,function(){return F1(this,function(e){switch(e.label){case 0:return[4,s(o.next(t))];case 1:return e.sent(),[2]}})})}return(u.pusher=t)(),a}(n[Symbol.asyncIterator](),{complete:function(){return U1(t,void 0,void 0,function(){var t,r;return F1(this,function(e){switch(e.label){case 0:return this._state=H1,r=(t=this._summary).next,[4,n.summary()];case 1:return r.apply(t,[e.sent()]),this._summary.complete(),[2]}})})},error:function(e){t._state=H1,t._summary.error(e)}},this._controls),this._records)},t.default=G1;K1.prototype.pause=function(){this._paused=!0},Object.defineProperty(K1.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(K1.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),K1.prototype.resume=function(){return U1(this,void 0,void 0,function(){var t;return F1(this,function(e){switch(e.label){case 0:return t=this._paused,this._paused=!1,!t||this._pushing?[3,2]:[4,this._push()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},K1.prototype.push=function(){return U1(this,void 0,void 0,function(){return F1(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(K1.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var Y1=K1;function K1(e){void 0===e&&(e=function(){return U1(t,void 0,void 0,function(){return F1(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var P={},s=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Z1=(Object.defineProperty(P,"__esModule",{value:!0}),Y),Q1=s(t);function X1(e){this._txc=e}s(e),X1.prototype.run=function(e,r){var n=this;return new Q1.default(new Z1.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},X1.prototype.commit=function(){var e=this;return new Z1.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},X1.prototype.rollback=function(){var e=this;return new Z1.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},X1.prototype.isOpen=function(){return this._txc.isOpen()},X1.prototype.close=function(){var e=this;return new Z1.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},P.default=X1;_={},b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function J1(e){e=e.run;this._run=e}Object.defineProperty(_,"__esModule",{value:!0}),b(t),b(P),J1.fromTransaction=function(e){return new J1({run:e.run.bind(e)})},J1.prototype.run=function(e,t){return this._run(e,t)},_.default=J1;var S={},$1=(Object.defineProperty(S,"__esModule",{value:!0}),e),eT=Y,tT=o,rT=($1.internal.logger.Logger,$1.error.SERVICE_UNAVAILABLE);function nT(e){var e=void 0===e?{}:e,t=e.maxRetryTimeout,r=e.initialDelay,r=void 0===r?1e3:r,n=e.delayMultiplier,n=void 0===n?2:n,o=e.delayJitter,o=void 0===o?.2:o,e=e.logger,e=void 0===e?null:e;this._maxRetryTimeout=oT(void 0===t?3e4:t,3e4),this._initialDelay=oT(r,1e3),this._delayMultiplier=oT(n,2),this._delayJitter=oT(o,.2),this._logger=e}function oT(e,t){return e||0===e?e:t}nT.prototype.retry=function(e){var a=this;return e.pipe((0,tT.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,tT.mergeMap)(function(e){if(!(0,$1.isRetriableError)(e))return(0,eT.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,$1.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),rT)).seenErrors=n,(0,eT.throwError)(function(){return t});var r=a._computeNextDelay(u);return u*=a._delayMultiplier,i++,a._logger&&a._logger.warn("Transaction failed and will be retried in ".concat(r)),(0,eT.of)(1).pipe((0,tT.delay)(r))}))}))},nT.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},S.default=nT;var Fs=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},iT=(Object.defineProperty(V,"__esModule",{value:!0}),Y),uT=o,aT=Fs(t),Zs=e,sT=Fs(P),cT=Fs(_),lT=Fs(S),$s=Zs.internal.constants,fT=$s.ACCESS_MODE_READ,pT=$s.ACCESS_MODE_WRITE,dT=$s.TELEMETRY_APIS,hT=Zs.internal.txConfig.TxConfig;function bT(e){var e=void 0===e?{}:e,t=e.session,r=e.config,e=e.log;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new lT.default({maxRetryTimeout:e})}(r),this._log=e}bT.prototype.run=function(e,r,n){var o=this;return new aT.default(new iT.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},bT.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:dT.UNMANAGED_TRANSACTION})},bT.prototype.readTransaction=function(e,t){return this._runTransaction(fT,e,t)},bT.prototype.writeTransaction=function(e,t){return this._runTransaction(pT,e,t)},bT.prototype.executeRead=function(e,t){return this._executeInTransaction(fT,e,t)},bT.prototype.executeWrite=function(e,t){return this._executeInTransaction(pT,e,t)},bT.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new cT.default({run:e.run.bind(e)})})},bT.prototype.close=function(){var e=this;return new iT.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},bT.prototype[Symbol.asyncDispose]=function(){return this.close()},bT.prototype.lastBookmark=function(){return this.lastBookmarks()},bT.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},bT.prototype._beginTransaction=function(e,t,r){var n=this,o=hT.empty();return t&&(o=new hT(t,this._log)),new iT.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new sT.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},bT.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),hT.empty()),u=(t&&(i=new hT(t)),{apiTelemetryConfig:{api:dT.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,iT.of)(1).pipe((0,uT.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,uT.mergeMap)(function(t){return(0,iT.defer)(function(){try{return r(n(t))}catch(e){return(0,iT.throwError)(function(){return e})}}).pipe((0,uT.catchError)(function(e){return t.rollback().pipe((0,uT.concatWith)((0,iT.throwError)(function(){return e})))}),(0,uT.concatWith)(t.commit()))})))},V.default=bT;var yT,_T,Os=r&&r.__extends||(yT=function(e,t){return(yT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zr=(Object.defineProperty(U,"__esModule",{value:!0}),U.WRITE=U.READ=U.Driver=void 0,e),vT=m(V),mT=Zr.internal.constants.FETCH_ALL,hs=Zr.driver.READ,gT=Zr.driver.WRITE,c=(U.READ=hs,U.WRITE=gT,Os(OT,_T=Zr.Driver),OT.prototype.rxSession=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.fetchSize,i=e.impersonatedUser,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return new vT.default({session:this._newSession({defaultAccessMode:void 0===t?gT:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:i,auth:e,reactive:!1,fetchSize:function(e,t){e=parseInt(e,10);{if(0<e||e===mT)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(mT," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,log:this._log}),config:this._config,log:this._log})},OT);function OT(){return null!==_T&&_T.apply(this,arguments)||this}U.Driver=c,U.default=c;g={},Object.defineProperty(g,"__esModule",{value:!0}),g.default="5.27.0",p={},Dc={},Rc={};function wT(){}Object.defineProperty(Rc,"__esModule",{value:!0}),wT.prototype.selectReader=function(e){throw new Error("Abstract function")},wT.prototype.selectWriter=function(e){throw new Error("Abstract function")},Rc.default=wT;kc={},Nc={};function ET(e){this._offset=e||0}Object.defineProperty(Nc,"__esModule",{value:!0}),ET.prototype.next=function(e){if(0===e)return-1;var t=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),t%e},Nc.default=ET;var PT,ST,jc=r&&r.__extends||(PT=function(e,t){return(PT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}PT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Nl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},TT=(Object.defineProperty(kc,"__esModule",{value:!0}),Nl(Nc)),f=Nl(Rc),Ol=(ST=f.default,jc(jT,ST),jT.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},jT.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},jT.prototype._select=function(e,t){var r=e.length;if(0===r)return null;var n=t.next(r),o=n,i=null,u=Number.MAX_SAFE_INTEGER;do{var a=e[o],s=this._connectionPool.activeResourceCount(a)}while(s<u&&(i=a,u=s),o===r-1?o=0:o++,o!==n);return i},jT);function jT(e){var t=ST.call(this)||this;return t._readersIndex=new TT.default,t._writersIndex=new TT.default,t._connectionPool=e,t}kc.default=Ol;xr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.LeastConnectedLoadBalancingStrategy=Dc.LoadBalancingStrategy=void 0,xc=xr(Rc),Dc.LoadBalancingStrategy=xc.default,Ff=xr(kc),Dc.LeastConnectedLoadBalancingStrategy=Ff.default,Dc.default=Ff.default,y={},op={},Ep={},Pp={},Ap={},Ec={},Wf={},Gf={byteLength:function(e){var e=NT(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};Gf.toByteArray=function(e){var t,r,n=NT(e),o=n[0],n=n[1],i=new IT(function(e,t){return 3*(e+t)/4-t}(o,n)),u=0,a=0<n?o-4:o;for(r=0;r<a;r+=4)t=RT[e.charCodeAt(r)]<<18|RT[e.charCodeAt(r+1)]<<12|RT[e.charCodeAt(r+2)]<<6|RT[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=RT[e.charCodeAt(r)]<<2|RT[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=RT[e.charCodeAt(r)]<<10|RT[e.charCodeAt(r+1)]<<4|RT[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},Gf.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],i=0,u=r-n;i<u;i+=16383)o.push(function(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(function(e){return CT[e>>18&63]+CT[e>>12&63]+CT[e>>6&63]+CT[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(CT[t>>2]+CT[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(CT[t>>10]+CT[t>>4&63]+CT[t<<2&63]+"="));return o.join("")};for(var CT=[],RT=[],IT="undefined"!=typeof Uint8Array?Uint8Array:Array,AT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kT=0,MT=AT.length;kT<MT;++kT)CT[kT]=AT[kT],RT[AT.charCodeAt(kT)]=kT;function NT(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("="),t=(e=-1===e?t:e)===t?0:4-e%4;return[e,t]}RT["-".charCodeAt(0)]=62,RT["_".charCodeAt(0)]=63;Tc={read:function(e,t,r,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,c=s>>1,l=-7,f=r?o-1:0,p=r?-1:1,o=e[t+f];for(f+=p,i=o&(1<<-l)-1,o>>=-l,l+=a;0<l;i=256*i+e[t+f],f+=p,l-=8);for(u=i&(1<<-l)-1,i>>=-l,l+=n;0<l;u=256*u+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===s)return u?NaN:1/0*(o?-1:1);u+=Math.pow(2,n),i-=c}return(o?-1:1)*u*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var u,a,s=8*i-o-1,c=(1<<s)-1,l=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-u))<1&&(u--,n*=2),2<=(t+=1<=u+l?f/n:f*Math.pow(2,1-l))*n&&(u++,n/=2),c<=u+l?(a=0,u=c):1<=u+l?(a=(t*n-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));8<=o;e[r+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,s+=o;0<s;e[r+p]=255&u,p+=d,u/=256,s-=8);e[r+p-d]|=128*i}};{var xT=Wf;const Gx=Gf,Yx=Tc,Kx=(jl="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,xT.Buffer=k,xT.SlowBuffer=function(e){+e!=e&&(e=0);return k.alloc(+e)},xT.INSPECT_MAX_BYTES=50,2147483647);function DT(e){if(e>Kx)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,k.prototype),e}function k(e,t,r){if("number"!=typeof e)return LT(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return FT(e)}function LT(t,r,e){if("string"==typeof t){var n=t;var o=r;"string"==typeof o&&""!==o||(o="utf8");if(!k.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var i=0|zT(n,o);let e=DT(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return pj(o=t,Uint8Array)?WT((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):BT(o);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(pj(t,ArrayBuffer)||t&&pj(t.buffer,ArrayBuffer))return WT(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(pj(t,SharedArrayBuffer)||t&&pj(t.buffer,SharedArrayBuffer)))return WT(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return k.from(n,r,e);var u=function(e){{var t,r;if(k.isBuffer(e))return t=0|qT(e.length),0===(r=DT(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||dj(e.length)?DT(0):BT(e);if("Buffer"===e.type&&Array.isArray(e.data))return BT(e.data)}(t);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return k.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function UT(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function FT(e){return UT(e),DT(e<0?0:0|qT(e))}function BT(t){var r=t.length<0?0:0|qT(t.length);const n=DT(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function WT(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,k.prototype),n}function qT(e){if(e>=Kx)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Kx.toString(16)+" bytes");return 0|e}function zT(e,t){if(k.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||pj(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return cj(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return lj(e).length;default:if(o)return n?-1:cj(e).length;t=(""+t).toLowerCase(),o=!0}}function VT(e,r,n){let t=!1;if((r=void 0===r||r<0?0:r)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(r>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":{var o=this;var i=r;var u=n;var a=o.length;(!i||i<0)&&(i=0);(!u||u<0||a<u)&&(u=a);let t="";for(let e=i;e<u;++e)t+=Jx[o[e]];return t;return}case"utf8":case"utf-8":return QT(this,r,n);case"ascii":{var s=this;a=r;var c=n;let t="";c=Math.min(s.length,c);for(let e=a;e<c;++e)t+=String.fromCharCode(127&s[e]);return t;return}case"latin1":case"binary":{var l=this;i=r;var f=n;let t="";f=Math.min(l.length,f);for(let e=i;e<f;++e)t+=String.fromCharCode(l[e]);return t;return}case"base64":return d=this,b=n,0===(h=r)&&b===d.length?Gx.fromByteArray(d):Gx.fromByteArray(d.slice(h,b));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":{d=this;h=r;b=n;var p=d.slice(h,b);let t="";for(let e=0;e<p.length-1;e+=2)t+=String.fromCharCode(p[e]+256*p[e+1]);return t;return}default:if(t)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),t=!0}var d,h,b}function HT(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function GT(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=dj(r=+r)?o?0:e.length-1:r)<0?e.length+r:r)>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=k.from(t,n)),k.isBuffer(t))return 0===t.length?-1:YT(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):YT(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function YT(r,n,t,e,o){let i=1,u=r.length,a=n.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(r.length<2||n.length<2)return-1;i=2,u/=2,a/=2,t/=2}function s(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}let c;if(o){let e=-1;for(c=t;c<u;c++)if(s(r,c)===s(n,-1===e?0:c-e)){if(-1===e&&(e=c),c-e+1===a)return e*i}else-1!==e&&(c-=c-e),e=-1}else for(t+a>u&&(t=u-a),c=t;0<=c;c--){let t=!0;for(let e=0;e<a;e++)if(s(r,c+e)!==s(n,e)){t=!1;break}if(t)return c}return-1}function KT(e,t,r,n){return fj(function(t){const r=[];for(let e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(t),e,r,n)}function ZT(e,t,r,n){return fj(function(t,r){var n,o;const i=[];for(let e=0;e<t.length&&!((r-=2)<0);++e)o=t.charCodeAt(e),n=o>>8,o=o%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function QT(u,e,t){t=Math.min(u.length,t);const r=[];let a=e;for(;a<t;){var s=u[a];let o=null,i=239<s?4:223<s?3:191<s?2:1;if(a+i<=t){let e,t,r,n;switch(i){case 1:s<128&&(o=s);break;case 2:128==(192&(e=u[a+1]))&&127<(n=(31&s)<<6|63&e)&&(o=n);break;case 3:e=u[a+1],t=u[a+2],128==(192&e)&&128==(192&t)&&2047<(n=(15&s)<<12|(63&e)<<6|63&t)&&(n<55296||57343<n)&&(o=n);break;case 4:e=u[a+1],t=u[a+2],r=u[a+3],128==(192&e)&&128==(192&t)&&128==(192&r)&&65535<(n=(15&s)<<18|(63&e)<<12|(63&t)<<6|63&r)&&n<1114112&&(o=n)}}null===o?(o=65533,i=1):65535<o&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}{var n=r,o=n.length;if(o<=Zx)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=Zx));return e}}xT.kMaxLength=Kx,(k.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1);var e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(e){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(k.prototype,"parent",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}}),Object.defineProperty(k.prototype,"offset",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}}),k.poolSize=8192,k.from=LT,Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(e,t,r){return t=t,r=r,UT(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?DT(e).fill(t,r):DT(e).fill(t):DT(e)},k.allocUnsafe=FT,k.allocUnsafeSlow=FT,k.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==k.prototype},k.compare=function(r,n){if(pj(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),pj(n,Uint8Array)&&(n=k.from(n,n.offset,n.byteLength)),!k.isBuffer(r)||!k.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let o=r.length,i=n.length;for(let e=0,t=Math.min(o,i);e<t;++e)if(r[e]!==n[e]){o=r[e],i=n[e];break}return o<i?-1:i<o?1:0},k.isEncoding=function(e){switch(String(e).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}},k.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return k.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=k.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(pj(e,Uint8Array))o+e.length>n.length?(e=k.isBuffer(e)?e:k.from(e)).copy(n,o):Uint8Array.prototype.set.call(n,e,o);else{if(!k.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},k.byteLength=zT,k.prototype._isBuffer=!0,k.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)HT(this,e,e+1);return this},k.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)HT(this,e,e+3),HT(this,e+1,e+2);return this},k.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)HT(this,e,e+7),HT(this,e+1,e+6),HT(this,e+2,e+5),HT(this,e+3,e+4);return this},k.prototype.toLocaleString=k.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?QT(this,0,e):VT.apply(this,arguments)},k.prototype.equals=function(e){if(k.isBuffer(e))return this===e||0===k.compare(this,e);throw new TypeError("Argument must be a Buffer")},k.prototype.inspect=function(){let e="";var t=xT.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},jl&&(k.prototype[jl]=k.prototype.inspect),k.prototype.compare=function(e,t,r,n,o){if(pj(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),!k.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=t)return 0;if(o<=n)return-1;if(r<=t)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),u=(r>>>=0)-(t>>>=0);var a=Math.min(i,u),s=this.slice(n,o),c=e.slice(t,r);for(let e=0;e<a;++e)if(s[e]!==c[e]){i=s[e],u=c[e];break}return i<u?-1:u<i?1:0},k.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},k.prototype.indexOf=function(e,t,r){return GT(this,e,t,r,!0)},k.prototype.lastIndexOf=function(e,t,r){return GT(this,e,t,r,!1)},k.prototype.write=function(t,r,n,e){if(void 0===r)e="utf8",n=this.length,r=0;else if(void 0===n&&"string"==typeof r)e=r,n=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(n)?(n>>>=0,void 0===e&&(e="utf8")):(e=n,n=void 0)}var o,i,u,a=this.length-r;if((void 0===n||a<n)&&(n=a),0<t.length&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e=e||"utf8";let s=!1;for(;;)switch(e){case"hex":{var c=this;var l=t;var f=r;var p=n;f=Number(f)||0;var d=c.length-f;(!p||d<(p=Number(p)))&&(p=d),(d=l.length)/2<p&&(p=d/2);let e;for(e=0;e<p;++e){var h=parseInt(l.substr(2*e,2),16);if(dj(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,fj(cj(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return KT(this,t,r,n);case"base64":return i=this,u=r,o=n,fj(lj(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ZT(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),s=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Zx=4096;function XT(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function JT(e,t,r,n,o,i){if(!k.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<t||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function $T(e,t,r,n,o){uj(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r++]=n,e[r++]=n>>=8,e[r++]=n>>=8,e[r++]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,e[r++]=o>>=8,e[r++]=o>>=8,e[r++]=o>>=8,r}function ej(e,t,r,n,o){uj(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r+7]=n,e[r+6]=n>>=8,e[r+5]=n>>=8,e[r+4]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,e[r+2]=o>>=8,e[r+1]=o>>=8,e[r]=o>>=8,r+8}function tj(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function rj(e,t,r,n,o){return t=+t,r>>>=0,o||tj(e,0,r,4),Yx.write(e,t,r,n,23,4),r+4}function nj(e,t,r,n,o){return t=+t,r>>>=0,o||tj(e,0,r,8),Yx.write(e,t,r,n,52,8),r+8}k.prototype.slice=function(e,t){var r=this.length,r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e),this.subarray(e,t));return Object.setPrototypeOf(r,k.prototype),r},k.prototype.readUintLE=k.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||XT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},k.prototype.readUintBE=k.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||XT(e,t,this.length);let n=this[e+--t],o=1;for(;0<t&&(o*=256);)n+=this[e+--t]*o;return n},k.prototype.readUint8=k.prototype.readUInt8=function(e,t){return e>>>=0,t||XT(e,1,this.length),this[e]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,t){return e>>>=0,t||XT(e,2,this.length),this[e]|this[e+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,t){return e>>>=0,t||XT(e,2,this.length),this[e]<<8|this[e+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,t){return e>>>=0,t||XT(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(e,t){return e>>>=0,t||XT(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},k.prototype.readBigUInt64LE=hj(function(e){aj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||sj(e,this.length-8),t+256*this[++e]+65536*this[++e]+this[++e]*2**24),e=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(t)+(BigInt(e)<<BigInt(32))}),k.prototype.readBigUInt64BE=hj(function(e){aj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||sj(e,this.length-8),t*2**24+65536*this[++e]+256*this[++e]+this[++e]),e=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(t)<<BigInt(32))+BigInt(e)}),k.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||XT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},k.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||XT(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;0<n&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},k.prototype.readInt8=function(e,t){return e>>>=0,t||XT(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},k.prototype.readInt16LE=function(e,t){e>>>=0,t||XT(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},k.prototype.readInt16BE=function(e,t){e>>>=0,t||XT(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},k.prototype.readInt32LE=function(e,t){return e>>>=0,t||XT(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},k.prototype.readInt32BE=function(e,t){return e>>>=0,t||XT(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},k.prototype.readBigInt64LE=hj(function(e){aj(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||sj(e,this.length-8),this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24));return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),k.prototype.readBigInt64BE=hj(function(e){aj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||sj(e,this.length-8),(t<<24)+65536*this[++e]+256*this[++e]+this[++e]);return(BigInt(t)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),k.prototype.readFloatLE=function(e,t){return e>>>=0,t||XT(e,4,this.length),Yx.read(this,e,!0,23,4)},k.prototype.readFloatBE=function(e,t){return e>>>=0,t||XT(e,4,this.length),Yx.read(this,e,!1,23,4)},k.prototype.readDoubleLE=function(e,t){return e>>>=0,t||XT(e,8,this.length),Yx.read(this,e,!0,52,8)},k.prototype.readDoubleBE=function(e,t){return e>>>=0,t||XT(e,8,this.length),Yx.read(this,e,!1,52,8)},k.prototype.writeUintLE=k.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||JT(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},k.prototype.writeUintBE=k.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||JT(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+r},k.prototype.writeUint8=k.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,1,255,0),this[t]=255&e,t+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},k.prototype.writeBigUInt64LE=hj(function(e,t=0){return $T(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=hj(function(e,t=0){return ej(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||JT(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=0,i=1,u=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===u&&0!==this[t+o-1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},k.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||JT(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=r-1,i=1,u=0;for(this[t+o]=255&e;0<=--o&&(i*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},k.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},k.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},k.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},k.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},k.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||JT(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},k.prototype.writeBigInt64LE=hj(function(e,t=0){return $T(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=hj(function(e,t=0){return ej(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeFloatLE=function(e,t,r){return rj(this,e,t,!0,r)},k.prototype.writeFloatBE=function(e,t,r){return rj(this,e,t,!1,r)},k.prototype.writeDoubleLE=function(e,t,r){return nj(this,e,t,!0,r)},k.prototype.writeDoubleBE=function(e,t,r){return nj(this,e,t,!1,r)},k.prototype.copy=function(e,t,r,n){if(!k.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0<n&&n<r?r:n)===r)return 0;if(0===e.length||0===this.length)return 0;if((t=t||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=e.length-t<n-r?e.length-t+r:n)-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},k.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=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&&!k.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o;1===e.length&&(o=e.charCodeAt(0),("utf8"===n&&o<128||"latin1"===n)&&(e=o))}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0;let i;if("number"==typeof(e=e||0))for(i=t;i<r;++i)this[i]=e;else{var u=k.isBuffer(e)?e:k.from(e,n),a=u.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=u[i%a]}return this};const Qx={};function oj(e,t,r){Qx[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=this.name+` [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return this.name+` [${e}]: `+this.message}}}function ij(e){let t="",r=e.length;for(var n="-"===e[0]?1:0;r>=4+n;r-=3)t="_"+e.slice(r-3,r)+t;return""+e.slice(0,r)+t}function uj(t,r,n,e,o,i){if(n<t||t<r){var u="bigint"==typeof r?"n":"";let e;throw e=3<i?0===r||r===BigInt(0)?`>= 0${u} and < 2${u} ** `+8*(i+1)+u:`>= -(2${u} ** ${8*(i+1)-1}${u}) and < 2 ** `+(8*(i+1)-1)+u:`>= ${r}${u} and <= `+n+u,new Qx.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,aj(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||sj(u,r.length-(n+1))}function aj(e,t){if("number"!=typeof e)throw new Qx.ERR_INVALID_ARG_TYPE(t,"number",e)}function sj(e,t,r){if(Math.floor(e)!==e)throw aj(e,r),new Qx.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new Qx.ERR_BUFFER_OUT_OF_BOUNDS;throw new Qx.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}oj("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),oj("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),oj("ERR_OUT_OF_RANGE",function(e,t,r){e=`The value of "${e}" is out of range.`;let n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=ij(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=ij(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const Xx=/[^+/0-9A-Za-z-_]/g;function cj(t,r){r=r||1/0;let n;var o=t.length;let i=null;const u=[];for(let e=0;e<o;++e){if(55295<(n=t.charCodeAt(e))&&n<57344){if(!i){if(56319<n){-1<(r-=3)&&u.push(239,191,189);continue}if(e+1===o){-1<(r-=3)&&u.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(r-=3)&&u.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(r-=3)&&u.push(239,191,189);if(i=null,n<128){if(--r<0)break;u.push(n)}else if(n<2048){if((r-=2)<0)break;u.push(n>>6|192,63&n|128)}else if(n<65536){if((r-=3)<0)break;u.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;u.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return u}function lj(e){return Gx.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Xx,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function fj(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function pj(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function dj(e){return e!=e}const Jx=function(){var r="0123456789abcdef";const n=new Array(256);for(let t=0;t<16;++t){var o=16*t;for(let e=0;e<16;++e)n[o+e]=r[t]+r[e]}return n}();function hj(e){return"undefined"==typeof BigInt?bj:e}function bj(){throw new Error("BigInt not supported")}}var yj,id={},vc={},h=r&&r.__extends||(yj=function(e,t){return(yj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),gd=(Object.defineProperty(vc,"__esModule",{value:!0}),M.prototype.getUInt8=function(e){throw new Error("Not implemented")},M.prototype.getInt8=function(e){throw new Error("Not implemented")},M.prototype.getFloat64=function(e){throw new Error("Not implemented")},M.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},M.prototype.putInt8=function(e,t){throw new Error("Not implemented")},M.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},M.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},M.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},M.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},M.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},M.prototype.getInt64=function(e){return this.getInt8(e)<<56|this.getUInt8(e+1)<<48|this.getUInt8(e+2)<<40|this.getUInt8(e+3)<<32|this.getUInt8(e+4)<<24|this.getUInt8(e+5)<<16|this.getUInt8(e+6)<<8|this.getUInt8(e+7)},M.prototype.getSlice=function(e,t){return new vj(e,t,this)},M.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},M.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},M.prototype.putInt32=function(e,t){this.putInt8(e,t>>24),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},M.prototype.putUInt32=function(e,t){this.putUInt8(e,t>>24&255),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},M.prototype.putInt64=function(e,t){this.putInt8(e,t>>48),this.putUInt8(e+1,t>>42&255),this.putUInt8(e+2,t>>36&255),this.putUInt8(e+3,t>>30&255),this.putUInt8(e+4,t>>24&255),this.putUInt8(e+5,t>>16&255),this.putUInt8(e+6,t>>8&255),this.putUInt8(e+7,255&t)},M.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},M.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},M.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},M.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},M.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},M.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},M.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},M.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},M.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},M.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},M.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},M.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},M.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},M.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},M.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},M.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},M.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},M.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},M.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},M.prototype.remaining=function(){return this.length-this.position},M.prototype.hasRemaining=function(){return 0<this.remaining()},M.prototype.reset=function(){this.position=0},M.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},M.prototype.toHex=function(){for(var e="",t=0;t<this.length;t++){var r=this.getUInt8(t).toString(16);e+=r=1===r.length?"0"+r:r,t!==this.length-1&&(e+=" ")}return e},M);function M(e){this.position=0,this.length=e}vc.default=gd;h(mj,_j=gd),mj.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},mj.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},mj.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},mj.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},mj.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},mj.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var _j,vj=mj;function mj(e,t,r){t=_j.call(this,t)||this;return t._start=e,t._inner=r,t}var gj,Oj,Cd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Id=(Object.defineProperty(id,"__esModule",{value:!0}),id.BaseBuffer=void 0,Cd(vc)),Ud=(id.BaseBuffer=Id.default,id.default=Id.default,r&&r.__extends||(gj=function(e,t){return(gj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}gj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Vd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},wj=(Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.alloc=void 0,Vd(Wf)),Sc=Vd(id),Ej=(Oj=Sc.default,Ud(Pj,Oj),Pj.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},Pj.prototype.getInt8=function(e){return this._buffer.readInt8(e)},Pj.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},Pj.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},Pj.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},Pj.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},Pj.prototype.putBytes=function(e,t){var r;t instanceof Pj?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):Oj.prototype.putBytes.call(this,e,t)},Pj.prototype.getSlice=function(e,t){return new Pj(this._buffer.slice(e,e+t))},Pj);function Pj(e){var t=this,e=(e=e)instanceof wj.default.Buffer?e:"number"==typeof e&&"function"==typeof wj.default.Buffer.alloc?wj.default.Buffer.alloc(e):new wj.default.Buffer(e);return(t=Oj.call(this,e.length)||this)._buffer=e,t}Ec.default=Ej,Ec.alloc=function(e){return new Ej(e)};var ud=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sj=(Object.defineProperty(Ap,"__esModule",{value:!0}),ud(Ec)),Tj=e,Yd=Tj.internal.util,jj=Yd.ENCRYPTION_OFF,Cj=Yd.ENCRYPTION_ON;function Rj(e,t,r){void 0===t&&(t=Ij),void 0===r&&(r=function(e){return new WebSocket(e)});var n,o=this,t=(this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===Cj}(e),n=function(e){return!1===e.encrypted||e.encrypted===jj}(e),e=e.trust,t=function(e){e="function"==typeof e?e():"";return e&&0<=e.toLowerCase().indexOf("https")}(t);if(function(e,t,r){null!==r&&(e&&!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."):t&&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,t),n)return{scheme:"ws",error:null};if(t)return{scheme:"wss",error:null};if(r)return e&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==e?{scheme:null,error:(0,Tj.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+e+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+jj+'"` in the driver configuration.')}:{scheme:"wss",error:null};return{scheme:"ws",error:null}}(e,t)),i=t.scheme,t=t.error;t?this._error=t:(this._ws=function(t,r,n){var o=t+"://"+r.asHostPort();try{return n(o)}catch(e){if(function(e,t){return"SyntaxError"===e.name&&function(e){return"["===e.charAt(0)&&-1!==e.indexOf("]")}(t.asHostPort())}(e,r))return o=function(e,t){var r=t.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(r,":").concat(t.port())}(t,r),n(o);throw e}}(i,e.address,r),this._ws.binaryType="arraybuffer",(n=this)._ws.onclose=function(e){e&&!e.wasClean&&n._handleConnectionError(),n._open=!1},this._ws.onopen=function(){n._clearConnectionTimeout();var e=n._pending;n._pending=null;for(var t=0;t<e.length;t++)n.write(e[t])},this._ws.onmessage=function(e){o._resetTimeout(),n.onmessage&&(e=new Sj.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function Ij(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}Rj.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,Tj.newError)("Failed to establish connection in ".concat(this._config.connectionTimeout,"ms"),this._config.connectionErrorCode),void(this.onerror&&this.onerror(this._error));this._open&&!this._timedout&&(this._error=(0,Tj.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))},Rj.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof Sj.default))throw(0,Tj.newError)("Don't know how to send buffer: "+e);try{this._ws.send(e._buffer)}catch(e){if(1===this._ws.readyState)throw e;this._handleConnectionError()}}},Rj.prototype.close=function(){var r=this;return null===this._closingPromise&&(this._closingPromise=new Promise(function(e,t){r._clearConnectionTimeout(),r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._ws.onclose=function(){e()},r._ws.close()):e()})),this._closingPromise},Rj.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},Rj.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},Rj.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},Rj.prototype._resetTimeout=function(){var e=this;this._receiveTimeoutStarted&&(null!==this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=setTimeout(function(){e._receiveTimeoutId=null,e._timedout=!0,e.stopReceiveTimeout(),e._error=(0,Tj.newError)("Connection lost. Server didn't respond in ".concat(e._receiveTimeout,"ms"),e._config.connectionErrorCode),e.close(),e.onerror&&e.onerror(e._error)},this._receiveTimeout))},Rj.prototype._setupConnectionTimeout=function(){var e,t=this,r=this._config.connectionTimeout;return r?(e=this._ws,setTimeout(function(){1!==e.readyState&&(t._connectionTimeoutFired=!0,e.close())},r)):null},Rj.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},Ap.default=Rj;var Aj,Xd={},Pc=r&&r.__extends||(Aj=function(e,t){return(Aj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Aj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Xd,"__esModule",{value:!0});var kj,O=e.internal.resolver.BaseHostNameResolver,md=(Pc(Mj,kj=O),Mj.prototype.resolve=function(e){return this._resolveToItself(e)},Mj);function Mj(){return null!==kj&&kj.apply(this,arguments)||this}Xd.default=md;var Nj,T={},xj=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Dj=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},uh=(Object.defineProperty(T,"__esModule",{value:!0}),T.default={load:function(t){return xj(this,void 0,void 0,function(){return Dj(this,function(e){return[2,t]})})}},r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}}),Nt=(Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.ClientCertificatesLoader=Pp.HostNameResolver=Pp.Channel=void 0,uh(Ap)),I=uh(Xd),Ad=uh(T),Od=(Pp.Channel=Nt.default,Pp.HostNameResolver=I.default,Pp.ClientCertificatesLoader=Ad.default,{}),ah={},fh=r&&r.__extends||(Nj=function(e,t){return(Nj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Nj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ah,"__esModule",{value:!0});var Lj,Uj=Ec,bh=(Lj=id.BaseBuffer,fh(Fj,Lj),Fj.prototype.getUInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getUInt8(e);e-=r.length}},Fj.prototype.getInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getInt8(e);e-=r.length}},Fj.prototype.getFloat64=function(e){for(var t=(0,Uj.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},Fj);function Fj(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=Lj.call(this,r)||this)._buffers=e,t}ah.default=bh;var Bj,Wj,gh=r&&r.__extends||(Bj=function(e,t){return(Bj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Bj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Sh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nh=(Object.defineProperty(Od,"__esModule",{value:!0}),Od.Dechunker=Od.Chunker=void 0,Sh(vc)),qj=Ec,zj=Sh(ah),qh=(Wj=Nh.default,gh(Vj,Wj),Vj.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},Vj.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},Vj.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},Vj.prototype.putBytes=function(e,t){for(;0<t.remaining();)this._ensure(1),this._buffer.remaining()>t.remaining()?this._buffer.writeBytes(t):this._buffer.writeBytes(t.readSlice(this._buffer.remaining()));return this},Vj.prototype.flush=function(){var e;return 0<this._buffer.position&&(this._closeChunkIfOpen(),e=this._buffer,this._buffer=null,this._ch.write(e.getSlice(0,e.position)),this._buffer=(0,qj.alloc)(this._bufferSize),this._chunkOpen=!1),this},Vj.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},Vj.prototype._ensure=function(e){e=this._chunkOpen?e:e+2;this._buffer.remaining()<e&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+2,this._chunkOpen=!0)},Vj.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},Vj);function Vj(e,t){var r=Wj.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,qj.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function Hj(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}Od.Chunker=qh,Hj.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},Hj.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},Hj.prototype.IN_CHUNK=function(e){return this._chunkSize<=e.remaining()?(this._currentMessage.push(e.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=e.remaining(),this._currentMessage.push(e.readSlice(e.remaining())),this.IN_CHUNK)},Hj.prototype.CLOSED=function(e){},Hj.prototype._onHeader=function(e){if(0!==e)return this._chunkSize=e,this.IN_CHUNK;var t=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:t=this._currentMessage[0];break;default:t=new zj.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},Hj.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},Od.Dechunker=Hj;var Yh={},Gj=(Object.defineProperty(Yh,"__esModule",{value:!0}),e),Xh=Gj.internal.util,Jh=Xh.ENCRYPTION_OFF,yb=Xh.ENCRYPTION_ON,Yj=Gj.error.SERVICE_UNAVAILABLE,Kj=[null,void 0,!0,!1,yb,Jh],Zj=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];Yh.default=function(e,t,r,n){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==Kj.indexOf(e))return e;throw(0,Gj.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(Kj))}(t),this.trust=function(e){e=e.trust;if(-1!==Zj.indexOf(e))return e;throw(0,Gj.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(Zj))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||Yj,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=n};var Qj,Xj,bb={},xb={},ip={exports:{}};function Jj(e,t){for(var r in e)t[r]=e[r]}function $j(e,t,r){return Xj(e,t,r)}Ab=(wf=ip).exports,(Xj=(Qj=Wf).Buffer).from&&Xj.alloc&&Xj.allocUnsafe&&Xj.allocUnsafeSlow?wf.exports=Qj:(Jj(Qj,Ab),Ab.Buffer=$j),$j.prototype=Object.create(Xj.prototype),Jj(Xj,$j),$j.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return Xj(e,t,r)},$j.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=Xj(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},$j.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return Xj(e)},$j.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return Qj.SlowBuffer(e)};var eC=ip.exports.Buffer,tC=eC.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function rC(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||eC.isEncoding!==tC&&tC(e))return t||e;throw new Error("Unknown encoding: "+e)}function nC(e){var t;switch(this.encoding=rC(e),this.encoding){case"utf16le":this.text=uC,this.end=aC,t=4;break;case"utf8":this.fillLast=iC,t=4;break;case"base64":this.text=sC,this.end=cC,t=3;break;default:return this.write=lC,void(this.end=fC)}this.lastNeed=0,this.lastTotal=0,this.lastChar=eC.allocUnsafe(t)}function oC(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function iC(e){var t,r=this.lastTotal-this.lastNeed,n=(t=this,128!=(192&(n=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<n.length?128!=(192&n[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<n.length&&128!=(192&n[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,r,0,e.length),void(this.lastNeed-=e.length))}function uC(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);t=e.toString("utf16le",t);if(t){var r=t.charCodeAt(t.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function aC(e){var t,e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function sC(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function cC(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function lC(e){return e.toString(this.encoding)}function fC(e){return e&&e.length?this.write(e):""}(xb.StringDecoder=nC).prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},nC.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},nC.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=oC(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=oC(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=oC(t[n])))return 0<o&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;r=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},nC.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var pC,dC,hC,bC,yC,Nb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_C=(Object.defineProperty(bb,"__esModule",{value:!0}),Nb(Ec)),vC=e,mC=Nb(Wf),gC=new xb.StringDecoder("utf8");bb.default={encode:function(e){return new _C.default((e=e,"function"==typeof mC.default.Buffer.from?mC.default.Buffer.from(e,"utf8"):new mC.default.Buffer(e,"utf8")))},decode:function(e,t){if(Object.prototype.hasOwnProperty.call(e,"_buffer"))return n=t,a=(r=e).position,n=a+n,r.position=Math.min(n,r.length),r._buffer.toString("utf8",a,n);var o,i,u,r,n,a;if(Object.prototype.hasOwnProperty.call(e,"_buffers"))return o=function(e){return gC.write(e._buffer)},r=function(){return gC.end()},i=t,u=(a=e).position,a._updatePos(Math.min(t,a.length-u)),a._buffers.reduce(function(e,t){var r,n;return i<=0?e:u>=t.length?(u-=t.length,""):(t._updatePos(u-t.position),r=Math.min(t.length-u,i),n=t.readSlice(r),t._updatePos(r),i=Math.max(i-n.length,0),u=0,e+o(n))},"")+r();throw(0,vC.newError)("Don't know how to decode strings from '".concat(e,"'"))}},Hb=Ep,pC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Gb=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||pC(t,e,r)},dC=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Hb,"__esModule",{value:!0}),Hb.utf8=Hb.alloc=Hb.ChannelConfig=void 0,Gb(Pp,Hb),Gb(Od,Hb),hC=Yh,Object.defineProperty(Hb,"ChannelConfig",{enumerable:!0,get:function(){return dC(hC).default}}),bC=Ec,Object.defineProperty(Hb,"alloc",{enumerable:!0,get:function(){return bC.alloc}}),yC=bb,Object.defineProperty(Hb,"utf8",{enumerable:!0,get:function(){return dC(yC).default}}),Object.defineProperty(op,"__esModule",{value:!0});var OC=Ep,wC=e,EC=1616949271;function PC(e,t){return{major:e,minor:t}}function SC(){var e=[[PC(5,7),PC(5,0)],[PC(4,4),PC(4,2)],PC(4,1),PC(3,0)];if(4<e.length)throw(0,wC.newError)("It should not have more than 4 versions of the protocol");var o=(0,OC.alloc)(20);return o.writeInt32(EC),e.forEach(function(e){var t,r,n;e instanceof Array?(r=(n=e[0]).major,n=n.minor,t=e[1].minor,o.writeInt32(n-t<<16|n<<8|r)):(r=e.major,n=e.minor,o.writeInt32(n<<8|r))}),o.reset(),o}op.default=function(t,o){var i=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(i),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e,t){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw t.error("Handshake failed since server responded with HTTP."),(0,wC.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(e[3]+"."+e[2])}(t,o);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(SC())})};var TC,ey={},iy={},cy={},A={},py={},ky=r&&r.__extends||(TC=function(e,t){return(TC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}TC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Dy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Wy=(Object.defineProperty(py,"__esModule",{value:!0}),Dy(e),jC.ofRecord=function(e){return null===e?jC.ofNull():new xC(e)},jC.ofMessageResponse=function(e){return null===e?jC.ofNull():new RC(e)},jC.ofNull=function(){return new kC},Object.defineProperty(jC.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(jC.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(jC.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(jC.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),jC);function jC(){}py.default=Wy;ky(IC,CC=Wy),Object.defineProperty(IC.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(IC.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(IC.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(IC.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var CC,RC=IC;function IC(e){var t=CC.call(this)||this;return t._response=e,t}ky(MC,AC=Wy),Object.defineProperty(MC.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var AC,kC=MC;function MC(){return null!==AC&&AC.apply(this,arguments)||this}ky(DC,NC=Wy),Object.defineProperty(DC.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(DC.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(DC.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(DC.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var NC,xC=DC;function DC(e){var t=NC.call(this)||this;return t._record=e,t}var Gy={},Ky={},LC=(Object.defineProperty(Ky,"__esModule",{value:!0}),Ky.reuseOngoingRequest=Ky.identity=void 0,e);Ky.identity=function(e){return e},Ky.reuseOngoingRequest=function(o,i){void 0===i&&(i=null);var u=new Map;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=LC.json.stringify(e);if(u.has(r))return u.get(r);var n=o.apply(i,e);return u.set(r,n),n.finally(function(){u.delete(r)})}};var i_={},UC=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(i_,"__esModule",{value:!0}),i_.equals=void 0,i_.equals=function(e,t){var r,n;if(e===t)return!0;if(null===e||null===t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;try{for(var u=UC(o),a=u.next();!a.done;a=u.next()){var s=a.value;if(e[s]!==t[s])return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!0};var FC,BC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),WC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&BC(t,e,r);return WC(t,e),t},d_=(Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.object=Gy.functional=void 0,Gy.functional=l_(Ky),Gy.object=l_(i_),r&&r.__extends||(FC=function(e,t){return(FC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}FC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),h_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qC=(Object.defineProperty(A,"__esModule",{value:!0}),A.TelemetryObserver=A.ProcedureRouteObserver=A.RouteObserver=A.CompletedObserver=A.FailedObserver=A.ResetObserver=A.LogoffObserver=A.LoginObserver=A.ResultStreamObserver=A.StreamObserver=void 0,e),zC=h_(py),VC=Gy,HC=qC.internal.constants.FETCH_ALL,GC=qC.error.PROTOCOL_ERROR,b_=(YC.prototype.onNext=function(e){},YC.prototype.onError=function(e){},YC.prototype.onCompleted=function(e){},YC);function YC(){}A.StreamObserver=b_;d_(ZC,KC=b_),ZC.prototype.pause=function(){this._paused=!0},ZC.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},ZC.prototype.onNext=function(e){this._haveRecordStreamed=!0;var t=new qC.Record(this._fieldKeys,e,this._fieldLookup);this._observers.some(function(e){return e.onNext})?this._observers.forEach(function(e){e.onNext&&e.onNext(t)}):(this._queuedRecords.push(t),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},ZC.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},ZC.prototype.onError=function(e){this._state.onError(this,e)},ZC.prototype.cancel=function(){this._discard=!0},ZC.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(pR.STREAMING)},ZC.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(pR.SUCCEEDED)},ZC.prototype.subscribe=function(e){if(this._head&&e.onKeys&&e.onKeys(this._head),0<this._queuedRecords.length&&e.onNext)for(var t=0;t<this._queuedRecords.length;t++)e.onNext(this._queuedRecords[t]),this._queuedRecords.length-t-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===pR.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===pR.READY&&this._handleStreaming()},ZC.prototype._handleHasMore=function(e){this._setState(pR.READY),this._handleStreaming(),delete e.has_more},ZC.prototype._handlePullSuccess=function(e){var t,r=this,n=this._enrichMetadata(Object.assign(this._server?{server:this._server}:{},this._meta,{stream_summary:{have_records_streamed:this._haveRecordStreamed,pulled:this._pulled,has_keys:0<this._fieldKeys.length}},e));[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(pR.SUCCEEDED),e=null,t=function(){r._tail=n,r._observers.some(function(e){return e.onCompleted})&&r._observers.forEach(function(e){e.onCompleted&&e.onCompleted(n)}),r._afterComplete&&r._afterComplete(n)},(e=this._beforeComplete?this._beforeComplete(n):e)?Promise.resolve(e).then(t):t()):this.onError((0,qC.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),GC))},ZC.prototype._handleRunSuccess=function(e,t){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&0<e.fields.length){this._fieldKeys=e.fields;for(var n=0;n<e.fields.length;n++)this._fieldLookup[e.fields[n]]=n}null!=e.fields&&delete e.fields,null!==e.qid&&void 0!==e.qid&&(this._queryId=e.qid,delete e.qid),this._storeMetadataForCompletion(e);var o=null,i=(this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys)),function(){r._head=r._fieldKeys,r._observers.some(function(e){return e.onKeys})&&r._observers.forEach(function(e){e.onKeys&&e.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),t()});o?Promise.resolve(o).then(i):i()}},ZC.prototype._handleError=function(t){function e(){r._observers.some(function(e){return e.onError})&&r._observers.forEach(function(e){e.onError&&e.onError(t)}),r._afterError&&r._afterError(t)}var r=this,n=(this._setState(pR.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},ZC.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},ZC.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(pR.STREAMING)},ZC.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},ZC.prototype._setState=function(e){this._state=e},ZC.prototype._setupAutoPull=function(){this._autoPull=!0};var KC,w_=ZC;function ZC(e){var e=void 0===e?{}:e,t=e.reactive,t=void 0!==t&&t,r=e.moreFunction,n=e.discardFunction,o=e.fetchSize,o=void 0===o?HC:o,i=e.beforeError,u=e.afterError,a=e.beforeKeys,s=e.afterKeys,c=e.beforeComplete,l=e.afterComplete,f=e.server,p=e.highRecordWatermark,p=void 0===p?Number.MAX_VALUE:p,d=e.lowRecordWatermark,d=void 0===d?Number.MAX_VALUE:d,e=e.enrichMetadata,h=KC.call(this)||this;return h._fieldKeys=null,h._fieldLookup=null,h._head=null,h._queuedRecords=[],h._tail=null,h._error=null,h._observers=[],h._meta={},h._server=f,h._beforeError=i,h._afterError=u,h._beforeKeys=a,h._afterKeys=s,h._beforeComplete=c,h._afterComplete=l,h._enrichMetadata=e||VC.functional.identity,h._queryId=null,h._moreFunction=r,h._discardFunction=n,h._discard=!1,h._fetchSize=o,h._lowRecordWatermark=d,h._highRecordWatermark=p,h._setState(t?pR.READY:pR.READY_STREAMING),h._setupAutoPull(),h._paused=!1,h._pulled=!t,h._haveRecordStreamed=!1,h}A.ResultStreamObserver=w_;d_(XC,QC=b_),XC.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when initializing "+qC.json.stringify(e)))},XC.prototype.onError=function(e){this._onError&&this._onError(e)},XC.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var QC,kd=XC;function XC(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=QC.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LoginObserver=kd;d_($C,JC=b_),$C.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when logging off "+qC.json.stringify(e)))},$C.prototype.onError=function(e){this._onError&&this._onError(e)},$C.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var JC,S_=$C;function $C(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=JC.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LogoffObserver=S_;d_(tR,eR=b_),tR.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when resetting: received record is: "+qC.json.stringify(e),GC))},tR.prototype.onError=function(e){e.code===GC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},tR.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var eR,j_=tR;function tR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=eR.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}A.ResetObserver=j_;d_(nR,rR=w_),nR.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when sending telemetry "+qC.json.stringify(e),GC))},nR.prototype.onError=function(e){this._onError&&this._onError(e)},nR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var rR,A_=nR;function nR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=rR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.TelemetryObserver=A_;d_(iR,oR=w_);var oR,N_=iR;function iR(e){var t=e.error,e=e.onError,e=oR.call(this,{beforeError:e})||this;return e.onError(t),e}A.FailedObserver=N_;d_(aR,uR=w_);var uR,W_=aR;function aR(){var e=uR.call(this)||this;return uR.prototype.markCompleted.call(e),e}A.CompletedObserver=W_;d_(cR,sR=b_),cR.prototype.onNext=function(e){this._records.push(e)},cR.prototype.onError=function(e){e.code===GC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},cR.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,qC.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+qC.json.stringify(this._records),GC)):this._onCompleted&&this._onCompleted(zC.default.ofRecord(this._records[0]))};var sR,_y=cR;function cR(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=sR.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}A.ProcedureRouteObserver=_y;d_(fR,lR=b_),fR.prototype.onNext=function(e){this.onError((0,qC.newError)("Received RECORD when resetting: received record is: "+qC.json.stringify(e),GC))},fR.prototype.onError=function(e){e.code===GC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},fR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(zC.default.ofMessageResponse(e))};var lR,Y_=fR;function fR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=lR.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}A.RouteObserver=Y_;var pR={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(pR.STREAMING)})},onError:function(e,t){e._handleError(t)},name:function(){return"READY_STREAMING"},pull:function(){}},READY:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){return e._handleStreaming()})},onError:function(e,t){e._handleError(t)},name:function(){return"READY"},pull:function(e){return e._more()}},STREAMING:{onSuccess:function(e,t){t.has_more?e._handleHasMore(t):e._handlePullSuccess(t)},onError:function(e,t){e._handleError(t)},name:function(){return"STREAMING"},pull:function(){}},FAILED:{onError:function(e){},name:function(){return"FAILED"},pull:function(){}},SUCCEEDED:{name:function(){return"SUCCEEDED"},pull:function(){}}},dR=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.assertNotificationFilterIsEmpty=cy.assertImpersonatedUserIsEmpty=cy.assertTxConfigIsEmpty=cy.assertDatabaseIsEmpty=void 0,e);cy.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,dR.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")).message),r.onError(e),e},cy.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,dR.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")).message),r.onError(e),e},cy.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,dR.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 ".concat(e,"."))).message),r.onError(t),t},cy.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,dR.newError)("Driver is connected to a database that does not support user notification filters. Please upgrade to Neo4j 5.7.0 or later in order to use this functionality. "+"Trying to set notifications to ".concat(dR.json.stringify(e),"."))).message),r.onError(t),t};var Q_={},Ef={},Oy={},hR=(Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.verifyStructSize=Oy.Structure=void 0,e),bR=hR.error.PROTOCOL_ERROR,sv=(Object.defineProperty(yR.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),yR.prototype.toString=function(){for(var e="",t=0;t<this.fields.length;t++)0<t&&(e+=", "),e+=this.fields[t];return"Structure("+this.signature+", ["+e+"])"},yR);function yR(e,t){this.signature=e,this.fields=t}Oy.Structure=sv,Oy.verifyStructSize=function(e,t,r){if(t!==r)throw(0,hR.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),bR)},Oy.default=sv,Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.Unpacker=Ef.Packer=void 0;var _R=Ep,vR=Gy,mR=Oy,gR=e,OR=gR.error.PROTOCOL_ERROR;function wR(e){this._ch=e,this._byteArraysSupported=!0}function ER(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}wR.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=vR.functional.identity);try{o=i(o)}catch(e){return function(){throw e}}if(null===o)return function(){return u._ch.writeUInt8(192)};if(!0===o)return function(){return u._ch.writeUInt8(195)};if(!1===o)return function(){return u._ch.writeUInt8(194)};if("number"==typeof o)return function(){return u.packFloat(o)};if("string"==typeof o)return function(){return u.packString(o)};if("bigint"==typeof o)return function(){return u.packInteger((0,gR.int)(o))};if((0,gR.isInt)(o))return function(){return u.packInteger(o)};if(o instanceof Int8Array)return function(){return u.packBytes(o)};if(o instanceof Array)return function(){u.packListHeader(o.length);for(var e=0;e<o.length;e++)u.packable(void 0===o[e]?null:o[e],i)()};if(null!=(e=o)&&"function"==typeof e[Symbol.iterator])return this.packableIterable(o,i);if(o instanceof mR.Structure){for(var t=[],r=0;r<o.fields.length;r++)t[r]=this.packable(o.fields[r],i);return function(){return u.packStruct(o.signature,t)}}return"object"==typeof o?function(){for(var e=Object.keys(o),t=0,r=0;r<e.length;r++)void 0!==o[e[r]]&&t++;u.packMapHeader(t);for(r=0;r<e.length;r++){var n=e[r];void 0!==o[n]&&(u.packString(n),u.packable(o[n],i)())}}:this._nonPackableValue("Unable to pack the given value: ".concat(o))},wR.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,gR.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},wR.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},wR.prototype.packInteger=function(e){var t=e.high,r=e.low;e.greaterThanOrEqual(-16)&&e.lessThan(128)?this._ch.writeInt8(r):e.greaterThanOrEqual(-128)&&e.lessThan(-16)?(this._ch.writeUInt8(200),this._ch.writeInt8(r)):e.greaterThanOrEqual(-32768)&&e.lessThan(32768)?(this._ch.writeUInt8(201),this._ch.writeInt16(r)):(e.greaterThanOrEqual(-2147483648)&&e.lessThan(2147483648)?this._ch.writeUInt8(202):(this._ch.writeUInt8(203),this._ch.writeInt32(t)),this._ch.writeInt32(r))},wR.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},wR.prototype.packString=function(e){var e=_R.utf8.encode(e),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,gR.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)}},wR.prototype.packListHeader=function(e){if(e<16)this._ch.writeUInt8(144|e);else if(e<256)this._ch.writeUInt8(212),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,gR.newError)("Lists of size "+e+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},wR.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,gR.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(e.length);for(var t=0;t<e.length;t++)this._ch.writeInt8(e[t])},wR.prototype.packBytesHeader=function(e){if(e<256)this._ch.writeUInt8(204),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(205),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,gR.newError)("Byte arrays of size "+e+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},wR.prototype.packMapHeader=function(e){if(e<16)this._ch.writeUInt8(160|e);else if(e<256)this._ch.writeUInt8(216),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,gR.newError)("Maps of size "+e+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},wR.prototype.packStructHeader=function(e,t){if(e<16)this._ch.writeUInt8(176|e),this._ch.writeUInt8(t);else if(e<256)this._ch.writeUInt8(220),this._ch.writeUInt8(e),this._ch.writeUInt8(t);else{if(!(e<65536))throw(0,gR.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},wR.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},wR.prototype._nonPackableValue=function(e){return function(){throw(0,gR.newError)(e,OR)}},Ef.Packer=wR,ER.prototype.unpack=function(e,t){void 0===t&&(t=vR.functional.identity);var r=e.readUInt8(),n=240&r,o=15&r;if(192===r)return null;var i=this._unpackBoolean(r);if(null!==i)return i;i=this._unpackNumberOrInteger(r,e);if(null!==i){if((0,gR.isInt)(i)){if(this._useBigInt)return i.toBigInt();if(this._disableLosslessIntegers)return i.toNumberOrInfinity()}return i}i=this._unpackString(r,n,o,e);if(null!==i)return i;i=this._unpackList(r,n,o,e,t);if(null!==i)return i;i=this._unpackByteArray(r,e);if(null!==i)return i;i=this._unpackMap(r,n,o,e,t);if(null!==i)return i;i=this._unpackStruct(r,n,o,e,t);if(null!==i)return i;throw(0,gR.newError)("Unknown packed value with marker "+r.toString(16))},ER.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,gR.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},ER.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},ER.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},ER.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,gR.int)(e):240<=e&&e<256?(0,gR.int)(e-256):200===e?(0,gR.int)(t.readInt8()):201===e?(0,gR.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,gR.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new gR.Integer(e,r)):null},ER.prototype._unpackString=function(e,t,r,n){return 128===t?_R.utf8.decode(n,r):208===e?_R.utf8.decode(n,n.readUInt8()):209===e?_R.utf8.decode(n,n.readUInt16()):210===e?_R.utf8.decode(n,n.readUInt32()):null},ER.prototype._unpackList=function(e,t,r,n,o){return 144===t?this._unpackListWithSize(r,n,o):212===e?this._unpackListWithSize(n.readUInt8(),n,o):213===e?this._unpackListWithSize(n.readUInt16(),n,o):214===e?this._unpackListWithSize(n.readUInt32(),n,o):null},ER.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},ER.prototype._unpackByteArray=function(e,t){return 204===e?this._unpackByteArrayWithSize(t.readUInt8(),t):205===e?this._unpackByteArrayWithSize(t.readUInt16(),t):206===e?this._unpackByteArrayWithSize(t.readUInt32(),t):null},ER.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},ER.prototype._unpackMap=function(e,t,r,n,o){return 160===t?this._unpackMapWithSize(r,n,o):216===e?this._unpackMapWithSize(n.readUInt8(),n,o):217===e?this._unpackMapWithSize(n.readUInt16(),n,o):218===e?this._unpackMapWithSize(n.readUInt32(),n,o):null},ER.prototype._unpackMapWithSize=function(e,t,r){for(var n={},o=0;o<e;o++)n[this.unpack(t,r)]=this.unpack(t,r);return n},ER.prototype._unpackStruct=function(e,t,r,n,o){return 176===t?this._unpackStructWithSize(r,n,o):220===e?this._unpackStructWithSize(n.readUInt8(),n,o):221===e?this._unpackStructWithSize(n.readUInt16(),n,o):null},ER.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new mR.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},Ef.Unpacker=ER;var PR,SR,pv={},wv=r&&r.__extends||(PR=function(e,t){return(PR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}PR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),TR=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),jR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),up=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&TR(t,e,r);return jR(t,e),t},bv=(Object.defineProperty(pv,"__esModule",{value:!0}),pv.Unpacker=pv.Packer=void 0,up(Ef)),ap=(SR=bv.Packer,wv(CR,SR),CR.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},CR);function CR(){return null!==SR&&SR.apply(this,arguments)||this}pv.Packer=ap;RR=bv.Unpacker,wv(IR,RR);var RR,yv=IR;function IR(e,t){return RR.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}pv.Unpacker=yv;var AR=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),kR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mv=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&AR(t,e,r);return kR(t,e),t},sp=(Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.structure=Q_.v2=Q_.v1=void 0,mv(Ef)),Mv=(Q_.v1=sp,mv(pv)),Dv=(Q_.v2=Mv,mv(Oy)),w=(Q_.structure=Dv,Q_.default=Mv,{}),MR=(Object.defineProperty(w,"__esModule",{value:!0}),w.SIGNATURES=void 0,e),Bv=MR.internal.constants,NR=Bv.ACCESS_MODE_READ,xR=Bv.FETCH_ALL,DR=MR.internal.util.assertString,Gv=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),pn=(w.SIGNATURES=Gv,N.init=function(e,t){return new N(1,[e,t],function(){return"INIT ".concat(e," {...}")})},N.run=function(e,t){return new N(16,[e,t],function(){return"RUN ".concat(e," ").concat(MR.json.stringify(t))})},N.pullAll=function(){return WR},N.reset=function(){return qR},N.hello=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);t=Object.assign({user_agent:e},t);return r&&(t.routing=r),n&&(t.patch_bolt=n),new N(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},N.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new N(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},N.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return FR(n,t=void 0===t?null:t),r&&(n.routing=r),new N(1,[n],function(){return"HELLO ".concat(MR.json.stringify(n))})},N.hello5x3=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),FR(o,r),n&&(o.routing=n),new N(1,[o],function(){return"HELLO ".concat(MR.json.stringify(o))})},N.hello5x5=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),BR(o,r),n&&(o.routing=n),new N(1,[o],function(){return"HELLO ".concat(MR.json.stringify(o))})},N.logon=function(e){return new N(106,[e],function(){return"LOGON { ... }"})},N.logoff=function(){return new N(107,[],function(){return"LOGOFF"})},N.begin=function(e){var e=void 0===e?{}:e,t=LR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new N(17,[t],function(){return"BEGIN ".concat(MR.json.stringify(t))})},N.begin5x5=function(e){var e=void 0===e?{}:e,t=LR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter,{appendNotificationFilter:BR});return new N(17,[t],function(){return"BEGIN ".concat(MR.json.stringify(t))})},N.commit=function(){return zR},N.rollback=function(){return VR},N.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=LR(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new N(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(MR.json.stringify(t)," ").concat(MR.json.stringify(n))})},N.runWithMetadata5x5=function(e,t,r){var r=void 0===r?{}:r,n=LR(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter,{appendNotificationFilter:BR});return new N(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(MR.json.stringify(t)," ").concat(MR.json.stringify(n))})},N.goodbye=function(){return HR},N.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=UR(null==t?-1:t,(void 0===e?xR:e)||xR);return new N(63,[r],function(){return"PULL ".concat(MR.json.stringify(r))})},N.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=UR(null==t?-1:t,(void 0===e?xR:e)||xR);return new N(47,[r],function(){return"DISCARD ".concat(MR.json.stringify(r))})},N.telemetry=function(e){var e=e.api,t=(0,MR.int)(e);return new N(84,[t],function(){return"TELEMETRY ".concat(t.toString())})},N.route=function(e,t,r){return new N(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(MR.json.stringify(e)," ").concat(MR.json.stringify(t)," ").concat(r)})},N.routeV4x4=function(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]);var n={};return(r=void 0===r?{}:r).databaseName&&(n.db=r.databaseName),r.impersonatedUser&&(n.imp_user=r.impersonatedUser),new N(102,[e,t,n],function(){return"ROUTE ".concat(MR.json.stringify(e)," ").concat(MR.json.stringify(t)," ").concat(MR.json.stringify(n))})},N);function N(e,t,r){this.signature=e,this.fields=t,this.toString=r}function LR(e,t,r,n,o,i,u){void 0===u&&(u={});var a={};return e.isEmpty()||(a.bookmarks=e.values()),null!==t.timeout&&(a.tx_timeout=t.timeout),t.metadata&&(a.tx_metadata=t.metadata),r&&(a.db=DR(r,"database")),o&&(a.imp_user=DR(o,"impersonatedUser")),n===NR&&(a.mode="r"),(null!=(e=u.appendNotificationFilter)?e:FR)(a,i),a}function UR(e,t){t={n:(0,MR.int)(t)};return-1!==e&&(t.qid=(0,MR.int)(e)),t}function FR(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_categories=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_categories=t.disabledClassifications))}function BR(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_classifications=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_classifications=t.disabledClassifications))}var WR=new(w.default=pn)(63,[],function(){return"PULL_ALL"}),qR=new pn(15,[],function(){return"RESET"}),zR=new pn(18,[],function(){return"COMMIT"}),VR=new pn(19,[],function(){return"ROLLBACK"}),HR=new pn(2,[],function(){return"GOODBYE"}),Zv={},Xv={},GR=(Object.defineProperty(Xv,"__esModule",{value:!0}),Xv.TypeTransformer=void 0,Q_),YR=e.internal.objectUtil;function KR(e){this._transformers=e,this._transformersPerSignature=new Map(e.map(function(e){return[e.signature,e]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}function ZR(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;this.signature=t,this.isTypeInstance=e,this.fromStructure=r,this.toStructure=n,Object.freeze(this)}KR.prototype.fromStructure=function(e){try{return e instanceof GR.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return YR.createBrokenObject(e)}},KR.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},Xv.default=KR,ZR.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new ZR({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},Xv.TypeTransformer=ZR;var QR=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},XR=(Object.defineProperty(Zv,"__esModule",{value:!0}),e),JR=Q_,$R=Xv,eI=XR.error.PROTOCOL_ERROR;Zv.default={createNodeTransformer:function(){return new $R.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof XR.Node},toStructure:function(e){throw(0,XR.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),eI)},fromStructure:function(e){JR.structure.verifyStructSize("Node",3,e.size);var e=QR(e.fields,3),t=e[0],r=e[1],e=e[2];return new XR.Node(t,r,e)}})},createRelationshipTransformer:function(){return new $R.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof XR.Relationship},toStructure:function(e){throw(0,XR.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),eI)},fromStructure:function(e){JR.structure.verifyStructSize("Relationship",5,e.size);var e=QR(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new XR.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new $R.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof XR.UnboundRelationship},toStructure:function(e){throw(0,XR.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),eI)},fromStructure:function(e){JR.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=QR(e.fields,3),t=e[0],r=e[1],e=e[2];return new XR.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new $R.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof XR.Path},toStructure:function(e){throw(0,XR.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),eI)},fromStructure:function(e){JR.structure.verifyStructSize("Path",3,e.size);for(var e=QR(e.fields,3),t=e[0],r=e[1],n=e[2],o=[],i=t[0],u=0;u<n.length;u+=2){var a=t[n[u+1]],s=(0,XR.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof XR.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof XR.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new XR.PathSegment(i,c,a)),i=a}return new XR.Path(t[0],t[t.length-1],o)}})}};var tI=r&&r.__assign||function(){return(tI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},rI=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),nI=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),tm=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&rI(t,e,r);return nI(t,e),t},om=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},oI=(Object.defineProperty(iy,"__esModule",{value:!0}),cy),iI=Q_,uI=tm(w),aI=A,sI=e,cI=om(Zv),lI=om(Xv),fI=sI.internal.bookmarks.Bookmarks,am=sI.internal.constants,pI=am.ACCESS_MODE_WRITE,dI=am.BOLT_PROTOCOL_V1,hI=(sI.internal.logger.Logger,sI.internal.txConfig.TxConfig),bI=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),it=(Object.defineProperty(yI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new lI.default(Object.values(cI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(yI.prototype,"version",{get:function(){return dI},enumerable:!1,configurable:!0}),Object.defineProperty(yI.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(yI.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(yI.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),yI.prototype.packer=function(){return this._packer},yI.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},yI.prototype.unpacker=function(){return this._unpacker},yI.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},yI.prototype.transformMetadata=function(e){return e},yI.prototype.enrichErrorMetadata=function(e){return tI(tI({},e),{diagnostic_record:null!==e.diagnostic_record?tI(tI({},bI),e.diagnostic_record):null})},yI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new aI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,oI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(uI.default.init(r,n),e,!0),e},yI.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=(e.flush,new aI.LogoffObserver({onCompleted:t,onError:r})),t=(0,sI.newError)("Driver is connected to a database that does not support logoff. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(t.message),e.onError(t),t},yI.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=(e.flush,new aI.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,sI.newError)("Driver is connected to a database that does not support logon. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(i.message),e.onError(i),i},yI.prototype.prepareToClose=function(){},yI.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete;return this.run("BEGIN",t?t.asBeginTransactionParameters():{},{bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e,flush:!1})},yI.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("COMMIT",{},{bookmarks:fI.empty(),txConfig:hI.empty(),mode:pI,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},yI.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("ROLLBACK",{},{bookmarks:fI.empty(),txConfig:hI.empty(),mode:pI,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},yI.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=(r.bookmarks,r.txConfig),o=r.database,i=(r.mode,r.impersonatedUser),u=r.notificationFilter,a=r.beforeKeys,s=r.afterKeys,c=r.beforeError,l=r.afterError,f=r.beforeComplete,p=r.afterComplete,d=r.flush,d=void 0===d||d,h=r.highRecordWatermark,h=void 0===h?Number.MAX_VALUE:h,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,a=new aI.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,oI.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,oI.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,oI.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,oI.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(uI.default.run(e,t),a,!1),this.write(uI.default.pullAll(),a,d),a},Object.defineProperty(yI.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),yI.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,e=e.onComplete,t=new aI.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(uI.default.reset(),t,!0),t},yI.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new aI.CompletedObserver;return t&&t(),e},yI.prototype._createPacker=function(e){return new iI.v1.Packer(e)},yI.prototype._createUnpacker=function(e,t){return new iI.v1.Unpacker(e,t)},yI.prototype.write=function(e,t,r){this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature,t=new iI.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},yI.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===uI.SIGNATURES.HELLO||this._lastMessageSignature===uI.SIGNATURES.LOGON},yI.prototype.isLastMessageReset=function(){return this._lastMessageSignature===uI.SIGNATURES.RESET},yI.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},yI.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},yI.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},yI.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},yI.prototype.isBroken=function(){return!!this._fatalError},yI.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},yI.prototype.resetFailure=function(){this._responseHandler._resetFailure()},yI.prototype._onLoginCompleted=function(e,t,r){this._initialized=!0,this._authToken=t,e&&(t=e.server,this._server.version||(this._server.version=t)),r&&r(e)},yI.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},yI);function yI(e,t,r,n,o,i){var r=void 0===r?{}:r,u=r.disableLosslessIntegers,r=r.useBigInt;void 0===n&&(n=function(){return null}),this._server=e||{},this._chunker=t,this._packer=this._createPacker(t),this._unpacker=this._createUnpacker(u,r),this._responseHandler=n(this),this._log=o,this._onProtocolError=i,this._fatalError=null,this._lastMessageSignature=null,this._config={disableLosslessIntegers:u,useBigInt:r}}iy.default=it;var fm={},eb={},_m={},_I=(Object.defineProperty(_m,"__esModule",{value:!0}),_m.epochSecondAndNanoToLocalDateTime=_m.nanoOfDayToLocalTime=_m.epochDayToDate=void 0,e),Em=_I.internal.temporalUtil,vI=Em.DAYS_0000_TO_1970,mI=Em.DAYS_PER_400_YEAR_CYCLE,gI=Em.NANOS_PER_HOUR,OI=Em.NANOS_PER_MINUTE,wI=Em.NANOS_PER_SECOND,EI=Em.SECONDS_PER_DAY,PI=Em.floorDiv,SI=Em.floorMod;function TI(e){var e=(e=(0,_I.int)(e)).add(vI).subtract(60),t=(0,_I.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(mI).subtract(1)).multiply(400),e=e.add(r.multiply(-mI))),e.multiply(400).add(591).div(mI)),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400))),e=(n.lessThan(0)&&(r=r.subtract(1),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400)))),r=r.add(t),n),t=e.multiply(5).add(2).div(153),n=t.add(2).modulo(12).add(1),e=e.subtract(t.multiply(306).add(5).div(10)).add(1),r=r.add(t.div(10));return new _I.Date(r,n,e)}function jI(e){var t=(e=(0,_I.int)(e)).div(gI),r=(e=e.subtract(t.multiply(gI))).div(OI),n=(e=e.subtract(r.multiply(OI))).div(wI),e=e.subtract(n.multiply(wI));return new _I.LocalTime(t,r,n,e)}_m.epochDayToDate=TI,_m.nanoOfDayToLocalTime=jI,_m.epochSecondAndNanoToLocalDateTime=function(e,t){var r=PI(e,EI),e=SI(e,EI).multiply(wI).add(t),t=TI(r),r=jI(e);return new _I.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var CI=r&&r.__assign||function(){return(CI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},RI=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Cm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},II=(Object.defineProperty(eb,"__esModule",{value:!0}),e),AI=Q_,kI=Xv,MI=_m,Nm=Cm(Zv),C=II.internal.temporalUtil,NI=C.dateToEpochDay,xI=C.localDateTimeToEpochSecond,DI=C.localTimeToNanoOfDay;function LI(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,II.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}eb.default=CI(CI({},Nm.default),{createPoint2DTransformer:function(){return new kI.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,II.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new AI.structure.Structure(88,[(0,II.int)(e.srid),e.x,e.y])},fromStructure:function(e){AI.structure.verifyStructSize("Point2D",3,e.size);var e=RI(e.fields,3),t=e[0],r=e[1],e=e[2];return new II.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new kI.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,II.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new AI.structure.Structure(89,[(0,II.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){AI.structure.verifyStructSize("Point3D",4,e.size);var e=RI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new II.Point(t,r,n,e)}})},createDurationTransformer:function(){return new kI.TypeTransformer({signature:69,isTypeInstance:II.isDuration,toStructure:function(e){var t=(0,II.int)(e.months),r=(0,II.int)(e.days),n=(0,II.int)(e.seconds),e=(0,II.int)(e.nanoseconds);return new AI.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){AI.structure.verifyStructSize("Duration",4,e.size);var e=RI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new II.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new kI.TypeTransformer({signature:116,isTypeInstance:II.isLocalTime,toStructure:function(e){e=DI(e.hour,e.minute,e.second,e.nanosecond);return new AI.structure.Structure(116,[e])},fromStructure:function(e){AI.structure.verifyStructSize("LocalTime",1,e.size);e=RI(e.fields,1)[0];return LI((0,MI.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new kI.TypeTransformer({signature:84,isTypeInstance:II.isTime,toStructure:function(e){var t=DI(e.hour,e.minute,e.second,e.nanosecond),e=(0,II.int)(e.timeZoneOffsetSeconds);return new AI.structure.Structure(84,[t,e])},fromStructure:function(e){AI.structure.verifyStructSize("Time",2,e.size);var e=RI(e.fields,2),t=e[0],e=e[1],t=(0,MI.nanoOfDayToLocalTime)(t);return LI(new II.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new kI.TypeTransformer({signature:68,isTypeInstance:II.isDate,toStructure:function(e){e=NI(e.year,e.month,e.day);return new AI.structure.Structure(68,[e])},fromStructure:function(e){AI.structure.verifyStructSize("Date",1,e.size);e=RI(e.fields,1)[0];return LI((0,MI.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new kI.TypeTransformer({signature:100,isTypeInstance:II.isLocalDateTime,toStructure:function(e){var t=xI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,II.int)(e.nanosecond);return new AI.structure.Structure(100,[t,e])},fromStructure:function(e){AI.structure.verifyStructSize("LocalDateTime",2,e.size);var e=RI(e.fields,2),t=e[0],e=e[1];return LI((0,MI.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new kI.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,II.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=xI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,II.int)(e.nanosecond),e=e.timeZoneId;return new AI.structure.Structure(102,[t,r,e])},fromStructure:function(e){AI.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=RI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,MI.epochSecondAndNanoToLocalDateTime)(t,r);return LI(new II.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,null,e),n,o)}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new kI.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,II.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=xI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,II.int)(e.nanosecond),e=(0,II.int)(e.timeZoneOffsetSeconds);return new AI.structure.Structure(70,[t,r,e])},fromStructure:function(e){AI.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=RI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,MI.epochSecondAndNanoToLocalDateTime)(t,r);return LI(new II.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var UI,FI,Fm=r&&r.__extends||(UI=function(e,t){return(UI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}UI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Vm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Km=(Object.defineProperty(fm,"__esModule",{value:!0}),Vm(iy)),BI=Vm(Q_),tb=e,WI=Vm(eb),qI=Vm(Xv),zI=tb.internal.constants.BOLT_PROTOCOL_V2,t0=(FI=Km.default,Fm(VI,FI),VI.prototype._createPacker=function(e){return new BI.default.Packer(e)},VI.prototype._createUnpacker=function(e,t){return new BI.default.Unpacker(e,t)},Object.defineProperty(VI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new qI.default(Object.values(WI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(VI.prototype,"version",{get:function(){return zI},enumerable:!1,configurable:!0}),VI);function VI(){return null!==FI&&FI.apply(this,arguments)||this}fm.default=t0;var HI,GI,c0={},p0={},YI=r&&r.__assign||function(){return(YI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},v0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},g0=(Object.defineProperty(p0,"__esModule",{value:!0}),v0(eb)),P0=(p0.default=YI({},g0.default),r&&r.__extends||(HI=function(e,t){return(HI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}HI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),KI=r&&r.__assign||function(){return(KI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},R0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},k0=(Object.defineProperty(c0,"__esModule",{value:!0}),R0(fm)),ZI=R0(w),QI=cy,XI=A,JI=R0(p0),$I=R0(Xv),eA=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),tA=e.internal.txConfig.TxConfig,rA="context",nA="CALL dbms.cluster.routing.getRoutingTable($".concat(rA,")"),oA=new XI.StreamObserver,yl=(GI=k0.default,P0(iA,GI),Object.defineProperty(iA.prototype,"version",{get:function(){return eA},enumerable:!1,configurable:!0}),Object.defineProperty(iA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new $I.default(Object.values(JI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),iA.prototype.transformMetadata=function(e){return"t_first"in e&&(e.result_available_after=e.t_first,delete e.t_first),"t_last"in e&&(e.result_consumed_after=e.t_last,delete e.t_last),e},iA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new XI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,QI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(ZI.default.hello(r,n),e,!0),e},iA.prototype.prepareToClose=function(){this.write(ZI.default.goodbye(),oA,!0)},iA.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new XI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,QI.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,QI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,QI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(ZI.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},iA.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new XI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(ZI.default.commit(),t,!0),t},iA.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new XI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(ZI.default.rollback(),t,!0),t},iA.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.highRecordWatermark,y=void 0===y?Number.MAX_VALUE:y,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new XI.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,QI.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,QI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,QI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(ZI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(ZI.default.pullAll(),c,b),c},iA.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,r=this.run(nA,((t={})[rA]=void 0===r?{}:r,t),KI(KI({},n),{txConfig:tA.empty()}));return new XI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},iA);function iA(){return null!==GI&&GI.apply(this,arguments)||this}c0.default=yl;var uA,aA,D0={},L0={},sA=r&&r.__assign||function(){return(sA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},z0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},G0=(Object.defineProperty(L0,"__esModule",{value:!0}),z0(p0)),dy=(L0.default=sA({},G0.default),r&&r.__extends||(uA=function(e,t){return(uA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}uA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),cA=r&&r.__assign||function(){return(cA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},X_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Z0=(Object.defineProperty(D0,"__esModule",{value:!0}),X_(c0)),lA=X_(w),fA=cy,pA=A,dA=X_(L0),hA=X_(Xv),eg=(e.internal.bookmarks.Bookmarks,e.internal.constants),bA=eg.BOLT_PROTOCOL_V4_0,yA=eg.FETCH_ALL,_A=e.internal.txConfig.TxConfig,vA="context",mA="database",gA="CALL dbms.routing.getRoutingTable($".concat(vA,", $").concat(mA,")"),ng=(aA=Z0.default,dy(OA,aA),Object.defineProperty(OA.prototype,"version",{get:function(){return bA},enumerable:!1,configurable:!0}),Object.defineProperty(OA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new hA.default(Object.values(dA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),OA.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new pA.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,fA.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,fA.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(lA.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},OA.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?yA:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new pA.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,fA.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,fA.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(lA.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(lA.default.pull({n:_}),c,b),c},OA.prototype._requestMore=function(e,t,r){this.write(lA.default.pull({stmtId:e,n:t}),r,!0)},OA.prototype._requestDiscard=function(e,t){this.write(lA.default.discard({stmtId:e}),t,!0)},OA.prototype._noOp=function(){},OA.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.databaseName,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,r=this.run(gA,((t={})[vA]=void 0===r?{}:r,t[mA]=n,t),cA(cA({},o),{txConfig:_A.empty()}));return new pA.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},OA);function OA(){return null!==aA&&aA.apply(this,arguments)||this}D0.default=ng;var wA,EA,E={},fg={},PA=r&&r.__assign||function(){return(PA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Zy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bg=(Object.defineProperty(fg,"__esModule",{value:!0}),Zy(L0)),Bc=(fg.default=PA({},bg.default),r&&r.__extends||(wA=function(e,t){return(wA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}wA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),gg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sl=(Object.defineProperty(E,"__esModule",{value:!0}),gg(D0)),SA=gg(w),TA=A,$h=e,jA=cy,CA=gg(fg),RA=gg(Xv),IA=$h.internal.constants.BOLT_PROTOCOL_V4_1,u=(EA=Sl.default,Bc(AA,EA),Object.defineProperty(AA.prototype,"version",{get:function(){return IA},enumerable:!1,configurable:!0}),Object.defineProperty(AA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new RA.default(Object.values(CA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),AA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new TA.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,jA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(SA.default.hello(r,n,this._serversideRouting),e,!0),e},AA);function AA(e,t,r,n,o,i,u){e=EA.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}E.default=u;var kA,MA,Ag={},Dg={},NA=r&&r.__assign||function(){return(NA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},pl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},v=(Object.defineProperty(Dg,"__esModule",{value:!0}),pl(fg)),nO=(Dg.default=NA({},v.default),r&&r.__extends||(kA=function(e,t){return(kA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}kA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},j=(Object.defineProperty(Ag,"__esModule",{value:!0}),i(E)),R=e,xA=i(Dg),DA=i(Xv),LA=R.internal.constants.BOLT_PROTOCOL_V4_2,n=(MA=j.default,nO(UA,MA),Object.defineProperty(UA.prototype,"version",{get:function(){return LA},enumerable:!1,configurable:!0}),Object.defineProperty(UA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new DA.default(Object.values(xA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),UA);function UA(){return null!==MA&&MA.apply(this,arguments)||this}Ag.default=n;var s={},b={},FA=r&&r.__assign||function(){return(FA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(b,"__esModule",{value:!0}),Y(Dg)),Fs=(b.default=FA({},o.default),{}),S={},BA=r&&r.__assign||function(){return(BA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$s=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zs=(Object.defineProperty(S,"__esModule",{value:!0}),$s(b)),WA=(S.default=BA({},Zs.default),r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}),m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qA=(Object.defineProperty(Fs,"__esModule",{value:!0}),Q_),zA=e,VA=m(S),HA=_m,GA=Ky,YA=zA.internal.temporalUtil.localDateTimeToEpochSecond;var KA=new Map;function ZA(e,t,r){e=e,KA.has(e)||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),KA.set(e,n));var n=KA.get(e),e=(0,zA.int)(t).multiply(1e3).add((0,zA.int)(r).div(1e6)).toNumber(),r=n.formatToParts(e).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:GA.identity:"hour"===t.type?e.hour=(0,zA.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,zA.int)(t.value)),e},{}),e=(r.year=r.adjustEra(r.year),YA(r.year,r.month,r.day,r.hour,r.minute,r.second,r.nanosecond));return r.timeZoneOffsetSeconds=e.subtract(t),r.hour=r.hour.modulo(24),r}function QA(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,zA.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}Fs.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return VA.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){qA.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=WA(e.fields,3),t=e[0],r=e[1],e=e[2],t=ZA(e,t,r);return QA(new zA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,zA.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=YA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=null!=e.timeZoneOffsetSeconds?e.timeZoneOffsetSeconds:(r=e.timeZoneId,i=t,o=e.nanosecond,n=ZA(r,i,o),n=YA(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=ZA(r,i,o),YA(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i)),n=(null==e.timeZoneOffsetSeconds&&u.warn('DateTime objects without "timeZoneOffsetSeconds" property are prune to bugs related to ambiguous times. For instance, 2022-10-30T2:30:00[Europe/Berlin] could be GMT+1 or GMT+2.'),t.subtract(r)),o=(0,zA.int)(e.nanosecond),i=e.timeZoneId;return new qA.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return VA.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=YA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,zA.int)(e.nanosecond),e=(0,zA.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new qA.structure.Structure(73,[t,r,e])},fromStructure:function(e){qA.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=WA(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,zA.int)(t).add(e),t=(0,HA.epochSecondAndNanoToLocalDateTime)(t,r);return QA(new zA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var XA,JA,hs=r&&r.__extends||(XA=function(e,t){return(XA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}XA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),$A=r&&r.__assign||function(){return($A=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Os=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zr=(Object.defineProperty(s,"__esModule",{value:!0}),Os(Ag)),ek=Os(w),tk=A,rk=cy,nk=Os(b),ok=Os(Fs),ik=Os(Xv),uk=e.internal.bookmarks.Bookmarks,ak=e.internal.constants.BOLT_PROTOCOL_V4_3,c=(JA=Zr.default,hs(sk,JA),Object.defineProperty(sk.prototype,"version",{get:function(){return ak},enumerable:!1,configurable:!0}),Object.defineProperty(sk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new ik.default(Object.values(nk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),sk.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,o=new tk.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||uk.empty();return this.write(ek.default.route(t,e.values(),r),o,!0),o},sk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new tk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return void 0!==e.patch_bolt&&t._applyPatches(e.patch_bolt),t._onLoginCompleted(e,n,u)}});return(0,rk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(ek.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},sk.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},sk.prototype._applyUtcPatch=function(){var t=this;this._transformer=new ik.default(Object.values($A($A({},nk.default),ok.default)).map(function(e){return e(t._config,t._log)}))},sk);function sk(){return null!==JA&&JA.apply(this,arguments)||this}s.default=c;var ck,lk,Nc={},Nl=r&&r.__extends||(ck=function(e,t){return(ck=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ck(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),fk=r&&r.__assign||function(){return(fk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},f=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jc=(Object.defineProperty(Nc,"__esModule",{value:!0}),f(s)),Ol=e,pk=f(w),dk=A,hk=cy,bk=f(S),yk=f(Fs),_k=f(Xv),Rc=Ol.internal.constants,vk=Rc.BOLT_PROTOCOL_V4_4,mk=Rc.FETCH_ALL,gk=Ol.internal.bookmarks.Bookmarks,xc=(lk=jc.default,Nl(Ok,lk),Object.defineProperty(Ok.prototype,"version",{get:function(){return vk},enumerable:!1,configurable:!0}),Object.defineProperty(Ok.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new _k.default(Object.values(bk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Ok.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.impersonatedUser,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,i=new dk.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||gk.empty();return this.write(pk.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},Ok.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?mk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new dk.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,hk.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(pk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(pk.default.pull({n:_}),c,b),c},Ok.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new dk.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,hk.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(pk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},Ok.prototype._applyUtcPatch=function(){var t=this;this._transformer=new _k.default(Object.values(fk(fk({},bk.default),yk.default)).map(function(e){return e(t._config,t._log)}))},Ok);function Ok(){return null!==lk&&lk.apply(this,arguments)||this}Nc.default=xc;var xr={},kc={},wk=r&&r.__assign||function(){return(wk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ek=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ff=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Pk=(Object.defineProperty(kc,"__esModule",{value:!0}),Q_),Sk=e,Tk=Ff(S),Gf=Ff(Fs);kc.default=wk(wk(wk({},Tk.default),Gf.default),{createNodeTransformer:function(e){return Tk.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){Pk.structure.verifyStructSize("Node",4,e.size);var e=Ek(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new Sk.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return Tk.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){Pk.structure.verifyStructSize("Relationship",8,e.size);var e=Ek(e.fields,8),t=e[0],r=e[1],n=e[2],o=e[3],i=e[4],u=e[5],a=e[6],e=e[7];return new Sk.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return Tk.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){Pk.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=Ek(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new Sk.UnboundRelationship(t,r,n,e)}})}});var jk,Ck,Tc=r&&r.__extends||(jk=function(e,t){return(jk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}jk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),jl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},h=(Object.defineProperty(xr,"__esModule",{value:!0}),jl(Nc)),Rk=cy,Ik=jl(kc),Ak=jl(Xv),kk=jl(w),Mk=A,Nk=e.internal.constants.BOLT_PROTOCOL_V5_0,gd=(Ck=h.default,Tc(xk,Ck),Object.defineProperty(xk.prototype,"version",{get:function(){return Nk},enumerable:!1,configurable:!0}),Object.defineProperty(xk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Ak.default(Object.values(Ik.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),xk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new Mk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,Rk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(kk.default.hello(r,n,this._serversideRouting),e,!0),e},xk);function xk(){return null!==Ck&&Ck.apply(this,arguments)||this}xr.default=gd;var Dk,Lk,Cd={},Id={},Uk=r&&r.__assign||function(){return(Uk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Vd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sc=(Object.defineProperty(Id,"__esModule",{value:!0}),Vd(kc)),Ud=(Id.default=Uk({},Sc.default),r&&r.__extends||(Dk=function(e,t){return(Dk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Dk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Fk=r&&r.__assign||function(){return(Fk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ud=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yd=(Object.defineProperty(Cd,"__esModule",{value:!0}),ud(xr)),Bk=cy,Wk=ud(Id),qk=ud(Xv),zk=ud(w),Vk=A,Hk=e.internal.constants.BOLT_PROTOCOL_V5_1,Pc=(Lk=Yd.default,Ud(Gk,Lk),Object.defineProperty(Gk.prototype,"version",{get:function(){return Hk},enumerable:!1,configurable:!0}),Object.defineProperty(Gk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new qk.default(Object.values(Wk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(Gk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),Gk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new Vk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,Bk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(zk.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Fk(Fk({},e),a.metadata))},onError:i,flush:!0})},Gk.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=e.flush,i=new Vk.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(zk.default.logon(r),i,e),i},Gk.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new Vk.LogoffObserver({onCompleted:t,onError:r});return this.write(zk.default.logoff(),t,e),t},Gk);function Gk(){return null!==Lk&&Lk.apply(this,arguments)||this}Cd.default=Pc;var Yk,Kk,O={},md={},Zk=r&&r.__assign||function(){return(Zk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ap=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xd=(Object.defineProperty(md,"__esModule",{value:!0}),Ap(Id)),uh=(md.default=Zk({},Xd.default),r&&r.__extends||(Yk=function(e,t){return(Yk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Yk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Qk=r&&r.__assign||function(){return(Qk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nt=(Object.defineProperty(O,"__esModule",{value:!0}),T(Cd)),Xk=T(md),Jk=T(Xv),$k=T(w),eM=A,I=e.internal.constants,tM=I.BOLT_PROTOCOL_V5_2,rM=I.FETCH_ALL,Ad=(Kk=Nt.default,uh(nM,Kk),Object.defineProperty(nM.prototype,"version",{get:function(){return tM},enumerable:!1,configurable:!0}),Object.defineProperty(nM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Jk.default(Object.values(Xk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(nM.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),nM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new eM.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write($k.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Qk(Qk({},e),a.metadata))},onError:i,flush:!0})},nM.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new eM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write($k.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},nM.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?rM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new eM.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=y;return this.write($k.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write($k.default.pull({n:_}),c,b),c},nM);function nM(){return null!==Kk&&Kk.apply(this,arguments)||this}O.default=Ad;var oM,iM,fh={},bh={},uM=r&&r.__assign||function(){return(uM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},vc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sh=(Object.defineProperty(bh,"__esModule",{value:!0}),vc(md)),ah=(bh.default=uM({},Sh.default),r&&r.__extends||(oM=function(e,t){return(oM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}oM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),aM=r&&r.__assign||function(){return(aM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Nh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gh=(Object.defineProperty(fh,"__esModule",{value:!0}),Nh(O)),sM=Nh(bh),cM=Nh(Xv),lM=Nh(w),fM=A,pM=e.internal.constants.BOLT_PROTOCOL_V5_3,qh=(iM=gh.default,ah(dM,iM),Object.defineProperty(dM.prototype,"version",{get:function(){return pM},enumerable:!1,configurable:!0}),Object.defineProperty(dM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new cM.default(Object.values(sM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),dM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new fM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(lM.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(aM(aM({},e),s.metadata))},onError:u,flush:!0})},dM);function dM(){return null!==iM&&iM.apply(this,arguments)||this}fh.default=qh;var hM,bM,Xh={},yb={},yM=r&&r.__assign||function(){return(yM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Jh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},wf=(Object.defineProperty(yb,"__esModule",{value:!0}),Jh(bh)),Ab=(yb.default=yM({},wf.default),r&&r.__extends||(hM=function(e,t){return(hM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}hM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),ip=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nb=(Object.defineProperty(Xh,"__esModule",{value:!0}),ip(fh)),_M=ip(yb),vM=ip(w),mM=A,gM=ip(Xv),OM=e.internal.constants.BOLT_PROTOCOL_V5_4,Wf=(bM=Nb.default,Ab(wM,bM),Object.defineProperty(wM.prototype,"version",{get:function(){return OM},enumerable:!1,configurable:!0}),Object.defineProperty(wM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new gM.default(Object.values(_M.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),wM.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=t.onCompleted,t=new mM.TelemetryObserver({onCompleted:t,onError:r});return this.write(vM.default.telemetry({api:e}),t,!1),t},wM);function wM(){return null!==bM&&bM.apply(this,arguments)||this}Xh.default=Wf;var EM,PM,xb={},Pp={},SM=r&&r.__assign||function(){return(SM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Gb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Od=(Object.defineProperty(Pp,"__esModule",{value:!0}),Gb(yb)),Yh=(Pp.default=SM({},Od.default),r&&r.__extends||(EM=function(e,t){return(EM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}EM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),TM=r&&r.__assign||function(){return(TM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ec=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bb=(Object.defineProperty(xb,"__esModule",{value:!0}),Ec(Xh)),jM=Ec(Pp),CM=Ec(Xv),RM=Ec(w),IM=A,Hb=e.internal.constants,AM=Hb.BOLT_PROTOCOL_V5_5,kM=Hb.FETCH_ALL,MM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),Dy=(PM=bb.default,Yh(NM,PM),Object.defineProperty(NM.prototype,"version",{get:function(){return AM},enumerable:!1,configurable:!0}),Object.defineProperty(NM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new CM.default(Object.values(jM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),NM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new IM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(RM.default.hello5x5(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(TM(TM({},e),s.metadata))},onError:u,flush:!0})},NM.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new IM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(RM.default.begin5x5({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},NM.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?kM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new IM.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r,enrichMetadata:this._enrichMetadata}),l=y;return this.write(RM.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(RM.default.pull({n:_}),c,b),c},NM.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return TM(TM({},e),{description:null!=e.neo4j_code?e.status_description:e.description,diagnostic_record:null!==e.diagnostic_record?TM(TM({},MM),e.diagnostic_record):null})})),e},NM);function NM(){return null!==PM&&PM.apply(this,arguments)||this}xb.default=Dy;var xM,DM,ky={},Wy=r&&r.__extends||(xM=function(e,t){return(xM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}xM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),LM=r&&r.__assign||function(){return(LM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},l_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i_=(Object.defineProperty(ky,"__esModule",{value:!0}),l_(xb)),UM=l_(Pp),FM=l_(Xv),BM=e.internal.constants.BOLT_PROTOCOL_V5_6,WM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),h_=(DM=i_.default,Wy(qM,DM),Object.defineProperty(qM.prototype,"version",{get:function(){return BM},enumerable:!1,configurable:!0}),Object.defineProperty(qM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new FM.default(Object.values(UM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),qM.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return LM(LM({},e),{diagnostic_record:null!==e.diagnostic_record?LM(LM({},WM),e.diagnostic_record):null})})),e},qM);function qM(){return null!==DM&&DM.apply(this,arguments)||this}ky.default=h_;var zM,VM,kd={},S_=r&&r.__extends||(zM=function(e,t){return(zM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}zM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),HM=r&&r.__assign||function(){return(HM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},j_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},A_=(Object.defineProperty(kd,"__esModule",{value:!0}),j_(ky)),GM=j_(Pp),YM=j_(Xv),KM=e.internal.constants.BOLT_PROTOCOL_V5_7,ZM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),N_=(VM=A_.default,S_(QM,VM),Object.defineProperty(QM.prototype,"version",{get:function(){return KM},enumerable:!1,configurable:!0}),Object.defineProperty(QM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new YM.default(Object.values(GM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),QM.prototype.enrichErrorMetadata=function(e){return HM(HM({},e),{cause:null!==e.cause&&void 0!==e.cause?this.enrichErrorMetadata(e.cause):null,code:e.neo4j_code,diagnostic_record:null!==e.diagnostic_record?HM(HM({},ZM),e.diagnostic_record):null})},QM);function QM(){return null!==VM&&VM.apply(this,arguments)||this}kd.default=N_;var w_={},XM=(Object.defineProperty(w_,"__esModule",{value:!0}),e);function JM(){}function $M(e){return e}var e2={onNext:JM,onCompleted:JM,onError:JM};function t2(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.enrichErrorMetadata,n=e.log,e=e.observer;this._pendingObservers=[],this._log=n,this._transformMetadata=t||$M,this._enrichErrorMetadata=r||$M,this._observer=Object.assign({onObserversCountChange:JM,onError:JM,onFailure:JM,onErrorApplyTransformation:$M},e)}Object.defineProperty(t2.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),t2.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(XM.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(XM.json.stringify(e)));try{var r=this._transformMetadata(t);this._currentObserver.onCompleted(r)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(XM.json.stringify(e)));try{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(t)),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED ".concat(XM.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,XM.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,XM.newError)("Unknown Bolt protocol message: "+e))}},t2.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(t2.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),t2.prototype._queueObserver=function(e){return(e=e||e2).onCompleted=e.onCompleted||JM,e.onError=e.onError||JM,e.onNext=e.onNext||JM,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},t2.prototype._notifyErrorToObservers=function(e){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(e);0<this._pendingObservers.length;){var t=this._pendingObservers.shift();t&&t.onError&&t.onError(e)}},t2.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},t2.prototype._resetFailure=function(){this._currentFailure=null},t2.prototype._handleErrorPayload=function(e){var t=function(e){{if("Neo.TransientError.Transaction.Terminated"===e)return"Neo.ClientError.Transaction.Terminated";if("Neo.TransientError.Transaction.LockClientStopped"===e)return"Neo.ClientError.Transaction.LockClientStopped"}return e}(e.code),r=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,XM.newError)(e.message,t,r,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},t2.prototype._handleErrorCause=function(e){var t=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,XM.newGQLError)(e.message,t,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},w_.default=t2;var r2,W_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n2=(Object.defineProperty(ey,"__esModule",{value:!0}),e),o2=W_(iy),i2=W_(fm),u2=W_(c0),a2=W_(D0),s2=W_(E),c2=W_(Ag),l2=W_(s),f2=W_(Nc),p2=W_(xr),d2=W_(Cd),h2=W_(O),b2=W_(fh),y2=W_(Xh),_2=W_(xb),v2=W_(ky),m2=W_(kd),g2=W_(w_);ey.default=function(e){var t=(e=void 0===e?{}:e).version,r=e.chunker,n=e.dechunker,o=e.channel,i=e.disableLosslessIntegers,u=e.useBigInt,a=e.serversideRouting,s=e.server,c=e.log,l=e.observer,f=t,p=s,d=r,h={disableLosslessIntegers:i,useBigInt:u},b=a,y=function(t){var r=new g2.default({transformMetadata:t.transformMetadata.bind(t),enrichErrorMetadata:t.enrichErrorMetadata.bind(t),log:c,observer:l});return o.onerror=l.onError.bind(l),o.onmessage=function(e){return n.write(e)},n.onmessage=function(e){try{r.handleResponse(t.unpack(e))}catch(e){return l.onError(e)}},r},_=l.onProtocolError.bind(l),v=c;switch(f){case 1:return new o2.default(p,d,h,y,v,_);case 2:return new i2.default(p,d,h,y,v,_);case 3:return new u2.default(p,d,h,y,v,_);case 4:return new a2.default(p,d,h,y,v,_);case 4.1:return new s2.default(p,d,h,y,v,_,b);case 4.2:return new c2.default(p,d,h,y,v,_,b);case 4.3:return new l2.default(p,d,h,y,v,_,b);case 4.4:return new f2.default(p,d,h,y,v,_,b);case 5:return new p2.default(p,d,h,y,v,_,b);case 5.1:return new d2.default(p,d,h,y,v,_,b);case 5.2:return new h2.default(p,d,h,y,v,_,b);case 5.3:return new b2.default(p,d,h,y,v,_,b);case 5.4:return new y2.default(p,d,h,y,v,_,b);case 5.5:return new _2.default(p,d,h,y,v,_,b);case 5.6:return new v2.default(p,d,h,y,v,_,b);case 5.7:return new m2.default(p,d,h,y,v,_,b);default:throw(0,n2.newError)("Unknown Bolt protocol version: "+f)}},_y=y,r2=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),d_=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||r2(t,e,r)},b_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(_y,"__esModule",{value:!0}),_y.RawRoutingTable=_y.BoltProtocol=void 0,Y_=b_(op),sv=b_(ey),up=b_(s),b_=b_(py),d_(A,_y),_y.BoltProtocol=up.default,_y.RawRoutingTable=b_.default,_y.default={handshake:Y_.default,create:sv.default};var O2,ap={},bv={},wv=r&&r.__extends||(O2=function(e,t){return(O2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}O2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(bv,"__esModule",{value:!0});wv(E2,w2=e.ConnectionProvider),E2.prototype.acquireConnection=function(e){e=void 0===e?{}:e,e.accessMode,e.database,e.bookmarks,e=this._connection;return this._connection=null,Promise.resolve(e)};var w2,yv=E2;function E2(e){var t=w2.call(this)||this;return t._connection=e,t}bv.default=yv;var P2,Ef={},sp={},pv={},mv=r&&r.__extends||(P2=function(e,t){return(P2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}P2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(pv,"__esModule",{value:!0});mv(T2,S2=e.Connection),Object.defineProperty(T2.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),T2.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(T2.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),T2.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},T2.prototype.write=function(e,t,r){throw new Error("not implemented")},T2.prototype.close=function(){throw new Error("not implemented")},T2.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var S2,Oy=T2;function T2(e){var t=S2.call(this)||this;return t._errorHandler=e,t}pv.default=Oy;var j2,Dv={},Mv=r&&r.__extends||(j2=function(e,t){return(j2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}j2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),C2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},R2=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Bv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},I2=(Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.createChannelConnection=void 0,Ep),A2=e,Gv=Bv(pv),k2=Bv(y),M2=A2.error.PROTOCOL_ERROR,N2=A2.internal.logger.Logger,x2=0;Dv.createChannelConnection=function(i,u,a,s,e,c,t){void 0===c&&(c=null);var l=(t=void 0===t?function(e){return new I2.Channel(e)}:t)(new I2.ChannelConfig(i,u,a.errorCode(),e));return k2.default.handshake(l,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new I2.Chunker(l),o=new I2.Dechunker,t=new L2(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return k2.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onObserversCountChange:t._handleOngoingRequestsNumberChange.bind(t),onError:t._handleFatalError.bind(t),onFailure:t._resetOnFailure.bind(t),onProtocolError:t._handleProtocolError.bind(t),onErrorApplyTransformation:function(e){return t.handleAndTransformError(e,t._address)}}})},u.telemetryDisabled);return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};D2=Gv.default,Mv(U2,D2),U2.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},U2.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},U2.prototype._sendTelemetryIfEnabled=function(e){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||null==e||null==e.apiTelemetryConfig||this._protocol.telemetry({api:e.apiTelemetryConfig.api},{onCompleted:e.apiTelemetryConfig.onTelemetrySuccess,onError:e.beforeError})},U2.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},U2.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},U2.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(U2.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),U2.prototype.connect=function(t,n,o,i){return C2(this,void 0,void 0,function(){var r=this;return R2(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,A2.newError)("Connection does not support re-auth");return this._authToken=o,this._protocol.initialized?[3,2]:[4,this._initialize(t,n,o)];case 1:return[2,e.sent()];case 2:return i?[4,new Promise(function(e,t){r._protocol.logoff({onError:t}),r._protocol.logon({authToken:o,onError:t,onComplete:function(){return e(r)},flush:!0})})]:[3,4];case 3:return[2,e.sent()];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:o,flush:!0}),[2,this]}})})},U2.prototype._initialize=function(e,n,o){var i=this,u=this;return new Promise(function(r,t){i._protocol.initialize({userAgent:e,boltAgent:n,authToken:o,notificationFilter:i._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,i.version&&!t||(i.version=t),t=e.connection_id,i.databaseId||(i.databaseId=t),e.hints&&(null!=(t=e.hints["connection.recv_timeout_seconds"])&&(t=(0,A2.toNumber)(t),Number.isInteger(t)&&0<t?i._ch.setupReceiveTimeout(1e3*t):i._log.info("Server located at ".concat(i._address," supplied an invalid connection receive timeout value (").concat(t,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")),!0===e.hints["telemetry.enabled"]&&(i._telemetryDisabledConnection=!1))),r(u)}})})},U2.prototype.protocol=function(){return this._protocol},Object.defineProperty(U2.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(U2.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),U2.prototype._handleFatalError=function(e){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||e,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(A2.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},U2.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},U2.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},U2.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},U2.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},U2.prototype.resetAndFlush=function(){var r=this;return new Promise(function(e,t){r._reset({onError:function(e){r._isBroken?t(e):(e=r._handleProtocolError("Received FAILURE as a response for RESET: ".concat(e)),t(e))},onComplete:function(){e()}})})},U2.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},U2.prototype._reset=function(t){var e,r=this;this._reseting?this._protocol.isLastMessageReset()?this._resetObservers.push(t):this._protocol.reset({onError:function(e){t.onError(e)},onComplete:function(){t.onComplete()}}):(this._resetObservers.push(t),this._reseting=!0,e=function(e){r._reseting=!1;var t=r._resetObservers;r._resetObservers=[],t.forEach(e)},this._protocol.reset({onError:function(t){e(function(e){return e.onError(t)})},onComplete:function(){e(function(e){return e.onComplete()})}}))},U2.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},U2.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},U2.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},U2.prototype.close=function(){return C2(this,void 0,void 0,function(){return R2(this,function(e){switch(e.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 e.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},U2.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},U2.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,A2.newError)(e,M2);return this._handleFatalError(e),e};var D2,L2=U2;function U2(e,t,r,n,o,i,u,a,s,c){void 0===o&&(o=!1),void 0===i&&(i=null);var l,f,t=D2.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=x2++,t._address=r,t._server={address:r.asHostPort()},t._creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(l=t,new N2((f=n)._level,function(e,t){return f._loggerFunction(e,"".concat(l," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._telemetryDisabledDriverConfig=!0===c,t._telemetryDisabledConnection=!0,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}Dv.default=L2;var F2,B2,pn={},tm=r&&r.__extends||(F2=function(e,t){return(F2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}F2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),om=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},am=(Object.defineProperty(pn,"__esModule",{value:!0}),om(pv)),it=(B2=am.default,tm(W2,B2),W2.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},W2.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},W2.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},W2.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},W2.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(W2.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(W2.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),W2.prototype.isOpen=function(){return this._delegate.isOpen()},W2.prototype.protocol=function(){return this._delegate.protocol()},W2.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},W2.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},W2.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},W2.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},W2.prototype.close=function(){return this._delegate.close()},W2.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},W2);function W2(e,t){var r=B2.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}pn.default=it;Em={};Object.defineProperty(Em,"__esModule",{value:!0});var q2,z2,V2,H2=e.error.SERVICE_UNAVAILABLE,G2=e.error.SESSION_EXPIRED;function Y2(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||K2,this._handleWriteFailure=r||K2,this._handleSecurityError=n||K2}function K2(e){return e}Y2.create=function(e){return new Y2(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},Y2.prototype.errorCode=function(){return this._errorCode},Y2.prototype.handleAndTransformError=function(e,t,r){return null!=(n=e)&&null!=n.code&&n.code.startsWith("Neo.ClientError.Security.")?this._handleSecurityError(e,t,r):function(e){if(e)return e.code===G2||e.code===H2||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t,r):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t,r):e;var n},Em.default=Y2,Cm=sp,q2=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),z2=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zv=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&q2(t,e,r);return z2(t,e),t},C=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.createChannelConnection=Cm.ConnectionErrorHandler=Cm.DelegateConnection=Cm.ChannelConnection=Cm.Connection=void 0,Nm=C(pv),Cm.Connection=Nm.default,V2=Zv(Dv),Cm.ChannelConnection=V2.default,Object.defineProperty(Cm,"createChannelConnection",{enumerable:!0,get:function(){return V2.createChannelConnection}}),Zv=C(pn),Cm.DelegateConnection=Zv.default,Zv=C(Em),Cm.ConnectionErrorHandler=Zv.default,Cm.default=Nm.default;var Vm={},Z2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Q2=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},X2=(Object.defineProperty(Vm,"__esModule",{value:!0}),e),J2=Gy;function $2(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,X2.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}$2.prototype.authenticate=function(e){var r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return Z2(this,void 0,void 0,function(){var t;return Q2(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!J2.object.equals(r.authToken,n)&&!0!==o||!0===u),null==r.authToken||t?[4,r.connect(this._userAgent,this._boltAgent,n,i||!1)]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,r];case 3:return[4,this._authTokenManager.getToken()];case 4:return t=e.sent(),J2.object.equals(t,r.authToken)?[3,6]:[4,r.connect(this._userAgent,this._boltAgent,t,!1)];case 5:return[2,e.sent()];case 6:return[2,r]}})})},$2.prototype.handleError=function(e){var t=e.connection,e=e.code;return!(!t||!e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},Vm.default=$2;var tb={},eN=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},tN=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function rN(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(tb,"__esModule",{value:!0}),rN.prototype.check=function(r){return eN(this,void 0,void 0,function(){var t;return tN(this,function(e){switch(e.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(r)?[2,!0]:(t=Date.now()-r.idleTimestamp,0===this._connectionLivenessCheckTimeout||t>this._connectionLivenessCheckTimeout?[4,r.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,!0]}})})},Object.defineProperty(rN.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),rN.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},tb.default=rN;var Km={},nN=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},oN=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},iN=(Object.defineProperty(Km,"__esModule",{value:!0}),Ep);function uN(e){var t=e.clientCertificateProvider,e=e.loader;this._clientCertificateProvider=t,this._loader=e||iN.ClientCertificatesLoader,this._clientCertificate=null}uN.prototype.getClientCertificate=function(){return nN(this,void 0,void 0,function(){var t,r,n=this;return oN(this,function(e){switch(e.label){case 0:return(t=null!=this._clientCertificateProvider)?(r=null==this._clientCertificate)?[3,2]:[4,this._clientCertificateProvider.hasUpdate()]:[3,3];case 1:r=e.sent(),e.label=2;case 2:t=r,e.label=3;case 3:return t&&(this._clientCertificate=Promise.resolve(this._clientCertificateProvider.getClientCertificate()).then(this._loader.load).then(function(e){return n._clientCertificate=e,n._clientCertificate}).catch(function(e){throw n._clientCertificate=null,e})),[2,this._clientCertificate]}})})},Km.default=uN;var aN,sN,Fm=r&&r.__extends||(aN=function(e,t){return(aN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}aN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),cN=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},lN=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},fN=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},pN=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},t0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dN=(Object.defineProperty(Ef,"__esModule",{value:!0}),sp),hN=e,bN=t0(Vm),yN=Gy,_N=t0(tb),vN=t0(Km),mN=hN.error.SERVICE_UNAVAILABLE,gN=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],v0=hN.internal.pool,ON=v0.Pool,wN=v0.PoolConfig,eb=(sN=hN.ConnectionProvider,Fm(EN,sN),EN.prototype._createConnectionErrorHandler=function(){return new dN.ConnectionErrorHandler(mN)},EN.prototype._getClientCertificate=function(){return cN(this,void 0,void 0,function(){return lN(this,function(e){return[2,this._config.clientCertificate.getClientCertificate()]})})},EN.prototype._createConnection=function(e,r,n){var o=this,i=e.auth;return this._createChannelConnection(r).then(function(t){return t.release=function(){return t.idleTimestamp=Date.now(),n(r,t)},o._openConnections[t.id]=t,o._authenticationProvider.authenticate({connection:t,auth:i}).catch(function(e){throw o._destroyConnection(t),e})})},EN.prototype._validateConnectionOnAcquire=function(e,r){var n=e.auth,o=e.skipReAuth;return cN(this,void 0,void 0,function(){var t;return lN(this,function(e){switch(e.label){case 0:if(!this._validateConnection(r))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(r)];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not alive because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:r,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not valid because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 7:return[2]}})})},EN.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},EN.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},EN.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},EN.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return cN(this,void 0,void 0,function(){var t,r;return lN(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new hN.ServerInfo(t.server,t.protocol().version),e.label=2;case 2:return e.trys.push([2,,5,7]),t.protocol().isLastMessageLogon()?[3,4]:[4,t.resetAndFlush()];case 3:e.sent(),e.label=4;case 4:return[3,7];case 5:return[4,t.release()];case 6:return e.sent(),[7];case 7:return[2,r]}})})},EN.prototype._verifyAuthentication=function(e){var u=e.getAddress,a=e.auth;return cN(this,void 0,void 0,function(){var t,r,n,o,i;return lN(this,function(e){switch(e.label){case 0:t=[],e.label=1;case 1:return e.trys.push([1,8,9,11]),[4,u()];case 2:return r=e.sent(),[4,this._connectionPool.acquire({auth:a,skipReAuth:!0},r)];case 3:if(n=e.sent(),t.push(n),o=!n.protocol().isLastMessageLogon(),n.supportsReAuth)return o&&n.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:n,auth:a,waitReAuth:!0,forceReAuth:!0})]:[3,5];throw(0,hN.newError)("Driver is connected to a database that does not support user switch.");case 4:return e.sent(),[3,7];case 5:return!o||n.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:a},r,{requireNew:!0})];case 6:(i=e.sent())._sticky=!0,t.push(i),e.label=7;case 7:return[2,!0];case 8:if(i=e.sent(),gN.includes(i.code))return[2,!1];throw i;case 9:return[4,Promise.all(t.map(function(e){return e.release()}))];case 10:return e.sent(),[7];case 11:return[2]}})})},EN.prototype._verifyStickyConnection=function(e){var n=e.auth,o=e.connection;return e.address,cN(this,void 0,void 0,function(){var t,r;return lN(this,function(e){switch(e.label){case 0:return(t=yN.object.equals(n,o.authToken),r=!t,o._sticky=t&&!o.supportsReAuth,r||o._sticky)?[4,o.release()]:[3,2];case 1:throw e.sent(),(0,hN.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},EN.prototype.close=function(){return cN(this,void 0,void 0,function(){return lN(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.close()];case 1:return e.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(e){return e.close()}))];case 2:return e.sent(),[2]}})})},EN._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},EN._removeIdleObserverOnConnection=function(e){e._unsetIdle()},EN.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},EN);function EN(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,e=void 0===e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(ON.bind.apply(ON,pN([void 0],fN(e),!1)))}:e,s=(void 0===t&&(t=null),sN.call(this)||this);return s._id=r,s._config=n,s._log=o,s._clientCertificateHolder=new vN.default({clientCertificateProvider:s._config.clientCertificate}),s._authenticationProvider=new bN.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new _N.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(n){return cN(s,void 0,void 0,function(){var t,r;return lN(this,function(e){switch(e.label){case 0:return t=dN.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent()]))]}})})},s._connectionPool=e({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validateOnAcquire:s._validateConnectionOnAcquire.bind(s),validateOnRelease:s._validateConnectionOnRelease.bind(s),installIdleObserver:EN._installIdleObserverOnConnection.bind(s),removeIdleObserver:EN._removeIdleObserverOnConnection.bind(s),config:wN.fromDriverConfig(n),log:s._log}),s._openConnections={},s}Ef.default=eb;var PN,SN,g0={},R0=r&&r.__extends||(PN=function(e,t){return(PN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}PN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),TN=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},jN=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},k0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P0=(Object.defineProperty(g0,"__esModule",{value:!0}),k0(Ef)),CN=sp,yl=e.internal.constants,RN=yl.BOLT_PROTOCOL_V3,IN=yl.BOLT_PROTOCOL_V4_0,AN=yl.BOLT_PROTOCOL_V4_4,kN=yl.BOLT_PROTOCOL_V5_1,MN=e.error.SERVICE_UNAVAILABLE,z0=(SN=P0.default,R0(NN,SN),NN.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return TN(this,void 0,void 0,function(){var t,r,n=this;return jN(this,function(e){switch(e.label){case 0:return t=CN.ConnectionErrorHandler.create({errorCode:MN,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r,o)}}),[4,this._connectionPool.acquire({auth:i,forceReAuth:u},this._address)];case 1:return(r=e.sent(),i)?[4,this._verifyStickyConnection({auth:i,connection:r,address:this._address})]:[3,3];case 2:return e.sent(),[2,r];case 3:return[2,new CN.DelegateConnection(r,t)]}})})},NN.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),SN.prototype._handleSecurityError.call(this,e,t,r)},NN.prototype._hasProtocolVersion=function(n){return TN(this,void 0,void 0,function(){var t,r;return jN(this,function(e){switch(e.label){case 0:return[4,this._createChannelConnection(this._address)];case 1:return t=e.sent(),r=t.protocol()?t.protocol().version:null,[4,t.close()];case 2:return e.sent(),r?[2,n(r)]:[2,!1]}})})},NN.prototype.supportsMultiDb=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return IN<=e})];case 1:return[2,e.sent()]}})})},NN.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},NN.prototype.supportsTransactionConfig=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return RN<=e})];case 1:return[2,e.sent()]}})})},NN.prototype.supportsUserImpersonation=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return AN<=e})];case 1:return[2,e.sent()]}})})},NN.prototype.supportsSessionAuth=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return kN<=e})];case 1:return[2,e.sent()]}})})},NN.prototype.verifyAuthentication=function(e){var r=e.auth;return TN(this,void 0,void 0,function(){var t=this;return jN(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},NN.prototype.verifyConnectivityAndGetServerInfo=function(){return TN(this,void 0,void 0,function(){return jN(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},NN);function NN(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,t=SN.call(this,{id:t,config:r,log:n,userAgent:i,boltAgent:u,authTokenManager:a,newPool:e})||this;return t._address=o,t}g0.default=z0;var p0={},G0={},X_={},eg={},xN=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},DN=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},LN=(Object.defineProperty(eg,"__esModule",{value:!0}),eg.createValidRoutingTable=void 0,e),Z0=LN.internal.constants,UN=Z0.ACCESS_MODE_WRITE,FN=Z0.ACCESS_MODE_READ,BN=LN.internal.serverAddress.ServerAddress,WN=LN.error.PROTOCOL_ERROR,qN=(zN.fromRawRoutingTable=HN,zN.prototype.forget=function(e){this.readers=VN(this.readers,e),this.writers=VN(this.writers,e)},zN.prototype.forgetRouter=function(e){this.routers=VN(this.routers,e)},zN.prototype.forgetWriter=function(e){this.writers=VN(this.writers,e)},zN.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===FN&&0===this.readers.length||e===UN&&0===this.writers.length},zN.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},zN.prototype.allServers=function(){return DN(DN(DN([],xN(this.routers),!1),xN(this.readers),!1),xN(this.writers),!1)},zN.prototype.toString=function(){return"RoutingTable["+"database=".concat(this.databaseName,", ")+"expirationTime=".concat(this.expirationTime,", ")+"currentTime=".concat(Date.now(),", ")+"routers=[".concat(this.routers,"], ")+"readers=[".concat(this.readers,"], ")+"writers=[".concat(this.writers,"]]")},zN);function zN(e){var e=void 0===e?{}:e,t=e.database,r=e.routers,n=e.readers,o=e.writers,i=e.expirationTime,e=e.ttl;this.database=t||null,this.databaseName=t||"default database",this.routers=r||[],this.readers=n||[],this.writers=o||[],this.expirationTime=i||(0,LN.int)(0),this.ttl=e}function VN(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function HN(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,LN.int)(Date.now()),n=(0,LN.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?LN.Integer.MAX_VALUE:n}catch(e){throw(0,LN.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(LN.json.stringify(t),"\nError message: ").concat(e.message),WN)}}(r,t),i=function(t,r){try{var n=[],o=[],i=[];return t.servers.forEach(function(e){var t=e.role,e=e.addresses;"ROUTE"===t?n=YN(e).map(function(e){return BN.fromUrl(e)}):"WRITE"===t?i=YN(e).map(function(e){return BN.fromUrl(e)}):"READ"===t&&(o=YN(e).map(function(e){return BN.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,LN.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(LN.json.stringify(t.servers),"\nError message: ").concat(e.message),WN)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return GN(u,"routers",t),GN(a,"readers",t),new qN({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function GN(e,t,r){if(0===e.length)throw(0,LN.newError)("Received no "+t+" from router "+r,WN)}function YN(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}eg.default=qN,eg.createValidRoutingTable=HN;var dy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},KN=(Object.defineProperty(X_,"__esModule",{value:!0}),dy(eg));function ZN(e){this._routingContext=e}ZN.prototype.lookupRoutingTableOnRouter=function(t,r,n,o){var i=this;return t._acquireConnection(function(e){return i._requestRawRoutingTable(e,t,r,n,o).then(function(e){return e.isNull?null:KN.default.fromRawRoutingTable(r,n,e)})})},ZN.prototype._requestRawRoutingTable=function(r,n,o,e,i){var u=this;return new Promise(function(e,t){r.protocol().requestRoutingInformation({routingContext:u._routingContext,databaseName:o,impersonatedUser:i,sessionContext:{bookmarks:n._lastBookmarks,mode:n._mode,database:n._database,afterComplete:n._onComplete},onCompleted:e,onError:t})})},X_.default=ZN;var QN,XN,ng=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zy=(Object.defineProperty(G0,"__esModule",{value:!0}),G0.RoutingTable=G0.Rediscovery=void 0,ng(X_)),L0=(G0.Rediscovery=Zy.default,ng(eg)),bg=(G0.RoutingTable=L0.default,G0.default=Zy.default,r&&r.__extends||(QN=function(e,t){return(QN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}QN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),JN=r&&r.__assign||function(){return(JN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$N=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ex=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),gg=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&$N(t,e,r);return ex(t,e),t},tx=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},rx=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},nx=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ox=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},$h=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ix=(Object.defineProperty(p0,"__esModule",{value:!0}),e),ux=gg(G0),ax=Ep,sx=$h(bv),Sl=$h(Ef),cx=Dc,lx=sp,fx=Gy,px=ix.error.SERVICE_UNAVAILABLE,dx=ix.error.SESSION_EXPIRED,hx=ix.internal.bookmarks.Bookmarks,Bc=ix.internal.constants,bx=Bc.ACCESS_MODE_READ,yx=Bc.ACCESS_MODE_WRITE,_x=Bc.BOLT_PROTOCOL_V3,vx=Bc.BOLT_PROTOCOL_V4_0,mx=Bc.BOLT_PROTOCOL_V4_4,gx=Bc.BOLT_PROTOCOL_V5_1,Ox=null,wx=(0,ix.int)(3e4),u=(XN=Sl.default,bg(Ex,XN),Ex.prototype._createConnectionErrorHandler=function(){return new lx.ConnectionErrorHandler(dx)},Ex.prototype._handleUnavailability=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,r||Ox),e},Ex.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),XN.prototype._handleSecurityError.call(this,e,t,r,n)},Ex.prototype._handleWriteFailure=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forgetWriter(t,r||Ox),(0,ix.newError)("No longer possible to write to server at "+t,dx,e)},Ex.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,s=e.accessMode,c=e.database,l=e.bookmarks,f=e.impersonatedUser,p=e.onDatabaseNameResolved,d=e.auth;return tx(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return rx(this,function(e){switch(e.label){case 0:return n={database:c||Ox},o=new lx.ConnectionErrorHandler(dx,function(e,t){return a._handleUnavailability(e,t,n.database)},function(e,t){return a._handleWriteFailure(e,t,n.database)},function(e,t,r){return a._handleSecurityError(e,t,r,n.database)}),[4,this._freshRoutingTable({accessMode:s,database:n.database,bookmarks:l,impersonatedUser:f,auth:d,onDatabaseNameResolved:function(e){n.database=n.database||e,p&&p(e)}})];case 1:if(u=e.sent(),s===bx)r=this._loadBalancingStrategy.selectReader(u.readers),t="read";else{if(s!==yx)throw(0,ix.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(u.writers),t="write"}if(!r)throw(0,ix.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(u),dx);e.label=2;case 2:return e.trys.push([2,6,,7]),[4,this._connectionPool.acquire({auth:d},r)];case 3:return(i=e.sent(),d)?[4,this._verifyStickyConnection({auth:d,connection:i,address:r})]:[3,5];case 4:return e.sent(),[2,i];case 5:return[2,new lx.DelegateConnection(i,o)];case 6:throw u=e.sent(),o.handleAndTransformError(u,r);case 7:return[2]}})})},Ex.prototype._hasProtocolVersion=function(u){return tx(this,void 0,void 0,function(){var t,r,n,o,i;return rx(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=e.sent(),n=0,e.label=2;case 2:if(!(n<t.length))return[3,8];e.label=3;case 3:return e.trys.push([3,6,,7]),[4,this._createChannelConnection(t[n])];case 4:return i=e.sent(),o=i.protocol()?i.protocol().version:null,[4,i.close()];case 5:return e.sent(),o?[2,u(o)]:[2,!1];case 6:return i=e.sent(),r=i,[3,7];case 7:return n++,[3,2];case 8:if(r)throw r;return[2,!1]}})})},Ex.prototype.supportsMultiDb=function(){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return vx<=e})];case 1:return[2,e.sent()]}})})},Ex.prototype.supportsTransactionConfig=function(){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return _x<=e})];case 1:return[2,e.sent()]}})})},Ex.prototype.supportsUserImpersonation=function(){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return mx<=e})];case 1:return[2,e.sent()]}})})},Ex.prototype.supportsSessionAuth=function(){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return gx<=e})];case 1:return[2,e.sent()]}})})},Ex.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},Ex.prototype.verifyAuthentication=function(e){var n=e.database,o=e.accessMode,i=e.auth;return tx(this,void 0,void 0,function(){var t=this;return rx(this,function(e){return[2,this._verifyAuthentication({auth:i,getAddress:function(){return tx(t,void 0,void 0,function(){var t,r;return rx(this,function(e){switch(e.label){case 0:return t={database:n||Ox},[4,this._freshRoutingTable({accessMode:o,database:t.database,auth:i,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:if(r=e.sent(),0===(r=o===yx?r.writers:r.readers).length)throw(0,ix.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),px);return[2,r[0]]}})})}})]})})},Ex.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return tx(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return rx(this,function(e){switch(e.label){case 0:return t={database:l||Ox},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===yx?r.writers:r.readers,n=(0,ix.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),px),e.label=2;case 2:e.trys.push([2,9,10,11]),o=nx(r),i=o.next(),e.label=3;case 3:if(i.done)return[3,8];u=i.value,e.label=4;case 4:return e.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:u})];case 5:return[2,e.sent()];case 6:return a=e.sent(),n=a,[3,7];case 7:return i=o.next(),[3,3];case 8:return[3,11];case 9:return a=e.sent(),s={error:a},[3,11];case 10:try{i&&!i.done&&(c=o.return)&&c.call(o)}finally{if(s)throw s.error}return[7];case 11:throw n}})})},Ex.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},Ex.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},Ex.prototype._freshRoutingTable=function(e){var e=void 0===e?{}:e,t=e.accessMode,r=e.database,n=e.bookmarks,o=e.impersonatedUser,i=e.onDatabaseNameResolved,e=e.auth,u=this._routingTableRegistry.get(r,function(){return new ux.RoutingTable({database:r})});return u.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(u)),this._refreshRoutingTable(u,n,o,e).then(function(e){return i(e.database),e})):u},Ex.prototype._refreshRoutingTable=function(e,t,r,n){var o=e.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,e,t,r,n):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,e,t,r,n)},Ex.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return tx(this,void 0,void 0,function(){var t,r,n,o,i;return rx(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=ox.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],r)?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(u,a,s,c,l)];case 3:i=ox.apply(void 0,[e.sent(),2]),o=i[0],i=i[1],r=o,n=i||n,e.label=4;case 4:return[4,this._applyRoutingTableIfPossible(a,r,n)];case 5:return[2,e.sent()]}})})},Ex.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return tx(this,void 0,void 0,function(){var t,r,n;return rx(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=ox.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a,s)];case 2:n=ox.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,r)];case 4:return[2,e.sent()]}})})},Ex.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return tx(this,void 0,void 0,function(){var t,r;return rx(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=ox.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,Ex._forgetRouter(o,n,r),[2,[null,t]])}})})},Ex.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return tx(this,void 0,void 0,function(){var t;return rx(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(n)];case 1:return t=e.sent(),t=t.filter(function(e){return r.indexOf(e)<0}),[4,this._fetchRoutingTable(t,o,i,u,a)];case 2:return[2,e.sent()]}})})},Ex.prototype._resolveSeedRouter=function(n){return tx(this,void 0,void 0,function(){var t,r=this;return rx(this,function(e){switch(e.label){case 0:return[4,this._hostNameResolver.resolve(n)];case 1:return t=e.sent(),[4,Promise.all(t.map(function(e){return r._dnsResolver.resolve(e)}))];case 2:return t=e.sent(),[2,[].concat.apply([],t)]}})})},Ex.prototype._fetchRoutingTable=function(s,c,l,f,p){return tx(this,void 0,void 0,function(){var t=this;return rx(this,function(e){return[2,s.reduce(function(i,u,a){return tx(t,void 0,void 0,function(){var t,r,n,o;return rx(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=ox.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(Ex._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=ox.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],!r)return[3,8];e.label=3;case 3:return e.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(r,c.database,u,f)];case 4:return[2,[e.sent(),null]];case 5:return o=e.sent(),[2,this._handleRediscoveryError(o,u)];case 6:return r.close(),[7];case 7:return[3,9];case 8:return[2,[null,n]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},Ex.prototype._createSessionForRediscovery=function(o,i,u,a){return tx(this,void 0,void 0,function(){var t,r,n=this;return rx(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:a},o)];case 1:return(t=e.sent(),a)?[4,this._verifyStickyConnection({auth:a,connection:t,address:o})]:[3,3];case 2:e.sent(),e.label=3;case 3:return r=lx.ConnectionErrorHandler.create({errorCode:dx,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new lx.DelegateConnection(t):new lx.DelegateConnection(t,r),r=new sx.default(r),t.protocol().version<4?[2,[new ix.Session({mode:yx,bookmarks:hx.empty(),connectionProvider:r}),null]]:[2,[new ix.Session({mode:bx,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},Ex.prototype._handleRediscoveryError=function(e,t){if(["Neo.ClientError.Database.DatabaseNotFound","Neo.ClientError.Transaction.InvalidBookmark","Neo.ClientError.Transaction.InvalidBookmarkMixture","Neo.ClientError.Statement.ArgumentError","Neo.ClientError.Request.Invalid","Neo.ClientError.Statement.TypeError","N/A"].includes(e.code)||(r=e).code.startsWith("Neo.ClientError.Security.")&&!["Neo.ClientError.Security.AuthorizationExpired"].includes(r.code))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,ix.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),px,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},Ex.prototype._applyRoutingTableIfPossible=function(t,r,n){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,ix.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),px,n);case 1:return e.sent(),[2,r]}})})},Ex.prototype._updateRoutingTable=function(t){return tx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return e.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),this._log.info("Updated routing table ".concat(t)),[2]}})})},Ex._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},Ex);function Ex(e){var t=e.id,r=e.address,n=e.routingContext,o=e.hostNameResolver,i=e.config,u=e.log,a=e.userAgent,s=e.boltAgent,c=e.authTokenManager,l=e.routingTablePurgeDelay,e=e.newPool,f=XN.call(this,{id:t,config:i,log:u,userAgent:a,boltAgent:s,authTokenManager:c,newPool:e},function(n){return tx(f,void 0,void 0,function(){var t,r;return rx(this,function(e){switch(e.label){case 0:return t=lx.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent(),this._routingContext]))]}})})})||this;return f._routingContext=JN(JN({},n),{address:r.toString()}),f._seedRouter=r,f._rediscovery=new ux.default(f._routingContext),f._loadBalancingStrategy=new cx.LeastConnectedLoadBalancingStrategy(f._connectionPool),f._hostNameResolver=o,f._dnsResolver=new ax.HostNameResolver,f._log=u,f._useSeedRouter=!0,f._routingTableRegistry=new qx(l?(0,ix.int)(l):wx),f._refreshRoutingTable=fx.functional.reuseOngoingRequest(f._refreshRoutingTable,f),f}p0.default=u;zx.prototype.register=function(e){return this._tables.set(e.database,e),this},zx.prototype.apply=function(e,t){var t=void 0===t?{}:t,r=t.applyWhenExists,t=t.applyWhenDontExists,t=void 0===t?function(){}:t;return this._tables.has(e)?r(this._tables.get(e)):"string"==typeof e||null===e?t():this._forEach(r),this},zx.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},zx.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},zx.prototype._forEach=function(e){var t,r;try{for(var n=nx(this._tables),o=n.next();!o.done;o=n.next())e(ox(o.value,2)[1])}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},zx.prototype._remove=function(e){return this._tables.delete(e),this},zx.prototype._removeIf=function(e){var t,r;try{for(var n=nx(this._tables),o=n.next();!o.done;o=n.next()){var i=ox(o.value,2),u=i[0];e(i[1])&&this._remove(u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this};var Px,Sx,Tx,jx,Cx,Rx,Ix,Ax,kx,Mx,Nx,x,xx,Dx,Lx,Ux,Fx,Bx,Wx,qx=zx;function zx(e){this._tables=new Map,this._routingTablePurgeDelay=e}function Vx(e,t,r){void 0===r&&(r={}),Lx(e,"Bolt URL");var n,o=Bx.parseDatabaseUrl(e),i=!1,u=!1;switch(o.scheme){case"bolt":break;case"bolt+s":u=!0,n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":u=!0,n="TRUST_ALL_CERTIFICATES";break;case"neo4j":i=!0;break;case"neo4j+s":n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",i=u=!0;break;case"neo4j+ssc":n="TRUST_ALL_CERTIFICATES",i=u=!0;break;default:throw new Error("Unknown scheme: ".concat(o.scheme))}if(u){if("encrypted"in r||"trust"in r)throw new Error("Encryption/trust can only be configured either through URL or config, not both");r.encrypted=Dx,r.trust=n,r.clientCertificate=(0,x.resolveCertificateProvider)(r.clientCertificate)}var a=function(e){if("object"==typeof(t=e)&&null!=t&&"getToken"in t&&"handleSecurityException"in t&&"function"==typeof t.getToken&&"function"==typeof t.handleSecurityException)return e;var t=e;return(t=t||{}).scheme=t.scheme||"none",(0,x.staticAuthTokenManager)({authToken:t})}(t),s=(r.userAgent=r.userAgent||Wx,r.boltAgent=x.internal.boltAgent.fromVersion(Nx.default),Fx.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new Mx.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new xx.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(Ux(o.query))return function(e,t,r){return new xx.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function Hx(r,n){return Ax(this,void 0,void 0,function(){var t;return kx(this,function(e){switch(e.label){case 0:t=Vx(r,{scheme:"none",principal:"",credentials:""},n),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,t.getNegotiatedProtocolVersion()];case 2:return e.sent(),[2,!0];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})}return pl=ap,Px=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(pl,"__esModule",{value:!0}),pl.RoutingConnectionProvider=pl.DirectConnectionProvider=pl.PooledConnectionProvider=pl.SingleConnectionProvider=void 0,Sx=bv,Object.defineProperty(pl,"SingleConnectionProvider",{enumerable:!0,get:function(){return Px(Sx).default}}),Tx=Ef,Object.defineProperty(pl,"PooledConnectionProvider",{enumerable:!0,get:function(){return Px(Tx).default}}),jx=g0,Object.defineProperty(pl,"DirectConnectionProvider",{enumerable:!0,get:function(){return Px(jx).default}}),Cx=p0,Object.defineProperty(pl,"RoutingConnectionProvider",{enumerable:!0,get:function(){return Px(Cx).default}}),fg=p,Rx=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Ix=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Rx(t,e,r);return Ix(t,e),t},i=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Rx(t,e,r)},Object.defineProperty(fg,"__esModule",{value:!0}),fg.packstream=fg.channel=fg.buf=fg.bolt=fg.loadBalancing=void 0,fg.loadBalancing=v(Dc),fg.bolt=v(y),fg.buf=v(id),fg.channel=v(Ep),fg.packstream=v(Q_),i(ap,fg),R=L,Ax=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},kx=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},j=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(R,"__esModule",{value:!0}),R.UnboundRelationship=R.Relationship=R.Node=R.Record=R.ServerInfo=R.GqlStatusObject=R.Notification=R.QueryStatistics=R.ProfiledPlan=R.Plan=R.ResultSummary=R.RxResult=R.RxManagedTransaction=R.RxTransaction=R.RxSession=R.EagerResult=R.Result=R.ManagedTransaction=R.Transaction=R.Session=R.Driver=R.temporal=R.spatial=R.graph=R.error=R.routing=R.session=R.types=R.logging=R.auth=R.isRetryableError=R.Neo4jError=R.integer=R.isUnboundRelationship=R.isRelationship=R.isPathSegment=R.isPath=R.isNode=R.isDateTime=R.isLocalDateTime=R.isDate=R.isTime=R.isLocalTime=R.isDuration=R.isPoint=R.isInt=R.int=R.hasReachableServer=R.driver=R.authTokenManagers=void 0,R.clientCertificateProviders=R.notificationFilterMinimumSeverityLevel=R.notificationFilterDisabledClassification=R.notificationFilterDisabledCategory=R.notificationSeverityLevel=R.notificationClassification=R.notificationCategory=R.resultTransformers=R.bookmarkManager=R.DateTime=R.LocalDateTime=R.Date=R.Time=R.LocalTime=R.Duration=R.Integer=R.Point=R.PathSegment=R.Path=void 0,Mx=U,Object.defineProperty(R,"Driver",{enumerable:!0,get:function(){return Mx.Driver}}),Nx=j(g),x=e,Object.defineProperty(R,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(R,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(R,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(R,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(R,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(R,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(R,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(R,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(R,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(R,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(R,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(R,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(R,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(R,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(R,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(R,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(R,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(R,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(R,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(R,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(R,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(R,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(R,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(R,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(R,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(R,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(R,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(R,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(R,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(R,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(R,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(R,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(R,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(R,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(R,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(R,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(R,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(R,"GqlStatusObject",{enumerable:!0,get:function(){return x.GqlStatusObject}}),Object.defineProperty(R,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(R,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(R,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(R,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(R,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(R,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(R,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(R,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(R,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(R,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(R,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(R,"notificationClassification",{enumerable:!0,get:function(){return x.notificationClassification}}),Object.defineProperty(R,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(R,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(R,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return x.notificationFilterDisabledClassification}}),Object.defineProperty(R,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(R,"clientCertificateProviders",{enumerable:!0,get:function(){return x.clientCertificateProviders}}),xx=p,nO=j(V),R.RxSession=nO.default,n=j(P),R.RxTransaction=n.default,Y=j(_),R.RxManagedTransaction=Y.default,j=j(t),R.RxResult=j.default,Dg=x.internal.util,Dx=Dg.ENCRYPTION_ON,Lx=Dg.assertString,Ux=Dg.isEmptyObjectOrNull,Fx=x.internal.serverAddress.ServerAddress,Bx=x.internal.urlUtil,Wx="neo4j-javascript/"+Nx.default,R.driver=Vx,R.hasReachableServer=Hx,Dg={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},R.logging=Dg,o={Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,PathSegment:x.PathSegment,Path:x.Path,Result:x.Result,EagerResult:x.EagerResult,ResultSummary:x.ResultSummary,Record:x.Record,Point:x.Point,Date:x.Date,DateTime:x.DateTime,Duration:x.Duration,LocalDateTime:x.LocalDateTime,LocalTime:x.LocalTime,Time:x.Time,Integer:x.Integer},R.types=o,$s={READ:Mx.READ,WRITE:Mx.WRITE},R.session=$s,Zs={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},R.integer=Zs,m={isPoint:x.isPoint},R.spatial=m,_m={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},R.temporal=_m,Ky={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},R.graph=Ky,Zs={authTokenManagers:x.authTokenManagers,driver:Vx,hasReachableServer:Hx,int:x.int,isInt:x.isInt,isPoint:x.isPoint,isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime,isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship,integer:Zs,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:Dg,types:o,session:$s,routing:x.routing,error:x.error,graph:Ky,spatial:m,temporal:_m,Driver:Mx.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:nO.default,RxTransaction:n.default,RxManagedTransaction:Y.default,RxResult:j.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,GqlStatusObject:x.GqlStatusObject,ServerInfo:x.ServerInfo,Record:x.Record,Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,Path:x.Path,PathSegment:x.PathSegment,Point:x.Point,Integer:x.Integer,Duration:x.Duration,LocalTime:x.LocalTime,Time:x.Time,Date:x.Date,LocalDateTime:x.LocalDateTime,DateTime:x.DateTime,bookmarkManager:x.bookmarkManager,resultTransformers:x.resultTransformers,notificationCategory:x.notificationCategory,notificationSeverityLevel:x.notificationSeverityLevel,notificationFilterDisabledCategory:x.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:x.notificationFilterMinimumSeverityLevel,clientCertificateProviders:x.clientCertificateProviders},R.default=Zs,D(L)});
|