neo4j-driver 5.7.0 → 5.8.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 U(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D,L,F={},B={},e={},t={},n=r&&r.__extends||(D=function(e,t){return(D=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}D(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),W=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.Neo4jError=t.isRetriableError=t.newError=void 0,"ServiceUnavailable"),z=(t.SERVICE_UNAVAILABLE=W,"SessionExpired"),q=(t.SESSION_EXPIRED=z,t.PROTOCOL_ERROR="ProtocolError",L=Error,n(V,L),V.isRetriable=function(e){return null!=e&&e instanceof V&&e.retriable},V);function V(e,t,r){e=L.call(this,e,null!=r?{cause:r}:void 0)||this;return e.constructor=V,e.__proto__=V.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===W||r===z||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=q,t.newError=function(e,t,r){return new q(e,null!=t?t:"N/A",r)};n=q.isRetriable;t.isRetriableError=n;var n={},H=(Object.defineProperty(n,"__esModule",{value:!0}),n.toString=n.toNumber=n.inSafeRange=n.isInt=n.int=void 0,t),G=new Map,o=(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*Y+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(Y)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(Y)+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(Z)&&e.lessThan(Z))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,H.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);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=G.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&G.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<=-K?d.MIN_VALUE:K<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%Y|0,e/Y|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,H.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,H.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,H.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,H.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?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(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var Y=4294967296,K=Y*Y/2,Z=o.fromInt(1<<24),i=o.fromValue,i=(n.int=i,o.isInteger),i=(n.isInt=i,o.inSafeRange),i=(n.inSafeRange=i,o.toNumber),i=(n.toNumber=i,o.toString),i=(n.toString=i,n.default=o,{}),o={},u={},Q={},X={},J=(Object.defineProperty(X,"__esModule",{value:!0}),X.getBrokenObjectReason=X.isBrokenObject=X.createBrokenObject=void 0,"__isBrokenObject__"),$="__reason__";X.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===J||(t===$?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})},X.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[J]},X.getBrokenObjectReason=function(e){return e[$]},Object.defineProperty(Q,"__esModule",{value:!0}),Q.stringify=void 0;var ee=X;Q.stringify=function(e){return JSON.stringify(e,function(e,t){return(0,ee.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,ee.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):t})},Object.defineProperty(u,"__esModule",{value:!0}),u.ENCRYPTION_OFF=u.ENCRYPTION_ON=u.validateQueryAndParameters=u.assertValidDate=u.assertNumberOrInteger=u.assertNumber=u.assertString=u.assertObject=u.isString=u.isObject=u.isEmptyObjectOrNull=void 0;var a,te,re,ne,oe,ie,ue=n,ae=Q;u.ENCRYPTION_ON="ENCRYPTION_ON";function se(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function ce(e,t){if(le(e))return e;throw new TypeError((0,ae.stringify)(t)+" expected to be string but was: "+(0,ae.stringify)(e))}function le(e){return"[object String]"===Object.prototype.toString.call(e)}function fe(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,ne.int)(e),this._maxInteger=(0,ne.int)(t)}function pe(e,t,r){e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.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,ne.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 de(e,t,r){if((0,ie.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,oe.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function he(e,t){e=(0,ne.int)(e),t=(0,ne.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function be(e,t){return e=(0,ne.int)(e),t=(0,ne.int)(t),e.subtract(he(e,t).multiply(t))}function ye(e){return(e=(0,ne.int)(e)).equals(0)?"":"."+_e(e,9)}function _e(e,t,r){var n=(e=(0,ne.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}u.ENCRYPTION_OFF="ENCRYPTION_OFF",u.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!se(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},u.isObject=se,u.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(ce(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!se(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}},u.assertObject=function(e,t){if(se(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,ae.stringify)(e))},u.assertString=ce,u.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,ae.stringify)(e));return e},u.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,ue.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,ae.stringify)(e))},u.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,ae.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,ae.stringify)(e));return e},u.isString=le,a=o,te=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]}),re=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=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)&&te(t,e,r);return re(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,ne=s(n),oe=t,ie=u,fe.prototype.contains=function(e){var t;return(0,ne.isInt)(e)&&e instanceof ne.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,ne.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},fe.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},s=fe,a.YEAR_RANGE=new s(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new s(1,12),a.DAY_OF_MONTH_RANGE=new s(1,31),a.HOUR_OF_DAY_RANGE=new s(0,23),a.MINUTE_OF_HOUR_RANGE=new s(0,59),a.SECOND_OF_MINUTE_RANGE=new s(0,59),a.NANOSECOND_OF_SECOND_RANGE=new s(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,ne.int)(e).add(he(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return be(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.int)(r),n=(0,ne.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,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.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=_e(e),t=_e(t),r=function(e,t){e=(0,ne.int)(e),t=(0,ne.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=ye((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=_e(e,2),t=_e(t,2),r=_e(r,2),n=ye(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,ne.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=_e((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=_e(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:_e(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,ne.int)(e);if(e.isNegative()||e.greaterThan(9999))return _e(e,6,{usePositiveSign:!0});return _e(e,4)}(e),t=_e(t,2),r=_e(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 ne.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 de(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return de(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return de(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return de(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return de(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return de(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return de(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},a.assertValidZoneId=function(t,r){try{Intl.DateTimeFormat(void 0,{timeZone:r})}catch(e){throw(0,oe.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(r,'"'))}},a.floorDiv=he,a.floorMod=be;var ve=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]}),me=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=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)&&ve(t,e,r);return me(t,e),t},ge=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},c=(Object.defineProperty(i,"__esModule",{value:!0}),i.isDateTime=i.DateTime=i.isLocalDateTime=i.LocalDateTime=i.isDate=i.Date=i.isTime=i.Time=i.isLocalTime=i.LocalTime=i.isDuration=i.Duration=void 0,s(o)),Oe=u,we=t,Ee=s(n),s={value:!0,enumerable:!1,configurable:!1,writable:!1},Pe="__isDuration__",Se="__isLocalTime__",Te="__isTime__",je="__isDate__",Ce="__isLocalDateTime__",Ie="__isDateTime__",l=(Re.prototype.toString=function(){return c.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},Re);function Re(e,t,r,n){this.months=(0,Oe.assertNumberOrInteger)(e,"Months"),this.days=(0,Oe.assertNumberOrInteger)(t,"Days"),(0,Oe.assertNumberOrInteger)(r,"Seconds"),(0,Oe.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=c.normalizeSecondsForDuration(r,n),this.nanoseconds=c.normalizeNanosecondsForDuration(n),Object.freeze(this)}i.Duration=l,Object.defineProperty(l.prototype,Pe,s),i.isDuration=function(e){return Ue(e,Pe)};ke.fromStandardDate=function(e,t){Le(e,t);t=c.totalNanoseconds(e,t);return new ke(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Ee.default?t.toInt():"bigint"==typeof t?(0,Ee.int)(t).toInt():t)},ke.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};l=ke;function ke(e,t,r,n){this.hour=c.assertValidHour(e),this.minute=c.assertValidMinute(t),this.second=c.assertValidSecond(r),this.nanosecond=c.assertValidNanosecond(n),Object.freeze(this)}i.LocalTime=l,Object.defineProperty(l.prototype,Se,s),i.isLocalTime=function(e){return Ue(e,Se)};Ae.fromStandardDate=function(e,t){return Le(e,t),new Ae(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e))},Ae.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+c.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};l=Ae;function Ae(e,t,r,n,o){this.hour=c.assertValidHour(e),this.minute=c.assertValidMinute(t),this.second=c.assertValidSecond(r),this.nanosecond=c.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,Oe.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}i.Time=l,Object.defineProperty(l.prototype,Te,s),i.isTime=function(e){return Ue(e,Te)};Me.fromStandardDate=function(e){return Le(e),new Me(e.getFullYear(),e.getMonth()+1,e.getDate())},Me.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Me.prototype.toString=function(){return c.dateToIsoString(this.year,this.month,this.day)};l=Me;function Me(e,t,r){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),Object.freeze(this)}i.Date=l,Object.defineProperty(l.prototype,je,s),i.isDate=function(e){return Ue(e,je)};Ne.fromStandardDate=function(e,t){return Le(e,t),new Ne(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(c.totalNanoseconds(e,t)))},Ne.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Ne.prototype.toString=function(){return De(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};l=Ne;function Ne(e,t,r,n,o,i,u){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),this.hour=c.assertValidHour(n),this.minute=c.assertValidMinute(o),this.second=c.assertValidSecond(i),this.nanosecond=c.assertValidNanosecond(u),Object.freeze(this)}i.LocalDateTime=l,Object.defineProperty(l.prototype,Ce,s),i.isLocalDateTime=function(e){return Ue(e,Ce)};xe.fromStandardDate=function(e,t){return Le(e,t),new xe(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e),null)},xe.prototype.toStandardDate=function(){return c.toStandardDate(this._toUTC())},xe.prototype.toString=function(){var e;return De(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?c.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},xe.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=c.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,Ee.int)(e).multiply(1e3).add((0,Ee.int)(this.nanosecond).div(1e6)).toNumber()};l=xe;function xe(e,t,r,n,o,i,u,a,s){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),this.hour=c.assertValidHour(n),this.minute=c.assertValidMinute(o),this.second=c.assertValidSecond(i),this.nanosecond=c.assertValidNanosecond(u);e=ge(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,we.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,Oe.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Oe.assertString)(t,"Time zone ID"),c.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 Ue(e,t){return null!=e&&!0===e[t]}function De(e,t,r,n,o,i,u){return c.dateToIsoString(e,t,r)+"T"+c.timeToIsoString(n,o,i,u)}function Le(e,t){(0,Oe.assertValidDate)(e,"Standard date"),null!=t&&(0,Oe.assertNumberOrInteger)(t,"Nanosecond")}i.DateTime=l,Object.defineProperty(l.prototype,Ie,s),i.isDateTime=function(e){return Ue(e,Ie)};var l={},Fe=(Object.defineProperty(l,"__esModule",{value:!0}),l.isPathSegment=l.PathSegment=l.isPath=l.Path=l.isUnboundRelationship=l.UnboundRelationship=l.isRelationship=l.Relationship=l.isNode=l.Node=void 0,Q),s={value:!0,enumerable:!1,configurable:!1,writable:!1},Be="__isNode__",We="__isRelationship__",ze="__isUnboundRelationship__",qe="__isPath__",Ve="__isPathSegment__";function He(e,t){return null!=e&&!0===e[t]}Ge.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,Fe.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var f=Ge;function Ge(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=Je(n,function(){return e.toString()})}l.Node=f,Object.defineProperty(f.prototype,Be,s),l.isNode=function(e){return He(e,Be)};Ke.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,Fe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var Ye=Ke;function Ke(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=Je(i,function(){return e.toString()}),this.startNodeElementId=Je(u,function(){return t.toString()}),this.endNodeElementId=Je(a,function(){return r.toString()})}l.Relationship=Ye,Object.defineProperty(Ye.prototype,We,s),l.isRelationship=function(e){return He(e,We)};Ze.prototype.bind=function(e,t){return new Ye(this.identity,e,t,this.type,this.properties,this.elementId)},Ze.prototype.bindTo=function(e,t){return new Ye(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},Ze.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,Fe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};f=Ze;function Ze(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=Je(n,function(){return e.toString()})}l.UnboundRelationship=f,Object.defineProperty(f.prototype,ze,s),l.isUnboundRelationship=function(e){return He(e,ze)};function Qe(e,t,r){this.start=e,this.relationship=t,this.end=r}l.PathSegment=Qe,Object.defineProperty(Qe.prototype,Ve,s),l.isPathSegment=function(e){return He(e,Ve)};function Xe(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function Je(e,t){return null==e?t():e}l.Path=Xe,Object.defineProperty(Xe.prototype,qe,s),l.isPath=function(e){return He(e,qe)};var f={},$e=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}}}},et=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.")},tt=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},rt=(Object.defineProperty(f,"__esModule",{value:!0}),t);function nt(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)}nt.prototype.forEach=function(e){var t,r;try{for(var n=et(this.entries()),o=n.next();!o.done;o=n.next()){var i=tt(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}}},nt.prototype.map=function(e){var t,r,n=[];try{for(var o=et(this.entries()),i=o.next();!i.done;i=o.next()){var u=tt(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},nt.prototype.entries=function(){var t;return $e(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]}})},nt.prototype.values=function(){var t;return $e(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]}})},nt.prototype[Symbol.iterator]=function(){var t;return $e(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]}})},nt.prototype.toObject=function(){var t,e,r={};try{for(var n=et(this.entries()),o=n.next();!o.done;o=n.next()){var i=tt(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},nt.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,rt.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,rt.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]},nt.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},f.default=nt;var s={},ot=(Object.defineProperty(s,"__esModule",{value:!0}),s.isPoint=s.Point=void 0,u),it="__isPoint__",p=(ut.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(at(this.srid),", x=").concat(at(this.x),", y=").concat(at(this.y),"}"):"Point{srid=".concat(at(this.srid),", x=").concat(at(this.x),", y=").concat(at(this.y),", z=").concat(at(this.z),"}")},ut);function ut(e,t,r,n){this.srid=(0,ot.assertNumberOrInteger)(e,"SRID"),this.x=(0,ot.assertNumber)(t,"X coordinate"),this.y=(0,ot.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,ot.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function at(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}s.Point=p,Object.defineProperty(p.prototype,it,{value:!0,enumerable:!1,configurable:!1,writable:!1}),s.isPoint=function(e){return null!=e&&!0===e[it]};var p={},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]}),ct=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),h=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 ct(t,e),t},lt=(Object.defineProperty(p,"__esModule",{value:!0}),p.notificationCategory=p.notificationSeverityLevel=p.Stats=p.QueryStatistics=p.ProfiledPlan=p.Plan=p.Notification=p.ServerInfo=p.queryType=void 0,h(n)),h=(ft.prototype._buildNotifications=function(e){return null==e?[]:e.map(function(e){return new Ot(e)})},ft.prototype.hasPlan=function(){return this.plan instanceof pt},ft.prototype.hasProfile=function(){return this.profile instanceof dt},ft);function ft(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new bt(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new pt(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new dt(r.profile),this.notifications=this._buildNotifications(r.notifications),this.server=new Et(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 pt=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)}):[]},dt=(p.Plan=pt,ht.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},ht);function ht(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=St("dbHits",e),this.rows=St("rows",e),this.pageCacheMisses=St("pageCacheMisses",e),this.pageCacheHits=St("pageCacheHits",e),this.pageCacheHitRatio=St("pageCacheHitRatio",e),this.time=St("time",e),this.children=null!=e.children?e.children.map(function(e){return new ht(e)}):[]}p.ProfiledPlan=dt;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},yt.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)},yt.prototype.updates=function(){return this._stats},yt.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},yt.prototype.systemUpdates=function(){return this._systemUpdates};var bt=yt;function yt(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]=Pt(r[e]):"systemUpdates"===t?n._systemUpdates=Pt(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}p.QueryStatistics=bt;var _t={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},vt=(p.notificationSeverityLevel=_t,Object.freeze(_t),Object.values(_t)),mt={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",UNKNOWN:"UNKNOWN"},gt=(p.notificationCategory=mt,Object.freeze(mt),Object.values(mt)),Ot=(wt._constructPosition=function(e){return null==e?{}:{offset:Pt(e.offset),line:Pt(e.line),column:Pt(e.column)}},wt);function wt(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=wt._constructPosition(e.position),this.severityLevel=vt.includes(e.severity)?e.severity:_t.UNKNOWN,this.rawSeverityLevel=e.severity,this.category=gt.includes(e.category)?e.category:mt.UNKNOWN,this.rawCategory=e.category}p.Notification=Ot;var Et=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Pt(e){return e instanceof lt.default?e.toInt():"bigint"==typeof e?(0,lt.int)(e).toInt():e}function St(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?Pt(t[e]):r}p.ServerInfo=Et;function Tt(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,new Error("Not implemented")}p.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},p.default=h;var h={},jt=(Object.defineProperty(h,"__esModule",{value:!0}),h.notificationFilterDisabledCategory=h.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),jt=(h.notificationFilterMinimumSeverityLevel=jt,Object.freeze(jt),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC"}),jt=(h.notificationFilterDisabledCategory=jt,Object.freeze(jt),h.default=Tt,{}),b={},y={},Ct=(Object.defineProperty(y,"__esModule",{value:!0}),y.FailedObserver=y.CompletedObserver=void 0,It.prototype.subscribe=function(e){kt(e,e.onKeys,[]),kt(e,e.onCompleted,{})},It.prototype.cancel=function(){},It.prototype.pause=function(){},It.prototype.resume=function(){},It.prototype.prepareToHandleSingleResponse=function(){},It.prototype.markCompleted=function(){},It.prototype.onError=function(e){throw Error("CompletedObserver not supposed to call onError")},It);function It(){}function Rt(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function kt(e,t,r){null!=t&&t.bind(e)(r)}y.CompletedObserver=Ct,Rt.prototype.subscribe=function(e){kt(e,e.onError,this._error),this._observers.push(e)},Rt.prototype.onError=function(t){kt(this,this._beforeError,t),this._observers.forEach(function(e){return kt(e,e.onError,t)})},Rt.prototype.cancel=function(){},Rt.prototype.pause=function(){},Rt.prototype.resume=function(){},Rt.prototype.markCompleted=function(){},Rt.prototype.prepareToHandleSingleResponse=function(){},y.FailedObserver=Rt;var Ct={},At=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]}),Mt=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)&&At(t,e,r);return Mt(t,e),t},Nt=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},xt=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))},Ut=(Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.Bookmarks=void 0,_(u)),_=(Dt.empty=function(){return Lt},Dt.prototype.isEmpty=function(){return 0===this._values.length},Dt.prototype.values=function(){return this._values},Dt.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},Dt.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},Dt);function Dt(e){this._values=function(e){if(null==e||""===e)return[];if(Ut.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(!Ut.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return xt([],Nt(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var Lt=new(Ct.Bookmarks=_)(null);var Ft,_={},v=(Object.defineProperty(_,"__esModule",{value:!0}),_.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,{}),Bt=r&&r.__extends||(Ft=function(e,t){return(Ft=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}Ft(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Wt=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())})},zt=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}}}},qt=(Object.defineProperty(v,"__esModule",{value:!0}),v.EMPTY_CONNECTION_HOLDER=v.ReadOnlyConnectionHolder=v.ConnectionHolder=void 0,t),Vt=u,Ht=_,Gt=Ct,m=(Yt.prototype.mode=function(){return this._mode},Yt.prototype.database=function(){return this._database},Yt.prototype.setDatabase=function(e){this._database=e},Yt.prototype.bookmarks=function(){return this._bookmarks},Yt.prototype.connectionProvider=function(){return this._connectionProvider},Yt.prototype.referenceCount=function(){return this._referenceCount},Yt.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},Yt.prototype._createConnectionPromise=function(o){return Wt(this,void 0,void 0,function(){var t,r,n;return zt(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)])];case 2:return[2,e.sent()]}})})},Yt.prototype._getBookmarks=function(){return Wt(this,void 0,void 0,function(){return zt(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},Yt.prototype.getConnection=function(){return this._connectionPromise},Yt.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},Yt.prototype.close=function(e){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},Yt.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(Jt).then(function(){return e._release().then(function(){return null})}):e._release().then(function(){return null}):Promise.resolve(null)}).catch(Jt),this._connectionPromise},Yt);function Yt(e){var e=void 0===e?{}:e,t=e.mode,t=void 0===t?Ht.ACCESS_MODE_WRITE:t,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,e=e.getConnectionAcquistionBookmarks;this._mode=t,this._database=null!=r?(0,Vt.assertString)(r,"database"):"",this._bookmarks=null!=n?n:Gt.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._getConnectionAcquistionBookmarks=null!=e?e:function(){return Promise.resolve(Gt.Bookmarks.empty())}}v.ConnectionHolder=m;Bt(Qt,Kt=m),Qt.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},Qt.prototype.getConnection=function(){return this._connectionHolder.getConnection()},Qt.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},Qt.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var Kt,Zt,g=Qt;function Qt(e){var t=Kt.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider()})||this;return t._connectionHolder=e,t}function Xt(){return null!==Zt&&Zt.apply(this,arguments)||this}v.ReadOnlyConnectionHolder=g,v.default=g,Bt(Xt,Zt=m),Xt.prototype.mode=function(){},Xt.prototype.database=function(){},Xt.prototype.initializeConnection=function(){return!0},Xt.prototype.getConnection=function(){return Wt(this,void 0,void 0,function(){return zt(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,qt.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},Xt.prototype.releaseConnection=function(){return Wt(this,void 0,void 0,function(){return zt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},Xt.prototype.close=function(){return Wt(this,void 0,void 0,function(){return zt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};g=new Xt;function Jt(e){return null}v.EMPTY_CONNECTION_HOLDER=g;var Bt={},$t=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]}),er=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),m=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)&&$t(t,e,r);return er(t,e),t},tr=(Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.TxConfig=void 0,m(u)),rr=t,nr=n,g=(or.empty=function(){return ir},or.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},or);function or(e){var t;null!=(t=e)&&tr.assertObject(t,"Transaction config"),this.timeout=function(e){if(tr.isObject(e)&&null!=e.timeout){tr.assertNumberOrInteger(e.timeout,"Transaction timeout");e=(0,nr.int)(e.timeout);if(e.isNegative())throw(0,rr.newError)("Transaction timeout should not be negative");return e}return null}(e),this.metadata=function(e){if(tr.isObject(e)&&null!=e.metadata){e=e.metadata;if(tr.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var ir=new(Bt.TxConfig=g)({});var m={},ur=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())})},ar=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}}}},sr=(Object.defineProperty(m,"__esModule",{value:!0}),m.TransactionExecutor=void 0,t);function cr(e,t,r,n){this._maxRetryTimeMs=lr(e,3e4),this._initialRetryDelayMs=lr(t,1e3),this._multiplier=lr(r,2),this._jitterFactor=lr(n,.2),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}function lr(e,t){return null!=e?e:t}cr.prototype.execute=function(n,o,i){var u=this;return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i)})},cr.prototype.close=function(){this._inFlightTimeoutIds.forEach(function(e){return clearTimeout(e)}),this._inFlightTimeoutIds=[]},cr.prototype._retryTransactionPromise=function(o,i,e,r,u,a){var s=this;return Date.now()-r>this._maxRetryTimeMs||!(0,sr.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=s._computeDelayWithJitter(u),n=setTimeout(function(){s._inFlightTimeoutIds=s._inFlightTimeoutIds.filter(function(e){return e!==n}),s._executeTransactionInsidePromise(o,i,e,t,a).catch(t)},r);s._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*s._multiplier;return s._retryTransactionPromise(o,i,e,r,t,a)})},cr.prototype._executeTransactionInsidePromise=function(o,i,u,a,s){return ur(this,void 0,void 0,function(){var t,r,n=this;return ar(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,o()];case 1:return t=e.sent(),[3,3];case 2:return r=e.sent(),a(r),[2];case 3:return r=(null!=s?s:function(e){return e})(t),this._safeExecuteTransactionWork(r,i).then(function(e){return n._handleTransactionWorkSuccess(e,t,u,a)}).catch(function(e){return n._handleTransactionWorkFailure(e,t,a)}),[2]}})})},cr.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},cr.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},cr.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},cr.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},cr.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,sr.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,sr.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,sr.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,sr.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},m.TransactionExecutor=cr;var fr,pr,g={},O=r&&r.__extends||(fr=function(e,t){return(fr=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}fr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),dr=(Object.defineProperty(g,"__esModule",{value:!0}),g.Logger=void 0,t),hr="error",br="warn",yr="info",_r="debug",vr=((w={})[hr]=0,w[br]=1,w[yr]=2,w[_r]=3,w),w=(mr.create=function(e){return null!=(null==e?void 0:e.logging)?new mr(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=vr[e];if(null!=t||0===t)return e;throw(0,dr.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(vr).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,dr.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},mr.noOp=function(){return Or},mr.prototype.isErrorEnabled=function(){return wr(this._level,hr)},mr.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(hr,e)},mr.prototype.isWarnEnabled=function(){return wr(this._level,br)},mr.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(br,e)},mr.prototype.isInfoEnabled=function(){return wr(this._level,yr)},mr.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(yr,e)},mr.prototype.isDebugEnabled=function(){return wr(this._level,_r)},mr.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(_r,e)},mr);function mr(e,t){this._level=e,this._loggerFunction=t}function gr(){return pr.call(this,yr,function(e,t){})||this}g.Logger=w,O(gr,pr=w),gr.prototype.isErrorEnabled=function(){return!1},gr.prototype.error=function(e){},gr.prototype.isWarnEnabled=function(){return!1},gr.prototype.warn=function(e){},gr.prototype.isInfoEnabled=function(){return!1},gr.prototype.info=function(e){},gr.prototype.isDebugEnabled=function(){return!1},gr.prototype.debug=function(e){};var Or=new gr;function wr(e,t){return vr[e]>=vr[t]}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,u),Tr=7687,jr=7474,Cr=7473,Ir=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Rr(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function kr(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 Ar(e){return"http"===e?jr:"https"===e?Cr:Tr}O.Url=Ir,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(":")?kr(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)?Ar(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=Rr(e[0],"key",r),e=Rr(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 Ir(n,o,u,i,r)},O.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},O.formatIPv6Address=function(e,t){return e=kr(e),"".concat(e,":").concat(t)},O.defaultPortForScheme=Ar;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}),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)&&Mr(t,e,r);return Nr(t,e),t},xr=(Object.defineProperty(w,"__esModule",{value:!0}),w.ServerAddress=void 0,u),Ur=E(O);function Dr(e,t,r,n){this._host=(0,xr.assertString)(e,"host"),this._resolved=null!=t?(0,xr.assertString)(t,"resolved"):null,this._port=(0,xr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Dr.prototype.host=function(){return this._host},Dr.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Dr.prototype.port=function(){return this._port},Dr.prototype.resolveWith=function(e){return new Dr(this._host,e,this._port,this._hostPort)},Dr.prototype.asHostPort=function(){return this._hostPort},Dr.prototype.asKey=function(){return this._hostPort},Dr.prototype.toString=function(){return this._stringValue},Dr.fromUrl=function(e){e=Ur.parseDatabaseUrl(e);return new Dr(e.host,null,e.port,e.hostAndPort)},w.ServerAddress=Dr;var E={},Lr={};function Fr(){}Object.defineProperty(Lr,"__esModule",{value:!0}),Fr.prototype.resolve=function(){throw new Error("Abstract function")},Fr.prototype._resolveToItself=function(e){return Promise.resolve([e])},Lr.default=Fr;var P={},Br=(Object.defineProperty(P,"__esModule",{value:!0}),w);function Wr(e){return Promise.resolve([e])}function zr(e){this._resolverFunction=null!=e?e:Wr}zr.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=zr;function qr(e){console.log("Uncaught error when processing result: "+e)}function Vr(e){}function Hr(e){}var Gr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Lr=(Object.defineProperty(E,"__esModule",{value:!0}),E.ConfiguredCustomResolver=E.BaseHostNameResolver=void 0,Gr(Lr)),Lr=(E.BaseHostNameResolver=Lr.default,Gr(P)),Yr=(E.ConfiguredCustomResolver=Lr.default,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}),Gr=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)&&Yr(t,e,r);return Kr(t,e),t},Lr=(Object.defineProperty(b,"__esModule",{value:!0}),b.objectUtil=b.resolver=b.serverAddress=b.urlUtil=b.logger=b.transactionExecutor=b.txConfig=b.connectionHolder=b.constants=b.bookmarks=b.observer=b.temporalUtil=b.util=void 0,Gr(u)),Lr=(b.util=Lr,Gr(o)),o=(b.temporalUtil=Lr,Gr(y)),Lr=(b.observer=o,Gr(Ct)),o=(b.bookmarks=Lr,Gr(_)),Lr=(b.constants=o,Gr(v)),o=(b.connectionHolder=Lr,Gr(Bt)),Lr=(b.txConfig=o,Gr(m)),o=(b.transactionExecutor=Lr,Gr(g)),Lr=(b.logger=o,Gr(O)),o=(b.urlUtil=Lr,Gr(w)),O=(b.serverAddress=o,Gr(E)),Lr=(b.resolver=O,Gr(X)),Zr=(b.objectUtil=Lr,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())})}),Qr=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}}}},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xr=(Object.defineProperty(jt,"__esModule",{value:!0}),w(p)),Jr=b,$r=t,en=Jr.connectionHolder.EMPTY_CONNECTION_HOLDER;function tn(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),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:en,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}tn.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)})},tn.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)})},tn.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},tn.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,$r.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return Zr(n,void 0,void 0,function(){var t;return Qr(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,$r.newError)("InvalidState: Result stream finished without Summary",$r.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 Zr(n,void 0,void 0,function(){var t;return Qr(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 Zr(n,void 0,void 0,function(){var t;return Qr(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 Zr(n,void 0,void 0,function(){return Qr(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()]}})})}}},tn.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},tn.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},tn.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},tn.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},tn.prototype.isOpen=function(){return null===this._summary&&null===this._error},tn.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)})},tn.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:Vr,i=null!=(e=n.onError)?e:qr,r=null!=(e=n.onKeys)?e:Hr;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)}}},tn.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},tn.prototype._releaseConnectionAndGetSummary=function(t){var e=Jr.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(t){return o.releaseConnection().then(function(){var e;return null==(e=null==t?void 0:t.protocol())?void 0:e.version})},function(e){}).then(function(e){return new Xr.default(r,n,t,e)})},tn.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 Zr(this,void 0,void 0,function(){var t;return Qr(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,$r.newError)("Unexpected empty buffer",$r.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 Zr(e,void 0,void 0,function(){var t;return Qr(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 Zr(e,void 0,void 0,function(){var t,r;return Qr(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},jt.default=tn;o={};Object.defineProperty(o,"__esModule",{value:!0});o.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};E={};function rn(){}Object.defineProperty(E,"__esModule",{value:!0}),rn.prototype.acquireConnection=function(e){throw Error("Not implemented")},rn.prototype.supportsMultiDb=function(){throw Error("Not implemented")},rn.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},rn.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},rn.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},rn.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},rn.prototype.close=function(){throw Error("Not implemented")},E.default=rn;O={};function nn(){}Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(nn.prototype,"id",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"databaseId",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"server",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"address",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"version",{get:function(){},enumerable:!1,configurable:!0}),nn.prototype.isOpen=function(){return!1},nn.prototype.protocol=function(){throw Error("Not implemented")},nn.prototype.connect=function(e,t){throw Error("Not implemented")},nn.prototype.write=function(e,t,r){throw Error("Not implemented")},nn.prototype.resetAndFlush=function(){throw Error("Not implemented")},nn.prototype.hasOngoingObservableRequests=function(){throw Error("Not implemented")},nn.prototype.close=function(){throw Error("Not implemented")},nn.prototype._release=function(){return Promise.resolve()},O.default=nn;var Gr={},on=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())})},un=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}}}},X=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},an=(Object.defineProperty(Gr,"__esModule",{value:!0}),u),sn=v,cn=Ct,ln=Bt,fn=y,pn=t,dn=X(jt);function hn(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,e=e.notificationFilter,l=this;this._connectionHolder=t,this._reactive=i,this._state=bn.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=cn.Bookmarks.empty(),this._notificationFilter=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){l._acceptActive=e})}hn.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return on(t,void 0,void 0,function(){var t,r=this;return un(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.protocol().beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,beforeError:function(e){return null!=u&&u.onError(e),r._onError(e)},afterComplete:function(e){return null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,pn.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},hn.prototype.run=function(e,t){e=(0,an.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},hn.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)}})})},hn.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)}})})},hn.prototype.isOpen=function(){return this._state===bn.ACTIVE},hn.prototype.close=function(){return on(this,void 0,void 0,function(){return un(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]}})})},hn.prototype._onErrorCallback=function(){return this._state=bn.FAILED,this._onClose(),this._connectionHolder.releaseConnection()},hn.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new cn.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:cn.Bookmarks.empty(),null==e?void 0:e.db)};var bn={ACTIVE:{commit:function(e){return{result:yn(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:bn.SUCCEEDED}},rollback:function(e){return{result:yn(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:bn.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 _n(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.protocol().run(t,r,{bookmarks:cn.Bookmarks.empty(),txConfig:ln.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,pn.newError)("No connection available")}).catch(function(e){return new fn.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:_n(new fn.FailedObserver({error:(0,pn.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:bn.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:_n(new fn.CompletedObserver,"ROLLBACK",{},t,0,0),state:bn.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,_n(new fn.FailedObserver({error:(0,pn.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:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},sn.EMPTY_CONNECTION_HOLDER,0,0),state:bn.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},sn.EMPTY_CONNECTION_HOLDER,0,0),state:bn.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,_n(new fn.FailedObserver({error:(0,pn.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:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:bn.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:bn.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function yn(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.protocol().commitTransaction({beforeError:n,afterComplete:o}):t.protocol().rollbackTransaction({beforeError:n,afterComplete:o});throw(0,pn.newError)("No connection available")})}).catch(function(e){return new fn.FailedObserver({error:e,onError:n})});return new dn.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function _n(e,t,r,n,o,i){return void 0===n&&(n=sn.EMPTY_CONNECTION_HOLDER),new dn.default(Promise.resolve(e),t,r,new sn.ReadOnlyConnectionHolder(null!=n?n:sn.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}Gr.default=hn;Lr={};function vn(e){e=e.run;this._run=e}Object.defineProperty(Lr,"__esModule",{value:!0}),vn.fromTransaction=function(e){return new vn({run:e.run.bind(e)})},vn.prototype.run=function(e,t){return this._run(e,t)},Lr.default=vn;var mn,gn,On,w={},X=r&&r.__extends||(mn=function(e,t){return(mn=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}mn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),wn=r&&r.__assign||function(){return(wn=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}},S=(Object.defineProperty(w,"__esModule",{value:!0}),S(Gr)),S=(On=S.default,X(En,On),En.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},En.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},En.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},En.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},En.prototype._toTransaction=function(){return wn(wn({},this),{run:On.prototype.run.bind(this),commit:On.prototype.commit.bind(this),rollback:On.prototype.rollback.bind(this),close:On.prototype.close.bind(this),isOpen:On.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},En.prototype._begin=function(e,t){return On.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},En.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},En.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},En);function En(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,e=e.notificationFilter,t=On.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:e})||this;return t[gn]="TransactionPromise",t}gn=Symbol.toStringTag,w.default=S;var X={},Pn=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())})},Sn=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}}}},Tn=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},jn=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))},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cn=(Object.defineProperty(X,"__esModule",{value:!0}),y),In=u,Rn=_,kn=t,An=S(jt),Mn=v,Nn=m,xn=Ct,Un=Bt,Dn=S(w),Ln=S(Lr);function Fn(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,e=e.notificationFilter,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 Mn.ConnectionHolder({mode:Rn.ACCESS_MODE_READ,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks}),this._writeConnectionHolder=new Mn.ConnectionHolder({mode:Rn.ACCESS_MODE_WRITE,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:xn.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Nn.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=e}Fn.prototype.run=function(e,t,r){var o=this,e=(0,In.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Un.TxConfig(r):Un.TxConfig.empty(),t=this._run(i,u,function(n){return Pn(o,void 0,void 0,function(){var t,r=this;return Sn(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.protocol().run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,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},Fn.prototype._run=function(e,t,r){var n=this._connectionHolderWithMode(this._mode),o=this._open?!this._hasTx&&n.initializeConnection()?n.getConnection().then(function(e){return r(e)}).catch(function(e){return Promise.resolve(new Cn.FailedObserver({error:e}))}):Promise.resolve(new Cn.FailedObserver({error:(0,kn.newError)("Queries cannot be run directly on a session with an open transaction; either run from within the transaction or use a different session.")})):Promise.resolve(new Cn.FailedObserver({error:(0,kn.newError)("Cannot run query in a closed session.")})),i={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new An.default(o,e,t,n,i)},Fn.prototype._acquireConnection=function(t){var e=this,r=this._connectionHolderWithMode(this._mode),n=this._open?!this._hasTx&&r.initializeConnection()?r.getConnection().then(function(e){return t(e)}).then(function(t){return Pn(e,void 0,void 0,function(){return Sn(this,function(e){switch(e.label){case 0:return[4,r.releaseConnection()];case 1:return e.sent(),[2,t]}})})}):Promise.reject((0,kn.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,kn.newError)("Cannot run query in a closed session."));return n},Fn.prototype.beginTransaction=function(e){var t=Un.TxConfig.empty();return null!=e&&(t=new Un.TxConfig(e)),this._beginTransaction(this._mode,t)},Fn.prototype._beginTransaction=function(e,t){var n=this;if(!this._open)throw(0,kn.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,kn.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=Fn._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new Dn.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});return e._begin(function(){return n._bookmarks()},t),e},Fn.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,kn.newError)("You cannot run more transactions on a closed session.")},Fn.prototype._transactionClosed=function(){this._hasTx=!1},Fn.prototype.lastBookmark=function(){return this.lastBookmarks()},Fn.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},Fn.prototype._bookmarks=function(){var r;return Pn(this,void 0,void 0,function(){var t;return Sn(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 xn.Bookmarks(jn(jn([],Tn(t),!1),Tn(this._configuredBookmarks),!1))]}})})},Fn.prototype.readTransaction=function(e,t){t=new Un.TxConfig(t);return this._runTransaction(Rn.ACCESS_MODE_READ,t,e)},Fn.prototype.writeTransaction=function(e,t){t=new Un.TxConfig(t);return this._runTransaction(Rn.ACCESS_MODE_WRITE,t,e)},Fn.prototype._runTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(e,t)},r)},Fn.prototype.executeRead=function(e,t){t=new Un.TxConfig(t);return this._executeInTransaction(Rn.ACCESS_MODE_READ,t,e)},Fn.prototype.executeWrite=function(e,t){t=new Un.TxConfig(t);return this._executeInTransaction(Rn.ACCESS_MODE_WRITE,t,e)},Fn.prototype._executeInTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(e,t)},r,Ln.default.fromTransaction)},Fn.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},Fn.prototype._getConnectionAcquistionBookmarks=function(){var r;return Pn(this,void 0,void 0,function(){var t;return Sn(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 xn.Bookmarks(jn(jn([],Tn(this._configuredBookmarks),!1),Tn(t),!1))]}})})},Fn.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:[]),this._lastBookmarks=e,this._configuredBookmarks=xn.Bookmarks.empty())},Fn.prototype.close=function(){return Pn(this,void 0,void 0,function(){return Sn(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]}})})},Fn.prototype._connectionHolderWithMode=function(e){if(e===Rn.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===Rn.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,kn.newError)("Unknown access mode: "+e)},Fn.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new xn.Bookmarks(e.bookmark),t,e.db)},Fn.prototype._calculateWatermaks=function(){return this._fetchSize===Rn.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},Fn._validateSessionMode=function(e){e=null!=e?e:Rn.ACCESS_MODE_WRITE;if(e!==Rn.ACCESS_MODE_READ&&e!==Rn.ACCESS_MODE_WRITE)throw(0,kn.newError)("Illegal session mode "+e);return e},X.default=Fn;var y={},v={},Bn=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())})},Wn=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}}}},zn=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.")},qn=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},Vn=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))},m=(Object.defineProperty(v,"__esModule",{value:!0}),v.bookmarkManager=void 0,Hn.prototype.updateBookmarks=function(e,t){return Bn(this,void 0,void 0,function(){return Wn(this,function(e){throw new Error("Not implemented")})})},Hn.prototype.getBookmarks=function(){return Bn(this,void 0,void 0,function(){return Wn(this,function(e){throw new Error("Not implemented")})})},Hn);function Hn(){throw new Error("Not implemented")}v.default=m,v.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Gn(t,e.bookmarksSupplier,e.bookmarksConsumer)};Yn.prototype.updateBookmarks=function(f,p){return Bn(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return Wn(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=zn(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=zn(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(Vn([],qn(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Yn.prototype.getBookmarks=function(){var s;return Bn(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return Wn(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=zn(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,Vn([],qn(t),!1)]}})})};var Gn=Yn;function Yn(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Bt={},Kn=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())})},Zn=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}}}},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qn=(Object.defineProperty(Bt,"__esModule",{value:!0}),S(o)),Xn=t;function Jn(o){return Kn(this,void 0,void 0,function(){var t,r,n;return Zn(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 Qn.default(n,r,t)]}})})}function $n(){}$n.prototype.eagerResultTransformer=function(){return Jn},$n.prototype.mappedResultTransformer=function(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,Xn.newError)("Requires a map or/and a collect functions.");return function(o){return Kn(e,void 0,void 0,function(){return Zn(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()]}})})}};var m=new $n,S=(Object.freeze(m),Bt.default=m,{}),eo=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())})},to=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 ro(e){this._createSession=e}Object.defineProperty(S,"__esModule",{value:!0}),ro.prototype.execute=function(o,i,u){return eo(this,void 0,void 0,function(){var t,n=this;return to(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser}),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READERS"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return eo(n,void 0,void 0,function(){var t;return to(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})})];case 2:return[2,e.sent()];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},S.default=ro;function no(){this.routing=wo.WRITERS,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0}var oo=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())})},io=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}}}},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},uo=(Object.defineProperty(y,"__esModule",{value:!0}),y.QueryConfig=y.SessionConfig=y.routing=y.WRITE=y.READ=y.Driver=void 0,Ct),ao=m(P),so=_,co=g,lo=m(X),fo=u,po=v,ho=m(Bt),bo=m(S),yo=t,_o=36e5,vo=1e3,mo=so.ACCESS_MODE_READ,go=(y.READ=mo,so.ACCESS_MODE_WRITE),Oo=(y.WRITE=go,0),wo=(y.SessionConfig=function(){this.defaultAccessMode=go,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0},{WRITERS:"WRITERS",READERS:"READERS"}),Ct=(y.routing=wo,Object.freeze(wo),y.QueryConfig=no,Object.defineProperty(Eo.prototype,"defaultExecuteQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Eo.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),oo(this,void 0,void 0,function(){var t,r,n;return io(this,function(e){switch(e.label){case 0:if(t=null===u.bookmarkManager?void 0:null!=(a=u.bookmarkManager)?a:this.defaultExecuteQueryBookmarkManager,r=null!=(a=u.resultTransformer)?a:ho.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:wo.WRITERS)!==wo.READERS&&n!==wo.WRITERS)throw(0,yo.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser},o,i)];case 1:return[2,e.sent()]}})})},Eo.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:mo})},Eo.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:mo})},Eo.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Eo.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Eo.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Eo.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Eo.prototype.isEncrypted=function(){return this._isEncrypted()},Eo.prototype._supportsRouting=function(){return this._meta.routing},Eo.prototype._isEncrypted=function(){return this._config.encrypted===fo.ENCRYPTION_ON||!0===this._config.encrypted},Eo.prototype._getTrust=function(){return this._config.trust},Eo.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,e=e.notificationFilter;return this._newSession({defaultAccessMode:void 0===t?go:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:So(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:e})},Eo.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Eo.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Eo.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,e=e.notificationFilter,t=lo.default._validateSessionMode(t),s=this._getOrCreateConnectionProvider(),r=null!=r?new uo.Bookmarks(r):uo.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:s,bookmarks:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:e})},Eo.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new ao.default(e.resolver)))),this._connectionProvider},Eo);function Eo(e,t,r,n,o){void 0===n&&(n=function(e){return new lo.default(e)}),void 0===o&&(o=function(e){return new bo.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Po(i.maxConnectionLifetime,_o),i.maxConnectionPoolSize=Po(i.maxConnectionPoolSize,so.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Po(i.connectionAcquisitionTimeout,so.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=So(i.fetchSize,vo),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?so.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i);var i=co.Logger.create(t),u=t,a=i,s=u.resolver;if(null!=s&&"function"!=typeof s)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof s));u.connectionAcquisitionTimeout<u.connectionTimeout&&a.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'),this._id=Oo++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,po.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function Po(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function So(e,t){e=parseInt(e,10);if(0<e||e===so.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(so.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}y.Driver=Ct,y.default=Ct;P={};function To(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(P,"__esModule",{value:!0}),P.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}},custom:function(e,t,r,n,o){n={scheme:n,principal:e};return To(t)&&(n.credentials=t),To(r)&&(n.realm=r),To(o)&&(n.parameters=o),n}};var jo,Co,Io,Ro,ko,Ao,Mo,No,xo,Uo,Do,_={},Gr=(Object.defineProperty(_,"__esModule",{value:!0}),g=e,jo=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]}),Co=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=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)&&jo(t,e,r);return Co(t,e),t},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(g,"__esModule",{value:!0}),g.ManagedTransaction=g.Transaction=g.Connection=g.ConnectionProvider=g.EagerResult=g.Result=g.Stats=g.QueryStatistics=g.ProfiledPlan=g.Plan=g.Notification=g.ServerInfo=g.queryType=g.ResultSummary=g.Record=g.isPathSegment=g.PathSegment=g.isPath=g.Path=g.isUnboundRelationship=g.UnboundRelationship=g.isRelationship=g.Relationship=g.isNode=g.Node=g.Time=g.LocalTime=g.LocalDateTime=g.isTime=g.isLocalTime=g.isLocalDateTime=g.isDuration=g.isDateTime=g.isDate=g.Duration=g.DateTime=g.Date=g.Point=g.isPoint=g.internal=g.toString=g.toNumber=g.inSafeRange=g.isInt=g.int=g.Integer=g.error=g.isRetriableError=g.Neo4jError=g.newError=void 0,g.notificationFilterMinimumSeverityLevel=g.notificationFilterDisabledCategory=g.notificationSeverityLevel=g.notificationCategory=g.resultTransformers=g.routing=g.bookmarkManager=g.auth=g.json=g.driver=g.types=g.Driver=g.Session=g.TransactionPromise=void 0,Io=t,Object.defineProperty(g,"newError",{enumerable:!0,get:function(){return Io.newError}}),Object.defineProperty(g,"Neo4jError",{enumerable:!0,get:function(){return Io.Neo4jError}}),Object.defineProperty(g,"isRetriableError",{enumerable:!0,get:function(){return Io.isRetriableError}}),Ro=u(n),g.Integer=Ro.default,Object.defineProperty(g,"int",{enumerable:!0,get:function(){return Ro.int}}),Object.defineProperty(g,"isInt",{enumerable:!0,get:function(){return Ro.isInt}}),Object.defineProperty(g,"inSafeRange",{enumerable:!0,get:function(){return Ro.inSafeRange}}),Object.defineProperty(g,"toNumber",{enumerable:!0,get:function(){return Ro.toNumber}}),Object.defineProperty(g,"toString",{enumerable:!0,get:function(){return Ro.toString}}),ko=i,Object.defineProperty(g,"Date",{enumerable:!0,get:function(){return ko.Date}}),Object.defineProperty(g,"DateTime",{enumerable:!0,get:function(){return ko.DateTime}}),Object.defineProperty(g,"Duration",{enumerable:!0,get:function(){return ko.Duration}}),Object.defineProperty(g,"isDate",{enumerable:!0,get:function(){return ko.isDate}}),Object.defineProperty(g,"isDateTime",{enumerable:!0,get:function(){return ko.isDateTime}}),Object.defineProperty(g,"isDuration",{enumerable:!0,get:function(){return ko.isDuration}}),Object.defineProperty(g,"isLocalDateTime",{enumerable:!0,get:function(){return ko.isLocalDateTime}}),Object.defineProperty(g,"isLocalTime",{enumerable:!0,get:function(){return ko.isLocalTime}}),Object.defineProperty(g,"isTime",{enumerable:!0,get:function(){return ko.isTime}}),Object.defineProperty(g,"LocalDateTime",{enumerable:!0,get:function(){return ko.LocalDateTime}}),Object.defineProperty(g,"LocalTime",{enumerable:!0,get:function(){return ko.LocalTime}}),Object.defineProperty(g,"Time",{enumerable:!0,get:function(){return ko.Time}}),Ao=l,Object.defineProperty(g,"Node",{enumerable:!0,get:function(){return Ao.Node}}),Object.defineProperty(g,"isNode",{enumerable:!0,get:function(){return Ao.isNode}}),Object.defineProperty(g,"Relationship",{enumerable:!0,get:function(){return Ao.Relationship}}),Object.defineProperty(g,"isRelationship",{enumerable:!0,get:function(){return Ao.isRelationship}}),Object.defineProperty(g,"UnboundRelationship",{enumerable:!0,get:function(){return Ao.UnboundRelationship}}),Object.defineProperty(g,"isUnboundRelationship",{enumerable:!0,get:function(){return Ao.isUnboundRelationship}}),Object.defineProperty(g,"Path",{enumerable:!0,get:function(){return Ao.Path}}),Object.defineProperty(g,"isPath",{enumerable:!0,get:function(){return Ao.isPath}}),Object.defineProperty(g,"PathSegment",{enumerable:!0,get:function(){return Ao.PathSegment}}),Object.defineProperty(g,"isPathSegment",{enumerable:!0,get:function(){return Ao.isPathSegment}}),S=m(f),g.Record=S.default,Mo=s,Object.defineProperty(g,"isPoint",{enumerable:!0,get:function(){return Mo.isPoint}}),Object.defineProperty(g,"Point",{enumerable:!0,get:function(){return Mo.Point}}),No=u(p),g.ResultSummary=No.default,Object.defineProperty(g,"queryType",{enumerable:!0,get:function(){return No.queryType}}),Object.defineProperty(g,"ServerInfo",{enumerable:!0,get:function(){return No.ServerInfo}}),Object.defineProperty(g,"Notification",{enumerable:!0,get:function(){return No.Notification}}),Object.defineProperty(g,"Plan",{enumerable:!0,get:function(){return No.Plan}}),Object.defineProperty(g,"ProfiledPlan",{enumerable:!0,get:function(){return No.ProfiledPlan}}),Object.defineProperty(g,"QueryStatistics",{enumerable:!0,get:function(){return No.QueryStatistics}}),Object.defineProperty(g,"Stats",{enumerable:!0,get:function(){return No.Stats}}),Object.defineProperty(g,"notificationCategory",{enumerable:!0,get:function(){return No.notificationCategory}}),Object.defineProperty(g,"notificationSeverityLevel",{enumerable:!0,get:function(){return No.notificationSeverityLevel}}),xo=h,Object.defineProperty(g,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return xo.notificationFilterDisabledCategory}}),Object.defineProperty(g,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return xo.notificationFilterMinimumSeverityLevel}}),Ct=m(jt),g.Result=Ct.default,t=m(o),g.EagerResult=t.default,n=m(E),g.ConnectionProvider=n.default,n=m(O),g.Connection=n.default,i=m(Gr),g.Transaction=i.default,l=m(Lr),g.ManagedTransaction=l.default,f=m(w),g.TransactionPromise=f.default,s=m(X),g.Session=s.default,p=u(y),h=p,g.Driver=p.default,g.driver=h,jt=m(P),g.auth=jt.default,Uo=v,Object.defineProperty(g,"bookmarkManager",{enumerable:!0,get:function(){return Uo.bookmarkManager}}),Do=y,Object.defineProperty(g,"routing",{enumerable:!0,get:function(){return Do.routing}}),o=u(_),g.types=o,E=u(Q),g.json=E,m=m(Bt),g.resultTransformers=m.default,u=u(b),g.internal=u,O={SERVICE_UNAVAILABLE:Io.SERVICE_UNAVAILABLE,SESSION_EXPIRED:Io.SESSION_EXPIRED,PROTOCOL_ERROR:Io.PROTOCOL_ERROR},g.error=O,O={newError:Io.newError,Neo4jError:Io.Neo4jError,isRetriableError:Io.isRetriableError,error:O,Integer:Ro.default,int:Ro.int,isInt:Ro.isInt,inSafeRange:Ro.inSafeRange,toNumber:Ro.toNumber,toString:Ro.toString,internal:u,isPoint:Mo.isPoint,Point:Mo.Point,Date:ko.Date,DateTime:ko.DateTime,Duration:ko.Duration,isDate:ko.isDate,isDateTime:ko.isDateTime,isDuration:ko.isDuration,isLocalDateTime:ko.isLocalDateTime,isLocalTime:ko.isLocalTime,isTime:ko.isTime,LocalDateTime:ko.LocalDateTime,LocalTime:ko.LocalTime,Time:ko.Time,Node:Ao.Node,isNode:Ao.isNode,Relationship:Ao.Relationship,isRelationship:Ao.isRelationship,UnboundRelationship:Ao.UnboundRelationship,isUnboundRelationship:Ao.isUnboundRelationship,Path:Ao.Path,isPath:Ao.isPath,PathSegment:Ao.PathSegment,isPathSegment:Ao.isPathSegment,Record:S.default,ResultSummary:No.default,queryType:No.queryType,ServerInfo:No.ServerInfo,Notification:No.Notification,Plan:No.Plan,ProfiledPlan:No.ProfiledPlan,QueryStatistics:No.QueryStatistics,Stats:No.Stats,Result:Ct.default,EagerResult:t.default,Transaction:i.default,ManagedTransaction:l.default,TransactionPromise:f.default,Session:s.default,Driver:p.default,Connection:n.default,types:o,driver:h,json:E,auth:jt.default,bookmarkManager:Uo.bookmarkManager,routing:Do.routing,resultTransformers:m.default,notificationCategory:No.notificationCategory,notificationSeverityLevel:No.notificationSeverityLevel,notificationFilterDisabledCategory:xo.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:xo.notificationFilterMinimumSeverityLevel},g.default=O,{}),Lr={},w={},X={},P={};Object.defineProperty(P,"__esModule",{value:!0}),P.isFunction=void 0,P.isFunction=function(e){return"function"==typeof e};v={},y={},_={};Object.defineProperty(_,"__esModule",{value:!0}),_.createErrorClass=void 0,_.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(y,"__esModule",{value:!0}),y.UnsubscriptionError=void 0;Q=_,y.UnsubscriptionError=Q.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}}),Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.arrRemove=void 0,Bt.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var Lo=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.")},Fo=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},Wo=(Object.defineProperty(v,"__esModule",{value:!0}),v.isSubscription=v.EMPTY_SUBSCRIPTION=v.Subscription=void 0,P),zo=y,qo=Bt,Vo=(Ho.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=Lo(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(Wo.isFunction(u))try{u()}catch(e){r=e instanceof zo.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=Lo(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{Go(l)}catch(e){r=null!=r?r:[],e instanceof zo.UnsubscriptionError?r=Bo(Bo([],Fo(r)),Fo(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 zo.UnsubscriptionError(r)}},Ho.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Go(e);else{if(e instanceof Ho){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Ho.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Ho.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Ho.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&qo.arrRemove(t,e)},Ho.prototype.remove=function(e){var t=this._finalizers;t&&qo.arrRemove(t,e),e instanceof Ho&&e._removeParent(this)},Ho.EMPTY=((b=new Ho).closed=!0,b),Ho);function Ho(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function Go(e){Wo.isFunction(e)?e():e.unsubscribe()}v.Subscription=Vo,v.EMPTY_SUBSCRIPTION=Vo.EMPTY,v.isSubscription=function(e){return e instanceof Vo||e&&"closed"in e&&Wo.isFunction(e.remove)&&Wo.isFunction(e.add)&&Wo.isFunction(e.unsubscribe)};var Yo,Ko,Zo,u={},S=(Object.defineProperty(u,"__esModule",{value:!0}),u.config=void 0,u.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),Ct={},Qo=(Yo=Ct,Ko=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},Zo=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(Yo,"__esModule",{value:!0}),Yo.timeoutProvider=void 0,Yo.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Yo.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,Zo([e,t],Ko(r))):setTimeout.apply(void 0,Zo([e,t],Ko(r)))},clearTimeout:function(e){var t=Yo.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(S,"__esModule",{value:!0}),S.reportUnhandledError=void 0,u),Xo=Ct;S.reportUnhandledError=function(t){Xo.timeoutProvider.setTimeout(function(){var e=Qo.config.onUnhandledError;if(!e)throw t;e(t)})};t={};Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){};i={};function Jo(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(i,"__esModule",{value:!0}),i.createNotification=i.nextNotification=i.errorNotification=i.COMPLETE_NOTIFICATION=void 0,i.COMPLETE_NOTIFICATION=Jo("C",void 0,void 0),i.errorNotification=function(e){return Jo("E",void 0,e)},i.nextNotification=function(e){return Jo("N",e,void 0)},i.createNotification=Jo;var $o,ei,ti,ri,ni,oi,ii,ui,ai,si,ci,li,fi,pi,l={},di=(Object.defineProperty(l,"__esModule",{value:!0}),l.captureError=l.errorContext=void 0,u),hi=null;function bi(e){var t=ti.call(this)||this;return t.isStopped=!1,e?(t.destination=e,ni.isSubscription(e)&&e.add(t)):t.destination=$o.EMPTY_OBSERVER,t}function yi(e,t){return ci.call(e,t)}function _i(e){this.partialObserver=e}function vi(e,t,r){var n=fi.call(this)||this;return r=ri.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&oi.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&yi(e.next,t),error:e.error&&yi(e.error,t),complete:e.complete&&yi(e.complete,t)}):e,n.destination=new li(r),n}function mi(e){oi.config.useDeprecatedSynchronousErrorHandling?si.captureError(e):ii.reportUnhandledError(e)}function gi(e,t){var r=oi.config.onStoppedNotification;r&&ai.timeoutProvider.setTimeout(function(){return r(e,t)})}l.errorContext=function(e){if(di.config.useDeprecatedSynchronousErrorHandling){var t=!hi;if(t&&(hi={errorThrown:!1,error:null}),e(),t){var t=hi,r=t.errorThrown,t=t.error;if(hi=null,r)throw t}}else e()},l.captureError=function(e){di.config.useDeprecatedSynchronousErrorHandling&&hi&&(hi.errorThrown=!0,hi.error=e)},$o=X,f=r&&r.__extends||(ei=function(e,t){return(ei=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}ei(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty($o,"__esModule",{value:!0}),$o.EMPTY_OBSERVER=$o.SafeSubscriber=$o.Subscriber=void 0,ri=P,oi=u,ii=S,s=t,ui=i,ai=Ct,si=l,ti=(ni=v).Subscription,f(bi,ti),bi.create=function(e,t,r){return new pi(e,t,r)},bi.prototype.next=function(e){this.isStopped?gi(ui.nextNotification(e),this):this._next(e)},bi.prototype.error=function(e){this.isStopped?gi(ui.errorNotification(e),this):(this.isStopped=!0,this._error(e))},bi.prototype.complete=function(){this.isStopped?gi(ui.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},bi.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,ti.prototype.unsubscribe.call(this),this.destination=null)},bi.prototype._next=function(e){this.destination.next(e)},bi.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},bi.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},p=bi,$o.Subscriber=p,ci=Function.prototype.bind,_i.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){mi(e)}},_i.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){mi(e)}else mi(e)},_i.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){mi(e)}},li=_i,f(vi,fi=p),pi=vi,$o.SafeSubscriber=pi,$o.EMPTY_OBSERVER={closed:!0,next:s.noop,error:function(e){throw e},complete:s.noop};n={},Object.defineProperty(n,"__esModule",{value:!0}),n.observable=void 0,n.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",o={},h={};Object.defineProperty(h,"__esModule",{value:!0}),h.identity=void 0,h.identity=function(e){return e},Object.defineProperty(o,"__esModule",{value:!0}),o.pipeFromArray=o.pipe=void 0;var Oi=h;function wi(t){return 0===t.length?Oi.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}o.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wi(e)},o.pipeFromArray=wi,Object.defineProperty(w,"__esModule",{value:!0}),w.Observable=void 0;var Ei=X,Pi=v,E=n,Si=o,Ti=u,ji=P,Ci=l;function Ii(e){e&&(this._subscribe=e)}function Ri(e){return null!=(e=null!=e?e:Ti.config.Promise)?e:Promise}Ii.prototype.lift=function(e){var t=new Ii;return t.source=this,t.operator=e,t},Ii.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof Ei.Subscriber||function(e){return e&&ji.isFunction(e.next)&&ji.isFunction(e.error)&&ji.isFunction(e.complete)}(n)&&Pi.isSubscription(n)?e:new Ei.SafeSubscriber(e,t,r);return Ci.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},Ii.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},Ii.prototype.forEach=function(n,e){var o=this;return new(e=Ri(e))(function(e,t){var r=new Ei.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},Ii.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},Ii.prototype[E.observable]=function(){return this},Ii.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Si.pipeFromArray(e)(this)},Ii.prototype.toPromise=function(e){var n=this;return new(e=Ri(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},Ii.create=function(e){return new Ii(e)},w.Observable=Ii;var jt={},m={},g={},ki=(Object.defineProperty(g,"__esModule",{value:!0}),g.operate=g.hasLift=void 0,P);function Ai(e){return ki.isFunction(null==e?void 0:e.lift)}g.hasLift=Ai,g.operate=function(t){return function(e){if(Ai(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 Mi,O={},Q=r&&r.__extends||(Mi=function(e,t){return(Mi=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}Mi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),b=(Object.defineProperty(O,"__esModule",{value:!0}),O.OperatorSubscriber=O.createOperatorSubscriber=void 0,X);O.createOperatorSubscriber=function(e,t,r,n,o){return new xi(e,t,r,n,o)};Q(Ui,Ni=b.Subscriber),Ui.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,Ni.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var Ni,xi=Ui;function Ui(t,r,e,n,o,i){var u=Ni.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:Ni.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:Ni.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:Ni.prototype._complete,u}O.OperatorSubscriber=xi,Object.defineProperty(m,"__esModule",{value:!0}),m.refCount=void 0;var Di=g,Li=O;m.refCount=function(){return Di.operate(function(r,n){var o=null,e=(r._refCount++,Li.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 Fi,i=r&&r.__extends||(Fi=function(e,t){return(Fi=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}Fi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(jt,"__esModule",{value:!0}),jt.ConnectableObservable=void 0;var Bi,Wi=v,zi=m,qi=O,Vi=g,Ct=(Bi=w.Observable,i(Hi,Bi),Hi.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Hi.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Hi.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Hi.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new Wi.Subscription,t=this.getSubject(),e.add(this.source.subscribe(qi.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=Wi.Subscription.EMPTY)),e},Hi.prototype.refCount=function(){return zi.refCount()(this)},Hi);function Hi(e,t){var r=Bi.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,Vi.hasLift(e)&&(r.lift=e.lift),r}jt.ConnectableObservable=Ct;var Gi,Yi,Ki,Zi,Qi,f={},p={},s=(Gi=p,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.performanceTimestampProvider=void 0,Gi.performanceTimestampProvider={now:function(){return(Gi.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),Xi=(Yi=s,Ki=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},Zi=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(Yi,"__esModule",{value:!0}),Yi.animationFrameProvider=void 0,Qi=v,Yi.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=Yi.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new Qi.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=Yi.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Zi([],Ki(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Yi.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,Zi([],Ki(e)))},delegate:void 0},Object.defineProperty(f,"__esModule",{value:!0}),f.animationFrames=void 0,w),Ji=p,$i=s;function eu(a){return new Xi.Observable(function(r){var n=a||Ji.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=$i.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&$i.animationFrameProvider.cancelAnimationFrame(i)}})}f.animationFrames=function(e){return e?eu(e):nu};var tu,ru,nu=eu(),E={},Q={},b=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.ObjectUnsubscribedError=void 0,_),i=(Q.ObjectUnsubscribedError=b.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(tu=function(e,t){return(tu=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}tu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),ou=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.")},iu=(Object.defineProperty(E,"__esModule",{value:!0}),E.AnonymousSubject=E.Subject=void 0,w),uu=v,au=Q,su=Bt,cu=l,Ct=(ru=iu.Observable,i(lu,ru),lu.prototype.lift=function(e){var t=new pu(this,this);return t.operator=e,t},lu.prototype._throwIfClosed=function(){if(this.closed)throw new au.ObjectUnsubscribedError},lu.prototype.next=function(o){var i=this;cu.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=ou(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}}}})},lu.prototype.error=function(t){var r=this;cu.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)}})},lu.prototype.complete=function(){var t=this;cu.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},lu.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(lu.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),lu.prototype._trySubscribe=function(e){return this._throwIfClosed(),ru.prototype._trySubscribe.call(this,e)},lu.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},lu.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?uu.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new uu.Subscription(function(){t.currentObservers=null,su.arrRemove(o,e)}))},lu.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},lu.prototype.asObservable=function(){var e=new iu.Observable;return e.source=this,e},lu.create=function(e,t){return new pu(e,t)},lu);function lu(){var e=ru.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}E.Subject=Ct;i(du,fu=Ct),du.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},du.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},du.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},du.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:uu.EMPTY_SUBSCRIPTION};var fu,pu=du;function du(e,t){var r=fu.call(this)||this;return r.destination=e,r.source=t,r}E.AnonymousSubject=pu;var hu,p={},b=r&&r.__extends||(hu=function(e,t){return(hu=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}hu(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;bu=E.Subject,b(yu,bu),Object.defineProperty(yu.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),yu.prototype._subscribe=function(e){var t=bu.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},yu.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},yu.prototype.next=function(e){bu.prototype.next.call(this,this._value=e)};var bu,l=yu;function yu(e){var t=bu.call(this)||this;return t._value=e,t}p.BehaviorSubject=l;var _u,vu,i={},Ct={},b=(_u=Ct,Object.defineProperty(_u,"__esModule",{value:!0}),_u.dateTimestampProvider=void 0,_u.dateTimestampProvider={now:function(){return(_u.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(vu=function(e,t){return(vu=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}vu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(i,"__esModule",{value:!0}),i.ReplaySubject=void 0;var mu,gu=Ct,l=(mu=E.Subject,b(Ou,mu),Ou.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(),mu.prototype.next.call(this,e)},Ou.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},Ou.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)}},Ou);function Ou(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=gu.dateTimestampProvider);var n=mu.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}i.ReplaySubject=l;var wu,b={},l=r&&r.__extends||(wu=function(e,t){return(wu=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}wu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(b,"__esModule",{value:!0}),b.AsyncSubject=void 0;Eu=E.Subject,l(Pu,Eu),Pu.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())},Pu.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},Pu.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&Eu.prototype.next.call(this,t),Eu.prototype.complete.call(this))};var Eu,l=Pu;function Pu(){var e=null!==Eu&&Eu.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}b.AsyncSubject=l;var Su,l={},T={},Tu={},ju={},Cu=r&&r.__extends||(Su=function(e,t){return(Su=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}Su(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ju,"__esModule",{value:!0}),ju.Action=void 0;Iu=v.Subscription,Cu(Ru,Iu),Ru.prototype.schedule=function(e,t){return this};var Iu,Cu=Ru;function Ru(e,t){return Iu.call(this)||this}ju.Action=Cu;var ku,Au,Mu,Nu,Cu={},xu=(ku=Cu,Au=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},Mu=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(ku,"__esModule",{value:!0}),ku.intervalProvider=void 0,ku.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=ku.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,Mu([e,t],Au(r))):setInterval.apply(void 0,Mu([e,t],Au(r)))},clearInterval:function(e){var t=ku.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(Nu=function(e,t){return(Nu=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}Nu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.AsyncAction=void 0;var Uu,Du=Cu,Lu=Bt,Cu=(Uu=ju.Action,xu(Fu,Uu),Fu.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},Fu.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Du.intervalProvider.setInterval(e.flush.bind(e,this),r)},Fu.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&Du.intervalProvider.clearInterval(t)},Fu.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))},Fu.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},Fu.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,Lu.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,Uu.prototype.unsubscribe.call(this))},Fu);function Fu(e,t){var r=Uu.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}Tu.AsyncAction=Cu;var Bu,Wu,zu,qu,Vu,Hu,ju={},xu={},Gu=(Object.defineProperty(xu,"__esModule",{value:!0}),xu.TestTools=xu.Immediate=void 0,1),Yu={};function Ku(e){return e in Yu&&(delete Yu[e],!0)}xu.Immediate={setImmediate:function(e){var t=Gu++;return Yu[t]=!0,(Bu=Bu||Promise.resolve()).then(function(){return Ku(t)&&e()}),t},clearImmediate:function(e){Ku(e)}},xu.TestTools={pending:function(){return Object.keys(Yu).length}},Wu=ju,zu=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},qu=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(Wu,"__esModule",{value:!0}),Wu.immediateProvider=void 0,Vu=xu.Immediate.setImmediate,Hu=xu.Immediate.clearImmediate,Wu.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Wu.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||Vu).apply(void 0,qu([],zu(e)))},clearImmediate:function(e){var t=Wu.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||Hu)(e)},delegate:void 0};var Zu,Cu=r&&r.__extends||(Zu=function(e,t){return(Zu=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}Zu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(T,"__esModule",{value:!0}),T.AsapAction=void 0;var Qu,Xu=ju,xu=(Qu=Tu.AsyncAction,Cu(Ju,Qu),Ju.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Qu.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Xu.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},Ju.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Qu.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Xu.immediateProvider.clearImmediate(t),e._scheduled=void 0)},Ju);function Ju(e,t){var r=Qu.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.AsapAction=xu;var ju={},Cu={},xu={},$u=(Object.defineProperty(xu,"__esModule",{value:!0}),xu.Scheduler=void 0,Ct);function ea(e,t){void 0===t&&(t=ea.now),this.schedulerActionCtor=e,this.now=t}ea.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},ea.now=$u.dateTimestampProvider.now,xu.Scheduler=ea;var ta,ra,$u=r&&r.__extends||(ta=function(e,t){return(ta=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}ta(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),na=(Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.AsyncScheduler=void 0,xu),$u=(ra=na.Scheduler,$u(oa,ra),oa.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}}},oa);function oa(e,t){void 0===t&&(t=na.Scheduler.now);e=ra.call(this,e,t)||this;return e.actions=[],e._active=!1,e}Cu.AsyncScheduler=$u;var ia,$u=r&&r.__extends||(ia=function(e,t){return(ia=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}ia(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ju,"__esModule",{value:!0}),ju.AsapScheduler=void 0;ua=Cu.AsyncScheduler,$u(aa,ua),aa.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 ua,$u=aa;function aa(){return null!==ua&&ua.apply(this,arguments)||this}ju.AsapScheduler=$u,$u=l,Object.defineProperty($u,"__esModule",{value:!0}),$u.asap=$u.asapScheduler=void 0,$u.asapScheduler=new ju.AsapScheduler(T.AsapAction),$u.asap=$u.asapScheduler;var sa,ju={},$u=(T=ju,Object.defineProperty(T,"__esModule",{value:!0}),T.async=T.asyncScheduler=void 0,T.asyncScheduler=new Cu.AsyncScheduler(Tu.AsyncAction),T.async=T.asyncScheduler,{}),T={},ca=r&&r.__extends||(sa=function(e,t){return(sa=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}sa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(T,"__esModule",{value:!0}),T.QueueAction=void 0;la=Tu.AsyncAction,ca(fa,la),fa.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?la.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},fa.prototype.execute=function(e,t){return 0<t||this.closed?la.prototype.execute.call(this,e,t):this._execute(e,t)},fa.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?la.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var la,ca=fa;function fa(e,t){var r=la.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.QueueAction=ca;var pa,ca={},da=r&&r.__extends||(pa=function(e,t){return(pa=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}pa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ca,"__esModule",{value:!0}),ca.QueueScheduler=void 0;ha=Cu.AsyncScheduler,da(ba,ha);var ha,da=ba;function ba(){return null!==ha&&ha.apply(this,arguments)||this}ca.QueueScheduler=da,da=$u,Object.defineProperty(da,"__esModule",{value:!0}),da.queue=da.queueScheduler=void 0,da.queueScheduler=new ca.QueueScheduler(T.QueueAction),da.queue=da.queueScheduler;var ya,ca={},T={},da=r&&r.__extends||(ya=function(e,t){return(ya=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}ya(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(T,"__esModule",{value:!0}),T.AnimationFrameAction=void 0;var _a,va=s,s=(_a=Tu.AsyncAction,da(ma,_a),ma.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?_a.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=va.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},ma.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return _a.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(va.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},ma);function ma(e,t){var r=_a.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.AnimationFrameAction=s;var ga,da={},s=r&&r.__extends||(ga=function(e,t){return(ga=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}ga(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(da,"__esModule",{value:!0}),da.AnimationFrameScheduler=void 0;Oa=Cu.AsyncScheduler,s(wa,Oa),wa.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 Oa,s=wa;function wa(){return null!==Oa&&Oa.apply(this,arguments)||this}da.AnimationFrameScheduler=s,s=ca,Object.defineProperty(s,"__esModule",{value:!0}),s.animationFrame=s.animationFrameScheduler=void 0,s.animationFrameScheduler=new da.AnimationFrameScheduler(T.AnimationFrameAction),s.animationFrame=s.animationFrameScheduler;var Ea,Pa,da={},T=r&&r.__extends||(Ea=function(e,t){return(Ea=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}Ea(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(da,"__esModule",{value:!0}),da.VirtualAction=da.VirtualTimeScheduler=void 0,Tu),Sa=v,Tu=(Pa=Cu.AsyncScheduler,T(Ta,Pa),Ta.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}},Ta.frameTimeFactor=10,Ta);function Ta(e,t){void 0===t&&(t=1/0);var r=Pa.call(this,e=void 0===e?Ca:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}da.VirtualTimeScheduler=Tu;ja=s.AsyncAction,T(Ia,ja),Ia.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return ja.prototype.schedule.call(this,e,t);this.active=!1;var r=new Ia(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return Sa.Subscription.EMPTY},Ia.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(Ia.sortActions),1},Ia.prototype.recycleAsyncId=function(e,t,r){},Ia.prototype._execute=function(e,t){if(!0===this.active)return ja.prototype._execute.call(this,e,t)},Ia.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 ja,Ca=Ia;function Ia(e,t,r){void 0===r&&(r=e.index+=1);var n=ja.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}da.VirtualAction=Ca;var Ra,ka,Cu={},Tu={},s=(Ra=Tu,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.empty=Ra.EMPTY=void 0,ka=w,Ra.EMPTY=new ka.Observable(function(e){return e.complete()}),Ra.empty=function(e){return e?(t=e,new ka.Observable(function(e){return t.schedule(function(){return e.complete()})})):Ra.EMPTY;var t},{}),T={},Aa={},Ma=(Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.isScheduler=void 0,P);Aa.isScheduler=function(e){return e&&Ma.isFunction(e.schedule)},Object.defineProperty(T,"__esModule",{value:!0}),T.popNumber=T.popScheduler=T.popResultSelector=void 0;var Na=P,xa=Aa;function Ua(e){return e[e.length-1]}T.popResultSelector=function(e){return Na.isFunction(Ua(e))?e.pop():void 0},T.popScheduler=function(e){return xa.isScheduler(Ua(e))?e.pop():void 0},T.popNumber=function(e,t){return"number"==typeof Ua(e)?e.pop():t};var Da={},La={},Fa={},j={},Ba={},Wa=(Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.isArrayLike=void 0,Ba.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),za=(Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.isPromise=void 0,P);Wa.isPromise=function(e){return za.isFunction(null==e?void 0:e.then)};var qa={},Va=(Object.defineProperty(qa,"__esModule",{value:!0}),qa.isInteropObservable=void 0,n),Ha=P;qa.isInteropObservable=function(e){return Ha.isFunction(e[Va.observable])};var Ga={},Ya=(Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.isAsyncIterable=void 0,P);Ga.isAsyncIterable=function(e){return Symbol.asyncIterator&&Ya.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Ka={};Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.createInvalidObservableTypeError=void 0,Ka.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 Za={},Qa={};function Xa(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.iterator=Qa.getSymbolIterator=void 0,Qa.getSymbolIterator=Xa,Qa.iterator=Xa(),Object.defineProperty(Za,"__esModule",{value:!0}),Za.isIterable=void 0;var Ja=Qa,$a=P;Za.isIterable=function(e){return $a.isFunction(null==e?void 0:e[Ja.iterator])};var es={},ts=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}}}},rs=r&&r.__await||function(e){return this instanceof rs?(this.v=e,this):new rs(e)},ns=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 rs?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])}},os=(Object.defineProperty(es,"__esModule",{value:!0}),es.isReadableStreamLike=es.readableStreamLikeToAsyncGenerator=void 0,P);es.readableStreamLikeToAsyncGenerator=function(o){return ns(this,arguments,function(){var t,r,n;return ts(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,rs(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,rs(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,rs(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]}})})},es.isReadableStreamLike=function(e){return os.isFunction(null==e?void 0:e.getReader)};var is=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())})},us=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}}}},as=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 ss?ss(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)})}}},ss=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.")},cs=(Object.defineProperty(j,"__esModule",{value:!0}),j.fromReadableStreamLike=j.fromAsyncIterable=j.fromIterable=j.fromPromise=j.fromArrayLike=j.fromInteropObservable=j.innerFrom=void 0,Ba),ls=Wa,fs=w,ps=qa,ds=Ga,hs=Ka,bs=Za,ys=es,_s=P,vs=S,ms=n;function gs(r){return new fs.Observable(function(e){var t=r[ms.observable]();if(_s.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Os(r){return new fs.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function ws(e){return new fs.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,vs.reportUnhandledError)})}function Es(u){return new fs.Observable(function(e){var t,r;try{for(var n=ss(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 Ps(e){return new fs.Observable(function(t){!function(r,n){var o,i,u,a;return is(this,void 0,void 0,function(){var t;return us(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=as(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 Ss(e){return Ps(ys.readableStreamLikeToAsyncGenerator(e))}j.innerFrom=function(e){if(e instanceof fs.Observable)return e;if(null!=e){if(ps.isInteropObservable(e))return gs(e);if(cs.isArrayLike(e))return Os(e);if(ls.isPromise(e))return ws(e);if(ds.isAsyncIterable(e))return Ps(e);if(bs.isIterable(e))return Es(e);if(ys.isReadableStreamLike(e))return Ss(e)}throw hs.createInvalidObservableTypeError(e)},j.fromInteropObservable=gs,j.fromArrayLike=Os,j.fromPromise=ws,j.fromIterable=Es,j.fromAsyncIterable=Ps,j.fromReadableStreamLike=Ss;var S={},Ts={};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.executeSchedule=void 0,Ts.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(S,"__esModule",{value:!0}),S.observeOn=void 0;var js=Ts,Cs=g,Is=O;S.observeOn=function(r,n){return void 0===n&&(n=0),Cs.operate(function(e,t){e.subscribe(Is.createOperatorSubscriber(t,function(e){return js.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return js.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return js.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var Rs={},ks=(Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.subscribeOn=void 0,g);Rs.subscribeOn=function(r,n){return void 0===n&&(n=0),ks.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.scheduleObservable=void 0;var As=j,Ms=S,Ns=Rs;Fa.scheduleObservable=function(e,t){return As.innerFrom(e).pipe(Ns.subscribeOn(t),Ms.observeOn(t))};var xs={},Us=(Object.defineProperty(xs,"__esModule",{value:!0}),xs.schedulePromise=void 0,j),Ds=S,Ls=Rs;xs.schedulePromise=function(e,t){return Us.innerFrom(e).pipe(Ls.subscribeOn(t),Ds.observeOn(t))};var Fs={},Bs=(Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.scheduleArray=void 0,w);Fs.scheduleArray=function(r,n){return new Bs.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var Ws={},zs=(Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.scheduleIterable=void 0,w),qs=Qa,Vs=P,Hs=Ts;Ws.scheduleIterable=function(e,t){return new zs.Observable(function(n){var o;return Hs.executeSchedule(n,t,function(){o=e[qs.iterator](),Hs.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 Vs.isFunction(null==o?void 0:o.return)&&o.return()}})};var Qa={},Gs=(Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.scheduleAsyncIterable=void 0,w),Ys=Ts;Qa.scheduleAsyncIterable=function(r,n){if(r)return new Gs.Observable(function(t){Ys.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();Ys.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 Ks={},Zs=(Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.scheduleReadableStreamLike=void 0,Qa),Qs=es;Ks.scheduleReadableStreamLike=function(e,t){return Zs.scheduleAsyncIterable(Qs.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(La,"__esModule",{value:!0}),La.scheduled=void 0;var Xs=Fa,Js=xs,$s=Fs,ec=Ws,tc=Qa,rc=qa,nc=Wa,oc=Ba,ic=Za,uc=Ga,ac=Ka,sc=es,cc=Ks;La.scheduled=function(e,t){if(null!=e){if(rc.isInteropObservable(e))return Xs.scheduleObservable(e,t);if(oc.isArrayLike(e))return $s.scheduleArray(e,t);if(nc.isPromise(e))return Js.schedulePromise(e,t);if(uc.isAsyncIterable(e))return tc.scheduleAsyncIterable(e,t);if(ic.isIterable(e))return ec.scheduleIterable(e,t);if(sc.isReadableStreamLike(e))return cc.scheduleReadableStreamLike(e,t)}throw ac.createInvalidObservableTypeError(e)},Object.defineProperty(Da,"__esModule",{value:!0}),Da.from=void 0;var lc=La,fc=j;Da.from=function(e,t){return t?lc.scheduled(e,t):fc.innerFrom(e)},Object.defineProperty(s,"__esModule",{value:!0}),s.of=void 0;var pc=T,dc=Da;s.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pc.popScheduler(e);return dc.from(e,r)};var hc,bc,yc,_c,Fa={},vc=(Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.throwError=void 0,w),mc=P;function gc(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function Oc(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)}Fa.throwError=function(e,t){function r(e){return e.error(n())}var n=mc.isFunction(e)?e:function(){return e};return new vc.Observable(t?function(e){return t.schedule(r,0,e)}:r)},xs=Cu,Object.defineProperty(xs,"__esModule",{value:!0}),xs.observeNotification=xs.Notification=xs.NotificationKind=void 0,hc=Tu,bc=s,yc=Fa,_c=P,(Fs=xs.NotificationKind||(xs.NotificationKind={})).NEXT="N",Fs.ERROR="E",Fs.COMPLETE="C",gc.prototype.observe=function(e){return Oc(this,e)},gc.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()},gc.prototype.accept=function(e,t,r){var n;return _c.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},gc.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?bc.of(t):"E"===e?yc.throwError(function(){return r}):"C"===e?hc.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},gc.createNext=function(e){return new gc("N",e)},gc.createError=function(e){return new gc("E",void 0,e)},gc.createComplete=function(){return gc.completeNotification},gc.completeNotification=new gc("C"),Fs=gc,xs.Notification=Fs,xs.observeNotification=Oc;var Qa={},wc=(Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.isObservable=void 0,w),Ec=P;Qa.isObservable=function(e){return!!e&&(e instanceof wc.Observable||Ec.isFunction(e.lift)&&Ec.isFunction(e.subscribe))};var qa={},Wa={},Za=(Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.EmptyError=void 0,_),Pc=(Wa.EmptyError=Za.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(qa,"__esModule",{value:!0}),qa.lastValueFrom=void 0,Wa);qa.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 Pc.EmptyError)}})})};var Ga={},Sc=(Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.firstValueFrom=void 0,Wa),Tc=X;Ga.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new Tc.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new Sc.EmptyError)}});n.subscribe(r)})};var jc,Cc,Ic,Rc,kc,Ac,Mc,Ka={},es=(Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.ArgumentOutOfRangeError=void 0,_),Ks=(Ka.ArgumentOutOfRangeError=es.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),Fs=(Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.NotFoundError=void 0,_),xs=(Ks.NotFoundError=Fs.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),Za=(Object.defineProperty(xs,"__esModule",{value:!0}),xs.SequenceError=void 0,_),es=(xs.SequenceError=Za.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),Fs={};function Nc(e){throw new jc.TimeoutError(e)}Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.isValidDate=void 0,Fs.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},jc=es,Object.defineProperty(jc,"__esModule",{value:!0}),jc.timeout=jc.TimeoutError=void 0,Cc=ju,Ic=Fs,Rc=g,kc=j,Ac=O,Mc=Ts,jc.TimeoutError=_.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),jc.timeout=function(e,t){var a=(e=Ic.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Nc:r,l=void 0===(r=e.scheduler)?null!=t?t:Cc.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return Rc.operate(function(e,t){function r(e){n=Mc.executeSchedule(t,l,function(){try{u.unsubscribe(),kc.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(Ac.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 Za={},_={},xc={},Uc={},Dc=(Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.map=void 0,g),Lc=O;Uc.map=function(n,o){return Dc.operate(function(e,t){var r=0;e.subscribe(Lc.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var Fc=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},Bc=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},Wc=(Object.defineProperty(xc,"__esModule",{value:!0}),xc.mapOneOrManyArgs=void 0,Uc),zc=Array.isArray;xc.mapOneOrManyArgs=function(r){return Wc.map(function(e){return t=r,zc(e=e)?t.apply(void 0,Bc([],Fc(e))):t(e);var t})};var qc=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},Vc=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},Hc=(Object.defineProperty(_,"__esModule",{value:!0}),_.bindCallbackInternals=void 0,Aa),Gc=w,Yc=Rs,Kc=xc,Zc=S,Qc=b;_.bindCallbackInternals=function r(a,s,n,o){if(n){if(!Hc.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(Kc.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(Yc.subscribeOn(o),Zc.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new Qc.AsyncSubject,u=!0;return new Gc.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,Vc(Vc([],qc(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(Za,"__esModule",{value:!0}),Za.bindCallback=void 0;var Xc=_;Za.bindCallback=function(e,t,r){return Xc.bindCallbackInternals(!1,e,t,r)};var Jc={},$c=(Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.bindNodeCallback=void 0,_);Jc.bindNodeCallback=function(e,t,r){return $c.bindCallbackInternals(!0,e,t,r)};var _={},el={},tl=(Object.defineProperty(el,"__esModule",{value:!0}),el.argsArgArrayOrObject=void 0,Array.isArray),rl=Object.getPrototypeOf,nl=Object.prototype,ol=Object.keys;el.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(tl(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&rl(r)===nl)return{args:(r=ol(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var il={};Object.defineProperty(il,"__esModule",{value:!0}),il.createObject=void 0,il.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(_,"__esModule",{value:!0}),_.combineLatestInit=_.combineLatest=void 0;var ul=w,al=el,sl=Da,cl=h,ll=xc,fl=T,pl=il,dl=O,hl=Ts;function bl(a,s,c){return void 0===c&&(c=cl.identity),function(u){yl(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){yl(s,function(){var e=sl.from(a[r],s),t=!1;e.subscribe(dl.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 yl(e,t,r){e?hl.executeSchedule(r,e,t):t()}_.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=fl.popScheduler(e),n=fl.popResultSelector(e),o=al.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?sl.from([],r):(o=new ul.Observable(bl(i,r,u?function(e){return pl.createObject(u,e)}:cl.identity)),n?o.pipe(ll.mapOneOrManyArgs(n)):o)},_.combineLatestInit=bl;var _l={},vl={},ml={},gl={},Ol={},wl=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.mergeInternals=void 0,j),El=Ts,Pl=O;Ol.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;wl.innerFrom(n(e,l++)).subscribe(Pl.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?El.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(Pl.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(gl,"__esModule",{value:!0}),gl.mergeMap=void 0;var Sl=Uc,Tl=j,jl=g,Cl=Ol,Il=P;gl.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),Il.isFunction(i)?e(function(r,n){return Sl.map(function(e,t){return i(r,e,n,t)})(Tl.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),jl.operate(function(e,t){return Cl.mergeInternals(e,t,o,r)}))},Object.defineProperty(ml,"__esModule",{value:!0}),ml.mergeAll=void 0;var Rl=gl,kl=h;ml.mergeAll=function(e){return Rl.mergeMap(kl.identity,e=void 0===e?1/0:e)},Object.defineProperty(vl,"__esModule",{value:!0}),vl.concatAll=void 0;var Al=ml;vl.concatAll=function(){return Al.mergeAll(1)},Object.defineProperty(_l,"__esModule",{value:!0}),_l.concat=void 0;var Ml=vl,Nl=T,xl=Da;_l.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ml.concatAll()(xl.from(e,Nl.popScheduler(e)))};var Ul={},Dl={},Ll=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.defer=void 0,w),Fl=j;Dl.defer=function(t){return new Ll.Observable(function(e){Fl.innerFrom(t()).subscribe(e)})},Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.connectable=void 0;var Bl=E,Wl=w,zl=Dl,ql={connector:function(){return new Bl.Subject},resetOnDisconnect:!0};Ul.connectable=function(e,t){var r=null,n=(t=void 0===t?ql:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new Wl.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=zl.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var Vl={},Hl=(Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.forkJoin=void 0,w),Gl=el,Yl=j,Kl=T,Zl=O,Ql=xc,Xl=il;Vl.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Kl.popResultSelector(e),u=(n=Gl.argsArgArrayOrObject(e)).args,a=n.keys,n=new Hl.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;Yl.innerFrom(u[t]).subscribe(Zl.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?Xl.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Ql.mapOneOrManyArgs(r)):n};var el={},Jl=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(el,"__esModule",{value:!0}),el.fromEvent=void 0,j),ef=w,tf=gl,rf=Ba,nf=P,of=xc,uf=["addListener","removeListener"],af=["addEventListener","removeEventListener"],sf=["on","off"];function cf(r,n){return function(t){return function(e){return r[t](n,e)}}}el.fromEvent=function t(r,n,o,e){if(nf.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(of.mapOneOrManyArgs(e));var e=Jl((e=r,nf.isFunction(e.addEventListener)&&nf.isFunction(e.removeEventListener)?af.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,nf.isFunction(e.addListener)&&nf.isFunction(e.removeListener)?uf.map(cf(r,n)):(e=r,nf.isFunction(e.on)&&nf.isFunction(e.off)?sf.map(cf(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&rf.isArrayLike(r))return tf.mergeMap(function(e){return t(e,n,o)})($l.innerFrom(r));if(i)return new ef.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 il={},lf=(Object.defineProperty(il,"__esModule",{value:!0}),il.fromEventPattern=void 0,w),ff=P,pf=xc;il.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(pf.mapOneOrManyArgs(t)):new lf.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 ff.isFunction(o)?function(){return o(e,t)}:void 0})};var Ba={},df=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}}}},hf=(Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.generate=void 0,h),bf=Aa,yf=Dl,_f=Ws;Ba.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return df(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?hf.identity:i,o=e.scheduler):(a=e,!t||bf.isScheduler(t)?(u=hf.identity,o=t):u=t),yf.defer(o?function(){return _f.scheduleIterable(s(),o)}:s)};var Ws={},vf=(Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.iif=void 0,Dl);Ws.iif=function(e,t,r){return vf.defer(function(){return e()?t:r})};var mf={},gf={},Of=(Object.defineProperty(gf,"__esModule",{value:!0}),gf.timer=void 0,w),wf=ju,Ef=Aa,Pf=Fs;gf.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=wf.async);var i=-1;return null!=e&&(Ef.isScheduler(e)?o=e:i=e),new Of.Observable(function(e){var t=Pf.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(mf,"__esModule",{value:!0}),mf.interval=void 0;var Sf=ju,Tf=gf;mf.interval=function(e,t){return Tf.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?Sf.asyncScheduler:t)};var Aa={},jf=(Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.merge=void 0,ml),Cf=j,If=Tu,Rf=T,kf=Da;Aa.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Rf.popScheduler(e),n=Rf.popNumber(e,1/0),o=e;return o.length?1===o.length?Cf.innerFrom(o[0]):jf.mergeAll(n)(kf.from(o,r)):If.EMPTY};var Af,Mf={},Nf=(Af=Mf,Object.defineProperty(Af,"__esModule",{value:!0}),Af.never=Af.NEVER=void 0,Af.NEVER=new w.Observable(t.noop),Af.never=function(){return Af.NEVER},{}),xf={},Uf=(Object.defineProperty(xf,"__esModule",{value:!0}),xf.argsOrArgArray=void 0,Array.isArray);xf.argsOrArgArray=function(e){return 1===e.length&&Uf(e[0])?e[0]:e},Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.onErrorResumeNext=void 0;var Df=w,Lf=xf,Ff=O,Bf=t,Wf=j;Nf.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Lf.argsOrArgArray(e);return new Df.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=Wf.innerFrom(i[n++])}catch(e){return void o()}var t=new Ff.OperatorSubscriber(r,void 0,Bf.noop,Bf.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var zf={},qf=(Object.defineProperty(zf,"__esModule",{value:!0}),zf.pairs=void 0,Da);zf.pairs=function(e,t){return qf.from(Object.entries(e),t)};var Vf={},Hf={};Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.not=void 0,Hf.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var Gf={},Yf=(Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.filter=void 0,g),Kf=O;Gf.filter=function(n,o){return Yf.operate(function(e,t){var r=0;e.subscribe(Kf.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.partition=void 0;var Zf=Hf,Qf=Gf,Xf=j;Vf.partition=function(e,t,r){return[Qf.filter(t,r)(Xf.innerFrom(e)),Qf.filter(Zf.not(t,r))(Xf.innerFrom(e))]};var Jf={},$f=(Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.raceInit=Jf.race=void 0,w),ep=j,tp=xf,rp=O;function np(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(ep.innerFrom(t[r]).subscribe(rp.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)}}Jf.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=tp.argsOrArgArray(e)).length?ep.innerFrom(e[0]):new $f.Observable(np(e))},Jf.raceInit=np;var op={},ip=(Object.defineProperty(op,"__esModule",{value:!0}),op.range=void 0,w),up=Tu;op.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return up.EMPTY;var o=e+r;return new ip.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 ap={},sp=(Object.defineProperty(ap,"__esModule",{value:!0}),ap.using=void 0,w),cp=j,lp=Tu;ap.using=function(n,o){return new sp.Observable(function(e){var t=n(),r=o(t);return(r?cp.innerFrom(r):lp.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var fp={},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},dp=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},hp=(Object.defineProperty(fp,"__esModule",{value:!0}),fp.zip=void 0,w),bp=j,yp=xf,_p=Tu,vp=O,mp=T;fp.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=mp.popResultSelector(e),u=yp.argsOrArgArray(e);return u.length?new hp.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){bp.innerFrom(u[t]).subscribe(vp.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,dp([],pp(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}}):_p.EMPTY};var gp={},Op=(Object.defineProperty(gp,"__esModule",{value:!0}),{}),wp=(Object.defineProperty(Op,"__esModule",{value:!0}),Op.audit=void 0,g),Ep=j,Pp=O;Op.audit=function(s){return wp.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(Pp.createOperatorSubscriber(t,function(e){o=!0,i=e,u||Ep.innerFrom(s(e)).subscribe(u=Pp.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var Sp={},Tp=(Object.defineProperty(Sp,"__esModule",{value:!0}),Sp.auditTime=void 0,ju),jp=Op,Cp=gf;Sp.auditTime=function(e,t){return void 0===t&&(t=Tp.asyncScheduler),jp.audit(function(){return Cp.timer(e,t)})};var Ip={},Rp=(Object.defineProperty(Ip,"__esModule",{value:!0}),Ip.buffer=void 0,g),kp=t,Ap=O,Mp=j;Ip.buffer=function(n){return Rp.operate(function(e,t){var r=[];return e.subscribe(Ap.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),Mp.innerFrom(n).subscribe(Ap.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},kp.noop)),function(){r=null}})};var Np={},xp=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.")},Up=(Object.defineProperty(Np,"__esModule",{value:!0}),Np.bufferCount=void 0,g),Dp=O,Lp=Bt;Np.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,Up.operate(function(e,f){var p=[],d=0;e.subscribe(Dp.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=xp(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=xp(i),c=s.next();!c.done;c=s.next()){var l=c.value;Lp.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=xp(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 Fp={},Bp=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.")},Wp=(Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.bufferTime=void 0,v),zp=g,qp=O,Vp=Bt,Hp=ju,Gp=T,Yp=Ts;Fp.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=Gp.popScheduler(t))?e:Hp.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return zp.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Vp.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new Wp.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),Yp.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?Yp.executeSchedule(r,u,o,a,!0):n=!0,o(),qp.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=Bp(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 Kp={},Zp=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.")},Qp=(Object.defineProperty(Kp,"__esModule",{value:!0}),Kp.bufferToggle=void 0,v),Xp=g,Jp=j,$p=O,ed=t,td=Bt;Kp.bufferToggle=function(t,o){return Xp.operate(function(e,n){var i=[];Jp.innerFrom(t).subscribe($p.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new Qp.Subscription);r.add(Jp.innerFrom(o(e)).subscribe($p.createOperatorSubscriber(n,function(){td.arrRemove(i,t),n.next(t),r.unsubscribe()},ed.noop)))},ed.noop)),e.subscribe($p.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=Zp(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 rd={},nd=(Object.defineProperty(rd,"__esModule",{value:!0}),rd.bufferWhen=void 0,g),od=t,id=O,ud=j;rd.bufferWhen=function(i){return nd.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),ud.innerFrom(i()).subscribe(n=id.createOperatorSubscriber(t,o,od.noop))};o(),e.subscribe(id.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 ad={},sd=(Object.defineProperty(ad,"__esModule",{value:!0}),ad.catchError=void 0,j),cd=O,ld=g;ad.catchError=function u(a){return ld.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(cd.createOperatorSubscriber(r,void 0,void 0,function(e){n=sd.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 fd={},pd={},C={},dd={},I={},hd={},bd=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.scanInternals=void 0,O);hd.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(bd.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(I,"__esModule",{value:!0}),I.reduce=void 0;var yd=hd,_d=g;I.reduce=function(e,t){return _d.operate(yd.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(dd,"__esModule",{value:!0}),dd.toArray=void 0;function vd(e,t){return e.push(t),e}var md=I,gd=g;dd.toArray=function(){return gd.operate(function(e,t){md.reduce(vd,[])(e).subscribe(t)})},Object.defineProperty(C,"__esModule",{value:!0}),C.joinAllInternals=void 0;var Od=h,wd=xc,Ed=o,Pd=gl,Sd=dd;C.joinAllInternals=function(t,e){return Ed.pipe(Sd.toArray(),Pd.mergeMap(function(e){return t(e)}),e?wd.mapOneOrManyArgs(e):Od.identity)},Object.defineProperty(pd,"__esModule",{value:!0}),pd.combineLatestAll=void 0;var Td=_,jd=C;pd.combineLatestAll=function(e){return jd.joinAllInternals(Td.combineLatest,e)},Object.defineProperty(fd,"__esModule",{value:!0}),fd.combineAll=void 0;fd.combineAll=pd.combineLatestAll;var Cd={},Id={},Rd=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},kd=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},Ad=(Object.defineProperty(Id,"__esModule",{value:!0}),Id.combineLatest=void 0,_),Md=g,Nd=xf,xd=xc,Ud=o,Dd=T;function Ld(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Dd.popResultSelector(r);return t?Ud.pipe(Ld.apply(void 0,kd([],Rd(r))),xd.mapOneOrManyArgs(t)):Md.operate(function(e,t){Ad.combineLatestInit(kd([e],Rd(Nd.argsOrArgArray(r))))(t)})}Id.combineLatest=Ld;var Fd=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},Bd=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},Wd=(Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.combineLatestWith=void 0,Id);Cd.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Wd.combineLatest.apply(void 0,Bd([],Fd(e)))};var xc={},zd=(Object.defineProperty(xc,"__esModule",{value:!0}),xc.concatMap=void 0,gl),qd=P;xc.concatMap=function(e,t){return qd.isFunction(t)?zd.mergeMap(e,t,1):zd.mergeMap(e,1)};var Vd={},Hd=(Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.concatMapTo=void 0,xc),Gd=P;Vd.concatMapTo=function(e,t){return Gd.isFunction(t)?Hd.concatMap(function(){return e},t):Hd.concatMap(function(){return e})};var Yd={},Kd={},Zd=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},Qd=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},Xd=(Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.concat=void 0,g),Jd=vl,$d=T,eh=Da;Kd.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=$d.popScheduler(r);return Xd.operate(function(e,t){Jd.concatAll()(eh.from(Qd([e],Zd(r)),n)).subscribe(t)})};var th=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},rh=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},nh=(Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.concatWith=void 0,Kd);Yd.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nh.concat.apply(void 0,rh([],th(e)))};var oh={},ih={},uh=(Object.defineProperty(ih,"__esModule",{value:!0}),ih.fromSubscribable=void 0,w);ih.fromSubscribable=function(t){return new uh.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(oh,"__esModule",{value:!0}),oh.connect=void 0;var ah=E,sh=j,ch=g,lh=ih,fh={connector:function(){return new ah.Subject}};oh.connect=function(n,e){var o=(e=void 0===e?fh:e).connector;return ch.operate(function(e,t){var r=o();sh.innerFrom(n(lh.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var ih={},ph=(Object.defineProperty(ih,"__esModule",{value:!0}),ih.count=void 0,I);ih.count=function(n){return ph.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var dh={},hh=(Object.defineProperty(dh,"__esModule",{value:!0}),dh.debounce=void 0,g),bh=t,yh=O,_h=j;dh.debounce=function(u){return hh.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(yh.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=yh.createOperatorSubscriber(t,r,bh.noop),_h.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var R={},vh=(Object.defineProperty(R,"__esModule",{value:!0}),R.debounceTime=void 0,ju),mh=g,gh=O;R.debounceTime=function(a,s){return void 0===s&&(s=vh.asyncScheduler),mh.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(gh.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 Oh={},wh=(Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.defaultIfEmpty=void 0,g),Eh=O;Oh.defaultIfEmpty=function(n){return wh.operate(function(e,t){var r=!1;e.subscribe(Eh.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var Ph={},Sh={},Th={},jh=(Object.defineProperty(Th,"__esModule",{value:!0}),Th.take=void 0,Tu),Ch=g,Ih=O;Th.take=function(n){return n<=0?function(){return jh.EMPTY}:Ch.operate(function(e,t){var r=0;e.subscribe(Ih.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var Rh={},kh=(Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.ignoreElements=void 0,g),Ah=O,Mh=t;Rh.ignoreElements=function(){return kh.operate(function(e,t){e.subscribe(Ah.createOperatorSubscriber(t,Mh.noop))})};var Nh={},xh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.mapTo=void 0,Uc);Nh.mapTo=function(e){return xh.map(function(){return e})},Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.delayWhen=void 0;var Uh=_l,Dh=Th,Lh=Rh,Fh=Nh,Bh=gl,Wh=j;Sh.delayWhen=function t(r,n){return n?function(e){return Uh.concat(n.pipe(Dh.take(1),Lh.ignoreElements()),e.pipe(t(r)))}:Bh.mergeMap(function(e,t){return Wh.innerFrom(r(e,t)).pipe(Dh.take(1),Fh.mapTo(e))})},Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.delay=void 0;var zh=ju,qh=Sh,Vh=gf;Ph.delay=function(e,t){var r=Vh.timer(e,t=void 0===t?zh.asyncScheduler:t);return qh.delayWhen(function(){return r})};var Hh={},Gh=(Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.dematerialize=void 0,Cu),Yh=g,Kh=O;Hh.dematerialize=function(){return Yh.operate(function(e,t){e.subscribe(Kh.createOperatorSubscriber(t,function(e){return Gh.observeNotification(e,t)}))})};var Zh={},Qh=(Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.distinct=void 0,g),Xh=O,Jh=t,$h=j;Zh.distinct=function(o,t){return Qh.operate(function(e,r){var n=new Set;e.subscribe(Xh.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&$h.innerFrom(t).subscribe(Xh.createOperatorSubscriber(r,function(){return n.clear()},Jh.noop))})};var eb={},tb=(Object.defineProperty(eb,"__esModule",{value:!0}),eb.distinctUntilChanged=void 0,h),rb=g,nb=O;function ob(e,t){return e===t}eb.distinctUntilChanged=function(i,u){return void 0===u&&(u=tb.identity),i=null!=i?i:ob,rb.operate(function(e,r){var n,o=!0;e.subscribe(nb.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var ib={},ub=(Object.defineProperty(ib,"__esModule",{value:!0}),ib.distinctUntilKeyChanged=void 0,eb);ib.distinctUntilKeyChanged=function(r,n){return ub.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var ab={},sb={},cb=(Object.defineProperty(sb,"__esModule",{value:!0}),sb.throwIfEmpty=void 0,Wa),lb=g,fb=O;function pb(){return new cb.EmptyError}sb.throwIfEmpty=function(n){return void 0===n&&(n=pb),lb.operate(function(e,t){var r=!1;e.subscribe(fb.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(ab,"__esModule",{value:!0}),ab.elementAt=void 0;var db=Ka,hb=Gf,bb=sb,yb=Oh,_b=Th;ab.elementAt=function(r,t){if(r<0)throw new db.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(hb.filter(function(e,t){return t===r}),_b.take(1),n?yb.defaultIfEmpty(t):bb.throwIfEmpty(function(){return new db.ArgumentOutOfRangeError}))}};var vb={},mb=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},gb=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},Ob=(Object.defineProperty(vb,"__esModule",{value:!0}),vb.endWith=void 0,_l),wb=s;vb.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Ob.concat(e,wb.of.apply(void 0,gb([],mb(t))))}};var Eb={},Pb=(Object.defineProperty(Eb,"__esModule",{value:!0}),Eb.every=void 0,g),Sb=O;Eb.every=function(o,i){return Pb.operate(function(t,r){var n=0;t.subscribe(Sb.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var Tb={},jb={},Cb={},Ib=(Object.defineProperty(Cb,"__esModule",{value:!0}),Cb.exhaustMap=void 0,Uc),Rb=j,kb=g,Ab=O;Cb.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return Rb.innerFrom(i(r,n)).pipe(Ib.map(function(e,t){return o(r,e,n,t)}))}))}:kb.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(Ab.createOperatorSubscriber(t,function(e){n||(n=Ab.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),Rb.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(jb,"__esModule",{value:!0}),jb.exhaustAll=void 0;var Mb=Cb,Nb=h;jb.exhaustAll=function(){return Mb.exhaustMap(Nb.identity)},Object.defineProperty(Tb,"__esModule",{value:!0}),Tb.exhaust=void 0;Tb.exhaust=jb.exhaustAll;var xb={},Ub=(Object.defineProperty(xb,"__esModule",{value:!0}),xb.expand=void 0,g),Db=Ol;xb.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,Ub.operate(function(e,t){return Db.mergeInternals(e,t,r,n,void 0,!0,o)})};var Lb={},Fb=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.finalize=void 0,g);Lb.finalize=function(r){return Fb.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var Bb={},Wb=(Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.createFind=Bb.find=void 0,g),zb=O;function qb(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(zb.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()}))}}Bb.find=function(e,t){return Wb.operate(qb(e,t,"value"))},Bb.createFind=qb;var Vb={},Hb=(Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.findIndex=void 0,g),Gb=Bb;Vb.findIndex=function(e,t){return Hb.operate(Gb.createFind(e,t,"index"))};var Yb={},Kb=(Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.first=void 0,Wa),Zb=Gf,Qb=Th,Xb=Oh,Jb=sb,$b=h;Yb.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?Zb.filter(function(e,t){return n(e,t,r)}):$b.identity,Qb.take(1),t?Xb.defaultIfEmpty(e):Jb.throwIfEmpty(function(){return new Kb.EmptyError}))}};var ey={},ty=(Object.defineProperty(ey,"__esModule",{value:!0}),ey.groupBy=void 0,w),ry=j,ny=E,oy=g,iy=O;ey.groupBy=function(b,t,y,_){return oy.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 iy.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new ny.Subject),i=n,u=o,(a=new ty.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=iy.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(ry.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 uy={},ay=(Object.defineProperty(uy,"__esModule",{value:!0}),uy.isEmpty=void 0,g),sy=O;uy.isEmpty=function(){return ay.operate(function(e,t){e.subscribe(sy.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var cy={},ly={},fy=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.")},py=(Object.defineProperty(ly,"__esModule",{value:!0}),ly.takeLast=void 0,Tu),dy=g,hy=O;ly.takeLast=function(t){return t<=0?function(){return py.EMPTY}:dy.operate(function(e,i){var u=[];e.subscribe(hy.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=fy(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(cy,"__esModule",{value:!0}),cy.last=void 0;var by=Wa,yy=Gf,_y=ly,vy=sb,my=Oh,gy=h;cy.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?yy.filter(function(e,t){return n(e,t,r)}):gy.identity,_y.takeLast(1),t?my.defaultIfEmpty(e):vy.throwIfEmpty(function(){return new by.EmptyError}))}};var Oy={},wy=(Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.materialize=void 0,Cu),Ey=g,Py=O;Oy.materialize=function(){return Ey.operate(function(e,t){e.subscribe(Py.createOperatorSubscriber(t,function(e){t.next(wy.Notification.createNext(e))},function(){t.next(wy.Notification.createComplete()),t.complete()},function(e){t.next(wy.Notification.createError(e)),t.complete()}))})};var Sy={},Ty=(Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.max=void 0,I),jy=P;Sy.max=function(r){return Ty.reduce(jy.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var Cy={},Iy=(Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.flatMap=void 0,gl),Iy=(Cy.flatMap=Iy.mergeMap,{}),Ry=(Object.defineProperty(Iy,"__esModule",{value:!0}),Iy.mergeMapTo=void 0,gl),ky=P;Iy.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),ky.isFunction(t)?Ry.mergeMap(function(){return e},t,r):Ry.mergeMap(function(){return e},r="number"==typeof t?t:r)};var Ay={},My=(Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.mergeScan=void 0,g),Ny=Ol;Ay.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),My.operate(function(e,t){var r=o;return Ny.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var Ol={},xy={},Uy=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},Dy=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},Ly=(Object.defineProperty(xy,"__esModule",{value:!0}),xy.merge=void 0,g),Fy=xf,By=ml,Wy=T,zy=Da;xy.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Wy.popScheduler(r),o=Wy.popNumber(r,1/0),r=Fy.argsOrArgArray(r);return Ly.operate(function(e,t){By.mergeAll(o)(zy.from(Dy([e],Uy(r)),n)).subscribe(t)})};var qy=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},Vy=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},Hy=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.mergeWith=void 0,xy);Ol.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Hy.merge.apply(void 0,Vy([],qy(e)))};var Gy={},Yy=(Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.min=void 0,I),Ky=P;Gy.min=function(r){return Yy.reduce(Ky.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var Zy={},Qy=(Object.defineProperty(Zy,"__esModule",{value:!0}),Zy.multicast=void 0,jt),Xy=P,Jy=oh;Zy.multicast=function(e,t){var r=Xy.isFunction(e)?e:function(){return e};return Xy.isFunction(t)?Jy.connect(t,{connector:r}):function(e){return new Qy.ConnectableObservable(e,r)}};var $y={},e_=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},t_=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},r_=(Object.defineProperty($y,"__esModule",{value:!0}),$y.onErrorResumeNext=$y.onErrorResumeNextWith=void 0,xf),n_=Nf;function o_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=r_.argsOrArgArray(e);return function(e){return n_.onErrorResumeNext.apply(void 0,t_([e],e_(r)))}}$y.onErrorResumeNextWith=o_,$y.onErrorResumeNext=o_;var i_={},u_=(Object.defineProperty(i_,"__esModule",{value:!0}),i_.pairwise=void 0,g),a_=O;i_.pairwise=function(){return u_.operate(function(e,r){var n,o=!1;e.subscribe(a_.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var s_={},c_=(Object.defineProperty(s_,"__esModule",{value:!0}),s_.pluck=void 0,Uc);s_.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 c_.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 l_={},f_=(Object.defineProperty(l_,"__esModule",{value:!0}),l_.publish=void 0,E),p_=Zy,d_=oh;l_.publish=function(t){return t?function(e){return d_.connect(t)(e)}:function(e){return p_.multicast(new f_.Subject)(e)}};var h_={},b_=(Object.defineProperty(h_,"__esModule",{value:!0}),h_.publishBehavior=void 0,p),y_=jt;h_.publishBehavior=function(r){return function(e){var t=new b_.BehaviorSubject(r);return new y_.ConnectableObservable(e,function(){return t})}};var __={},v_=(Object.defineProperty(__,"__esModule",{value:!0}),__.publishLast=void 0,b),m_=jt;__.publishLast=function(){return function(e){var t=new v_.AsyncSubject;return new m_.ConnectableObservable(e,function(){return t})}};var g_={},O_=(Object.defineProperty(g_,"__esModule",{value:!0}),g_.publishReplay=void 0,i),w_=Zy,E_=P;g_.publishReplay=function(t,r,e,n){e&&!E_.isFunction(e)&&(n=e);var o=E_.isFunction(e)?e:void 0;return function(e){return w_.multicast(new O_.ReplaySubject(t,r,n),o)(e)}};var P_={},S_=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},T_=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},j_=(Object.defineProperty(P_,"__esModule",{value:!0}),P_.raceWith=void 0,Jf),C_=g,I_=h;P_.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?C_.operate(function(e,t){j_.raceInit(T_([e],S_(r)))(t)}):I_.identity};var R_={},k_=(Object.defineProperty(R_,"__esModule",{value:!0}),R_.repeat=void 0,Tu),A_=g,M_=O,N_=j,x_=gf;R_.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 k_.EMPTY}:A_.operate(function(t,r){function n(){var e=!1;o=t.subscribe(M_.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?x_.timer(a):N_.innerFrom(a(i)),t=M_.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var U_={},D_=(Object.defineProperty(U_,"__esModule",{value:!0}),U_.repeatWhen=void 0,j),L_=E,F_=g,B_=O;U_.repeatWhen=function(l){return F_.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 L_.Subject,D_.innerFrom(l(n)).subscribe(B_.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(B_.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var W_={},z_=(Object.defineProperty(W_,"__esModule",{value:!0}),W_.retry=void 0,g),q_=O,V_=h,H_=gf,G_=j;W_.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?V_.identity:z_.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(q_.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?H_.timer(l):G_.innerFrom(l(e,a)),n=q_.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var Y_={},K_=(Object.defineProperty(Y_,"__esModule",{value:!0}),Y_.retryWhen=void 0,j),Z_=E,Q_=g,X_=O;Y_.retryWhen=function(u){return Q_.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(X_.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new Z_.Subject,K_.innerFrom(u(n)).subscribe(X_.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var J_={},$_=(Object.defineProperty(J_,"__esModule",{value:!0}),J_.sample=void 0,j),ev=g,tv=t,rv=O;J_.sample=function(o){return ev.operate(function(e,t){var r=!1,n=null;e.subscribe(rv.createOperatorSubscriber(t,function(e){r=!0,n=e})),$_.innerFrom(o).subscribe(rv.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},tv.noop))})};var nv={},ov=(Object.defineProperty(nv,"__esModule",{value:!0}),nv.sampleTime=void 0,ju),iv=J_,uv=mf;nv.sampleTime=function(e,t){return iv.sample(uv.interval(e,t=void 0===t?ov.asyncScheduler:t))};var av={},sv=(Object.defineProperty(av,"__esModule",{value:!0}),av.scan=void 0,g),cv=hd;av.scan=function(e,t){return sv.operate(cv.scanInternals(e,t,2<=arguments.length,!0))};var hd={},lv=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.sequenceEqual=void 0,g),fv=O,pv=j;function dv(){return{buffer:[],complete:!1}}hd.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),lv.operate(function(e,t){function r(n,o){var r=fv.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=dv(),o=dv(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),pv.innerFrom(u).subscribe(r(o,n))})};var hv={},bv=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},yv=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},_v=(Object.defineProperty(hv,"__esModule",{value:!0}),hv.share=void 0,j),vv=E,mv=X,gv=g;function Ov(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 mv.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),_v.innerFrom(t.apply(void 0,yv([],bv(n)))).subscribe(r)}hv.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new vv.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 gv.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=Ov(n,b))}),r.subscribe(t),!o&&0<a&&(o=new mv.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=Ov(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=Ov(f,h),r.complete()}}),_v.innerFrom(e).subscribe(o))})(e)}};var wv={},Ev=(Object.defineProperty(wv,"__esModule",{value:!0}),wv.shareReplay=void 0,i),Pv=hv;wv.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,Pv.share({connector:function(){return new Ev.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var Sv={},Tv=(Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.single=void 0,Wa),jv=xs,Cv=Ks,Iv=g,Rv=O;Sv.single=function(a){return Iv.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(Rv.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new jv.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new Cv.NotFoundError("No matching values"):new Tv.EmptyError)}))})};var kv={},Av=(Object.defineProperty(kv,"__esModule",{value:!0}),kv.skip=void 0,Gf);kv.skip=function(r){return Av.filter(function(e,t){return r<=t})};var Mv={},Nv=(Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.skipLast=void 0,h),xv=g,Uv=O;Mv.skipLast=function(u){return u<=0?Nv.identity:xv.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(Uv.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 Dv={},Lv=(Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.skipUntil=void 0,g),Fv=O,Bv=j,Wv=t;Dv.skipUntil=function(o){return Lv.operate(function(e,t){var r=!1,n=Fv.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},Wv.noop);Bv.innerFrom(o).subscribe(n),e.subscribe(Fv.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var zv={},qv=(Object.defineProperty(zv,"__esModule",{value:!0}),zv.skipWhile=void 0,g),Vv=O;zv.skipWhile=function(o){return qv.operate(function(e,t){var r=!1,n=0;e.subscribe(Vv.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var Hv={},Gv=(Object.defineProperty(Hv,"__esModule",{value:!0}),Hv.startWith=void 0,_l),Yv=T,Kv=g;Hv.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Yv.popScheduler(r);return Kv.operate(function(e,t){(n?Gv.concat(r,e,n):Gv.concat(r,e)).subscribe(t)})};var Zv={},Qv={},Xv=(Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.switchMap=void 0,j),Jv=g,$v=O;Qv.switchMap=function(s,c){return Jv.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe($v.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;Xv.innerFrom(s(t,n)).subscribe(u=$v.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(Zv,"__esModule",{value:!0}),Zv.switchAll=void 0;var em=Qv,tm=h;Zv.switchAll=function(){return em.switchMap(tm.identity)};var rm={},nm=(Object.defineProperty(rm,"__esModule",{value:!0}),rm.switchMapTo=void 0,Qv),om=P;rm.switchMapTo=function(e,t){return om.isFunction(t)?nm.switchMap(function(){return e},t):nm.switchMap(function(){return e})};var im={},um=(Object.defineProperty(im,"__esModule",{value:!0}),im.switchScan=void 0,Qv),am=g;im.switchScan=function(n,o){return am.operate(function(e,t){var r=o;return um.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var sm={},cm=(Object.defineProperty(sm,"__esModule",{value:!0}),sm.takeUntil=void 0,g),lm=O,fm=j,pm=t;sm.takeUntil=function(r){return cm.operate(function(e,t){fm.innerFrom(r).subscribe(lm.createOperatorSubscriber(t,function(){return t.complete()},pm.noop)),t.closed||e.subscribe(t)})};var dm={},hm=(Object.defineProperty(dm,"__esModule",{value:!0}),dm.takeWhile=void 0,g),bm=O;dm.takeWhile=function(o,i){return void 0===i&&(i=!1),hm.operate(function(e,r){var n=0;e.subscribe(bm.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var ym={},_m=(Object.defineProperty(ym,"__esModule",{value:!0}),ym.tap=void 0,P),vm=g,mm=O,gm=h;ym.tap=function(e,t,r){var o=_m.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?vm.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(mm.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)}))}):gm.identity};var Om,wm,Em,Pm,P={},Sm=(Om=P,Object.defineProperty(Om,"__esModule",{value:!0}),Om.throttle=Om.defaultThrottleConfig=void 0,wm=g,Em=O,Pm=j,Om.defaultThrottleConfig={leading:!0,trailing:!1},Om.throttle=function(p,d){return void 0===d&&(d=Om.defaultThrottleConfig),wm.operate(function(e,t){function r(){var e;i&&(i=!1,e=u,u=null,t.next(e),s||f(e))}var n=d.leading,o=d.trailing,i=!1,u=null,a=null,s=!1,c=function(){null!=a&&a.unsubscribe(),a=null,o&&(r(),s&&t.complete())},l=function(){a=null,s&&t.complete()},f=function(e){return a=Pm.innerFrom(p(e)).subscribe(Em.createOperatorSubscriber(t,c,l))};e.subscribe(Em.createOperatorSubscriber(t,function(e){i=!0,u=e,a&&!a.closed||(n?r():f(e))},function(){s=!0,o&&i&&a&&!a.closed||t.complete()}))})},{}),Tm=(Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.throttleTime=void 0,ju),jm=P,Cm=gf;Sm.throttleTime=function(e,t,r){void 0===r&&(r=jm.defaultThrottleConfig);var n=Cm.timer(e,t=void 0===t?Tm.asyncScheduler:t);return jm.throttle(function(){return n},r)};var Im={},Rm=(Object.defineProperty(Im,"__esModule",{value:!0}),Im.TimeInterval=Im.timeInterval=void 0,ju),km=g,Am=O;Im.timeInterval=function(i){return void 0===i&&(i=Rm.asyncScheduler),km.operate(function(e,n){var o=i.now();e.subscribe(Am.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new Mm(e,r))}))})};var Mm=function(e,t){this.value=e,this.interval=t},Nm=(Im.TimeInterval=Mm,{}),xm=(Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.timeoutWith=void 0,ju),Um=Fs,Dm=es;Nm.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:xm.async,Um.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 Dm.timeout({first:n,each:o,scheduler:r,with:e})};var Fs={},Lm=(Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.timestamp=void 0,Ct),Fm=Uc;Fs.timestamp=function(t){return void 0===t&&(t=Lm.dateTimestampProvider),Fm.map(function(e){return{value:e,timestamp:t.now()}})};var Ct={},Bm=(Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.window=void 0,E),Wm=g,zm=O,qm=t,Vm=j;Ct.window=function(o){return Wm.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new Bm.Subject;t.next(n.asObservable());return e.subscribe(zm.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),Vm.innerFrom(o).subscribe(zm.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new Bm.Subject)},qm.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var Hm={},Gm=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.")},Ym=(Object.defineProperty(Hm,"__esModule",{value:!0}),Hm.windowCount=void 0,E),Km=g,Zm=O;Hm.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return Km.operate(function(e,i){var u=[new Ym.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(Zm.createOperatorSubscriber(i,function(e){try{for(var t=Gm(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 Ym.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 Qm={},Xm=(Object.defineProperty(Qm,"__esModule",{value:!0}),Qm.windowTime=void 0,E),Jm=ju,$m=v,e0=g,t0=O,r0=Bt,n0=T,o0=Ts;Qm.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=n0.popScheduler(t))?e:Jm.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return e0.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(),r0.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new $m.Subscription,n.add(e),t=new Xm.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),o0.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?o0.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(t0.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 Ts={},i0=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.")},u0=(Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.windowToggle=void 0,E),a0=v,s0=g,c0=j,l0=O,f0=t,p0=Bt;Ts.windowToggle=function(t,a){return s0.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];c0.innerFrom(t).subscribe(l0.createOperatorSubscriber(o,function(e){var t,r=new u0.Subject,n=(u.push(r),new a0.Subscription);try{t=c0.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(l0.createOperatorSubscriber(o,function(){p0.arrRemove(u,r),r.complete(),n.unsubscribe()},f0.noop,i)))},f0.noop)),e.subscribe(l0.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=i0(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 Bt={},d0=(Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.windowWhen=void 0,E),h0=g,b0=O,y0=j;Bt.windowWhen=function(u){return h0.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 d0.Subject,t.next(r.asObservable());try{e=y0.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=b0.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(b0.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var _0={},v0=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},m0=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},g0=(Object.defineProperty(_0,"__esModule",{value:!0}),_0.withLatestFrom=void 0,g),O0=O,w0=j,E0=h,P0=t,S0=T;_0.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=S0.popResultSelector(a);return g0.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){w0.innerFrom(a[t]).subscribe(O0.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(E0.identity))&&(o=null))},P0.noop))}(u);e.subscribe(O0.createOperatorSubscriber(r,function(e){i&&(e=m0([e],v0(n)),r.next(s?s.apply(void 0,m0([],v0(e))):e))}))})};var O={},T0=(Object.defineProperty(O,"__esModule",{value:!0}),O.zipAll=void 0,fp),j0=C;O.zipAll=function(e){return j0.joinAllInternals(T0.zip,e)};var j={},T={},C0=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},I0=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},R0=(Object.defineProperty(T,"__esModule",{value:!0}),T.zip=void 0,fp),k0=g;T.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return k0.operate(function(e,t){R0.zip.apply(void 0,I0([e],C0(r))).subscribe(t)})};var A0,M0,N0,x0,U0,D0,L0,F0,B0,W0,z0,q0,V0,H0,G0,Y0,K0,Z0,Q0,X0,J0,$0,eg,tg,rg,ng,og,ig,ug,ag,sg,cg,lg,fg,pg,dg,hg,bg,yg,_g,vg,mg,gg,Og,wg,Eg,Pg,Sg,Tg,jg,Cg,Ig,Rg,kg,Ag,Mg,Ng,xg,Ug,Dg,Lg,Fg,Bg,Wg,zg,qg,Vg,Hg,Gg,Yg,Kg,Zg,Qg,Xg,Jg,$g,eO,tO,rO,nO,oO,iO,uO,aO,sO,cO,lO,fO,pO,dO,hO,bO,yO,_O,vO,mO,gO,OO,wO,EO,PO,SO,TO,jO,CO,IO,RO,kO,AO,MO,NO,xO,UO,DO,LO,FO,BO,WO,zO,qO,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,Iw,Rw,kw,Aw,Mw,Nw,xw,Uw,Dw,Lw=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},Fw=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},Bw=(Object.defineProperty(j,"__esModule",{value:!0}),j.zipWith=void 0,T);j.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Bw.zip.apply(void 0,Fw([],Lw(e)))},C=Lr,A0=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]}),g=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||A0(t,e,r)},Object.defineProperty(C,"__esModule",{value:!0}),C.interval=C.iif=C.generate=C.fromEventPattern=C.fromEvent=C.from=C.forkJoin=C.empty=C.defer=C.connectable=C.concat=C.combineLatest=C.bindNodeCallback=C.bindCallback=C.UnsubscriptionError=C.TimeoutError=C.SequenceError=C.ObjectUnsubscribedError=C.NotFoundError=C.EmptyError=C.ArgumentOutOfRangeError=C.firstValueFrom=C.lastValueFrom=C.isObservable=C.identity=C.noop=C.pipe=C.NotificationKind=C.Notification=C.Subscriber=C.Subscription=C.Scheduler=C.VirtualAction=C.VirtualTimeScheduler=C.animationFrameScheduler=C.animationFrame=C.queueScheduler=C.queue=C.asyncScheduler=C.async=C.asapScheduler=C.asap=C.AsyncSubject=C.ReplaySubject=C.BehaviorSubject=C.Subject=C.animationFrames=C.observable=C.ConnectableObservable=C.Observable=void 0,C.filter=C.expand=C.exhaustMap=C.exhaustAll=C.exhaust=C.every=C.endWith=C.elementAt=C.distinctUntilKeyChanged=C.distinctUntilChanged=C.distinct=C.dematerialize=C.delayWhen=C.delay=C.defaultIfEmpty=C.debounceTime=C.debounce=C.count=C.connect=C.concatWith=C.concatMapTo=C.concatMap=C.concatAll=C.combineLatestWith=C.combineLatestAll=C.combineAll=C.catchError=C.bufferWhen=C.bufferToggle=C.bufferTime=C.bufferCount=C.buffer=C.auditTime=C.audit=C.config=C.NEVER=C.EMPTY=C.scheduled=C.zip=C.using=C.timer=C.throwError=C.range=C.race=C.partition=C.pairs=C.onErrorResumeNext=C.of=C.never=C.merge=void 0,C.switchMap=C.switchAll=C.subscribeOn=C.startWith=C.skipWhile=C.skipUntil=C.skipLast=C.skip=C.single=C.shareReplay=C.share=C.sequenceEqual=C.scan=C.sampleTime=C.sample=C.refCount=C.retryWhen=C.retry=C.repeatWhen=C.repeat=C.reduce=C.raceWith=C.publishReplay=C.publishLast=C.publishBehavior=C.publish=C.pluck=C.pairwise=C.onErrorResumeNextWith=C.observeOn=C.multicast=C.min=C.mergeWith=C.mergeScan=C.mergeMapTo=C.mergeMap=C.flatMap=C.mergeAll=C.max=C.materialize=C.mapTo=C.map=C.last=C.isEmpty=C.ignoreElements=C.groupBy=C.first=C.findIndex=C.find=C.finalize=void 0,C.zipWith=C.zipAll=C.withLatestFrom=C.windowWhen=C.windowToggle=C.windowTime=C.windowCount=C.window=C.toArray=C.timestamp=C.timeoutWith=C.timeout=C.timeInterval=C.throwIfEmpty=C.throttleTime=C.throttle=C.tap=C.takeWhile=C.takeUntil=C.takeLast=C.take=C.switchScan=C.switchMapTo=void 0,M0=w,Object.defineProperty(C,"Observable",{enumerable:!0,get:function(){return M0.Observable}}),N0=jt,Object.defineProperty(C,"ConnectableObservable",{enumerable:!0,get:function(){return N0.ConnectableObservable}}),x0=n,Object.defineProperty(C,"observable",{enumerable:!0,get:function(){return x0.observable}}),U0=f,Object.defineProperty(C,"animationFrames",{enumerable:!0,get:function(){return U0.animationFrames}}),D0=E,Object.defineProperty(C,"Subject",{enumerable:!0,get:function(){return D0.Subject}}),L0=p,Object.defineProperty(C,"BehaviorSubject",{enumerable:!0,get:function(){return L0.BehaviorSubject}}),F0=i,Object.defineProperty(C,"ReplaySubject",{enumerable:!0,get:function(){return F0.ReplaySubject}}),B0=b,Object.defineProperty(C,"AsyncSubject",{enumerable:!0,get:function(){return B0.AsyncSubject}}),W0=l,Object.defineProperty(C,"asap",{enumerable:!0,get:function(){return W0.asap}}),Object.defineProperty(C,"asapScheduler",{enumerable:!0,get:function(){return W0.asapScheduler}}),z0=ju,Object.defineProperty(C,"async",{enumerable:!0,get:function(){return z0.async}}),Object.defineProperty(C,"asyncScheduler",{enumerable:!0,get:function(){return z0.asyncScheduler}}),q0=$u,Object.defineProperty(C,"queue",{enumerable:!0,get:function(){return q0.queue}}),Object.defineProperty(C,"queueScheduler",{enumerable:!0,get:function(){return q0.queueScheduler}}),V0=ca,Object.defineProperty(C,"animationFrame",{enumerable:!0,get:function(){return V0.animationFrame}}),Object.defineProperty(C,"animationFrameScheduler",{enumerable:!0,get:function(){return V0.animationFrameScheduler}}),H0=da,Object.defineProperty(C,"VirtualTimeScheduler",{enumerable:!0,get:function(){return H0.VirtualTimeScheduler}}),Object.defineProperty(C,"VirtualAction",{enumerable:!0,get:function(){return H0.VirtualAction}}),G0=xu,Object.defineProperty(C,"Scheduler",{enumerable:!0,get:function(){return G0.Scheduler}}),Y0=v,Object.defineProperty(C,"Subscription",{enumerable:!0,get:function(){return Y0.Subscription}}),K0=X,Object.defineProperty(C,"Subscriber",{enumerable:!0,get:function(){return K0.Subscriber}}),Z0=Cu,Object.defineProperty(C,"Notification",{enumerable:!0,get:function(){return Z0.Notification}}),Object.defineProperty(C,"NotificationKind",{enumerable:!0,get:function(){return Z0.NotificationKind}}),Q0=o,Object.defineProperty(C,"pipe",{enumerable:!0,get:function(){return Q0.pipe}}),X0=t,Object.defineProperty(C,"noop",{enumerable:!0,get:function(){return X0.noop}}),J0=h,Object.defineProperty(C,"identity",{enumerable:!0,get:function(){return J0.identity}}),$0=Qa,Object.defineProperty(C,"isObservable",{enumerable:!0,get:function(){return $0.isObservable}}),eg=qa,Object.defineProperty(C,"lastValueFrom",{enumerable:!0,get:function(){return eg.lastValueFrom}}),tg=Ga,Object.defineProperty(C,"firstValueFrom",{enumerable:!0,get:function(){return tg.firstValueFrom}}),rg=Ka,Object.defineProperty(C,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return rg.ArgumentOutOfRangeError}}),ng=Wa,Object.defineProperty(C,"EmptyError",{enumerable:!0,get:function(){return ng.EmptyError}}),og=Ks,Object.defineProperty(C,"NotFoundError",{enumerable:!0,get:function(){return og.NotFoundError}}),ig=Q,Object.defineProperty(C,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return ig.ObjectUnsubscribedError}}),ug=xs,Object.defineProperty(C,"SequenceError",{enumerable:!0,get:function(){return ug.SequenceError}}),ag=es,Object.defineProperty(C,"TimeoutError",{enumerable:!0,get:function(){return ag.TimeoutError}}),sg=y,Object.defineProperty(C,"UnsubscriptionError",{enumerable:!0,get:function(){return sg.UnsubscriptionError}}),cg=Za,Object.defineProperty(C,"bindCallback",{enumerable:!0,get:function(){return cg.bindCallback}}),lg=Jc,Object.defineProperty(C,"bindNodeCallback",{enumerable:!0,get:function(){return lg.bindNodeCallback}}),fg=_,Object.defineProperty(C,"combineLatest",{enumerable:!0,get:function(){return fg.combineLatest}}),pg=_l,Object.defineProperty(C,"concat",{enumerable:!0,get:function(){return pg.concat}}),dg=Ul,Object.defineProperty(C,"connectable",{enumerable:!0,get:function(){return dg.connectable}}),hg=Dl,Object.defineProperty(C,"defer",{enumerable:!0,get:function(){return hg.defer}}),bg=Tu,Object.defineProperty(C,"empty",{enumerable:!0,get:function(){return bg.empty}}),yg=Vl,Object.defineProperty(C,"forkJoin",{enumerable:!0,get:function(){return yg.forkJoin}}),_g=Da,Object.defineProperty(C,"from",{enumerable:!0,get:function(){return _g.from}}),vg=el,Object.defineProperty(C,"fromEvent",{enumerable:!0,get:function(){return vg.fromEvent}}),mg=il,Object.defineProperty(C,"fromEventPattern",{enumerable:!0,get:function(){return mg.fromEventPattern}}),gg=Ba,Object.defineProperty(C,"generate",{enumerable:!0,get:function(){return gg.generate}}),Og=Ws,Object.defineProperty(C,"iif",{enumerable:!0,get:function(){return Og.iif}}),wg=mf,Object.defineProperty(C,"interval",{enumerable:!0,get:function(){return wg.interval}}),Eg=Aa,Object.defineProperty(C,"merge",{enumerable:!0,get:function(){return Eg.merge}}),Pg=Mf,Object.defineProperty(C,"never",{enumerable:!0,get:function(){return Pg.never}}),Sg=s,Object.defineProperty(C,"of",{enumerable:!0,get:function(){return Sg.of}}),Tg=Nf,Object.defineProperty(C,"onErrorResumeNext",{enumerable:!0,get:function(){return Tg.onErrorResumeNext}}),jg=zf,Object.defineProperty(C,"pairs",{enumerable:!0,get:function(){return jg.pairs}}),Cg=Vf,Object.defineProperty(C,"partition",{enumerable:!0,get:function(){return Cg.partition}}),Ig=Jf,Object.defineProperty(C,"race",{enumerable:!0,get:function(){return Ig.race}}),Rg=op,Object.defineProperty(C,"range",{enumerable:!0,get:function(){return Rg.range}}),kg=Fa,Object.defineProperty(C,"throwError",{enumerable:!0,get:function(){return kg.throwError}}),Ag=gf,Object.defineProperty(C,"timer",{enumerable:!0,get:function(){return Ag.timer}}),Mg=ap,Object.defineProperty(C,"using",{enumerable:!0,get:function(){return Mg.using}}),Ng=fp,Object.defineProperty(C,"zip",{enumerable:!0,get:function(){return Ng.zip}}),xg=La,Object.defineProperty(C,"scheduled",{enumerable:!0,get:function(){return xg.scheduled}}),Ug=Tu,Object.defineProperty(C,"EMPTY",{enumerable:!0,get:function(){return Ug.EMPTY}}),Dg=Mf,Object.defineProperty(C,"NEVER",{enumerable:!0,get:function(){return Dg.NEVER}}),g(gp,C),Lg=u,Object.defineProperty(C,"config",{enumerable:!0,get:function(){return Lg.config}}),Fg=Op,Object.defineProperty(C,"audit",{enumerable:!0,get:function(){return Fg.audit}}),Bg=Sp,Object.defineProperty(C,"auditTime",{enumerable:!0,get:function(){return Bg.auditTime}}),Wg=Ip,Object.defineProperty(C,"buffer",{enumerable:!0,get:function(){return Wg.buffer}}),zg=Np,Object.defineProperty(C,"bufferCount",{enumerable:!0,get:function(){return zg.bufferCount}}),qg=Fp,Object.defineProperty(C,"bufferTime",{enumerable:!0,get:function(){return qg.bufferTime}}),Vg=Kp,Object.defineProperty(C,"bufferToggle",{enumerable:!0,get:function(){return Vg.bufferToggle}}),Hg=rd,Object.defineProperty(C,"bufferWhen",{enumerable:!0,get:function(){return Hg.bufferWhen}}),Gg=ad,Object.defineProperty(C,"catchError",{enumerable:!0,get:function(){return Gg.catchError}}),Yg=fd,Object.defineProperty(C,"combineAll",{enumerable:!0,get:function(){return Yg.combineAll}}),Kg=pd,Object.defineProperty(C,"combineLatestAll",{enumerable:!0,get:function(){return Kg.combineLatestAll}}),Zg=Cd,Object.defineProperty(C,"combineLatestWith",{enumerable:!0,get:function(){return Zg.combineLatestWith}}),Qg=vl,Object.defineProperty(C,"concatAll",{enumerable:!0,get:function(){return Qg.concatAll}}),Xg=xc,Object.defineProperty(C,"concatMap",{enumerable:!0,get:function(){return Xg.concatMap}}),Jg=Vd,Object.defineProperty(C,"concatMapTo",{enumerable:!0,get:function(){return Jg.concatMapTo}}),$g=Yd,Object.defineProperty(C,"concatWith",{enumerable:!0,get:function(){return $g.concatWith}}),eO=oh,Object.defineProperty(C,"connect",{enumerable:!0,get:function(){return eO.connect}}),tO=ih,Object.defineProperty(C,"count",{enumerable:!0,get:function(){return tO.count}}),rO=dh,Object.defineProperty(C,"debounce",{enumerable:!0,get:function(){return rO.debounce}}),nO=R,Object.defineProperty(C,"debounceTime",{enumerable:!0,get:function(){return nO.debounceTime}}),oO=Oh,Object.defineProperty(C,"defaultIfEmpty",{enumerable:!0,get:function(){return oO.defaultIfEmpty}}),iO=Ph,Object.defineProperty(C,"delay",{enumerable:!0,get:function(){return iO.delay}}),uO=Sh,Object.defineProperty(C,"delayWhen",{enumerable:!0,get:function(){return uO.delayWhen}}),aO=Hh,Object.defineProperty(C,"dematerialize",{enumerable:!0,get:function(){return aO.dematerialize}}),sO=Zh,Object.defineProperty(C,"distinct",{enumerable:!0,get:function(){return sO.distinct}}),cO=eb,Object.defineProperty(C,"distinctUntilChanged",{enumerable:!0,get:function(){return cO.distinctUntilChanged}}),lO=ib,Object.defineProperty(C,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return lO.distinctUntilKeyChanged}}),fO=ab,Object.defineProperty(C,"elementAt",{enumerable:!0,get:function(){return fO.elementAt}}),pO=vb,Object.defineProperty(C,"endWith",{enumerable:!0,get:function(){return pO.endWith}}),dO=Eb,Object.defineProperty(C,"every",{enumerable:!0,get:function(){return dO.every}}),hO=Tb,Object.defineProperty(C,"exhaust",{enumerable:!0,get:function(){return hO.exhaust}}),bO=jb,Object.defineProperty(C,"exhaustAll",{enumerable:!0,get:function(){return bO.exhaustAll}}),yO=Cb,Object.defineProperty(C,"exhaustMap",{enumerable:!0,get:function(){return yO.exhaustMap}}),_O=xb,Object.defineProperty(C,"expand",{enumerable:!0,get:function(){return _O.expand}}),vO=Gf,Object.defineProperty(C,"filter",{enumerable:!0,get:function(){return vO.filter}}),mO=Lb,Object.defineProperty(C,"finalize",{enumerable:!0,get:function(){return mO.finalize}}),gO=Bb,Object.defineProperty(C,"find",{enumerable:!0,get:function(){return gO.find}}),OO=Vb,Object.defineProperty(C,"findIndex",{enumerable:!0,get:function(){return OO.findIndex}}),wO=Yb,Object.defineProperty(C,"first",{enumerable:!0,get:function(){return wO.first}}),EO=ey,Object.defineProperty(C,"groupBy",{enumerable:!0,get:function(){return EO.groupBy}}),PO=Rh,Object.defineProperty(C,"ignoreElements",{enumerable:!0,get:function(){return PO.ignoreElements}}),SO=uy,Object.defineProperty(C,"isEmpty",{enumerable:!0,get:function(){return SO.isEmpty}}),TO=cy,Object.defineProperty(C,"last",{enumerable:!0,get:function(){return TO.last}}),jO=Uc,Object.defineProperty(C,"map",{enumerable:!0,get:function(){return jO.map}}),CO=Nh,Object.defineProperty(C,"mapTo",{enumerable:!0,get:function(){return CO.mapTo}}),IO=Oy,Object.defineProperty(C,"materialize",{enumerable:!0,get:function(){return IO.materialize}}),RO=Sy,Object.defineProperty(C,"max",{enumerable:!0,get:function(){return RO.max}}),kO=ml,Object.defineProperty(C,"mergeAll",{enumerable:!0,get:function(){return kO.mergeAll}}),AO=Cy,Object.defineProperty(C,"flatMap",{enumerable:!0,get:function(){return AO.flatMap}}),MO=gl,Object.defineProperty(C,"mergeMap",{enumerable:!0,get:function(){return MO.mergeMap}}),NO=Iy,Object.defineProperty(C,"mergeMapTo",{enumerable:!0,get:function(){return NO.mergeMapTo}}),xO=Ay,Object.defineProperty(C,"mergeScan",{enumerable:!0,get:function(){return xO.mergeScan}}),UO=Ol,Object.defineProperty(C,"mergeWith",{enumerable:!0,get:function(){return UO.mergeWith}}),DO=Gy,Object.defineProperty(C,"min",{enumerable:!0,get:function(){return DO.min}}),LO=Zy,Object.defineProperty(C,"multicast",{enumerable:!0,get:function(){return LO.multicast}}),FO=S,Object.defineProperty(C,"observeOn",{enumerable:!0,get:function(){return FO.observeOn}}),BO=$y,Object.defineProperty(C,"onErrorResumeNextWith",{enumerable:!0,get:function(){return BO.onErrorResumeNextWith}}),WO=i_,Object.defineProperty(C,"pairwise",{enumerable:!0,get:function(){return WO.pairwise}}),zO=s_,Object.defineProperty(C,"pluck",{enumerable:!0,get:function(){return zO.pluck}}),qO=l_,Object.defineProperty(C,"publish",{enumerable:!0,get:function(){return qO.publish}}),VO=h_,Object.defineProperty(C,"publishBehavior",{enumerable:!0,get:function(){return VO.publishBehavior}}),HO=__,Object.defineProperty(C,"publishLast",{enumerable:!0,get:function(){return HO.publishLast}}),GO=g_,Object.defineProperty(C,"publishReplay",{enumerable:!0,get:function(){return GO.publishReplay}}),YO=P_,Object.defineProperty(C,"raceWith",{enumerable:!0,get:function(){return YO.raceWith}}),KO=I,Object.defineProperty(C,"reduce",{enumerable:!0,get:function(){return KO.reduce}}),ZO=R_,Object.defineProperty(C,"repeat",{enumerable:!0,get:function(){return ZO.repeat}}),QO=U_,Object.defineProperty(C,"repeatWhen",{enumerable:!0,get:function(){return QO.repeatWhen}}),XO=W_,Object.defineProperty(C,"retry",{enumerable:!0,get:function(){return XO.retry}}),JO=Y_,Object.defineProperty(C,"retryWhen",{enumerable:!0,get:function(){return JO.retryWhen}}),$O=m,Object.defineProperty(C,"refCount",{enumerable:!0,get:function(){return $O.refCount}}),ew=J_,Object.defineProperty(C,"sample",{enumerable:!0,get:function(){return ew.sample}}),tw=nv,Object.defineProperty(C,"sampleTime",{enumerable:!0,get:function(){return tw.sampleTime}}),rw=av,Object.defineProperty(C,"scan",{enumerable:!0,get:function(){return rw.scan}}),nw=hd,Object.defineProperty(C,"sequenceEqual",{enumerable:!0,get:function(){return nw.sequenceEqual}}),ow=hv,Object.defineProperty(C,"share",{enumerable:!0,get:function(){return ow.share}}),iw=wv,Object.defineProperty(C,"shareReplay",{enumerable:!0,get:function(){return iw.shareReplay}}),uw=Sv,Object.defineProperty(C,"single",{enumerable:!0,get:function(){return uw.single}}),aw=kv,Object.defineProperty(C,"skip",{enumerable:!0,get:function(){return aw.skip}}),sw=Mv,Object.defineProperty(C,"skipLast",{enumerable:!0,get:function(){return sw.skipLast}}),cw=Dv,Object.defineProperty(C,"skipUntil",{enumerable:!0,get:function(){return cw.skipUntil}}),lw=zv,Object.defineProperty(C,"skipWhile",{enumerable:!0,get:function(){return lw.skipWhile}}),fw=Hv,Object.defineProperty(C,"startWith",{enumerable:!0,get:function(){return fw.startWith}}),pw=Rs,Object.defineProperty(C,"subscribeOn",{enumerable:!0,get:function(){return pw.subscribeOn}}),dw=Zv,Object.defineProperty(C,"switchAll",{enumerable:!0,get:function(){return dw.switchAll}}),hw=Qv,Object.defineProperty(C,"switchMap",{enumerable:!0,get:function(){return hw.switchMap}}),bw=rm,Object.defineProperty(C,"switchMapTo",{enumerable:!0,get:function(){return bw.switchMapTo}}),yw=im,Object.defineProperty(C,"switchScan",{enumerable:!0,get:function(){return yw.switchScan}}),_w=Th,Object.defineProperty(C,"take",{enumerable:!0,get:function(){return _w.take}}),vw=ly,Object.defineProperty(C,"takeLast",{enumerable:!0,get:function(){return vw.takeLast}}),mw=sm,Object.defineProperty(C,"takeUntil",{enumerable:!0,get:function(){return mw.takeUntil}}),gw=dm,Object.defineProperty(C,"takeWhile",{enumerable:!0,get:function(){return gw.takeWhile}}),Ow=ym,Object.defineProperty(C,"tap",{enumerable:!0,get:function(){return Ow.tap}}),ww=P,Object.defineProperty(C,"throttle",{enumerable:!0,get:function(){return ww.throttle}}),Ew=Sm,Object.defineProperty(C,"throttleTime",{enumerable:!0,get:function(){return Ew.throttleTime}}),Pw=sb,Object.defineProperty(C,"throwIfEmpty",{enumerable:!0,get:function(){return Pw.throwIfEmpty}}),Sw=Im,Object.defineProperty(C,"timeInterval",{enumerable:!0,get:function(){return Sw.timeInterval}}),Tw=es,Object.defineProperty(C,"timeout",{enumerable:!0,get:function(){return Tw.timeout}}),jw=Nm,Object.defineProperty(C,"timeoutWith",{enumerable:!0,get:function(){return jw.timeoutWith}}),Cw=Fs,Object.defineProperty(C,"timestamp",{enumerable:!0,get:function(){return Cw.timestamp}}),Iw=dd,Object.defineProperty(C,"toArray",{enumerable:!0,get:function(){return Iw.toArray}}),Rw=Ct,Object.defineProperty(C,"window",{enumerable:!0,get:function(){return Rw.window}}),kw=Hm,Object.defineProperty(C,"windowCount",{enumerable:!0,get:function(){return kw.windowCount}}),Aw=Qm,Object.defineProperty(C,"windowTime",{enumerable:!0,get:function(){return Aw.windowTime}}),Mw=Ts,Object.defineProperty(C,"windowToggle",{enumerable:!0,get:function(){return Mw.windowToggle}}),Nw=Bt,Object.defineProperty(C,"windowWhen",{enumerable:!0,get:function(){return Nw.windowWhen}}),xw=_0,Object.defineProperty(C,"withLatestFrom",{enumerable:!0,get:function(){return xw.withLatestFrom}}),Uw=O,Object.defineProperty(C,"zipAll",{enumerable:!0,get:function(){return Uw.zipAll}}),Dw=j,Object.defineProperty(C,"zipWith",{enumerable:!0,get:function(){return Dw.zipWith}});var w={},jt={},Ww=(Object.defineProperty(jt,"__esModule",{value:!0}),jt.partition=void 0,Hf),zw=Gf;jt.partition=function(t,r){return function(e){return[zw.filter(t,r)(e),zw.filter(Ww.not(t,r))(e)]}};var qw,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,IE,RE,kE,AE,ME,NE,xE,UE,DE,LE,FE,BE,WE,zE,qE,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,SP,TP,jP,CP,IP,RP,kP,AP,MP,NP,xP,UP,DP,LP,FP,BP,WP,zP,qP,VP,HP,GP,YP,n={},KP=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},ZP=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},QP=(Object.defineProperty(n,"__esModule",{value:!0}),n.race=void 0,xf),XP=P_;n.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return XP.raceWith.apply(void 0,ZP([],KP(QP.argsOrArgArray(e))))},f=w,Object.defineProperty(f,"__esModule",{value:!0}),f.mergeAll=f.merge=f.max=f.materialize=f.mapTo=f.map=f.last=f.isEmpty=f.ignoreElements=f.groupBy=f.first=f.findIndex=f.find=f.finalize=f.filter=f.expand=f.exhaustMap=f.exhaustAll=f.exhaust=f.every=f.endWith=f.elementAt=f.distinctUntilKeyChanged=f.distinctUntilChanged=f.distinct=f.dematerialize=f.delayWhen=f.delay=f.defaultIfEmpty=f.debounceTime=f.debounce=f.count=f.connect=f.concatWith=f.concatMapTo=f.concatMap=f.concatAll=f.concat=f.combineLatestWith=f.combineLatest=f.combineLatestAll=f.combineAll=f.catchError=f.bufferWhen=f.bufferToggle=f.bufferTime=f.bufferCount=f.buffer=f.auditTime=f.audit=void 0,f.timeInterval=f.throwIfEmpty=f.throttleTime=f.throttle=f.tap=f.takeWhile=f.takeUntil=f.takeLast=f.take=f.switchScan=f.switchMapTo=f.switchMap=f.switchAll=f.subscribeOn=f.startWith=f.skipWhile=f.skipUntil=f.skipLast=f.skip=f.single=f.shareReplay=f.share=f.sequenceEqual=f.scan=f.sampleTime=f.sample=f.refCount=f.retryWhen=f.retry=f.repeatWhen=f.repeat=f.reduce=f.raceWith=f.race=f.publishReplay=f.publishLast=f.publishBehavior=f.publish=f.pluck=f.partition=f.pairwise=f.onErrorResumeNext=f.observeOn=f.multicast=f.min=f.mergeWith=f.mergeScan=f.mergeMapTo=f.mergeMap=f.flatMap=void 0,f.zipWith=f.zipAll=f.zip=f.withLatestFrom=f.windowWhen=f.windowToggle=f.windowTime=f.windowCount=f.window=f.toArray=f.timestamp=f.timeoutWith=f.timeout=void 0,qw=Op,Object.defineProperty(f,"audit",{enumerable:!0,get:function(){return qw.audit}}),Vw=Sp,Object.defineProperty(f,"auditTime",{enumerable:!0,get:function(){return Vw.auditTime}}),Hw=Ip,Object.defineProperty(f,"buffer",{enumerable:!0,get:function(){return Hw.buffer}}),Gw=Np,Object.defineProperty(f,"bufferCount",{enumerable:!0,get:function(){return Gw.bufferCount}}),Yw=Fp,Object.defineProperty(f,"bufferTime",{enumerable:!0,get:function(){return Yw.bufferTime}}),Kw=Kp,Object.defineProperty(f,"bufferToggle",{enumerable:!0,get:function(){return Kw.bufferToggle}}),Zw=rd,Object.defineProperty(f,"bufferWhen",{enumerable:!0,get:function(){return Zw.bufferWhen}}),Qw=ad,Object.defineProperty(f,"catchError",{enumerable:!0,get:function(){return Qw.catchError}}),Xw=fd,Object.defineProperty(f,"combineAll",{enumerable:!0,get:function(){return Xw.combineAll}}),Jw=pd,Object.defineProperty(f,"combineLatestAll",{enumerable:!0,get:function(){return Jw.combineLatestAll}}),$w=Id,Object.defineProperty(f,"combineLatest",{enumerable:!0,get:function(){return $w.combineLatest}}),eE=Cd,Object.defineProperty(f,"combineLatestWith",{enumerable:!0,get:function(){return eE.combineLatestWith}}),tE=Kd,Object.defineProperty(f,"concat",{enumerable:!0,get:function(){return tE.concat}}),rE=vl,Object.defineProperty(f,"concatAll",{enumerable:!0,get:function(){return rE.concatAll}}),nE=xc,Object.defineProperty(f,"concatMap",{enumerable:!0,get:function(){return nE.concatMap}}),oE=Vd,Object.defineProperty(f,"concatMapTo",{enumerable:!0,get:function(){return oE.concatMapTo}}),iE=Yd,Object.defineProperty(f,"concatWith",{enumerable:!0,get:function(){return iE.concatWith}}),uE=oh,Object.defineProperty(f,"connect",{enumerable:!0,get:function(){return uE.connect}}),aE=ih,Object.defineProperty(f,"count",{enumerable:!0,get:function(){return aE.count}}),sE=dh,Object.defineProperty(f,"debounce",{enumerable:!0,get:function(){return sE.debounce}}),cE=R,Object.defineProperty(f,"debounceTime",{enumerable:!0,get:function(){return cE.debounceTime}}),lE=Oh,Object.defineProperty(f,"defaultIfEmpty",{enumerable:!0,get:function(){return lE.defaultIfEmpty}}),fE=Ph,Object.defineProperty(f,"delay",{enumerable:!0,get:function(){return fE.delay}}),pE=Sh,Object.defineProperty(f,"delayWhen",{enumerable:!0,get:function(){return pE.delayWhen}}),dE=Hh,Object.defineProperty(f,"dematerialize",{enumerable:!0,get:function(){return dE.dematerialize}}),hE=Zh,Object.defineProperty(f,"distinct",{enumerable:!0,get:function(){return hE.distinct}}),bE=eb,Object.defineProperty(f,"distinctUntilChanged",{enumerable:!0,get:function(){return bE.distinctUntilChanged}}),yE=ib,Object.defineProperty(f,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return yE.distinctUntilKeyChanged}}),_E=ab,Object.defineProperty(f,"elementAt",{enumerable:!0,get:function(){return _E.elementAt}}),vE=vb,Object.defineProperty(f,"endWith",{enumerable:!0,get:function(){return vE.endWith}}),mE=Eb,Object.defineProperty(f,"every",{enumerable:!0,get:function(){return mE.every}}),gE=Tb,Object.defineProperty(f,"exhaust",{enumerable:!0,get:function(){return gE.exhaust}}),OE=jb,Object.defineProperty(f,"exhaustAll",{enumerable:!0,get:function(){return OE.exhaustAll}}),wE=Cb,Object.defineProperty(f,"exhaustMap",{enumerable:!0,get:function(){return wE.exhaustMap}}),EE=xb,Object.defineProperty(f,"expand",{enumerable:!0,get:function(){return EE.expand}}),PE=Gf,Object.defineProperty(f,"filter",{enumerable:!0,get:function(){return PE.filter}}),SE=Lb,Object.defineProperty(f,"finalize",{enumerable:!0,get:function(){return SE.finalize}}),TE=Bb,Object.defineProperty(f,"find",{enumerable:!0,get:function(){return TE.find}}),jE=Vb,Object.defineProperty(f,"findIndex",{enumerable:!0,get:function(){return jE.findIndex}}),CE=Yb,Object.defineProperty(f,"first",{enumerable:!0,get:function(){return CE.first}}),IE=ey,Object.defineProperty(f,"groupBy",{enumerable:!0,get:function(){return IE.groupBy}}),RE=Rh,Object.defineProperty(f,"ignoreElements",{enumerable:!0,get:function(){return RE.ignoreElements}}),kE=uy,Object.defineProperty(f,"isEmpty",{enumerable:!0,get:function(){return kE.isEmpty}}),AE=cy,Object.defineProperty(f,"last",{enumerable:!0,get:function(){return AE.last}}),ME=Uc,Object.defineProperty(f,"map",{enumerable:!0,get:function(){return ME.map}}),NE=Nh,Object.defineProperty(f,"mapTo",{enumerable:!0,get:function(){return NE.mapTo}}),xE=Oy,Object.defineProperty(f,"materialize",{enumerable:!0,get:function(){return xE.materialize}}),UE=Sy,Object.defineProperty(f,"max",{enumerable:!0,get:function(){return UE.max}}),DE=xy,Object.defineProperty(f,"merge",{enumerable:!0,get:function(){return DE.merge}}),LE=ml,Object.defineProperty(f,"mergeAll",{enumerable:!0,get:function(){return LE.mergeAll}}),FE=Cy,Object.defineProperty(f,"flatMap",{enumerable:!0,get:function(){return FE.flatMap}}),BE=gl,Object.defineProperty(f,"mergeMap",{enumerable:!0,get:function(){return BE.mergeMap}}),WE=Iy,Object.defineProperty(f,"mergeMapTo",{enumerable:!0,get:function(){return WE.mergeMapTo}}),zE=Ay,Object.defineProperty(f,"mergeScan",{enumerable:!0,get:function(){return zE.mergeScan}}),qE=Ol,Object.defineProperty(f,"mergeWith",{enumerable:!0,get:function(){return qE.mergeWith}}),VE=Gy,Object.defineProperty(f,"min",{enumerable:!0,get:function(){return VE.min}}),HE=Zy,Object.defineProperty(f,"multicast",{enumerable:!0,get:function(){return HE.multicast}}),GE=S,Object.defineProperty(f,"observeOn",{enumerable:!0,get:function(){return GE.observeOn}}),YE=$y,Object.defineProperty(f,"onErrorResumeNext",{enumerable:!0,get:function(){return YE.onErrorResumeNext}}),KE=i_,Object.defineProperty(f,"pairwise",{enumerable:!0,get:function(){return KE.pairwise}}),ZE=jt,Object.defineProperty(f,"partition",{enumerable:!0,get:function(){return ZE.partition}}),QE=s_,Object.defineProperty(f,"pluck",{enumerable:!0,get:function(){return QE.pluck}}),XE=l_,Object.defineProperty(f,"publish",{enumerable:!0,get:function(){return XE.publish}}),JE=h_,Object.defineProperty(f,"publishBehavior",{enumerable:!0,get:function(){return JE.publishBehavior}}),$E=__,Object.defineProperty(f,"publishLast",{enumerable:!0,get:function(){return $E.publishLast}}),eP=g_,Object.defineProperty(f,"publishReplay",{enumerable:!0,get:function(){return eP.publishReplay}}),tP=n,Object.defineProperty(f,"race",{enumerable:!0,get:function(){return tP.race}}),rP=P_,Object.defineProperty(f,"raceWith",{enumerable:!0,get:function(){return rP.raceWith}}),nP=I,Object.defineProperty(f,"reduce",{enumerable:!0,get:function(){return nP.reduce}}),oP=R_,Object.defineProperty(f,"repeat",{enumerable:!0,get:function(){return oP.repeat}}),iP=U_,Object.defineProperty(f,"repeatWhen",{enumerable:!0,get:function(){return iP.repeatWhen}}),uP=W_,Object.defineProperty(f,"retry",{enumerable:!0,get:function(){return uP.retry}}),aP=Y_,Object.defineProperty(f,"retryWhen",{enumerable:!0,get:function(){return aP.retryWhen}}),sP=m,Object.defineProperty(f,"refCount",{enumerable:!0,get:function(){return sP.refCount}}),cP=J_,Object.defineProperty(f,"sample",{enumerable:!0,get:function(){return cP.sample}}),lP=nv,Object.defineProperty(f,"sampleTime",{enumerable:!0,get:function(){return lP.sampleTime}}),fP=av,Object.defineProperty(f,"scan",{enumerable:!0,get:function(){return fP.scan}}),pP=hd,Object.defineProperty(f,"sequenceEqual",{enumerable:!0,get:function(){return pP.sequenceEqual}}),dP=hv,Object.defineProperty(f,"share",{enumerable:!0,get:function(){return dP.share}}),hP=wv,Object.defineProperty(f,"shareReplay",{enumerable:!0,get:function(){return hP.shareReplay}}),bP=Sv,Object.defineProperty(f,"single",{enumerable:!0,get:function(){return bP.single}}),yP=kv,Object.defineProperty(f,"skip",{enumerable:!0,get:function(){return yP.skip}}),_P=Mv,Object.defineProperty(f,"skipLast",{enumerable:!0,get:function(){return _P.skipLast}}),vP=Dv,Object.defineProperty(f,"skipUntil",{enumerable:!0,get:function(){return vP.skipUntil}}),mP=zv,Object.defineProperty(f,"skipWhile",{enumerable:!0,get:function(){return mP.skipWhile}}),gP=Hv,Object.defineProperty(f,"startWith",{enumerable:!0,get:function(){return gP.startWith}}),OP=Rs,Object.defineProperty(f,"subscribeOn",{enumerable:!0,get:function(){return OP.subscribeOn}}),wP=Zv,Object.defineProperty(f,"switchAll",{enumerable:!0,get:function(){return wP.switchAll}}),EP=Qv,Object.defineProperty(f,"switchMap",{enumerable:!0,get:function(){return EP.switchMap}}),PP=rm,Object.defineProperty(f,"switchMapTo",{enumerable:!0,get:function(){return PP.switchMapTo}}),SP=im,Object.defineProperty(f,"switchScan",{enumerable:!0,get:function(){return SP.switchScan}}),TP=Th,Object.defineProperty(f,"take",{enumerable:!0,get:function(){return TP.take}}),jP=ly,Object.defineProperty(f,"takeLast",{enumerable:!0,get:function(){return jP.takeLast}}),CP=sm,Object.defineProperty(f,"takeUntil",{enumerable:!0,get:function(){return CP.takeUntil}}),IP=dm,Object.defineProperty(f,"takeWhile",{enumerable:!0,get:function(){return IP.takeWhile}}),RP=ym,Object.defineProperty(f,"tap",{enumerable:!0,get:function(){return RP.tap}}),kP=P,Object.defineProperty(f,"throttle",{enumerable:!0,get:function(){return kP.throttle}}),AP=Sm,Object.defineProperty(f,"throttleTime",{enumerable:!0,get:function(){return AP.throttleTime}}),MP=sb,Object.defineProperty(f,"throwIfEmpty",{enumerable:!0,get:function(){return MP.throwIfEmpty}}),NP=Im,Object.defineProperty(f,"timeInterval",{enumerable:!0,get:function(){return NP.timeInterval}}),xP=es,Object.defineProperty(f,"timeout",{enumerable:!0,get:function(){return xP.timeout}}),UP=Nm,Object.defineProperty(f,"timeoutWith",{enumerable:!0,get:function(){return UP.timeoutWith}}),DP=Fs,Object.defineProperty(f,"timestamp",{enumerable:!0,get:function(){return DP.timestamp}}),LP=dd,Object.defineProperty(f,"toArray",{enumerable:!0,get:function(){return LP.toArray}}),FP=Ct,Object.defineProperty(f,"window",{enumerable:!0,get:function(){return FP.window}}),BP=Hm,Object.defineProperty(f,"windowCount",{enumerable:!0,get:function(){return BP.windowCount}}),WP=Qm,Object.defineProperty(f,"windowTime",{enumerable:!0,get:function(){return WP.windowTime}}),zP=Ts,Object.defineProperty(f,"windowToggle",{enumerable:!0,get:function(){return zP.windowToggle}}),qP=Bt,Object.defineProperty(f,"windowWhen",{enumerable:!0,get:function(){return qP.windowWhen}}),VP=_0,Object.defineProperty(f,"withLatestFrom",{enumerable:!0,get:function(){return VP.withLatestFrom}}),HP=T,Object.defineProperty(f,"zip",{enumerable:!0,get:function(){return HP.zip}}),GP=O,Object.defineProperty(f,"zipAll",{enumerable:!0,get:function(){return GP.zipAll}}),YP=j,Object.defineProperty(f,"zipWith",{enumerable:!0,get:function(){return YP.zipWith}});var E={},JP=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())})},$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:[]},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}}}},eS=(Object.defineProperty(E,"__esModule",{value:!0}),e),tS=Lr,rS=w,nS=0,oS=1,iS=2;function uS(e,t){e=e.pipe((0,rS.publishReplay)(1),(0,rS.refCount)());this._result=e,this._keys=e.pipe((0,rS.mergeMap)(function(e){return(0,tS.from)(e.keys())}),(0,rS.publishReplay)(1),(0,rS.refCount)()),this._records=void 0,this._controls=new aS,this._summary=new tS.ReplaySubject,this._state=t||nS}uS.prototype.keys=function(){return this._keys},uS.prototype.records=function(){var r=this,e=this._result.pipe((0,rS.mergeMap)(function(t){return new tS.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},uS.prototype.consume=function(){var r=this;return this._result.pipe((0,rS.mergeMap)(function(t){return new tS.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},uS.prototype.pause=function(){this._controls.pause()},uS.prototype.resume=function(){return this._controls.resume()},uS.prototype.push=function(){return this._controls.push()},uS.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<oS?(this._state=oS,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,eS.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},uS.prototype._toObservable=function(){var n=this;return new tS.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new uS((t=e,new tS.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},uS.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new aS);var a=new tS.Subject,s=function(n){return JP(e,void 0,void 0,function(){var t,r;return $P(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 JP(this,void 0,void 0,function(){return $P(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 JP(t,void 0,void 0,function(){var t,r;return $P(this,function(e){switch(e.label){case 0:return this._state=iS,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=iS,t._summary.error(e)}},this._controls),this._records)},E.default=uS;sS.prototype.pause=function(){this._paused=!0},Object.defineProperty(sS.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(sS.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),sS.prototype.resume=function(){return JP(this,void 0,void 0,function(){var t;return $P(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]}})})},sS.prototype.push=function(){return JP(this,void 0,void 0,function(){return $P(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(sS.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var aS=sS;function sS(e){void 0===e&&(e=function(){return JP(t,void 0,void 0,function(){return $P(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var p={},i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cS=(Object.defineProperty(p,"__esModule",{value:!0}),Lr),lS=i(E);function fS(e){this._txc=e}i(e),fS.prototype.run=function(e,r){var n=this;return new lS.default(new cS.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},fS.prototype.commit=function(){var e=this;return new cS.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},fS.prototype.rollback=function(){var e=this;return new cS.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},fS.prototype.isOpen=function(){return this._txc.isOpen()},fS.prototype.close=function(){var e=this;return new cS.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},p.default=fS;b={},l=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function pS(e){e=e.run;this._run=e}Object.defineProperty(b,"__esModule",{value:!0}),l(E),l(p),pS.fromTransaction=function(e){return new pS({run:e.run.bind(e)})},pS.prototype.run=function(e,t){return this._run(e,t)},b.default=pS;var ju={},dS=(Object.defineProperty(ju,"__esModule",{value:!0}),e),hS=Lr,bS=w,yS=(dS.internal.logger.Logger,dS.error.SERVICE_UNAVAILABLE);function _S(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=vS(void 0===t?3e4:t,3e4),this._initialDelay=vS(r,1e3),this._delayMultiplier=vS(n,2),this._delayJitter=vS(o,.2),this._logger=e}function vS(e,t){return e||0===e?e:t}_S.prototype.retry=function(e){var a=this;return e.pipe((0,bS.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,bS.mergeMap)(function(e){if(!(0,dS.isRetriableError)(e))return(0,hS.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,dS.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),yS)).seenErrors=n,(0,hS.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,hS.of)(1).pipe((0,bS.delay)(r))}))}))},_S.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},ju.default=_S;var $u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mS=(Object.defineProperty(Gr,"__esModule",{value:!0}),Lr),gS=w,OS=$u(E),ca=e,wS=$u(p),ES=$u(b),PS=$u(ju),da=ca.internal.constants,SS=da.ACCESS_MODE_READ,TS=da.ACCESS_MODE_WRITE,jS=ca.internal.txConfig.TxConfig;function CS(e){var e=void 0===e?{}:e,t=e.session,e=e.config;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new PS.default({maxRetryTimeout:e})}(e)}CS.prototype.run=function(e,r,n){var o=this;return new OS.default(new mS.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},CS.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e)},CS.prototype.readTransaction=function(e,t){return this._runTransaction(SS,e,t)},CS.prototype.writeTransaction=function(e,t){return this._runTransaction(TS,e,t)},CS.prototype.executeRead=function(e,t){return this._executeInTransaction(SS,e,t)},CS.prototype.executeWrite=function(e,t){return this._executeInTransaction(TS,e,t)},CS.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new ES.default({run:e.run.bind(e)})})},CS.prototype.close=function(){var e=this;return new mS.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},CS.prototype.lastBookmark=function(){return this.lastBookmarks()},CS.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},CS.prototype._beginTransaction=function(e,t){var r=this,n=jS.empty();return t&&(n=new jS(t)),new mS.Observable(function(t){try{r._session._beginTransaction(e,n).then(function(e){t.next(new wS.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},CS.prototype._runTransaction=function(e,r,t,n){void 0===n&&(n=function(e){return e});var o=jS.empty();return t&&(o=new jS(t)),this._retryLogic.retry(this._beginTransaction(e,o).pipe((0,gS.mergeMap)(function(t){return(0,mS.defer)(function(){try{return r(n(t))}catch(e){return(0,mS.throwError)(function(){return e})}}).pipe((0,gS.catchError)(function(e){return t.rollback().pipe((0,gS.concatWith)((0,mS.throwError)(function(){return e})))}),(0,gS.concatWith)(t.commit()))})))},Gr.default=CS;var IS,RS,xu=r&&r.__extends||(IS=function(e,t){return(IS=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}IS(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),v=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},X=(Object.defineProperty(B,"__esModule",{value:!0}),B.WRITE=B.READ=B.Driver=void 0,e),kS=v(Gr),AS=X.internal.constants.FETCH_ALL,Cu=X.driver.READ,MS=X.driver.WRITE,o=(B.READ=Cu,B.WRITE=MS,xu(NS,RS=X.Driver),NS.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,e=e.notificationFilter;return new kS.default({session:this._newSession({defaultAccessMode:void 0===t?MS:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:i,reactive:!1,fetchSize:function(e,t){e=parseInt(e,10);{if(0<e||e===AS)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(AS," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:e}),config:this._config})},NS);function NS(){return null!==RS&&RS.apply(this,arguments)||this}B.Driver=o,B.default=o;t={},Object.defineProperty(t,"__esModule",{value:!0}),t.default="5.7.0",h={},Qa={},qa={};function xS(){}Object.defineProperty(qa,"__esModule",{value:!0}),xS.prototype.selectReader=function(e){throw new Error("Abstract function")},xS.prototype.selectWriter=function(e){throw new Error("Abstract function")},qa.default=xS;Ga={},Ka={};function US(e){this._offset=e||0}Object.defineProperty(Ka,"__esModule",{value:!0}),US.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},Ka.default=US;var DS,LS,Wa=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)}),Ks=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},FS=(Object.defineProperty(Ga,"__esModule",{value:!0}),Ks(Ka)),Q=Ks(qa),xs=(LS=Q.default,Wa(BS,LS),BS.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},BS.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},BS.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},BS);function BS(e){var t=LS.call(this)||this;return t._readersIndex=new FS.default,t._writersIndex=new FS.default,t._connectionPool=e,t}Ga.default=xs;y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.LeastConnectedLoadBalancingStrategy=Qa.LoadBalancingStrategy=void 0,Za=y(qa),Qa.LoadBalancingStrategy=Za.default,Jc=y(Ga),Qa.LeastConnectedLoadBalancingStrategy=Jc.default,Qa.default=Jc.default,_={},_l={},Ul={},Dl={},Vl={},Da={},el={},il={byteLength:function(e){var e=YS(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};il.toByteArray=function(e){var t,r,n=YS(e),o=n[0],n=n[1],i=new qS(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=zS[e.charCodeAt(r)]<<18|zS[e.charCodeAt(r+1)]<<12|zS[e.charCodeAt(r+2)]<<6|zS[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=zS[e.charCodeAt(r)]<<2|zS[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=zS[e.charCodeAt(r)]<<10|zS[e.charCodeAt(r+1)]<<4|zS[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},il.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 WS[e>>18&63]+WS[e>>12&63]+WS[e>>6&63]+WS[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(WS[t>>2]+WS[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(WS[t>>10]+WS[t>>4&63]+WS[t<<2&63]+"="));return o.join("")};for(var WS=[],zS=[],qS="undefined"!=typeof Uint8Array?Uint8Array:Array,VS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",HS=0,GS=VS.length;HS<GS;++HS)WS[HS]=VS[HS],zS[VS.charCodeAt(HS)]=HS;function YS(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]}zS["-".charCodeAt(0)]=62,zS["_".charCodeAt(0)]=63;Ba={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 KS=el;const BM=il,WM=Ba,zM=(Ws="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,KS.Buffer=k,KS.SlowBuffer=function(e){+e!=e&&(e=0);return k.alloc(+e)},KS.INSPECT_MAX_BYTES=50,2147483647);function ZS(e){if(e>zM)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 QS(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return JS(e)}function QS(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|r1(n,o);let e=ZS(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return S1(o=t,Uint8Array)?e1((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):$S(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(S1(t,ArrayBuffer)||t&&S1(t.buffer,ArrayBuffer))return e1(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(S1(t,SharedArrayBuffer)||t&&S1(t.buffer,SharedArrayBuffer)))return e1(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|t1(e.length),0===(r=ZS(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||T1(e.length)?ZS(0):$S(e);if("Buffer"===e.type&&Array.isArray(e.data))return $S(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 XS(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 JS(e){return XS(e),ZS(e<0?0:0|t1(e))}function $S(t){var r=t.length<0?0:0|t1(t.length);const n=ZS(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function e1(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 t1(e){if(e>=zM)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zM.toString(16)+" bytes");return 0|e}function r1(e,t){if(k.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||S1(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 w1(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return E1(e).length;default:if(o)return n?-1:w1(e).length;t=(""+t).toLowerCase(),o=!0}}function n1(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+=GM[o[e]];return t;return}case"utf8":case"utf-8":return c1(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?BM.fromByteArray(d):BM.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 o1(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i1(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=T1(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:u1(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):u1(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function u1(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 a1(e,t,r,n){return P1(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 s1(e,t,r,n){return P1(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 c1(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<=qM)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=qM));return e}}KS.kMaxLength=zM,(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=QS,Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(e,t,r){return t=t,r=r,XS(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?ZS(e).fill(t,r):ZS(e).fill(t):ZS(e)},k.allocUnsafe=JS,k.allocUnsafeSlow=JS,k.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==k.prototype},k.compare=function(r,n){if(S1(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),S1(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(S1(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=r1,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)o1(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)o1(this,e,e+3),o1(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)o1(this,e,e+7),o1(this,e+1,e+6),o1(this,e+2,e+5),o1(this,e+3,e+4);return this},k.prototype.toLocaleString=k.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?c1(this,0,e):n1.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=KS.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},Ws&&(k.prototype[Ws]=k.prototype.inspect),k.prototype.compare=function(e,t,r,n,o){if(S1(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 i1(this,e,t,r,!0)},k.prototype.lastIndexOf=function(e,t,r){return i1(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(T1(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,P1(w1(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return a1(this,t,r,n);case"base64":return i=this,u=r,o=n,P1(E1(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s1(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 qM=4096;function l1(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 f1(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 p1(e,t,r,n,o){m1(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 d1(e,t,r,n,o){m1(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 h1(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 b1(e,t,r,n,o){return t=+t,r>>>=0,o||h1(e,0,r,4),WM.write(e,t,r,n,23,4),r+4}function y1(e,t,r,n,o){return t=+t,r>>>=0,o||h1(e,0,r,8),WM.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||l1(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||l1(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||l1(e,1,this.length),this[e]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,t){return e>>>=0,t||l1(e,2,this.length),this[e]|this[e+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,t){return e>>>=0,t||l1(e,2,this.length),this[e]<<8|this[e+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,t){return e>>>=0,t||l1(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||l1(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},k.prototype.readBigUInt64LE=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||O1(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=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||O1(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||l1(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||l1(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||l1(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},k.prototype.readInt16LE=function(e,t){e>>>=0,t||l1(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||l1(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||l1(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||l1(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},k.prototype.readBigInt64LE=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||O1(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=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||O1(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||l1(e,4,this.length),WM.read(this,e,!0,23,4)},k.prototype.readFloatBE=function(e,t){return e>>>=0,t||l1(e,4,this.length),WM.read(this,e,!1,23,4)},k.prototype.readDoubleLE=function(e,t){return e>>>=0,t||l1(e,8,this.length),WM.read(this,e,!0,52,8)},k.prototype.readDoubleBE=function(e,t){return e>>>=0,t||l1(e,8,this.length),WM.read(this,e,!1,52,8)},k.prototype.writeUintLE=k.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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=j1(function(e,t=0){return p1(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=j1(function(e,t=0){return d1(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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=j1(function(e,t=0){return p1(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=j1(function(e,t=0){return d1(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeFloatLE=function(e,t,r){return b1(this,e,t,!0,r)},k.prototype.writeFloatBE=function(e,t,r){return b1(this,e,t,!1,r)},k.prototype.writeDoubleLE=function(e,t,r){return y1(this,e,t,!0,r)},k.prototype.writeDoubleBE=function(e,t,r){return y1(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 VM={};function _1(e,t,r){VM[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 v1(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 m1(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 VM.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,g1(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||O1(u,r.length-(n+1))}function g1(e,t){if("number"!=typeof e)throw new VM.ERR_INVALID_ARG_TYPE(t,"number",e)}function O1(e,t,r){if(Math.floor(e)!==e)throw g1(e,r),new VM.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new VM.ERR_BUFFER_OUT_OF_BOUNDS;throw new VM.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}_1("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),_1("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),_1("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=v1(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=v1(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const HM=/[^+/0-9A-Za-z-_]/g;function w1(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 E1(e){return BM.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(HM,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function P1(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 S1(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function T1(e){return e!=e}const GM=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 j1(e){return"undefined"==typeof BigInt?C1:e}function C1(){throw new Error("BigInt not supported")}}var I1,mf={},Aa={},s=r&&r.__extends||(I1=function(e,t){return(I1=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}I1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Nf=(Object.defineProperty(Aa,"__esModule",{value:!0}),A.prototype.getUInt8=function(e){throw new Error("Not implemented")},A.prototype.getInt8=function(e){throw new Error("Not implemented")},A.prototype.getFloat64=function(e){throw new Error("Not implemented")},A.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},A.prototype.putInt8=function(e,t){throw new Error("Not implemented")},A.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},A.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},A.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},A.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},A.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},A.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)},A.prototype.getSlice=function(e,t){return new k1(e,t,this)},A.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},A.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},A.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)},A.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)},A.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)},A.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},A.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},A.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},A.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},A.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},A.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},A.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},A.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},A.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},A.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},A.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},A.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},A.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},A.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},A.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},A.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},A.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},A.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},A.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},A.prototype.remaining=function(){return this.length-this.position},A.prototype.hasRemaining=function(){return 0<this.remaining()},A.prototype.reset=function(){this.position=0},A.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},A.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},A);function A(e){this.position=0,this.length=e}Aa.default=Nf;s(A1,R1=Nf),A1.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},A1.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},A1.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},A1.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},A1.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},A1.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var R1,k1=A1;function A1(e,t,r){t=R1.call(this,t)||this;return t._start=e,t._inner=r,t}var M1,N1,zf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Vf=(Object.defineProperty(mf,"__esModule",{value:!0}),mf.BaseBuffer=void 0,zf(Aa)),Jf=(mf.BaseBuffer=Vf.default,mf.default=Vf.default,r&&r.__extends||(M1=function(e,t){return(M1=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}M1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),op=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},x1=(Object.defineProperty(Da,"__esModule",{value:!0}),Da.alloc=void 0,op(el)),Fa=op(mf),U1=(N1=Fa.default,Jf(D1,N1),D1.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},D1.prototype.getInt8=function(e){return this._buffer.readInt8(e)},D1.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},D1.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},D1.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},D1.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},D1.prototype.putBytes=function(e,t){var r;t instanceof D1?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):N1.prototype.putBytes.call(this,e,t)},D1.prototype.getSlice=function(e,t){return new D1(this._buffer.slice(e,e+t))},D1);function D1(e){var t=this,e=(e=e)instanceof x1.default.Buffer?e:"number"==typeof e&&"function"==typeof x1.default.Buffer.alloc?x1.default.Buffer.alloc(e):new x1.default.Buffer(e);return(t=N1.call(this,e.length)||this)._buffer=e,t}Da.default=U1,Da.alloc=function(e){return new U1(e)};var gf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},L1=(Object.defineProperty(Vl,"__esModule",{value:!0}),gf(Da)),F1=e,ap=F1.internal.util,B1=ap.ENCRYPTION_OFF,W1=ap.ENCRYPTION_ON;function z1(e,t,r){void 0===t&&(t=q1),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,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===W1}(e),n=function(e){return!1===e.encrypted||e.encrypted===B1}(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,F1.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:"'+B1+'"` 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 L1.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function q1(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}z1.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,F1.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,F1.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))},z1.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof L1.default))throw(0,F1.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()}}},z1.prototype.close=function(){var r=this;return new Promise(function(e,t){r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._clearConnectionTimeout(),r._ws.onclose=function(){return e()},r._ws.close()):e()})},z1.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},z1.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},z1.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},z1.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,F1.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))},z1.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},z1.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},Vl.default=z1;var V1,fp={},La=r&&r.__extends||(V1=function(e,t){return(V1=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}V1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(fp,"__esModule",{value:!0});var H1,Tu=e.internal.resolver.BaseHostNameResolver,Mf=(La(G1,H1=Tu),G1.prototype.resolve=function(e){return this._resolveToItself(e)},G1);function G1(){return null!==H1&&H1.apply(this,arguments)||this}fp.default=Mf;var Y1,g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gp=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.HostNameResolver=Dl.Channel=void 0,g(Vl)),u=g(fp),C=(Dl.Channel=gp.default,Dl.HostNameResolver=u.default,{}),Hf={},xf=r&&r.__extends||(Y1=function(e,t){return(Y1=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}Y1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Hf,"__esModule",{value:!0});var K1,Z1=Da,Op=(K1=mf.BaseBuffer,xf(Q1,K1),Q1.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}},Q1.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}},Q1.prototype.getFloat64=function(e){for(var t=(0,Z1.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},Q1);function Q1(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=K1.call(this,r)||this)._buffers=e,t}Hf.default=Op;var X1,J1,Sp=r&&r.__extends||(X1=function(e,t){return(X1=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}X1(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}},Np=(Object.defineProperty(C,"__esModule",{value:!0}),C.Dechunker=C.Chunker=void 0,Ip(Aa)),$1=Da,eT=Ip(Hf),Fp=(J1=Np.default,Sp(tT,J1),tT.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},tT.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},tT.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},tT.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},tT.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,$1.alloc)(this._bufferSize),this._chunkOpen=!1),this},tT.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},tT.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)},tT.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},tT);function tT(e,t){var r=J1.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,$1.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function rT(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}C.Chunker=Fp,rT.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},rT.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},rT.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)},rT.prototype.CLOSED=function(e){},rT.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 eT.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},rT.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},C.Dechunker=rT;var Kp={},nT=(Object.defineProperty(Kp,"__esModule",{value:!0}),e),rd=nT.internal.util,ad=rd.ENCRYPTION_OFF,fd=rd.ENCRYPTION_ON,oT=nT.error.SERVICE_UNAVAILABLE,iT=[null,void 0,!0,!1,fd,ad],uT=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];Kp.default=function(e,t,r){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==iT.indexOf(e))return e;throw(0,nT.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(iT))}(t),this.trust=function(e){e=e.trust;if(-1!==uT.indexOf(e))return e;throw(0,nT.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(uT))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||oT,this.connectionTimeout=t.connectionTimeout};var aT,sT,pd={},Id={},Cd={exports:{}};function cT(e,t){for(var r in e)t[r]=e[r]}function lT(e,t,r){return sT(e,t,r)}vl=(Kd=Cd).exports,(sT=(aT=el).Buffer).from&&sT.alloc&&sT.allocUnsafe&&sT.allocUnsafeSlow?Kd.exports=aT:(cT(aT,vl),vl.Buffer=lT),lT.prototype=Object.create(sT.prototype),cT(sT,lT),lT.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return sT(e,t,r)},lT.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=sT(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},lT.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return sT(e)},lT.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return aT.SlowBuffer(e)};var fT=Cd.exports.Buffer,pT=fT.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 dT(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||fT.isEncoding!==pT&&pT(e))return t||e;throw new Error("Unknown encoding: "+e)}function hT(e){var t;switch(this.encoding=dT(e),this.encoding){case"utf16le":this.text=_T,this.end=vT,t=4;break;case"utf8":this.fillLast=yT,t=4;break;case"base64":this.text=mT,this.end=gT,t=3;break;default:return this.write=OT,void(this.end=wT)}this.lastNeed=0,this.lastTotal=0,this.lastChar=fT.allocUnsafe(t)}function bT(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function yT(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 _T(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 vT(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 mT(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 gT(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function OT(e){return e.toString(this.encoding)}function wT(e){return e&&e.length?this.write(e):""}(Id.StringDecoder=hT).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||""},hT.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},hT.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=bT(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=bT(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=bT(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)},hT.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 ET,PT,ST,TT,jT,xc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},CT=(Object.defineProperty(pd,"__esModule",{value:!0}),xc(Da)),IT=e,RT=xc(el),kT=new Id.StringDecoder("utf8");pd.default={encode:function(e){return new CT.default((e=e,"function"==typeof RT.default.Buffer.from?RT.default.Buffer.from(e,"utf8"):new RT.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 kT.write(e._buffer)},r=function(){return kT.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,IT.newError)("Don't know how to decode strings from '".concat(e,"'"))}},Vd=Ul,ET=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]}),Yd=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||ET(t,e,r)},PT=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.utf8=Vd.alloc=Vd.ChannelConfig=void 0,Yd(Dl,Vd),Yd(C,Vd),ST=Kp,Object.defineProperty(Vd,"ChannelConfig",{enumerable:!0,get:function(){return PT(ST).default}}),TT=Da,Object.defineProperty(Vd,"alloc",{enumerable:!0,get:function(){return TT.alloc}}),jT=pd,Object.defineProperty(Vd,"utf8",{enumerable:!0,get:function(){return PT(jT).default}}),Object.defineProperty(_l,"__esModule",{value:!0});var AT=Ul,MT=e,NT=1616949271;function xT(e,t){return{major:e,minor:t}}function UT(){var e=[[xT(5,2),xT(5,0)],[xT(4,4),xT(4,2)],xT(4,1),xT(3,0)];if(4<e.length)throw(0,MT.newError)("It should not have more than 4 versions of the protocol");var o=(0,AT.alloc)(20);return o.writeInt32(NT),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}_l.default=function(t){var o=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(o),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw(0,MT.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);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(UT())})};var DT,oh={},ih={},dh={},R={},Oh={},Ph=r&&r.__extends||(DT=function(e,t){return(DT=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}DT(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}},Hh=(Object.defineProperty(Oh,"__esModule",{value:!0}),Sh(e),LT.ofRecord=function(e){return null===e?LT.ofNull():new GT(e)},LT.ofMessageResponse=function(e){return null===e?LT.ofNull():new BT(e)},LT.ofNull=function(){return new qT},Object.defineProperty(LT.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(LT.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(LT.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(LT.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),LT);function LT(){}Oh.default=Hh;Ph(WT,FT=Hh),Object.defineProperty(WT.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(WT.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(WT.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(WT.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var FT,BT=WT;function WT(e){var t=FT.call(this)||this;return t._response=e,t}Ph(VT,zT=Hh),Object.defineProperty(VT.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var zT,qT=VT;function VT(){return null!==zT&&zT.apply(this,arguments)||this}Ph(YT,HT=Hh),Object.defineProperty(YT.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var HT,GT=YT;function YT(e){var t=HT.call(this)||this;return t._record=e,t}var KT,Zh=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)}),eb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ZT=(Object.defineProperty(R,"__esModule",{value:!0}),R.ProcedureRouteObserver=R.RouteObserver=R.CompletedObserver=R.FailedObserver=R.ResetObserver=R.LogoffObserver=R.LoginObserver=R.ResultStreamObserver=R.StreamObserver=void 0,e),QT=eb(Oh),XT=ZT.internal.constants.FETCH_ALL,JT=ZT.error.PROTOCOL_ERROR,ib=($T.prototype.onNext=function(e){},$T.prototype.onError=function(e){},$T.prototype.onCompleted=function(e){},$T);function $T(){}R.StreamObserver=ib;Zh(tj,ej=ib),tj.prototype.pause=function(){this._paused=!0},tj.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},tj.prototype.onNext=function(e){var t=new ZT.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))},tj.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},tj.prototype.onError=function(e){this._state.onError(this,e)},tj.prototype.cancel=function(){this._discard=!0},tj.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(yj.STREAMING)},tj.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(yj.SUCCEEDED)},tj.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===yj.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===yj.READY&&this._handleStreaming()},tj.prototype._handleHasMore=function(e){this._setState(yj.READY),this._handleStreaming(),delete e.has_more},tj.prototype._handlePullSuccess=function(e){var t,r=this,n=Object.assign(this._server?{server:this._server}:{},this._meta,e);[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(yj.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,ZT.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),JT))},tj.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;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()}},tj.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(yj.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},tj.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},tj.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):this._moreFunction(this._queryId,this._fetchSize,this),this._setState(yj.STREAMING)},tj.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},tj.prototype._setState=function(e){this._state=e},tj.prototype._setupAutoPull=function(){this._autoPull=!0};var ej,ab=tj;function tj(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?XT: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,e=e.lowRecordWatermark,e=void 0===e?Number.MAX_VALUE:e,d=ej.call(this)||this;return d._fieldKeys=null,d._fieldLookup=null,d._head=null,d._queuedRecords=[],d._tail=null,d._error=null,d._observers=[],d._meta={},d._server=f,d._beforeError=i,d._afterError=u,d._beforeKeys=a,d._afterKeys=s,d._beforeComplete=c,d._afterComplete=l,d._queryId=null,d._moreFunction=r,d._discardFunction=n,d._discard=!1,d._fetchSize=o,d._lowRecordWatermark=e,d._highRecordWatermark=p,d._setState(t?yj.READY:yj.READY_STREAMING),d._setupAutoPull(),d._paused=!1,d}R.ResultStreamObserver=ab;Zh(nj,rj=ib),nj.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when initializing "+ZT.json.stringify(e)))},nj.prototype.onError=function(e){this._onError&&this._onError(e)},nj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var rj,vb=nj;function nj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=rj.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LoginObserver=vb;Zh(ij,oj=ib),ij.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when logging off "+ZT.json.stringify(e)))},ij.prototype.onError=function(e){this._onError&&this._onError(e)},ij.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var oj,Eb=ij;function ij(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=oj.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LogoffObserver=Eb;Zh(aj,uj=ib),aj.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when resetting: received record is: "+ZT.json.stringify(e),JT))},aj.prototype.onError=function(e){e.code===JT&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},aj.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var uj,Tb=aj;function aj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=uj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}R.ResetObserver=Tb;Zh(cj,sj=ab);var sj,jb=cj;function cj(e){var t=e.error,e=e.onError,e=sj.call(this,{beforeError:e})||this;return e.onError(t),e}R.FailedObserver=jb;Zh(fj,lj=ab);var lj,Cb=fj;function fj(){var e=lj.call(this)||this;return lj.prototype.markCompleted.call(e),e}R.CompletedObserver=Cb;Zh(dj,pj=ib),dj.prototype.onNext=function(e){this._records.push(e)},dj.prototype.onError=function(e){e.code===JT&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},dj.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,ZT.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+ZT.json.stringify(this._records),JT)):this._onCompleted&&this._onCompleted(QT.default.ofRecord(this._records[0]))};var pj,xb=dj;function dj(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=pj.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}R.ProcedureRouteObserver=xb;Zh(bj,hj=ib),bj.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when resetting: received record is: "+ZT.json.stringify(e),JT))},bj.prototype.onError=function(e){e.code===JT&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},bj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(QT.default.ofMessageResponse(e))};var hj,Gf=bj;function bj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=hj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}R.RouteObserver=Gf;var yj={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(yj.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(){}}},_j=(Object.defineProperty(dh,"__esModule",{value:!0}),dh.assertNotificationFilterIsEmpty=dh.assertImpersonatedUserIsEmpty=dh.assertTxConfigIsEmpty=dh.assertDatabaseIsEmpty=void 0,e);dh.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,_j.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},dh.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,_j.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},dh.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,_j.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},dh.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,_j.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(_j.json.stringify(e),"."))).message),r.onError(t),t};Lb={},Bb={},Vb={},Yb={};Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.identity=void 0,Yb.identity=function(e){return e};var vj=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]}),mj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ey=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)&&vj(t,e,r);return mj(t,e),t},Rh=(Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.functional=void 0,Vb.functional=ey(Yb),{}),gj=(Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.verifyStructSize=Rh.Structure=void 0,e),Oj=gj.error.PROTOCOL_ERROR,uy=(Object.defineProperty(wj.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),wj.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+"])"},wj);function wj(e,t){this.signature=e,this.fields=t}Rh.Structure=uy,Rh.verifyStructSize=function(e,t,r){if(t!==r)throw(0,gj.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),Oj)},Rh.default=uy,Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.Unpacker=Bb.Packer=void 0;var Ej=Ul,Pj=Vb,Sj=Rh,Tj=e,jj=Tj.error.PROTOCOL_ERROR;function Cj(e){this._ch=e,this._byteArraysSupported=!0}function Ij(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}Cj.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=Pj.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,Tj.int)(o))};if((0,Tj.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 Sj.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))},Cj.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,Tj.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},Cj.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},Cj.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))},Cj.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},Cj.prototype.packString=function(e){var e=Ej.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,Tj.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)}},Cj.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,Tj.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)}},Cj.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,Tj.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])},Cj.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,Tj.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)}},Cj.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,Tj.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)}},Cj.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,Tj.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},Cj.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},Cj.prototype._nonPackableValue=function(e){return function(){throw(0,Tj.newError)(e,jj)}},Bb.Packer=Cj,Ij.prototype.unpack=function(e,t){void 0===t&&(t=Pj.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,Tj.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,Tj.newError)("Unknown packed value with marker "+r.toString(16))},Ij.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,Tj.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},Ij.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},Ij.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},Ij.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,Tj.int)(e):240<=e&&e<256?(0,Tj.int)(e-256):200===e?(0,Tj.int)(t.readInt8()):201===e?(0,Tj.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,Tj.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new Tj.Integer(e,r)):null},Ij.prototype._unpackString=function(e,t,r,n){return 128===t?Ej.utf8.decode(n,r):208===e?Ej.utf8.decode(n,n.readUInt8()):209===e?Ej.utf8.decode(n,n.readUInt16()):210===e?Ej.utf8.decode(n,n.readUInt32()):null},Ij.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},Ij.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},Ij.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},Ij.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},Ij.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},Ij.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},Ij.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},Ij.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new Sj.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},Bb.Unpacker=Ij;var Rj,kj,cy={},Uc=r&&r.__extends||(Rj=function(e,t){return(Rj=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}Rj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Aj=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]}),Mj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nh=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)&&Aj(t,e,r);return Mj(t,e),t},Oy=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.Unpacker=cy.Packer=void 0,Nh(Bb)),Sy=(kj=Oy.Packer,Uc(Nj,kj),Nj.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},Nj);function Nj(){return null!==kj&&kj.apply(this,arguments)||this}cy.Packer=Sy;xj=Oy.Unpacker,Uc(Uj,xj);var xj,xy=Uj;function Uj(e,t){return xj.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}cy.Unpacker=xy;var Dj=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]}),Lj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ml=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)&&Dj(t,e,r);return Lj(t,e),t},Cy=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.structure=Lb.v2=Lb.v1=void 0,ml(Bb)),gl=(Lb.v1=Cy,ml(cy)),Iy=(Lb.v2=gl,ml(Rh)),Ay=(Lb.structure=Iy,Lb.default=gl,{}),Fj=(Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.SIGNATURES=void 0,e),Ol=Fj.internal.constants,Bj=Ol.ACCESS_MODE_READ,Wj=Ol.FETCH_ALL,zj=Fj.internal.util.assertString,Gy=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),Zy=(Ay.SIGNATURES=Gy,M.init=function(e,t){return new M(1,[e,t],function(){return"INIT ".concat(e," {...}")})},M.run=function(e,t){return new M(16,[e,t],function(){return"RUN ".concat(e," ").concat(Fj.json.stringify(t))})},M.pullAll=function(){return Hj},M.reset=function(){return Gj},M.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 M(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},M.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new M(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},M.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return(t=void 0===t?null:t)&&(t.minimumSeverityLevel&&(n.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(n.notifications_disabled_categories=t.disabledCategories)),r&&(n.routing=r),new M(1,[n],function(){return"HELLO ".concat(Fj.json.stringify(n))})},M.logon=function(e){return new M(106,[e],function(){return"LOGON { ... }"})},M.logoff=function(){return new M(107,[],function(){return"LOGOFF"})},M.begin=function(e){var e=void 0===e?{}:e,t=qj(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new M(17,[t],function(){return"BEGIN ".concat(Fj.json.stringify(t))})},M.commit=function(){return Yj},M.rollback=function(){return Kj},M.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=qj(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new M(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(Fj.json.stringify(t)," ").concat(Fj.json.stringify(n))})},M.goodbye=function(){return Zj},M.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=Vj(null==t?-1:t,(void 0===e?Wj:e)||Wj);return new M(63,[r],function(){return"PULL ".concat(Fj.json.stringify(r))})},M.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=Vj(null==t?-1:t,(void 0===e?Wj:e)||Wj);return new M(47,[r],function(){return"DISCARD ".concat(Fj.json.stringify(r))})},M.route=function(e,t,r){return new M(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(Fj.json.stringify(e)," ").concat(Fj.json.stringify(t)," ").concat(r)})},M.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 M(102,[e,t,n],function(){return"ROUTE ".concat(Fj.json.stringify(e)," ").concat(Fj.json.stringify(t)," ").concat(Fj.json.stringify(n))})},M);function M(e,t,r){this.signature=e,this.fields=t,this.toString=r}function qj(e,t,r,n,o,i){var u={};return e.isEmpty()||(u.bookmarks=e.values()),null!==t.timeout&&(u.tx_timeout=t.timeout),t.metadata&&(u.tx_metadata=t.metadata),r&&(u.db=zj(r,"database")),o&&(u.imp_user=zj(o,"impersonatedUser")),n===Bj&&(u.mode="r"),i&&(i.minimumSeverityLevel&&(u.notifications_minimum_severity=i.minimumSeverityLevel),i.disabledCategories&&(u.notifications_disabled_categories=i.disabledCategories)),u}function Vj(e,t){t={n:(0,Fj.int)(t)};return-1!==e&&(t.qid=(0,Fj.int)(e)),t}var Hj=new(Ay.default=Zy)(63,[],function(){return"PULL_ALL"}),Gj=new Zy(15,[],function(){return"RESET"}),Yj=new Zy(18,[],function(){return"COMMIT"}),Kj=new Zy(19,[],function(){return"ROLLBACK"}),Zj=new Zy(2,[],function(){return"GOODBYE"}),S={},$y={},Qj=(Object.defineProperty($y,"__esModule",{value:!0}),$y.TypeTransformer=void 0,Lb),Xj=e.internal.objectUtil;function Jj(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 $j(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)}Jj.prototype.fromStructure=function(e){try{return e instanceof Qj.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return Xj.createBrokenObject(e)}},Jj.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},$y.default=Jj,$j.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new $j({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},$y.TypeTransformer=$j;var eC=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},tC=(Object.defineProperty(S,"__esModule",{value:!0}),e),rC=Lb,nC=$y,oC=tC.error.PROTOCOL_ERROR;S.default={createNodeTransformer:function(){return new nC.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof tC.Node},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("Node",3,e.size);var e=eC(e.fields,3),t=e[0],r=e[1],e=e[2];return new tC.Node(t,r,e)}})},createRelationshipTransformer:function(){return new nC.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof tC.Relationship},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("Relationship",5,e.size);var e=eC(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new tC.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new nC.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof tC.UnboundRelationship},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=eC(e.fields,3),t=e[0],r=e[1],e=e[2];return new tC.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new nC.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof tC.Path},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("Path",3,e.size);for(var e=eC(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,tC.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof tC.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof tC.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new tC.PathSegment(i,c,a)),i=a}return new tC.Path(t[0],t[t.length-1],o)}})}};var iC=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]}),uC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i_=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)&&iC(t,e,r);return uC(t,e),t},jt=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},aC=(Object.defineProperty(ih,"__esModule",{value:!0}),dh),sC=Lb,cC=i_(Ay),lC=R,fC=e,pC=jt(S),dC=jt($y),hC=fC.internal.bookmarks.Bookmarks,s_=fC.internal.constants,bC=s_.ACCESS_MODE_WRITE,yC=s_.BOLT_PROTOCOL_V1,_C=(fC.internal.logger.Logger,fC.internal.txConfig.TxConfig),l_=(Object.defineProperty(N.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new dC.default(Object.values(pC.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"version",{get:function(){return yC},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),N.prototype.packer=function(){return this._packer},N.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},N.prototype.unpacker=function(){return this._unpacker},N.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},N.prototype.transformMetadata=function(e){return e},N.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new lC.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,aC.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(cC.default.init(r,n),e,!0),e},N.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=(e.flush,new lC.LogoffObserver({onCompleted:t,onError:r})),t=(0,fC.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},N.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 lC.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,fC.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},N.prototype.prepareToClose=function(){},N.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})},N.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:hC.empty(),txConfig:_C.empty(),mode:bC,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},N.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:hC.empty(),txConfig:_C.empty(),mode:bC,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},N.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 lC.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,aC.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,aC.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,aC.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,aC.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(cC.default.run(e,t),a,!1),this.write(cC.default.pullAll(),a,d),a},Object.defineProperty(N.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),N.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,e=e.onComplete,t=new lC.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(cC.default.reset(),t,!0),t},N.prototype._createPacker=function(e){return new sC.v1.Packer(e)},N.prototype._createUnpacker=function(e,t){return new sC.v1.Unpacker(e,t)},N.prototype.write=function(e,t,r){this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature,t=new sC.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},N.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===cC.SIGNATURES.HELLO||this._lastMessageSignature===cC.SIGNATURES.LOGON},N.prototype.isLastMessageReset=function(){return this._lastMessageSignature===cC.SIGNATURES.RESET},N.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},N.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},N.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},N.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},N.prototype.isBroken=function(){return!!this._fatalError},N.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},N.prototype.resetFailure=function(){this._responseHandler._resetFailure()},N.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)},N.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},N);function N(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}}ih.default=l_;var h_={},__={},g_={},vC=(Object.defineProperty(g_,"__esModule",{value:!0}),g_.epochSecondAndNanoToLocalDateTime=g_.nanoOfDayToLocalTime=g_.epochDayToDate=void 0,e),n=vC.internal.temporalUtil,mC=n.DAYS_0000_TO_1970,gC=n.DAYS_PER_400_YEAR_CYCLE,OC=n.NANOS_PER_HOUR,wC=n.NANOS_PER_MINUTE,EC=n.NANOS_PER_SECOND,PC=n.SECONDS_PER_DAY,SC=n.floorDiv,TC=n.floorMod;function jC(e){var e=(e=(0,vC.int)(e)).add(mC).subtract(60),t=(0,vC.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(gC).subtract(1)).multiply(400),e=e.add(r.multiply(-gC))),e.multiply(400).add(591).div(gC)),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 vC.Date(r,n,e)}function CC(e){var t=(e=(0,vC.int)(e)).div(OC),r=(e=e.subtract(t.multiply(OC))).div(wC),n=(e=e.subtract(r.multiply(wC))).div(EC),e=e.subtract(n.multiply(EC));return new vC.LocalTime(t,r,n,e)}g_.epochDayToDate=jC,g_.nanoOfDayToLocalTime=CC,g_.epochSecondAndNanoToLocalDateTime=function(e,t){var r=SC(e,PC),e=TC(e,PC).multiply(EC).add(t),t=jC(r),r=CC(e);return new vC.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var IC=r&&r.__assign||function(){return(IC=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)},RC=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},P_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kC=(Object.defineProperty(__,"__esModule",{value:!0}),e),AC=Lb,MC=$y,NC=g_,I=P_(S),R_=kC.internal.temporalUtil,xC=R_.dateToEpochDay,UC=R_.localDateTimeToEpochSecond,DC=R_.localTimeToNanoOfDay;function LC(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,kC.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}__.default=IC(IC({},I.default),{createPoint2DTransformer:function(){return new MC.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,kC.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new AC.structure.Structure(88,[(0,kC.int)(e.srid),e.x,e.y])},fromStructure:function(e){AC.structure.verifyStructSize("Point2D",3,e.size);var e=RC(e.fields,3),t=e[0],r=e[1],e=e[2];return new kC.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new MC.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,kC.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new AC.structure.Structure(89,[(0,kC.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){AC.structure.verifyStructSize("Point3D",4,e.size);var e=RC(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new kC.Point(t,r,n,e)}})},createDurationTransformer:function(){return new MC.TypeTransformer({signature:69,isTypeInstance:kC.isDuration,toStructure:function(e){var t=(0,kC.int)(e.months),r=(0,kC.int)(e.days),n=(0,kC.int)(e.seconds),e=(0,kC.int)(e.nanoseconds);return new AC.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){AC.structure.verifyStructSize("Duration",4,e.size);var e=RC(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new kC.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new MC.TypeTransformer({signature:116,isTypeInstance:kC.isLocalTime,toStructure:function(e){e=DC(e.hour,e.minute,e.second,e.nanosecond);return new AC.structure.Structure(116,[e])},fromStructure:function(e){AC.structure.verifyStructSize("LocalTime",1,e.size);e=RC(e.fields,1)[0];return LC((0,NC.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new MC.TypeTransformer({signature:84,isTypeInstance:kC.isTime,toStructure:function(e){var t=DC(e.hour,e.minute,e.second,e.nanosecond),e=(0,kC.int)(e.timeZoneOffsetSeconds);return new AC.structure.Structure(84,[t,e])},fromStructure:function(e){AC.structure.verifyStructSize("Time",2,e.size);var e=RC(e.fields,2),t=e[0],e=e[1],t=(0,NC.nanoOfDayToLocalTime)(t);return LC(new kC.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new MC.TypeTransformer({signature:68,isTypeInstance:kC.isDate,toStructure:function(e){e=xC(e.year,e.month,e.day);return new AC.structure.Structure(68,[e])},fromStructure:function(e){AC.structure.verifyStructSize("Date",1,e.size);e=RC(e.fields,1)[0];return LC((0,NC.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new MC.TypeTransformer({signature:100,isTypeInstance:kC.isLocalDateTime,toStructure:function(e){var t=UC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,kC.int)(e.nanosecond);return new AC.structure.Structure(100,[t,e])},fromStructure:function(e){AC.structure.verifyStructSize("LocalDateTime",2,e.size);var e=RC(e.fields,2),t=e[0],e=e[1];return LC((0,NC.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new MC.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,kC.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=UC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,kC.int)(e.nanosecond),e=e.timeZoneId;return new AC.structure.Structure(102,[t,r,e])},fromStructure:function(e){AC.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=RC(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,NC.epochSecondAndNanoToLocalDateTime)(t,r);return LC(new kC.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 MC.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,kC.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=UC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,kC.int)(e.nanosecond),e=(0,kC.int)(e.timeZoneOffsetSeconds);return new AC.structure.Structure(70,[t,r,e])},fromStructure:function(e){AC.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=RC(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,NC.epochSecondAndNanoToLocalDateTime)(t,r);return LC(new kC.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var FC,BC,U_=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)}),W_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Y_=(Object.defineProperty(h_,"__esModule",{value:!0}),W_(ih)),WC=W_(Lb),m=e,zC=W_(__),qC=W_($y),VC=m.internal.constants.BOLT_PROTOCOL_V2,J_=(BC=Y_.default,U_(HC,BC),HC.prototype._createPacker=function(e){return new WC.default.Packer(e)},HC.prototype._createUnpacker=function(e,t){return new WC.default.Unpacker(e,t)},Object.defineProperty(HC.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new qC.default(Object.values(zC.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(HC.prototype,"version",{get:function(){return VC},enumerable:!1,configurable:!0}),HC);function HC(){return null!==BC&&BC.apply(this,arguments)||this}h_.default=J_;var GC,YC,nv={},av={},KC=r&&r.__assign||function(){return(KC=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)},hd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hv=(Object.defineProperty(av,"__esModule",{value:!0}),hd(__)),wv=(av.default=KC({},hv.default),r&&r.__extends||(GC=function(e,t){return(GC=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}GC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),ZC=r&&r.__assign||function(){return(ZC=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)},Sv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kv=(Object.defineProperty(nv,"__esModule",{value:!0}),Sv(h_)),QC=Sv(Ay),XC=dh,JC=R,$C=Sv(av),eI=Sv($y),tI=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),rI=e.internal.txConfig.TxConfig,nI="context",oI="CALL dbms.cluster.routing.getRoutingTable($".concat(nI,")"),iI=new JC.StreamObserver,Mv=(YC=kv.default,wv(uI,YC),Object.defineProperty(uI.prototype,"version",{get:function(){return tI},enumerable:!1,configurable:!0}),Object.defineProperty(uI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new eI.default(Object.values($C.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),uI.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},uI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new JC.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,XC.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(QC.default.hello(r,n),e,!0),e},uI.prototype.prepareToClose=function(){this.write(QC.default.goodbye(),iI,!0)},uI.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 JC.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,XC.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,XC.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,XC.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(QC.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},uI.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new JC.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(QC.default.commit(),t,!0),t},uI.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new JC.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(QC.default.rollback(),t,!0),t},uI.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 JC.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,XC.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,XC.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,XC.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(QC.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(QC.default.pullAll(),c,b),c},uI.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(oI,((t={})[nI]=void 0===r?{}:r,t),ZC(ZC({},n),{txConfig:rI.empty()}));return new JC.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},uI);function uI(){return null!==YC&&YC.apply(this,arguments)||this}nv.default=Mv;var aI,sI,Dv={},zv={},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)},Hv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Rs=(Object.defineProperty(zv,"__esModule",{value:!0}),Hv(av)),Zv=(zv.default=cI({},Rs.default),r&&r.__extends||(aI=function(e,t){return(aI=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}aI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),lI=r&&r.__assign||function(){return(lI=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)},Qv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rm=(Object.defineProperty(Dv,"__esModule",{value:!0}),Qv(nv)),fI=Qv(Ay),pI=dh,dI=R,hI=Qv(zv),bI=Qv($y),im=(e.internal.bookmarks.Bookmarks,e.internal.constants),yI=im.BOLT_PROTOCOL_V4_0,_I=im.FETCH_ALL,vI=e.internal.txConfig.TxConfig,mI="context",gI="database",OI="CALL dbms.routing.getRoutingTable($".concat(mI,", $").concat(gI,")"),Th=(sI=rm.default,Zv(wI,sI),Object.defineProperty(wI.prototype,"version",{get:function(){return yI},enumerable:!1,configurable:!0}),Object.defineProperty(wI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new bI.default(Object.values(hI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),wI.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 dI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,pI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,pI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(fI.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},wI.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===_?_I:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new dI.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,pI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,pI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(fI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(fI.default.pull({n:_}),c,b),c},wI.prototype._requestMore=function(e,t,r){this.write(fI.default.pull({stmtId:e,n:t}),r,!0)},wI.prototype._requestDiscard=function(e,t){this.write(fI.default.discard({stmtId:e}),t,!0)},wI.prototype._noOp=function(){},wI.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(OI,((t={})[mI]=void 0===r?{}:r,t[gI]=n,t),lI(lI({},o),{txConfig:vI.empty()}));return new dI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},wI);function wI(){return null!==sI&&sI.apply(this,arguments)||this}Dv.default=Th;var EI,PI,ly={},sm={},SI=r&&r.__assign||function(){return(SI=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)},dm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ym=(Object.defineProperty(sm,"__esModule",{value:!0}),dm(zv)),P=(sm.default=SI({},ym.default),r&&r.__extends||(EI=function(e,t){return(EI=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}EI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Sm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sb=(Object.defineProperty(ly,"__esModule",{value:!0}),Sm(Dv)),TI=Sm(Ay),jI=R,Im=e,CI=dh,II=Sm(sm),RI=Sm($y),kI=Im.internal.constants.BOLT_PROTOCOL_V4_1,es=(PI=sb.default,P(AI,PI),Object.defineProperty(AI.prototype,"version",{get:function(){return kI},enumerable:!1,configurable:!0}),Object.defineProperty(AI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new RI.default(Object.values(II.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),AI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new jI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,CI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(TI.default.hello(r,n,this._serversideRouting),e,!0),e},AI);function AI(e,t,r,n,o,i,u){e=PI.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}ly.default=es;var MI,NI,Nm={},Fs={},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)},dd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ct=(Object.defineProperty(Fs,"__esModule",{value:!0}),dd(sm)),Hm=(Fs.default=xI({},Ct.default),r&&r.__extends||(MI=function(e,t){return(MI=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}MI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Qm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ts=(Object.defineProperty(Nm,"__esModule",{value:!0}),Qm(ly)),Bt=e,UI=Qm(Fs),DI=Qm($y),LI=Bt.internal.constants.BOLT_PROTOCOL_V4_2,_0=(NI=Ts.default,Hm(FI,NI),Object.defineProperty(FI.prototype,"version",{get:function(){return LI},enumerable:!1,configurable:!0}),Object.defineProperty(FI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new DI.default(Object.values(UI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),FI);function FI(){return null!==NI&&NI.apply(this,arguments)||this}Nm.default=_0;var T={},O={},BI=r&&r.__assign||function(){return(BI=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}},f=(Object.defineProperty(O,"__esModule",{value:!0}),j(Fs)),i=(O.default=BI({},f.default),{}),l={},WI=r&&r.__assign||function(){return(WI=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)},Lr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w=(Object.defineProperty(l,"__esModule",{value:!0}),Lr(O)),zI=(l.default=WI({},w.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}),$u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qI=(Object.defineProperty(i,"__esModule",{value:!0}),Lb),VI=e,HI=$u(l),GI=g_,YI=Yb,KI=VI.internal.temporalUtil.localDateTimeToEpochSecond;function ZI(e,t,r){e=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),r=(0,VI.int)(t).multiply(1e3).add((0,VI.int)(r).div(1e6)).toNumber(),e=e.formatToParts(r).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:YI.identity:"literal"!==t.type&&(e[t.type]=(0,VI.int)(t.value)),e},{}),e.year=e.adjustEra(e.year),r=KI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond);return e.timeZoneOffsetSeconds=r.subtract(t),e.hour=e.hour.modulo(24),e}function QI(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,VI.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}i.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return HI.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){qI.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=zI(e.fields,3),t=e[0],r=e[1],e=e[2],t=ZI(e,t,r);return QI(new VI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,VI.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=KI(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=ZI(r,i,o),n=KI(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=ZI(r,i,o),KI(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,VI.int)(e.nanosecond),i=e.timeZoneId;return new qI.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return HI.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=KI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,VI.int)(e.nanosecond),e=(0,VI.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new qI.structure.Structure(73,[t,r,e])},fromStructure:function(e){qI.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=zI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,VI.int)(t).add(e),t=(0,GI.epochSecondAndNanoToLocalDateTime)(t,r);return QI(new VI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var XI,JI,ju=r&&r.__extends||(XI=function(e,t){return(XI=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}XI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),$I=r&&r.__assign||function(){return($I=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)},da=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ca=(Object.defineProperty(T,"__esModule",{value:!0}),da(Nm)),eR=da(Ay),tR=R,rR=dh,nR=da(O),oR=da(i),iR=da($y),uR=e.internal.bookmarks.Bookmarks,aR=e.internal.constants.BOLT_PROTOCOL_V4_3,v=(JI=ca.default,ju(sR,JI),Object.defineProperty(sR.prototype,"version",{get:function(){return aR},enumerable:!1,configurable:!0}),Object.defineProperty(sR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new iR.default(Object.values(nR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),sR.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 tR.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||uR.empty();return this.write(eR.default.route(t,e.values(),r),o,!0),o},sR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new tR.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,rR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(eR.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},sR.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},sR.prototype._applyUtcPatch=function(){var t=this;this._transformer=new iR.default(Object.values($I($I({},nR.default),oR.default)).map(function(e){return e(t._config,t._log)}))},sR);function sR(){return null!==JI&&JI.apply(this,arguments)||this}T.default=v;var cR,lR,Cu={},xu=r&&r.__extends||(cR=function(e,t){return(cR=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}cR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),fR=r&&r.__assign||function(){return(fR=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}},o=(Object.defineProperty(Cu,"__esModule",{value:!0}),X(T)),Ka=e,pR=X(Ay),dR=R,hR=dh,bR=X(l),yR=X(i),_R=X($y),Ks=Ka.internal.constants,vR=Ks.BOLT_PROTOCOL_V4_4,mR=Ks.FETCH_ALL,gR=Ka.internal.bookmarks.Bookmarks,Q=(lR=o.default,xu(OR,lR),Object.defineProperty(OR.prototype,"version",{get:function(){return vR},enumerable:!1,configurable:!0}),Object.defineProperty(OR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new _R.default(Object.values(bR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),OR.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 dR.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||gR.empty();return this.write(pR.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},OR.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===_?mR:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new dR.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,hR.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(pR.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(pR.default.pull({n:_}),c,b),c},OR.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 dR.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,hR.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(pR.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},OR.prototype._applyUtcPatch=function(){var t=this;this._transformer=new _R.default(Object.values(fR(fR({},bR.default),yR.default)).map(function(e){return e(t._config,t._log)}))},OR);function OR(){return null!==lR&&lR.apply(this,arguments)||this}Cu.default=Q;var Wa={},xs={},wR=r&&r.__assign||function(){return(wR=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)},ER=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},qa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},PR=(Object.defineProperty(xs,"__esModule",{value:!0}),Lb),SR=e,TR=qa(l),Za=qa(i);xs.default=wR(wR(wR({},TR.default),Za.default),{createNodeTransformer:function(e){return TR.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){PR.structure.verifyStructSize("Node",4,e.size);var e=ER(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new SR.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return TR.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){PR.structure.verifyStructSize("Relationship",8,e.size);var e=ER(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 SR.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return TR.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){PR.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=ER(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new SR.UnboundRelationship(t,r,n,e)}})}});var jR,CR,y=r&&r.__extends||(jR=function(e,t){return(jR=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}jR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ga=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jc=(Object.defineProperty(Wa,"__esModule",{value:!0}),Ga(Cu)),IR=dh,RR=Ga(xs),kR=Ga($y),AR=Ga(Ay),MR=R,NR=e.internal.constants.BOLT_PROTOCOL_V5_0,il=(CR=Jc.default,y(xR,CR),Object.defineProperty(xR.prototype,"version",{get:function(){return NR},enumerable:!1,configurable:!0}),Object.defineProperty(xR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new kR.default(Object.values(RR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),xR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new MR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,IR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(AR.default.hello(r,n,this._serversideRouting),e,!0),e},xR);function xR(){return null!==CR&&CR.apply(this,arguments)||this}Wa.default=il;var UR,DR,Ba={},Ws={},LR=r&&r.__assign||function(){return(LR=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}},Nf=(Object.defineProperty(Ws,"__esModule",{value:!0}),s(xs)),zf=(Ws.default=LR({},Nf.default),r&&r.__extends||(UR=function(e,t){return(UR=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}UR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),FR=r&&r.__assign||function(){return(FR=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)},Vf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},op=(Object.defineProperty(Ba,"__esModule",{value:!0}),Vf(Wa)),BR=dh,WR=Vf(Ws),zR=Vf($y),qR=Vf(Ay),VR=R,HR=e.internal.constants.BOLT_PROTOCOL_V5_1,Fa=(DR=op.default,zf(GR,DR),Object.defineProperty(GR.prototype,"version",{get:function(){return HR},enumerable:!1,configurable:!0}),Object.defineProperty(GR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new zR.default(Object.values(WR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(GR.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),GR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new VR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,BR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(qR.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(FR(FR({},e),a.metadata))},onError:i,flush:!0})},GR.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 VR.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(qR.default.logon(r),i,e),i},GR.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new VR.LogoffObserver({onCompleted:t,onError:r});return this.write(qR.default.logoff(),t,e),t},GR);function GR(){return null!==DR&&DR.apply(this,arguments)||this}Ba.default=Fa;var YR,KR,Jf={},gf={},ZR=r&&r.__assign||function(){return(ZR=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}},La=(Object.defineProperty(gf,"__esModule",{value:!0}),ap(Ws)),Tu=(gf.default=ZR({},La.default),r&&r.__extends||(YR=function(e,t){return(YR=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}YR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),QR=r&&r.__assign||function(){return(QR=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)},Mf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Vl=(Object.defineProperty(Jf,"__esModule",{value:!0}),Mf(Ba)),XR=Mf(gf),JR=Mf($y),$R=Mf(Ay),ek=R,g=e.internal.constants,tk=g.BOLT_PROTOCOL_V5_2,rk=g.FETCH_ALL,fp=(KR=Vl.default,Tu(nk,KR),Object.defineProperty(nk.prototype,"version",{get:function(){return tk},enumerable:!1,configurable:!0}),Object.defineProperty(nk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new JR.default(Object.values(XR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(nk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),nk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new ek.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write($R.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(QR(QR({},e),a.metadata))},onError:i,flush:!0})},nk.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 ek.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write($R.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},nk.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===_?rk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new ek.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($R.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write($R.default.pull({n:_}),c,b),c},nk);function nk(){return null!==KR&&KR.apply(this,arguments)||this}Jf.default=fp;var gp={},ok=(Object.defineProperty(gp,"__esModule",{value:!0}),e);function ik(){}function uk(e){return e}var ak={onNext:ik,onCompleted:ik,onError:ik};function sk(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.log,e=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=t||uk,this._observer=Object.assign({onPendingObserversChange:ik,onError:ik,onFailure:ik,onErrorApplyTransformation:uk},e)}Object.defineProperty(sk.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),sk.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(ok.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(ok.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(ok.json.stringify(e)));try{var n=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}(t.code),o=(0,ok.newError)(t.message,n);this._currentFailure=this._observer.onErrorApplyTransformation(o),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(ok.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,ok.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,ok.newError)("Unknown Bolt protocol message: "+e))}},sk.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onPendingObserversChange(this._pendingObservers.length)},sk.prototype._queueObserver=function(e){return(e=e||ak).onCompleted=e.onCompleted||ik,e.onError=e.onError||ik,e.onNext=e.onNext||ik,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onPendingObserversChange(this._pendingObservers.length),!0},sk.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)}},sk.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},sk.prototype._resetFailure=function(){this._currentFailure=null},gp.default=sk;var ck,u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lk=(Object.defineProperty(oh,"__esModule",{value:!0}),e),fk=u(ih),pk=u(h_),dk=u(nv),hk=u(Dv),bk=u(ly),yk=u(Nm),_k=u(T),vk=u(Cu),mk=u(Wa),gk=u(Ba),Ok=u(Jf),wk=u(gp);oh.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 wk.default({transformMetadata:t.transformMetadata.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 fk.default(p,d,h,y,v,_);case 2:return new pk.default(p,d,h,y,v,_);case 3:return new dk.default(p,d,h,y,v,_);case 4:return new hk.default(p,d,h,y,v,_);case 4.1:return new bk.default(p,d,h,y,v,_,b);case 4.2:return new yk.default(p,d,h,y,v,_,b);case 4.3:return new _k.default(p,d,h,y,v,_,b);case 4.4:return new vk.default(p,d,h,y,v,_,b);case 5:return new mk.default(p,d,h,y,v,_,b);case 5.1:return new gk.default(p,d,h,y,v,_,b);case 5.2:return new Ok.default(p,d,h,y,v,_,b);default:throw(0,lk.newError)("Unknown Bolt protocol version: "+f)}},xf=_,ck=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]}),Op=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||ck(t,e,r)},Aa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(xf,"__esModule",{value:!0}),xf.RawRoutingTable=xf.BoltProtocol=void 0,Ip=Aa(_l),Hf=Aa(oh),Np=Aa(T),Aa=Aa(Oh),Op(R,xf),xf.BoltProtocol=Np.default,xf.RawRoutingTable=Aa.default,xf.default={handshake:Ip.default,create:Hf.default};Sp={},Fp={},Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.DEFAULT_ACQUISITION_TIMEOUT=Fp.DEFAULT_MAX_SIZE=void 0,Fp.DEFAULT_MAX_SIZE=100,Fp.DEFAULT_ACQUISITION_TIMEOUT=6e4,Ek.defaultConfig=function(){return new Ek(100,6e4)},Ek.fromDriverConfig=function(e){return new Ek(Sk(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,Sk(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},rd=Ek;function Ek(e,t){this.maxSize=Pk(e,100),this.acquisitionTimeout=Pk(t,6e4)}function Pk(e,t){return 0===e||e?e:t}function Sk(e){return 0===e||e}Fp.default=rd;var fd={},Tk=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())})},jk=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}}}},ad=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ck=(Object.defineProperty(fd,"__esModule",{value:!0}),ad(Fp)),Ik=e,Rk=Ik.internal.logger.Logger,Kd=(kk.prototype.acquire=function(o){var i=this,u=o.asKey(),a=this._acquireRequests;return a[u]||(a[u]=[]),new Promise(function(e,t){var r=null,n=setTimeout(function(){var e,t=a[u];t&&(a[u]=t.filter(function(e){return e!==r})),r.isCompleted()||(t=i.activeResourceCount(o),e=i.has(o)?i._pools[u].length:0,r.reject((0,Ik.newError)("Connection acquisition timed out in ".concat(i._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},i._acquisitionTimeout),r=new Mk(u,e,t,n,i._log);a[u].push(r),i._processPendingAcquireRequests(o)})},kk.prototype.purge=function(e){return this._purgeKey(e.asKey())},kk.prototype.close=function(){return Tk(this,void 0,void 0,function(){var t=this;return jk(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(e){return t._purgeKey(e)}))];case 1:return[2,e.sent()]}})})},kk.prototype.keepAll=function(e){var t=this,r=e.map(function(e){return e.asKey()}),e=Object.keys(this._pools).filter(function(e){return-1===r.indexOf(e)});return Promise.all(e.map(function(e){return t._purgeKey(e)}))},kk.prototype.has=function(e){return e.asKey()in this._pools},kk.prototype.activeResourceCount=function(e){return this._activeResourceCounts[e.asKey()]||0},kk.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return t||(t=new Lk,this._pools[e]=t,this._pendingCreates[e]=0),t},kk.prototype._acquire=function(u){return Tk(this,void 0,void 0,function(){var t,r,n,o,i=this;return jk(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,Ik.newError)("Pool is closed, it is no more able to serve requests.");t=u.asKey(),r=this._getOrInitializePoolFor(t),e.label=1;case 1:return r.length?(n=r.pop(),this._validate(n)?(this._removeIdleObserver&&this._removeIdleObserver(n),Ak(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(n," acquired from the pool ").concat(t)),[2,{resource:n,pool:r}]):[3,2]):[3,5];case 2:return[4,this._destroy(n)];case 3:e.sent(),e.label=4;case 4:return[3,1];case 5:if(0<this._maxSize&&this.activeResourceCount(u)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:r}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=6;case 6:return e.trys.push([6,,8,9]),[4,this._create(u,function(e,t){return i._release(e,t,r)})];case 7:return o=e.sent(),Ak(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(o," created for the pool ").concat(t)),[3,9];case 8:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 9:return[2,{resource:o,pool:r}]}})})},kk.prototype._release=function(u,a,s){return Tk(this,void 0,void 0,function(){var o,i=this;return jk(this,function(e){switch(e.label){case 0:return(o=u.asKey(),s.isActive())?this._validate(a)?[3,2]:(this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because it is not functional")),[4,this._destroy(a)]):[3,4];case 1:return e.sent(),[3,3];case 2:this._installIdleObserver&&this._installIdleObserver(a,{onError:function(e){i._log.debug("Idle connection ".concat(a," destroyed because of error: ").concat(e));e=i._pools[o];e&&(i._pools[o]=e.filter(function(e){return e!==a})),i._destroy(a).catch(function(){})}}),s.push(a),this._log.isDebugEnabled()&&this._log.debug("".concat(a," released to the pool ").concat(o)),e.label=3;case 3:return[3,6];case 4:return this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because pool has been purged")),[4,this._destroy(a)];case 5:e.sent(),e.label=6;case 6:return t=o,r=this._activeResourceCounts,0<(n=(r[t]||0)-1)?r[t]=n:delete r[t],this._processPendingAcquireRequests(u),[2]}var t,r,n})})},kk.prototype._purgeKey=function(o){return Tk(this,void 0,void 0,function(){var t,r,n;return jk(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],!t)return[3,2];for(;t.length;)n=t.pop(),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]}})})},kk.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];e&&((n=e.shift())?this._acquire(r).catch(function(e){return n.reject(e),{resource:null}}).then(function(e){var t=e.resource,e=e.pool;t?n.isCompleted()?o._release(r,t,e):n.resolve(t):n.isCompleted()||(o._acquireRequests[i]||(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}):delete this._acquireRequests[i])},kk);function kk(e){var e=void 0===e?{}:e,t=e.create,t=void 0===t?function(e,t){return Promise.resolve()}:t,r=e.destroy,r=void 0===r?function(e){return Promise.resolve()}:r,n=e.validate,n=void 0===n?function(e){return!0}:n,o=e.installIdleObserver,o=void 0===o?function(e,t){}:o,i=e.removeIdleObserver,i=void 0===i?function(e){}:i,u=e.config,u=void 0===u?Ck.default.defaultConfig():u,e=e.log,e=void 0===e?Rk.noOp():e;this._create=t,this._destroy=r,this._validate=n,this._installIdleObserver=o,this._removeIdleObserver=i,this._maxSize=u.maxSize,this._acquisitionTimeout=u.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function Ak(e,t){var r=t[e]||0;t[e]=r+1}Nk.prototype.isCompleted=function(){return this._completed},Nk.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))},Nk.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var Mk=Nk;function Nk(e,t,r,n,o){this._key=e,this._resolve=t,this._reject=r,this._timeoutId=n,this._log=o,this._completed=!1}Fk.prototype.isActive=function(){return this._active},Fk.prototype.close=function(){this._active=!1},Fk.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},Object.defineProperty(Fk.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),Fk.prototype.pop=function(){return this._elements.pop()},Fk.prototype.push=function(e){return this._elements.push(e)};var xk,Uk,Dk,Lk=Fk;function Fk(){this._active=!0,this._elements=[]}fd.default=Kd,vl=Sp,xk=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]}),Uk=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cd=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)&&xk(t,e,r);return Uk(t,e),t},xc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(vl,"__esModule",{value:!0}),vl.DEFAULT_MAX_SIZE=vl.DEFAULT_ACQUISITION_TIMEOUT=vl.PoolConfig=vl.Pool=void 0,Dk=Cd(Fp),vl.PoolConfig=Dk.default,Object.defineProperty(vl,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return Dk.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(vl,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return Dk.DEFAULT_MAX_SIZE}}),Cd=xc(fd),vl.Pool=Cd.default,vl.default=Cd.default;var Bk,el={},Id={},Dl=r&&r.__extends||(Bk=function(e,t){return(Bk=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}Bk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Id,"__esModule",{value:!0});Dl(zk,Wk=e.ConnectionProvider),zk.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 Wk,Yd=zk;function zk(e){var t=Wk.call(this)||this;return t._connection=e,t}Id.default=Yd;C={},Kp={},Da={};function qk(e){this._errorHandler=e}Object.defineProperty(Da,"__esModule",{value:!0}),Object.defineProperty(qk.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),qk.prototype.isOpen=function(){throw new Error("not implemented")},qk.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(qk.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),qk.prototype.connect=function(e,t){throw new Error("not implemented")},qk.prototype.write=function(e,t,r){throw new Error("not implemented")},qk.prototype.resetAndFlush=function(){throw new Error("not implemented")},qk.prototype.hasOngoingObservableRequests=function(){throw new Error("not implemented")},qk.prototype.close=function(){throw new Error("not implemented")},qk.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t):e},Da.default=qk;var Vk,pd={},Vd=r&&r.__extends||(Vk=function(e,t){return(Vk=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}Vk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Hk=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())})},Gk=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}}}},Sh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yk=(Object.defineProperty(pd,"__esModule",{value:!0}),pd.createChannelConnection=void 0,Ul),Kk=e,Ph=Sh(Da),Zk=Sh(_),Qk=Kk.error.PROTOCOL_ERROR,Xk=Kk.internal.logger.Logger,Jk=0;pd.createChannelConnection=function(i,u,a,s,c,e){void 0===c&&(c=null);var l=(e=void 0===e?function(e){return new Yk.Channel(e)}:e)(new Yk.ChannelConfig(i,u,a.errorCode()));return Zk.default.handshake(l).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new Yk.Chunker(l),o=new Yk.Dechunker,t=new eA(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return Zk.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:{onPendingObserversChange: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)}}})});return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};$k=Ph.default,Vd(tA,$k),Object.defineProperty(tA.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),tA.prototype.connect=function(e,t){return this._initialize(e,t)},tA.prototype._initialize=function(e,n){var o=this,i=this;return new Promise(function(r,t){o._protocol.initialize({userAgent:e,authToken:n,notificationFilter:o._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,o.version&&!t||(o.version=t),t=e.connection_id,o.databaseId||(o.databaseId=t),e.hints&&null!=(t=e.hints["connection.recv_timeout_seconds"])&&(e=(0,Kk.toNumber)(t),Number.isInteger(e)&&0<e?o._ch.setupReceiveTimeout(1e3*e):o._log.info("Server located at ".concat(o._address," supplied an invalid connection receive timeout value (").concat(e,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue."))),r(i)}})})},tA.prototype.protocol=function(){return this._protocol},Object.defineProperty(tA.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),tA.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(Kk.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},tA.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},tA.prototype.hasOngoingObservableRequests=function(){return this._protocol.hasOngoingObservableRequests()},tA.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: "+e),t(e))},onComplete:function(){e()}})})},tA.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},tA.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()})}}))},tA.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},tA.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},tA.prototype._handleOngoingRequestsNumberChange=function(e){0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout()},tA.prototype.close=function(){return Hk(this,void 0,void 0,function(){return Gk(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]}})})},tA.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},tA.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,Kk.newError)(e,Qk);return this._handleFatalError(e),e};var $k,eA=tA;function tA(e,t,r,n,o,i,u,a,s){void 0===o&&(o=!1),void 0===i&&(i=null);var c,l,t=$k.call(this,t)||this;return t._reseting=!1,t._resetObservers=[],t._id=Jk++,t._address=r,t._server={address:r.asHostPort()},t.creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(c=t,new Xk((l=n)._level,function(e,t){return l._loggerFunction(e,"".concat(c," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}pd.default=eA;var rA,nA,Hh={},eb=r&&r.__extends||(rA=function(e,t){return(rA=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}rA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),vb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Eb=(Object.defineProperty(Hh,"__esModule",{value:!0}),vb(Da)),Tb=(nA=Eb.default,eb(oA,nA),Object.defineProperty(oA.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),oA.prototype.isOpen=function(){return this._delegate.isOpen()},oA.prototype.protocol=function(){return this._delegate.protocol()},oA.prototype.connect=function(e,t){return this._delegate.connect(e,t)},oA.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},oA.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},oA.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},oA.prototype.close=function(){return this._delegate.close()},oA.prototype._release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate._release()},oA);function oA(e,t){var r=nA.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}Hh.default=Tb;jb={};Object.defineProperty(jb,"__esModule",{value:!0});var iA,uA,aA,sA=e.error.SERVICE_UNAVAILABLE,cA=e.error.SESSION_EXPIRED;function lA(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||fA,this._handleWriteFailure=r||fA,this._handleAuthorizationExpired=n||fA}function fA(e){return e}lA.create=function(e){return new lA(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleAuthorizationExpired)},lA.prototype.errorCode=function(){return this._errorCode},lA.prototype.handleAndTransformError=function(e,t){return!(r=e)||"Neo.ClientError.Security.AuthorizationExpired"!==r.code&&"Neo.ClientError.Security.TokenExpired"!==r.code?function(e){if(e)return e.code===cA||e.code===sA||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t):e:this._handleAuthorizationExpired(e,t);var r},jb.default=lA,ab=Kp,iA=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]}),uA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cb=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)&&iA(t,e,r);return uA(t,e),t},xb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(ab,"__esModule",{value:!0}),ab.createChannelConnection=ab.ConnectionErrorHandler=ab.DelegateConnection=ab.ChannelConnection=ab.Connection=void 0,Zh=xb(Da),ab.Connection=Zh.default,aA=Cb(pd),ab.ChannelConnection=aA.default,Object.defineProperty(ab,"createChannelConnection",{enumerable:!0,get:function(){return aA.createChannelConnection}}),Cb=xb(Hh),ab.DelegateConnection=Cb.default,Cb=xb(jb),ab.ConnectionErrorHandler=Cb.default,ab.default=Zh.default;var pA,dA,ib=r&&r.__extends||(pA=function(e,t){return(pA=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}pA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),hA=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]}),bA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gf=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)&&hA(t,e,r);return bA(t,e),t},yA=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())})},_A=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}}}},vA=(Object.defineProperty(C,"__esModule",{value:!0}),Kp),mA=Gf(Sp),gA=e,OA=gA.error.SERVICE_UNAVAILABLE,ey=(dA=gA.ConnectionProvider,ib(wA,dA),wA.prototype._createConnectionErrorHandler=function(){return new vA.ConnectionErrorHandler(OA)},wA.prototype._createConnection=function(e,r){var n=this;return this._createChannelConnection(e).then(function(t){return t._release=function(){return r(e,t)},(n._openConnections[t.id]=t).connect(n._userAgent,n._authToken).catch(function(e){throw n._destroyConnection(t),e})})},wA.prototype._validateConnection=function(e){if(!e.isOpen())return!1;var t=this._config.maxConnectionLifetime;return Date.now()-e.creationTimestamp<=t},wA.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},wA.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return yA(this,void 0,void 0,function(){var t,r;return _A(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire(n)];case 1:t=e.sent(),r=new gA.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]}})})},wA.prototype.close=function(){return yA(this,void 0,void 0,function(){return _A(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]}})})},wA._installIdleObserverOnConnection=function(e,t){e._queueObserver(t)},wA._removeIdleObserverOnConnection=function(e){e._updateCurrentObserver()},wA);function wA(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,e=e.authToken,u=(void 0===t&&(t=null),dA.call(this)||this);return u._id=r,u._config=n,u._log=o,u._userAgent=i,u._authToken=e,u._createChannelConnection=t||function(e){return(0,vA.createChannelConnection)(e,u._config,u._createConnectionErrorHandler(),u._log)},u._connectionPool=new mA.default({create:u._createConnection.bind(u),destroy:u._destroyConnection.bind(u),validate:u._validateConnection.bind(u),installIdleObserver:wA._installIdleObserverOnConnection.bind(u),removeIdleObserver:wA._removeIdleObserverOnConnection.bind(u),config:mA.PoolConfig.fromDriverConfig(n),log:u._log}),u._openConnections={},u}C.default=ey;var EA,PA,uy={},Vb=r&&r.__extends||(EA=function(e,t){return(EA=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}EA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),SA=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())})},TA=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}}}},Nh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sy=(Object.defineProperty(uy,"__esModule",{value:!0}),Nh(C)),jA=Kp,Oy=e.internal.constants,CA=Oy.BOLT_PROTOCOL_V3,IA=Oy.BOLT_PROTOCOL_V4_0,RA=Oy.BOLT_PROTOCOL_V4_4,kA=e.error.SERVICE_UNAVAILABLE,Uc=(PA=Sy.default,Vb(AA,PA),AA.prototype.acquireConnection=function(e){var r=this,e=void 0===e?{}:e,n=(e.accessMode,e.database),t=(e.bookmarks,jA.ConnectionErrorHandler.create({errorCode:kA,handleAuthorizationExpired:function(e,t){return r._handleAuthorizationExpired(e,t,n)}}));return this._connectionPool.acquire(this._address).then(function(e){return new jA.DelegateConnection(e,t)})},AA.prototype._handleAuthorizationExpired=function(e,t,r){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this._connectionPool.purge(t).catch(function(){}),e},AA.prototype._hasProtocolVersion=function(n){return SA(this,void 0,void 0,function(){var t,r;return TA(this,function(e){switch(e.label){case 0:return[4,(0,jA.createChannelConnection)(this._address,this._config,this._createConnectionErrorHandler(),this._log)];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]}})})},AA.prototype.supportsMultiDb=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return IA<=e})];case 1:return[2,e.sent()]}})})},AA.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},AA.prototype.supportsTransactionConfig=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return CA<=e})];case 1:return[2,e.sent()]}})})},AA.prototype.supportsUserImpersonation=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return RA<=e})];case 1:return[2,e.sent()]}})})},AA.prototype.verifyConnectivityAndGetServerInfo=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},AA);function AA(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,e=e.authToken,t=PA.call(this,{id:t,config:r,log:n,userAgent:i,authToken:e})||this;return t._address=o,t}uy.default=Uc;var xy={},Bb={},Cy={},cy={},MA=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},NA=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))},xA=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.createValidRoutingTable=void 0,e),ml=xA.internal.constants,UA=ml.ACCESS_MODE_WRITE,DA=ml.ACCESS_MODE_READ,LA=xA.internal.serverAddress.ServerAddress,FA=xA.error.PROTOCOL_ERROR,BA=(WA.fromRawRoutingTable=qA,WA.prototype.forget=function(e){this.readers=zA(this.readers,e),this.writers=zA(this.writers,e)},WA.prototype.forgetRouter=function(e){this.routers=zA(this.routers,e)},WA.prototype.forgetWriter=function(e){this.writers=zA(this.writers,e)},WA.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===DA&&0===this.readers.length||e===UA&&0===this.writers.length},WA.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},WA.prototype.allServers=function(){return NA(NA(NA([],MA(this.routers),!1),MA(this.readers),!1),MA(this.writers),!1)},WA.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,"]]")},WA);function WA(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,xA.int)(0),this.ttl=e}function zA(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function qA(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,xA.int)(Date.now()),n=(0,xA.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?xA.Integer.MAX_VALUE:n}catch(e){throw(0,xA.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(xA.json.stringify(t),"\nError message: ").concat(e.message),FA)}}(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=HA(e).map(function(e){return LA.fromUrl(e)}):"WRITE"===t?i=HA(e).map(function(e){return LA.fromUrl(e)}):"READ"===t&&(o=HA(e).map(function(e){return LA.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,xA.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(xA.json.stringify(t.servers),"\nError message: ").concat(e.message),FA)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return VA(u,"routers",t),VA(a,"readers",t),new BA({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function VA(e,t,r){if(0===e.length)throw(0,xA.newError)("Received no "+t+" from router "+r,FA)}function HA(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}cy.default=BA,cy.createValidRoutingTable=qA;var Rh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},GA=(Object.defineProperty(Cy,"__esModule",{value:!0}),Rh(cy));function YA(e){this._routingContext=e}YA.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:GA.default.fromRawRoutingTable(r,n,e)})})},YA.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})})},Cy.default=YA;var KA,ZA,Iy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gl=(Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.RoutingTable=Bb.Rediscovery=void 0,Iy(Cy)),Ol=(Bb.Rediscovery=gl.default,Iy(cy)),Gy=(Bb.RoutingTable=Ol.default,Bb.default=gl.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)})),QA=r&&r.__assign||function(){return(QA=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)},XA=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]}),JA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zy=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)&&XA(t,e,r);return JA(t,e),t},$A=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())})},eM=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}}}},tM=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.")},rM=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},i_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nM=(Object.defineProperty(xy,"__esModule",{value:!0}),e),oM=Zy(Bb),iM=Ul,uM=i_(Id),jt=i_(C),aM=Qa,sM=Kp,cM=nM.error.SERVICE_UNAVAILABLE,lM=nM.error.SESSION_EXPIRED,fM=nM.internal.bookmarks.Bookmarks,s_=nM.internal.constants,pM=s_.ACCESS_MODE_READ,dM=s_.ACCESS_MODE_WRITE,hM=s_.BOLT_PROTOCOL_V3,bM=s_.BOLT_PROTOCOL_V4_0,yM=s_.BOLT_PROTOCOL_V4_4,_M=(0,nM.int)(3e4),l_=(ZA=jt.default,Gy(vM,ZA),vM.prototype._createConnectionErrorHandler=function(){return new sM.ConnectionErrorHandler(lM)},vM.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||null),e},vM.prototype._handleAuthorizationExpired=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this._connectionPool.purge(t).catch(function(){}),e},vM.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||null),(0,nM.newError)("No longer possible to write to server at "+t,lM,e)},vM.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;return $A(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return eM(this,function(e){switch(e.label){case 0:return n={database:c||null},o=new sM.ConnectionErrorHandler(lM,function(e,t){return a._handleUnavailability(e,t,n.database)},function(e,t){return a._handleWriteFailure(e,t,n.database)},function(e,t){return a._handleAuthorizationExpired(e,t,n.database)}),[4,this._freshRoutingTable({accessMode:s,database:n.database,bookmarks:l,impersonatedUser:f,onDatabaseNameResolved:function(e){n.database=n.database||e,p&&p(e)}})];case 1:if(i=e.sent(),s===pM)r=this._loadBalancingStrategy.selectReader(i.readers),t="read";else{if(s!==dM)throw(0,nM.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(i.writers),t="write"}if(!r)throw(0,nM.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(i),lM);e.label=2;case 2:return e.trys.push([2,4,,5]),[4,this._acquireConnectionToServer(r,t,i)];case 3:return u=e.sent(),[2,new sM.DelegateConnection(u,o)];case 4:throw u=e.sent(),o.handleAndTransformError(u,r);case 5:return[2]}})})},vM.prototype._hasProtocolVersion=function(u){return $A(this,void 0,void 0,function(){var t,r,n,o,i;return eM(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,(0,sM.createChannelConnection)(t[n],this._config,this._createConnectionErrorHandler(),this._log)];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]}})})},vM.prototype.supportsMultiDb=function(){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return bM<=e})];case 1:return[2,e.sent()]}})})},vM.prototype.supportsTransactionConfig=function(){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return hM<=e})];case 1:return[2,e.sent()]}})})},vM.prototype.supportsUserImpersonation=function(){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return yM<=e})];case 1:return[2,e.sent()]}})})},vM.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},vM.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return $A(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return eM(this,function(e){switch(e.label){case 0:return t={database:l||null},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===dM?r.writers:r.readers,n=(0,nM.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),cM),e.label=2;case 2:e.trys.push([2,9,10,11]),o=tM(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}})})},vM.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},vM.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},vM.prototype._acquireConnectionToServer=function(e,t,r){return this._connectionPool.acquire(e)},vM.prototype._freshRoutingTable=function(e){var e=void 0===e?{}:e,t=e.accessMode,r=e.database,n=e.bookmarks,o=e.impersonatedUser,e=e.onDatabaseNameResolved,i=this._routingTableRegistry.get(r,function(){return new oM.RoutingTable({database:r})});return i.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(i)),this._refreshRoutingTable(i,n,o,e)):i},vM.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)},vM.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return $A(this,void 0,void 0,function(){var t,r,n,o,i;return eM(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c)];case 1:return(t=rM.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)];case 3:i=rM.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,l,n)];case 5:return[2,e.sent()]}})})},vM.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return $A(this,void 0,void 0,function(){var t,r,n;return eM(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a)];case 1:return r=rM.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a)];case 2:n=rM.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,s,r)];case 4:return[2,e.sent()]}})})},vM.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u){return $A(this,void 0,void 0,function(){var t,r;return eM(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u)];case 1:return(t=rM.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,vM._forgetRouter(o,n,r),[2,[null,t]])}})})},vM.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u){return $A(this,void 0,void 0,function(){var t;return eM(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)];case 2:return[2,e.sent()]}})})},vM.prototype._resolveSeedRouter=function(n){return $A(this,void 0,void 0,function(){var t,r=this;return eM(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)]}})})},vM.prototype._fetchRoutingTable=function(s,c,l,f){return $A(this,void 0,void 0,function(){var t=this;return eM(this,function(e){return[2,s.reduce(function(i,u,a){return $A(t,void 0,void 0,function(){var t,r,n,o;return eM(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=rM.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(vM._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f)]);case 2:if(t=rM.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]))]})})},vM.prototype._createSessionForRediscovery=function(o,i,u){return $A(this,void 0,void 0,function(){var t,r,n=this;return eM(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this._connectionPool.acquire(o)];case 1:return r=e.sent(),t=sM.ConnectionErrorHandler.create({errorCode:lM,handleAuthorizationExpired:function(e,t){return n._handleAuthorizationExpired(e,t)}}),t=new uM.default(new sM.DelegateConnection(r,t)),r.protocol().version<4?[2,[new nM.Session({mode:dM,bookmarks:fM.empty(),connectionProvider:t}),null]]:[2,[new nM.Session({mode:pM,database:"system",bookmarks:i,connectionProvider:t,impersonatedUser:u}),null]];case 2:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 3:return[2]}})})},vM.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"].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,nM.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),cM,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},vM.prototype._applyRoutingTableIfPossible=function(t,r,n,o){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r,n)];throw(0,nM.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),cM,o);case 1:return e.sent(),[2,r]}})})},vM.prototype._updateRoutingTable=function(t,r){return $A(this,void 0,void 0,function(){return eM(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),r(t.database),this._log.info("Updated routing table ".concat(t)),[2]}})})},vM._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},vM);function vM(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.authToken,e=e.routingTablePurgeDelay,c=ZA.call(this,{id:t,config:i,log:u,userAgent:a,authToken:s},function(e){return(0,sM.createChannelConnection)(e,c._config,c._createConnectionErrorHandler(),c._log,c._routingContext)})||this;return c._routingContext=QA(QA({},n),{address:r.toString()}),c._seedRouter=r,c._rediscovery=new oM.default(c._routingContext),c._loadBalancingStrategy=new aM.LeastConnectedLoadBalancingStrategy(c._connectionPool),c._hostNameResolver=o,c._dnsResolver=new iM.HostNameResolver,c._log=u,c._useSeedRouter=!0,c._routingTableRegistry=new UM(e?(0,nM.int)(e):_M),c}xy.default=l_;DM.prototype.register=function(e){return this._tables.set(e.database,e),this},DM.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},DM.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},DM.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},DM.prototype._forEach=function(e){var t,r;try{for(var n=tM(this._tables),o=n.next();!o.done;o=n.next())e(rM(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},DM.prototype._remove=function(e){return this._tables.delete(e),this},DM.prototype._removeIf=function(e){var t,r;try{for(var n=tM(this._tables),o=n.next();!o.done;o=n.next()){var i=rM(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 mM,gM,OM,wM,EM,PM,SM,TM,jM,CM,x,IM,RM,kM,AM,MM,NM,xM,UM=DM;function DM(e){this._tables=new Map,this._routingTablePurgeDelay=e}function LM(e,o,t){void 0===t&&(t={}),kM(e,"Bolt URL");var r,i=NM.parseDatabaseUrl(e),n=!1,u=!1;switch(i.scheme){case"bolt":break;case"bolt+s":u=!0,r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":u=!0,r="TRUST_ALL_CERTIFICATES";break;case"neo4j":n=!0;break;case"neo4j+s":r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",n=u=!0;break;case"neo4j+ssc":r="TRUST_ALL_CERTIFICATES",n=u=!0;break;default:throw new Error("Unknown scheme: ".concat(i.scheme))}if(u){if("encrypted"in t||"trust"in t)throw new Error("Encryption/trust can only be configured either through URL or config, not both");t.encrypted=RM,t.trust=r}(o=o||{}).scheme=o.scheme||"none",t.userAgent=t.userAgent||xM;var a=MM.fromUrl(i.hostAndPort),s={address:a,typename:n?"Routing":"Direct",routing:n};return new CM.Driver(s,t,function(){{if(n)return function(e,t,r,n){return new IM.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authToken:o,address:a,userAgent:t.userAgent,routingContext:i.query})};if(AM(i.query))return function(e,t,r){return new IM.DirectConnectionProvider({id:e,config:t,log:r,authToken:o,address:a,userAgent:t.userAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function FM(r,n){return TM(this,void 0,void 0,function(){var t;return jM(this,function(e){switch(e.label){case 0:t=LM(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 n=el,mM=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(n,"__esModule",{value:!0}),n.RoutingConnectionProvider=n.DirectConnectionProvider=n.PooledConnectionProvider=n.SingleConnectionProvider=void 0,gM=Id,Object.defineProperty(n,"SingleConnectionProvider",{enumerable:!0,get:function(){return mM(gM).default}}),OM=C,Object.defineProperty(n,"PooledConnectionProvider",{enumerable:!0,get:function(){return mM(OM).default}}),wM=uy,Object.defineProperty(n,"DirectConnectionProvider",{enumerable:!0,get:function(){return mM(wM).default}}),EM=xy,Object.defineProperty(n,"RoutingConnectionProvider",{enumerable:!0,get:function(){return mM(EM).default}}),P_=h,PM=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]}),SM=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),S=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)&&PM(t,e,r);return SM(t,e),t},R_=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||PM(t,e,r)},Object.defineProperty(P_,"__esModule",{value:!0}),P_.pool=P_.packstream=P_.channel=P_.buf=P_.bolt=P_.loadBalancing=void 0,P_.loadBalancing=S(Qa),P_.bolt=S(_),P_.buf=S(mf),P_.channel=S(Ul),P_.packstream=S(Lb),P_.pool=S(Sp),R_(el,P_),I=F,TM=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())})},jM=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}}}},W_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(I,"__esModule",{value:!0}),I.PathSegment=I.Path=I.UnboundRelationship=I.Relationship=I.Node=I.Record=I.ServerInfo=I.Notification=I.QueryStatistics=I.ProfiledPlan=I.Plan=I.ResultSummary=I.RxResult=I.RxManagedTransaction=I.RxTransaction=I.RxSession=I.EagerResult=I.Result=I.ManagedTransaction=I.Transaction=I.Session=I.Driver=I.temporal=I.spatial=I.graph=I.error=I.routing=I.session=I.types=I.logging=I.auth=I.isRetryableError=I.Neo4jError=I.integer=I.isUnboundRelationship=I.isRelationship=I.isPathSegment=I.isPath=I.isNode=I.isDateTime=I.isLocalDateTime=I.isDate=I.isTime=I.isLocalTime=I.isDuration=I.isPoint=I.isInt=I.int=I.hasReachableServer=I.driver=void 0,I.notificationFilterMinimumSeverityLevel=I.notificationFilterDisabledCategory=I.notificationSeverityLevel=I.notificationCategory=I.resultTransformers=I.bookmarkManager=I.DateTime=I.LocalDateTime=I.Date=I.Time=I.LocalTime=I.Duration=I.Integer=I.Point=void 0,CM=B,Object.defineProperty(I,"Driver",{enumerable:!0,get:function(){return CM.Driver}}),m=W_(t),x=e,Object.defineProperty(I,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(I,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(I,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(I,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(I,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(I,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(I,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(I,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(I,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(I,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(I,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(I,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(I,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(I,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(I,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(I,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(I,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(I,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(I,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(I,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(I,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(I,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(I,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(I,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(I,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(I,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(I,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(I,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(I,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(I,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(I,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(I,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(I,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(I,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(I,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(I,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(I,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(I,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(I,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(I,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(I,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(I,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(I,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(I,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(I,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(I,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(I,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(I,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(I,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(I,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),IM=h,Y_=W_(Gr),I.RxSession=Y_.default,U_=W_(p),I.RxTransaction=U_.default,J_=W_(b),I.RxManagedTransaction=J_.default,W_=W_(E),I.RxResult=W_.default,hd=x.internal.util,RM=hd.ENCRYPTION_ON,kM=hd.assertString,AM=hd.isEmptyObjectOrNull,MM=x.internal.serverAddress.ServerAddress,NM=x.internal.urlUtil,I.driver=LM,I.hasReachableServer=FM,xM="neo4j-javascript/"+m.default,hd={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},I.logging=hd,m={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},I.types=m,__={READ:CM.READ,WRITE:CM.WRITE},I.session=__,hv={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},I.integer=hv,Sv={isPoint:x.isPoint},I.spatial=Sv,kv={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},I.temporal=kv,wv={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},I.graph=wv,hv={driver:LM,hasReachableServer:FM,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:hv,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:hd,types:m,session:__,routing:x.routing,error:x.error,graph:wv,spatial:Sv,temporal:kv,Driver:CM.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:Y_.default,RxTransaction:U_.default,RxManagedTransaction:J_.default,RxResult:W_.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,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},I.default=hv,U(F)});
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 U(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D,L,F={},B={},e={},t={},n=r&&r.__extends||(D=function(e,t){return(D=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}D(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),W=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.Neo4jError=t.isRetriableError=t.newError=void 0,"ServiceUnavailable"),z=(t.SERVICE_UNAVAILABLE=W,"SessionExpired"),q=(t.SESSION_EXPIRED=z,t.PROTOCOL_ERROR="ProtocolError",L=Error,n(V,L),V.isRetriable=function(e){return null!=e&&e instanceof V&&e.retriable},V);function V(e,t,r){e=L.call(this,e,null!=r?{cause:r}:void 0)||this;return e.constructor=V,e.__proto__=V.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===W||r===z||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=q,t.newError=function(e,t,r){return new q(e,null!=t?t:"N/A",r)};n=q.isRetriable;t.isRetriableError=n;var n={},H=(Object.defineProperty(n,"__esModule",{value:!0}),n.toString=n.toNumber=n.inSafeRange=n.isInt=n.int=void 0,t),G=new Map,o=(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*K+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(K)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(K)+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(Z)&&e.lessThan(Z))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,H.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);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=G.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&G.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<=-Y?d.MIN_VALUE:Y<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%K|0,e/K|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,H.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,H.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,H.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,H.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?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(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var K=4294967296,Y=K*K/2,Z=o.fromInt(1<<24),i=o.fromValue,i=(n.int=i,o.isInteger),i=(n.isInt=i,o.inSafeRange),i=(n.inSafeRange=i,o.toNumber),i=(n.toNumber=i,o.toString),i=(n.toString=i,n.default=o,{}),o={},u={},Q={},a={},X=(Object.defineProperty(a,"__esModule",{value:!0}),a.getBrokenObjectReason=a.isBrokenObject=a.createBrokenObject=void 0,"__isBrokenObject__"),J="__reason__";a.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===X||(t===J?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})},a.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[X]},a.getBrokenObjectReason=function(e){return e[J]},Object.defineProperty(Q,"__esModule",{value:!0}),Q.stringify=void 0;var $=a;Q.stringify=function(e){return JSON.stringify(e,function(e,t){return(0,$.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,$.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):t})};var s,ee,te,re,ne,oe,ie=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.")},ue=(Object.defineProperty(u,"__esModule",{value:!0}),u.ENCRYPTION_OFF=u.ENCRYPTION_ON=u.equals=u.validateQueryAndParameters=u.assertValidDate=u.assertNumberOrInteger=u.assertNumber=u.assertString=u.assertObject=u.isString=u.isObject=u.isEmptyObjectOrNull=void 0,n),ae=Q;u.ENCRYPTION_ON="ENCRYPTION_ON";function se(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function ce(e,t){if(le(e))return e;throw new TypeError((0,ae.stringify)(t)+" expected to be string but was: "+(0,ae.stringify)(e))}function le(e){return"[object String]"===Object.prototype.toString.call(e)}function fe(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,re.int)(e),this._maxInteger=(0,re.int)(t)}function pe(e,t,r){e=(0,re.int)(e),t=(0,re.int)(t),r=(0,re.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,re.int)(e)).modulo(4).equals(0))return!e.modulo(100).equals(0)||!!e.modulo(400).equals(0)}(e)||(n=n.subtract(1))),n.subtract(s.DAYS_0000_TO_1970)}function de(e,t,r){if((0,oe.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,ne.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function he(e,t){e=(0,re.int)(e),t=(0,re.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function be(e,t){return e=(0,re.int)(e),t=(0,re.int)(t),e.subtract(he(e,t).multiply(t))}function ye(e){return(e=(0,re.int)(e)).equals(0)?"":"."+_e(e,9)}function _e(e,t,r){var n=(e=(0,re.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}u.ENCRYPTION_OFF="ENCRYPTION_OFF",u.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!se(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},u.isObject=se,u.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(ce(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!se(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}},u.assertObject=function(e,t){if(se(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,ae.stringify)(e))},u.assertString=ce,u.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,ae.stringify)(e));return e},u.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,ue.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,ae.stringify)(e))},u.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,ae.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,ae.stringify)(e));return e},u.isString=le,u.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=ie(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=o,ee=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]}),te=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)&&ee(t,e,r);return te(t,e),t},Object.defineProperty(s,"__esModule",{value:!0}),s.floorMod=s.floorDiv=s.assertValidZoneId=s.assertValidNanosecond=s.assertValidSecond=s.assertValidMinute=s.assertValidHour=s.assertValidDay=s.assertValidMonth=s.assertValidYear=s.timeZoneOffsetInSeconds=s.totalNanoseconds=s.newDate=s.toStandardDate=s.isoStringToStandardDate=s.dateToIsoString=s.timeZoneOffsetToIsoString=s.timeToIsoString=s.durationToIsoString=s.dateToEpochDay=s.localDateTimeToEpochSecond=s.localTimeToNanoOfDay=s.normalizeNanosecondsForDuration=s.normalizeSecondsForDuration=s.SECONDS_PER_DAY=s.DAYS_PER_400_YEAR_CYCLE=s.DAYS_0000_TO_1970=s.NANOS_PER_HOUR=s.NANOS_PER_MINUTE=s.NANOS_PER_MILLISECOND=s.NANOS_PER_SECOND=s.SECONDS_PER_HOUR=s.SECONDS_PER_MINUTE=s.MINUTES_PER_HOUR=s.NANOSECOND_OF_SECOND_RANGE=s.SECOND_OF_MINUTE_RANGE=s.MINUTE_OF_HOUR_RANGE=s.HOUR_OF_DAY_RANGE=s.DAY_OF_MONTH_RANGE=s.MONTH_OF_YEAR_RANGE=s.YEAR_RANGE=void 0,re=c(n),ne=t,oe=u,fe.prototype.contains=function(e){var t;return(0,re.isInt)(e)&&e instanceof re.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,re.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},fe.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},c=fe,s.YEAR_RANGE=new c(-999999999,999999999),s.MONTH_OF_YEAR_RANGE=new c(1,12),s.DAY_OF_MONTH_RANGE=new c(1,31),s.HOUR_OF_DAY_RANGE=new c(0,23),s.MINUTE_OF_HOUR_RANGE=new c(0,59),s.SECOND_OF_MINUTE_RANGE=new c(0,59),s.NANOSECOND_OF_SECOND_RANGE=new c(0,999999999),s.MINUTES_PER_HOUR=60,s.SECONDS_PER_MINUTE=60,s.SECONDS_PER_HOUR=s.SECONDS_PER_MINUTE*s.MINUTES_PER_HOUR,s.NANOS_PER_SECOND=1e9,s.NANOS_PER_MILLISECOND=1e6,s.NANOS_PER_MINUTE=s.NANOS_PER_SECOND*s.SECONDS_PER_MINUTE,s.NANOS_PER_HOUR=s.NANOS_PER_MINUTE*s.MINUTES_PER_HOUR,s.DAYS_0000_TO_1970=719528,s.DAYS_PER_400_YEAR_CYCLE=146097,s.SECONDS_PER_DAY=86400,s.normalizeSecondsForDuration=function(e,t){return(0,re.int)(e).add(he(t,s.NANOS_PER_SECOND))},s.normalizeNanosecondsForDuration=function(e){return be(e,s.NANOS_PER_SECOND)},s.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,re.int)(e),t=(0,re.int)(t),r=(0,re.int)(r),n=(0,re.int)(n),(e=(e=(e=e.multiply(s.NANOS_PER_HOUR)).add(t.multiply(s.NANOS_PER_MINUTE))).add(r.multiply(s.NANOS_PER_SECOND))).add(n)},s.localDateTimeToEpochSecond=function(e,t,r,n,o,i,u){return e=pe(e,t,r),t=function(e,t,r){e=(0,re.int)(e),t=(0,re.int)(t),r=(0,re.int)(r);e=e.multiply(s.SECONDS_PER_HOUR);return(e=e.add(t.multiply(s.SECONDS_PER_MINUTE))).add(r)}(n,o,i),e.multiply(s.SECONDS_PER_DAY).add(t)},s.dateToEpochDay=pe,s.durationToIsoString=function(e,t,r,n){return e=_e(e),t=_e(t),r=function(e,t){e=(0,re.int)(e),t=(0,re.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=ye((n?t.negate().add(2*s.NANOS_PER_SECOND):t.add(s.NANOS_PER_SECOND)).modulo(s.NANOS_PER_SECOND)));return null!=r?e+r:e}(r,n),"P".concat(e,"M").concat(t,"DT").concat(r,"S")},s.timeToIsoString=function(e,t,r,n){return e=_e(e,2),t=_e(t,2),r=_e(r,2),n=ye(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},s.timeZoneOffsetToIsoString=function(e){if((e=(0,re.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=_e((e=r?e.multiply(-1):e).div(s.SECONDS_PER_HOUR),2),n=_e(e.div(s.SECONDS_PER_MINUTE).modulo(s.MINUTES_PER_HOUR),2);return null!=(e=(e=e.modulo(s.SECONDS_PER_MINUTE)).equals(0)?null:_e(e,2))?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},s.dateToIsoString=function(e,t,r){return e=function(e){e=(0,re.int)(e);if(e.isNegative()||e.greaterThan(9999))return _e(e,6,{usePositiveSign:!0});return _e(e,4)}(e),t=_e(t,2),r=_e(r,2),"".concat(e,"-").concat(t,"-").concat(r)},s.isoStringToStandardDate=function(e){return new Date(e)},s.toStandardDate=function(e){return new Date(e)},s.newDate=function(e){return new Date(e)},s.totalNanoseconds=function(e,t){return t=null!=t?t:0,e=e.getMilliseconds()*s.NANOS_PER_MILLISECOND,t instanceof re.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},s.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*s.SECONDS_PER_MINUTE+t},s.assertValidYear=function(e){return de(e,s.YEAR_RANGE,"Year")},s.assertValidMonth=function(e){return de(e,s.MONTH_OF_YEAR_RANGE,"Month")},s.assertValidDay=function(e){return de(e,s.DAY_OF_MONTH_RANGE,"Day")},s.assertValidHour=function(e){return de(e,s.HOUR_OF_DAY_RANGE,"Hour")},s.assertValidMinute=function(e){return de(e,s.MINUTE_OF_HOUR_RANGE,"Minute")},s.assertValidSecond=function(e){return de(e,s.SECOND_OF_MINUTE_RANGE,"Second")},s.assertValidNanosecond=function(e){return de(e,s.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},s.assertValidZoneId=function(t,r){try{Intl.DateTimeFormat(void 0,{timeZone:r})}catch(e){throw(0,ne.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(r,'"'))}},s.floorDiv=he,s.floorMod=be;var ve=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]}),me=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)&&ve(t,e,r);return me(t,e),t},ge=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(i,"__esModule",{value:!0}),i.isDateTime=i.DateTime=i.isLocalDateTime=i.LocalDateTime=i.isDate=i.Date=i.isTime=i.Time=i.isLocalTime=i.LocalTime=i.isDuration=i.Duration=void 0,c(o)),Oe=u,we=t,Ee=c(n),c={value:!0,enumerable:!1,configurable:!1,writable:!1},Pe="__isDuration__",Se="__isLocalTime__",Te="__isTime__",je="__isDate__",Ce="__isLocalDateTime__",Ie="__isDateTime__",f=(ke.prototype.toString=function(){return l.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},ke);function ke(e,t,r,n){this.months=(0,Oe.assertNumberOrInteger)(e,"Months"),this.days=(0,Oe.assertNumberOrInteger)(t,"Days"),(0,Oe.assertNumberOrInteger)(r,"Seconds"),(0,Oe.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=l.normalizeSecondsForDuration(r,n),this.nanoseconds=l.normalizeNanosecondsForDuration(n),Object.freeze(this)}i.Duration=f,Object.defineProperty(f.prototype,Pe,c),i.isDuration=function(e){return Ue(e,Pe)};Re.fromStandardDate=function(e,t){Le(e,t);t=l.totalNanoseconds(e,t);return new Re(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Ee.default?t.toInt():"bigint"==typeof t?(0,Ee.int)(t).toInt():t)},Re.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};f=Re;function Re(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)}i.LocalTime=f,Object.defineProperty(f.prototype,Se,c),i.isLocalTime=function(e){return Ue(e,Se)};Ae.fromStandardDate=function(e,t){return Le(e,t),new Ae(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(l.totalNanoseconds(e,t)),l.timeZoneOffsetInSeconds(e))},Ae.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+l.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};f=Ae;function Ae(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,Oe.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}i.Time=f,Object.defineProperty(f.prototype,Te,c),i.isTime=function(e){return Ue(e,Te)};Me.fromStandardDate=function(e){return Le(e),new Me(e.getFullYear(),e.getMonth()+1,e.getDate())},Me.prototype.toStandardDate=function(){return l.isoStringToStandardDate(this.toString())},Me.prototype.toString=function(){return l.dateToIsoString(this.year,this.month,this.day)};f=Me;function Me(e,t,r){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),Object.freeze(this)}i.Date=f,Object.defineProperty(f.prototype,je,c),i.isDate=function(e){return Ue(e,je)};xe.fromStandardDate=function(e,t){return Le(e,t),new xe(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(l.totalNanoseconds(e,t)))},xe.prototype.toStandardDate=function(){return l.isoStringToStandardDate(this.toString())},xe.prototype.toString=function(){return De(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};f=xe;function xe(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)}i.LocalDateTime=f,Object.defineProperty(f.prototype,Ce,c),i.isLocalDateTime=function(e){return Ue(e,Ce)};Ne.fromStandardDate=function(e,t){return Le(e,t),new Ne(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(l.totalNanoseconds(e,t)),l.timeZoneOffsetInSeconds(e),null)},Ne.prototype.toStandardDate=function(){return l.toStandardDate(this._toUTC())},Ne.prototype.toString=function(){var e;return De(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,"]"):"")},Ne.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,Ee.int)(e).multiply(1e3).add((0,Ee.int)(this.nanosecond).div(1e6)).toNumber()};f=Ne;function Ne(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=ge(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,we.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,Oe.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Oe.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 Ue(e,t){return null!=e&&!0===e[t]}function De(e,t,r,n,o,i,u){return l.dateToIsoString(e,t,r)+"T"+l.timeToIsoString(n,o,i,u)}function Le(e,t){(0,Oe.assertValidDate)(e,"Standard date"),null!=t&&(0,Oe.assertNumberOrInteger)(t,"Nanosecond")}i.DateTime=f,Object.defineProperty(f.prototype,Ie,c),i.isDateTime=function(e){return Ue(e,Ie)};var f={},Fe=(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,Q),c={value:!0,enumerable:!1,configurable:!1,writable:!1},Be="__isNode__",We="__isRelationship__",ze="__isUnboundRelationship__",qe="__isPath__",Ve="__isPathSegment__";function He(e,t){return null!=e&&!0===e[t]}Ge.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,Fe.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var p=Ge;function Ge(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=Je(n,function(){return e.toString()})}f.Node=p,Object.defineProperty(p.prototype,Be,c),f.isNode=function(e){return He(e,Be)};Ye.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,Fe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var Ke=Ye;function Ye(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=Je(i,function(){return e.toString()}),this.startNodeElementId=Je(u,function(){return t.toString()}),this.endNodeElementId=Je(a,function(){return r.toString()})}f.Relationship=Ke,Object.defineProperty(Ke.prototype,We,c),f.isRelationship=function(e){return He(e,We)};Ze.prototype.bind=function(e,t){return new Ke(this.identity,e,t,this.type,this.properties,this.elementId)},Ze.prototype.bindTo=function(e,t){return new Ke(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},Ze.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,Fe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};p=Ze;function Ze(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=Je(n,function(){return e.toString()})}f.UnboundRelationship=p,Object.defineProperty(p.prototype,ze,c),f.isUnboundRelationship=function(e){return He(e,ze)};function Qe(e,t,r){this.start=e,this.relationship=t,this.end=r}f.PathSegment=Qe,Object.defineProperty(Qe.prototype,Ve,c),f.isPathSegment=function(e){return He(e,Ve)};function Xe(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function Je(e,t){return null==e?t():e}f.Path=Xe,Object.defineProperty(Xe.prototype,qe,c),f.isPath=function(e){return He(e,qe)};var p={},$e=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}}}},et=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.")},tt=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},rt=(Object.defineProperty(p,"__esModule",{value:!0}),t);function nt(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)}nt.prototype.forEach=function(e){var t,r;try{for(var n=et(this.entries()),o=n.next();!o.done;o=n.next()){var i=tt(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}}},nt.prototype.map=function(e){var t,r,n=[];try{for(var o=et(this.entries()),i=o.next();!i.done;i=o.next()){var u=tt(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},nt.prototype.entries=function(){var t;return $e(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]}})},nt.prototype.values=function(){var t;return $e(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]}})},nt.prototype[Symbol.iterator]=function(){var t;return $e(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]}})},nt.prototype.toObject=function(){var t,e,r={};try{for(var n=et(this.entries()),o=n.next();!o.done;o=n.next()){var i=tt(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},nt.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,rt.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,rt.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]},nt.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},p.default=nt;var c={},ot=(Object.defineProperty(c,"__esModule",{value:!0}),c.isPoint=c.Point=void 0,u),it="__isPoint__",h=(ut.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(at(this.srid),", x=").concat(at(this.x),", y=").concat(at(this.y),"}"):"Point{srid=".concat(at(this.srid),", x=").concat(at(this.x),", y=").concat(at(this.y),", z=").concat(at(this.z),"}")},ut);function ut(e,t,r,n){this.srid=(0,ot.assertNumberOrInteger)(e,"SRID"),this.x=(0,ot.assertNumber)(t,"X coordinate"),this.y=(0,ot.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,ot.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function at(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}c.Point=h,Object.defineProperty(h.prototype,it,{value:!0,enumerable:!1,configurable:!1,writable:!1}),c.isPoint=function(e){return null!=e&&!0===e[it]};var h={},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]}),ct=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),lt=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 ct(t,e),t},ft=(Object.defineProperty(h,"__esModule",{value:!0}),h.notificationCategory=h.notificationSeverityLevel=h.Stats=h.QueryStatistics=h.ProfiledPlan=h.Plan=h.Notification=h.ServerInfo=h.queryType=void 0,lt(n)),lt=(pt.prototype._buildNotifications=function(e){return null==e?[]:e.map(function(e){return new wt(e)})},pt.prototype.hasPlan=function(){return this.plan instanceof dt},pt.prototype.hasProfile=function(){return this.profile instanceof ht},pt);function pt(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new yt(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new dt(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new ht(r.profile),this.notifications=this._buildNotifications(r.notifications),this.server=new Pt(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 dt=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)}):[]},ht=(h.Plan=dt,bt.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},bt);function bt(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=Tt("dbHits",e),this.rows=Tt("rows",e),this.pageCacheMisses=Tt("pageCacheMisses",e),this.pageCacheHits=Tt("pageCacheHits",e),this.pageCacheHitRatio=Tt("pageCacheHitRatio",e),this.time=Tt("time",e),this.children=null!=e.children?e.children.map(function(e){return new bt(e)}):[]}h.ProfiledPlan=ht;h.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},_t.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)},_t.prototype.updates=function(){return this._stats},_t.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},_t.prototype.systemUpdates=function(){return this._systemUpdates};var yt=_t;function _t(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]=St(r[e]):"systemUpdates"===t?n._systemUpdates=St(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}h.QueryStatistics=yt;var vt={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},mt=(h.notificationSeverityLevel=vt,Object.freeze(vt),Object.values(vt)),gt={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",UNKNOWN:"UNKNOWN"},Ot=(h.notificationCategory=gt,Object.freeze(gt),Object.values(gt)),wt=(Et._constructPosition=function(e){return null==e?{}:{offset:St(e.offset),line:St(e.line),column:St(e.column)}},Et);function Et(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=Et._constructPosition(e.position),this.severityLevel=mt.includes(e.severity)?e.severity:vt.UNKNOWN,this.rawSeverityLevel=e.severity,this.category=Ot.includes(e.category)?e.category:gt.UNKNOWN,this.rawCategory=e.category}h.Notification=wt;var Pt=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function St(e){return e instanceof ft.default?e.toInt():"bigint"==typeof e?(0,ft.int)(e).toInt():e}function Tt(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?St(t[e]):r}h.ServerInfo=Pt;function jt(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,new Error("Not implemented")}h.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},h.default=lt;var lt={},b=(Object.defineProperty(lt,"__esModule",{value:!0}),lt.notificationFilterDisabledCategory=lt.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),b=(lt.notificationFilterMinimumSeverityLevel=b,Object.freeze(b),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC"}),b=(lt.notificationFilterDisabledCategory=b,Object.freeze(b),lt.default=jt,{}),y={},_={},v=(Object.defineProperty(_,"__esModule",{value:!0}),_.FailedObserver=_.CompletedObserver=void 0,Ct.prototype.subscribe=function(e){kt(e,e.onKeys,[]),kt(e,e.onCompleted,{})},Ct.prototype.cancel=function(){},Ct.prototype.pause=function(){},Ct.prototype.resume=function(){},Ct.prototype.prepareToHandleSingleResponse=function(){},Ct.prototype.markCompleted=function(){},Ct.prototype.onError=function(e){throw Error("CompletedObserver not supposed to call onError")},Ct);function Ct(){}function It(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function kt(e,t,r){null!=t&&t.bind(e)(r)}_.CompletedObserver=v,It.prototype.subscribe=function(e){kt(e,e.onError,this._error),this._observers.push(e)},It.prototype.onError=function(t){kt(this,this._beforeError,t),this._observers.forEach(function(e){return kt(e,e.onError,t)})},It.prototype.cancel=function(){},It.prototype.pause=function(){},It.prototype.resume=function(){},It.prototype.markCompleted=function(){},It.prototype.prepareToHandleSingleResponse=function(){},_.FailedObserver=It;var v={},Rt=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]}),At=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),m=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)&&Rt(t,e,r);return At(t,e),t},Mt=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},xt=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))},Nt=(Object.defineProperty(v,"__esModule",{value:!0}),v.Bookmarks=void 0,m(u)),m=(Ut.empty=function(){return Dt},Ut.prototype.isEmpty=function(){return 0===this._values.length},Ut.prototype.values=function(){return this._values},Ut.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},Ut.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},Ut);function Ut(e){this._values=function(e){if(null==e||""===e)return[];if(Nt.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(!Nt.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return xt([],Mt(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var Dt=new(v.Bookmarks=m)(null);var Lt,m={},g=(Object.defineProperty(m,"__esModule",{value:!0}),m.BOLT_PROTOCOL_V5_2=m.BOLT_PROTOCOL_V5_1=m.BOLT_PROTOCOL_V5_0=m.BOLT_PROTOCOL_V4_4=m.BOLT_PROTOCOL_V4_3=m.BOLT_PROTOCOL_V4_2=m.BOLT_PROTOCOL_V4_1=m.BOLT_PROTOCOL_V4_0=m.BOLT_PROTOCOL_V3=m.BOLT_PROTOCOL_V2=m.BOLT_PROTOCOL_V1=m.DEFAULT_POOL_MAX_SIZE=m.DEFAULT_POOL_ACQUISITION_TIMEOUT=m.DEFAULT_CONNECTION_TIMEOUT_MILLIS=m.ACCESS_MODE_WRITE=m.ACCESS_MODE_READ=m.FETCH_ALL=void 0,m.FETCH_ALL=-1,m.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,m.DEFAULT_POOL_MAX_SIZE=100,m.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,m.ACCESS_MODE_READ="READ",m.ACCESS_MODE_WRITE="WRITE",m.BOLT_PROTOCOL_V1=1,m.BOLT_PROTOCOL_V2=2,m.BOLT_PROTOCOL_V3=3,m.BOLT_PROTOCOL_V4_0=4,m.BOLT_PROTOCOL_V4_1=4.1,m.BOLT_PROTOCOL_V4_2=4.2,m.BOLT_PROTOCOL_V4_3=4.3,m.BOLT_PROTOCOL_V4_4=4.4,m.BOLT_PROTOCOL_V5_0=5,m.BOLT_PROTOCOL_V5_1=5.1,m.BOLT_PROTOCOL_V5_2=5.2,{}),Ft=r&&r.__extends||(Lt=function(e,t){return(Lt=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}Lt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Bt=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())})},Wt=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}}}},zt=(Object.defineProperty(g,"__esModule",{value:!0}),g.EMPTY_CONNECTION_HOLDER=g.ReadOnlyConnectionHolder=g.ConnectionHolder=void 0,t),qt=u,Vt=m,Ht=v,O=(Gt.prototype.mode=function(){return this._mode},Gt.prototype.database=function(){return this._database},Gt.prototype.setDatabase=function(e){this._database=e},Gt.prototype.bookmarks=function(){return this._bookmarks},Gt.prototype.connectionProvider=function(){return this._connectionProvider},Gt.prototype.referenceCount=function(){return this._referenceCount},Gt.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},Gt.prototype._createConnectionPromise=function(o){return Bt(this,void 0,void 0,function(){var t,r,n;return Wt(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()]}})})},Gt.prototype._getBookmarks=function(){return Bt(this,void 0,void 0,function(){return Wt(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},Gt.prototype.getConnection=function(){return this._connectionPromise},Gt.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},Gt.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},Gt.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(Xt).then(function(){return e._release().then(function(){return null})}):e._release().then(function(){return null}):Promise.resolve(null)}).catch(Xt),this._connectionPromise},Gt);function Gt(e){var e=void 0===e?{}:e,t=e.mode,t=void 0===t?Vt.ACCESS_MODE_WRITE:t,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,a=e.getConnectionAcquistionBookmarks,e=e.auth;this._mode=t,this._closed=!1,this._database=null!=r?(0,qt.assertString)(r,"database"):"",this._bookmarks=null!=n?n:Ht.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=e,this._getConnectionAcquistionBookmarks=null!=a?a:function(){return Promise.resolve(Ht.Bookmarks.empty())}}g.ConnectionHolder=O;Ft(Zt,Kt=O),Zt.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},Zt.prototype.getConnection=function(){return this._connectionHolder.getConnection()},Zt.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},Zt.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var Kt,Yt,w=Zt;function Zt(e){var t=Kt.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider()})||this;return t._connectionHolder=e,t}function Qt(){return null!==Yt&&Yt.apply(this,arguments)||this}g.ReadOnlyConnectionHolder=w,g.default=w,Ft(Qt,Yt=O),Qt.prototype.mode=function(){},Qt.prototype.database=function(){},Qt.prototype.initializeConnection=function(){return!0},Qt.prototype.getConnection=function(){return Bt(this,void 0,void 0,function(){return Wt(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,zt.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},Qt.prototype.releaseConnection=function(){return Bt(this,void 0,void 0,function(){return Wt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},Qt.prototype.close=function(){return Bt(this,void 0,void 0,function(){return Wt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};w=new Qt;function Xt(e){return null}g.EMPTY_CONNECTION_HOLDER=w;var Ft={},Jt=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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),O=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)&&Jt(t,e,r);return $t(t,e),t},er=(Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.TxConfig=void 0,O(u)),tr=t,rr=n,w=(nr.empty=function(){return or},nr.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},nr);function nr(e){var t;null!=(t=e)&&er.assertObject(t,"Transaction config"),this.timeout=function(e){if(er.isObject(e)&&null!=e.timeout){er.assertNumberOrInteger(e.timeout,"Transaction timeout");e=(0,rr.int)(e.timeout);if(e.isNegative())throw(0,tr.newError)("Transaction timeout should not be negative");return e}return null}(e),this.metadata=function(e){if(er.isObject(e)&&null!=e.metadata){e=e.metadata;if(er.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var or=new(Ft.TxConfig=w)({});var O={},ir=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())})},ur=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}}}},ar=(Object.defineProperty(O,"__esModule",{value:!0}),O.TransactionExecutor=void 0,t);function sr(e,t,r,n){this._maxRetryTimeMs=cr(e,3e4),this._initialRetryDelayMs=cr(t,1e3),this._multiplier=cr(r,2),this._jitterFactor=cr(n,.2),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}function cr(e,t){return null!=e?e:t}sr.prototype.execute=function(n,o,i){var u=this;return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i)})},sr.prototype.close=function(){this._inFlightTimeoutIds.forEach(function(e){return clearTimeout(e)}),this._inFlightTimeoutIds=[]},sr.prototype._retryTransactionPromise=function(o,i,e,r,u,a){var s=this;return Date.now()-r>this._maxRetryTimeMs||!(0,ar.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=s._computeDelayWithJitter(u),n=setTimeout(function(){s._inFlightTimeoutIds=s._inFlightTimeoutIds.filter(function(e){return e!==n}),s._executeTransactionInsidePromise(o,i,e,t,a).catch(t)},r);s._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*s._multiplier;return s._retryTransactionPromise(o,i,e,r,t,a)})},sr.prototype._executeTransactionInsidePromise=function(o,i,u,a,s){return ir(this,void 0,void 0,function(){var t,r,n=this;return ur(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,o()];case 1:return t=e.sent(),[3,3];case 2:return r=e.sent(),a(r),[2];case 3:return r=(null!=s?s:function(e){return e})(t),this._safeExecuteTransactionWork(r,i).then(function(e){return n._handleTransactionWorkSuccess(e,t,u,a)}).catch(function(e){return n._handleTransactionWorkFailure(e,t,a)}),[2]}})})},sr.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},sr.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},sr.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},sr.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},sr.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,ar.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,ar.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,ar.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,ar.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},O.TransactionExecutor=sr;var lr,fr,w={},E=r&&r.__extends||(lr=function(e,t){return(lr=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}lr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),pr=(Object.defineProperty(w,"__esModule",{value:!0}),w.Logger=void 0,t),dr="error",hr="warn",br="info",yr="debug",_r=((vr={})[dr]=0,vr[hr]=1,vr[br]=2,vr[yr]=3,vr),vr=(mr.create=function(e){return null!=(null==e?void 0:e.logging)?new mr(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=_r[e];if(null!=t||0===t)return e;throw(0,pr.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(_r).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,pr.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},mr.noOp=function(){return Or},mr.prototype.isErrorEnabled=function(){return wr(this._level,dr)},mr.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(dr,e)},mr.prototype.isWarnEnabled=function(){return wr(this._level,hr)},mr.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(hr,e)},mr.prototype.isInfoEnabled=function(){return wr(this._level,br)},mr.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(br,e)},mr.prototype.isDebugEnabled=function(){return wr(this._level,yr)},mr.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(yr,e)},mr);function mr(e,t){this._level=e,this._loggerFunction=t}function gr(){return fr.call(this,br,function(e,t){})||this}w.Logger=vr,E(gr,fr=vr),gr.prototype.isErrorEnabled=function(){return!1},gr.prototype.error=function(e){},gr.prototype.isWarnEnabled=function(){return!1},gr.prototype.warn=function(e){},gr.prototype.isInfoEnabled=function(){return!1},gr.prototype.info=function(e){},gr.prototype.isDebugEnabled=function(){return!1},gr.prototype.debug=function(e){};var Or=new gr;function wr(e,t){return _r[e]>=_r[t]}var E={},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(E,"__esModule",{value:!0}),E.Url=E.formatIPv6Address=E.formatIPv4Address=E.defaultPortForScheme=E.parseDatabaseUrl=void 0,u),Tr=7687,jr=7474,Cr=7473,Ir=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function kr(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function Rr(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 Ar(e){return"http"===e?jr:"https"===e?Cr:Tr}E.Url=Ir,E.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(":")?Rr(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)?Ar(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=kr(e[0],"key",r),e=kr(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 Ir(n,o,u,i,r)},E.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},E.formatIPv6Address=function(e,t){return e=Rr(e),"".concat(e,":").concat(t)},E.defaultPortForScheme=Ar;var vr={},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]}),xr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nr=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 xr(t,e),t},Ur=(Object.defineProperty(vr,"__esModule",{value:!0}),vr.ServerAddress=void 0,u),Dr=Nr(E);function Lr(e,t,r,n){this._host=(0,Ur.assertString)(e,"host"),this._resolved=null!=t?(0,Ur.assertString)(t,"resolved"):null,this._port=(0,Ur.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Lr.prototype.host=function(){return this._host},Lr.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Lr.prototype.port=function(){return this._port},Lr.prototype.resolveWith=function(e){return new Lr(this._host,e,this._port,this._hostPort)},Lr.prototype.asHostPort=function(){return this._hostPort},Lr.prototype.asKey=function(){return this._hostPort},Lr.prototype.toString=function(){return this._stringValue},Lr.fromUrl=function(e){e=Dr.parseDatabaseUrl(e);return new Lr(e.host,null,e.port,e.hostAndPort)},vr.ServerAddress=Lr;var Nr={},Fr={};function Br(){}Object.defineProperty(Fr,"__esModule",{value:!0}),Br.prototype.resolve=function(){throw new Error("Abstract function")},Br.prototype._resolveToItself=function(e){return Promise.resolve([e])},Fr.default=Br;var Wr={},zr=(Object.defineProperty(Wr,"__esModule",{value:!0}),vr);function qr(e){return Promise.resolve([e])}function Vr(e){this._resolverFunction=null!=e?e:qr}Vr.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 zr.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))})},Wr.default=Vr;function Hr(e){console.log("Uncaught error when processing result: "+e)}function Gr(e){}function Kr(e){}var P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fr=(Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.ConfiguredCustomResolver=Nr.BaseHostNameResolver=void 0,P(Fr)),Fr=(Nr.BaseHostNameResolver=Fr.default,P(Wr)),Yr=(Nr.ConfiguredCustomResolver=Fr.default,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]})),Zr=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)&&Yr(t,e,r);return Zr(t,e),t},Fr=(Object.defineProperty(y,"__esModule",{value:!0}),y.objectUtil=y.resolver=y.serverAddress=y.urlUtil=y.logger=y.transactionExecutor=y.txConfig=y.connectionHolder=y.constants=y.bookmarks=y.observer=y.temporalUtil=y.util=void 0,P(u)),Fr=(y.util=Fr,P(o)),o=(y.temporalUtil=Fr,P(_)),Fr=(y.observer=o,P(v)),o=(y.bookmarks=Fr,P(m)),Fr=(y.constants=o,P(g)),o=(y.connectionHolder=Fr,P(Ft)),Fr=(y.txConfig=o,P(O)),o=(y.transactionExecutor=Fr,P(w)),Fr=(y.logger=o,P(E)),o=(y.urlUtil=Fr,P(vr)),E=(y.serverAddress=o,P(Nr)),Fr=(y.resolver=E,P(a)),Qr=(y.objectUtil=Fr,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())})}),Xr=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}}}},vr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jr=(Object.defineProperty(b,"__esModule",{value:!0}),vr(h)),$r=y,en=t,tn=$r.connectionHolder.EMPTY_CONNECTION_HOLDER;function rn(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),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:tn,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}rn.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)})},rn.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)})},rn.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},rn.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,en.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return Qr(n,void 0,void 0,function(){var t;return Xr(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,en.newError)("InvalidState: Result stream finished without Summary",en.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 Qr(n,void 0,void 0,function(){var t;return Xr(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 Qr(n,void 0,void 0,function(){var t;return Xr(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 Qr(n,void 0,void 0,function(){return Xr(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()]}})})}}},rn.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},rn.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},rn.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},rn.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},rn.prototype.isOpen=function(){return null===this._summary&&null===this._error},rn.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)})},rn.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:Gr,i=null!=(e=n.onError)?e:Hr,r=null!=(e=n.onKeys)?e:Kr;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)}}},rn.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},rn.prototype._releaseConnectionAndGetSummary=function(t){var e=$r.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(t){return o.releaseConnection().then(function(){var e;return null==(e=null==t?void 0:t.protocol())?void 0:e.version})},function(e){}).then(function(e){return new Jr.default(r,n,t,e)})},rn.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 Qr(this,void 0,void 0,function(){var t;return Xr(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,en.newError)("Unexpected empty buffer",en.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 Qr(e,void 0,void 0,function(){var t;return Xr(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 Qr(e,void 0,void 0,function(){var t,r;return Xr(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},b.default=rn;o={};Object.defineProperty(o,"__esModule",{value:!0});o.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};Nr={};function nn(){}Object.defineProperty(Nr,"__esModule",{value:!0}),nn.prototype.acquireConnection=function(e){throw Error("Not implemented")},nn.prototype.supportsMultiDb=function(){throw Error("Not implemented")},nn.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},nn.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},nn.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},nn.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},nn.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},nn.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},nn.prototype.close=function(){throw Error("Not implemented")},Nr.default=nn;E={};function on(){}Object.defineProperty(E,"__esModule",{value:!0}),Object.defineProperty(on.prototype,"id",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(on.prototype,"databaseId",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(on.prototype,"server",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(on.prototype,"authToken",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(on.prototype,"address",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(on.prototype,"version",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(on.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),on.prototype.isOpen=function(){return!1},on.prototype.protocol=function(){throw Error("Not implemented")},on.prototype.connect=function(e,t){throw Error("Not implemented")},on.prototype.write=function(e,t,r){throw Error("Not implemented")},on.prototype.resetAndFlush=function(){throw Error("Not implemented")},on.prototype.hasOngoingObservableRequests=function(){throw Error("Not implemented")},on.prototype.close=function(){throw Error("Not implemented")},on.prototype._release=function(){return Promise.resolve()},E.default=on;var P={},un=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())})},an=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}}}},a=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sn=(Object.defineProperty(P,"__esModule",{value:!0}),u),cn=g,ln=v,fn=Ft,pn=_,dn=t,hn=a(b);function bn(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,e=e.notificationFilter,l=this;this._connectionHolder=t,this._reactive=i,this._state=yn.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=ln.Bookmarks.empty(),this._notificationFilter=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){l._acceptActive=e})}bn.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return un(t,void 0,void 0,function(){var t,r=this;return an(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.protocol().beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,beforeError:function(e){return null!=u&&u.onError(e),r._onError(e)},afterComplete:function(e){return null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,dn.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},bn.prototype.run=function(e,t){e=(0,sn.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},bn.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)}})})},bn.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)}})})},bn.prototype.isOpen=function(){return this._state===yn.ACTIVE},bn.prototype.close=function(){return un(this,void 0,void 0,function(){return an(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]}})})},bn.prototype._onErrorCallback=function(){return this._state=yn.FAILED,this._onClose(),this._connectionHolder.releaseConnection()},bn.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new ln.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:ln.Bookmarks.empty(),null==e?void 0:e.db)};var yn={ACTIVE:{commit:function(e){return{result:_n(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:yn.SUCCEEDED}},rollback:function(e){return{result:_n(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:yn.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 vn(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.protocol().run(t,r,{bookmarks:ln.Bookmarks.empty(),txConfig:fn.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,dn.newError)("No connection available")}).catch(function(e){return new pn.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:vn(new pn.FailedObserver({error:(0,dn.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:yn.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:vn(new pn.CompletedObserver,"ROLLBACK",{},t,0,0),state:yn.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,vn(new pn.FailedObserver({error:(0,dn.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:vn(new pn.FailedObserver({error:(0,dn.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},cn.EMPTY_CONNECTION_HOLDER,0,0),state:yn.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:vn(new pn.FailedObserver({error:(0,dn.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},cn.EMPTY_CONNECTION_HOLDER,0,0),state:yn.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,vn(new pn.FailedObserver({error:(0,dn.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:vn(new pn.FailedObserver({error:(0,dn.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:yn.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:vn(new pn.FailedObserver({error:(0,dn.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:yn.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,vn(new pn.FailedObserver({error:(0,dn.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function _n(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.protocol().commitTransaction({beforeError:n,afterComplete:o}):t.protocol().rollbackTransaction({beforeError:n,afterComplete:o});throw(0,dn.newError)("No connection available")})}).catch(function(e){return new pn.FailedObserver({error:e,onError:n})});return new hn.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function vn(e,t,r,n,o,i){return void 0===n&&(n=cn.EMPTY_CONNECTION_HOLDER),new hn.default(Promise.resolve(e),t,r,new cn.ReadOnlyConnectionHolder(null!=n?n:cn.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}P.default=bn;Fr={};function mn(e){e=e.run;this._run=e}Object.defineProperty(Fr,"__esModule",{value:!0}),mn.fromTransaction=function(e){return new mn({run:e.run.bind(e)})},mn.prototype.run=function(e,t){return this._run(e,t)},Fr.default=mn;var gn,On,wn,vr={},a=r&&r.__extends||(gn=function(e,t){return(gn=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}gn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),En=r&&r.__assign||function(){return(En=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}},S=(Object.defineProperty(vr,"__esModule",{value:!0}),S(P)),S=(wn=S.default,a(Pn,wn),Pn.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},Pn.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},Pn.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},Pn.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},Pn.prototype._toTransaction=function(){return En(En({},this),{run:wn.prototype.run.bind(this),commit:wn.prototype.commit.bind(this),rollback:wn.prototype.rollback.bind(this),close:wn.prototype.close.bind(this),isOpen:wn.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},Pn.prototype._begin=function(e,t){return wn.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},Pn.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},Pn.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},Pn);function Pn(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,e=e.notificationFilter,t=wn.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:e})||this;return t[On]="TransactionPromise",t}On=Symbol.toStringTag,vr.default=S;var a={},Sn=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}}}},jn=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},Cn=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))},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},In=(Object.defineProperty(a,"__esModule",{value:!0}),_),kn=u,Rn=m,An=t,Mn=S(b),xn=g,Nn=O,Un=v,Dn=Ft,Ln=S(vr),Fn=S(Fr);function Bn(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,e=e.auth,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 xn.ConnectionHolder({mode:Rn.ACCESS_MODE_READ,auth:e,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks}),this._writeConnectionHolder=new xn.ConnectionHolder({mode:Rn.ACCESS_MODE_WRITE,auth:e,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:Un.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Nn.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}Bn.prototype.run=function(e,t,r){var o=this,e=(0,kn.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Dn.TxConfig(r):Dn.TxConfig.empty(),t=this._run(i,u,function(n){return Sn(o,void 0,void 0,function(){var t,r=this;return Tn(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.protocol().run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,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},Bn.prototype._run=function(e,t,r){var n=this._connectionHolderWithMode(this._mode),o=this._open?!this._hasTx&&n.initializeConnection()?n.getConnection().then(function(e){return r(e)}).catch(function(e){return Promise.resolve(new In.FailedObserver({error:e}))}):Promise.resolve(new In.FailedObserver({error:(0,An.newError)("Queries cannot be run directly on a session with an open transaction; either run from within the transaction or use a different session.")})):Promise.resolve(new In.FailedObserver({error:(0,An.newError)("Cannot run query in a closed session.")})),i={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new Mn.default(o,e,t,n,i)},Bn.prototype._acquireConnection=function(t){var e=this,r=this._connectionHolderWithMode(this._mode),n=this._open?!this._hasTx&&r.initializeConnection()?r.getConnection().then(function(e){return t(e)}).then(function(t){return Sn(e,void 0,void 0,function(){return Tn(this,function(e){switch(e.label){case 0:return[4,r.releaseConnection()];case 1:return e.sent(),[2,t]}})})}):Promise.reject((0,An.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,An.newError)("Cannot run query in a closed session."));return n},Bn.prototype.beginTransaction=function(e){var t=Dn.TxConfig.empty();return null!=e&&(t=new Dn.TxConfig(e)),this._beginTransaction(this._mode,t)},Bn.prototype._beginTransaction=function(e,t){var n=this;if(!this._open)throw(0,An.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,An.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=Bn._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new Ln.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});return e._begin(function(){return n._bookmarks()},t),e},Bn.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,An.newError)("You cannot run more transactions on a closed session.")},Bn.prototype._transactionClosed=function(){this._hasTx=!1},Bn.prototype.lastBookmark=function(){return this.lastBookmarks()},Bn.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},Bn.prototype._bookmarks=function(){var r;return Sn(this,void 0,void 0,function(){var t;return Tn(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 Un.Bookmarks(Cn(Cn([],jn(t),!1),jn(this._configuredBookmarks),!1))]}})})},Bn.prototype.readTransaction=function(e,t){t=new Dn.TxConfig(t);return this._runTransaction(Rn.ACCESS_MODE_READ,t,e)},Bn.prototype.writeTransaction=function(e,t){t=new Dn.TxConfig(t);return this._runTransaction(Rn.ACCESS_MODE_WRITE,t,e)},Bn.prototype._runTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(e,t)},r)},Bn.prototype.executeRead=function(e,t){t=new Dn.TxConfig(t);return this._executeInTransaction(Rn.ACCESS_MODE_READ,t,e)},Bn.prototype.executeWrite=function(e,t){t=new Dn.TxConfig(t);return this._executeInTransaction(Rn.ACCESS_MODE_WRITE,t,e)},Bn.prototype._executeInTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(e,t)},r,Fn.default.fromTransaction)},Bn.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},Bn.prototype._getConnectionAcquistionBookmarks=function(){var r;return Sn(this,void 0,void 0,function(){var t;return Tn(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 Un.Bookmarks(Cn(Cn([],jn(this._configuredBookmarks),!1),jn(t),!1))]}})})},Bn.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:[]),this._lastBookmarks=e,this._configuredBookmarks=Un.Bookmarks.empty())},Bn.prototype.close=function(){return Sn(this,void 0,void 0,function(){return Tn(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]}})})},Bn.prototype._connectionHolderWithMode=function(e){if(e===Rn.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===Rn.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,An.newError)("Unknown access mode: "+e)},Bn.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new Un.Bookmarks(e.bookmark),t,e.db)},Bn.prototype._calculateWatermaks=function(){return this._fetchSize===Rn.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},Bn._validateSessionMode=function(e){e=null!=e?e:Rn.ACCESS_MODE_WRITE;if(e!==Rn.ACCESS_MODE_READ&&e!==Rn.ACCESS_MODE_WRITE)throw(0,An.newError)("Illegal session mode "+e);return e},a.default=Bn;var _={},g={},Wn=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())})},zn=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}}}},qn=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.")},Vn=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},Hn=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))},O=(Object.defineProperty(g,"__esModule",{value:!0}),g.bookmarkManager=void 0,Gn.prototype.updateBookmarks=function(e,t){return Wn(this,void 0,void 0,function(){return zn(this,function(e){throw new Error("Not implemented")})})},Gn.prototype.getBookmarks=function(){return Wn(this,void 0,void 0,function(){return zn(this,function(e){throw new Error("Not implemented")})})},Gn);function Gn(){throw new Error("Not implemented")}g.default=O,g.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Kn(t,e.bookmarksSupplier,e.bookmarksConsumer)};Yn.prototype.updateBookmarks=function(f,p){return Wn(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return zn(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=qn(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=qn(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(Hn([],Vn(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Yn.prototype.getBookmarks=function(){var s;return Wn(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return zn(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=qn(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,Hn([],Vn(t),!1)]}})})};var Kn=Yn;function Yn(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Ft={},Zn=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())})},Qn=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}}}},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xn=(Object.defineProperty(Ft,"__esModule",{value:!0}),S(o)),Jn=t;function $n(o){return Zn(this,void 0,void 0,function(){var t,r,n;return Qn(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 Xn.default(n,r,t)]}})})}function eo(){}eo.prototype.eagerResultTransformer=function(){return $n},eo.prototype.mappedResultTransformer=function(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,Jn.newError)("Requires a map or/and a collect functions.");return function(o){return Zn(e,void 0,void 0,function(){return Qn(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()]}})})}};var O=new eo,S=(Object.freeze(O),Ft.default=O,{}),to=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}}}};function no(e){this._createSession=e}Object.defineProperty(S,"__esModule",{value:!0}),no.prototype.execute=function(o,i,u){return to(this,void 0,void 0,function(){var t,n=this;return ro(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser}),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 to(n,void 0,void 0,function(){var t;return ro(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})})];case 2:return[2,e.sent()];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},S.default=no;function oo(){this.routing=Eo.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0}var io=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())})},uo=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}}}},O=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ao=(Object.defineProperty(_,"__esModule",{value:!0}),_.QueryConfig=_.SessionConfig=_.routing=_.WRITE=_.READ=_.Driver=void 0,v),so=O(Wr),co=m,lo=w,fo=O(a),po=u,ho=g,bo=O(Ft),yo=O(S),_o=t,vo=36e5,mo=1e3,go=co.ACCESS_MODE_READ,Oo=(_.READ=go,co.ACCESS_MODE_WRITE),wo=(_.WRITE=Oo,0),Eo=(_.SessionConfig=function(){this.defaultAccessMode=Oo,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"}),v=(_.routing=Eo,Object.freeze(Eo),_.QueryConfig=oo,Object.defineProperty(Po.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Po.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),io(this,void 0,void 0,function(){var t,r,n;return uo(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:bo.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:Eo.WRITE)!==Eo.READ&&n!==Eo.WRITE)throw(0,_o.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser},o,i)];case 1:return[2,e.sent()]}})})},Po.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:go})},Po.prototype.verifyAuthentication=function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return io(this,void 0,void 0,function(){return uo(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:go})];case 1:return[2,e.sent()]}})})},Po.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:go})},Po.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Po.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Po.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Po.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},Po.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Po.prototype.isEncrypted=function(){return this._isEncrypted()},Po.prototype._supportsRouting=function(){return this._meta.routing},Po.prototype._isEncrypted=function(){return this._config.encrypted===po.ENCRYPTION_ON||!0===this._config.encrypted},Po.prototype._getTrust=function(){return this._config.trust},Po.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?Oo:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:To(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},Po.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Po.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Po.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=fo.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),r=null!=r?new ao.Bookmarks(r):ao.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})},Po.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new so.default(e.resolver)))),this._connectionProvider},Po);function Po(e,t,r,n,o){void 0===n&&(n=function(e){return new fo.default(e)}),void 0===o&&(o=function(e){return new yo.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=So(i.maxConnectionLifetime,vo),i.maxConnectionPoolSize=So(i.maxConnectionPoolSize,co.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=So(i.connectionAcquisitionTimeout,co.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=To(i.fetchSize,mo),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?co.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i);var i=lo.Logger.create(t),u=t,a=i,s=u.resolver;if(null!=s&&"function"!=typeof s)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof s));u.connectionAcquisitionTimeout<u.connectionTimeout&&a.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'),this._id=wo++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,ho.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function So(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function To(e,t){e=parseInt(e,10);if(0<e||e===co.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(co.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}_.Driver=v,_.default=v;Wr={};function jo(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.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 jo(t)&&(n.credentials=t),jo(r)&&(n.realm=r),jo(o)&&(n.parameters=o),n}};var m={},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())})},Io=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}}}},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ko=(Object.defineProperty(m,"__esModule",{value:!0}),m.isStaticAuthTokenManger=m.staticAuthTokenManager=m.expirationBasedAuthTokenManager=m.AuthTokenAndExpiration=void 0,w(Wr)),Ro=y;function Ao(){}Ao.prototype.getToken=function(){throw new Error("Not Implemented")},Ao.prototype.onTokenExpired=function(e){throw new Error("Not implemented")},m.default=Ao,m.AuthTokenAndExpiration=function(){this.token=ko.default.none(),this.expiration=void 0},m.expirationBasedAuthTokenManager=function(e){if("function"!=typeof(e=e.tokenProvider))throw new TypeError("tokenProvider should be function, but got: ".concat(typeof e));return new No(e)},m.staticAuthTokenManager=function(e){return e=e.authToken,new Do(e)},m.isStaticAuthTokenManger=function(e){return e instanceof Do};xo.prototype.subscribe=function(e){this._subscribers.push(e)},xo.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},xo.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var Mo=xo;function xo(e){this._subscribers=e=void 0===e?[]:e}Uo.prototype.getToken=function(){var t;return Co(this,void 0,void 0,function(){return Io(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]}})})},Uo.prototype.onTokenExpired=function(e){Ro.util.equals(e,null==(e=this._currentAuthData)?void 0:e.token)&&this._scheduleRefreshAuthToken()},Uo.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new Mo,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)},Uo.prototype._refreshAuthToken=function(){return Co(this,void 0,void 0,function(){var r=this;return Io(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 No=Uo;function Uo(e,t,r){this._tokenProvider=e,this._currentAuthData=t,this._refreshObservable=r}Lo.prototype.getToken=function(){return this._authToken},Lo.prototype.onTokenExpired=function(e){};var Do=Lo;function Lo(e){this._authToken=e}var Fo,Bo,Wo,zo,qo,Vo,Ho,Go,Ko,Yo,Zo,Qo,u={},Fr=(Object.defineProperty(u,"__esModule",{value:!0}),O=e,Fo=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]}),Bo=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),S=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)&&Fo(t,e,r);return Bo(t,e),t},v=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(O,"__esModule",{value:!0}),O.ManagedTransaction=O.Transaction=O.Connection=O.ConnectionProvider=O.EagerResult=O.Result=O.Stats=O.QueryStatistics=O.ProfiledPlan=O.Plan=O.Notification=O.ServerInfo=O.queryType=O.ResultSummary=O.Record=O.isPathSegment=O.PathSegment=O.isPath=O.Path=O.isUnboundRelationship=O.UnboundRelationship=O.isRelationship=O.Relationship=O.isNode=O.Node=O.Time=O.LocalTime=O.LocalDateTime=O.isTime=O.isLocalTime=O.isLocalDateTime=O.isDuration=O.isDateTime=O.isDate=O.Duration=O.DateTime=O.Date=O.Point=O.isPoint=O.internal=O.toString=O.toNumber=O.inSafeRange=O.isInt=O.int=O.Integer=O.error=O.isRetriableError=O.Neo4jError=O.newError=void 0,O.notificationFilterMinimumSeverityLevel=O.notificationFilterDisabledCategory=O.notificationSeverityLevel=O.notificationCategory=O.resultTransformers=O.routing=O.isStaticAuthTokenManger=O.staticAuthTokenManager=O.expirationBasedAuthTokenManager=O.bookmarkManager=O.auth=O.json=O.driver=O.types=O.Driver=O.Session=O.TransactionPromise=void 0,Wo=t,Object.defineProperty(O,"newError",{enumerable:!0,get:function(){return Wo.newError}}),Object.defineProperty(O,"Neo4jError",{enumerable:!0,get:function(){return Wo.Neo4jError}}),Object.defineProperty(O,"isRetriableError",{enumerable:!0,get:function(){return Wo.isRetriableError}}),zo=S(n),O.Integer=zo.default,Object.defineProperty(O,"int",{enumerable:!0,get:function(){return zo.int}}),Object.defineProperty(O,"isInt",{enumerable:!0,get:function(){return zo.isInt}}),Object.defineProperty(O,"inSafeRange",{enumerable:!0,get:function(){return zo.inSafeRange}}),Object.defineProperty(O,"toNumber",{enumerable:!0,get:function(){return zo.toNumber}}),Object.defineProperty(O,"toString",{enumerable:!0,get:function(){return zo.toString}}),qo=i,Object.defineProperty(O,"Date",{enumerable:!0,get:function(){return qo.Date}}),Object.defineProperty(O,"DateTime",{enumerable:!0,get:function(){return qo.DateTime}}),Object.defineProperty(O,"Duration",{enumerable:!0,get:function(){return qo.Duration}}),Object.defineProperty(O,"isDate",{enumerable:!0,get:function(){return qo.isDate}}),Object.defineProperty(O,"isDateTime",{enumerable:!0,get:function(){return qo.isDateTime}}),Object.defineProperty(O,"isDuration",{enumerable:!0,get:function(){return qo.isDuration}}),Object.defineProperty(O,"isLocalDateTime",{enumerable:!0,get:function(){return qo.isLocalDateTime}}),Object.defineProperty(O,"isLocalTime",{enumerable:!0,get:function(){return qo.isLocalTime}}),Object.defineProperty(O,"isTime",{enumerable:!0,get:function(){return qo.isTime}}),Object.defineProperty(O,"LocalDateTime",{enumerable:!0,get:function(){return qo.LocalDateTime}}),Object.defineProperty(O,"LocalTime",{enumerable:!0,get:function(){return qo.LocalTime}}),Object.defineProperty(O,"Time",{enumerable:!0,get:function(){return qo.Time}}),Vo=f,Object.defineProperty(O,"Node",{enumerable:!0,get:function(){return Vo.Node}}),Object.defineProperty(O,"isNode",{enumerable:!0,get:function(){return Vo.isNode}}),Object.defineProperty(O,"Relationship",{enumerable:!0,get:function(){return Vo.Relationship}}),Object.defineProperty(O,"isRelationship",{enumerable:!0,get:function(){return Vo.isRelationship}}),Object.defineProperty(O,"UnboundRelationship",{enumerable:!0,get:function(){return Vo.UnboundRelationship}}),Object.defineProperty(O,"isUnboundRelationship",{enumerable:!0,get:function(){return Vo.isUnboundRelationship}}),Object.defineProperty(O,"Path",{enumerable:!0,get:function(){return Vo.Path}}),Object.defineProperty(O,"isPath",{enumerable:!0,get:function(){return Vo.isPath}}),Object.defineProperty(O,"PathSegment",{enumerable:!0,get:function(){return Vo.PathSegment}}),Object.defineProperty(O,"isPathSegment",{enumerable:!0,get:function(){return Vo.isPathSegment}}),w=v(p),O.Record=w.default,Ho=c,Object.defineProperty(O,"isPoint",{enumerable:!0,get:function(){return Ho.isPoint}}),Object.defineProperty(O,"Point",{enumerable:!0,get:function(){return Ho.Point}}),Go=S(h),O.ResultSummary=Go.default,Object.defineProperty(O,"queryType",{enumerable:!0,get:function(){return Go.queryType}}),Object.defineProperty(O,"ServerInfo",{enumerable:!0,get:function(){return Go.ServerInfo}}),Object.defineProperty(O,"Notification",{enumerable:!0,get:function(){return Go.Notification}}),Object.defineProperty(O,"Plan",{enumerable:!0,get:function(){return Go.Plan}}),Object.defineProperty(O,"ProfiledPlan",{enumerable:!0,get:function(){return Go.ProfiledPlan}}),Object.defineProperty(O,"QueryStatistics",{enumerable:!0,get:function(){return Go.QueryStatistics}}),Object.defineProperty(O,"Stats",{enumerable:!0,get:function(){return Go.Stats}}),Object.defineProperty(O,"notificationCategory",{enumerable:!0,get:function(){return Go.notificationCategory}}),Object.defineProperty(O,"notificationSeverityLevel",{enumerable:!0,get:function(){return Go.notificationSeverityLevel}}),Ko=lt,Object.defineProperty(O,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return Ko.notificationFilterDisabledCategory}}),Object.defineProperty(O,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return Ko.notificationFilterMinimumSeverityLevel}}),t=v(b),O.Result=t.default,n=v(o),O.EagerResult=n.default,i=v(Nr),O.ConnectionProvider=i.default,i=v(E),O.Connection=i.default,f=v(P),O.Transaction=f.default,p=v(Fr),O.ManagedTransaction=p.default,c=v(vr),O.TransactionPromise=c.default,h=v(a),O.Session=h.default,lt=S(_),b=lt,O.Driver=lt.default,O.driver=b,o=v(Wr),O.auth=o.default,Yo=g,Object.defineProperty(O,"bookmarkManager",{enumerable:!0,get:function(){return Yo.bookmarkManager}}),Zo=m,Object.defineProperty(O,"expirationBasedAuthTokenManager",{enumerable:!0,get:function(){return Zo.expirationBasedAuthTokenManager}}),Object.defineProperty(O,"staticAuthTokenManager",{enumerable:!0,get:function(){return Zo.staticAuthTokenManager}}),Object.defineProperty(O,"isStaticAuthTokenManger",{enumerable:!0,get:function(){return Zo.isStaticAuthTokenManger}}),Qo=_,Object.defineProperty(O,"routing",{enumerable:!0,get:function(){return Qo.routing}}),Nr=S(u),O.types=Nr,E=S(Q),O.json=E,v=v(Ft),O.resultTransformers=v.default,S=S(y),O.internal=S,P={SERVICE_UNAVAILABLE:Wo.SERVICE_UNAVAILABLE,SESSION_EXPIRED:Wo.SESSION_EXPIRED,PROTOCOL_ERROR:Wo.PROTOCOL_ERROR},O.error=P,P={newError:Wo.newError,Neo4jError:Wo.Neo4jError,isRetriableError:Wo.isRetriableError,error:P,Integer:zo.default,int:zo.int,isInt:zo.isInt,inSafeRange:zo.inSafeRange,toNumber:zo.toNumber,toString:zo.toString,internal:S,isPoint:Ho.isPoint,Point:Ho.Point,Date:qo.Date,DateTime:qo.DateTime,Duration:qo.Duration,isDate:qo.isDate,isDateTime:qo.isDateTime,isDuration:qo.isDuration,isLocalDateTime:qo.isLocalDateTime,isLocalTime:qo.isLocalTime,isTime:qo.isTime,LocalDateTime:qo.LocalDateTime,LocalTime:qo.LocalTime,Time:qo.Time,Node:Vo.Node,isNode:Vo.isNode,Relationship:Vo.Relationship,isRelationship:Vo.isRelationship,UnboundRelationship:Vo.UnboundRelationship,isUnboundRelationship:Vo.isUnboundRelationship,Path:Vo.Path,isPath:Vo.isPath,PathSegment:Vo.PathSegment,isPathSegment:Vo.isPathSegment,Record:w.default,ResultSummary:Go.default,queryType:Go.queryType,ServerInfo:Go.ServerInfo,Notification:Go.Notification,Plan:Go.Plan,ProfiledPlan:Go.ProfiledPlan,QueryStatistics:Go.QueryStatistics,Stats:Go.Stats,Result:t.default,EagerResult:n.default,Transaction:f.default,ManagedTransaction:p.default,TransactionPromise:c.default,Session:h.default,Driver:lt.default,Connection:i.default,types:Nr,driver:b,json:E,auth:o.default,bookmarkManager:Yo.bookmarkManager,expirationBasedAuthTokenManager:Zo.expirationBasedAuthTokenManager,routing:Qo.routing,resultTransformers:v.default,notificationCategory:Go.notificationCategory,notificationSeverityLevel:Go.notificationSeverityLevel,notificationFilterDisabledCategory:Ko.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:Ko.notificationFilterMinimumSeverityLevel},O.default=P,{}),vr={},a={},Wr={},g={};Object.defineProperty(g,"__esModule",{value:!0}),g.isFunction=void 0,g.isFunction=function(e){return"function"==typeof e};m={},_={},u={};Object.defineProperty(u,"__esModule",{value:!0}),u.createErrorClass=void 0,u.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(_,"__esModule",{value:!0}),_.UnsubscriptionError=void 0;Q=u,_.UnsubscriptionError=Q.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}}),Ft={};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.arrRemove=void 0,Ft.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var Xo=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.")},Jo=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},$o=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},ei=(Object.defineProperty(m,"__esModule",{value:!0}),m.isSubscription=m.EMPTY_SUBSCRIPTION=m.Subscription=void 0,g),ti=_,ri=Ft,ni=(oi.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=Xo(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(ei.isFunction(u))try{u()}catch(e){r=e instanceof ti.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=Xo(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{ii(l)}catch(e){r=null!=r?r:[],e instanceof ti.UnsubscriptionError?r=$o($o([],Jo(r)),Jo(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 ti.UnsubscriptionError(r)}},oi.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)ii(e);else{if(e instanceof oi){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},oi.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},oi.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},oi.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ri.arrRemove(t,e)},oi.prototype.remove=function(e){var t=this._finalizers;t&&ri.arrRemove(t,e),e instanceof oi&&e._removeParent(this)},oi.EMPTY=((y=new oi).closed=!0,y),oi);function oi(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function ii(e){ei.isFunction(e)?e():e.unsubscribe()}m.Subscription=ni,m.EMPTY_SUBSCRIPTION=ni.EMPTY,m.isSubscription=function(e){return e instanceof ni||e&&"closed"in e&&ei.isFunction(e.remove)&&ei.isFunction(e.add)&&ei.isFunction(e.unsubscribe)};var ui,ai,si,S={},w=(Object.defineProperty(S,"__esModule",{value:!0}),S.config=void 0,S.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),t={},ci=(ui=t,ai=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},si=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(ui,"__esModule",{value:!0}),ui.timeoutProvider=void 0,ui.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=ui.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,si([e,t],ai(r))):setTimeout.apply(void 0,si([e,t],ai(r)))},clearTimeout:function(e){var t=ui.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(w,"__esModule",{value:!0}),w.reportUnhandledError=void 0,S),li=t;w.reportUnhandledError=function(t){li.timeoutProvider.setTimeout(function(){var e=ci.config.onUnhandledError;if(!e)throw t;e(t)})};n={};Object.defineProperty(n,"__esModule",{value:!0}),n.noop=void 0,n.noop=function(){};f={};function fi(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(f,"__esModule",{value:!0}),f.createNotification=f.nextNotification=f.errorNotification=f.COMPLETE_NOTIFICATION=void 0,f.COMPLETE_NOTIFICATION=fi("C",void 0,void 0),f.errorNotification=function(e){return fi("E",void 0,e)},f.nextNotification=function(e){return fi("N",e,void 0)},f.createNotification=fi;var pi,di,hi,bi,yi,_i,vi,mi,gi,Oi,wi,Ei,Pi,Si,p={},Ti=(Object.defineProperty(p,"__esModule",{value:!0}),p.captureError=p.errorContext=void 0,S),ji=null;function Ci(e){var t=hi.call(this)||this;return t.isStopped=!1,e?(t.destination=e,yi.isSubscription(e)&&e.add(t)):t.destination=pi.EMPTY_OBSERVER,t}function Ii(e,t){return wi.call(e,t)}function ki(e){this.partialObserver=e}function Ri(e,t,r){var n=Pi.call(this)||this;return r=bi.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&_i.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&Ii(e.next,t),error:e.error&&Ii(e.error,t),complete:e.complete&&Ii(e.complete,t)}):e,n.destination=new Ei(r),n}function Ai(e){_i.config.useDeprecatedSynchronousErrorHandling?Oi.captureError(e):vi.reportUnhandledError(e)}function Mi(e,t){var r=_i.config.onStoppedNotification;r&&gi.timeoutProvider.setTimeout(function(){return r(e,t)})}p.errorContext=function(e){if(Ti.config.useDeprecatedSynchronousErrorHandling){var t=!ji;if(t&&(ji={errorThrown:!1,error:null}),e(),t){var t=ji,r=t.errorThrown,t=t.error;if(ji=null,r)throw t}}else e()},p.captureError=function(e){Ti.config.useDeprecatedSynchronousErrorHandling&&ji&&(ji.errorThrown=!0,ji.error=e)},pi=Wr,c=r&&r.__extends||(di=function(e,t){return(di=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}di(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(pi,"__esModule",{value:!0}),pi.EMPTY_OBSERVER=pi.SafeSubscriber=pi.Subscriber=void 0,bi=g,_i=S,vi=w,h=n,mi=f,gi=t,Oi=p,hi=(yi=m).Subscription,c(Ci,hi),Ci.create=function(e,t,r){return new Si(e,t,r)},Ci.prototype.next=function(e){this.isStopped?Mi(mi.nextNotification(e),this):this._next(e)},Ci.prototype.error=function(e){this.isStopped?Mi(mi.errorNotification(e),this):(this.isStopped=!0,this._error(e))},Ci.prototype.complete=function(){this.isStopped?Mi(mi.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},Ci.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,hi.prototype.unsubscribe.call(this),this.destination=null)},Ci.prototype._next=function(e){this.destination.next(e)},Ci.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},Ci.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},lt=Ci,pi.Subscriber=lt,wi=Function.prototype.bind,ki.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Ai(e)}},ki.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Ai(e)}else Ai(e)},ki.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Ai(e)}},Ei=ki,c(Ri,Pi=lt),Si=Ri,pi.SafeSubscriber=Si,pi.EMPTY_OBSERVER={closed:!0,next:h.noop,error:function(e){throw e},complete:h.noop};i={},Object.defineProperty(i,"__esModule",{value:!0}),i.observable=void 0,i.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",Nr={},b={};Object.defineProperty(b,"__esModule",{value:!0}),b.identity=void 0,b.identity=function(e){return e},Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.pipeFromArray=Nr.pipe=void 0;var xi=b;function Ni(t){return 0===t.length?xi.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}Nr.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ni(e)},Nr.pipeFromArray=Ni,Object.defineProperty(a,"__esModule",{value:!0}),a.Observable=void 0;var Ui=Wr,Di=m,E=i,Li=Nr,Fi=S,Bi=g,Wi=p;function zi(e){e&&(this._subscribe=e)}function qi(e){return null!=(e=null!=e?e:Fi.config.Promise)?e:Promise}zi.prototype.lift=function(e){var t=new zi;return t.source=this,t.operator=e,t},zi.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof Ui.Subscriber||function(e){return e&&Bi.isFunction(e.next)&&Bi.isFunction(e.error)&&Bi.isFunction(e.complete)}(n)&&Di.isSubscription(n)?e:new Ui.SafeSubscriber(e,t,r);return Wi.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},zi.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},zi.prototype.forEach=function(n,e){var o=this;return new(e=qi(e))(function(e,t){var r=new Ui.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},zi.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},zi.prototype[E.observable]=function(){return this},zi.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Li.pipeFromArray(e)(this)},zi.prototype.toPromise=function(e){var n=this;return new(e=qi(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},zi.create=function(e){return new zi(e)},a.Observable=zi;var o={},v={},O={},Vi=(Object.defineProperty(O,"__esModule",{value:!0}),O.operate=O.hasLift=void 0,g);function Hi(e){return Vi.isFunction(null==e?void 0:e.lift)}O.hasLift=Hi,O.operate=function(t){return function(e){if(Hi(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 Gi,P={},Q=r&&r.__extends||(Gi=function(e,t){return(Gi=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}Gi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),y=(Object.defineProperty(P,"__esModule",{value:!0}),P.OperatorSubscriber=P.createOperatorSubscriber=void 0,Wr);P.createOperatorSubscriber=function(e,t,r,n,o){return new Yi(e,t,r,n,o)};Q(Zi,Ki=y.Subscriber),Zi.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,Ki.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var Ki,Yi=Zi;function Zi(t,r,e,n,o,i){var u=Ki.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:Ki.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:Ki.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:Ki.prototype._complete,u}P.OperatorSubscriber=Yi,Object.defineProperty(v,"__esModule",{value:!0}),v.refCount=void 0;var Qi=O,Xi=P;v.refCount=function(){return Qi.operate(function(r,n){var o=null,e=(r._refCount++,Xi.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 Ji,f=r&&r.__extends||(Ji=function(e,t){return(Ji=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}Ji(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(o,"__esModule",{value:!0}),o.ConnectableObservable=void 0;var $i,eu=m,tu=v,ru=P,nu=O,t=($i=a.Observable,f(ou,$i),ou.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},ou.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},ou.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},ou.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new eu.Subscription,t=this.getSubject(),e.add(this.source.subscribe(ru.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=eu.Subscription.EMPTY)),e},ou.prototype.refCount=function(){return tu.refCount()(this)},ou);function ou(e,t){var r=$i.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,nu.hasLift(e)&&(r.lift=e.lift),r}o.ConnectableObservable=t;var iu,uu,au,su,cu,c={},lt={},h=(iu=lt,Object.defineProperty(iu,"__esModule",{value:!0}),iu.performanceTimestampProvider=void 0,iu.performanceTimestampProvider={now:function(){return(iu.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),lu=(uu=h,au=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},su=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(uu,"__esModule",{value:!0}),uu.animationFrameProvider=void 0,cu=m,uu.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=uu.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new cu.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=uu.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,su([],au(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=uu.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,su([],au(e)))},delegate:void 0},Object.defineProperty(c,"__esModule",{value:!0}),c.animationFrames=void 0,a),fu=lt,pu=h;function du(a){return new lu.Observable(function(r){var n=a||fu.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=pu.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&pu.animationFrameProvider.cancelAnimationFrame(i)}})}c.animationFrames=function(e){return e?du(e):yu};var hu,bu,yu=du(),E={},Q={},y=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.ObjectUnsubscribedError=void 0,u),f=(Q.ObjectUnsubscribedError=y.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(hu=function(e,t){return(hu=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}hu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),_u=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.")},vu=(Object.defineProperty(E,"__esModule",{value:!0}),E.AnonymousSubject=E.Subject=void 0,a),mu=m,gu=Q,Ou=Ft,wu=p,t=(bu=vu.Observable,f(Eu,bu),Eu.prototype.lift=function(e){var t=new Su(this,this);return t.operator=e,t},Eu.prototype._throwIfClosed=function(){if(this.closed)throw new gu.ObjectUnsubscribedError},Eu.prototype.next=function(o){var i=this;wu.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=_u(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}}}})},Eu.prototype.error=function(t){var r=this;wu.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)}})},Eu.prototype.complete=function(){var t=this;wu.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},Eu.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(Eu.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),Eu.prototype._trySubscribe=function(e){return this._throwIfClosed(),bu.prototype._trySubscribe.call(this,e)},Eu.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},Eu.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?mu.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new mu.Subscription(function(){t.currentObservers=null,Ou.arrRemove(o,e)}))},Eu.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},Eu.prototype.asObservable=function(){var e=new vu.Observable;return e.source=this,e},Eu.create=function(e,t){return new Su(e,t)},Eu);function Eu(){var e=bu.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}E.Subject=t;f(Tu,Pu=t),Tu.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},Tu.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},Tu.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},Tu.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:mu.EMPTY_SUBSCRIPTION};var Pu,Su=Tu;function Tu(e,t){var r=Pu.call(this)||this;return r.destination=e,r.source=t,r}E.AnonymousSubject=Su;var ju,lt={},y=r&&r.__extends||(ju=function(e,t){return(ju=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}ju(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(lt,"__esModule",{value:!0}),lt.BehaviorSubject=void 0;Cu=E.Subject,y(Iu,Cu),Object.defineProperty(Iu.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),Iu.prototype._subscribe=function(e){var t=Cu.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},Iu.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},Iu.prototype.next=function(e){Cu.prototype.next.call(this,this._value=e)};var Cu,p=Iu;function Iu(e){var t=Cu.call(this)||this;return t._value=e,t}lt.BehaviorSubject=p;var ku,Ru,f={},t={},y=(ku=t,Object.defineProperty(ku,"__esModule",{value:!0}),ku.dateTimestampProvider=void 0,ku.dateTimestampProvider={now:function(){return(ku.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(Ru=function(e,t){return(Ru=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}Ru(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(f,"__esModule",{value:!0}),f.ReplaySubject=void 0;var Au,Mu=t,p=(Au=E.Subject,y(xu,Au),xu.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(),Au.prototype.next.call(this,e)},xu.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},xu.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)}},xu);function xu(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=Mu.dateTimestampProvider);var n=Au.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}f.ReplaySubject=p;var Nu,y={},p=r&&r.__extends||(Nu=function(e,t){return(Nu=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}Nu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(y,"__esModule",{value:!0}),y.AsyncSubject=void 0;Uu=E.Subject,p(Du,Uu),Du.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())},Du.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},Du.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&Uu.prototype.next.call(this,t),Uu.prototype.complete.call(this))};var Uu,p=Du;function Du(){var e=null!==Uu&&Uu.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}y.AsyncSubject=p;var Lu,p={},T={},Fu={},Bu={},Wu=r&&r.__extends||(Lu=function(e,t){return(Lu=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}Lu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.Action=void 0;zu=m.Subscription,Wu(qu,zu),qu.prototype.schedule=function(e,t){return this};var zu,Wu=qu;function qu(e,t){return zu.call(this)||this}Bu.Action=Wu;var Vu,Hu,Gu,Ku,Wu={},Yu=(Vu=Wu,Hu=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},Gu=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(Vu,"__esModule",{value:!0}),Vu.intervalProvider=void 0,Vu.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Vu.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,Gu([e,t],Hu(r))):setInterval.apply(void 0,Gu([e,t],Hu(r)))},clearInterval:function(e){var t=Vu.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(Ku=function(e,t){return(Ku=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}Ku(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.AsyncAction=void 0;var Zu,Qu=Wu,Xu=Ft,Wu=(Zu=Bu.Action,Yu(Ju,Zu),Ju.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},Ju.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Qu.intervalProvider.setInterval(e.flush.bind(e,this),r)},Ju.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&Qu.intervalProvider.clearInterval(t)},Ju.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))},Ju.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},Ju.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,Xu.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,Zu.prototype.unsubscribe.call(this))},Ju);function Ju(e,t){var r=Zu.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}Fu.AsyncAction=Wu;var $u,ea,ta,ra,na,oa,Bu={},Yu={},ia=(Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.TestTools=Yu.Immediate=void 0,1),ua={};function aa(e){return e in ua&&(delete ua[e],!0)}Yu.Immediate={setImmediate:function(e){var t=ia++;return ua[t]=!0,($u=$u||Promise.resolve()).then(function(){return aa(t)&&e()}),t},clearImmediate:function(e){aa(e)}},Yu.TestTools={pending:function(){return Object.keys(ua).length}},ea=Bu,ta=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},ra=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(ea,"__esModule",{value:!0}),ea.immediateProvider=void 0,na=Yu.Immediate.setImmediate,oa=Yu.Immediate.clearImmediate,ea.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ea.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||na).apply(void 0,ra([],ta(e)))},clearImmediate:function(e){var t=ea.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||oa)(e)},delegate:void 0};var sa,Wu=r&&r.__extends||(sa=function(e,t){return(sa=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}sa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(T,"__esModule",{value:!0}),T.AsapAction=void 0;var ca,la=Bu,Yu=(ca=Fu.AsyncAction,Wu(fa,ca),fa.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?ca.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=la.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},fa.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return ca.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(la.immediateProvider.clearImmediate(t),e._scheduled=void 0)},fa);function fa(e,t){var r=ca.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.AsapAction=Yu;var Bu={},Wu={},Yu={},pa=(Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.Scheduler=void 0,t);function da(e,t){void 0===t&&(t=da.now),this.schedulerActionCtor=e,this.now=t}da.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},da.now=pa.dateTimestampProvider.now,Yu.Scheduler=da;var ha,ba,pa=r&&r.__extends||(ha=function(e,t){return(ha=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}ha(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ya=(Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.AsyncScheduler=void 0,Yu),pa=(ba=ya.Scheduler,pa(_a,ba),_a.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}}},_a);function _a(e,t){void 0===t&&(t=ya.Scheduler.now);e=ba.call(this,e,t)||this;return e.actions=[],e._active=!1,e}Wu.AsyncScheduler=pa;var va,pa=r&&r.__extends||(va=function(e,t){return(va=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}va(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.AsapScheduler=void 0;ma=Wu.AsyncScheduler,pa(ga,ma),ga.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 ma,pa=ga;function ga(){return null!==ma&&ma.apply(this,arguments)||this}Bu.AsapScheduler=pa,pa=p,Object.defineProperty(pa,"__esModule",{value:!0}),pa.asap=pa.asapScheduler=void 0,pa.asapScheduler=new Bu.AsapScheduler(T.AsapAction),pa.asap=pa.asapScheduler;var Oa,Bu={},pa=(T=Bu,Object.defineProperty(T,"__esModule",{value:!0}),T.async=T.asyncScheduler=void 0,T.asyncScheduler=new Wu.AsyncScheduler(Fu.AsyncAction),T.async=T.asyncScheduler,{}),T={},wa=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)});Object.defineProperty(T,"__esModule",{value:!0}),T.QueueAction=void 0;Ea=Fu.AsyncAction,wa(Pa,Ea),Pa.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?Ea.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},Pa.prototype.execute=function(e,t){return 0<t||this.closed?Ea.prototype.execute.call(this,e,t):this._execute(e,t)},Pa.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?Ea.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var Ea,wa=Pa;function Pa(e,t){var r=Ea.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.QueueAction=wa;var Sa,wa={},Ta=r&&r.__extends||(Sa=function(e,t){return(Sa=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}Sa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(wa,"__esModule",{value:!0}),wa.QueueScheduler=void 0;ja=Wu.AsyncScheduler,Ta(Ca,ja);var ja,Ta=Ca;function Ca(){return null!==ja&&ja.apply(this,arguments)||this}wa.QueueScheduler=Ta,Ta=pa,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.queue=Ta.queueScheduler=void 0,Ta.queueScheduler=new wa.QueueScheduler(T.QueueAction),Ta.queue=Ta.queueScheduler;var Ia,wa={},T={},Ta=r&&r.__extends||(Ia=function(e,t){return(Ia=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}Ia(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(T,"__esModule",{value:!0}),T.AnimationFrameAction=void 0;var ka,Ra=h,h=(ka=Fu.AsyncAction,Ta(Aa,ka),Aa.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?ka.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ra.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},Aa.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return ka.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Ra.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},Aa);function Aa(e,t){var r=ka.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.AnimationFrameAction=h;var Ma,Ta={},h=r&&r.__extends||(Ma=function(e,t){return(Ma=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}Ma(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.AnimationFrameScheduler=void 0;xa=Wu.AsyncScheduler,h(Na,xa),Na.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 xa,h=Na;function Na(){return null!==xa&&xa.apply(this,arguments)||this}Ta.AnimationFrameScheduler=h,h=wa,Object.defineProperty(h,"__esModule",{value:!0}),h.animationFrame=h.animationFrameScheduler=void 0,h.animationFrameScheduler=new Ta.AnimationFrameScheduler(T.AnimationFrameAction),h.animationFrame=h.animationFrameScheduler;var Ua,Da,Ta={},T=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)}),h=(Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.VirtualAction=Ta.VirtualTimeScheduler=void 0,Fu),La=m,Fu=(Da=Wu.AsyncScheduler,T(Fa,Da),Fa.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}},Fa.frameTimeFactor=10,Fa);function Fa(e,t){void 0===t&&(t=1/0);var r=Da.call(this,e=void 0===e?Wa:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}Ta.VirtualTimeScheduler=Fu;Ba=h.AsyncAction,T(za,Ba),za.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return Ba.prototype.schedule.call(this,e,t);this.active=!1;var r=new za(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return La.Subscription.EMPTY},za.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(za.sortActions),1},za.prototype.recycleAsyncId=function(e,t,r){},za.prototype._execute=function(e,t){if(!0===this.active)return Ba.prototype._execute.call(this,e,t)},za.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 Ba,Wa=za;function za(e,t,r){void 0===r&&(r=e.index+=1);var n=Ba.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}Ta.VirtualAction=Wa;var qa,Va,Wu={},Fu={},h=(qa=Fu,Object.defineProperty(qa,"__esModule",{value:!0}),qa.empty=qa.EMPTY=void 0,Va=a,qa.EMPTY=new Va.Observable(function(e){return e.complete()}),qa.empty=function(e){return e?(t=e,new Va.Observable(function(e){return t.schedule(function(){return e.complete()})})):qa.EMPTY;var t},{}),T={},Ha={},Ga=(Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.isScheduler=void 0,g);Ha.isScheduler=function(e){return e&&Ga.isFunction(e.schedule)},Object.defineProperty(T,"__esModule",{value:!0}),T.popNumber=T.popScheduler=T.popResultSelector=void 0;var Ka=g,Ya=Ha;function Za(e){return e[e.length-1]}T.popResultSelector=function(e){return Ka.isFunction(Za(e))?e.pop():void 0},T.popScheduler=function(e){return Ya.isScheduler(Za(e))?e.pop():void 0},T.popNumber=function(e,t){return"number"==typeof Za(e)?e.pop():t};var Qa={},Xa={},Ja={},j={},$a={},es=(Object.defineProperty($a,"__esModule",{value:!0}),$a.isArrayLike=void 0,$a.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),ts=(Object.defineProperty(es,"__esModule",{value:!0}),es.isPromise=void 0,g);es.isPromise=function(e){return ts.isFunction(null==e?void 0:e.then)};var rs={},ns=(Object.defineProperty(rs,"__esModule",{value:!0}),rs.isInteropObservable=void 0,i),os=g;rs.isInteropObservable=function(e){return os.isFunction(e[ns.observable])};var is={},us=(Object.defineProperty(is,"__esModule",{value:!0}),is.isAsyncIterable=void 0,g);is.isAsyncIterable=function(e){return Symbol.asyncIterator&&us.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var as={};Object.defineProperty(as,"__esModule",{value:!0}),as.createInvalidObservableTypeError=void 0,as.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 ss={},cs={};function ls(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(cs,"__esModule",{value:!0}),cs.iterator=cs.getSymbolIterator=void 0,cs.getSymbolIterator=ls,cs.iterator=ls(),Object.defineProperty(ss,"__esModule",{value:!0}),ss.isIterable=void 0;var fs=cs,ps=g;ss.isIterable=function(e){return ps.isFunction(null==e?void 0:e[fs.iterator])};var ds={},hs=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}}}},bs=r&&r.__await||function(e){return this instanceof bs?(this.v=e,this):new bs(e)},ys=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 bs?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])}},_s=(Object.defineProperty(ds,"__esModule",{value:!0}),ds.isReadableStreamLike=ds.readableStreamLikeToAsyncGenerator=void 0,g);ds.readableStreamLikeToAsyncGenerator=function(o){return ys(this,arguments,function(){var t,r,n;return hs(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,bs(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,bs(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,bs(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]}})})},ds.isReadableStreamLike=function(e){return _s.isFunction(null==e?void 0:e.getReader)};var vs=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())})},ms=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}}}},gs=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 Os?Os(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)})}}},Os=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.")},ws=(Object.defineProperty(j,"__esModule",{value:!0}),j.fromReadableStreamLike=j.fromAsyncIterable=j.fromIterable=j.fromPromise=j.fromArrayLike=j.fromInteropObservable=j.innerFrom=void 0,$a),Es=es,Ps=a,Ss=rs,Ts=is,js=as,Cs=ss,Is=ds,ks=g,Rs=w,As=i;function Ms(r){return new Ps.Observable(function(e){var t=r[As.observable]();if(ks.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function xs(r){return new Ps.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function Ns(e){return new Ps.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Rs.reportUnhandledError)})}function Us(u){return new Ps.Observable(function(e){var t,r;try{for(var n=Os(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 Ds(e){return new Ps.Observable(function(t){!function(r,n){var o,i,u,a;return vs(this,void 0,void 0,function(){var t;return ms(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=gs(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 Ls(e){return Ds(Is.readableStreamLikeToAsyncGenerator(e))}j.innerFrom=function(e){if(e instanceof Ps.Observable)return e;if(null!=e){if(Ss.isInteropObservable(e))return Ms(e);if(ws.isArrayLike(e))return xs(e);if(Es.isPromise(e))return Ns(e);if(Ts.isAsyncIterable(e))return Ds(e);if(Cs.isIterable(e))return Us(e);if(Is.isReadableStreamLike(e))return Ls(e)}throw js.createInvalidObservableTypeError(e)},j.fromInteropObservable=Ms,j.fromArrayLike=xs,j.fromPromise=Ns,j.fromIterable=Us,j.fromAsyncIterable=Ds,j.fromReadableStreamLike=Ls;var w={},Fs={};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.executeSchedule=void 0,Fs.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 Bs=Fs,Ws=O,zs=P;w.observeOn=function(r,n){return void 0===n&&(n=0),Ws.operate(function(e,t){e.subscribe(zs.createOperatorSubscriber(t,function(e){return Bs.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return Bs.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return Bs.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var qs={},Vs=(Object.defineProperty(qs,"__esModule",{value:!0}),qs.subscribeOn=void 0,O);qs.subscribeOn=function(r,n){return void 0===n&&(n=0),Vs.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.scheduleObservable=void 0;var Hs=j,Gs=w,Ks=qs;Ja.scheduleObservable=function(e,t){return Hs.innerFrom(e).pipe(Ks.subscribeOn(t),Gs.observeOn(t))};var Ys={},Zs=(Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.schedulePromise=void 0,j),Qs=w,Xs=qs;Ys.schedulePromise=function(e,t){return Zs.innerFrom(e).pipe(Xs.subscribeOn(t),Qs.observeOn(t))};var Js={},$s=(Object.defineProperty(Js,"__esModule",{value:!0}),Js.scheduleArray=void 0,a);Js.scheduleArray=function(r,n){return new $s.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var ec={},tc=(Object.defineProperty(ec,"__esModule",{value:!0}),ec.scheduleIterable=void 0,a),rc=cs,nc=g,oc=Fs;ec.scheduleIterable=function(e,t){return new tc.Observable(function(n){var o;return oc.executeSchedule(n,t,function(){o=e[rc.iterator](),oc.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 nc.isFunction(null==o?void 0:o.return)&&o.return()}})};var cs={},ic=(Object.defineProperty(cs,"__esModule",{value:!0}),cs.scheduleAsyncIterable=void 0,a),uc=Fs;cs.scheduleAsyncIterable=function(r,n){if(r)return new ic.Observable(function(t){uc.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();uc.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 ac={},sc=(Object.defineProperty(ac,"__esModule",{value:!0}),ac.scheduleReadableStreamLike=void 0,cs),cc=ds;ac.scheduleReadableStreamLike=function(e,t){return sc.scheduleAsyncIterable(cc.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.scheduled=void 0;var lc=Ja,fc=Ys,pc=Js,dc=ec,hc=cs,bc=rs,yc=es,_c=$a,vc=ss,mc=is,gc=as,Oc=ds,wc=ac;Xa.scheduled=function(e,t){if(null!=e){if(bc.isInteropObservable(e))return lc.scheduleObservable(e,t);if(_c.isArrayLike(e))return pc.scheduleArray(e,t);if(yc.isPromise(e))return fc.schedulePromise(e,t);if(mc.isAsyncIterable(e))return hc.scheduleAsyncIterable(e,t);if(vc.isIterable(e))return dc.scheduleIterable(e,t);if(Oc.isReadableStreamLike(e))return wc.scheduleReadableStreamLike(e,t)}throw gc.createInvalidObservableTypeError(e)},Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.from=void 0;var Ec=Xa,Pc=j;Qa.from=function(e,t){return t?Ec.scheduled(e,t):Pc.innerFrom(e)},Object.defineProperty(h,"__esModule",{value:!0}),h.of=void 0;var Sc=T,Tc=Qa;h.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Sc.popScheduler(e);return Tc.from(e,r)};var jc,Cc,Ic,kc,Ja={},Rc=(Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.throwError=void 0,a),Ac=g;function Mc(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function xc(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)}Ja.throwError=function(e,t){function r(e){return e.error(n())}var n=Ac.isFunction(e)?e:function(){return e};return new Rc.Observable(t?function(e){return t.schedule(r,0,e)}:r)},Ys=Wu,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.observeNotification=Ys.Notification=Ys.NotificationKind=void 0,jc=Fu,Cc=h,Ic=Ja,kc=g,(Js=Ys.NotificationKind||(Ys.NotificationKind={})).NEXT="N",Js.ERROR="E",Js.COMPLETE="C",Mc.prototype.observe=function(e){return xc(this,e)},Mc.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()},Mc.prototype.accept=function(e,t,r){var n;return kc.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},Mc.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?Cc.of(t):"E"===e?Ic.throwError(function(){return r}):"C"===e?jc.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},Mc.createNext=function(e){return new Mc("N",e)},Mc.createError=function(e){return new Mc("E",void 0,e)},Mc.createComplete=function(){return Mc.completeNotification},Mc.completeNotification=new Mc("C"),Js=Mc,Ys.Notification=Js,Ys.observeNotification=xc;var cs={},Nc=(Object.defineProperty(cs,"__esModule",{value:!0}),cs.isObservable=void 0,a),Uc=g;cs.isObservable=function(e){return!!e&&(e instanceof Nc.Observable||Uc.isFunction(e.lift)&&Uc.isFunction(e.subscribe))};var rs={},es={},ss=(Object.defineProperty(es,"__esModule",{value:!0}),es.EmptyError=void 0,u),Dc=(es.EmptyError=ss.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(rs,"__esModule",{value:!0}),rs.lastValueFrom=void 0,es);rs.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 Dc.EmptyError)}})})};var is={},Lc=(Object.defineProperty(is,"__esModule",{value:!0}),is.firstValueFrom=void 0,es),Fc=Wr;is.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new Fc.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new Lc.EmptyError)}});n.subscribe(r)})};var Bc,Wc,zc,qc,Vc,Hc,Gc,as={},ds=(Object.defineProperty(as,"__esModule",{value:!0}),as.ArgumentOutOfRangeError=void 0,u),ac=(as.ArgumentOutOfRangeError=ds.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),Js=(Object.defineProperty(ac,"__esModule",{value:!0}),ac.NotFoundError=void 0,u),Ys=(ac.NotFoundError=Js.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),ss=(Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.SequenceError=void 0,u),ds=(Ys.SequenceError=ss.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),Js={};function Kc(e){throw new Bc.TimeoutError(e)}Object.defineProperty(Js,"__esModule",{value:!0}),Js.isValidDate=void 0,Js.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},Bc=ds,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.timeout=Bc.TimeoutError=void 0,Wc=Bu,zc=Js,qc=O,Vc=j,Hc=P,Gc=Fs,Bc.TimeoutError=u.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),Bc.timeout=function(e,t){var a=(e=zc.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Kc:r,l=void 0===(r=e.scheduler)?null!=t?t:Wc.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return qc.operate(function(e,t){function r(e){n=Gc.executeSchedule(t,l,function(){try{u.unsubscribe(),Vc.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(Hc.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 ss={},u={},Yc={},Zc={},Qc=(Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.map=void 0,O),Xc=P;Zc.map=function(n,o){return Qc.operate(function(e,t){var r=0;e.subscribe(Xc.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var Jc=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},$c=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},el=(Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.mapOneOrManyArgs=void 0,Zc),tl=Array.isArray;Yc.mapOneOrManyArgs=function(r){return el.map(function(e){return t=r,tl(e=e)?t.apply(void 0,$c([],Jc(e))):t(e);var t})};var rl=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},nl=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},ol=(Object.defineProperty(u,"__esModule",{value:!0}),u.bindCallbackInternals=void 0,Ha),il=a,ul=qs,al=Yc,sl=w,cl=y;u.bindCallbackInternals=function r(a,s,n,o){if(n){if(!ol.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(al.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(ul.subscribeOn(o),sl.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new cl.AsyncSubject,u=!0;return new il.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,nl(nl([],rl(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(ss,"__esModule",{value:!0}),ss.bindCallback=void 0;var ll=u;ss.bindCallback=function(e,t,r){return ll.bindCallbackInternals(!1,e,t,r)};var fl={},pl=(Object.defineProperty(fl,"__esModule",{value:!0}),fl.bindNodeCallback=void 0,u);fl.bindNodeCallback=function(e,t,r){return pl.bindCallbackInternals(!0,e,t,r)};var u={},dl={},hl=(Object.defineProperty(dl,"__esModule",{value:!0}),dl.argsArgArrayOrObject=void 0,Array.isArray),bl=Object.getPrototypeOf,yl=Object.prototype,_l=Object.keys;dl.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(hl(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&bl(r)===yl)return{args:(r=_l(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var vl={};Object.defineProperty(vl,"__esModule",{value:!0}),vl.createObject=void 0,vl.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(u,"__esModule",{value:!0}),u.combineLatestInit=u.combineLatest=void 0;var ml=a,gl=dl,Ol=Qa,wl=b,El=Yc,Pl=T,Sl=vl,Tl=P,jl=Fs;function Cl(a,s,c){return void 0===c&&(c=wl.identity),function(u){Il(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){Il(s,function(){var e=Ol.from(a[r],s),t=!1;e.subscribe(Tl.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 Il(e,t,r){e?jl.executeSchedule(r,e,t):t()}u.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Pl.popScheduler(e),n=Pl.popResultSelector(e),o=gl.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?Ol.from([],r):(o=new ml.Observable(Cl(i,r,u?function(e){return Sl.createObject(u,e)}:wl.identity)),n?o.pipe(El.mapOneOrManyArgs(n)):o)},u.combineLatestInit=Cl;var kl={},Rl={},Al={},Ml={},xl={},Nl=(Object.defineProperty(xl,"__esModule",{value:!0}),xl.mergeInternals=void 0,j),Ul=Fs,Dl=P;xl.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;Nl.innerFrom(n(e,l++)).subscribe(Dl.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?Ul.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(Dl.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.mergeMap=void 0;var Ll=Zc,Fl=j,Bl=O,Wl=xl,zl=g;Ml.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),zl.isFunction(i)?e(function(r,n){return Ll.map(function(e,t){return i(r,e,n,t)})(Fl.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),Bl.operate(function(e,t){return Wl.mergeInternals(e,t,o,r)}))},Object.defineProperty(Al,"__esModule",{value:!0}),Al.mergeAll=void 0;var ql=Ml,Vl=b;Al.mergeAll=function(e){return ql.mergeMap(Vl.identity,e=void 0===e?1/0:e)},Object.defineProperty(Rl,"__esModule",{value:!0}),Rl.concatAll=void 0;var Hl=Al;Rl.concatAll=function(){return Hl.mergeAll(1)},Object.defineProperty(kl,"__esModule",{value:!0}),kl.concat=void 0;var Gl=Rl,Kl=T,Yl=Qa;kl.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Gl.concatAll()(Yl.from(e,Kl.popScheduler(e)))};var Zl={},Ql={},Xl=(Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.defer=void 0,a),Jl=j;Ql.defer=function(t){return new Xl.Observable(function(e){Jl.innerFrom(t()).subscribe(e)})},Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.connectable=void 0;var $l=E,ef=a,tf=Ql,rf={connector:function(){return new $l.Subject},resetOnDisconnect:!0};Zl.connectable=function(e,t){var r=null,n=(t=void 0===t?rf:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new ef.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=tf.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var nf={},of=(Object.defineProperty(nf,"__esModule",{value:!0}),nf.forkJoin=void 0,a),uf=dl,af=j,sf=T,cf=P,lf=Yc,ff=vl;nf.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=sf.popResultSelector(e),u=(n=uf.argsArgArrayOrObject(e)).args,a=n.keys,n=new of.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;af.innerFrom(u[t]).subscribe(cf.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?ff.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(lf.mapOneOrManyArgs(r)):n};var dl={},pf=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},df=(Object.defineProperty(dl,"__esModule",{value:!0}),dl.fromEvent=void 0,j),hf=a,bf=Ml,yf=$a,_f=g,vf=Yc,mf=["addListener","removeListener"],gf=["addEventListener","removeEventListener"],Of=["on","off"];function wf(r,n){return function(t){return function(e){return r[t](n,e)}}}dl.fromEvent=function t(r,n,o,e){if(_f.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(vf.mapOneOrManyArgs(e));var e=pf((e=r,_f.isFunction(e.addEventListener)&&_f.isFunction(e.removeEventListener)?gf.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,_f.isFunction(e.addListener)&&_f.isFunction(e.removeListener)?mf.map(wf(r,n)):(e=r,_f.isFunction(e.on)&&_f.isFunction(e.off)?Of.map(wf(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&yf.isArrayLike(r))return bf.mergeMap(function(e){return t(e,n,o)})(df.innerFrom(r));if(i)return new hf.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 vl={},Ef=(Object.defineProperty(vl,"__esModule",{value:!0}),vl.fromEventPattern=void 0,a),Pf=g,Sf=Yc;vl.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(Sf.mapOneOrManyArgs(t)):new Ef.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 Pf.isFunction(o)?function(){return o(e,t)}:void 0})};var $a={},Tf=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}}}},jf=(Object.defineProperty($a,"__esModule",{value:!0}),$a.generate=void 0,b),Cf=Ha,If=Ql,kf=ec;$a.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return Tf(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?jf.identity:i,o=e.scheduler):(a=e,!t||Cf.isScheduler(t)?(u=jf.identity,o=t):u=t),If.defer(o?function(){return kf.scheduleIterable(s(),o)}:s)};var ec={},Rf=(Object.defineProperty(ec,"__esModule",{value:!0}),ec.iif=void 0,Ql);ec.iif=function(e,t,r){return Rf.defer(function(){return e()?t:r})};var Af={},Mf={},xf=(Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.timer=void 0,a),Nf=Bu,Uf=Ha,Df=Js;Mf.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=Nf.async);var i=-1;return null!=e&&(Uf.isScheduler(e)?o=e:i=e),new xf.Observable(function(e){var t=Df.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(Af,"__esModule",{value:!0}),Af.interval=void 0;var Lf=Bu,Ff=Mf;Af.interval=function(e,t){return Ff.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?Lf.asyncScheduler:t)};var Ha={},Bf=(Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.merge=void 0,Al),Wf=j,zf=Fu,qf=T,Vf=Qa;Ha.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=qf.popScheduler(e),n=qf.popNumber(e,1/0),o=e;return o.length?1===o.length?Wf.innerFrom(o[0]):Bf.mergeAll(n)(Vf.from(o,r)):zf.EMPTY};var Hf,Gf={},Kf=(Hf=Gf,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.never=Hf.NEVER=void 0,Hf.NEVER=new a.Observable(n.noop),Hf.never=function(){return Hf.NEVER},{}),Yf={},Zf=(Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.argsOrArgArray=void 0,Array.isArray);Yf.argsOrArgArray=function(e){return 1===e.length&&Zf(e[0])?e[0]:e},Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.onErrorResumeNext=void 0;var Qf=a,Xf=Yf,Jf=P,$f=n,ep=j;Kf.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Xf.argsOrArgArray(e);return new Qf.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=ep.innerFrom(i[n++])}catch(e){return void o()}var t=new Jf.OperatorSubscriber(r,void 0,$f.noop,$f.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var tp={},rp=(Object.defineProperty(tp,"__esModule",{value:!0}),tp.pairs=void 0,Qa);tp.pairs=function(e,t){return rp.from(Object.entries(e),t)};var np={},op={};Object.defineProperty(op,"__esModule",{value:!0}),op.not=void 0,op.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var ip={},up=(Object.defineProperty(ip,"__esModule",{value:!0}),ip.filter=void 0,O),ap=P;ip.filter=function(n,o){return up.operate(function(e,t){var r=0;e.subscribe(ap.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(np,"__esModule",{value:!0}),np.partition=void 0;var sp=op,cp=ip,lp=j;np.partition=function(e,t,r){return[cp.filter(t,r)(lp.innerFrom(e)),cp.filter(sp.not(t,r))(lp.innerFrom(e))]};var fp={},pp=(Object.defineProperty(fp,"__esModule",{value:!0}),fp.raceInit=fp.race=void 0,a),dp=j,hp=Yf,bp=P;function yp(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(dp.innerFrom(t[r]).subscribe(bp.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)}}fp.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=hp.argsOrArgArray(e)).length?dp.innerFrom(e[0]):new pp.Observable(yp(e))},fp.raceInit=yp;var _p={},vp=(Object.defineProperty(_p,"__esModule",{value:!0}),_p.range=void 0,a),mp=Fu;_p.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return mp.EMPTY;var o=e+r;return new vp.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 gp={},Op=(Object.defineProperty(gp,"__esModule",{value:!0}),gp.using=void 0,a),wp=j,Ep=Fu;gp.using=function(n,o){return new Op.Observable(function(e){var t=n(),r=o(t);return(r?wp.innerFrom(r):Ep.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var Pp={},Sp=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},Tp=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},jp=(Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.zip=void 0,a),Cp=j,Ip=Yf,kp=Fu,Rp=P,Ap=T;Pp.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Ap.popResultSelector(e),u=Ip.argsOrArgArray(e);return u.length?new jp.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){Cp.innerFrom(u[t]).subscribe(Rp.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,Tp([],Sp(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}}):kp.EMPTY};var Mp={},xp=(Object.defineProperty(Mp,"__esModule",{value:!0}),{}),Np=(Object.defineProperty(xp,"__esModule",{value:!0}),xp.audit=void 0,O),Up=j,Dp=P;xp.audit=function(s){return Np.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(Dp.createOperatorSubscriber(t,function(e){o=!0,i=e,u||Up.innerFrom(s(e)).subscribe(u=Dp.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var Lp={},Fp=(Object.defineProperty(Lp,"__esModule",{value:!0}),Lp.auditTime=void 0,Bu),Bp=xp,Wp=Mf;Lp.auditTime=function(e,t){return void 0===t&&(t=Fp.asyncScheduler),Bp.audit(function(){return Wp.timer(e,t)})};var zp={},qp=(Object.defineProperty(zp,"__esModule",{value:!0}),zp.buffer=void 0,O),Vp=n,Hp=P,Gp=j;zp.buffer=function(n){return qp.operate(function(e,t){var r=[];return e.subscribe(Hp.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),Gp.innerFrom(n).subscribe(Hp.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},Vp.noop)),function(){r=null}})};var Kp={},Yp=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.")},Zp=(Object.defineProperty(Kp,"__esModule",{value:!0}),Kp.bufferCount=void 0,O),Qp=P,Xp=Ft;Kp.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,Zp.operate(function(e,f){var p=[],d=0;e.subscribe(Qp.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=Yp(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=Yp(i),c=s.next();!c.done;c=s.next()){var l=c.value;Xp.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=Yp(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 Jp={},$p=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.")},ed=(Object.defineProperty(Jp,"__esModule",{value:!0}),Jp.bufferTime=void 0,m),td=O,rd=P,nd=Ft,od=Bu,id=T,ud=Fs;Jp.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=id.popScheduler(t))?e:od.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return td.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),nd.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new ed.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),ud.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?ud.executeSchedule(r,u,o,a,!0):n=!0,o(),rd.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=$p(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 ad={},sd=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.")},cd=(Object.defineProperty(ad,"__esModule",{value:!0}),ad.bufferToggle=void 0,m),ld=O,fd=j,pd=P,dd=n,hd=Ft;ad.bufferToggle=function(t,o){return ld.operate(function(e,n){var i=[];fd.innerFrom(t).subscribe(pd.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new cd.Subscription);r.add(fd.innerFrom(o(e)).subscribe(pd.createOperatorSubscriber(n,function(){hd.arrRemove(i,t),n.next(t),r.unsubscribe()},dd.noop)))},dd.noop)),e.subscribe(pd.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=sd(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 bd={},yd=(Object.defineProperty(bd,"__esModule",{value:!0}),bd.bufferWhen=void 0,O),_d=n,vd=P,md=j;bd.bufferWhen=function(i){return yd.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),md.innerFrom(i()).subscribe(n=vd.createOperatorSubscriber(t,o,_d.noop))};o(),e.subscribe(vd.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 gd={},Od=(Object.defineProperty(gd,"__esModule",{value:!0}),gd.catchError=void 0,j),wd=P,Ed=O;gd.catchError=function u(a){return Ed.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(wd.createOperatorSubscriber(r,void 0,void 0,function(e){n=Od.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 Pd={},Sd={},C={},Td={},jd={},Cd={},Id=(Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.scanInternals=void 0,P);Cd.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(Id.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(jd,"__esModule",{value:!0}),jd.reduce=void 0;var kd=Cd,Rd=O;jd.reduce=function(e,t){return Rd.operate(kd.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(Td,"__esModule",{value:!0}),Td.toArray=void 0;function Ad(e,t){return e.push(t),e}var Md=jd,xd=O;Td.toArray=function(){return xd.operate(function(e,t){Md.reduce(Ad,[])(e).subscribe(t)})},Object.defineProperty(C,"__esModule",{value:!0}),C.joinAllInternals=void 0;var Nd=b,Ud=Yc,Dd=Nr,Ld=Ml,Fd=Td;C.joinAllInternals=function(t,e){return Dd.pipe(Fd.toArray(),Ld.mergeMap(function(e){return t(e)}),e?Ud.mapOneOrManyArgs(e):Nd.identity)},Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.combineLatestAll=void 0;var Bd=u,Wd=C;Sd.combineLatestAll=function(e){return Wd.joinAllInternals(Bd.combineLatest,e)},Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.combineAll=void 0;Pd.combineAll=Sd.combineLatestAll;var zd={},qd={},Vd=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},Hd=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},Gd=(Object.defineProperty(qd,"__esModule",{value:!0}),qd.combineLatest=void 0,u),Kd=O,Yd=Yf,Zd=Yc,Qd=Nr,Xd=T;function Jd(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Xd.popResultSelector(r);return t?Qd.pipe(Jd.apply(void 0,Hd([],Vd(r))),Zd.mapOneOrManyArgs(t)):Kd.operate(function(e,t){Gd.combineLatestInit(Hd([e],Vd(Yd.argsOrArgArray(r))))(t)})}qd.combineLatest=Jd;var $d=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},eh=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},th=(Object.defineProperty(zd,"__esModule",{value:!0}),zd.combineLatestWith=void 0,qd);zd.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return th.combineLatest.apply(void 0,eh([],$d(e)))};var Yc={},rh=(Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.concatMap=void 0,Ml),nh=g;Yc.concatMap=function(e,t){return nh.isFunction(t)?rh.mergeMap(e,t,1):rh.mergeMap(e,1)};var oh={},ih=(Object.defineProperty(oh,"__esModule",{value:!0}),oh.concatMapTo=void 0,Yc),uh=g;oh.concatMapTo=function(e,t){return uh.isFunction(t)?ih.concatMap(function(){return e},t):ih.concatMap(function(){return e})};var ah={},sh={},ch=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},lh=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},fh=(Object.defineProperty(sh,"__esModule",{value:!0}),sh.concat=void 0,O),ph=Rl,dh=T,hh=Qa;sh.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=dh.popScheduler(r);return fh.operate(function(e,t){ph.concatAll()(hh.from(lh([e],ch(r)),n)).subscribe(t)})};var bh=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},yh=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},_h=(Object.defineProperty(ah,"__esModule",{value:!0}),ah.concatWith=void 0,sh);ah.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _h.concat.apply(void 0,yh([],bh(e)))};var vh={},mh={},gh=(Object.defineProperty(mh,"__esModule",{value:!0}),mh.fromSubscribable=void 0,a);mh.fromSubscribable=function(t){return new gh.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(vh,"__esModule",{value:!0}),vh.connect=void 0;var Oh=E,wh=j,Eh=O,Ph=mh,Sh={connector:function(){return new Oh.Subject}};vh.connect=function(n,e){var o=(e=void 0===e?Sh:e).connector;return Eh.operate(function(e,t){var r=o();wh.innerFrom(n(Ph.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var mh={},Th=(Object.defineProperty(mh,"__esModule",{value:!0}),mh.count=void 0,jd);mh.count=function(n){return Th.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var jh={},Ch=(Object.defineProperty(jh,"__esModule",{value:!0}),jh.debounce=void 0,O),Ih=n,kh=P,Rh=j;jh.debounce=function(u){return Ch.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(kh.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=kh.createOperatorSubscriber(t,r,Ih.noop),Rh.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var I={},Ah=(Object.defineProperty(I,"__esModule",{value:!0}),I.debounceTime=void 0,Bu),Mh=O,xh=P;I.debounceTime=function(a,s){return void 0===s&&(s=Ah.asyncScheduler),Mh.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(xh.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 Nh={},Uh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.defaultIfEmpty=void 0,O),Dh=P;Nh.defaultIfEmpty=function(n){return Uh.operate(function(e,t){var r=!1;e.subscribe(Dh.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var Lh={},Fh={},Bh={},Wh=(Object.defineProperty(Bh,"__esModule",{value:!0}),Bh.take=void 0,Fu),zh=O,qh=P;Bh.take=function(n){return n<=0?function(){return Wh.EMPTY}:zh.operate(function(e,t){var r=0;e.subscribe(qh.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var Vh={},Hh=(Object.defineProperty(Vh,"__esModule",{value:!0}),Vh.ignoreElements=void 0,O),Gh=P,Kh=n;Vh.ignoreElements=function(){return Hh.operate(function(e,t){e.subscribe(Gh.createOperatorSubscriber(t,Kh.noop))})};var Yh={},Zh=(Object.defineProperty(Yh,"__esModule",{value:!0}),Yh.mapTo=void 0,Zc);Yh.mapTo=function(e){return Zh.map(function(){return e})},Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.delayWhen=void 0;var Qh=kl,Xh=Bh,Jh=Vh,$h=Yh,eb=Ml,tb=j;Fh.delayWhen=function t(r,n){return n?function(e){return Qh.concat(n.pipe(Xh.take(1),Jh.ignoreElements()),e.pipe(t(r)))}:eb.mergeMap(function(e,t){return tb.innerFrom(r(e,t)).pipe(Xh.take(1),$h.mapTo(e))})},Object.defineProperty(Lh,"__esModule",{value:!0}),Lh.delay=void 0;var rb=Bu,nb=Fh,ob=Mf;Lh.delay=function(e,t){var r=ob.timer(e,t=void 0===t?rb.asyncScheduler:t);return nb.delayWhen(function(){return r})};var ib={},ub=(Object.defineProperty(ib,"__esModule",{value:!0}),ib.dematerialize=void 0,Wu),ab=O,sb=P;ib.dematerialize=function(){return ab.operate(function(e,t){e.subscribe(sb.createOperatorSubscriber(t,function(e){return ub.observeNotification(e,t)}))})};var cb={},lb=(Object.defineProperty(cb,"__esModule",{value:!0}),cb.distinct=void 0,O),fb=P,pb=n,db=j;cb.distinct=function(o,t){return lb.operate(function(e,r){var n=new Set;e.subscribe(fb.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&db.innerFrom(t).subscribe(fb.createOperatorSubscriber(r,function(){return n.clear()},pb.noop))})};var hb={},bb=(Object.defineProperty(hb,"__esModule",{value:!0}),hb.distinctUntilChanged=void 0,b),yb=O,_b=P;function vb(e,t){return e===t}hb.distinctUntilChanged=function(i,u){return void 0===u&&(u=bb.identity),i=null!=i?i:vb,yb.operate(function(e,r){var n,o=!0;e.subscribe(_b.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var mb={},gb=(Object.defineProperty(mb,"__esModule",{value:!0}),mb.distinctUntilKeyChanged=void 0,hb);mb.distinctUntilKeyChanged=function(r,n){return gb.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var Ob={},wb={},Eb=(Object.defineProperty(wb,"__esModule",{value:!0}),wb.throwIfEmpty=void 0,es),Pb=O,Sb=P;function Tb(){return new Eb.EmptyError}wb.throwIfEmpty=function(n){return void 0===n&&(n=Tb),Pb.operate(function(e,t){var r=!1;e.subscribe(Sb.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(Ob,"__esModule",{value:!0}),Ob.elementAt=void 0;var jb=as,Cb=ip,Ib=wb,kb=Nh,Rb=Bh;Ob.elementAt=function(r,t){if(r<0)throw new jb.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(Cb.filter(function(e,t){return t===r}),Rb.take(1),n?kb.defaultIfEmpty(t):Ib.throwIfEmpty(function(){return new jb.ArgumentOutOfRangeError}))}};var Ab={},Mb=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},xb=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},Nb=(Object.defineProperty(Ab,"__esModule",{value:!0}),Ab.endWith=void 0,kl),Ub=h;Ab.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Nb.concat(e,Ub.of.apply(void 0,xb([],Mb(t))))}};var Db={},Lb=(Object.defineProperty(Db,"__esModule",{value:!0}),Db.every=void 0,O),Fb=P;Db.every=function(o,i){return Lb.operate(function(t,r){var n=0;t.subscribe(Fb.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var Bb={},Wb={},zb={},qb=(Object.defineProperty(zb,"__esModule",{value:!0}),zb.exhaustMap=void 0,Zc),Vb=j,Hb=O,Gb=P;zb.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return Vb.innerFrom(i(r,n)).pipe(qb.map(function(e,t){return o(r,e,n,t)}))}))}:Hb.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(Gb.createOperatorSubscriber(t,function(e){n||(n=Gb.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),Vb.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.exhaustAll=void 0;var Kb=zb,Yb=b;Wb.exhaustAll=function(){return Kb.exhaustMap(Yb.identity)},Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.exhaust=void 0;Bb.exhaust=Wb.exhaustAll;var Zb={},Qb=(Object.defineProperty(Zb,"__esModule",{value:!0}),Zb.expand=void 0,O),Xb=xl;Zb.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,Qb.operate(function(e,t){return Xb.mergeInternals(e,t,r,n,void 0,!0,o)})};var Jb={},$b=(Object.defineProperty(Jb,"__esModule",{value:!0}),Jb.finalize=void 0,O);Jb.finalize=function(r){return $b.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var ey={},ty=(Object.defineProperty(ey,"__esModule",{value:!0}),ey.createFind=ey.find=void 0,O),ry=P;function ny(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(ry.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()}))}}ey.find=function(e,t){return ty.operate(ny(e,t,"value"))},ey.createFind=ny;var oy={},iy=(Object.defineProperty(oy,"__esModule",{value:!0}),oy.findIndex=void 0,O),uy=ey;oy.findIndex=function(e,t){return iy.operate(uy.createFind(e,t,"index"))};var ay={},sy=(Object.defineProperty(ay,"__esModule",{value:!0}),ay.first=void 0,es),cy=ip,ly=Bh,fy=Nh,py=wb,dy=b;ay.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?cy.filter(function(e,t){return n(e,t,r)}):dy.identity,ly.take(1),t?fy.defaultIfEmpty(e):py.throwIfEmpty(function(){return new sy.EmptyError}))}};var hy={},by=(Object.defineProperty(hy,"__esModule",{value:!0}),hy.groupBy=void 0,a),yy=j,_y=E,vy=O,my=P;hy.groupBy=function(b,t,y,_){return vy.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 my.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new _y.Subject),i=n,u=o,(a=new by.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=my.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(yy.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 gy={},Oy=(Object.defineProperty(gy,"__esModule",{value:!0}),gy.isEmpty=void 0,O),wy=P;gy.isEmpty=function(){return Oy.operate(function(e,t){e.subscribe(wy.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var Ey={},Py={},Sy=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.")},Ty=(Object.defineProperty(Py,"__esModule",{value:!0}),Py.takeLast=void 0,Fu),jy=O,Cy=P;Py.takeLast=function(t){return t<=0?function(){return Ty.EMPTY}:jy.operate(function(e,i){var u=[];e.subscribe(Cy.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=Sy(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(Ey,"__esModule",{value:!0}),Ey.last=void 0;var Iy=es,ky=ip,Ry=Py,Ay=wb,My=Nh,xy=b;Ey.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?ky.filter(function(e,t){return n(e,t,r)}):xy.identity,Ry.takeLast(1),t?My.defaultIfEmpty(e):Ay.throwIfEmpty(function(){return new Iy.EmptyError}))}};var Ny={},Uy=(Object.defineProperty(Ny,"__esModule",{value:!0}),Ny.materialize=void 0,Wu),Dy=O,Ly=P;Ny.materialize=function(){return Dy.operate(function(e,t){e.subscribe(Ly.createOperatorSubscriber(t,function(e){t.next(Uy.Notification.createNext(e))},function(){t.next(Uy.Notification.createComplete()),t.complete()},function(e){t.next(Uy.Notification.createError(e)),t.complete()}))})};var Fy={},By=(Object.defineProperty(Fy,"__esModule",{value:!0}),Fy.max=void 0,jd),Wy=g;Fy.max=function(r){return By.reduce(Wy.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var zy={},qy=(Object.defineProperty(zy,"__esModule",{value:!0}),zy.flatMap=void 0,Ml),qy=(zy.flatMap=qy.mergeMap,{}),Vy=(Object.defineProperty(qy,"__esModule",{value:!0}),qy.mergeMapTo=void 0,Ml),Hy=g;qy.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),Hy.isFunction(t)?Vy.mergeMap(function(){return e},t,r):Vy.mergeMap(function(){return e},r="number"==typeof t?t:r)};var Gy={},Ky=(Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.mergeScan=void 0,O),Yy=xl;Gy.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),Ky.operate(function(e,t){var r=o;return Yy.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var xl={},Zy={},Qy=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},Xy=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},Jy=(Object.defineProperty(Zy,"__esModule",{value:!0}),Zy.merge=void 0,O),$y=Yf,e_=Al,t_=T,r_=Qa;Zy.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=t_.popScheduler(r),o=t_.popNumber(r,1/0),r=$y.argsOrArgArray(r);return Jy.operate(function(e,t){e_.mergeAll(o)(r_.from(Xy([e],Qy(r)),n)).subscribe(t)})};var n_=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},o_=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},i_=(Object.defineProperty(xl,"__esModule",{value:!0}),xl.mergeWith=void 0,Zy);xl.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i_.merge.apply(void 0,o_([],n_(e)))};var u_={},a_=(Object.defineProperty(u_,"__esModule",{value:!0}),u_.min=void 0,jd),s_=g;u_.min=function(r){return a_.reduce(s_.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var c_={},l_=(Object.defineProperty(c_,"__esModule",{value:!0}),c_.multicast=void 0,o),f_=g,p_=vh;c_.multicast=function(e,t){var r=f_.isFunction(e)?e:function(){return e};return f_.isFunction(t)?p_.connect(t,{connector:r}):function(e){return new l_.ConnectableObservable(e,r)}};var d_={},h_=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},b_=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},y_=(Object.defineProperty(d_,"__esModule",{value:!0}),d_.onErrorResumeNext=d_.onErrorResumeNextWith=void 0,Yf),__=Kf;function v_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=y_.argsOrArgArray(e);return function(e){return __.onErrorResumeNext.apply(void 0,b_([e],h_(r)))}}d_.onErrorResumeNextWith=v_,d_.onErrorResumeNext=v_;var m_={},g_=(Object.defineProperty(m_,"__esModule",{value:!0}),m_.pairwise=void 0,O),O_=P;m_.pairwise=function(){return g_.operate(function(e,r){var n,o=!1;e.subscribe(O_.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var w_={},E_=(Object.defineProperty(w_,"__esModule",{value:!0}),w_.pluck=void 0,Zc);w_.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 E_.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 P_={},S_=(Object.defineProperty(P_,"__esModule",{value:!0}),P_.publish=void 0,E),T_=c_,j_=vh;P_.publish=function(t){return t?function(e){return j_.connect(t)(e)}:function(e){return T_.multicast(new S_.Subject)(e)}};var C_={},I_=(Object.defineProperty(C_,"__esModule",{value:!0}),C_.publishBehavior=void 0,lt),k_=o;C_.publishBehavior=function(r){return function(e){var t=new I_.BehaviorSubject(r);return new k_.ConnectableObservable(e,function(){return t})}};var R_={},A_=(Object.defineProperty(R_,"__esModule",{value:!0}),R_.publishLast=void 0,y),M_=o;R_.publishLast=function(){return function(e){var t=new A_.AsyncSubject;return new M_.ConnectableObservable(e,function(){return t})}};var x_={},N_=(Object.defineProperty(x_,"__esModule",{value:!0}),x_.publishReplay=void 0,f),U_=c_,D_=g;x_.publishReplay=function(t,r,e,n){e&&!D_.isFunction(e)&&(n=e);var o=D_.isFunction(e)?e:void 0;return function(e){return U_.multicast(new N_.ReplaySubject(t,r,n),o)(e)}};var L_={},F_=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},B_=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},W_=(Object.defineProperty(L_,"__esModule",{value:!0}),L_.raceWith=void 0,fp),z_=O,q_=b;L_.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?z_.operate(function(e,t){W_.raceInit(B_([e],F_(r)))(t)}):q_.identity};var V_={},H_=(Object.defineProperty(V_,"__esModule",{value:!0}),V_.repeat=void 0,Fu),G_=O,K_=P,Y_=j,Z_=Mf;V_.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 H_.EMPTY}:G_.operate(function(t,r){function n(){var e=!1;o=t.subscribe(K_.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?Z_.timer(a):Y_.innerFrom(a(i)),t=K_.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var Q_={},X_=(Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.repeatWhen=void 0,j),J_=E,$_=O,ev=P;Q_.repeatWhen=function(l){return $_.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 J_.Subject,X_.innerFrom(l(n)).subscribe(ev.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(ev.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var tv={},rv=(Object.defineProperty(tv,"__esModule",{value:!0}),tv.retry=void 0,O),nv=P,ov=b,iv=Mf,uv=j;tv.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?ov.identity:rv.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(nv.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?iv.timer(l):uv.innerFrom(l(e,a)),n=nv.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var av={},sv=(Object.defineProperty(av,"__esModule",{value:!0}),av.retryWhen=void 0,j),cv=E,lv=O,fv=P;av.retryWhen=function(u){return lv.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(fv.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new cv.Subject,sv.innerFrom(u(n)).subscribe(fv.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var pv={},dv=(Object.defineProperty(pv,"__esModule",{value:!0}),pv.sample=void 0,j),hv=O,bv=n,yv=P;pv.sample=function(o){return hv.operate(function(e,t){var r=!1,n=null;e.subscribe(yv.createOperatorSubscriber(t,function(e){r=!0,n=e})),dv.innerFrom(o).subscribe(yv.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},bv.noop))})};var _v={},vv=(Object.defineProperty(_v,"__esModule",{value:!0}),_v.sampleTime=void 0,Bu),mv=pv,gv=Af;_v.sampleTime=function(e,t){return mv.sample(gv.interval(e,t=void 0===t?vv.asyncScheduler:t))};var Ov={},wv=(Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.scan=void 0,O),Ev=Cd;Ov.scan=function(e,t){return wv.operate(Ev.scanInternals(e,t,2<=arguments.length,!0))};var Cd={},Pv=(Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.sequenceEqual=void 0,O),Sv=P,Tv=j;function jv(){return{buffer:[],complete:!1}}Cd.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),Pv.operate(function(e,t){function r(n,o){var r=Sv.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=jv(),o=jv(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),Tv.innerFrom(u).subscribe(r(o,n))})};var Cv={},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},kv=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},Rv=(Object.defineProperty(Cv,"__esModule",{value:!0}),Cv.share=void 0,j),Av=E,Mv=Wr,xv=O;function Nv(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 Mv.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),Rv.innerFrom(t.apply(void 0,kv([],Iv(n)))).subscribe(r)}Cv.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new Av.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 xv.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=Nv(n,b))}),r.subscribe(t),!o&&0<a&&(o=new Mv.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=Nv(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=Nv(f,h),r.complete()}}),Rv.innerFrom(e).subscribe(o))})(e)}};var Uv={},Dv=(Object.defineProperty(Uv,"__esModule",{value:!0}),Uv.shareReplay=void 0,f),Lv=Cv;Uv.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,Lv.share({connector:function(){return new Dv.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var Fv={},Bv=(Object.defineProperty(Fv,"__esModule",{value:!0}),Fv.single=void 0,es),Wv=Ys,zv=ac,qv=O,Vv=P;Fv.single=function(a){return qv.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(Vv.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new Wv.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new zv.NotFoundError("No matching values"):new Bv.EmptyError)}))})};var Hv={},Gv=(Object.defineProperty(Hv,"__esModule",{value:!0}),Hv.skip=void 0,ip);Hv.skip=function(r){return Gv.filter(function(e,t){return r<=t})};var Kv={},Yv=(Object.defineProperty(Kv,"__esModule",{value:!0}),Kv.skipLast=void 0,b),Zv=O,Qv=P;Kv.skipLast=function(u){return u<=0?Yv.identity:Zv.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(Qv.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 Xv={},Jv=(Object.defineProperty(Xv,"__esModule",{value:!0}),Xv.skipUntil=void 0,O),$v=P,em=j,tm=n;Xv.skipUntil=function(o){return Jv.operate(function(e,t){var r=!1,n=$v.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},tm.noop);em.innerFrom(o).subscribe(n),e.subscribe($v.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var rm={},nm=(Object.defineProperty(rm,"__esModule",{value:!0}),rm.skipWhile=void 0,O),om=P;rm.skipWhile=function(o){return nm.operate(function(e,t){var r=!1,n=0;e.subscribe(om.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var im={},um=(Object.defineProperty(im,"__esModule",{value:!0}),im.startWith=void 0,kl),am=T,sm=O;im.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=am.popScheduler(r);return sm.operate(function(e,t){(n?um.concat(r,e,n):um.concat(r,e)).subscribe(t)})};var cm={},lm={},fm=(Object.defineProperty(lm,"__esModule",{value:!0}),lm.switchMap=void 0,j),pm=O,dm=P;lm.switchMap=function(s,c){return pm.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(dm.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;fm.innerFrom(s(t,n)).subscribe(u=dm.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(cm,"__esModule",{value:!0}),cm.switchAll=void 0;var hm=lm,bm=b;cm.switchAll=function(){return hm.switchMap(bm.identity)};var ym={},_m=(Object.defineProperty(ym,"__esModule",{value:!0}),ym.switchMapTo=void 0,lm),vm=g;ym.switchMapTo=function(e,t){return vm.isFunction(t)?_m.switchMap(function(){return e},t):_m.switchMap(function(){return e})};var mm={},gm=(Object.defineProperty(mm,"__esModule",{value:!0}),mm.switchScan=void 0,lm),Om=O;mm.switchScan=function(n,o){return Om.operate(function(e,t){var r=o;return gm.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var wm={},Em=(Object.defineProperty(wm,"__esModule",{value:!0}),wm.takeUntil=void 0,O),Pm=P,Sm=j,Tm=n;wm.takeUntil=function(r){return Em.operate(function(e,t){Sm.innerFrom(r).subscribe(Pm.createOperatorSubscriber(t,function(){return t.complete()},Tm.noop)),t.closed||e.subscribe(t)})};var jm={},Cm=(Object.defineProperty(jm,"__esModule",{value:!0}),jm.takeWhile=void 0,O),Im=P;jm.takeWhile=function(o,i){return void 0===i&&(i=!1),Cm.operate(function(e,r){var n=0;e.subscribe(Im.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var km={},Rm=(Object.defineProperty(km,"__esModule",{value:!0}),km.tap=void 0,g),Am=O,Mm=P,xm=b;km.tap=function(e,t,r){var o=Rm.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?Am.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(Mm.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)}))}):xm.identity};var Nm,Um,Dm,Lm,g={},Fm=(Nm=g,Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.throttle=Nm.defaultThrottleConfig=void 0,Um=O,Dm=P,Lm=j,Nm.defaultThrottleConfig={leading:!0,trailing:!1},Nm.throttle=function(p,d){return void 0===d&&(d=Nm.defaultThrottleConfig),Um.operate(function(e,t){function r(){var e;i&&(i=!1,e=u,u=null,t.next(e),s||f(e))}var n=d.leading,o=d.trailing,i=!1,u=null,a=null,s=!1,c=function(){null!=a&&a.unsubscribe(),a=null,o&&(r(),s&&t.complete())},l=function(){a=null,s&&t.complete()},f=function(e){return a=Lm.innerFrom(p(e)).subscribe(Dm.createOperatorSubscriber(t,c,l))};e.subscribe(Dm.createOperatorSubscriber(t,function(e){i=!0,u=e,a&&!a.closed||(n?r():f(e))},function(){s=!0,o&&i&&a&&!a.closed||t.complete()}))})},{}),Bm=(Object.defineProperty(Fm,"__esModule",{value:!0}),Fm.throttleTime=void 0,Bu),Wm=g,zm=Mf;Fm.throttleTime=function(e,t,r){void 0===r&&(r=Wm.defaultThrottleConfig);var n=zm.timer(e,t=void 0===t?Bm.asyncScheduler:t);return Wm.throttle(function(){return n},r)};var qm={},Vm=(Object.defineProperty(qm,"__esModule",{value:!0}),qm.TimeInterval=qm.timeInterval=void 0,Bu),Hm=O,Gm=P;qm.timeInterval=function(i){return void 0===i&&(i=Vm.asyncScheduler),Hm.operate(function(e,n){var o=i.now();e.subscribe(Gm.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new Km(e,r))}))})};var Km=function(e,t){this.value=e,this.interval=t},Ym=(qm.TimeInterval=Km,{}),Zm=(Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.timeoutWith=void 0,Bu),Qm=Js,Xm=ds;Ym.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:Zm.async,Qm.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 Xm.timeout({first:n,each:o,scheduler:r,with:e})};var Js={},Jm=(Object.defineProperty(Js,"__esModule",{value:!0}),Js.timestamp=void 0,t),$m=Zc;Js.timestamp=function(t){return void 0===t&&(t=Jm.dateTimestampProvider),$m.map(function(e){return{value:e,timestamp:t.now()}})};var t={},e0=(Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0,E),t0=O,r0=P,n0=n,o0=j;t.window=function(o){return t0.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new e0.Subject;t.next(n.asObservable());return e.subscribe(r0.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),o0.innerFrom(o).subscribe(r0.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new e0.Subject)},n0.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var i0={},u0=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.")},a0=(Object.defineProperty(i0,"__esModule",{value:!0}),i0.windowCount=void 0,E),s0=O,c0=P;i0.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return s0.operate(function(e,i){var u=[new a0.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(c0.createOperatorSubscriber(i,function(e){try{for(var t=u0(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 a0.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 l0={},f0=(Object.defineProperty(l0,"__esModule",{value:!0}),l0.windowTime=void 0,E),p0=Bu,d0=m,h0=O,b0=P,y0=Ft,_0=T,v0=Fs;l0.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=_0.popScheduler(t))?e:p0.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return h0.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(),y0.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new d0.Subscription,n.add(e),t=new f0.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),v0.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?v0.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(b0.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 Fs={},m0=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.")},g0=(Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.windowToggle=void 0,E),O0=m,w0=O,E0=j,P0=P,S0=n,T0=Ft;Fs.windowToggle=function(t,a){return w0.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];E0.innerFrom(t).subscribe(P0.createOperatorSubscriber(o,function(e){var t,r=new g0.Subject,n=(u.push(r),new O0.Subscription);try{t=E0.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(P0.createOperatorSubscriber(o,function(){T0.arrRemove(u,r),r.complete(),n.unsubscribe()},S0.noop,i)))},S0.noop)),e.subscribe(P0.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=m0(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 Ft={},j0=(Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.windowWhen=void 0,E),C0=O,I0=P,k0=j;Ft.windowWhen=function(u){return C0.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 j0.Subject,t.next(r.asObservable());try{e=k0.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=I0.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(I0.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var R0={},A0=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},M0=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},x0=(Object.defineProperty(R0,"__esModule",{value:!0}),R0.withLatestFrom=void 0,O),N0=P,U0=j,D0=b,L0=n,F0=T;R0.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=F0.popResultSelector(a);return x0.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){U0.innerFrom(a[t]).subscribe(N0.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(D0.identity))&&(o=null))},L0.noop))}(u);e.subscribe(N0.createOperatorSubscriber(r,function(e){i&&(e=M0([e],A0(n)),r.next(s?s.apply(void 0,M0([],A0(e))):e))}))})};var P={},B0=(Object.defineProperty(P,"__esModule",{value:!0}),P.zipAll=void 0,Pp),W0=C;P.zipAll=function(e){return W0.joinAllInternals(B0.zip,e)};var j={},T={},z0=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},q0=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},V0=(Object.defineProperty(T,"__esModule",{value:!0}),T.zip=void 0,Pp),H0=O;T.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return H0.operate(function(e,t){V0.zip.apply(void 0,q0([e],z0(r))).subscribe(t)})};var G0,K0,Y0,Z0,Q0,X0,J0,$0,eg,tg,rg,ng,og,ig,ug,ag,sg,cg,lg,fg,pg,dg,hg,bg,yg,_g,vg,mg,gg,Og,wg,Eg,Pg,Sg,Tg,jg,Cg,Ig,kg,Rg,Ag,Mg,xg,Ng,Ug,Dg,Lg,Fg,Bg,Wg,zg,qg,Vg,Hg,Gg,Kg,Yg,Zg,Qg,Xg,Jg,$g,eO,tO,rO,nO,oO,iO,uO,aO,sO,cO,lO,fO,pO,dO,hO,bO,yO,_O,vO,mO,gO,OO,wO,EO,PO,SO,TO,jO,CO,IO,kO,RO,AO,MO,xO,NO,UO,DO,LO,FO,BO,WO,zO,qO,VO,HO,GO,KO,YO,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,Iw,kw,Rw,Aw,Mw,xw,Nw,Uw,Dw,Lw,Fw,Bw,Ww,zw,qw,Vw,Hw,Gw,Kw,Yw,Zw,Qw,Xw,Jw=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},$w=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},eE=(Object.defineProperty(j,"__esModule",{value:!0}),j.zipWith=void 0,T);j.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eE.zip.apply(void 0,$w([],Jw(e)))},C=vr,G0=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]}),O=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||G0(t,e,r)},Object.defineProperty(C,"__esModule",{value:!0}),C.interval=C.iif=C.generate=C.fromEventPattern=C.fromEvent=C.from=C.forkJoin=C.empty=C.defer=C.connectable=C.concat=C.combineLatest=C.bindNodeCallback=C.bindCallback=C.UnsubscriptionError=C.TimeoutError=C.SequenceError=C.ObjectUnsubscribedError=C.NotFoundError=C.EmptyError=C.ArgumentOutOfRangeError=C.firstValueFrom=C.lastValueFrom=C.isObservable=C.identity=C.noop=C.pipe=C.NotificationKind=C.Notification=C.Subscriber=C.Subscription=C.Scheduler=C.VirtualAction=C.VirtualTimeScheduler=C.animationFrameScheduler=C.animationFrame=C.queueScheduler=C.queue=C.asyncScheduler=C.async=C.asapScheduler=C.asap=C.AsyncSubject=C.ReplaySubject=C.BehaviorSubject=C.Subject=C.animationFrames=C.observable=C.ConnectableObservable=C.Observable=void 0,C.filter=C.expand=C.exhaustMap=C.exhaustAll=C.exhaust=C.every=C.endWith=C.elementAt=C.distinctUntilKeyChanged=C.distinctUntilChanged=C.distinct=C.dematerialize=C.delayWhen=C.delay=C.defaultIfEmpty=C.debounceTime=C.debounce=C.count=C.connect=C.concatWith=C.concatMapTo=C.concatMap=C.concatAll=C.combineLatestWith=C.combineLatestAll=C.combineAll=C.catchError=C.bufferWhen=C.bufferToggle=C.bufferTime=C.bufferCount=C.buffer=C.auditTime=C.audit=C.config=C.NEVER=C.EMPTY=C.scheduled=C.zip=C.using=C.timer=C.throwError=C.range=C.race=C.partition=C.pairs=C.onErrorResumeNext=C.of=C.never=C.merge=void 0,C.switchMap=C.switchAll=C.subscribeOn=C.startWith=C.skipWhile=C.skipUntil=C.skipLast=C.skip=C.single=C.shareReplay=C.share=C.sequenceEqual=C.scan=C.sampleTime=C.sample=C.refCount=C.retryWhen=C.retry=C.repeatWhen=C.repeat=C.reduce=C.raceWith=C.publishReplay=C.publishLast=C.publishBehavior=C.publish=C.pluck=C.pairwise=C.onErrorResumeNextWith=C.observeOn=C.multicast=C.min=C.mergeWith=C.mergeScan=C.mergeMapTo=C.mergeMap=C.flatMap=C.mergeAll=C.max=C.materialize=C.mapTo=C.map=C.last=C.isEmpty=C.ignoreElements=C.groupBy=C.first=C.findIndex=C.find=C.finalize=void 0,C.zipWith=C.zipAll=C.withLatestFrom=C.windowWhen=C.windowToggle=C.windowTime=C.windowCount=C.window=C.toArray=C.timestamp=C.timeoutWith=C.timeout=C.timeInterval=C.throwIfEmpty=C.throttleTime=C.throttle=C.tap=C.takeWhile=C.takeUntil=C.takeLast=C.take=C.switchScan=C.switchMapTo=void 0,K0=a,Object.defineProperty(C,"Observable",{enumerable:!0,get:function(){return K0.Observable}}),Y0=o,Object.defineProperty(C,"ConnectableObservable",{enumerable:!0,get:function(){return Y0.ConnectableObservable}}),Z0=i,Object.defineProperty(C,"observable",{enumerable:!0,get:function(){return Z0.observable}}),Q0=c,Object.defineProperty(C,"animationFrames",{enumerable:!0,get:function(){return Q0.animationFrames}}),X0=E,Object.defineProperty(C,"Subject",{enumerable:!0,get:function(){return X0.Subject}}),J0=lt,Object.defineProperty(C,"BehaviorSubject",{enumerable:!0,get:function(){return J0.BehaviorSubject}}),$0=f,Object.defineProperty(C,"ReplaySubject",{enumerable:!0,get:function(){return $0.ReplaySubject}}),eg=y,Object.defineProperty(C,"AsyncSubject",{enumerable:!0,get:function(){return eg.AsyncSubject}}),tg=p,Object.defineProperty(C,"asap",{enumerable:!0,get:function(){return tg.asap}}),Object.defineProperty(C,"asapScheduler",{enumerable:!0,get:function(){return tg.asapScheduler}}),rg=Bu,Object.defineProperty(C,"async",{enumerable:!0,get:function(){return rg.async}}),Object.defineProperty(C,"asyncScheduler",{enumerable:!0,get:function(){return rg.asyncScheduler}}),ng=pa,Object.defineProperty(C,"queue",{enumerable:!0,get:function(){return ng.queue}}),Object.defineProperty(C,"queueScheduler",{enumerable:!0,get:function(){return ng.queueScheduler}}),og=wa,Object.defineProperty(C,"animationFrame",{enumerable:!0,get:function(){return og.animationFrame}}),Object.defineProperty(C,"animationFrameScheduler",{enumerable:!0,get:function(){return og.animationFrameScheduler}}),ig=Ta,Object.defineProperty(C,"VirtualTimeScheduler",{enumerable:!0,get:function(){return ig.VirtualTimeScheduler}}),Object.defineProperty(C,"VirtualAction",{enumerable:!0,get:function(){return ig.VirtualAction}}),ug=Yu,Object.defineProperty(C,"Scheduler",{enumerable:!0,get:function(){return ug.Scheduler}}),ag=m,Object.defineProperty(C,"Subscription",{enumerable:!0,get:function(){return ag.Subscription}}),sg=Wr,Object.defineProperty(C,"Subscriber",{enumerable:!0,get:function(){return sg.Subscriber}}),cg=Wu,Object.defineProperty(C,"Notification",{enumerable:!0,get:function(){return cg.Notification}}),Object.defineProperty(C,"NotificationKind",{enumerable:!0,get:function(){return cg.NotificationKind}}),lg=Nr,Object.defineProperty(C,"pipe",{enumerable:!0,get:function(){return lg.pipe}}),fg=n,Object.defineProperty(C,"noop",{enumerable:!0,get:function(){return fg.noop}}),pg=b,Object.defineProperty(C,"identity",{enumerable:!0,get:function(){return pg.identity}}),dg=cs,Object.defineProperty(C,"isObservable",{enumerable:!0,get:function(){return dg.isObservable}}),hg=rs,Object.defineProperty(C,"lastValueFrom",{enumerable:!0,get:function(){return hg.lastValueFrom}}),bg=is,Object.defineProperty(C,"firstValueFrom",{enumerable:!0,get:function(){return bg.firstValueFrom}}),yg=as,Object.defineProperty(C,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return yg.ArgumentOutOfRangeError}}),_g=es,Object.defineProperty(C,"EmptyError",{enumerable:!0,get:function(){return _g.EmptyError}}),vg=ac,Object.defineProperty(C,"NotFoundError",{enumerable:!0,get:function(){return vg.NotFoundError}}),mg=Q,Object.defineProperty(C,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return mg.ObjectUnsubscribedError}}),gg=Ys,Object.defineProperty(C,"SequenceError",{enumerable:!0,get:function(){return gg.SequenceError}}),Og=ds,Object.defineProperty(C,"TimeoutError",{enumerable:!0,get:function(){return Og.TimeoutError}}),wg=_,Object.defineProperty(C,"UnsubscriptionError",{enumerable:!0,get:function(){return wg.UnsubscriptionError}}),Eg=ss,Object.defineProperty(C,"bindCallback",{enumerable:!0,get:function(){return Eg.bindCallback}}),Pg=fl,Object.defineProperty(C,"bindNodeCallback",{enumerable:!0,get:function(){return Pg.bindNodeCallback}}),Sg=u,Object.defineProperty(C,"combineLatest",{enumerable:!0,get:function(){return Sg.combineLatest}}),Tg=kl,Object.defineProperty(C,"concat",{enumerable:!0,get:function(){return Tg.concat}}),jg=Zl,Object.defineProperty(C,"connectable",{enumerable:!0,get:function(){return jg.connectable}}),Cg=Ql,Object.defineProperty(C,"defer",{enumerable:!0,get:function(){return Cg.defer}}),Ig=Fu,Object.defineProperty(C,"empty",{enumerable:!0,get:function(){return Ig.empty}}),kg=nf,Object.defineProperty(C,"forkJoin",{enumerable:!0,get:function(){return kg.forkJoin}}),Rg=Qa,Object.defineProperty(C,"from",{enumerable:!0,get:function(){return Rg.from}}),Ag=dl,Object.defineProperty(C,"fromEvent",{enumerable:!0,get:function(){return Ag.fromEvent}}),Mg=vl,Object.defineProperty(C,"fromEventPattern",{enumerable:!0,get:function(){return Mg.fromEventPattern}}),xg=$a,Object.defineProperty(C,"generate",{enumerable:!0,get:function(){return xg.generate}}),Ng=ec,Object.defineProperty(C,"iif",{enumerable:!0,get:function(){return Ng.iif}}),Ug=Af,Object.defineProperty(C,"interval",{enumerable:!0,get:function(){return Ug.interval}}),Dg=Ha,Object.defineProperty(C,"merge",{enumerable:!0,get:function(){return Dg.merge}}),Lg=Gf,Object.defineProperty(C,"never",{enumerable:!0,get:function(){return Lg.never}}),Fg=h,Object.defineProperty(C,"of",{enumerable:!0,get:function(){return Fg.of}}),Bg=Kf,Object.defineProperty(C,"onErrorResumeNext",{enumerable:!0,get:function(){return Bg.onErrorResumeNext}}),Wg=tp,Object.defineProperty(C,"pairs",{enumerable:!0,get:function(){return Wg.pairs}}),zg=np,Object.defineProperty(C,"partition",{enumerable:!0,get:function(){return zg.partition}}),qg=fp,Object.defineProperty(C,"race",{enumerable:!0,get:function(){return qg.race}}),Vg=_p,Object.defineProperty(C,"range",{enumerable:!0,get:function(){return Vg.range}}),Hg=Ja,Object.defineProperty(C,"throwError",{enumerable:!0,get:function(){return Hg.throwError}}),Gg=Mf,Object.defineProperty(C,"timer",{enumerable:!0,get:function(){return Gg.timer}}),Kg=gp,Object.defineProperty(C,"using",{enumerable:!0,get:function(){return Kg.using}}),Yg=Pp,Object.defineProperty(C,"zip",{enumerable:!0,get:function(){return Yg.zip}}),Zg=Xa,Object.defineProperty(C,"scheduled",{enumerable:!0,get:function(){return Zg.scheduled}}),Qg=Fu,Object.defineProperty(C,"EMPTY",{enumerable:!0,get:function(){return Qg.EMPTY}}),Xg=Gf,Object.defineProperty(C,"NEVER",{enumerable:!0,get:function(){return Xg.NEVER}}),O(Mp,C),Jg=S,Object.defineProperty(C,"config",{enumerable:!0,get:function(){return Jg.config}}),$g=xp,Object.defineProperty(C,"audit",{enumerable:!0,get:function(){return $g.audit}}),eO=Lp,Object.defineProperty(C,"auditTime",{enumerable:!0,get:function(){return eO.auditTime}}),tO=zp,Object.defineProperty(C,"buffer",{enumerable:!0,get:function(){return tO.buffer}}),rO=Kp,Object.defineProperty(C,"bufferCount",{enumerable:!0,get:function(){return rO.bufferCount}}),nO=Jp,Object.defineProperty(C,"bufferTime",{enumerable:!0,get:function(){return nO.bufferTime}}),oO=ad,Object.defineProperty(C,"bufferToggle",{enumerable:!0,get:function(){return oO.bufferToggle}}),iO=bd,Object.defineProperty(C,"bufferWhen",{enumerable:!0,get:function(){return iO.bufferWhen}}),uO=gd,Object.defineProperty(C,"catchError",{enumerable:!0,get:function(){return uO.catchError}}),aO=Pd,Object.defineProperty(C,"combineAll",{enumerable:!0,get:function(){return aO.combineAll}}),sO=Sd,Object.defineProperty(C,"combineLatestAll",{enumerable:!0,get:function(){return sO.combineLatestAll}}),cO=zd,Object.defineProperty(C,"combineLatestWith",{enumerable:!0,get:function(){return cO.combineLatestWith}}),lO=Rl,Object.defineProperty(C,"concatAll",{enumerable:!0,get:function(){return lO.concatAll}}),fO=Yc,Object.defineProperty(C,"concatMap",{enumerable:!0,get:function(){return fO.concatMap}}),pO=oh,Object.defineProperty(C,"concatMapTo",{enumerable:!0,get:function(){return pO.concatMapTo}}),dO=ah,Object.defineProperty(C,"concatWith",{enumerable:!0,get:function(){return dO.concatWith}}),hO=vh,Object.defineProperty(C,"connect",{enumerable:!0,get:function(){return hO.connect}}),bO=mh,Object.defineProperty(C,"count",{enumerable:!0,get:function(){return bO.count}}),yO=jh,Object.defineProperty(C,"debounce",{enumerable:!0,get:function(){return yO.debounce}}),_O=I,Object.defineProperty(C,"debounceTime",{enumerable:!0,get:function(){return _O.debounceTime}}),vO=Nh,Object.defineProperty(C,"defaultIfEmpty",{enumerable:!0,get:function(){return vO.defaultIfEmpty}}),mO=Lh,Object.defineProperty(C,"delay",{enumerable:!0,get:function(){return mO.delay}}),gO=Fh,Object.defineProperty(C,"delayWhen",{enumerable:!0,get:function(){return gO.delayWhen}}),OO=ib,Object.defineProperty(C,"dematerialize",{enumerable:!0,get:function(){return OO.dematerialize}}),wO=cb,Object.defineProperty(C,"distinct",{enumerable:!0,get:function(){return wO.distinct}}),EO=hb,Object.defineProperty(C,"distinctUntilChanged",{enumerable:!0,get:function(){return EO.distinctUntilChanged}}),PO=mb,Object.defineProperty(C,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return PO.distinctUntilKeyChanged}}),SO=Ob,Object.defineProperty(C,"elementAt",{enumerable:!0,get:function(){return SO.elementAt}}),TO=Ab,Object.defineProperty(C,"endWith",{enumerable:!0,get:function(){return TO.endWith}}),jO=Db,Object.defineProperty(C,"every",{enumerable:!0,get:function(){return jO.every}}),CO=Bb,Object.defineProperty(C,"exhaust",{enumerable:!0,get:function(){return CO.exhaust}}),IO=Wb,Object.defineProperty(C,"exhaustAll",{enumerable:!0,get:function(){return IO.exhaustAll}}),kO=zb,Object.defineProperty(C,"exhaustMap",{enumerable:!0,get:function(){return kO.exhaustMap}}),RO=Zb,Object.defineProperty(C,"expand",{enumerable:!0,get:function(){return RO.expand}}),AO=ip,Object.defineProperty(C,"filter",{enumerable:!0,get:function(){return AO.filter}}),MO=Jb,Object.defineProperty(C,"finalize",{enumerable:!0,get:function(){return MO.finalize}}),xO=ey,Object.defineProperty(C,"find",{enumerable:!0,get:function(){return xO.find}}),NO=oy,Object.defineProperty(C,"findIndex",{enumerable:!0,get:function(){return NO.findIndex}}),UO=ay,Object.defineProperty(C,"first",{enumerable:!0,get:function(){return UO.first}}),DO=hy,Object.defineProperty(C,"groupBy",{enumerable:!0,get:function(){return DO.groupBy}}),LO=Vh,Object.defineProperty(C,"ignoreElements",{enumerable:!0,get:function(){return LO.ignoreElements}}),FO=gy,Object.defineProperty(C,"isEmpty",{enumerable:!0,get:function(){return FO.isEmpty}}),BO=Ey,Object.defineProperty(C,"last",{enumerable:!0,get:function(){return BO.last}}),WO=Zc,Object.defineProperty(C,"map",{enumerable:!0,get:function(){return WO.map}}),zO=Yh,Object.defineProperty(C,"mapTo",{enumerable:!0,get:function(){return zO.mapTo}}),qO=Ny,Object.defineProperty(C,"materialize",{enumerable:!0,get:function(){return qO.materialize}}),VO=Fy,Object.defineProperty(C,"max",{enumerable:!0,get:function(){return VO.max}}),HO=Al,Object.defineProperty(C,"mergeAll",{enumerable:!0,get:function(){return HO.mergeAll}}),GO=zy,Object.defineProperty(C,"flatMap",{enumerable:!0,get:function(){return GO.flatMap}}),KO=Ml,Object.defineProperty(C,"mergeMap",{enumerable:!0,get:function(){return KO.mergeMap}}),YO=qy,Object.defineProperty(C,"mergeMapTo",{enumerable:!0,get:function(){return YO.mergeMapTo}}),ZO=Gy,Object.defineProperty(C,"mergeScan",{enumerable:!0,get:function(){return ZO.mergeScan}}),QO=xl,Object.defineProperty(C,"mergeWith",{enumerable:!0,get:function(){return QO.mergeWith}}),XO=u_,Object.defineProperty(C,"min",{enumerable:!0,get:function(){return XO.min}}),JO=c_,Object.defineProperty(C,"multicast",{enumerable:!0,get:function(){return JO.multicast}}),$O=w,Object.defineProperty(C,"observeOn",{enumerable:!0,get:function(){return $O.observeOn}}),ew=d_,Object.defineProperty(C,"onErrorResumeNextWith",{enumerable:!0,get:function(){return ew.onErrorResumeNextWith}}),tw=m_,Object.defineProperty(C,"pairwise",{enumerable:!0,get:function(){return tw.pairwise}}),rw=w_,Object.defineProperty(C,"pluck",{enumerable:!0,get:function(){return rw.pluck}}),nw=P_,Object.defineProperty(C,"publish",{enumerable:!0,get:function(){return nw.publish}}),ow=C_,Object.defineProperty(C,"publishBehavior",{enumerable:!0,get:function(){return ow.publishBehavior}}),iw=R_,Object.defineProperty(C,"publishLast",{enumerable:!0,get:function(){return iw.publishLast}}),uw=x_,Object.defineProperty(C,"publishReplay",{enumerable:!0,get:function(){return uw.publishReplay}}),aw=L_,Object.defineProperty(C,"raceWith",{enumerable:!0,get:function(){return aw.raceWith}}),sw=jd,Object.defineProperty(C,"reduce",{enumerable:!0,get:function(){return sw.reduce}}),cw=V_,Object.defineProperty(C,"repeat",{enumerable:!0,get:function(){return cw.repeat}}),lw=Q_,Object.defineProperty(C,"repeatWhen",{enumerable:!0,get:function(){return lw.repeatWhen}}),fw=tv,Object.defineProperty(C,"retry",{enumerable:!0,get:function(){return fw.retry}}),pw=av,Object.defineProperty(C,"retryWhen",{enumerable:!0,get:function(){return pw.retryWhen}}),dw=v,Object.defineProperty(C,"refCount",{enumerable:!0,get:function(){return dw.refCount}}),hw=pv,Object.defineProperty(C,"sample",{enumerable:!0,get:function(){return hw.sample}}),bw=_v,Object.defineProperty(C,"sampleTime",{enumerable:!0,get:function(){return bw.sampleTime}}),yw=Ov,Object.defineProperty(C,"scan",{enumerable:!0,get:function(){return yw.scan}}),_w=Cd,Object.defineProperty(C,"sequenceEqual",{enumerable:!0,get:function(){return _w.sequenceEqual}}),vw=Cv,Object.defineProperty(C,"share",{enumerable:!0,get:function(){return vw.share}}),mw=Uv,Object.defineProperty(C,"shareReplay",{enumerable:!0,get:function(){return mw.shareReplay}}),gw=Fv,Object.defineProperty(C,"single",{enumerable:!0,get:function(){return gw.single}}),Ow=Hv,Object.defineProperty(C,"skip",{enumerable:!0,get:function(){return Ow.skip}}),ww=Kv,Object.defineProperty(C,"skipLast",{enumerable:!0,get:function(){return ww.skipLast}}),Ew=Xv,Object.defineProperty(C,"skipUntil",{enumerable:!0,get:function(){return Ew.skipUntil}}),Pw=rm,Object.defineProperty(C,"skipWhile",{enumerable:!0,get:function(){return Pw.skipWhile}}),Sw=im,Object.defineProperty(C,"startWith",{enumerable:!0,get:function(){return Sw.startWith}}),Tw=qs,Object.defineProperty(C,"subscribeOn",{enumerable:!0,get:function(){return Tw.subscribeOn}}),jw=cm,Object.defineProperty(C,"switchAll",{enumerable:!0,get:function(){return jw.switchAll}}),Cw=lm,Object.defineProperty(C,"switchMap",{enumerable:!0,get:function(){return Cw.switchMap}}),Iw=ym,Object.defineProperty(C,"switchMapTo",{enumerable:!0,get:function(){return Iw.switchMapTo}}),kw=mm,Object.defineProperty(C,"switchScan",{enumerable:!0,get:function(){return kw.switchScan}}),Rw=Bh,Object.defineProperty(C,"take",{enumerable:!0,get:function(){return Rw.take}}),Aw=Py,Object.defineProperty(C,"takeLast",{enumerable:!0,get:function(){return Aw.takeLast}}),Mw=wm,Object.defineProperty(C,"takeUntil",{enumerable:!0,get:function(){return Mw.takeUntil}}),xw=jm,Object.defineProperty(C,"takeWhile",{enumerable:!0,get:function(){return xw.takeWhile}}),Nw=km,Object.defineProperty(C,"tap",{enumerable:!0,get:function(){return Nw.tap}}),Uw=g,Object.defineProperty(C,"throttle",{enumerable:!0,get:function(){return Uw.throttle}}),Dw=Fm,Object.defineProperty(C,"throttleTime",{enumerable:!0,get:function(){return Dw.throttleTime}}),Lw=wb,Object.defineProperty(C,"throwIfEmpty",{enumerable:!0,get:function(){return Lw.throwIfEmpty}}),Fw=qm,Object.defineProperty(C,"timeInterval",{enumerable:!0,get:function(){return Fw.timeInterval}}),Bw=ds,Object.defineProperty(C,"timeout",{enumerable:!0,get:function(){return Bw.timeout}}),Ww=Ym,Object.defineProperty(C,"timeoutWith",{enumerable:!0,get:function(){return Ww.timeoutWith}}),zw=Js,Object.defineProperty(C,"timestamp",{enumerable:!0,get:function(){return zw.timestamp}}),qw=Td,Object.defineProperty(C,"toArray",{enumerable:!0,get:function(){return qw.toArray}}),Vw=t,Object.defineProperty(C,"window",{enumerable:!0,get:function(){return Vw.window}}),Hw=i0,Object.defineProperty(C,"windowCount",{enumerable:!0,get:function(){return Hw.windowCount}}),Gw=l0,Object.defineProperty(C,"windowTime",{enumerable:!0,get:function(){return Gw.windowTime}}),Kw=Fs,Object.defineProperty(C,"windowToggle",{enumerable:!0,get:function(){return Kw.windowToggle}}),Yw=Ft,Object.defineProperty(C,"windowWhen",{enumerable:!0,get:function(){return Yw.windowWhen}}),Zw=R0,Object.defineProperty(C,"withLatestFrom",{enumerable:!0,get:function(){return Zw.withLatestFrom}}),Qw=P,Object.defineProperty(C,"zipAll",{enumerable:!0,get:function(){return Qw.zipAll}}),Xw=j,Object.defineProperty(C,"zipWith",{enumerable:!0,get:function(){return Xw.zipWith}});var a={},o={},tE=(Object.defineProperty(o,"__esModule",{value:!0}),o.partition=void 0,op),rE=ip;o.partition=function(t,r){return function(e){return[rE.filter(t,r)(e),rE.filter(tE.not(t,r))(e)]}};var 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,IE,kE,RE,AE,ME,xE,NE,UE,DE,LE,FE,BE,WE,zE,qE,VE,HE,GE,KE,YE,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,SP,TP,jP,CP,IP,kP,RP,AP,MP,xP,NP,UP,DP,LP,FP,BP,WP,zP,qP,VP,HP,GP,KP,YP,ZP,QP,XP,JP,$P,eS,tS,rS,nS,oS,iS,uS,aS,i={},sS=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},cS=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},lS=(Object.defineProperty(i,"__esModule",{value:!0}),i.race=void 0,Yf),fS=L_;i.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fS.raceWith.apply(void 0,cS([],sS(lS.argsOrArgArray(e))))},c=a,Object.defineProperty(c,"__esModule",{value:!0}),c.mergeAll=c.merge=c.max=c.materialize=c.mapTo=c.map=c.last=c.isEmpty=c.ignoreElements=c.groupBy=c.first=c.findIndex=c.find=c.finalize=c.filter=c.expand=c.exhaustMap=c.exhaustAll=c.exhaust=c.every=c.endWith=c.elementAt=c.distinctUntilKeyChanged=c.distinctUntilChanged=c.distinct=c.dematerialize=c.delayWhen=c.delay=c.defaultIfEmpty=c.debounceTime=c.debounce=c.count=c.connect=c.concatWith=c.concatMapTo=c.concatMap=c.concatAll=c.concat=c.combineLatestWith=c.combineLatest=c.combineLatestAll=c.combineAll=c.catchError=c.bufferWhen=c.bufferToggle=c.bufferTime=c.bufferCount=c.buffer=c.auditTime=c.audit=void 0,c.timeInterval=c.throwIfEmpty=c.throttleTime=c.throttle=c.tap=c.takeWhile=c.takeUntil=c.takeLast=c.take=c.switchScan=c.switchMapTo=c.switchMap=c.switchAll=c.subscribeOn=c.startWith=c.skipWhile=c.skipUntil=c.skipLast=c.skip=c.single=c.shareReplay=c.share=c.sequenceEqual=c.scan=c.sampleTime=c.sample=c.refCount=c.retryWhen=c.retry=c.repeatWhen=c.repeat=c.reduce=c.raceWith=c.race=c.publishReplay=c.publishLast=c.publishBehavior=c.publish=c.pluck=c.partition=c.pairwise=c.onErrorResumeNext=c.observeOn=c.multicast=c.min=c.mergeWith=c.mergeScan=c.mergeMapTo=c.mergeMap=c.flatMap=void 0,c.zipWith=c.zipAll=c.zip=c.withLatestFrom=c.windowWhen=c.windowToggle=c.windowTime=c.windowCount=c.window=c.toArray=c.timestamp=c.timeoutWith=c.timeout=void 0,nE=xp,Object.defineProperty(c,"audit",{enumerable:!0,get:function(){return nE.audit}}),oE=Lp,Object.defineProperty(c,"auditTime",{enumerable:!0,get:function(){return oE.auditTime}}),iE=zp,Object.defineProperty(c,"buffer",{enumerable:!0,get:function(){return iE.buffer}}),uE=Kp,Object.defineProperty(c,"bufferCount",{enumerable:!0,get:function(){return uE.bufferCount}}),aE=Jp,Object.defineProperty(c,"bufferTime",{enumerable:!0,get:function(){return aE.bufferTime}}),sE=ad,Object.defineProperty(c,"bufferToggle",{enumerable:!0,get:function(){return sE.bufferToggle}}),cE=bd,Object.defineProperty(c,"bufferWhen",{enumerable:!0,get:function(){return cE.bufferWhen}}),lE=gd,Object.defineProperty(c,"catchError",{enumerable:!0,get:function(){return lE.catchError}}),fE=Pd,Object.defineProperty(c,"combineAll",{enumerable:!0,get:function(){return fE.combineAll}}),pE=Sd,Object.defineProperty(c,"combineLatestAll",{enumerable:!0,get:function(){return pE.combineLatestAll}}),dE=qd,Object.defineProperty(c,"combineLatest",{enumerable:!0,get:function(){return dE.combineLatest}}),hE=zd,Object.defineProperty(c,"combineLatestWith",{enumerable:!0,get:function(){return hE.combineLatestWith}}),bE=sh,Object.defineProperty(c,"concat",{enumerable:!0,get:function(){return bE.concat}}),yE=Rl,Object.defineProperty(c,"concatAll",{enumerable:!0,get:function(){return yE.concatAll}}),_E=Yc,Object.defineProperty(c,"concatMap",{enumerable:!0,get:function(){return _E.concatMap}}),vE=oh,Object.defineProperty(c,"concatMapTo",{enumerable:!0,get:function(){return vE.concatMapTo}}),mE=ah,Object.defineProperty(c,"concatWith",{enumerable:!0,get:function(){return mE.concatWith}}),gE=vh,Object.defineProperty(c,"connect",{enumerable:!0,get:function(){return gE.connect}}),OE=mh,Object.defineProperty(c,"count",{enumerable:!0,get:function(){return OE.count}}),wE=jh,Object.defineProperty(c,"debounce",{enumerable:!0,get:function(){return wE.debounce}}),EE=I,Object.defineProperty(c,"debounceTime",{enumerable:!0,get:function(){return EE.debounceTime}}),PE=Nh,Object.defineProperty(c,"defaultIfEmpty",{enumerable:!0,get:function(){return PE.defaultIfEmpty}}),SE=Lh,Object.defineProperty(c,"delay",{enumerable:!0,get:function(){return SE.delay}}),TE=Fh,Object.defineProperty(c,"delayWhen",{enumerable:!0,get:function(){return TE.delayWhen}}),jE=ib,Object.defineProperty(c,"dematerialize",{enumerable:!0,get:function(){return jE.dematerialize}}),CE=cb,Object.defineProperty(c,"distinct",{enumerable:!0,get:function(){return CE.distinct}}),IE=hb,Object.defineProperty(c,"distinctUntilChanged",{enumerable:!0,get:function(){return IE.distinctUntilChanged}}),kE=mb,Object.defineProperty(c,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return kE.distinctUntilKeyChanged}}),RE=Ob,Object.defineProperty(c,"elementAt",{enumerable:!0,get:function(){return RE.elementAt}}),AE=Ab,Object.defineProperty(c,"endWith",{enumerable:!0,get:function(){return AE.endWith}}),ME=Db,Object.defineProperty(c,"every",{enumerable:!0,get:function(){return ME.every}}),xE=Bb,Object.defineProperty(c,"exhaust",{enumerable:!0,get:function(){return xE.exhaust}}),NE=Wb,Object.defineProperty(c,"exhaustAll",{enumerable:!0,get:function(){return NE.exhaustAll}}),UE=zb,Object.defineProperty(c,"exhaustMap",{enumerable:!0,get:function(){return UE.exhaustMap}}),DE=Zb,Object.defineProperty(c,"expand",{enumerable:!0,get:function(){return DE.expand}}),LE=ip,Object.defineProperty(c,"filter",{enumerable:!0,get:function(){return LE.filter}}),FE=Jb,Object.defineProperty(c,"finalize",{enumerable:!0,get:function(){return FE.finalize}}),BE=ey,Object.defineProperty(c,"find",{enumerable:!0,get:function(){return BE.find}}),WE=oy,Object.defineProperty(c,"findIndex",{enumerable:!0,get:function(){return WE.findIndex}}),zE=ay,Object.defineProperty(c,"first",{enumerable:!0,get:function(){return zE.first}}),qE=hy,Object.defineProperty(c,"groupBy",{enumerable:!0,get:function(){return qE.groupBy}}),VE=Vh,Object.defineProperty(c,"ignoreElements",{enumerable:!0,get:function(){return VE.ignoreElements}}),HE=gy,Object.defineProperty(c,"isEmpty",{enumerable:!0,get:function(){return HE.isEmpty}}),GE=Ey,Object.defineProperty(c,"last",{enumerable:!0,get:function(){return GE.last}}),KE=Zc,Object.defineProperty(c,"map",{enumerable:!0,get:function(){return KE.map}}),YE=Yh,Object.defineProperty(c,"mapTo",{enumerable:!0,get:function(){return YE.mapTo}}),ZE=Ny,Object.defineProperty(c,"materialize",{enumerable:!0,get:function(){return ZE.materialize}}),QE=Fy,Object.defineProperty(c,"max",{enumerable:!0,get:function(){return QE.max}}),XE=Zy,Object.defineProperty(c,"merge",{enumerable:!0,get:function(){return XE.merge}}),JE=Al,Object.defineProperty(c,"mergeAll",{enumerable:!0,get:function(){return JE.mergeAll}}),$E=zy,Object.defineProperty(c,"flatMap",{enumerable:!0,get:function(){return $E.flatMap}}),eP=Ml,Object.defineProperty(c,"mergeMap",{enumerable:!0,get:function(){return eP.mergeMap}}),tP=qy,Object.defineProperty(c,"mergeMapTo",{enumerable:!0,get:function(){return tP.mergeMapTo}}),rP=Gy,Object.defineProperty(c,"mergeScan",{enumerable:!0,get:function(){return rP.mergeScan}}),nP=xl,Object.defineProperty(c,"mergeWith",{enumerable:!0,get:function(){return nP.mergeWith}}),oP=u_,Object.defineProperty(c,"min",{enumerable:!0,get:function(){return oP.min}}),iP=c_,Object.defineProperty(c,"multicast",{enumerable:!0,get:function(){return iP.multicast}}),uP=w,Object.defineProperty(c,"observeOn",{enumerable:!0,get:function(){return uP.observeOn}}),aP=d_,Object.defineProperty(c,"onErrorResumeNext",{enumerable:!0,get:function(){return aP.onErrorResumeNext}}),sP=m_,Object.defineProperty(c,"pairwise",{enumerable:!0,get:function(){return sP.pairwise}}),cP=o,Object.defineProperty(c,"partition",{enumerable:!0,get:function(){return cP.partition}}),lP=w_,Object.defineProperty(c,"pluck",{enumerable:!0,get:function(){return lP.pluck}}),fP=P_,Object.defineProperty(c,"publish",{enumerable:!0,get:function(){return fP.publish}}),pP=C_,Object.defineProperty(c,"publishBehavior",{enumerable:!0,get:function(){return pP.publishBehavior}}),dP=R_,Object.defineProperty(c,"publishLast",{enumerable:!0,get:function(){return dP.publishLast}}),hP=x_,Object.defineProperty(c,"publishReplay",{enumerable:!0,get:function(){return hP.publishReplay}}),bP=i,Object.defineProperty(c,"race",{enumerable:!0,get:function(){return bP.race}}),yP=L_,Object.defineProperty(c,"raceWith",{enumerable:!0,get:function(){return yP.raceWith}}),_P=jd,Object.defineProperty(c,"reduce",{enumerable:!0,get:function(){return _P.reduce}}),vP=V_,Object.defineProperty(c,"repeat",{enumerable:!0,get:function(){return vP.repeat}}),mP=Q_,Object.defineProperty(c,"repeatWhen",{enumerable:!0,get:function(){return mP.repeatWhen}}),gP=tv,Object.defineProperty(c,"retry",{enumerable:!0,get:function(){return gP.retry}}),OP=av,Object.defineProperty(c,"retryWhen",{enumerable:!0,get:function(){return OP.retryWhen}}),wP=v,Object.defineProperty(c,"refCount",{enumerable:!0,get:function(){return wP.refCount}}),EP=pv,Object.defineProperty(c,"sample",{enumerable:!0,get:function(){return EP.sample}}),PP=_v,Object.defineProperty(c,"sampleTime",{enumerable:!0,get:function(){return PP.sampleTime}}),SP=Ov,Object.defineProperty(c,"scan",{enumerable:!0,get:function(){return SP.scan}}),TP=Cd,Object.defineProperty(c,"sequenceEqual",{enumerable:!0,get:function(){return TP.sequenceEqual}}),jP=Cv,Object.defineProperty(c,"share",{enumerable:!0,get:function(){return jP.share}}),CP=Uv,Object.defineProperty(c,"shareReplay",{enumerable:!0,get:function(){return CP.shareReplay}}),IP=Fv,Object.defineProperty(c,"single",{enumerable:!0,get:function(){return IP.single}}),kP=Hv,Object.defineProperty(c,"skip",{enumerable:!0,get:function(){return kP.skip}}),RP=Kv,Object.defineProperty(c,"skipLast",{enumerable:!0,get:function(){return RP.skipLast}}),AP=Xv,Object.defineProperty(c,"skipUntil",{enumerable:!0,get:function(){return AP.skipUntil}}),MP=rm,Object.defineProperty(c,"skipWhile",{enumerable:!0,get:function(){return MP.skipWhile}}),xP=im,Object.defineProperty(c,"startWith",{enumerable:!0,get:function(){return xP.startWith}}),NP=qs,Object.defineProperty(c,"subscribeOn",{enumerable:!0,get:function(){return NP.subscribeOn}}),UP=cm,Object.defineProperty(c,"switchAll",{enumerable:!0,get:function(){return UP.switchAll}}),DP=lm,Object.defineProperty(c,"switchMap",{enumerable:!0,get:function(){return DP.switchMap}}),LP=ym,Object.defineProperty(c,"switchMapTo",{enumerable:!0,get:function(){return LP.switchMapTo}}),FP=mm,Object.defineProperty(c,"switchScan",{enumerable:!0,get:function(){return FP.switchScan}}),BP=Bh,Object.defineProperty(c,"take",{enumerable:!0,get:function(){return BP.take}}),WP=Py,Object.defineProperty(c,"takeLast",{enumerable:!0,get:function(){return WP.takeLast}}),zP=wm,Object.defineProperty(c,"takeUntil",{enumerable:!0,get:function(){return zP.takeUntil}}),qP=jm,Object.defineProperty(c,"takeWhile",{enumerable:!0,get:function(){return qP.takeWhile}}),VP=km,Object.defineProperty(c,"tap",{enumerable:!0,get:function(){return VP.tap}}),HP=g,Object.defineProperty(c,"throttle",{enumerable:!0,get:function(){return HP.throttle}}),GP=Fm,Object.defineProperty(c,"throttleTime",{enumerable:!0,get:function(){return GP.throttleTime}}),KP=wb,Object.defineProperty(c,"throwIfEmpty",{enumerable:!0,get:function(){return KP.throwIfEmpty}}),YP=qm,Object.defineProperty(c,"timeInterval",{enumerable:!0,get:function(){return YP.timeInterval}}),ZP=ds,Object.defineProperty(c,"timeout",{enumerable:!0,get:function(){return ZP.timeout}}),QP=Ym,Object.defineProperty(c,"timeoutWith",{enumerable:!0,get:function(){return QP.timeoutWith}}),XP=Js,Object.defineProperty(c,"timestamp",{enumerable:!0,get:function(){return XP.timestamp}}),JP=Td,Object.defineProperty(c,"toArray",{enumerable:!0,get:function(){return JP.toArray}}),$P=t,Object.defineProperty(c,"window",{enumerable:!0,get:function(){return $P.window}}),eS=i0,Object.defineProperty(c,"windowCount",{enumerable:!0,get:function(){return eS.windowCount}}),tS=l0,Object.defineProperty(c,"windowTime",{enumerable:!0,get:function(){return tS.windowTime}}),rS=Fs,Object.defineProperty(c,"windowToggle",{enumerable:!0,get:function(){return rS.windowToggle}}),nS=Ft,Object.defineProperty(c,"windowWhen",{enumerable:!0,get:function(){return nS.windowWhen}}),oS=R0,Object.defineProperty(c,"withLatestFrom",{enumerable:!0,get:function(){return oS.withLatestFrom}}),iS=T,Object.defineProperty(c,"zip",{enumerable:!0,get:function(){return iS.zip}}),uS=P,Object.defineProperty(c,"zipAll",{enumerable:!0,get:function(){return uS.zipAll}}),aS=j,Object.defineProperty(c,"zipWith",{enumerable:!0,get:function(){return aS.zipWith}});var E={},pS=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())})},dS=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}}}},hS=(Object.defineProperty(E,"__esModule",{value:!0}),e),bS=vr,yS=a,_S=0,vS=1,mS=2;function gS(e,t){e=e.pipe((0,yS.publishReplay)(1),(0,yS.refCount)());this._result=e,this._keys=e.pipe((0,yS.mergeMap)(function(e){return(0,bS.from)(e.keys())}),(0,yS.publishReplay)(1),(0,yS.refCount)()),this._records=void 0,this._controls=new OS,this._summary=new bS.ReplaySubject,this._state=t||_S}gS.prototype.keys=function(){return this._keys},gS.prototype.records=function(){var r=this,e=this._result.pipe((0,yS.mergeMap)(function(t){return new bS.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},gS.prototype.consume=function(){var r=this;return this._result.pipe((0,yS.mergeMap)(function(t){return new bS.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},gS.prototype.pause=function(){this._controls.pause()},gS.prototype.resume=function(){return this._controls.resume()},gS.prototype.push=function(){return this._controls.push()},gS.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<vS?(this._state=vS,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,hS.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},gS.prototype._toObservable=function(){var n=this;return new bS.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new gS((t=e,new bS.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},gS.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new OS);var a=new bS.Subject,s=function(n){return pS(e,void 0,void 0,function(){var t,r;return dS(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 pS(this,void 0,void 0,function(){return dS(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 pS(t,void 0,void 0,function(){var t,r;return dS(this,function(e){switch(e.label){case 0:return this._state=mS,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=mS,t._summary.error(e)}},this._controls),this._records)},E.default=gS;wS.prototype.pause=function(){this._paused=!0},Object.defineProperty(wS.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(wS.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),wS.prototype.resume=function(){return pS(this,void 0,void 0,function(){var t;return dS(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]}})})},wS.prototype.push=function(){return pS(this,void 0,void 0,function(){return dS(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(wS.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var OS=wS;function wS(e){void 0===e&&(e=function(){return pS(t,void 0,void 0,function(){return dS(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var lt={},f=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ES=(Object.defineProperty(lt,"__esModule",{value:!0}),vr),PS=f(E);function SS(e){this._txc=e}f(e),SS.prototype.run=function(e,r){var n=this;return new PS.default(new ES.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},SS.prototype.commit=function(){var e=this;return new ES.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},SS.prototype.rollback=function(){var e=this;return new ES.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},SS.prototype.isOpen=function(){return this._txc.isOpen()},SS.prototype.close=function(){var e=this;return new ES.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},lt.default=SS;y={},p=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function TS(e){e=e.run;this._run=e}Object.defineProperty(y,"__esModule",{value:!0}),p(E),p(lt),TS.fromTransaction=function(e){return new TS({run:e.run.bind(e)})},TS.prototype.run=function(e,t){return this._run(e,t)},y.default=TS;var Bu={},jS=(Object.defineProperty(Bu,"__esModule",{value:!0}),e),CS=vr,IS=a,kS=(jS.internal.logger.Logger,jS.error.SERVICE_UNAVAILABLE);function RS(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=AS(void 0===t?3e4:t,3e4),this._initialDelay=AS(r,1e3),this._delayMultiplier=AS(n,2),this._delayJitter=AS(o,.2),this._logger=e}function AS(e,t){return e||0===e?e:t}RS.prototype.retry=function(e){var a=this;return e.pipe((0,IS.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,IS.mergeMap)(function(e){if(!(0,jS.isRetriableError)(e))return(0,CS.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,jS.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),kS)).seenErrors=n,(0,CS.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,CS.of)(1).pipe((0,IS.delay)(r))}))}))},RS.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},Bu.default=RS;var pa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},MS=(Object.defineProperty(Fr,"__esModule",{value:!0}),vr),xS=a,NS=pa(E),wa=e,US=pa(lt),DS=pa(y),LS=pa(Bu),Ta=wa.internal.constants,FS=Ta.ACCESS_MODE_READ,BS=Ta.ACCESS_MODE_WRITE,WS=wa.internal.txConfig.TxConfig;function zS(e){var e=void 0===e?{}:e,t=e.session,e=e.config;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new LS.default({maxRetryTimeout:e})}(e)}zS.prototype.run=function(e,r,n){var o=this;return new NS.default(new MS.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},zS.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e)},zS.prototype.readTransaction=function(e,t){return this._runTransaction(FS,e,t)},zS.prototype.writeTransaction=function(e,t){return this._runTransaction(BS,e,t)},zS.prototype.executeRead=function(e,t){return this._executeInTransaction(FS,e,t)},zS.prototype.executeWrite=function(e,t){return this._executeInTransaction(BS,e,t)},zS.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new DS.default({run:e.run.bind(e)})})},zS.prototype.close=function(){var e=this;return new MS.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},zS.prototype.lastBookmark=function(){return this.lastBookmarks()},zS.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},zS.prototype._beginTransaction=function(e,t){var r=this,n=WS.empty();return t&&(n=new WS(t)),new MS.Observable(function(t){try{r._session._beginTransaction(e,n).then(function(e){t.next(new US.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},zS.prototype._runTransaction=function(e,r,t,n){void 0===n&&(n=function(e){return e});var o=WS.empty();return t&&(o=new WS(t)),this._retryLogic.retry(this._beginTransaction(e,o).pipe((0,xS.mergeMap)(function(t){return(0,MS.defer)(function(){try{return r(n(t))}catch(e){return(0,MS.throwError)(function(){return e})}}).pipe((0,xS.catchError)(function(e){return t.rollback().pipe((0,xS.concatWith)((0,MS.throwError)(function(){return e})))}),(0,xS.concatWith)(t.commit()))})))},Fr.default=zS;var qS,VS,Yu=r&&r.__extends||(qS=function(e,t){return(qS=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}qS(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}},Wr=(Object.defineProperty(B,"__esModule",{value:!0}),B.WRITE=B.READ=B.Driver=void 0,e),HS=m(Fr),GS=Wr.internal.constants.FETCH_ALL,Wu=Wr.driver.READ,KS=Wr.driver.WRITE,Nr=(B.READ=Wu,B.WRITE=KS,Yu(YS,VS=Wr.Driver),YS.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 HS.default({session:this._newSession({defaultAccessMode:void 0===t?KS: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===GS)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(GS," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:a}),config:this._config})},YS);function YS(){return null!==VS&&VS.apply(this,arguments)||this}B.Driver=Nr,B.default=Nr;n={},Object.defineProperty(n,"__esModule",{value:!0}),n.default="5.8.0",b={},cs={},rs={};function ZS(){}Object.defineProperty(rs,"__esModule",{value:!0}),ZS.prototype.selectReader=function(e){throw new Error("Abstract function")},ZS.prototype.selectWriter=function(e){throw new Error("Abstract function")},rs.default=ZS;is={},as={};function QS(e){this._offset=e||0}Object.defineProperty(as,"__esModule",{value:!0}),QS.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},as.default=QS;var XS,JS,es=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)}),ac=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$S=(Object.defineProperty(is,"__esModule",{value:!0}),ac(as)),Q=ac(rs),Ys=(JS=Q.default,es(e1,JS),e1.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},e1.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},e1.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},e1);function e1(e){var t=JS.call(this)||this;return t._readersIndex=new $S.default,t._writersIndex=new $S.default,t._connectionPool=e,t}is.default=Ys;_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(cs,"__esModule",{value:!0}),cs.LeastConnectedLoadBalancingStrategy=cs.LoadBalancingStrategy=void 0,ss=_(rs),cs.LoadBalancingStrategy=ss.default,fl=_(is),cs.LeastConnectedLoadBalancingStrategy=fl.default,cs.default=fl.default,u={},kl={},Zl={},Ql={},nf={},Qa={},dl={},vl={byteLength:function(e){var e=a1(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};vl.toByteArray=function(e){var t,r,n=a1(e),o=n[0],n=n[1],i=new n1(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=r1[e.charCodeAt(r)]<<18|r1[e.charCodeAt(r+1)]<<12|r1[e.charCodeAt(r+2)]<<6|r1[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=r1[e.charCodeAt(r)]<<2|r1[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=r1[e.charCodeAt(r)]<<10|r1[e.charCodeAt(r+1)]<<4|r1[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},vl.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 t1[e>>18&63]+t1[e>>12&63]+t1[e>>6&63]+t1[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(t1[t>>2]+t1[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(t1[t>>10]+t1[t>>4&63]+t1[t<<2&63]+"="));return o.join("")};for(var t1=[],r1=[],n1="undefined"!=typeof Uint8Array?Uint8Array:Array,o1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i1=0,u1=o1.length;i1<u1;++i1)t1[i1]=o1[i1],r1[o1.charCodeAt(i1)]=i1;function a1(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]}r1["-".charCodeAt(0)]=62,r1["_".charCodeAt(0)]=63;$a={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 s1=dl;const d2=vl,h2=$a,b2=(ec="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,s1.Buffer=k,s1.SlowBuffer=function(e){+e!=e&&(e=0);return k.alloc(+e)},s1.INSPECT_MAX_BYTES=50,2147483647);function c1(e){if(e>b2)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 l1(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p1(e)}function l1(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|y1(n,o);let e=c1(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return F1(o=t,Uint8Array)?h1((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):d1(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(F1(t,ArrayBuffer)||t&&F1(t.buffer,ArrayBuffer))return h1(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(F1(t,SharedArrayBuffer)||t&&F1(t.buffer,SharedArrayBuffer)))return h1(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|b1(e.length),0===(r=c1(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||B1(e.length)?c1(0):d1(e);if("Buffer"===e.type&&Array.isArray(e.data))return d1(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 f1(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 p1(e){return f1(e),c1(e<0?0:0|b1(e))}function d1(t){var r=t.length<0?0:0|b1(t.length);const n=c1(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function h1(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 b1(e){if(e>=b2)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b2.toString(16)+" bytes");return 0|e}function y1(e,t){if(k.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F1(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 U1(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D1(e).length;default:if(o)return n?-1:U1(e).length;t=(""+t).toLowerCase(),o=!0}}function _1(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+=m2[o[e]];return t;return}case"utf8":case"utf-8":return E1(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?d2.fromByteArray(d):d2.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 v1(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m1(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=B1(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:g1(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):g1(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g1(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 O1(e,t,r,n){return L1(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 w1(e,t,r,n){return L1(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 E1(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<=y2)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=y2));return e}}s1.kMaxLength=b2,(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=l1,Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(e,t,r){return t=t,r=r,f1(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?c1(e).fill(t,r):c1(e).fill(t):c1(e)},k.allocUnsafe=p1,k.allocUnsafeSlow=p1,k.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==k.prototype},k.compare=function(r,n){if(F1(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),F1(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(F1(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=y1,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)v1(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)v1(this,e,e+3),v1(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)v1(this,e,e+7),v1(this,e+1,e+6),v1(this,e+2,e+5),v1(this,e+3,e+4);return this},k.prototype.toLocaleString=k.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?E1(this,0,e):_1.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=s1.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},ec&&(k.prototype[ec]=k.prototype.inspect),k.prototype.compare=function(e,t,r,n,o){if(F1(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 m1(this,e,t,r,!0)},k.prototype.lastIndexOf=function(e,t,r){return m1(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(B1(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,L1(U1(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return O1(this,t,r,n);case"base64":return i=this,u=r,o=n,L1(D1(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w1(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 y2=4096;function P1(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 S1(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 T1(e,t,r,n,o){M1(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 j1(e,t,r,n,o){M1(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 C1(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 I1(e,t,r,n,o){return t=+t,r>>>=0,o||C1(e,0,r,4),h2.write(e,t,r,n,23,4),r+4}function k1(e,t,r,n,o){return t=+t,r>>>=0,o||C1(e,0,r,8),h2.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||P1(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||P1(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||P1(e,1,this.length),this[e]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P1(e,2,this.length),this[e]|this[e+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P1(e,2,this.length),this[e]<<8|this[e+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P1(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||P1(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},k.prototype.readBigUInt64LE=W1(function(e){x1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||N1(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=W1(function(e){x1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||N1(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||P1(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||P1(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||P1(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},k.prototype.readInt16LE=function(e,t){e>>>=0,t||P1(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||P1(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||P1(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||P1(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},k.prototype.readBigInt64LE=W1(function(e){x1(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||N1(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=W1(function(e){x1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||N1(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||P1(e,4,this.length),h2.read(this,e,!0,23,4)},k.prototype.readFloatBE=function(e,t){return e>>>=0,t||P1(e,4,this.length),h2.read(this,e,!1,23,4)},k.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P1(e,8,this.length),h2.read(this,e,!0,52,8)},k.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P1(e,8,this.length),h2.read(this,e,!1,52,8)},k.prototype.writeUintLE=k.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||S1(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||S1(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||S1(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||S1(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||S1(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||S1(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||S1(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=W1(function(e,t=0){return T1(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=W1(function(e,t=0){return j1(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||S1(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||S1(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||S1(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||S1(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||S1(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||S1(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||S1(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=W1(function(e,t=0){return T1(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=W1(function(e,t=0){return j1(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeFloatLE=function(e,t,r){return I1(this,e,t,!0,r)},k.prototype.writeFloatBE=function(e,t,r){return I1(this,e,t,!1,r)},k.prototype.writeDoubleLE=function(e,t,r){return k1(this,e,t,!0,r)},k.prototype.writeDoubleBE=function(e,t,r){return k1(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 _2={};function R1(e,t,r){_2[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 A1(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 M1(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 _2.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,x1(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||N1(u,r.length-(n+1))}function x1(e,t){if("number"!=typeof e)throw new _2.ERR_INVALID_ARG_TYPE(t,"number",e)}function N1(e,t,r){if(Math.floor(e)!==e)throw x1(e,r),new _2.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new _2.ERR_BUFFER_OUT_OF_BOUNDS;throw new _2.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}R1("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),R1("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),R1("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=A1(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=A1(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const v2=/[^+/0-9A-Za-z-_]/g;function U1(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 D1(e){return d2.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(v2,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L1(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 F1(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function B1(e){return e!=e}const m2=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 W1(e){return"undefined"==typeof BigInt?z1:e}function z1(){throw new Error("BigInt not supported")}}var q1,Af={},Ha={},h=r&&r.__extends||(q1=function(e,t){return(q1=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}q1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Kf=(Object.defineProperty(Ha,"__esModule",{value:!0}),R.prototype.getUInt8=function(e){throw new Error("Not implemented")},R.prototype.getInt8=function(e){throw new Error("Not implemented")},R.prototype.getFloat64=function(e){throw new Error("Not implemented")},R.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},R.prototype.putInt8=function(e,t){throw new Error("Not implemented")},R.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},R.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},R.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},R.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},R.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},R.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)},R.prototype.getSlice=function(e,t){return new H1(e,t,this)},R.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},R.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},R.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)},R.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)},R.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)},R.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},R.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},R.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},R.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},R.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},R.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},R.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},R.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},R.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},R.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},R.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},R.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},R.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},R.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},R.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},R.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},R.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},R.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},R.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},R.prototype.remaining=function(){return this.length-this.position},R.prototype.hasRemaining=function(){return 0<this.remaining()},R.prototype.reset=function(){this.position=0},R.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},R.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},R);function R(e){this.position=0,this.length=e}Ha.default=Kf;h(G1,V1=Kf),G1.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},G1.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},G1.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},G1.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},G1.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},G1.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var V1,H1=G1;function G1(e,t,r){t=V1.call(this,t)||this;return t._start=e,t._inner=r,t}var K1,Y1,tp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},np=(Object.defineProperty(Af,"__esModule",{value:!0}),Af.BaseBuffer=void 0,tp(Ha)),fp=(Af.BaseBuffer=np.default,Af.default=np.default,r&&r.__extends||(K1=function(e,t){return(K1=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}K1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),_p=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Z1=(Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.alloc=void 0,_p(dl)),Ja=_p(Af),Q1=(Y1=Ja.default,fp(X1,Y1),X1.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},X1.prototype.getInt8=function(e){return this._buffer.readInt8(e)},X1.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},X1.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},X1.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},X1.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},X1.prototype.putBytes=function(e,t){var r;t instanceof X1?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):Y1.prototype.putBytes.call(this,e,t)},X1.prototype.getSlice=function(e,t){return new X1(this._buffer.slice(e,e+t))},X1);function X1(e){var t=this,e=(e=e)instanceof Z1.default.Buffer?e:"number"==typeof e&&"function"==typeof Z1.default.Buffer.alloc?Z1.default.Buffer.alloc(e):new Z1.default.Buffer(e);return(t=Y1.call(this,e.length)||this)._buffer=e,t}Qa.default=Q1,Qa.alloc=function(e){return new Q1(e)};var Mf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},J1=(Object.defineProperty(nf,"__esModule",{value:!0}),Mf(Qa)),$1=e,gp=$1.internal.util,eT=gp.ENCRYPTION_OFF,tT=gp.ENCRYPTION_ON;function rT(e,t,r){void 0===t&&(t=nT),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,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===tT}(e),n=function(e){return!1===e.encrypted||e.encrypted===eT}(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,$1.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:"'+eT+'"` 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 J1.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function nT(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}rT.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,$1.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,$1.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))},rT.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof J1.default))throw(0,$1.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()}}},rT.prototype.close=function(){var r=this;return new Promise(function(e,t){r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._clearConnectionTimeout(),r._ws.onclose=function(){return e()},r._ws.close()):e()})},rT.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},rT.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},rT.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},rT.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,$1.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))},rT.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},rT.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},nf.default=rT;var oT,Pp={},Xa=r&&r.__extends||(oT=function(e,t){return(oT=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}oT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Pp,"__esModule",{value:!0});var iT,Fu=e.internal.resolver.BaseHostNameResolver,Gf=(Xa(uT,iT=Fu),uT.prototype.resolve=function(e){return this._resolveToItself(e)},uT);function uT(){return null!==iT&&iT.apply(this,arguments)||this}Pp.default=Gf;var aT,O=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Mp=(Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.HostNameResolver=Ql.Channel=void 0,O(nf)),S=O(Pp),C=(Ql.Channel=Mp.default,Ql.HostNameResolver=S.default,{}),op={},Yf=r&&r.__extends||(aT=function(e,t){return(aT=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}aT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(op,"__esModule",{value:!0});var sT,cT=Qa,xp=(sT=Af.BaseBuffer,Yf(lT,sT),lT.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}},lT.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}},lT.prototype.getFloat64=function(e){for(var t=(0,cT.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},lT);function lT(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=sT.call(this,r)||this)._buffers=e,t}op.default=xp;var fT,pT,Lp=r&&r.__extends||(fT=function(e,t){return(fT=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}fT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),zp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Kp=(Object.defineProperty(C,"__esModule",{value:!0}),C.Dechunker=C.Chunker=void 0,zp(Ha)),dT=Qa,hT=zp(op),Jp=(pT=Kp.default,Lp(bT,pT),bT.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},bT.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},bT.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},bT.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},bT.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,dT.alloc)(this._bufferSize),this._chunkOpen=!1),this},bT.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},bT.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)},bT.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},bT);function bT(e,t){var r=pT.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,dT.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function yT(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}C.Chunker=Jp,yT.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},yT.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},yT.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)},yT.prototype.CLOSED=function(e){},yT.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 hT.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},yT.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},C.Dechunker=yT;var ad={},_T=(Object.defineProperty(ad,"__esModule",{value:!0}),e),bd=_T.internal.util,gd=bd.ENCRYPTION_OFF,Pd=bd.ENCRYPTION_ON,vT=_T.error.SERVICE_UNAVAILABLE,mT=[null,void 0,!0,!1,Pd,gd],gT=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];ad.default=function(e,t,r){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==mT.indexOf(e))return e;throw(0,_T.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(mT))}(t),this.trust=function(e){e=e.trust;if(-1!==gT.indexOf(e))return e;throw(0,_T.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(gT))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||vT,this.connectionTimeout=t.connectionTimeout};var OT,wT,Sd={},qd={},zd={exports:{}};function ET(e,t){for(var r in e)t[r]=e[r]}function PT(e,t,r){return wT(e,t,r)}Rl=(sh=zd).exports,(wT=(OT=dl).Buffer).from&&wT.alloc&&wT.allocUnsafe&&wT.allocUnsafeSlow?sh.exports=OT:(ET(OT,Rl),Rl.Buffer=PT),PT.prototype=Object.create(wT.prototype),ET(wT,PT),PT.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return wT(e,t,r)},PT.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=wT(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},PT.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return wT(e)},PT.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return OT.SlowBuffer(e)};var ST=zd.exports.Buffer,TT=ST.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 jT(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||ST.isEncoding!==TT&&TT(e))return t||e;throw new Error("Unknown encoding: "+e)}function CT(e){var t;switch(this.encoding=jT(e),this.encoding){case"utf16le":this.text=RT,this.end=AT,t=4;break;case"utf8":this.fillLast=kT,t=4;break;case"base64":this.text=MT,this.end=xT,t=3;break;default:return this.write=NT,void(this.end=UT)}this.lastNeed=0,this.lastTotal=0,this.lastChar=ST.allocUnsafe(t)}function IT(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function kT(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 RT(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 AT(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 MT(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 xT(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function NT(e){return e.toString(this.encoding)}function UT(e){return e&&e.length?this.write(e):""}(qd.StringDecoder=CT).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||""},CT.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},CT.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=IT(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=IT(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=IT(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)},CT.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 DT,LT,FT,BT,WT,Yc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zT=(Object.defineProperty(Sd,"__esModule",{value:!0}),Yc(Qa)),qT=e,VT=Yc(dl),HT=new qd.StringDecoder("utf8");Sd.default={encode:function(e){return new zT.default((e=e,"function"==typeof VT.default.Buffer.from?VT.default.Buffer.from(e,"utf8"):new VT.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 HT.write(e._buffer)},r=function(){return HT.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,qT.newError)("Don't know how to decode strings from '".concat(e,"'"))}},oh=Zl,DT=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]}),ah=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||DT(t,e,r)},LT=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(oh,"__esModule",{value:!0}),oh.utf8=oh.alloc=oh.ChannelConfig=void 0,ah(Ql,oh),ah(C,oh),FT=ad,Object.defineProperty(oh,"ChannelConfig",{enumerable:!0,get:function(){return LT(FT).default}}),BT=Qa,Object.defineProperty(oh,"alloc",{enumerable:!0,get:function(){return BT.alloc}}),WT=Sd,Object.defineProperty(oh,"utf8",{enumerable:!0,get:function(){return LT(WT).default}}),Object.defineProperty(kl,"__esModule",{value:!0});var GT=Zl,KT=e,YT=1616949271;function ZT(e,t){return{major:e,minor:t}}function QT(){var e=[[ZT(5,2),ZT(5,0)],[ZT(4,4),ZT(4,2)],ZT(4,1),ZT(3,0)];if(4<e.length)throw(0,KT.newError)("It should not have more than 4 versions of the protocol");var o=(0,GT.alloc)(20);return o.writeInt32(YT),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}kl.default=function(t){var o=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(o),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw(0,KT.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);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(QT())})};var XT,vh={},mh={},jh={},I={},Nh={},Lh=r&&r.__extends||(XT=function(e,t){return(XT=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}XT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Fh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ib=(Object.defineProperty(Nh,"__esModule",{value:!0}),Fh(e),JT.ofRecord=function(e){return null===e?JT.ofNull():new uj(e)},JT.ofMessageResponse=function(e){return null===e?JT.ofNull():new ej(e)},JT.ofNull=function(){return new nj},Object.defineProperty(JT.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JT.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JT.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JT.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),JT);function JT(){}Nh.default=ib;Lh(tj,$T=ib),Object.defineProperty(tj.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(tj.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(tj.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(tj.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var $T,ej=tj;function tj(e){var t=$T.call(this)||this;return t._response=e,t}Lh(oj,rj=ib),Object.defineProperty(oj.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var rj,nj=oj;function oj(){return null!==rj&&rj.apply(this,arguments)||this}Lh(aj,ij=ib),Object.defineProperty(aj.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(aj.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(aj.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(aj.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var ij,uj=aj;function aj(e){var t=ij.call(this)||this;return t._record=e,t}var sj,cb=r&&r.__extends||(sj=function(e,t){return(sj=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}sj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),hb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cj=(Object.defineProperty(I,"__esModule",{value:!0}),I.ProcedureRouteObserver=I.RouteObserver=I.CompletedObserver=I.FailedObserver=I.ResetObserver=I.LogoffObserver=I.LoginObserver=I.ResultStreamObserver=I.StreamObserver=void 0,e),lj=hb(Nh),fj=cj.internal.constants.FETCH_ALL,pj=cj.error.PROTOCOL_ERROR,mb=(dj.prototype.onNext=function(e){},dj.prototype.onError=function(e){},dj.prototype.onCompleted=function(e){},dj);function dj(){}I.StreamObserver=mb;cb(bj,hj=mb),bj.prototype.pause=function(){this._paused=!0},bj.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},bj.prototype.onNext=function(e){var t=new cj.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))},bj.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},bj.prototype.onError=function(e){this._state.onError(this,e)},bj.prototype.cancel=function(){this._discard=!0},bj.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(kj.STREAMING)},bj.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(kj.SUCCEEDED)},bj.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===kj.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===kj.READY&&this._handleStreaming()},bj.prototype._handleHasMore=function(e){this._setState(kj.READY),this._handleStreaming(),delete e.has_more},bj.prototype._handlePullSuccess=function(e){var t,r=this,n=Object.assign(this._server?{server:this._server}:{},this._meta,e);[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(kj.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,cj.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),pj))},bj.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;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()}},bj.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(kj.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},bj.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},bj.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):this._moreFunction(this._queryId,this._fetchSize,this),this._setState(kj.STREAMING)},bj.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},bj.prototype._setState=function(e){this._state=e},bj.prototype._setupAutoPull=function(){this._autoPull=!0};var hj,Ob=bj;function bj(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?fj: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,e=e.lowRecordWatermark,e=void 0===e?Number.MAX_VALUE:e,d=hj.call(this)||this;return d._fieldKeys=null,d._fieldLookup=null,d._head=null,d._queuedRecords=[],d._tail=null,d._error=null,d._observers=[],d._meta={},d._server=f,d._beforeError=i,d._afterError=u,d._beforeKeys=a,d._afterKeys=s,d._beforeComplete=c,d._afterComplete=l,d._queryId=null,d._moreFunction=r,d._discardFunction=n,d._discard=!1,d._fetchSize=o,d._lowRecordWatermark=e,d._highRecordWatermark=p,d._setState(t?kj.READY:kj.READY_STREAMING),d._setupAutoPull(),d._paused=!1,d}I.ResultStreamObserver=Ob;cb(_j,yj=mb),_j.prototype.onNext=function(e){this.onError((0,cj.newError)("Received RECORD when initializing "+cj.json.stringify(e)))},_j.prototype.onError=function(e){this._onError&&this._onError(e)},_j.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var yj,Ab=_j;function _j(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=yj.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.LoginObserver=Ab;cb(mj,vj=mb),mj.prototype.onNext=function(e){this.onError((0,cj.newError)("Received RECORD when logging off "+cj.json.stringify(e)))},mj.prototype.onError=function(e){this._onError&&this._onError(e)},mj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var vj,Db=mj;function mj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=vj.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.LogoffObserver=Db;cb(Oj,gj=mb),Oj.prototype.onNext=function(e){this.onError((0,cj.newError)("Received RECORD when resetting: received record is: "+cj.json.stringify(e),pj))},Oj.prototype.onError=function(e){e.code===pj&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},Oj.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var gj,Bb=Oj;function Oj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=gj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}I.ResetObserver=Bb;cb(Ej,wj=Ob);var wj,Wb=Ej;function Ej(e){var t=e.error,e=e.onError,e=wj.call(this,{beforeError:e})||this;return e.onError(t),e}I.FailedObserver=Wb;cb(Sj,Pj=Ob);var Pj,zb=Sj;function Sj(){var e=Pj.call(this)||this;return Pj.prototype.markCompleted.call(e),e}I.CompletedObserver=zb;cb(jj,Tj=mb),jj.prototype.onNext=function(e){this._records.push(e)},jj.prototype.onError=function(e){e.code===pj&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},jj.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,cj.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+cj.json.stringify(this._records),pj)):this._onCompleted&&this._onCompleted(lj.default.ofRecord(this._records[0]))};var Tj,Zb=jj;function jj(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=Tj.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}I.ProcedureRouteObserver=Zb;cb(Ij,Cj=mb),Ij.prototype.onNext=function(e){this.onError((0,cj.newError)("Received RECORD when resetting: received record is: "+cj.json.stringify(e),pj))},Ij.prototype.onError=function(e){e.code===pj&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},Ij.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(lj.default.ofMessageResponse(e))};var Cj,ip=Ij;function Ij(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=Cj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}I.RouteObserver=ip;var kj={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(kj.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(){}}},Rj=(Object.defineProperty(jh,"__esModule",{value:!0}),jh.assertNotificationFilterIsEmpty=jh.assertImpersonatedUserIsEmpty=jh.assertTxConfigIsEmpty=jh.assertDatabaseIsEmpty=void 0,e);jh.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,Rj.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},jh.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,Rj.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},jh.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,Rj.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},jh.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,Rj.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(Rj.json.stringify(e),"."))).message),r.onError(t),t};Jb={},ey={},oy={},ay={};Object.defineProperty(ay,"__esModule",{value:!0}),ay.identity=void 0,ay.identity=function(e){return e};var hy={},Aj=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(hy,"__esModule",{value:!0}),hy.equals=void 0,hy.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=Aj(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 Mj=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]}),xj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Vh=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)&&Mj(t,e,r);return xj(t,e),t},gy=(Object.defineProperty(oy,"__esModule",{value:!0}),oy.object=oy.functional=void 0,oy.functional=Vh(ay),oy.object=Vh(hy),{}),Nj=(Object.defineProperty(gy,"__esModule",{value:!0}),gy.verifyStructSize=gy.Structure=void 0,e),Uj=Nj.error.PROTOCOL_ERROR,Ey=(Object.defineProperty(Dj.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),Dj.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+"])"},Dj);function Dj(e,t){this.signature=e,this.fields=t}gy.Structure=Ey,gy.verifyStructSize=function(e,t,r){if(t!==r)throw(0,Nj.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),Uj)},gy.default=Ey,Object.defineProperty(ey,"__esModule",{value:!0}),ey.Unpacker=ey.Packer=void 0;var Lj=Zl,Fj=oy,Bj=gy,Wj=e,zj=Wj.error.PROTOCOL_ERROR;function qj(e){this._ch=e,this._byteArraysSupported=!0}function Vj(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}qj.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=Fj.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,Wj.int)(o))};if((0,Wj.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 Bj.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))},qj.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,Wj.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},qj.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},qj.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))},qj.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},qj.prototype.packString=function(e){var e=Lj.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,Wj.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)}},qj.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,Wj.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)}},qj.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,Wj.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])},qj.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,Wj.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)}},qj.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,Wj.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)}},qj.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,Wj.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},qj.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},qj.prototype._nonPackableValue=function(e){return function(){throw(0,Wj.newError)(e,zj)}},ey.Packer=qj,Vj.prototype.unpack=function(e,t){void 0===t&&(t=Fj.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,Wj.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,Wj.newError)("Unknown packed value with marker "+r.toString(16))},Vj.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,Wj.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},Vj.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},Vj.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},Vj.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,Wj.int)(e):240<=e&&e<256?(0,Wj.int)(e-256):200===e?(0,Wj.int)(t.readInt8()):201===e?(0,Wj.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,Wj.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new Wj.Integer(e,r)):null},Vj.prototype._unpackString=function(e,t,r,n){return 128===t?Lj.utf8.decode(n,r):208===e?Lj.utf8.decode(n,n.readUInt8()):209===e?Lj.utf8.decode(n,n.readUInt16()):210===e?Lj.utf8.decode(n,n.readUInt32()):null},Vj.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},Vj.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},Vj.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},Vj.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},Vj.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},Vj.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},Vj.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},Vj.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new Bj.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},ey.Unpacker=Vj;var Hj,Gj,Zc={},Yh=r&&r.__extends||(Hj=function(e,t){return(Hj=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}Hj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Kj=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]}),Yj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ny=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)&&Kj(t,e,r);return Yj(t,e),t},Fy=(Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.Unpacker=Zc.Packer=void 0,Ny(ey)),Zy=(Gj=Fy.Packer,Yh(Zj,Gj),Zj.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},Zj);function Zj(){return null!==Gj&&Gj.apply(this,arguments)||this}Zc.Packer=Zy;Qj=Fy.Unpacker,Yh(Xj,Qj);var Qj,Al=Xj;function Xj(e,t){return Qj.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}Zc.Unpacker=Al;var Jj=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]}),$j=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zy=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)&&Jj(t,e,r);return $j(t,e),t},Ml=(Object.defineProperty(Jb,"__esModule",{value:!0}),Jb.structure=Jb.v2=Jb.v1=void 0,zy(ey)),qy=(Jb.v1=Ml,zy(Zc)),Gy=(Jb.v2=qy,zy(gy)),xl=(Jb.structure=Gy,Jb.default=qy,{}),eC=(Object.defineProperty(xl,"__esModule",{value:!0}),xl.SIGNATURES=void 0,e),u_=eC.internal.constants,tC=u_.ACCESS_MODE_READ,rC=u_.FETCH_ALL,nC=eC.internal.util.assertString,c_=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),w=(xl.SIGNATURES=c_,A.init=function(e,t){return new A(1,[e,t],function(){return"INIT ".concat(e," {...}")})},A.run=function(e,t){return new A(16,[e,t],function(){return"RUN ".concat(e," ").concat(eC.json.stringify(t))})},A.pullAll=function(){return uC},A.reset=function(){return aC},A.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 A(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},A.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new A(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},A.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return(t=void 0===t?null:t)&&(t.minimumSeverityLevel&&(n.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(n.notifications_disabled_categories=t.disabledCategories)),r&&(n.routing=r),new A(1,[n],function(){return"HELLO ".concat(eC.json.stringify(n))})},A.logon=function(e){return new A(106,[e],function(){return"LOGON { ... }"})},A.logoff=function(){return new A(107,[],function(){return"LOGOFF"})},A.begin=function(e){var e=void 0===e?{}:e,t=oC(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new A(17,[t],function(){return"BEGIN ".concat(eC.json.stringify(t))})},A.commit=function(){return sC},A.rollback=function(){return cC},A.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=oC(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new A(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(eC.json.stringify(t)," ").concat(eC.json.stringify(n))})},A.goodbye=function(){return lC},A.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=iC(null==t?-1:t,(void 0===e?rC:e)||rC);return new A(63,[r],function(){return"PULL ".concat(eC.json.stringify(r))})},A.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=iC(null==t?-1:t,(void 0===e?rC:e)||rC);return new A(47,[r],function(){return"DISCARD ".concat(eC.json.stringify(r))})},A.route=function(e,t,r){return new A(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(eC.json.stringify(e)," ").concat(eC.json.stringify(t)," ").concat(r)})},A.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 A(102,[e,t,n],function(){return"ROUTE ".concat(eC.json.stringify(e)," ").concat(eC.json.stringify(t)," ").concat(eC.json.stringify(n))})},A);function A(e,t,r){this.signature=e,this.fields=t,this.toString=r}function oC(e,t,r,n,o,i){var u={};return e.isEmpty()||(u.bookmarks=e.values()),null!==t.timeout&&(u.tx_timeout=t.timeout),t.metadata&&(u.tx_metadata=t.metadata),r&&(u.db=nC(r,"database")),o&&(u.imp_user=nC(o,"impersonatedUser")),n===tC&&(u.mode="r"),i&&(i.minimumSeverityLevel&&(u.notifications_minimum_severity=i.minimumSeverityLevel),i.disabledCategories&&(u.notifications_disabled_categories=i.disabledCategories)),u}function iC(e,t){t={n:(0,eC.int)(t)};return-1!==e&&(t.qid=(0,eC.int)(e)),t}var uC=new(xl.default=w)(63,[],function(){return"PULL_ALL"}),aC=new w(15,[],function(){return"RESET"}),sC=new w(18,[],function(){return"COMMIT"}),cC=new w(19,[],function(){return"ROLLBACK"}),lC=new w(2,[],function(){return"GOODBYE"}),d_={},m_={},fC=(Object.defineProperty(m_,"__esModule",{value:!0}),m_.TypeTransformer=void 0,Jb),pC=e.internal.objectUtil;function dC(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 hC(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)}dC.prototype.fromStructure=function(e){try{return e instanceof fC.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return pC.createBrokenObject(e)}},dC.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},m_.default=dC,hC.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new hC({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},m_.TypeTransformer=hC;var bC=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},yC=(Object.defineProperty(d_,"__esModule",{value:!0}),e),_C=Jb,vC=m_,mC=yC.error.PROTOCOL_ERROR;d_.default={createNodeTransformer:function(){return new vC.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof yC.Node},toStructure:function(e){throw(0,yC.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),mC)},fromStructure:function(e){_C.structure.verifyStructSize("Node",3,e.size);var e=bC(e.fields,3),t=e[0],r=e[1],e=e[2];return new yC.Node(t,r,e)}})},createRelationshipTransformer:function(){return new vC.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof yC.Relationship},toStructure:function(e){throw(0,yC.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),mC)},fromStructure:function(e){_C.structure.verifyStructSize("Relationship",5,e.size);var e=bC(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new yC.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new vC.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof yC.UnboundRelationship},toStructure:function(e){throw(0,yC.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),mC)},fromStructure:function(e){_C.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=bC(e.fields,3),t=e[0],r=e[1],e=e[2];return new yC.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new vC.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof yC.Path},toStructure:function(e){throw(0,yC.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),mC)},fromStructure:function(e){_C.structure.verifyStructSize("Path",3,e.size);for(var e=bC(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,yC.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof yC.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof yC.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new yC.PathSegment(i,c,a)),i=a}return new yC.Path(t[0],t[t.length-1],o)}})}};var gC=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]}),OC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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)&&gC(t,e,r);return OC(t,e),t},w_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},wC=(Object.defineProperty(mh,"__esModule",{value:!0}),jh),EC=Jb,PC=o(xl),SC=I,TC=e,jC=w_(d_),CC=w_(m_),IC=TC.internal.bookmarks.Bookmarks,P_=TC.internal.constants,kC=P_.ACCESS_MODE_WRITE,RC=P_.BOLT_PROTOCOL_V1,AC=(TC.internal.logger.Logger,TC.internal.txConfig.TxConfig),C_=(Object.defineProperty(M.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new CC.default(Object.values(jC.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"version",{get:function(){return RC},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),M.prototype.packer=function(){return this._packer},M.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},M.prototype.unpacker=function(){return this._unpacker},M.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},M.prototype.transformMetadata=function(e){return e},M.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new SC.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,wC.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(PC.default.init(r,n),e,!0),e},M.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=(e.flush,new SC.LogoffObserver({onCompleted:t,onError:r})),t=(0,TC.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},M.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 SC.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,TC.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},M.prototype.prepareToClose=function(){},M.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})},M.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:IC.empty(),txConfig:AC.empty(),mode:kC,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},M.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:IC.empty(),txConfig:AC.empty(),mode:kC,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},M.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 SC.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,wC.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,wC.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,wC.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,wC.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(PC.default.run(e,t),a,!1),this.write(PC.default.pullAll(),a,d),a},Object.defineProperty(M.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),M.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,e=e.onComplete,t=new SC.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(PC.default.reset(),t,!0),t},M.prototype._createPacker=function(e){return new EC.v1.Packer(e)},M.prototype._createUnpacker=function(e,t){return new EC.v1.Unpacker(e,t)},M.prototype.write=function(e,t,r){this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature,t=new EC.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},M.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===PC.SIGNATURES.HELLO||this._lastMessageSignature===PC.SIGNATURES.LOGON},M.prototype.isLastMessageReset=function(){return this._lastMessageSignature===PC.SIGNATURES.RESET},M.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},M.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},M.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},M.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},M.prototype.isBroken=function(){return!!this._fatalError},M.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},M.prototype.resetFailure=function(){this._responseHandler._resetFailure()},M.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)},M.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},M);function M(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}}mh.default=C_;var R_={},x_={},i={},MC=(Object.defineProperty(i,"__esModule",{value:!0}),i.epochSecondAndNanoToLocalDateTime=i.nanoOfDayToLocalTime=i.epochDayToDate=void 0,e),L_=MC.internal.temporalUtil,xC=L_.DAYS_0000_TO_1970,NC=L_.DAYS_PER_400_YEAR_CYCLE,UC=L_.NANOS_PER_HOUR,DC=L_.NANOS_PER_MINUTE,LC=L_.NANOS_PER_SECOND,FC=L_.SECONDS_PER_DAY,BC=L_.floorDiv,WC=L_.floorMod;function zC(e){var e=(e=(0,MC.int)(e)).add(xC).subtract(60),t=(0,MC.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(NC).subtract(1)).multiply(400),e=e.add(r.multiply(-NC))),e.multiply(400).add(591).div(NC)),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 MC.Date(r,n,e)}function qC(e){var t=(e=(0,MC.int)(e)).div(UC),r=(e=e.subtract(t.multiply(UC))).div(DC),n=(e=e.subtract(r.multiply(DC))).div(LC),e=e.subtract(n.multiply(LC));return new MC.LocalTime(t,r,n,e)}i.epochDayToDate=zC,i.nanoOfDayToLocalTime=qC,i.epochSecondAndNanoToLocalDateTime=function(e,t){var r=BC(e,FC),e=WC(e,FC).multiply(LC).add(t),t=zC(r),r=qC(e);return new MC.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var VC=r&&r.__assign||function(){return(VC=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)},HC=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},jd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},GC=(Object.defineProperty(x_,"__esModule",{value:!0}),e),KC=Jb,YC=m_,ZC=i,V_=jd(d_),Q_=GC.internal.temporalUtil,QC=Q_.dateToEpochDay,XC=Q_.localDateTimeToEpochSecond,JC=Q_.localTimeToNanoOfDay;function $C(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,GC.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}x_.default=VC(VC({},V_.default),{createPoint2DTransformer:function(){return new YC.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,GC.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new KC.structure.Structure(88,[(0,GC.int)(e.srid),e.x,e.y])},fromStructure:function(e){KC.structure.verifyStructSize("Point2D",3,e.size);var e=HC(e.fields,3),t=e[0],r=e[1],e=e[2];return new GC.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new YC.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,GC.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new KC.structure.Structure(89,[(0,GC.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){KC.structure.verifyStructSize("Point3D",4,e.size);var e=HC(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new GC.Point(t,r,n,e)}})},createDurationTransformer:function(){return new YC.TypeTransformer({signature:69,isTypeInstance:GC.isDuration,toStructure:function(e){var t=(0,GC.int)(e.months),r=(0,GC.int)(e.days),n=(0,GC.int)(e.seconds),e=(0,GC.int)(e.nanoseconds);return new KC.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){KC.structure.verifyStructSize("Duration",4,e.size);var e=HC(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new GC.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new YC.TypeTransformer({signature:116,isTypeInstance:GC.isLocalTime,toStructure:function(e){e=JC(e.hour,e.minute,e.second,e.nanosecond);return new KC.structure.Structure(116,[e])},fromStructure:function(e){KC.structure.verifyStructSize("LocalTime",1,e.size);e=HC(e.fields,1)[0];return $C((0,ZC.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new YC.TypeTransformer({signature:84,isTypeInstance:GC.isTime,toStructure:function(e){var t=JC(e.hour,e.minute,e.second,e.nanosecond),e=(0,GC.int)(e.timeZoneOffsetSeconds);return new KC.structure.Structure(84,[t,e])},fromStructure:function(e){KC.structure.verifyStructSize("Time",2,e.size);var e=HC(e.fields,2),t=e[0],e=e[1],t=(0,ZC.nanoOfDayToLocalTime)(t);return $C(new GC.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new YC.TypeTransformer({signature:68,isTypeInstance:GC.isDate,toStructure:function(e){e=QC(e.year,e.month,e.day);return new KC.structure.Structure(68,[e])},fromStructure:function(e){KC.structure.verifyStructSize("Date",1,e.size);e=HC(e.fields,1)[0];return $C((0,ZC.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new YC.TypeTransformer({signature:100,isTypeInstance:GC.isLocalDateTime,toStructure:function(e){var t=XC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,GC.int)(e.nanosecond);return new KC.structure.Structure(100,[t,e])},fromStructure:function(e){KC.structure.verifyStructSize("LocalDateTime",2,e.size);var e=HC(e.fields,2),t=e[0],e=e[1];return $C((0,ZC.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new YC.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,GC.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=XC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,GC.int)(e.nanosecond),e=e.timeZoneId;return new KC.structure.Structure(102,[t,r,e])},fromStructure:function(e){KC.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=HC(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,ZC.epochSecondAndNanoToLocalDateTime)(t,r);return $C(new GC.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 YC.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,GC.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=XC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,GC.int)(e.nanosecond),e=(0,GC.int)(e.timeZoneOffsetSeconds);return new KC.structure.Structure(70,[t,r,e])},fromStructure:function(e){KC.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=HC(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,ZC.epochSecondAndNanoToLocalDateTime)(t,r);return $C(new GC.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var eI,tI,tv=r&&r.__extends||(eI=function(e,t){return(eI=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}eI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),av=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},v=(Object.defineProperty(R_,"__esModule",{value:!0}),av(mh)),rI=av(Jb),pv=e,nI=av(x_),oI=av(m_),iI=pv.internal.constants.BOLT_PROTOCOL_V2,_v=(tI=v.default,tv(uI,tI),uI.prototype._createPacker=function(e){return new rI.default.Packer(e)},uI.prototype._createUnpacker=function(e,t){return new rI.default.Unpacker(e,t)},Object.defineProperty(uI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new oI.default(Object.values(nI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(uI.prototype,"version",{get:function(){return iI},enumerable:!1,configurable:!0}),uI);function uI(){return null!==tI&&tI.apply(this,arguments)||this}R_.default=_v;var aI,sI,Ov={},Cd={},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)},Cv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Uv=(Object.defineProperty(Cd,"__esModule",{value:!0}),Cv(x_)),Fv=(Cd.default=cI({},Uv.default),r&&r.__extends||(aI=function(e,t){return(aI=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}aI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),lI=r&&r.__assign||function(){return(lI=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)},Hv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Kv=(Object.defineProperty(Ov,"__esModule",{value:!0}),Hv(R_)),fI=Hv(xl),pI=jh,dI=I,hI=Hv(Cd),bI=Hv(m_),yI=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),_I=e.internal.txConfig.TxConfig,vI="context",mI="CALL dbms.cluster.routing.getRoutingTable($".concat(vI,")"),gI=new dI.StreamObserver,Xv=(sI=Kv.default,Fv(OI,sI),Object.defineProperty(OI.prototype,"version",{get:function(){return yI},enumerable:!1,configurable:!0}),Object.defineProperty(OI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new bI.default(Object.values(hI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),OI.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},OI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new dI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,pI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(fI.default.hello(r,n),e,!0),e},OI.prototype.prepareToClose=function(){this.write(fI.default.goodbye(),gI,!0)},OI.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 dI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,pI.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,pI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,pI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(fI.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},OI.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new dI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(fI.default.commit(),t,!0),t},OI.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new dI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(fI.default.rollback(),t,!0),t},OI.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 dI.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,pI.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,pI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,pI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(fI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(fI.default.pullAll(),c,b),c},OI.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(mI,((t={})[vI]=void 0===r?{}:r,t),lI(lI({},n),{txConfig:_I.empty()}));return new dI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},OI);function OI(){return null!==sI&&sI.apply(this,arguments)||this}Ov.default=Xv;var wI,EI,rm={},im={},PI=r&&r.__assign||function(){return(PI=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)},qs=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cm=(Object.defineProperty(im,"__esModule",{value:!0}),qs(Cd)),lm=(im.default=PI({},cm.default),r&&r.__extends||(wI=function(e,t){return(wI=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}wI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),SI=r&&r.__assign||function(){return(SI=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)},ym=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mm=(Object.defineProperty(rm,"__esModule",{value:!0}),ym(Ov)),TI=ym(xl),jI=jh,CI=I,II=ym(im),kI=ym(m_),Bh=(e.internal.bookmarks.Bookmarks,e.internal.constants),RI=Bh.BOLT_PROTOCOL_V4_0,AI=Bh.FETCH_ALL,MI=e.internal.txConfig.TxConfig,xI="context",NI="database",UI="CALL dbms.routing.getRoutingTable($".concat(xI,", $").concat(NI,")"),Py=(EI=mm.default,lm(DI,EI),Object.defineProperty(DI.prototype,"version",{get:function(){return RI},enumerable:!1,configurable:!0}),Object.defineProperty(DI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new kI.default(Object.values(II.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),DI.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 CI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,jI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,jI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(TI.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},DI.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===_?AI:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new CI.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,jI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,jI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(TI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(TI.default.pull({n:_}),c,b),c},DI.prototype._requestMore=function(e,t,r){this.write(TI.default.pull({stmtId:e,n:t}),r,!0)},DI.prototype._requestDiscard=function(e,t){this.write(TI.default.discard({stmtId:e}),t,!0)},DI.prototype._noOp=function(){},DI.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(UI,((t={})[xI]=void 0===r?{}:r,t[NI]=n,t),SI(SI({},o),{txConfig:MI.empty()}));return new CI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},DI);function DI(){return null!==EI&&EI.apply(this,arguments)||this}rm.default=Py;var LI,FI,wm={},jm={},BI=r&&r.__assign||function(){return(BI=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)},km=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},g=(Object.defineProperty(jm,"__esModule",{value:!0}),km(im)),Fm=(jm.default=BI({},g.default),r&&r.__extends||(LI=function(e,t){return(LI=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}LI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),wb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qm=(Object.defineProperty(wm,"__esModule",{value:!0}),wb(rm)),WI=wb(xl),zI=I,ds=e,qI=jh,VI=wb(jm),HI=wb(m_),GI=ds.internal.constants.BOLT_PROTOCOL_V4_1,Ym=(FI=qm.default,Fm(KI,FI),Object.defineProperty(KI.prototype,"version",{get:function(){return GI},enumerable:!1,configurable:!0}),Object.defineProperty(KI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new HI.default(Object.values(VI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),KI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new zI.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(WI.default.hello(r,n,this._serversideRouting),e,!0),e},KI);function KI(e,t,r,n,o,i,u){e=FI.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}wm.default=Ym;var YI,ZI,Js={},Td={},QI=r&&r.__assign||function(){return(QI=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}},i0=(Object.defineProperty(Td,"__esModule",{value:!0}),t(jm)),l0=(Td.default=QI({},i0.default),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)})),Fs=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ft=(Object.defineProperty(Js,"__esModule",{value:!0}),Fs(wm)),R0=e,XI=Fs(Td),JI=Fs(m_),$I=R0.internal.constants.BOLT_PROTOCOL_V4_2,T=(ZI=Ft.default,l0(ek,ZI),Object.defineProperty(ek.prototype,"version",{get:function(){return $I},enumerable:!1,configurable:!0}),Object.defineProperty(ek.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new JI.default(Object.values(XI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),ek);function ek(){return null!==ZI&&ZI.apply(this,arguments)||this}Js.default=T;var P={},j={},tk=r&&r.__assign||function(){return(tk=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)},c=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},f=(Object.defineProperty(j,"__esModule",{value:!0}),c(Td)),p=(j.default=tk({},f.default),{}),vr={},rk=r&&r.__assign||function(){return(rk=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)},a=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},pa=(Object.defineProperty(vr,"__esModule",{value:!0}),a(j)),nk=(vr.default=rk({},pa.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}),Bu=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ok=(Object.defineProperty(p,"__esModule",{value:!0}),Jb),ik=e,uk=Bu(vr),ak=i,sk=ay,ck=ik.internal.temporalUtil.localDateTimeToEpochSecond;function lk(e,t,r){e=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),r=(0,ik.int)(t).multiply(1e3).add((0,ik.int)(r).div(1e6)).toNumber(),e=e.formatToParts(r).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:sk.identity:"literal"!==t.type&&(e[t.type]=(0,ik.int)(t.value)),e},{}),e.year=e.adjustEra(e.year),r=ck(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond);return e.timeZoneOffsetSeconds=r.subtract(t),e.hour=e.hour.modulo(24),e}function fk(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,ik.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}p.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return uk.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){ok.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=nk(e.fields,3),t=e[0],r=e[1],e=e[2],t=lk(e,t,r);return fk(new ik.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,ik.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=ck(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=lk(r,i,o),n=ck(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=lk(r,i,o),ck(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,ik.int)(e.nanosecond),i=e.timeZoneId;return new ok.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return uk.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=ck(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,ik.int)(e.nanosecond),e=(0,ik.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new ok.structure.Structure(73,[t,r,e])},fromStructure:function(e){ok.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=nk(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,ik.int)(t).add(e),t=(0,ak.epochSecondAndNanoToLocalDateTime)(t,r);return fk(new ik.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var pk,dk,Ta=r&&r.__extends||(pk=function(e,t){return(pk=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}pk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),hk=r&&r.__assign||function(){return(hk=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)},wa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},m=(Object.defineProperty(P,"__esModule",{value:!0}),wa(Js)),bk=wa(xl),yk=I,_k=jh,vk=wa(j),mk=wa(p),gk=wa(m_),Ok=e.internal.bookmarks.Bookmarks,wk=e.internal.constants.BOLT_PROTOCOL_V4_3,Wu=(dk=m.default,Ta(Ek,dk),Object.defineProperty(Ek.prototype,"version",{get:function(){return wk},enumerable:!1,configurable:!0}),Object.defineProperty(Ek.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new gk.default(Object.values(vk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Ek.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 yk.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||Ok.empty();return this.write(bk.default.route(t,e.values(),r),o,!0),o},Ek.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new yk.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,_k.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(bk.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},Ek.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},Ek.prototype._applyUtcPatch=function(){var t=this;this._transformer=new gk.default(Object.values(hk(hk({},vk.default),mk.default)).map(function(e){return e(t._config,t._log)}))},Ek);function Ek(){return null!==dk&&dk.apply(this,arguments)||this}P.default=Wu;var Pk,Sk,Yu={},Wr=r&&r.__extends||(Pk=function(e,t){return(Pk=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}Pk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Tk=r&&r.__assign||function(){return(Tk=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)},Nr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},as=(Object.defineProperty(Yu,"__esModule",{value:!0}),Nr(P)),ac=e,jk=Nr(xl),Ck=I,Ik=jh,kk=Nr(vr),Rk=Nr(p),Ak=Nr(m_),Q=ac.internal.constants,Mk=Q.BOLT_PROTOCOL_V4_4,xk=Q.FETCH_ALL,Nk=ac.internal.bookmarks.Bookmarks,es=(Sk=as.default,Wr(Uk,Sk),Object.defineProperty(Uk.prototype,"version",{get:function(){return Mk},enumerable:!1,configurable:!0}),Object.defineProperty(Uk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Ak.default(Object.values(kk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Uk.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 Ck.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||Nk.empty();return this.write(jk.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},Uk.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===_?xk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new Ck.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,Ik.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(jk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(jk.default.pull({n:_}),c,b),c},Uk.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 Ck.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,Ik.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(jk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},Uk.prototype._applyUtcPatch=function(){var t=this;this._transformer=new Ak.default(Object.values(Tk(Tk({},kk.default),Rk.default)).map(function(e){return e(t._config,t._log)}))},Uk);function Uk(){return null!==Sk&&Sk.apply(this,arguments)||this}Yu.default=es;var Ys={},rs={},Dk=r&&r.__assign||function(){return(Dk=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)},Lk=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},ss=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fk=(Object.defineProperty(rs,"__esModule",{value:!0}),Jb),Bk=e,Wk=ss(vr),_=ss(p);rs.default=Dk(Dk(Dk({},Wk.default),_.default),{createNodeTransformer:function(e){return Wk.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){Fk.structure.verifyStructSize("Node",4,e.size);var e=Lk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new Bk.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return Wk.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){Fk.structure.verifyStructSize("Relationship",8,e.size);var e=Lk(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 Bk.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return Wk.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){Fk.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=Lk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new Bk.UnboundRelationship(t,r,n,e)}})}});var zk,qk,is=r&&r.__extends||(zk=function(e,t){return(zk=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}zk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),fl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vl=(Object.defineProperty(Ys,"__esModule",{value:!0}),fl(Yu)),Vk=jh,Hk=fl(rs),Gk=fl(m_),Kk=fl(xl),Yk=I,Zk=e.internal.constants.BOLT_PROTOCOL_V5_0,$a=(qk=vl.default,is(Qk,qk),Object.defineProperty(Qk.prototype,"version",{get:function(){return Zk},enumerable:!1,configurable:!0}),Object.defineProperty(Qk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Gk.default(Object.values(Hk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Qk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new Yk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,Vk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(Kk.default.hello(r,n,this._serversideRouting),e,!0),e},Qk);function Qk(){return null!==qk&&qk.apply(this,arguments)||this}Ys.default=$a;var Xk,Jk,ec={},h={},$k=r&&r.__assign||function(){return($k=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)},Kf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},tp=(Object.defineProperty(h,"__esModule",{value:!0}),Kf(rs)),np=(h.default=$k({},tp.default),r&&r.__extends||(Xk=function(e,t){return(Xk=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}Xk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),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)},_p=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ja=(Object.defineProperty(ec,"__esModule",{value:!0}),_p(Ys)),tR=jh,rR=_p(h),nR=_p(m_),oR=_p(xl),iR=I,uR=e.internal.constants.BOLT_PROTOCOL_V5_1,fp=(Jk=Ja.default,np(aR,Jk),Object.defineProperty(aR.prototype,"version",{get:function(){return uR},enumerable:!1,configurable:!0}),Object.defineProperty(aR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new nR.default(Object.values(rR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(aR.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),aR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new iR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,tR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(oR.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(eR(eR({},e),a.metadata))},onError:i,flush:!0})},aR.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 iR.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(oR.default.logon(r),i,e),i},aR.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new iR.LogoffObserver({onCompleted:t,onError:r});return this.write(oR.default.logoff(),t,e),t},aR);function aR(){return null!==Jk&&Jk.apply(this,arguments)||this}ec.default=fp;var sR,cR,Mf={},gp={},lR=r&&r.__assign||function(){return(lR=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)},Xa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fu=(Object.defineProperty(gp,"__esModule",{value:!0}),Xa(h)),Gf=(gp.default=lR({},Fu.default),r&&r.__extends||(sR=function(e,t){return(sR=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}sR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),fR=r&&r.__assign||function(){return(fR=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)},nf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},O=(Object.defineProperty(Mf,"__esModule",{value:!0}),nf(ec)),pR=nf(gp),dR=nf(m_),hR=nf(xl),bR=I,Pp=e.internal.constants,yR=Pp.BOLT_PROTOCOL_V5_2,_R=Pp.FETCH_ALL,Mp=(cR=O.default,Gf(vR,cR),Object.defineProperty(vR.prototype,"version",{get:function(){return yR},enumerable:!1,configurable:!0}),Object.defineProperty(vR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new dR.default(Object.values(pR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(vR.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),vR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new bR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write(hR.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(fR(fR({},e),a.metadata))},onError:i,flush:!0})},vR.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 bR.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(hR.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},vR.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===_?_R:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new bR.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(hR.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(hR.default.pull({n:_}),c,b),c},vR);function vR(){return null!==cR&&cR.apply(this,arguments)||this}Mf.default=Mp;var S={},mR=(Object.defineProperty(S,"__esModule",{value:!0}),e);function gR(){}function OR(e){return e}var wR={onNext:gR,onCompleted:gR,onError:gR};function ER(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.log,e=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=t||OR,this._observer=Object.assign({onPendingObserversChange:gR,onError:gR,onFailure:gR,onErrorApplyTransformation:OR},e)}Object.defineProperty(ER.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),ER.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(mR.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(mR.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(mR.json.stringify(e)));try{var n=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}(t.code),o=(0,mR.newError)(t.message,n);this._currentFailure=this._observer.onErrorApplyTransformation(o),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(mR.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,mR.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,mR.newError)("Unknown Bolt protocol message: "+e))}},ER.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onPendingObserversChange(this._pendingObservers.length)},ER.prototype._queueObserver=function(e){return(e=e||wR).onCompleted=e.onCompleted||gR,e.onError=e.onError||gR,e.onNext=e.onNext||gR,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onPendingObserversChange(this._pendingObservers.length),!0},ER.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)}},ER.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},ER.prototype._resetFailure=function(){this._currentFailure=null},S.default=ER;var PR,Yf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},SR=(Object.defineProperty(vh,"__esModule",{value:!0}),e),TR=Yf(mh),jR=Yf(R_),CR=Yf(Ov),IR=Yf(rm),kR=Yf(wm),RR=Yf(Js),AR=Yf(P),MR=Yf(Yu),xR=Yf(Ys),NR=Yf(ec),UR=Yf(Mf),DR=Yf(S);vh.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 DR.default({transformMetadata:t.transformMetadata.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 TR.default(p,d,h,y,v,_);case 2:return new jR.default(p,d,h,y,v,_);case 3:return new CR.default(p,d,h,y,v,_);case 4:return new IR.default(p,d,h,y,v,_);case 4.1:return new kR.default(p,d,h,y,v,_,b);case 4.2:return new RR.default(p,d,h,y,v,_,b);case 4.3:return new AR.default(p,d,h,y,v,_,b);case 4.4:return new MR.default(p,d,h,y,v,_,b);case 5:return new xR.default(p,d,h,y,v,_,b);case 5.1:return new NR.default(p,d,h,y,v,_,b);case 5.2:return new UR.default(p,d,h,y,v,_,b);default:throw(0,SR.newError)("Unknown Bolt protocol version: "+f)}},xp=u,PR=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]}),Ha=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||PR(t,e,r)},zp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(xp,"__esModule",{value:!0}),xp.RawRoutingTable=xp.BoltProtocol=void 0,op=zp(kl),Kp=zp(vh),Lp=zp(P),zp=zp(Nh),Ha(I,xp),xp.BoltProtocol=Lp.default,xp.RawRoutingTable=zp.default,xp.default={handshake:op.default,create:Kp.default};Jp={},bd={},Object.defineProperty(bd,"__esModule",{value:!0}),bd.DEFAULT_ACQUISITION_TIMEOUT=bd.DEFAULT_MAX_SIZE=void 0,bd.DEFAULT_MAX_SIZE=100,bd.DEFAULT_ACQUISITION_TIMEOUT=6e4,LR.defaultConfig=function(){return new LR(100,6e4)},LR.fromDriverConfig=function(e){return new LR(BR(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,BR(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},Pd=LR;function LR(e,t){this.maxSize=FR(e,100),this.acquisitionTimeout=FR(t,6e4)}function FR(e,t){return 0===e||e?e:t}function BR(e){return 0===e||e}bd.default=Pd;var gd={},WR=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())})},zR=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}}}},sh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qR=(Object.defineProperty(gd,"__esModule",{value:!0}),sh(bd)),VR=e,HR=VR.internal.logger.Logger,Rl=(GR.prototype.acquire=function(o,i,u){var a=this,s=i.asKey(),c=this._acquireRequests;return c[s]||(c[s]=[]),new Promise(function(e,t){var r=null,n=setTimeout(function(){var e,t=c[s];t&&(c[s]=t.filter(function(e){return e!==r})),r.isCompleted()||(t=a.activeResourceCount(i),e=a.has(i)?a._pools[s].length:0,r.reject((0,VR.newError)("Connection acquisition timed out in ".concat(a._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},a._acquisitionTimeout),r=new YR(s,o,u,e,t,n,a._log);c[s].push(r),a._processPendingAcquireRequests(i)})},GR.prototype.purge=function(e){return this._purgeKey(e.asKey())},GR.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},GR.prototype.close=function(){return WR(this,void 0,void 0,function(){var t=this;return zR(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(e){return t._purgeKey(e)}))];case 1:return[2,e.sent()]}})})},GR.prototype.keepAll=function(e){var t=this,r=e.map(function(e){return e.asKey()}),e=Object.keys(this._pools).filter(function(e){return-1===r.indexOf(e)});return Promise.all(e.map(function(e){return t._purgeKey(e)}))},GR.prototype.has=function(e){return e.asKey()in this._pools},GR.prototype.activeResourceCount=function(e){return this._activeResourceCounts[e.asKey()]||0},GR.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return t||(t=new $R,this._pools[e]=t,this._pendingCreates[e]=0),t},GR.prototype._acquire=function(a,s,c){return WR(this,void 0,void 0,function(){var t,r,n,o,i,u=this;return zR(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,VR.newError)("Pool is closed, it is no more able to serve requests.");if(t=s.asKey(),r=this._getOrInitializePoolFor(t),c)return[3,6];e.label=1;case 1:return r.length?(n=r.pop(),this._removeIdleObserver&&this._removeIdleObserver(n),[4,this._validateOnAcquire(a,n)]):[3,6];case 2:return e.sent()?(KR(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(n," acquired from the pool ").concat(t)),[2,{resource:n,pool:r}]):[3,3];case 3:return r.removeInUse(n),[4,this._destroy(n)];case 4:e.sent(),e.label=5;case 5:return[3,1];case 6:if(0<this._maxSize&&this.activeResourceCount(s)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:r}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=7;case 7:return(e.trys.push([7,,11,12]),this.activeResourceCount(s)+r.length>=this._maxSize&&c)?(i=r.pop(),this._removeIdleObserver&&this._removeIdleObserver(i),r.removeInUse(i),[4,this._destroy(i)]):[3,9];case 8:e.sent(),e.label=9;case 9:return[4,this._create(a,s,function(e,t){return u._release(e,t,r)})];case 10:return o=e.sent(),r.pushInUse(o),KR(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(o," created for the pool ").concat(t)),[3,12];case 11:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 12:return[2,{resource:o,pool:r}]}})})},GR.prototype._release=function(u,a,s){return WR(this,void 0,void 0,function(){var o,i=this;return zR(this,function(e){switch(e.label){case 0:return(o=u.asKey(),s.isActive())?[4,this._validateOnRelease(a)]:[3,5];case 1:return e.sent()?[3,3]:(this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because it is not functional")),s.removeInUse(a),[4,this._destroy(a)]);case 2:return e.sent(),[3,4];case 3:this._installIdleObserver&&this._installIdleObserver(a,{onError:function(e){i._log.debug("Idle connection ".concat(a," destroyed because of error: ").concat(e));e=i._pools[o];e&&(i._pools[o]=e.filter(function(e){return e!==a}),e.removeInUse(a)),i._destroy(a).catch(function(){})}}),s.push(a),this._log.isDebugEnabled()&&this._log.debug("".concat(a," released to the pool ").concat(o)),e.label=4;case 4:return[3,7];case 5:return this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because pool has been purged")),s.removeInUse(a),[4,this._destroy(a)];case 6:e.sent(),e.label=7;case 7:return t=o,r=this._activeResourceCounts,0<(n=(r[t]||0)-1)?r[t]=n:delete r[t],this._processPendingAcquireRequests(u),[2]}var t,r,n})})},GR.prototype._purgeKey=function(o){return WR(this,void 0,void 0,function(){var t,r,n;return zR(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],!t)return[3,2];for(;t.length;)n=t.pop(),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]}})})},GR.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];e&&((n=e.shift())?this._acquire(n.context,r,n.requireNew).catch(function(e){return n.reject(e),{resource:null}}).then(function(e){var t=e.resource,e=e.pool;t?n.isCompleted()?o._release(r,t,e):n.resolve(t):n.isCompleted()||(o._acquireRequests[i]||(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}):delete this._acquireRequests[i])},GR);function GR(e){var e=void 0===e?{}:e,t=e.create,t=void 0===t?function(e,t,r){return Promise.resolve()}:t,r=e.destroy,r=void 0===r?function(e){return Promise.resolve()}: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?HR.noOp():e;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 KR(e,t){var r=t[e]||0;t[e]=r+1}Object.defineProperty(ZR.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(ZR.prototype,"requireNew",{get:function(){return this._config.requireNew||!1},enumerable:!1,configurable:!0}),ZR.prototype.isCompleted=function(){return this._completed},ZR.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))},ZR.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var YR=ZR;function ZR(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=r||{}}eA.prototype.isActive=function(){return this._active},eA.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},eA.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},eA.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(eA.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),eA.prototype.pop=function(){var e=this._elements.pop();return this._elementsInUse.add(e),e},eA.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},eA.prototype.pushInUse=function(e){this._elementsInUse.add(e)},eA.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var QR,XR,JR,$R=eA;function eA(){this._active=!0,this._elements=[],this._elementsInUse=new Set}gd.default=Rl,zd=Jp,QR=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]}),XR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Yc=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)&&QR(t,e,r);return XR(t,e),t},dl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(zd,"__esModule",{value:!0}),zd.DEFAULT_MAX_SIZE=zd.DEFAULT_ACQUISITION_TIMEOUT=zd.PoolConfig=zd.Pool=void 0,JR=Yc(bd),zd.PoolConfig=JR.default,Object.defineProperty(zd,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return JR.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(zd,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return JR.DEFAULT_MAX_SIZE}}),Yc=dl(gd),zd.Pool=Yc.default,zd.default=Yc.default;var tA,qd={},Ql={},ah=r&&r.__extends||(tA=function(e,t){return(tA=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}tA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Ql,"__esModule",{value:!0});ah(nA,rA=e.ConnectionProvider),nA.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 rA,C=nA;function nA(e){var t=rA.call(this)||this;return t._connection=e,t}Ql.default=C;ad={},Qa={},Sd={};function oA(e){this._errorHandler=e}Object.defineProperty(Sd,"__esModule",{value:!0}),Object.defineProperty(oA.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),oA.prototype.isOpen=function(){throw new Error("not implemented")},oA.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(oA.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),oA.prototype.connect=function(e,t){throw new Error("not implemented")},oA.prototype.write=function(e,t,r){throw new Error("not implemented")},oA.prototype.resetAndFlush=function(){throw new Error("not implemented")},oA.prototype.hasOngoingObservableRequests=function(){throw new Error("not implemented")},oA.prototype.close=function(){throw new Error("not implemented")},oA.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e},Sd.default=oA;var iA,oh={},Fh=r&&r.__extends||(iA=function(e,t){return(iA=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}iA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),uA=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())})},aA=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}}}},Lh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sA=(Object.defineProperty(oh,"__esModule",{value:!0}),oh.createChannelConnection=void 0,Zl),cA=e,ib=Lh(Sd),lA=Lh(u),fA=cA.error.PROTOCOL_ERROR,pA=cA.internal.logger.Logger,dA=0;oh.createChannelConnection=function(i,u,a,s,c,e){void 0===c&&(c=null);var l=(e=void 0===e?function(e){return new sA.Channel(e)}:e)(new sA.ChannelConfig(i,u,a.errorCode()));return lA.default.handshake(l).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new sA.Chunker(l),o=new sA.Dechunker,t=new bA(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return lA.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:{onPendingObserversChange: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)}}})});return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};hA=ib.default,Fh(yA,hA),Object.defineProperty(yA.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(yA.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(yA.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(yA.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),yA.prototype.connect=function(t,n,o){return uA(this,void 0,void 0,function(){var r=this;return aA(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,cA.newError)("Connection does not support re-auth");return this._authToken=n,this._protocol.initialized?[3,2]:[4,this._initialize(t,n)];case 1:return[2,e.sent()];case 2:return o?[4,new Promise(function(e,t){r._protocol.logoff({onError:t}),r._protocol.logon({authToken:n,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:n,flush:!0}),[2,this]}})})},yA.prototype._initialize=function(e,n){var o=this,i=this;return new Promise(function(r,t){o._protocol.initialize({userAgent:e,authToken:n,notificationFilter:o._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,o.version&&!t||(o.version=t),t=e.connection_id,o.databaseId||(o.databaseId=t),e.hints&&null!=(t=e.hints["connection.recv_timeout_seconds"])&&(e=(0,cA.toNumber)(t),Number.isInteger(e)&&0<e?o._ch.setupReceiveTimeout(1e3*e):o._log.info("Server located at ".concat(o._address," supplied an invalid connection receive timeout value (").concat(e,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue."))),r(i)}})})},yA.prototype.protocol=function(){return this._protocol},Object.defineProperty(yA.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(yA.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(yA.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(yA.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),yA.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(cA.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},yA.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},yA.prototype.hasOngoingObservableRequests=function(){return this._protocol.hasOngoingObservableRequests()},yA.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: "+e),t(e))},onComplete:function(){e()}})})},yA.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},yA.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()})}}))},yA.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},yA.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},yA.prototype._handleOngoingRequestsNumberChange=function(e){0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout()},yA.prototype.close=function(){return uA(this,void 0,void 0,function(){return aA(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]}})})},yA.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},yA.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,cA.newError)(e,fA);return this._handleFatalError(e),e};var hA,bA=yA;function yA(e,t,r,n,o,i,u,a,s){void 0===o&&(o=!1),void 0===i&&(i=null);var c,l,t=hA.call(this,t)||this;return t._authToken=null,t._reseting=!1,t._resetObservers=[],t._id=dA++,t._address=r,t._server={address:r.asHostPort()},t.creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(c=t,new pA((l=n)._level,function(e,t){return l._loggerFunction(e,"".concat(c," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}oh.default=bA;var _A,vA,hb={},Ab=r&&r.__extends||(_A=function(e,t){return(_A=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}_A(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Db=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Bb=(Object.defineProperty(hb,"__esModule",{value:!0}),Db(Sd)),Wb=(vA=Bb.default,Ab(mA,vA),Object.defineProperty(mA.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(mA.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(mA.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(mA.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(mA.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(mA.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(mA.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),mA.prototype.isOpen=function(){return this._delegate.isOpen()},mA.prototype.protocol=function(){return this._delegate.protocol()},mA.prototype.connect=function(e,t,r){return this._delegate.connect(e,t,r)},mA.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},mA.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},mA.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},mA.prototype.close=function(){return this._delegate.close()},mA.prototype._release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate._release()},mA);function mA(e,t){var r=vA.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}hb.default=Wb;Ob={};Object.defineProperty(Ob,"__esModule",{value:!0});var gA,OA,wA,EA=e.error.SERVICE_UNAVAILABLE,PA=e.error.SESSION_EXPIRED;function SA(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||TA,this._handleWriteFailure=r||TA,this._handleAuthorizationExpired=n||TA}function TA(e){return e}SA.create=function(e){return new SA(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleAuthorizationExpired)},SA.prototype.errorCode=function(){return this._errorCode},SA.prototype.handleAndTransformError=function(e,t,r){return!(n=e)||"Neo.ClientError.Security.AuthorizationExpired"!==n.code&&"Neo.ClientError.Security.TokenExpired"!==n.code?function(e){if(e)return e.code===PA||e.code===EA||"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:this._handleAuthorizationExpired(e,t,r);var n},Ob.default=SA,zb=Qa,gA=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]}),OA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zb=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)&&gA(t,e,r);return OA(t,e),t},cb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(zb,"__esModule",{value:!0}),zb.createChannelConnection=zb.ConnectionErrorHandler=zb.DelegateConnection=zb.ChannelConnection=zb.Connection=void 0,mb=cb(Sd),zb.Connection=mb.default,wA=Zb(oh),zb.ChannelConnection=wA.default,Object.defineProperty(zb,"createChannelConnection",{enumerable:!0,get:function(){return wA.createChannelConnection}}),Zb=cb(hb),zb.DelegateConnection=Zb.default,Zb=cb(Ob),zb.ConnectionErrorHandler=Zb.default,zb.default=mb.default;var ip={},jA=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())})},CA=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}}}},IA=(Object.defineProperty(ip,"__esModule",{value:!0}),e),kA=oy;function RA(e){var t=e.authTokenManager,e=e.userAgent;this._authTokenManager=t||(0,IA.expirationBasedAuthTokenManager)({tokenProvider:function(){}}),this._userAgent=e}RA.prototype.authenticate=function(e){var r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return jA(this,void 0,void 0,function(){var t;return CA(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!kA.object.equals(r.authToken,n)&&!0!==o||!0===u),null==r.authToken||t?[4,r.connect(this._userAgent,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(),kA.object.equals(t,r.authToken)?[3,6]:[4,r.connect(this._userAgent,t)];case 5:return[2,e.sent()];case 6:return[2,r]}})})},RA.prototype.handleError=function(e){var t=e.connection,e=e.code;t&&["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"].includes(e)&&this._authTokenManager.onTokenExpired(t.authToken)},ip.default=RA;var AA,MA,Vh=r&&r.__extends||(AA=function(e,t){return(AA=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}AA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),xA=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]}),NA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),hy=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)&&xA(t,e,r);return NA(t,e),t},UA=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())})},DA=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}}}},LA=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},FA=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))},Ey=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},BA=(Object.defineProperty(ad,"__esModule",{value:!0}),Qa),WA=hy(Jp),zA=e,qA=Ey(ip),VA=oy,HA=zA.error.SERVICE_UNAVAILABLE,GA=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],Ny=(MA=zA.ConnectionProvider,Vh(KA,MA),KA.prototype._createConnectionErrorHandler=function(){return new BA.ConnectionErrorHandler(HA)},KA.prototype._createConnection=function(e,r,n){var o=this,i=e.auth;return this._createChannelConnection(r).then(function(t){return t._release=function(){return n(r,t)},o._openConnections[t.id]=t,o._authenticationProvider.authenticate({connection:t,auth:i}).catch(function(e){throw o._destroyConnection(t),e})})},KA.prototype._validateConnectionOnAcquire=function(e,r){var n=e.auth,o=e.skipReAuth;return UA(this,void 0,void 0,function(){var t;return DA(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._authenticationProvider.authenticate({connection:r,auth:n,skipReAuth:o})];case 2:return e.sent(),[2,!0];case 3: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 4:return[2]}})})},KA.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},KA.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},KA.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},KA.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return UA(this,void 0,void 0,function(){var t,r;return DA(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new zA.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]}})})},KA.prototype._verifyAuthentication=function(e){var u=e.getAddress,a=e.auth;return UA(this,void 0,void 0,function(){var t,r,n,o,i;return DA(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,zA.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(),GA.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]}})})},KA.prototype._verifyStickyConnection=function(e){var n=e.auth,o=e.connection;return e.address,UA(this,void 0,void 0,function(){var t,r;return DA(this,function(e){switch(e.label){case 0:return(t=VA.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,zA.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},KA.prototype.close=function(){return UA(this,void 0,void 0,function(){return DA(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]}})})},KA._installIdleObserverOnConnection=function(e,t){e._queueObserver(t)},KA._removeIdleObserverOnConnection=function(e){e._updateCurrentObserver()},KA.prototype._handleAuthorizationExpired=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code}),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),"Neo.ClientError.Security.TokenExpired"!==e.code||(0,zA.isStaticAuthTokenManger)(this._authTokenManager)||(e.retriable=!0),e},KA);function KA(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,u=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(WA.default.bind.apply(WA.default,FA([void 0],LA(e),!1)))}:e,a=(void 0===t&&(t=null),MA.call(this)||this);return a._id=r,a._config=n,a._log=o,a._authTokenManager=u,a._authenticationProvider=new qA.default({authTokenManager:u,userAgent:i}),a._createChannelConnection=t||function(e){return(0,BA.createChannelConnection)(e,a._config,a._createConnectionErrorHandler(),a._log)},a._connectionPool=e({create:a._createConnection.bind(a),destroy:a._destroyConnection.bind(a),validateOnAcquire:a._validateConnectionOnAcquire.bind(a),validateOnRelease:a._validateConnectionOnRelease.bind(a),installIdleObserver:KA._installIdleObserverOnConnection.bind(a),removeIdleObserver:KA._removeIdleObserverOnConnection.bind(a),config:WA.PoolConfig.fromDriverConfig(n),log:a._log}),a._userAgent=i,a._openConnections={},a}ad.default=Ny;var YA,ZA,Zy={},Fy=r&&r.__extends||(YA=function(e,t){return(YA=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}YA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),QA=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())})},XA=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}}}},Yh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Al=(Object.defineProperty(Zy,"__esModule",{value:!0}),Yh(ad)),JA=Qa,ey=e.internal.constants,$A=ey.BOLT_PROTOCOL_V3,eM=ey.BOLT_PROTOCOL_V4_0,tM=ey.BOLT_PROTOCOL_V4_4,rM=ey.BOLT_PROTOCOL_V5_1,nM=e.error.SERVICE_UNAVAILABLE,Ml=(ZA=Al.default,Fy(oM,ZA),oM.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return QA(this,void 0,void 0,function(){var t,r,n=this;return XA(this,function(e){switch(e.label){case 0:return t=JA.ConnectionErrorHandler.create({errorCode:nM,handleAuthorizationExpired:function(e,t,r){return n._handleAuthorizationExpired(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 JA.DelegateConnection(r,t)]}})})},oM.prototype._handleAuthorizationExpired=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,"'")),ZA.prototype._handleAuthorizationExpired.call(this,e,t,r)},oM.prototype._hasProtocolVersion=function(n){return QA(this,void 0,void 0,function(){var t,r;return XA(this,function(e){switch(e.label){case 0:return[4,(0,JA.createChannelConnection)(this._address,this._config,this._createConnectionErrorHandler(),this._log)];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]}})})},oM.prototype.supportsMultiDb=function(){return QA(this,void 0,void 0,function(){return XA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return eM<=e})];case 1:return[2,e.sent()]}})})},oM.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},oM.prototype.supportsTransactionConfig=function(){return QA(this,void 0,void 0,function(){return XA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return $A<=e})];case 1:return[2,e.sent()]}})})},oM.prototype.supportsUserImpersonation=function(){return QA(this,void 0,void 0,function(){return XA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return tM<=e})];case 1:return[2,e.sent()]}})})},oM.prototype.supportsSessionAuth=function(){return QA(this,void 0,void 0,function(){return XA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return rM<=e})];case 1:return[2,e.sent()]}})})},oM.prototype.verifyAuthentication=function(e){var r=e.auth;return QA(this,void 0,void 0,function(){var t=this;return XA(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},oM.prototype.verifyConnectivityAndGetServerInfo=function(){return QA(this,void 0,void 0,function(){return XA(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},oM);function oM(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,u=e.authTokenManager,e=e.newPool,t=ZA.call(this,{id:t,config:r,log:n,userAgent:i,authTokenManager:u,newPool:e})||this;return t._address=o,t}Zy.default=Ml;var Zc={},zy={},gy={},Gy={},iM=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},uM=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))},aM=(Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.createValidRoutingTable=void 0,e),qy=aM.internal.constants,sM=qy.ACCESS_MODE_WRITE,cM=qy.ACCESS_MODE_READ,lM=aM.internal.serverAddress.ServerAddress,fM=aM.error.PROTOCOL_ERROR,pM=(dM.fromRawRoutingTable=bM,dM.prototype.forget=function(e){this.readers=hM(this.readers,e),this.writers=hM(this.writers,e)},dM.prototype.forgetRouter=function(e){this.routers=hM(this.routers,e)},dM.prototype.forgetWriter=function(e){this.writers=hM(this.writers,e)},dM.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===cM&&0===this.readers.length||e===sM&&0===this.writers.length},dM.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},dM.prototype.allServers=function(){return uM(uM(uM([],iM(this.routers),!1),iM(this.readers),!1),iM(this.writers),!1)},dM.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,"]]")},dM);function dM(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,aM.int)(0),this.ttl=e}function hM(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function bM(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,aM.int)(Date.now()),n=(0,aM.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?aM.Integer.MAX_VALUE:n}catch(e){throw(0,aM.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(aM.json.stringify(t),"\nError message: ").concat(e.message),fM)}}(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=_M(e).map(function(e){return lM.fromUrl(e)}):"WRITE"===t?i=_M(e).map(function(e){return lM.fromUrl(e)}):"READ"===t&&(o=_M(e).map(function(e){return lM.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,aM.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(aM.json.stringify(t.servers),"\nError message: ").concat(e.message),fM)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return yM(u,"routers",t),yM(a,"readers",t),new pM({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function yM(e,t,r){if(0===e.length)throw(0,aM.newError)("Received no "+t+" from router "+r,fM)}function _M(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}Gy.default=pM,Gy.createValidRoutingTable=bM;var u_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vM=(Object.defineProperty(gy,"__esModule",{value:!0}),u_(Gy));function mM(e){this._routingContext=e}mM.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:vM.default.fromRawRoutingTable(r,n,e)})})},mM.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})})},gy.default=mM;var gM,OM,c_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w=(Object.defineProperty(zy,"__esModule",{value:!0}),zy.RoutingTable=zy.Rediscovery=void 0,c_(gy)),o=(zy.Rediscovery=w.default,c_(Gy)),w_=(zy.RoutingTable=o.default,zy.default=w.default,r&&r.__extends||(gM=function(e,t){return(gM=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}gM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),wM=r&&r.__assign||function(){return(wM=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)},EM=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]}),PM=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)&&EM(t,e,r);return PM(t,e),t},SM=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())})},TM=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}}}},jM=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.")},CM=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},C_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},IM=(Object.defineProperty(Zc,"__esModule",{value:!0}),e),kM=P_(zy),RM=Zl,AM=C_(Ql),L_=C_(ad),MM=cs,xM=Qa,NM=IM.error.SERVICE_UNAVAILABLE,UM=IM.error.SESSION_EXPIRED,DM=IM.internal.bookmarks.Bookmarks,jd=IM.internal.constants,LM=jd.ACCESS_MODE_READ,FM=jd.ACCESS_MODE_WRITE,BM=jd.BOLT_PROTOCOL_V3,WM=jd.BOLT_PROTOCOL_V4_0,zM=jd.BOLT_PROTOCOL_V4_4,qM=jd.BOLT_PROTOCOL_V5_1,VM=null,HM=(0,IM.int)(3e4),d_=(OM=L_.default,w_(x,OM),x.prototype._createConnectionErrorHandler=function(){return new xM.ConnectionErrorHandler(UM)},x.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||VM),e},x.prototype._handleAuthorizationExpired=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,"'")),OM.prototype._handleAuthorizationExpired.call(this,e,t,r,n)},x.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||VM),(0,IM.newError)("No longer possible to write to server at "+t,UM,e)},x.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 SM(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return TM(this,function(e){switch(e.label){case 0:return n={database:c||VM},o=new xM.ConnectionErrorHandler(UM,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._handleAuthorizationExpired(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===LM)r=this._loadBalancingStrategy.selectReader(u.readers),t="read";else{if(s!==FM)throw(0,IM.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(u.writers),t="write"}if(!r)throw(0,IM.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(u),UM);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 xM.DelegateConnection(i,o)];case 6:throw u=e.sent(),o.handleAndTransformError(u,r);case 7:return[2]}})})},x.prototype._hasProtocolVersion=function(u){return SM(this,void 0,void 0,function(){var t,r,n,o,i;return TM(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,(0,xM.createChannelConnection)(t[n],this._config,this._createConnectionErrorHandler(),this._log)];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]}})})},x.prototype.supportsMultiDb=function(){return SM(this,void 0,void 0,function(){return TM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return WM<=e})];case 1:return[2,e.sent()]}})})},x.prototype.supportsTransactionConfig=function(){return SM(this,void 0,void 0,function(){return TM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return BM<=e})];case 1:return[2,e.sent()]}})})},x.prototype.supportsUserImpersonation=function(){return SM(this,void 0,void 0,function(){return TM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return zM<=e})];case 1:return[2,e.sent()]}})})},x.prototype.supportsSessionAuth=function(){return SM(this,void 0,void 0,function(){return TM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return qM<=e})];case 1:return[2,e.sent()]}})})},x.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},x.prototype.verifyAuthentication=function(e){var n=e.database,o=e.accessMode,i=e.auth;return SM(this,void 0,void 0,function(){var t=this;return TM(this,function(e){return[2,this._verifyAuthentication({auth:i,getAddress:function(){return SM(t,void 0,void 0,function(){var t,r;return TM(this,function(e){switch(e.label){case 0:return t={database:n||VM},[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===FM?r.writers:r.readers).length)throw(0,IM.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),NM);return[2,r[0]]}})})}})]})})},x.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return SM(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return TM(this,function(e){switch(e.label){case 0:return t={database:l||VM},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===FM?r.writers:r.readers,n=(0,IM.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),NM),e.label=2;case 2:e.trys.push([2,9,10,11]),o=jM(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}})})},x.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},x.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},x.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 kM.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,i,e)):u},x.prototype._refreshRoutingTable=function(e,t,r,n,o){var i=e.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(i,e,t,r,n,o):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(i,e,t,r,n,o)},x.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l,f){return SM(this,void 0,void 0,function(){var t,r,n,o,i;return TM(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,f)];case 1:return(t=CM.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,f)];case 3:i=CM.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,l,n)];case 5:return[2,e.sent()]}})})},x.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s,c){return SM(this,void 0,void 0,function(){var t,r,n;return TM(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,c)];case 1:return r=CM.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a,c)];case 2:n=CM.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,s,r)];case 4:return[2,e.sent()]}})})},x.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return SM(this,void 0,void 0,function(){var t,r;return TM(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=CM.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,x._forgetRouter(o,n,r),[2,[null,t]])}})})},x.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return SM(this,void 0,void 0,function(){var t;return TM(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()]}})})},x.prototype._resolveSeedRouter=function(n){return SM(this,void 0,void 0,function(){var t,r=this;return TM(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)]}})})},x.prototype._fetchRoutingTable=function(s,c,l,f,p){return SM(this,void 0,void 0,function(){var t=this;return TM(this,function(e){return[2,s.reduce(function(i,u,a){return SM(t,void 0,void 0,function(){var t,r,n,o;return TM(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=CM.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(x._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=CM.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]))]})})},x.prototype._createSessionForRediscovery=function(o,i,u,a){return SM(this,void 0,void 0,function(){var t,r,n=this;return TM(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=xM.ConnectionErrorHandler.create({errorCode:UM,handleAuthorizationExpired:function(e,t,r){return n._handleAuthorizationExpired(e,t,r)}}),r=t._sticky?new xM.DelegateConnection(t):new xM.DelegateConnection(t,r),r=new AM.default(r),t.protocol().version<4?[2,[new IM.Session({mode:FM,bookmarks:DM.empty(),connectionProvider:r}),null]]:[2,[new IM.Session({mode:LM,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},x.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,IM.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),NM,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},x.prototype._applyRoutingTableIfPossible=function(t,r,n,o){return SM(this,void 0,void 0,function(){return TM(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r,n)];throw(0,IM.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),NM,o);case 1:return e.sent(),[2,r]}})})},x.prototype._updateRoutingTable=function(t,r){return SM(this,void 0,void 0,function(){return TM(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),r(t.database),this._log.info("Updated routing table ".concat(t)),[2]}})})},x._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},x);function x(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.authTokenManager,c=e.routingTablePurgeDelay,e=e.newPool,l=OM.call(this,{id:t,config:i,log:u,userAgent:a,authTokenManager:s,newPool:e},function(e){return(0,xM.createChannelConnection)(e,l._config,l._createConnectionErrorHandler(),l._log,l._routingContext)})||this;return l._routingContext=wM(wM({},n),{address:r.toString()}),l._seedRouter=r,l._rediscovery=new kM.default(l._routingContext),l._loadBalancingStrategy=new MM.LeastConnectedLoadBalancingStrategy(l._connectionPool),l._hostNameResolver=o,l._dnsResolver=new RM.HostNameResolver,l._log=u,l._useSeedRouter=!0,l._routingTableRegistry=new c2(c?(0,IM.int)(c):HM),l}Zc.default=d_;l2.prototype.register=function(e){return this._tables.set(e.database,e),this},l2.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},l2.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},l2.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},l2.prototype._forEach=function(e){var t,r;try{for(var n=jM(this._tables),o=n.next();!o.done;o=n.next())e(CM(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},l2.prototype._remove=function(e){return this._tables.delete(e),this},l2.prototype._removeIf=function(e){var t,r;try{for(var n=jM(this._tables),o=n.next();!o.done;o=n.next()){var i=CM(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 GM,KM,YM,ZM,QM,XM,JM,$M,e2,t2,N,r2,n2,o2,i2,u2,a2,s2,c2=l2;function l2(e){this._tables=new Map,this._routingTablePurgeDelay=e}function f2(e,t,r){void 0===r&&(r={}),o2(e,"Bolt URL");var n,o=a2.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=n2,r.trust=n}var a=function(e){if("object"==typeof(t=e)&&null!=t&&"getToken"in t&&"onTokenExpired"in t&&"function"==typeof t.getToken&&"function"==typeof t.onTokenExpired)return e;var t=e;return(t=t||{}).scheme=t.scheme||"none",(0,N.staticAuthTokenManager)({authToken:t})}(t),s=(r.userAgent=r.userAgent||s2,u2.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new t2.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new r2.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,routingContext:o.query})};if(i2(o.query))return function(e,t,r){return new r2.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:a,address:s,userAgent:t.userAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function p2(r,n){return $M(this,void 0,void 0,function(){var t;return e2(this,function(e){switch(e.label){case 0:t=f2(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 Q_=qd,GM=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.RoutingConnectionProvider=Q_.DirectConnectionProvider=Q_.PooledConnectionProvider=Q_.SingleConnectionProvider=void 0,KM=Ql,Object.defineProperty(Q_,"SingleConnectionProvider",{enumerable:!0,get:function(){return GM(KM).default}}),YM=ad,Object.defineProperty(Q_,"PooledConnectionProvider",{enumerable:!0,get:function(){return GM(YM).default}}),ZM=Zy,Object.defineProperty(Q_,"DirectConnectionProvider",{enumerable:!0,get:function(){return GM(ZM).default}}),QM=Zc,Object.defineProperty(Q_,"RoutingConnectionProvider",{enumerable:!0,get:function(){return GM(QM).default}}),V_=b,XM=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]}),JM=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),av=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)&&XM(t,e,r);return JM(t,e),t},pv=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||XM(t,e,r)},Object.defineProperty(V_,"__esModule",{value:!0}),V_.pool=V_.packstream=V_.channel=V_.buf=V_.bolt=V_.loadBalancing=void 0,V_.loadBalancing=av(cs),V_.bolt=av(u),V_.buf=av(Af),V_.channel=av(Zl),V_.packstream=av(Jb),V_.pool=av(Jp),pv(qd,V_),v=F,$M=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())})},e2=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}}}},tv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(v,"__esModule",{value:!0}),v.PathSegment=v.Path=v.UnboundRelationship=v.Relationship=v.Node=v.Record=v.ServerInfo=v.Notification=v.QueryStatistics=v.ProfiledPlan=v.Plan=v.ResultSummary=v.RxResult=v.RxManagedTransaction=v.RxTransaction=v.RxSession=v.EagerResult=v.Result=v.ManagedTransaction=v.Transaction=v.Session=v.Driver=v.temporal=v.spatial=v.graph=v.error=v.routing=v.session=v.types=v.logging=v.auth=v.isRetryableError=v.Neo4jError=v.integer=v.isUnboundRelationship=v.isRelationship=v.isPathSegment=v.isPath=v.isNode=v.isDateTime=v.isLocalDateTime=v.isDate=v.isTime=v.isLocalTime=v.isDuration=v.isPoint=v.isInt=v.int=v.hasReachableServer=v.driver=void 0,v.expirationBasedAuthTokenManager=v.notificationFilterMinimumSeverityLevel=v.notificationFilterDisabledCategory=v.notificationSeverityLevel=v.notificationCategory=v.resultTransformers=v.bookmarkManager=v.DateTime=v.LocalDateTime=v.Date=v.Time=v.LocalTime=v.Duration=v.Integer=v.Point=void 0,t2=B,Object.defineProperty(v,"Driver",{enumerable:!0,get:function(){return t2.Driver}}),_v=tv(n),N=e,Object.defineProperty(v,"Neo4jError",{enumerable:!0,get:function(){return N.Neo4jError}}),Object.defineProperty(v,"isRetryableError",{enumerable:!0,get:function(){return N.isRetryableError}}),Object.defineProperty(v,"error",{enumerable:!0,get:function(){return N.error}}),Object.defineProperty(v,"Integer",{enumerable:!0,get:function(){return N.Integer}}),Object.defineProperty(v,"int",{enumerable:!0,get:function(){return N.int}}),Object.defineProperty(v,"isInt",{enumerable:!0,get:function(){return N.isInt}}),Object.defineProperty(v,"isPoint",{enumerable:!0,get:function(){return N.isPoint}}),Object.defineProperty(v,"Point",{enumerable:!0,get:function(){return N.Point}}),Object.defineProperty(v,"Date",{enumerable:!0,get:function(){return N.Date}}),Object.defineProperty(v,"DateTime",{enumerable:!0,get:function(){return N.DateTime}}),Object.defineProperty(v,"Duration",{enumerable:!0,get:function(){return N.Duration}}),Object.defineProperty(v,"isDate",{enumerable:!0,get:function(){return N.isDate}}),Object.defineProperty(v,"isDateTime",{enumerable:!0,get:function(){return N.isDateTime}}),Object.defineProperty(v,"isDuration",{enumerable:!0,get:function(){return N.isDuration}}),Object.defineProperty(v,"isLocalDateTime",{enumerable:!0,get:function(){return N.isLocalDateTime}}),Object.defineProperty(v,"isLocalTime",{enumerable:!0,get:function(){return N.isLocalTime}}),Object.defineProperty(v,"isNode",{enumerable:!0,get:function(){return N.isNode}}),Object.defineProperty(v,"isPath",{enumerable:!0,get:function(){return N.isPath}}),Object.defineProperty(v,"isPathSegment",{enumerable:!0,get:function(){return N.isPathSegment}}),Object.defineProperty(v,"isRelationship",{enumerable:!0,get:function(){return N.isRelationship}}),Object.defineProperty(v,"isTime",{enumerable:!0,get:function(){return N.isTime}}),Object.defineProperty(v,"isUnboundRelationship",{enumerable:!0,get:function(){return N.isUnboundRelationship}}),Object.defineProperty(v,"LocalDateTime",{enumerable:!0,get:function(){return N.LocalDateTime}}),Object.defineProperty(v,"LocalTime",{enumerable:!0,get:function(){return N.LocalTime}}),Object.defineProperty(v,"Time",{enumerable:!0,get:function(){return N.Time}}),Object.defineProperty(v,"Node",{enumerable:!0,get:function(){return N.Node}}),Object.defineProperty(v,"Path",{enumerable:!0,get:function(){return N.Path}}),Object.defineProperty(v,"PathSegment",{enumerable:!0,get:function(){return N.PathSegment}}),Object.defineProperty(v,"Relationship",{enumerable:!0,get:function(){return N.Relationship}}),Object.defineProperty(v,"UnboundRelationship",{enumerable:!0,get:function(){return N.UnboundRelationship}}),Object.defineProperty(v,"Record",{enumerable:!0,get:function(){return N.Record}}),Object.defineProperty(v,"ResultSummary",{enumerable:!0,get:function(){return N.ResultSummary}}),Object.defineProperty(v,"Plan",{enumerable:!0,get:function(){return N.Plan}}),Object.defineProperty(v,"ProfiledPlan",{enumerable:!0,get:function(){return N.ProfiledPlan}}),Object.defineProperty(v,"QueryStatistics",{enumerable:!0,get:function(){return N.QueryStatistics}}),Object.defineProperty(v,"Notification",{enumerable:!0,get:function(){return N.Notification}}),Object.defineProperty(v,"ServerInfo",{enumerable:!0,get:function(){return N.ServerInfo}}),Object.defineProperty(v,"Result",{enumerable:!0,get:function(){return N.Result}}),Object.defineProperty(v,"EagerResult",{enumerable:!0,get:function(){return N.EagerResult}}),Object.defineProperty(v,"auth",{enumerable:!0,get:function(){return N.auth}}),Object.defineProperty(v,"Session",{enumerable:!0,get:function(){return N.Session}}),Object.defineProperty(v,"Transaction",{enumerable:!0,get:function(){return N.Transaction}}),Object.defineProperty(v,"ManagedTransaction",{enumerable:!0,get:function(){return N.ManagedTransaction}}),Object.defineProperty(v,"bookmarkManager",{enumerable:!0,get:function(){return N.bookmarkManager}}),Object.defineProperty(v,"routing",{enumerable:!0,get:function(){return N.routing}}),Object.defineProperty(v,"resultTransformers",{enumerable:!0,get:function(){return N.resultTransformers}}),Object.defineProperty(v,"notificationCategory",{enumerable:!0,get:function(){return N.notificationCategory}}),Object.defineProperty(v,"notificationSeverityLevel",{enumerable:!0,get:function(){return N.notificationSeverityLevel}}),Object.defineProperty(v,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return N.notificationFilterDisabledCategory}}),Object.defineProperty(v,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return N.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(v,"expirationBasedAuthTokenManager",{enumerable:!0,get:function(){return N.expirationBasedAuthTokenManager}}),r2=b,Cv=tv(Fr),v.RxSession=Cv.default,x_=tv(lt),v.RxTransaction=x_.default,Uv=tv(y),v.RxManagedTransaction=Uv.default,tv=tv(E),v.RxResult=tv.default,Hv=N.internal.util,n2=Hv.ENCRYPTION_ON,o2=Hv.assertString,i2=Hv.isEmptyObjectOrNull,u2=N.internal.serverAddress.ServerAddress,a2=N.internal.urlUtil,v.driver=f2,v.hasReachableServer=p2,s2="neo4j-javascript/"+_v.default,Hv={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},v.logging=Hv,_v={Node:N.Node,Relationship:N.Relationship,UnboundRelationship:N.UnboundRelationship,PathSegment:N.PathSegment,Path:N.Path,Result:N.Result,EagerResult:N.EagerResult,ResultSummary:N.ResultSummary,Record:N.Record,Point:N.Point,Date:N.Date,DateTime:N.DateTime,Duration:N.Duration,LocalDateTime:N.LocalDateTime,LocalTime:N.LocalTime,Time:N.Time,Integer:N.Integer},v.types=_v,Kv={READ:t2.READ,WRITE:t2.WRITE},v.session=Kv,Fv={toNumber:N.toNumber,toString:N.toString,inSafeRange:N.inSafeRange},v.integer=Fv,Xv={isPoint:N.isPoint},v.spatial=Xv,qs={isDuration:N.isDuration,isLocalTime:N.isLocalTime,isTime:N.isTime,isDate:N.isDate,isLocalDateTime:N.isLocalDateTime,isDateTime:N.isDateTime},v.temporal=qs,Cd={isNode:N.isNode,isPath:N.isPath,isPathSegment:N.isPathSegment,isRelationship:N.isRelationship,isUnboundRelationship:N.isUnboundRelationship},v.graph=Cd,Fv={driver:f2,hasReachableServer:p2,int:N.int,isInt:N.isInt,isPoint:N.isPoint,isDuration:N.isDuration,isLocalTime:N.isLocalTime,isTime:N.isTime,isDate:N.isDate,isLocalDateTime:N.isLocalDateTime,isDateTime:N.isDateTime,isNode:N.isNode,isPath:N.isPath,isPathSegment:N.isPathSegment,isRelationship:N.isRelationship,isUnboundRelationship:N.isUnboundRelationship,integer:Fv,Neo4jError:N.Neo4jError,isRetryableError:N.isRetryableError,auth:N.auth,logging:Hv,types:_v,session:Kv,routing:N.routing,error:N.error,graph:Cd,spatial:Xv,temporal:qs,Driver:t2.Driver,Session:N.Session,Transaction:N.Transaction,ManagedTransaction:N.ManagedTransaction,Result:N.Result,EagerResult:N.EagerResult,RxSession:Cv.default,RxTransaction:x_.default,RxManagedTransaction:Uv.default,RxResult:tv.default,ResultSummary:N.ResultSummary,Plan:N.Plan,ProfiledPlan:N.ProfiledPlan,QueryStatistics:N.QueryStatistics,Notification:N.Notification,ServerInfo:N.ServerInfo,Record:N.Record,Node:N.Node,Relationship:N.Relationship,UnboundRelationship:N.UnboundRelationship,Path:N.Path,PathSegment:N.PathSegment,Point:N.Point,Integer:N.Integer,Duration:N.Duration,LocalTime:N.LocalTime,Time:N.Time,Date:N.Date,LocalDateTime:N.LocalDateTime,DateTime:N.DateTime,bookmarkManager:N.bookmarkManager,resultTransformers:N.resultTransformers,notificationCategory:N.notificationCategory,notificationSeverityLevel:N.notificationSeverityLevel,notificationFilterDisabledCategory:N.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:N.notificationFilterMinimumSeverityLevel,expirationBasedAuthTokenManager:N.expirationBasedAuthTokenManager},v.default=Fv,U(F)});