neo4j-driver 5.22.0 → 5.24.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.
- package/lib/browser/neo4j-web.esm.js +2415 -2249
- package/lib/browser/neo4j-web.esm.min.js +1 -1
- package/lib/browser/neo4j-web.js +2415 -2249
- package/lib/browser/neo4j-web.min.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).neo4j=t()}(this,function(){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U,L,F={},B={},e={},t={},n=r&&r.__extends||(U=function(e,t){return(U=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}U(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"),q=(t.SERVICE_UNAVAILABLE=W,"SessionExpired"),z=(t.SESSION_EXPIRED=q,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===q||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=z,t.newError=function(e,t,r){return new z(e,null!=t?t:"N/A",r)};n=z.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),e=d.toNumber(e);return 0==(t&=63)?d.ZERO:e<32?d.fromBits(this.low>>>t|this.high<<32-t,this.high>>t):d.fromBits(this.high>>t-32,0<=this.high?0:-1)},d.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},d.fromInt=function(e){if(-128<=(e|=0)&&e<128&&null!=(t=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?(!0===t.ceilFloat&&(e=Math.ceil(e)),d.fromNumber(e)):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(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={},a={},s={},X=(Object.defineProperty(s,"__esModule",{value:!0}),s.getBrokenObjectReason=s.isBrokenObject=s.createBrokenObject=void 0,"__isBrokenObject__"),Q="__reason__";s.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===X||(t===Q?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})},s.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[X]},s.getBrokenObjectReason=function(e){return e[Q]},Object.defineProperty(a,"__esModule",{value:!0}),a.stringify=void 0;var J=s;a.stringify=function(e,r){return JSON.stringify(e,function(e,t){return(0,J.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,J.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):!0!==(null==r?void 0:r.useCustomToString)||"object"!=typeof t||Array.isArray(t)||"function"!=typeof t.toString||t.toString===Object.prototype.toString?t:null==t?void 0:t.toString()})};var c,$,ee,te,re,ne,oe,ie=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]}),ue=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ie(t,e,r);return ue(t,e),t},ae=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.")},se=(Object.defineProperty(u,"__esModule",{value:!0}),u.ENCRYPTION_OFF=u.ENCRYPTION_ON=u.equals=u.validateQueryAndParameters=u.toNumber=u.assertValidDate=u.assertNumberOrInteger=u.assertNumber=u.assertString=u.assertObject=u.isString=u.isObject=u.isEmptyObjectOrNull=void 0,l(n)),ce=a;u.ENCRYPTION_ON="ENCRYPTION_ON";function le(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function fe(e,t){if(pe(e))return e;throw new TypeError((0,ce.stringify)(t)+" expected to be string but was: "+(0,ce.stringify)(e))}function pe(e){return"[object String]"===Object.prototype.toString.call(e)}function de(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,te.int)(e),this._maxInteger=(0,te.int)(t)}function he(e,t,r){e=(0,te.int)(e),t=(0,te.int)(t),r=(0,te.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,te.int)(e)).modulo(4).equals(0))return!e.modulo(100).equals(0)||!!e.modulo(400).equals(0)}(e)||(n=n.subtract(1))),n.subtract(c.DAYS_0000_TO_1970)}function be(e,t){return(0,re.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))}function ye(e,t,r){if((0,ne.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,re.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function _e(e,t){e=(0,te.int)(e),t=(0,te.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function ve(e,t){return e=(0,te.int)(e),t=(0,te.int)(t),e.subtract(_e(e,t).multiply(t))}function me(e){return(e=(0,te.int)(e)).equals(0)?"":"."+ge(e,9)}function ge(e,t,r){var n=(e=(0,te.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(!le(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},u.isObject=le,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(fe(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!le(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(le(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,ce.stringify)(e))},u.assertString=fe,u.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,ce.stringify)(e));return e},u.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,se.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,ce.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,ce.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,ce.stringify)(e));return e},u.isString=pe,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=ae(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},u.toNumber=function(e){return e instanceof se.default?e.toNumber():"bigint"==typeof e?(0,se.int)(e).toNumber():e},c=o,$=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]}),ee=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&$(t,e,r);return ee(t,e),t},Object.defineProperty(c,"__esModule",{value:!0}),c.floorMod=c.floorDiv=c.assertValidZoneId=c.assertValidNanosecond=c.assertValidSecond=c.assertValidMinute=c.assertValidHour=c.assertValidDay=c.assertValidMonth=c.assertValidYear=c.timeZoneOffsetInSeconds=c.totalNanoseconds=c.newDate=c.toStandardDate=c.isoStringToStandardDate=c.dateToIsoString=c.timeZoneOffsetToIsoString=c.timeToIsoString=c.durationToIsoString=c.dateToEpochDay=c.localDateTimeToEpochSecond=c.localTimeToNanoOfDay=c.normalizeNanosecondsForDuration=c.normalizeSecondsForDuration=c.SECONDS_PER_DAY=c.DAYS_PER_400_YEAR_CYCLE=c.DAYS_0000_TO_1970=c.NANOS_PER_HOUR=c.NANOS_PER_MINUTE=c.NANOS_PER_MILLISECOND=c.NANOS_PER_SECOND=c.SECONDS_PER_HOUR=c.SECONDS_PER_MINUTE=c.MINUTES_PER_HOUR=c.NANOSECOND_OF_SECOND_RANGE=c.SECOND_OF_MINUTE_RANGE=c.MINUTE_OF_HOUR_RANGE=c.HOUR_OF_DAY_RANGE=c.DAY_OF_MONTH_RANGE=c.MONTH_OF_YEAR_RANGE=c.YEAR_RANGE=void 0,te=l(n),re=t,ne=u,de.prototype.contains=function(e){var t;return(0,te.isInt)(e)&&e instanceof te.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,te.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},de.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},l=de,c.YEAR_RANGE=new l(-999999999,999999999),c.MONTH_OF_YEAR_RANGE=new l(1,12),c.DAY_OF_MONTH_RANGE=new l(1,31),c.HOUR_OF_DAY_RANGE=new l(0,23),c.MINUTE_OF_HOUR_RANGE=new l(0,59),c.SECOND_OF_MINUTE_RANGE=new l(0,59),c.NANOSECOND_OF_SECOND_RANGE=new l(0,999999999),c.MINUTES_PER_HOUR=60,c.SECONDS_PER_MINUTE=60,c.SECONDS_PER_HOUR=c.SECONDS_PER_MINUTE*c.MINUTES_PER_HOUR,c.NANOS_PER_SECOND=1e9,c.NANOS_PER_MILLISECOND=1e6,c.NANOS_PER_MINUTE=c.NANOS_PER_SECOND*c.SECONDS_PER_MINUTE,c.NANOS_PER_HOUR=c.NANOS_PER_MINUTE*c.MINUTES_PER_HOUR,c.DAYS_0000_TO_1970=719528,c.DAYS_PER_400_YEAR_CYCLE=146097,c.SECONDS_PER_DAY=86400,c.normalizeSecondsForDuration=function(e,t){return(0,te.int)(e).add(_e(t,c.NANOS_PER_SECOND))},c.normalizeNanosecondsForDuration=function(e){return ve(e,c.NANOS_PER_SECOND)},c.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,te.int)(e),t=(0,te.int)(t),r=(0,te.int)(r),n=(0,te.int)(n),(e=(e=(e=e.multiply(c.NANOS_PER_HOUR)).add(t.multiply(c.NANOS_PER_MINUTE))).add(r.multiply(c.NANOS_PER_SECOND))).add(n)},c.localDateTimeToEpochSecond=function(e,t,r,n,o,i,u){return e=he(e,t,r),t=function(e,t,r){e=(0,te.int)(e),t=(0,te.int)(t),r=(0,te.int)(r);e=e.multiply(c.SECONDS_PER_HOUR);return(e=e.add(t.multiply(c.SECONDS_PER_MINUTE))).add(r)}(n,o,i),e.multiply(c.SECONDS_PER_DAY).add(t)},c.dateToEpochDay=he,c.durationToIsoString=function(e,t,r,n){return e=ge(e),t=ge(t),r=function(e,t){e=(0,te.int)(e),t=(0,te.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=me((n?t.negate().add(2*c.NANOS_PER_SECOND):t.add(c.NANOS_PER_SECOND)).modulo(c.NANOS_PER_SECOND)));return null!=r?e+r:e}(r,n),"P".concat(e,"M").concat(t,"DT").concat(r,"S")},c.timeToIsoString=function(e,t,r,n){return e=ge(e,2),t=ge(t,2),r=ge(r,2),n=me(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},c.timeZoneOffsetToIsoString=function(e){if((e=(0,te.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=ge((e=r?e.multiply(-1):e).div(c.SECONDS_PER_HOUR),2),n=ge(e.div(c.SECONDS_PER_MINUTE).modulo(c.MINUTES_PER_HOUR),2);return null!=(e=(e=e.modulo(c.SECONDS_PER_MINUTE)).equals(0)?null:ge(e,2))?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},c.dateToIsoString=function(e,t,r){return e=function(e){e=(0,te.int)(e);if(e.isNegative()||e.greaterThan(9999))return ge(e,6,{usePositiveSign:!0});return ge(e,4)}(e),t=ge(t,2),r=ge(r,2),"".concat(e,"-").concat(t,"-").concat(r)},c.isoStringToStandardDate=function(e){return new Date(e)},c.toStandardDate=function(e){return new Date(e)},c.newDate=function(e){return new Date(e)},c.totalNanoseconds=function(e,t){return t=null!=t?t:0,e=e.getMilliseconds()*c.NANOS_PER_MILLISECOND,t instanceof te.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},c.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*c.SECONDS_PER_MINUTE+t},c.assertValidYear=function(e){return ye(e,c.YEAR_RANGE,"Year")},c.assertValidMonth=function(e){return ye(e,c.MONTH_OF_YEAR_RANGE,"Month")},c.assertValidDay=function(e){return ye(e,c.DAY_OF_MONTH_RANGE,"Day")},c.assertValidHour=function(e){return ye(e,c.HOUR_OF_DAY_RANGE,"Hour")},c.assertValidMinute=function(e){return ye(e,c.MINUTE_OF_HOUR_RANGE,"Minute")},c.assertValidSecond=function(e){return ye(e,c.SECOND_OF_MINUTE_RANGE,"Second")},c.assertValidNanosecond=function(e){return ye(e,c.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},oe=new Map,c.assertValidZoneId=function(t,r){var e=oe.get(r);if(!0!==e){if(!1===e)throw be(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),oe.set(r,!0)}catch(e){throw oe.set(r,!1),be(r,t)}}},c.floorDiv=_e,c.floorMod=ve;var Oe=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]}),we=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Oe(t,e,r);return we(t,e),t},Ee=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},f=(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,l(o)),Pe=u,Se=t,Te=l(n),l={value:!0,enumerable:!1,configurable:!1,writable:!1},je="__isDuration__",Ce="__isLocalTime__",Ie="__isTime__",Re="__isDate__",Ae="__isLocalDateTime__",ke="__isDateTime__",p=(Me.prototype.toString=function(){return f.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},Me);function Me(e,t,r,n){this.months=(0,Pe.assertNumberOrInteger)(e,"Months"),this.days=(0,Pe.assertNumberOrInteger)(t,"Days"),(0,Pe.assertNumberOrInteger)(r,"Seconds"),(0,Pe.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=f.normalizeSecondsForDuration(r,n),this.nanoseconds=f.normalizeNanosecondsForDuration(n),Object.freeze(this)}i.Duration=p,Object.defineProperty(p.prototype,je,l),i.isDuration=function(e){return Fe(e,je)};Ne.fromStandardDate=function(e,t){We(e,t);t=f.totalNanoseconds(e,t);return new Ne(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Te.default?t.toInt():"bigint"==typeof t?(0,Te.int)(t).toInt():t)},Ne.prototype.toString=function(){return f.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};p=Ne;function Ne(e,t,r,n){this.hour=f.assertValidHour(e),this.minute=f.assertValidMinute(t),this.second=f.assertValidSecond(r),this.nanosecond=f.assertValidNanosecond(n),Object.freeze(this)}i.LocalTime=p,Object.defineProperty(p.prototype,Ce,l),i.isLocalTime=function(e){return Fe(e,Ce)};xe.fromStandardDate=function(e,t){return We(e,t),new xe(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Te.toNumber)(f.totalNanoseconds(e,t)),f.timeZoneOffsetInSeconds(e))},xe.prototype.toString=function(){return f.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+f.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};p=xe;function xe(e,t,r,n,o){this.hour=f.assertValidHour(e),this.minute=f.assertValidMinute(t),this.second=f.assertValidSecond(r),this.nanosecond=f.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,Pe.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}i.Time=p,Object.defineProperty(p.prototype,Ie,l),i.isTime=function(e){return Fe(e,Ie)};De.fromStandardDate=function(e){return We(e),new De(e.getFullYear(),e.getMonth()+1,e.getDate())},De.prototype.toStandardDate=function(){return f.isoStringToStandardDate(this.toString())},De.prototype.toString=function(){return f.dateToIsoString(this.year,this.month,this.day)};p=De;function De(e,t,r){this.year=f.assertValidYear(e),this.month=f.assertValidMonth(t),this.day=f.assertValidDay(r),Object.freeze(this)}i.Date=p,Object.defineProperty(p.prototype,Re,l),i.isDate=function(e){return Fe(e,Re)};Ue.fromStandardDate=function(e,t){return We(e,t),new Ue(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Te.toNumber)(f.totalNanoseconds(e,t)))},Ue.prototype.toStandardDate=function(){return f.isoStringToStandardDate(this.toString())},Ue.prototype.toString=function(){return Be(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};p=Ue;function Ue(e,t,r,n,o,i,u){this.year=f.assertValidYear(e),this.month=f.assertValidMonth(t),this.day=f.assertValidDay(r),this.hour=f.assertValidHour(n),this.minute=f.assertValidMinute(o),this.second=f.assertValidSecond(i),this.nanosecond=f.assertValidNanosecond(u),Object.freeze(this)}i.LocalDateTime=p,Object.defineProperty(p.prototype,Ae,l),i.isLocalDateTime=function(e){return Fe(e,Ae)};Le.fromStandardDate=function(e,t){return We(e,t),new Le(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Te.toNumber)(f.totalNanoseconds(e,t)),f.timeZoneOffsetInSeconds(e),null)},Le.prototype.toStandardDate=function(){return f.toStandardDate(this._toUTC())},Le.prototype.toString=function(){var e;return Be(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?f.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},Le.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=f.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,Te.int)(e).multiply(1e3).add((0,Te.int)(this.nanosecond).div(1e6)).toNumber()};p=Le;function Le(e,t,r,n,o,i,u,a,s){this.year=f.assertValidYear(e),this.month=f.assertValidMonth(t),this.day=f.assertValidDay(r),this.hour=f.assertValidHour(n),this.minute=f.assertValidMinute(o),this.second=f.assertValidSecond(i),this.nanosecond=f.assertValidNanosecond(u);e=Ee(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,Se.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,Pe.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Pe.assertString)(t,"Time zone ID"),f.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 Fe(e,t){return null!=e&&!0===e[t]}function Be(e,t,r,n,o,i,u){return f.dateToIsoString(e,t,r)+"T"+f.timeToIsoString(n,o,i,u)}function We(e,t){(0,Pe.assertValidDate)(e,"Standard date"),null!=t&&(0,Pe.assertNumberOrInteger)(t,"Nanosecond")}i.DateTime=p,Object.defineProperty(p.prototype,ke,l),i.isDateTime=function(e){return Fe(e,ke)};var p={},qe=(Object.defineProperty(p,"__esModule",{value:!0}),p.isPathSegment=p.PathSegment=p.isPath=p.Path=p.isUnboundRelationship=p.UnboundRelationship=p.isRelationship=p.Relationship=p.isNode=p.Node=void 0,a),l={value:!0,enumerable:!1,configurable:!1,writable:!1},ze="__isNode__",Ve="__isRelationship__",He="__isUnboundRelationship__",Ge="__isPath__",Ye="__isPathSegment__";function Ke(e,t){return null!=e&&!0===e[t]}Xe.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,qe.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var Ze=Xe;function Xe(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=rt(n,function(){return e.toString()})}p.Node=Ze,Object.defineProperty(Ze.prototype,ze,l),p.isNode=function(e){return Ke(e,ze)};Je.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,qe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var Qe=Je;function Je(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=rt(i,function(){return e.toString()}),this.startNodeElementId=rt(u,function(){return t.toString()}),this.endNodeElementId=rt(a,function(){return r.toString()})}p.Relationship=Qe,Object.defineProperty(Qe.prototype,Ve,l),p.isRelationship=function(e){return Ke(e,Ve)};$e.prototype.bind=function(e,t){return new Qe(this.identity,e,t,this.type,this.properties,this.elementId)},$e.prototype.bindTo=function(e,t){return new Qe(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},$e.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,qe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};Ze=$e;function $e(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=rt(n,function(){return e.toString()})}p.UnboundRelationship=Ze,Object.defineProperty(Ze.prototype,He,l),p.isUnboundRelationship=function(e){return Ke(e,He)};function et(e,t,r){this.start=e,this.relationship=t,this.end=r}p.PathSegment=et,Object.defineProperty(et.prototype,Ye,l),p.isPathSegment=function(e){return Ke(e,Ye)};function tt(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function rt(e,t){return null==e?t():e}p.Path=tt,Object.defineProperty(tt.prototype,Ge,l),p.isPath=function(e){return Ke(e,Ge)};var Ze={},nt=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}}}},ot=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.")},it=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},ut=(Object.defineProperty(Ze,"__esModule",{value:!0}),t);function at(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)}at.prototype.forEach=function(e){var t,r;try{for(var n=ot(this.entries()),o=n.next();!o.done;o=n.next()){var i=it(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}}},at.prototype.map=function(e){var t,r,n=[];try{for(var o=ot(this.entries()),i=o.next();!i.done;i=o.next()){var u=it(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},at.prototype.entries=function(){var t;return nt(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]}})},at.prototype.values=function(){var t;return nt(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]}})},at.prototype[Symbol.iterator]=function(){var t;return nt(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]}})},at.prototype.toObject=function(){var t,e,r={};try{for(var n=ot(this.entries()),o=n.next();!o.done;o=n.next()){var i=it(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},at.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,ut.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,ut.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]},at.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},Ze.default=at;var l={},st=(Object.defineProperty(l,"__esModule",{value:!0}),l.isPoint=l.Point=void 0,u),ct="__isPoint__",h=(lt.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(ft(this.srid),", x=").concat(ft(this.x),", y=").concat(ft(this.y),"}"):"Point{srid=".concat(ft(this.srid),", x=").concat(ft(this.x),", y=").concat(ft(this.y),", z=").concat(ft(this.z),"}")},lt);function lt(e,t,r,n){this.srid=(0,st.assertNumberOrInteger)(e,"SRID"),this.x=(0,st.assertNumber)(t,"X coordinate"),this.y=(0,st.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,st.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function ft(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}l.Point=h,Object.defineProperty(h.prototype,ct,{value:!0,enumerable:!1,configurable:!1,writable:!1}),l.isPoint=function(e){return null!=e&&!0===e[ct]};var h={},b={},y={},_=(Object.defineProperty(y,"__esModule",{value:!0}),y.FailedObserver=y.CompletedObserver=void 0,pt.prototype.subscribe=function(e){ht(e,e.onKeys,[]),ht(e,e.onCompleted,{})},pt.prototype.cancel=function(){},pt.prototype.pause=function(){},pt.prototype.resume=function(){},pt.prototype.prepareToHandleSingleResponse=function(){},pt.prototype.markCompleted=function(){},pt.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},pt);function pt(){}function dt(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function ht(e,t,r){null!=t&&t.bind(e)(r)}y.CompletedObserver=_,dt.prototype.subscribe=function(e){ht(e,e.onError,this._error),this._observers.push(e)},dt.prototype.onError=function(t){ht(this,this._beforeError,t),this._observers.forEach(function(e){return ht(e,e.onError,t)})},dt.prototype.cancel=function(){},dt.prototype.pause=function(){},dt.prototype.resume=function(){},dt.prototype.markCompleted=function(){},dt.prototype.prepareToHandleSingleResponse=function(){},y.FailedObserver=dt;var _={},bt=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]}),yt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&bt(t,e,r);return yt(t,e),t},_t=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},vt=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))},mt=(Object.defineProperty(_,"__esModule",{value:!0}),_.Bookmarks=void 0,v(u)),v=(gt.empty=function(){return Ot},gt.prototype.isEmpty=function(){return 0===this._values.length},gt.prototype.values=function(){return this._values},gt.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},gt.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},gt);function gt(e){this._values=function(e){if(null==e||""===e)return[];if(mt.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(!mt.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return vt([],_t(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var Ot=new(_.Bookmarks=v)(null);var wt,Et,v={},m=(Object.defineProperty(v,"__esModule",{value:!0}),v.TELEMETRY_APIS=v.BOLT_PROTOCOL_V5_5=v.BOLT_PROTOCOL_V5_4=v.BOLT_PROTOCOL_V5_3=v.BOLT_PROTOCOL_V5_2=v.BOLT_PROTOCOL_V5_1=v.BOLT_PROTOCOL_V5_0=v.BOLT_PROTOCOL_V4_4=v.BOLT_PROTOCOL_V4_3=v.BOLT_PROTOCOL_V4_2=v.BOLT_PROTOCOL_V4_1=v.BOLT_PROTOCOL_V4_0=v.BOLT_PROTOCOL_V3=v.BOLT_PROTOCOL_V2=v.BOLT_PROTOCOL_V1=v.DEFAULT_POOL_MAX_SIZE=v.DEFAULT_POOL_ACQUISITION_TIMEOUT=v.DEFAULT_CONNECTION_TIMEOUT_MILLIS=v.ACCESS_MODE_WRITE=v.ACCESS_MODE_READ=v.FETCH_ALL=void 0,v.FETCH_ALL=-1,v.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,v.DEFAULT_POOL_MAX_SIZE=100,v.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,v.ACCESS_MODE_READ="READ",v.ACCESS_MODE_WRITE="WRITE",v.BOLT_PROTOCOL_V1=1,v.BOLT_PROTOCOL_V2=2,v.BOLT_PROTOCOL_V3=3,v.BOLT_PROTOCOL_V4_0=4,v.BOLT_PROTOCOL_V4_1=4.1,v.BOLT_PROTOCOL_V4_2=4.2,v.BOLT_PROTOCOL_V4_3=4.3,v.BOLT_PROTOCOL_V4_4=4.4,v.BOLT_PROTOCOL_V5_0=5,v.BOLT_PROTOCOL_V5_1=5.1,v.BOLT_PROTOCOL_V5_2=5.2,v.BOLT_PROTOCOL_V5_3=5.3,v.BOLT_PROTOCOL_V5_4=5.4,v.BOLT_PROTOCOL_V5_5=5.5,v.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),g={},Pt=r&&r.__extends||(wt=function(e,t){return(wt=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}wt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),St=(Object.defineProperty(g,"__esModule",{value:!0}),g.Logger=void 0,t),Tt="error",jt="warn",Ct="info",It="debug",Rt=((O={})[Tt]=0,O[jt]=1,O[Ct]=2,O[It]=3,O),O=(At.create=function(e){return null!=(null==e?void 0:e.logging)?new At(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=Rt[e];if(null!=t||0===t)return e;throw(0,St.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(Rt).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,St.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},At.noOp=function(){return Mt},At.prototype.isErrorEnabled=function(){return Nt(this._level,Tt)},At.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(Tt,e)},At.prototype.isWarnEnabled=function(){return Nt(this._level,jt)},At.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(jt,e)},At.prototype.isInfoEnabled=function(){return Nt(this._level,Ct)},At.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(Ct,e)},At.prototype.isDebugEnabled=function(){return Nt(this._level,It)},At.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(It,e)},At);function At(e,t){this._level=e,this._loggerFunction=t}function kt(){return Et.call(this,Ct,function(e,t){})||this}g.Logger=O,Pt(kt,Et=O),kt.prototype.isErrorEnabled=function(){return!1},kt.prototype.error=function(e){},kt.prototype.isWarnEnabled=function(){return!1},kt.prototype.warn=function(e){},kt.prototype.isInfoEnabled=function(){return!1},kt.prototype.info=function(e){},kt.prototype.isDebugEnabled=function(){return!1},kt.prototype.debug=function(e){};var Mt=new kt;function Nt(e,t){return Rt[e]>=Rt[t]}var xt,Pt=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)}),Dt=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())})},Ut=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}}}},Lt=(Object.defineProperty(m,"__esModule",{value:!0}),m.EMPTY_CONNECTION_HOLDER=m.ReadOnlyConnectionHolder=m.ConnectionHolder=void 0,t),Ft=u,Bt=v,Wt=_,qt=g,O=(zt.prototype.mode=function(){return this._mode},zt.prototype.database=function(){return this._database},zt.prototype.setDatabase=function(e){this._database=e},zt.prototype.bookmarks=function(){return this._bookmarks},zt.prototype.connectionProvider=function(){return this._connectionProvider},zt.prototype.referenceCount=function(){return this._referenceCount},zt.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},zt.prototype._createConnectionPromise=function(o){return Dt(this,void 0,void 0,function(){var t,r,n;return Ut(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()]}})})},zt.prototype._getBookmarks=function(){return Dt(this,void 0,void 0,function(){return Ut(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},zt.prototype.getConnection=function(){return this._connectionPromise},zt.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},zt.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},zt.prototype.log=function(){return this._log},zt.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(Zt).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},zt.prototype._logError=function(e){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(e,". Stacktrace: ").concat(e.stack)),null},zt);function zt(e){var t=e.mode,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,a=e.getConnectionAcquistionBookmarks,s=e.auth,e=e.log;this._mode=null!=t?t:Bt.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,Ft.assertString)(r,"database"):"",this._bookmarks=null!=n?n:Wt.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=s,this._log=e,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=null!=a?a:function(){return Promise.resolve(Wt.Bookmarks.empty())}}m.ConnectionHolder=O;Pt(Yt,Vt=O),Yt.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},Yt.prototype.getConnection=function(){return this._connectionHolder.getConnection()},Yt.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},Yt.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var Vt,Ht,Gt=Yt;function Yt(e){var t=Vt.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider(),log:e.log()})||this;return t._connectionHolder=e,t}function Kt(){return Ht.call(this,{log:qt.Logger.create({})})||this}m.ReadOnlyConnectionHolder=Gt,m.default=Gt,Pt(Kt,Ht=O),Kt.prototype.mode=function(){},Kt.prototype.database=function(){},Kt.prototype.initializeConnection=function(){return!0},Kt.prototype.getConnection=function(){return Dt(this,void 0,void 0,function(){return Ut(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,Lt.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},Kt.prototype.releaseConnection=function(){return Dt(this,void 0,void 0,function(){return Ut(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},Kt.prototype.close=function(){return Dt(this,void 0,void 0,function(){return Ut(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};Gt=new Kt;function Zt(e){return null}m.EMPTY_CONNECTION_HOLDER=Gt;var Pt={},Xt=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]}),Qt=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)&&Xt(t,e,r);return Qt(t,e),t},Jt=(Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.TxConfig=void 0,O(u)),$t=t,er=n,Gt=(tr.empty=function(){return rr},tr.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},tr);function tr(e,t){var r;null!=(r=e)&&Jt.assertObject(r,"Transaction config"),this.timeout=function(e,t){if(Jt.isObject(e)&&null!=e.timeout){Jt.assertNumberOrInteger(e.timeout,"Transaction timeout"),!function(e){return"number"==typeof e.timeout&&!Number.isInteger(e.timeout)}(e)||!0!==(null==t?void 0:t.isInfoEnabled())||null==t||t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up."));t=(0,er.int)(e.timeout,{ceilFloat:!0});if(t.isNegative())throw(0,$t.newError)("Transaction timeout should not be negative");return t}return null}(e,t),this.metadata=function(e){if(Jt.isObject(e)&&null!=e.metadata){e=e.metadata;if(Jt.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var rr=new(Pt.TxConfig=Gt)({});var O={},nr=r&&r.__assign||function(){return(nr=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)},or=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())})},ir=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}}}},ur=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},ar=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))},sr=(Object.defineProperty(O,"__esModule",{value:!0}),O.TransactionExecutor=void 0,t),cr=v;function lr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,ar([e,t],ur(r),!1))}function fr(e){return clearTimeout(e)}function pr(e,t,r,n,o){void 0===o&&(o={setTimeout:lr,clearTimeout:fr}),this._maxRetryTimeMs=dr(e,3e4),this._initialRetryDelayMs=dr(t,1e3),this._multiplier=dr(r,2),this._jitterFactor=dr(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=cr.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function dr(e,t){return null!=e?e:t}pr.prototype.execute=function(n,o,i){var u=this,a={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){a.apiTransactionConfig=void 0}}};return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i,a).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i,a)})},pr.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},pr.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,sr.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=c._computeDelayWithJitter(u),n=c._setTimeout(function(){c._inFlightTimeoutIds=c._inFlightTimeoutIds.filter(function(e){return e!==n}),c._executeTransactionInsidePromise(o,i,e,t,a,s).catch(t)},r);c._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*c._multiplier;return c._retryTransactionPromise(o,i,e,r,t,a,s)})},pr.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return or(this,void 0,void 0,function(){var t,r,n,o,i=this;return ir(this,function(e){switch(e.label){case 0:return(e.trys.push([0,4,,5]),r=u(null!=(null==f?void 0:f.apiTransactionConfig)?nr({},null==f?void 0:f.apiTransactionConfig):void 0),this.pipelineBegin)?(n=r,[3,3]):[3,1];case 1:return[4,r];case 2:n=e.sent(),e.label=3;case 3:return t=n,[3,5];case 4:return o=e.sent(),c(o),[2];case 5:return o=(null!=l?l:function(e){return e})(t),this._safeExecuteTransactionWork(o,a).then(function(e){return i._handleTransactionWorkSuccess(e,t,s,c)}).catch(function(e){return i._handleTransactionWorkFailure(e,t,c)}),[2]}})})},pr.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},pr.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},pr.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},pr.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},pr.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())},O.TransactionExecutor=pr;var Gt={},hr=r&&r.__assign||function(){return(hr=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)},br=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yr=(Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.Url=Gt.formatIPv6Address=Gt.formatIPv4Address=Gt.defaultPortForScheme=Gt.parseDatabaseUrl=void 0,u),_r=7687,vr=7474,mr=7473,gr=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Or(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function wr(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 Er(e){return"http"===e?vr:"https"===e?mr:_r}Gt.Url=gr,Gt.parseDatabaseUrl=function(e){(0,yr.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]),br((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=hr(hr({},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(":")?wr(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)?Er(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=Or(e[0],"key",r),e=Or(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)?br(t.split("?"),2)[1]:null,e);return new gr(n,o,u,i,r)},Gt.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},Gt.formatIPv6Address=function(e,t){return e=wr(e),"".concat(e,":").concat(t)},Gt.defaultPortForScheme=Er;var w={},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]}),Sr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Tr=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)&&Pr(t,e,r);return Sr(t,e),t},jr=(Object.defineProperty(w,"__esModule",{value:!0}),w.ServerAddress=void 0,u),Cr=Tr(Gt);function Ir(e,t,r,n){this._host=(0,jr.assertString)(e,"host"),this._resolved=null!=t?(0,jr.assertString)(t,"resolved"):null,this._port=(0,jr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Ir.prototype.host=function(){return this._host},Ir.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Ir.prototype.port=function(){return this._port},Ir.prototype.resolveWith=function(e){return new Ir(this._host,e,this._port,this._hostPort)},Ir.prototype.asHostPort=function(){return this._hostPort},Ir.prototype.asKey=function(){return this._hostPort},Ir.prototype.toString=function(){return this._stringValue},Ir.fromUrl=function(e){e=Cr.parseDatabaseUrl(e);return new Ir(e.host,null,e.port,e.hostAndPort)},w.ServerAddress=Ir;var Tr={},E={};function Rr(){}Object.defineProperty(E,"__esModule",{value:!0}),Rr.prototype.resolve=function(){throw new Error("Abstract function")},Rr.prototype._resolveToItself=function(e){return Promise.resolve([e])},E.default=Rr;var Ar={},kr=(Object.defineProperty(Ar,"__esModule",{value:!0}),w);function Mr(e){return Promise.resolve([e])}function Nr(e){this._resolverFunction=null!=e?e:Mr}Nr.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 kr.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))})},Ar.default=Nr;var xr,Dr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E=(Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.ConfiguredCustomResolver=Tr.BaseHostNameResolver=void 0,Dr(E)),E=(Tr.BaseHostNameResolver=E.default,Dr(Ar)),Dr=(Tr.ConfiguredCustomResolver=E.default,{}),E={};Object.defineProperty(E,"__esModule",{value:!0}),E.fromVersion=void 0,E.fromVersion=function(e,t){var r=null!=(t=(t=void 0===t?function(){return{get userAgent(){}}}:t)()).userAgent?t.userAgent.split("(")[1].split(")")[0]:void 0,t=t.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:t}},Fr=Dr,xr=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]}),P=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||xr(t,e,r)},Object.defineProperty(Fr,"__esModule",{value:!0}),P(E,Fr);var Ur=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]}),Lr=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)&&Ur(t,e,r);return Lr(t,e),t},E=(Object.defineProperty(b,"__esModule",{value:!0}),b.boltAgent=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,P(u)),Fr=(b.util=E,P(o)),E=(b.temporalUtil=Fr,P(y)),o=(b.observer=E,P(_)),Fr=(b.bookmarks=o,P(v)),E=(b.constants=Fr,P(m)),o=(b.connectionHolder=E,P(Pt)),Fr=(b.txConfig=o,P(O)),E=(b.transactionExecutor=Fr,P(g)),o=(b.logger=E,P(Gt)),Fr=(b.urlUtil=o,P(w)),E=(b.serverAddress=Fr,P(Tr)),Gt=(b.resolver=E,P(s)),o=(b.objectUtil=Gt,P(Dr)),w=(b.boltAgent=o,{}),Br=r&&r.__assign||function(){return(Br=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)},Wr=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]}),qr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Fr=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)&&Wr(t,e,r);return qr(t,e),t},zr=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},Vr=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))},Hr=(Object.defineProperty(w,"__esModule",{value:!0}),w.buildNotificationsFromMetadata=w.buildGqlStatusObjectFromMetadata=w.polyfillNotification=w.polyfillGqlStatusObject=w.GqlStatusObject=w.Notification=w.notificationClassification=w.notificationCategory=w.notificationSeverityLevel=void 0,Fr(a)),Gr=b,Yr={WARNING:{gql_status:"01N42",status_description:"warn: unknown warning"},NO_DATA:{gql_status:"02N42",status_description:"note: no data - unknown subcondition"},INFORMATION:{gql_status:"03N42",status_description:"info: unknown notification"},ERROR:{gql_status:"50N42",status_description:"error: general processing exception - unknown error"}},Kr={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},Zr=(w.notificationSeverityLevel=Kr,Object.freeze(Kr),Object.values(Kr)),Tr={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",UNKNOWN:"UNKNOWN"},Xr=(w.notificationCategory=Tr,Object.freeze(Tr),Object.values(Tr)),Qr=Tr,Jr=(w.notificationClassification=Qr,function(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=sn(e.position),this.severityLevel=cn(e.severity),this.rawSeverityLevel=e.severity,this.category=ln(e.category),this.rawCategory=e.category}),$r=(w.Notification=Jr,Object.defineProperty(en.prototype,"diagnosticRecordAsJsonString",{get:function(){return Hr.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),en);function en(e){var t;this.gqlStatus=e.gql_status,this.statusDescription=e.status_description,this.diagnosticRecord=null!=(t=e.diagnostic_record)?t:{},this.position=null!=this.diagnosticRecord._position?sn(this.diagnosticRecord._position):void 0,this.severity=cn(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=ln(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=null!=e.neo4j_code,Object.freeze(this)}function tn(e){var t;if(null!=e.neo4j_code)return new Jr({code:e.neo4j_code,title:e.title,description:e.status_description,severity:null==(t=e.diagnostic_record)?void 0:t._severity,category:null==(t=e.diagnostic_record)?void 0:t._classification,position:null==(t=e.diagnostic_record)?void 0:t._position})}function rn(e){var t=e.severity===Kr.WARNING?Yr.WARNING:Yr.INFORMATION,r={gql_status:t.gql_status,status_description:null!=(r=e.description)?r:t.status_description,neo4j_code:e.code,title:e.title,diagnostic_record:Br({},nn)};return null!=e.severity&&(r.diagnostic_record._severity=e.severity),null!=e.category&&(r.diagnostic_record._classification=e.category),null!=e.position&&(r.diagnostic_record._position=e.position),new $r(r)}w.GqlStatusObject=$r,w.polyfillNotification=tn,w.polyfillGqlStatusObject=rn;var nn={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},on=(Object.freeze(nn),{SUCCESS:new $r({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:nn}),NO_DATA:new $r({gql_status:"02000",status_description:"note: no data",diagnostic_record:nn}),NO_DATA_UNKNOWN_SUBCONDITION:new $r(Br(Br({},Yr.NO_DATA),{diagnostic_record:nn})),OMITTED_RESULT:new $r({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:nn})});Object.freeze(on),w.buildGqlStatusObjectFromMetadata=function(e){if(null!=e.statuses)return e.statuses.map(function(e){return new $r(e)});var t=!0===(null==(t=e.stream_summary)?void 0:t.have_records_streamed)?on.SUCCESS:!1===(null==t?void 0:t.has_keys)?on.OMITTED_RESULT:!0===(null==t?void 0:t.pulled)?on.NO_DATA:on.NO_DATA_UNKNOWN_SUBCONDITION;return Vr([t],zr(null!=(e=null==(t=e.notifications)?void 0:t.map(rn))?e:[]),!1).sort(function(e,t){return an(e)-an(t)})};var un=Object.freeze({"02":0,"01":1,"00":2});function an(e){var e=null==(e=e.gqlStatus)?void 0:e.slice(0,2);return null!=(e=un[e])?e:9999}function sn(e){return null==e?{}:{offset:Gr.util.toNumber(e.offset),line:Gr.util.toNumber(e.line),column:Gr.util.toNumber(e.column)}}function cn(e){return Zr.includes(e)?e:Kr.UNKNOWN}function ln(e){return Xr.includes(e)?e:Qr.UNKNOWN}w.buildNotificationsFromMetadata=function(e){return null!=e.notifications?e.notifications.map(function(e){return new Jr(e)}):null!=e.statuses?e.statuses.map(tn).filter(function(e){return null!=e}):[]},w.default=Jr,Object.defineProperty(h,"__esModule",{value:!0}),h.Stats=h.QueryStatistics=h.ProfiledPlan=h.Plan=h.ServerInfo=h.queryType=void 0;var fn=b,pn=w,E=(dn.prototype.hasPlan=function(){return this.plan instanceof hn},dn.prototype.hasProfile=function(){return this.profile instanceof bn},dn);function dn(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new _n(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new hn(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new bn(r.profile),this.notifications=(0,pn.buildNotificationsFromMetadata)(r),this.gqlStatusObjects=(0,pn.buildGqlStatusObjectFromMetadata)(r),this.server=new mn(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 hn=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)}):[]},bn=(h.Plan=hn,yn.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},yn);function yn(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=gn("dbHits",e),this.rows=gn("rows",e),this.pageCacheMisses=gn("pageCacheMisses",e),this.pageCacheHits=gn("pageCacheHits",e),this.pageCacheHitRatio=gn("pageCacheHitRatio",e),this.time=gn("time",e),this.children=null!=e.children?e.children.map(function(e){return new yn(e)}):[]}h.ProfiledPlan=bn;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},vn.prototype.containsUpdates=function(){var r=this;return void 0!==this._containsUpdates?this._containsUpdates:0<Object.keys(this._stats).reduce(function(e,t){return e+r._stats[t]},0)},vn.prototype.updates=function(){return this._stats},vn.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},vn.prototype.systemUpdates=function(){return this._systemUpdates};var _n=vn;function vn(r){var n=this;this._stats={nodesCreated:0,nodesDeleted:0,relationshipsCreated:0,relationshipsDeleted:0,propertiesSet:0,labelsAdded:0,labelsRemoved:0,indexesAdded:0,indexesRemoved:0,constraintsAdded:0,constraintsRemoved:0},this._systemUpdates=0,Object.keys(r).forEach(function(e){var t=e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()});t in n._stats?n._stats[t]=fn.util.toNumber(r[e]):"systemUpdates"===t?n._systemUpdates=fn.util.toNumber(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}h.QueryStatistics=_n;var mn=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function gn(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?(t=t[e],fn.util.toNumber(t)):r}h.ServerInfo=mn;function On(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}function wn(e){console.log("Uncaught error when processing result: "+e)}function En(e){}function Pn(e){}h.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},h.default=E;var Sn,s={},Gt=(Object.defineProperty(s,"__esModule",{value:!0}),s.notificationFilterDisabledClassification=s.notificationFilterDisabledCategory=s.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),P=(s.notificationFilterMinimumSeverityLevel=Gt,Object.freeze(Gt),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC"}),Dr=(s.notificationFilterDisabledCategory=P,Object.freeze(P),P),o=(s.notificationFilterDisabledClassification=Dr,s.default=On,{}),Tn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},jn=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Fr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cn=(Object.defineProperty(o,"__esModule",{value:!0}),Fr(h)),In=b,Rn=t,An=In.connectionHolder.EMPTY_CONNECTION_HOLDER;function kn(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[Sn]="Result",this._stack=null==(i=new Error("")).stack?null:i.stack.replace(/^Error(\n\r)*/,""),this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:An,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}kn.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)})},kn.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)})},kn.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},kn.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,Rn.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return Tn(n,void 0,void 0,function(){var t;return jn(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,Rn.newError)("InvalidState: Result stream finished without Summary",Rn.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 Tn(n,void 0,void 0,function(){var t;return jn(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 Tn(n,void 0,void 0,function(){var t;return jn(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 Tn(n,void 0,void 0,function(){return jn(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()]}})})}}},kn.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},kn.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},kn.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},kn.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},kn.prototype.isOpen=function(){return null===this._summary&&null===this._error},kn.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)})},kn.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:En,i=null!=(e=n.onError)?e:wn,r=null!=(e=n.onKeys)?e:Pn;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)}}},kn.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},kn.prototype._releaseConnectionAndGetSummary=function(t){var e=In.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(e){return o.releaseConnection().then(function(){return null==e?void 0:e.getProtocolVersion()})},function(e){}).then(function(e){return new Cn.default(r,n,t,e)})},kn.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 Tn(this,void 0,void 0,function(){var t;return jn(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,Rn.newError)("Unexpected empty buffer",Rn.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 Tn(e,void 0,void 0,function(){var t;return jn(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 Tn(e,void 0,void 0,function(){var t,r;return jn(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},Sn=Symbol.toStringTag,o.default=kn;Tr={};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};E={},Object.defineProperty(E,"__esModule",{value:!0}),E.Releasable=void 0,Mn.prototype.release=function(){throw new Error("Not implemented")},Gt=Mn;function Mn(){}function Nn(){}E.Releasable=Gt,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")},E.default=Nn;P={};function xn(){}Object.defineProperty(P,"__esModule",{value:!0}),xn.prototype.beginTransaction=function(e){throw new Error("Not implemented")},xn.prototype.run=function(e,t,r){throw new Error("Not implemented")},xn.prototype.commitTransaction=function(e){throw new Error("Not implemented")},xn.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},xn.prototype.resetAndFlush=function(){throw new Error("Not implemented")},xn.prototype.isOpen=function(){throw new Error("Not implemented")},xn.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},xn.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},P.default=xn;var Dr={},Dn=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}}}},Fr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ln=(Object.defineProperty(Dr,"__esModule",{value:!0}),u),Fn=m,Bn=_,Wn=Pt,qn=y,zn=t,Vn=Fr(o);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,l=e.notificationFilter,e=e.apiTelemetryConfig,f=this;this._connectionHolder=t,this._reactive=i,this._state=Gn.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=Bn.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}Hn.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return Dn(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.beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(e){null!=u&&u.onError(e),r._onError(e).catch(function(){})},afterComplete:function(e){null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,zn.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,Ln.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===Gn.ACTIVE},Hn.prototype.close=function(){return Dn(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[Symbol.asyncDispose]=function(){return this.close()},Hn.prototype._onErrorCallback=function(t){return this._state===Gn.FAILED?Promise.resolve(null):(this._state=Gn.FAILED,this._onClose(),this._results.forEach(function(e){e.isOpen()&&e._streamObserverPromise.then(function(e){return e.onError(t)}).catch(function(e){})}),this._connectionHolder.releaseConnection())},Hn.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new Bn.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:Bn.Bookmarks.empty(),null==e?void 0:e.db)};var Gn={ACTIVE:{commit:function(e){return{result:Yn(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:Gn.SUCCEEDED}},rollback:function(e){return{result:Yn(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:Gn.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 Kn(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:Bn.Bookmarks.empty(),txConfig:Wn.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,zn.newError)("No connection available")}).catch(function(e){return new qn.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:Kn(new qn.FailedObserver({error:(0,zn.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:Gn.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:Kn(new qn.CompletedObserver,"ROLLBACK",{},t,0,0),state:Gn.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Kn(new qn.FailedObserver({error:(0,zn.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:Kn(new qn.FailedObserver({error:(0,zn.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},Fn.EMPTY_CONNECTION_HOLDER,0,0),state:Gn.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Kn(new qn.FailedObserver({error:(0,zn.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},Fn.EMPTY_CONNECTION_HOLDER,0,0),state:Gn.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Kn(new qn.FailedObserver({error:(0,zn.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:Kn(new qn.FailedObserver({error:(0,zn.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:Gn.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:Kn(new qn.FailedObserver({error:(0,zn.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:Gn.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Kn(new qn.FailedObserver({error:(0,zn.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.commitTransaction({beforeError:n,afterComplete:o}):t.rollbackTransaction({beforeError:n,afterComplete:o});throw(0,zn.newError)("No connection available")})}).catch(function(e){return new qn.FailedObserver({error:e,onError:n})});return new Vn.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function Kn(e,t,r,n,o,i){return void 0===n&&(n=Fn.EMPTY_CONNECTION_HOLDER),new Vn.default(Promise.resolve(e),t,r,new Fn.ReadOnlyConnectionHolder(null!=n?n:Fn.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}Dr.default=Hn;Gt={};function Zn(e){e=e.run;this._run=e}Object.defineProperty(Gt,"__esModule",{value:!0}),Zn.fromTransaction=function(e){return new Zn({run:e.run.bind(e)})},Zn.prototype.run=function(e,t){return this._run(e,t)},Gt.default=Zn;var Xn,Qn,Jn,Fr={},S=r&&r.__extends||(Xn=function(e,t){return(Xn=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}Xn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),$n=r&&r.__assign||function(){return($n=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}},T=(Object.defineProperty(Fr,"__esModule",{value:!0}),T(Dr)),T=(Jn=T.default,S(eo,Jn),eo.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},eo.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},eo.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},eo.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},eo.prototype._toTransaction=function(){return $n($n({},this),{run:Jn.prototype.run.bind(this),commit:Jn.prototype.commit.bind(this),rollback:Jn.prototype.rollback.bind(this),close:Jn.prototype.close.bind(this),isOpen:Jn.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},eo.prototype._begin=function(e,t){return Jn.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},eo.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},eo.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},eo);function eo(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,t=Jn.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:l,apiTelemetryConfig:e})||this;return t[Qn]="TransactionPromise",t}Qn=Symbol.toStringTag,Fr.default=T;var S={},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}}}},no=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},oo=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))},T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},io=(Object.defineProperty(S,"__esModule",{value:!0}),y),uo=u,ao=v,so=t,co=T(o),lo=m,fo=O,po=_,ho=Pt,bo=T(Fr),yo=T(Gt);function _o(e){var t=e.mode,r=e.connectionProvider,n=e.bookmarks,o=e.database,i=e.config,u=e.reactive,a=e.fetchSize,s=e.impersonatedUser,c=e.bookmarkManager,l=e.notificationFilter,f=e.auth,e=e.log,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new lo.ConnectionHolder({mode:ao.ACCESS_MODE_READ,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._writeConnectionHolder=new lo.ConnectionHolder({mode:ao.ACCESS_MODE_WRITE,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:po.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new fo.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=l,this._log=e}_o.prototype.run=function(e,t,r){var o=this,e=(0,uo.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new ho.TxConfig(r,this._log):ho.TxConfig.empty(),t=this._run(i,u,function(n){return to(o,void 0,void 0,function(){var t,r=this;return ro(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,apiTelemetryConfig:{api:ao.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(e){return r._onCompleteCallback(e,t)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter})]}})})});return this._results.push(t),t},_o.prototype._run=function(e,t,r){var r=this._acquireAndConsumeConnection(r),n=r.connectionHolder,r=r.resultPromise.catch(function(e){return Promise.resolve(new io.FailedObserver({error:e}))}),o={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new co.default(r,e,t,n,o)},_o.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return to(r,void 0,void 0,function(){return ro(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},_o.prototype._acquireAndConsumeConnection=function(t){var e=this._connectionHolderWithMode(this._mode),r=this._open?!this._hasTx&&e.initializeConnection()?e.getConnection().then(function(e){return t(e)}):Promise.reject((0,so.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,so.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:r}},_o.prototype.beginTransaction=function(e){var t=ho.TxConfig.empty();return null!=e&&(t=new ho.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:ao.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},_o.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,so.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,so.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=_o._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new bo.default({connectionHolder:e,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(e,t,r){return n._updateBookmarks(e,t,r)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:r});return e._begin(function(){return n._bookmarks()},t),e},_o.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,so.newError)("You cannot run more transactions on a closed session.")},_o.prototype._transactionClosed=function(){this._hasTx=!1},_o.prototype.lastBookmark=function(){return this.lastBookmarks()},_o.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},_o.prototype._bookmarks=function(){var r;return to(this,void 0,void 0,function(){var t;return ro(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new po.Bookmarks(oo(oo([],no(t),!1),no(this._configuredBookmarks),!1))]}})})},_o.prototype.readTransaction=function(e,t){t=new ho.TxConfig(t,this._log);return this._runTransaction(ao.ACCESS_MODE_READ,t,e)},_o.prototype.writeTransaction=function(e,t){t=new ho.TxConfig(t,this._log);return this._runTransaction(ao.ACCESS_MODE_WRITE,t,e)},_o.prototype._runTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e)},_o.prototype.executeRead=function(e,t){t=new ho.TxConfig(t,this._log);return this._executeInTransaction(ao.ACCESS_MODE_READ,t,e)},_o.prototype.executeWrite=function(e,t){t=new ho.TxConfig(t,this._log);return this._executeInTransaction(ao.ACCESS_MODE_WRITE,t,e)},_o.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,yo.default.fromTransaction)},_o.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},_o.prototype._getConnectionAcquistionBookmarks=function(){var r;return to(this,void 0,void 0,function(){var t;return ro(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new po.Bookmarks(oo(oo([],no(this._configuredBookmarks),!1),no(t),!1))]}})})},_o.prototype._updateBookmarks=function(e,t,r){var n;null==e||e.isEmpty()||(null!=(n=this._bookmarkManager)&&n.updateBookmarks(null!=(n=null==t?void 0:t.values())?n:[],null!=(t=null==e?void 0:e.values())?t:[]).catch(function(){}),this._lastBookmarks=e,this._configuredBookmarks=po.Bookmarks.empty())},_o.prototype.close=function(){return to(this,void 0,void 0,function(){return ro(this,function(e){switch(e.label){case 0:return this._open?(this._open=!1,this._results.forEach(function(e){return e._cancel()}),this._transactionExecutor.close(),[4,this._readConnectionHolder.close(this._hasTx)]):[3,3];case 1:return e.sent(),[4,this._writeConnectionHolder.close(this._hasTx)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},_o.prototype[Symbol.asyncDispose]=function(){return this.close()},_o.prototype._connectionHolderWithMode=function(e){if(e===ao.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===ao.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,so.newError)("Unknown access mode: "+e)},_o.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new po.Bookmarks(e.bookmark),t,e.db)},_o.prototype._calculateWatermaks=function(){return this._fetchSize===ao.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},_o.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},_o._validateSessionMode=function(e){e=null!=e?e:ao.ACCESS_MODE_WRITE;if(e!==ao.ACCESS_MODE_READ&&e!==ao.ACCESS_MODE_WRITE)throw(0,so.newError)("Illegal session mode "+e);return e},S.default=_o;var y={},m={},vo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},mo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},go=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Oo=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},wo=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(m,"__esModule",{value:!0}),m.bookmarkManager=void 0,Eo.prototype.updateBookmarks=function(e,t){return vo(this,void 0,void 0,function(){return mo(this,function(e){throw new Error("Not implemented")})})},Eo.prototype.getBookmarks=function(){return vo(this,void 0,void 0,function(){return mo(this,function(e){throw new Error("Not implemented")})})},Eo);function Eo(){throw new Error("Not implemented")}m.default=O,m.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Po(t,e.bookmarksSupplier,e.bookmarksConsumer)};So.prototype.updateBookmarks=function(f,p){return vo(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return mo(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=go(f),n=r.next();!n.done;n=r.next())u=n.value,t.delete(u)}catch(e){a={error:e}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}try{for(o=go(p),i=o.next();!i.done;i=o.next())u=i.value,t.add(u)}catch(e){c={error:e}}finally{try{i&&!i.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}}return"function"!=typeof this._bookmarksConsumer?[3,2]:[4,this._bookmarksConsumer(wo([],Oo(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},So.prototype.getBookmarks=function(){var s;return vo(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return mo(this,function(e){switch(e.label){case 0:return t=new Set(this._bookmarks),"function"!=typeof this._bookmarksSupplier?[3,2]:[4,this._bookmarksSupplier()];case 1:r=null!=(s=e.sent())?s:[];try{for(n=go(r),o=n.next();!o.done;o=n.next())i=o.value,t.add(i)}catch(e){u={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(u)throw u.error}}e.label=2;case 2:return[2,wo([],Oo(t),!1)]}})})};var Po=So;function So(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Pt={},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())})},jo=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}}}},T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Co=(Object.defineProperty(Pt,"__esModule",{value:!0}),T(Tr)),Io=t;function Ro(){}Ro.prototype.eagerResultTransformer=function(){return Ao},Ro.prototype.eager=function(){return Ao},Ro.prototype.mappedResultTransformer=function(e){return ko(e)},Ro.prototype.mapped=function(e){return ko(e)},Ro.prototype.first=function(){return Mo},Ro.prototype.summary=function(){return No};O=new Ro;function Ao(o){return To(this,void 0,void 0,function(){var t,r,n;return jo(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 Co.default(n,r,t)]}})})}function ko(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,Io.newError)("Requires a map or/and a collect functions.");return function(o){return To(e,void 0,void 0,function(){return jo(this,function(e){switch(e.label){case 0:return[4,new Promise(function(t,r){var n={records:[],keys:[]};o.subscribe({onKeys:function(e){n.keys=e},onNext:function(e){var t;null!=i.map?void 0!==(t=i.map(e))&&n.records.push(t):n.records.push(e)},onCompleted:function(e){null!=i.collect?t(i.collect(n.records,e,n.keys)):(e={records:n.records,summary:e,keys:n.keys},t(e))},onError:function(e){r(e)}})})];case 1:return[2,e.sent()]}})})}}function Mo(o){return To(this,void 0,void 0,function(){var t,r,n;return jo(this,function(e){switch(e.label){case 0:return[4,(t=o[Symbol.asyncIterator]()).next()];case 1:n=e.sent(),r=n.value,n=n.done,e.label=2;case 2:return e.trys.push([2,,3,6]),!0===n?[2,void 0]:[2,r];case 3:return null==t.return?[3,5]:[4,t.return()];case 4:e.sent(),e.label=5;case 5:return[7];case 6:return[2]}})})}function No(t){return To(this,void 0,void 0,function(){return jo(this,function(e){switch(e.label){case 0:return[4,t.summary()];case 1:return[2,e.sent()]}})})}Object.freeze(O),Pt.default=O;var T={},xo=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())})},Do=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}}}},Uo=(Object.defineProperty(T,"__esModule",{value:!0}),v);function Lo(e){this._createSession=e}Lo.prototype.execute=function(o,i,u){return xo(this,void 0,void 0,function(){var t,r,n=this;return Do(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser,auth:o.auth}),r=function(e,t,r){"function"==typeof(null==e?void 0:e.addEventListener)&&e.addEventListener(t,r);return{uninstall:function(){"function"==typeof(null==e?void 0:e.removeEventListener)&&e.removeEventListener(t,r)}}}(o.signal,"abort",function(){return xo(n,void 0,void 0,function(){return Do(this,function(e){switch(e.label){case 0:return[4,t.close()];case 1:return[2,e.sent()]}})})}),t._configureTransactionExecutor(!0,Uo.TELEMETRY_APIS.EXECUTE_QUERY),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READ"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return xo(n,void 0,void 0,function(){var t;return Do(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})},o.transactionConfig)];case 2:return[2,e.sent()];case 3:return r.uninstall(),[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},T.default=Lo;function Fo(){this.routing=ni.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0,this.auth=void 0,this.signal=void 0}var Bo=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())})},Wo=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}},qo=(Object.defineProperty(y,"__esModule",{value:!0}),y.QueryConfig=y.SessionConfig=y.routing=y.WRITE=y.READ=y.Driver=void 0,_),zo=O(Ar),Vo=v,Ho=g,Go=O(S),Yo=u,Ko=m,Zo=O(Pt),Xo=O(T),Qo=t,Jo=36e5,$o=1e3,ei=Vo.ACCESS_MODE_READ,ti=(y.READ=ei,Vo.ACCESS_MODE_WRITE),ri=(y.WRITE=ti,0),ni=(y.SessionConfig=function(){this.defaultAccessMode=ti,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"}),_=(y.routing=ni,Object.freeze(ni),y.QueryConfig=Fo,Object.defineProperty(oi.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),oi.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),Bo(this,void 0,void 0,function(){var t,r,n;return Wo(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:Zo.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:ni.WRITE)!==ni.READ&&n!==ni.WRITE)throw(0,Qo.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser,transactionConfig:u.transactionConfig,auth:u.auth,signal:u.signal},o,i)];case 1:return[2,e.sent()]}})})},oi.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:ei})},oi.prototype.verifyAuthentication=function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return Bo(this,void 0,void 0,function(){return Wo(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:ei})];case 1:return[2,e.sent()]}})})},oi.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:ei})},oi.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},oi.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},oi.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},oi.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},oi.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},oi.prototype.isEncrypted=function(){return this._isEncrypted()},oi.prototype._supportsRouting=function(){return this._meta.routing},oi.prototype._isEncrypted=function(){return this._config.encrypted===Yo.ENCRYPTION_ON||!0===this._config.encrypted},oi.prototype._getTrust=function(){return this._config.trust},oi.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?ti:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:ui(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},oi.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},oi.prototype[Symbol.asyncDispose]=function(){return this.close()},oi.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},oi.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=Go.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),r=null!=r?new qo.Bookmarks(r):qo.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:c,bookmarks:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:s,auth:e,log:this._log})},oi.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new zo.default(e.resolver)))),this._connectionProvider},oi);function oi(e,t,r,n,o){void 0===n&&(n=function(e){return new Go.default(e)}),void 0===o&&(o=function(e){return new Xo.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=ii(i.maxConnectionLifetime,Jo),i.maxConnectionPoolSize=ii(i.maxConnectionPoolSize,Vo.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=ii(i.connectionAcquisitionTimeout,Vo.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=ui(i.fetchSize,$o),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?Vo.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i),i.connectionLivenessCheckTimeout=function(e){if(null==e)return;e=parseInt(e,10);if(e<0||Number.isNaN(e))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(e));return e}(i.connectionLivenessCheckTimeout);var i=Ho.Logger.create(t);!function(e,t){var r=e.resolver;if(null!=r&&"function"!=typeof r)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof r));e.connectionAcquisitionTimeout<e.connectionTimeout&&t.warn('Configuration for "connectionAcquisitionTimeout" should be greater than or equal to "connectionTimeout". Otherwise, the connection acquisition timeout will take precedence for over the connection timeout in scenarios where a new connection is created while it is acquired');if(null==(null==(r=e.notificationFilter)?void 0:r.disabledCategories)||null==(null==(t=e.notificationFilter)?void 0:t.disabledClassifications))return;throw new Error('The notificationFilter can\'t have both "disabledCategories" and "disabledClassifications" configured at the same time.')}(t,i),this._id=ri++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,Ko.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function ii(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function ui(e,t){e=parseInt(e,10);if(0<e||e===Vo.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(Vo.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}y.Driver=_,y.default=_;Ar={};function ai(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.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 ai(t)&&(n.credentials=t),ai(r)&&(n.realm=r),ai(o)&&(n.parameters=o),n}};var v={},si=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())})},ci=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},li=(Object.defineProperty(v,"__esModule",{value:!0}),v.staticAuthTokenManager=v.authTokenManagers=v.AuthTokenAndExpiration=void 0,g(Ar)),fi=b;function pi(){}function di(){}pi.prototype.getToken=function(){throw new Error("Not Implemented")},pi.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},v.default=pi,v.AuthTokenAndExpiration=function(){this.token=li.default.none(),this.expiration=void 0},di.prototype.bearer=function(e){e=e.tokenProvider;if("function"!=typeof e)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof e));return new yi(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},di.prototype.basic=function(e){var t=this,r=e.tokenProvider;if("function"!=typeof r)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof r));return new yi(function(){return si(t,void 0,void 0,function(){var t;return ci(this,function(e){switch(e.label){case 0:return t={},[4,r()];case 1:return[2,(t.token=e.sent(),t)]}})})},["Neo.ClientError.Security.Unauthorized"])};u=new di;v.authTokenManagers=u,Object.freeze(u),v.staticAuthTokenManager=function(e){return e=e.authToken,new vi(e)};bi.prototype.subscribe=function(e){this._subscribers.push(e)},bi.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},bi.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var hi=bi;function bi(e){this._subscribers=e=void 0===e?[]:e}_i.prototype.getToken=function(){var t;return si(this,void 0,void 0,function(){return ci(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]}})})},_i.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(fi.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},_i.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new hi,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)},_i.prototype._refreshAuthToken=function(){return si(this,void 0,void 0,function(){var r=this;return ci(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 yi=_i;function _i(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}mi.prototype.getToken=function(){return this._authToken},mi.prototype.handleSecurityException=function(e,t){return!1};var vi=mi;function mi(e){this._authToken=e}function gi(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0}var Oi,wi,O={},T=r&&r.__extends||(Oi=function(e,t){return(Oi=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}Oi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),_=(Object.defineProperty(O,"__esModule",{value:!0}),O.InternalConfig=O.Config=void 0,O.Config=gi,T(Ei,wi=gi),Ei);function Ei(){return null!==wi&&wi.apply(this,arguments)||this}O.InternalConfig=_;var Pi,g={},u=r&&r.__extends||(Pi=function(e,t){return(Pi=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}Pi(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)},Ti=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]}),ji=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),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)&&Ti(t,e,r);return ji(t,e),t},Ci=(Object.defineProperty(g,"__esModule",{value:!0}),g.resolveCertificateProvider=g.clientCertificateProviders=g.RotatingClientCertificateProvider=g.ClientCertificateProvider=void 0,T(a)),_=(g.default=function(){this.certfile="",this.keyfile="",this.password=void 0},Ii.prototype.hasUpdate=function(){throw new Error("Not Implemented")},Ii.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},Ii);function Ii(){}g.ClientCertificateProvider=_;u(Ai,Ri=_),Ai.prototype.updateCertificate=function(e){throw new Error("Not implemented")};var Ri,T=Ai;function Ai(){return null!==Ri&&Ri.apply(this,arguments)||this}function ki(){}g.RotatingClientCertificateProvider=T,ki.prototype.rotating=function(e){e=e.initialCertificate;if(null==e||!Mi(e))throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(Ci.stringify(e)));e=Si({},e);return new Ji(e)};u=new ki;function Mi(e){return null!=e&&"object"==typeof e&&"certfile"in e&&(Ni(r=e.certfile)||xi(r,Ni))&&"keyfile"in e&&(t(r=e.keyfile)||xi(r,t))&&Di("password",e);function t(e){return"string"==typeof e||null!=e&&"object"==typeof e&&"path"in e&&"string"==typeof e.path&&Di("password",e)}var r}function Ni(e){return"string"==typeof e}function xi(e,t,r){return void 0===r&&(r=!1),Array.isArray(e)&&(r||0<e.length)&&e.filter(t).length===e.length}function Di(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}g.clientCertificateProviders=u,Object.freeze(u),g.resolveCertificateProvider=function(e){if(null!=e){if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;var t;if(Mi(e))return t=Si({},e),{getClientCertificate:function(){return t},hasUpdate:function(){return!1}};throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(Ci.stringify(e)))}};$i.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},$i.prototype.getClientCertificate=function(){return this._certificate},$i.prototype.updateCertificate=function(e){if(!Mi(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(Ci.stringify(e)));this._certificate=Si({},e),this._updated=!0};var Ui,Li,Fi,Bi,Wi,qi,zi,Vi,Hi,Gi,Yi,Ki,Zi,Xi,Qi,Ji=$i;function $i(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}_=e,Ui=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]}),Li=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),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)&&Ui(t,e,r);return Li(t,e),t},u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(_,"__esModule",{value:!0}),_.Releasable=_.ConnectionProvider=_.EagerResult=_.Result=_.Stats=_.QueryStatistics=_.ProfiledPlan=_.Plan=_.GqlStatusObject=_.Notification=_.ServerInfo=_.queryType=_.ResultSummary=_.Record=_.isPathSegment=_.PathSegment=_.isPath=_.Path=_.isUnboundRelationship=_.UnboundRelationship=_.isRelationship=_.Relationship=_.isNode=_.Node=_.Time=_.LocalTime=_.LocalDateTime=_.isTime=_.isLocalTime=_.isLocalDateTime=_.isDuration=_.isDateTime=_.isDate=_.Duration=_.DateTime=_.Date=_.Point=_.isPoint=_.internal=_.toString=_.toNumber=_.inSafeRange=_.isInt=_.int=_.Integer=_.error=_.isRetriableError=_.Neo4jError=_.newError=_.authTokenManagers=void 0,_.resolveCertificateProvider=_.clientCertificateProviders=_.notificationFilterMinimumSeverityLevel=_.notificationFilterDisabledClassification=_.notificationFilterDisabledCategory=_.notificationSeverityLevel=_.notificationClassification=_.notificationCategory=_.resultTransformers=_.routing=_.staticAuthTokenManager=_.bookmarkManager=_.auth=_.json=_.driver=_.types=_.Driver=_.Session=_.TransactionPromise=_.ManagedTransaction=_.Transaction=_.Connection=void 0,Fi=t,Object.defineProperty(_,"newError",{enumerable:!0,get:function(){return Fi.newError}}),Object.defineProperty(_,"Neo4jError",{enumerable:!0,get:function(){return Fi.Neo4jError}}),Object.defineProperty(_,"isRetriableError",{enumerable:!0,get:function(){return Fi.isRetriableError}}),Bi=T(n),_.Integer=Bi.default,Object.defineProperty(_,"int",{enumerable:!0,get:function(){return Bi.int}}),Object.defineProperty(_,"isInt",{enumerable:!0,get:function(){return Bi.isInt}}),Object.defineProperty(_,"inSafeRange",{enumerable:!0,get:function(){return Bi.inSafeRange}}),Object.defineProperty(_,"toNumber",{enumerable:!0,get:function(){return Bi.toNumber}}),Object.defineProperty(_,"toString",{enumerable:!0,get:function(){return Bi.toString}}),Wi=i,Object.defineProperty(_,"Date",{enumerable:!0,get:function(){return Wi.Date}}),Object.defineProperty(_,"DateTime",{enumerable:!0,get:function(){return Wi.DateTime}}),Object.defineProperty(_,"Duration",{enumerable:!0,get:function(){return Wi.Duration}}),Object.defineProperty(_,"isDate",{enumerable:!0,get:function(){return Wi.isDate}}),Object.defineProperty(_,"isDateTime",{enumerable:!0,get:function(){return Wi.isDateTime}}),Object.defineProperty(_,"isDuration",{enumerable:!0,get:function(){return Wi.isDuration}}),Object.defineProperty(_,"isLocalDateTime",{enumerable:!0,get:function(){return Wi.isLocalDateTime}}),Object.defineProperty(_,"isLocalTime",{enumerable:!0,get:function(){return Wi.isLocalTime}}),Object.defineProperty(_,"isTime",{enumerable:!0,get:function(){return Wi.isTime}}),Object.defineProperty(_,"LocalDateTime",{enumerable:!0,get:function(){return Wi.LocalDateTime}}),Object.defineProperty(_,"LocalTime",{enumerable:!0,get:function(){return Wi.LocalTime}}),Object.defineProperty(_,"Time",{enumerable:!0,get:function(){return Wi.Time}}),qi=p,Object.defineProperty(_,"Node",{enumerable:!0,get:function(){return qi.Node}}),Object.defineProperty(_,"isNode",{enumerable:!0,get:function(){return qi.isNode}}),Object.defineProperty(_,"Relationship",{enumerable:!0,get:function(){return qi.Relationship}}),Object.defineProperty(_,"isRelationship",{enumerable:!0,get:function(){return qi.isRelationship}}),Object.defineProperty(_,"UnboundRelationship",{enumerable:!0,get:function(){return qi.UnboundRelationship}}),Object.defineProperty(_,"isUnboundRelationship",{enumerable:!0,get:function(){return qi.isUnboundRelationship}}),Object.defineProperty(_,"Path",{enumerable:!0,get:function(){return qi.Path}}),Object.defineProperty(_,"isPath",{enumerable:!0,get:function(){return qi.isPath}}),Object.defineProperty(_,"PathSegment",{enumerable:!0,get:function(){return qi.PathSegment}}),Object.defineProperty(_,"isPathSegment",{enumerable:!0,get:function(){return qi.isPathSegment}}),t=u(Ze),_.Record=t.default,zi=l,Object.defineProperty(_,"isPoint",{enumerable:!0,get:function(){return zi.isPoint}}),Object.defineProperty(_,"Point",{enumerable:!0,get:function(){return zi.Point}}),Vi=T(h),_.ResultSummary=Vi.default,Object.defineProperty(_,"queryType",{enumerable:!0,get:function(){return Vi.queryType}}),Object.defineProperty(_,"ServerInfo",{enumerable:!0,get:function(){return Vi.ServerInfo}}),Object.defineProperty(_,"Plan",{enumerable:!0,get:function(){return Vi.Plan}}),Object.defineProperty(_,"ProfiledPlan",{enumerable:!0,get:function(){return Vi.ProfiledPlan}}),Object.defineProperty(_,"QueryStatistics",{enumerable:!0,get:function(){return Vi.QueryStatistics}}),Object.defineProperty(_,"Stats",{enumerable:!0,get:function(){return Vi.Stats}}),Hi=T(w),_.Notification=Hi.default,Object.defineProperty(_,"GqlStatusObject",{enumerable:!0,get:function(){return Hi.GqlStatusObject}}),Object.defineProperty(_,"notificationCategory",{enumerable:!0,get:function(){return Hi.notificationCategory}}),Object.defineProperty(_,"notificationClassification",{enumerable:!0,get:function(){return Hi.notificationClassification}}),Object.defineProperty(_,"notificationSeverityLevel",{enumerable:!0,get:function(){return Hi.notificationSeverityLevel}}),Gi=s,Object.defineProperty(_,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return Gi.notificationFilterDisabledCategory}}),Object.defineProperty(_,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return Gi.notificationFilterDisabledClassification}}),Object.defineProperty(_,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return Gi.notificationFilterMinimumSeverityLevel}}),n=u(o),_.Result=n.default,i=u(Tr),_.EagerResult=i.default,Yi=T(E),_.ConnectionProvider=Yi.default,Object.defineProperty(_,"Releasable",{enumerable:!0,get:function(){return Yi.Releasable}}),p=u(P),_.Connection=p.default,Ze=u(Dr),_.Transaction=Ze.default,l=u(Gt),_.ManagedTransaction=l.default,h=u(Fr),_.TransactionPromise=h.default,w=u(S),_.Session=w.default,s=T(y),o=s,_.Driver=s.default,_.driver=o,Tr=u(Ar),_.auth=Tr.default,Ki=m,Object.defineProperty(_,"bookmarkManager",{enumerable:!0,get:function(){return Ki.bookmarkManager}}),Zi=v,Object.defineProperty(_,"authTokenManagers",{enumerable:!0,get:function(){return Zi.authTokenManagers}}),Object.defineProperty(_,"staticAuthTokenManager",{enumerable:!0,get:function(){return Zi.staticAuthTokenManager}}),Xi=y,Object.defineProperty(_,"routing",{enumerable:!0,get:function(){return Xi.routing}}),E=T(O),_.types=E,P=T(a),_.json=P,u=u(Pt),_.resultTransformers=u.default,Qi=g,Object.defineProperty(_,"clientCertificateProviders",{enumerable:!0,get:function(){return Qi.clientCertificateProviders}}),Object.defineProperty(_,"resolveCertificateProvider",{enumerable:!0,get:function(){return Qi.resolveCertificateProvider}}),T=T(b),_.internal=T,Dr={SERVICE_UNAVAILABLE:Fi.SERVICE_UNAVAILABLE,SESSION_EXPIRED:Fi.SESSION_EXPIRED,PROTOCOL_ERROR:Fi.PROTOCOL_ERROR},_.error=Dr,Dr={authTokenManagers:Zi.authTokenManagers,newError:Fi.newError,Neo4jError:Fi.Neo4jError,isRetriableError:Fi.isRetriableError,error:Dr,Integer:Bi.default,int:Bi.int,isInt:Bi.isInt,inSafeRange:Bi.inSafeRange,toNumber:Bi.toNumber,toString:Bi.toString,internal:T,isPoint:zi.isPoint,Point:zi.Point,Date:Wi.Date,DateTime:Wi.DateTime,Duration:Wi.Duration,isDate:Wi.isDate,isDateTime:Wi.isDateTime,isDuration:Wi.isDuration,isLocalDateTime:Wi.isLocalDateTime,isLocalTime:Wi.isLocalTime,isTime:Wi.isTime,LocalDateTime:Wi.LocalDateTime,LocalTime:Wi.LocalTime,Time:Wi.Time,Node:qi.Node,isNode:qi.isNode,Relationship:qi.Relationship,isRelationship:qi.isRelationship,UnboundRelationship:qi.UnboundRelationship,isUnboundRelationship:qi.isUnboundRelationship,Path:qi.Path,isPath:qi.isPath,PathSegment:qi.PathSegment,isPathSegment:qi.isPathSegment,Record:t.default,ResultSummary:Vi.default,queryType:Vi.queryType,ServerInfo:Vi.ServerInfo,Notification:Hi.default,GqlStatusObject:Hi.GqlStatusObject,Plan:Vi.Plan,ProfiledPlan:Vi.ProfiledPlan,QueryStatistics:Vi.QueryStatistics,Stats:Vi.Stats,Result:n.default,EagerResult:i.default,Transaction:Ze.default,ManagedTransaction:l.default,TransactionPromise:h.default,Session:w.default,Driver:s.default,Connection:p.default,Releasable:Yi.Releasable,types:E,driver:o,json:P,auth:Tr.default,bookmarkManager:Ki.bookmarkManager,routing:Xi.routing,resultTransformers:u.default,notificationCategory:Hi.notificationCategory,notificationClassification:Hi.notificationClassification,notificationSeverityLevel:Hi.notificationSeverityLevel,notificationFilterDisabledCategory:Gi.notificationFilterDisabledCategory,notificationFilterDisabledClassification:Gi.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:Gi.notificationFilterMinimumSeverityLevel,clientCertificateProviders:Qi.clientCertificateProviders,resolveCertificateProvider:Qi.resolveCertificateProvider},_.default=Dr;Gt={},Fr={},S={},Ar={},m={};Object.defineProperty(m,"__esModule",{value:!0}),m.isFunction=void 0,m.isFunction=function(e){return"function"==typeof e};v={},y={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.createErrorClass=void 0,O.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;a=O,y.UnsubscriptionError=a.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}}),Pt={};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.arrRemove=void 0,Pt.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var eu=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.")},tu=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},ru=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},nu=(Object.defineProperty(v,"__esModule",{value:!0}),v.isSubscription=v.EMPTY_SUBSCRIPTION=v.Subscription=void 0,m),ou=y,iu=Pt,uu=(au.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=eu(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(nu.isFunction(u))try{u()}catch(e){r=e instanceof ou.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=eu(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{su(l)}catch(e){r=null!=r?r:[],e instanceof ou.UnsubscriptionError?r=ru(ru([],tu(r)),tu(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 ou.UnsubscriptionError(r)}},au.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)su(e);else{if(e instanceof au){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},au.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},au.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},au.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&iu.arrRemove(t,e)},au.prototype.remove=function(e){var t=this._finalizers;t&&iu.arrRemove(t,e),e instanceof au&&e._removeParent(this)},au.EMPTY=((g=new au).closed=!0,g),au);function au(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function su(e){nu.isFunction(e)?e():e.unsubscribe()}v.Subscription=uu,v.EMPTY_SUBSCRIPTION=uu.EMPTY,v.isSubscription=function(e){return e instanceof uu||e&&"closed"in e&&nu.isFunction(e.remove)&&nu.isFunction(e.add)&&nu.isFunction(e.unsubscribe)};var cu,lu,fu,b={},T=(Object.defineProperty(b,"__esModule",{value:!0}),b.config=void 0,b.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),t={},pu=(cu=t,lu=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},fu=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(cu,"__esModule",{value:!0}),cu.timeoutProvider=void 0,cu.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=cu.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,fu([e,t],lu(r))):setTimeout.apply(void 0,fu([e,t],lu(r)))},clearTimeout:function(e){var t=cu.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(T,"__esModule",{value:!0}),T.reportUnhandledError=void 0,b),du=t;T.reportUnhandledError=function(t){du.timeoutProvider.setTimeout(function(){var e=pu.config.onUnhandledError;if(!e)throw t;e(t)})};n={};Object.defineProperty(n,"__esModule",{value:!0}),n.noop=void 0,n.noop=function(){};i={};function hu(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=hu("C",void 0,void 0),i.errorNotification=function(e){return hu("E",void 0,e)},i.nextNotification=function(e){return hu("N",e,void 0)},i.createNotification=hu;var bu,yu,_u,vu,mu,gu,Ou,wu,Eu,Pu,Su,Tu,ju,Cu,Ze={},Iu=(Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.captureError=Ze.errorContext=void 0,b),Ru=null;function Au(e){var t=_u.call(this)||this;return t.isStopped=!1,e?(t.destination=e,mu.isSubscription(e)&&e.add(t)):t.destination=bu.EMPTY_OBSERVER,t}function ku(e,t){return Su.call(e,t)}function Mu(e){this.partialObserver=e}function Nu(e,t,r){var n=ju.call(this)||this;return r=vu.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&gu.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&ku(e.next,t),error:e.error&&ku(e.error,t),complete:e.complete&&ku(e.complete,t)}):e,n.destination=new Tu(r),n}function xu(e){gu.config.useDeprecatedSynchronousErrorHandling?Pu.captureError(e):Ou.reportUnhandledError(e)}function Du(e,t){var r=gu.config.onStoppedNotification;r&&Eu.timeoutProvider.setTimeout(function(){return r(e,t)})}Ze.errorContext=function(e){if(Iu.config.useDeprecatedSynchronousErrorHandling){var t=!Ru;if(t&&(Ru={errorThrown:!1,error:null}),e(),t){var t=Ru,r=t.errorThrown,t=t.error;if(Ru=null,r)throw t}}else e()},Ze.captureError=function(e){Iu.config.useDeprecatedSynchronousErrorHandling&&Ru&&(Ru.errorThrown=!0,Ru.error=e)},bu=Ar,l=r&&r.__extends||(yu=function(e,t){return(yu=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}yu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(bu,"__esModule",{value:!0}),bu.EMPTY_OBSERVER=bu.SafeSubscriber=bu.Subscriber=void 0,vu=m,gu=b,Ou=T,h=n,wu=i,Eu=t,Pu=Ze,_u=(mu=v).Subscription,l(Au,_u),Au.create=function(e,t,r){return new Cu(e,t,r)},Au.prototype.next=function(e){this.isStopped?Du(wu.nextNotification(e),this):this._next(e)},Au.prototype.error=function(e){this.isStopped?Du(wu.errorNotification(e),this):(this.isStopped=!0,this._error(e))},Au.prototype.complete=function(){this.isStopped?Du(wu.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},Au.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,_u.prototype.unsubscribe.call(this),this.destination=null)},Au.prototype._next=function(e){this.destination.next(e)},Au.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},Au.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},w=Au,bu.Subscriber=w,Su=Function.prototype.bind,Mu.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){xu(e)}},Mu.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){xu(e)}else xu(e)},Mu.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){xu(e)}},Tu=Mu,l(Nu,ju=w),Cu=Nu,bu.SafeSubscriber=Cu,bu.EMPTY_OBSERVER={closed:!0,next:h.noop,error:function(e){throw e},complete:h.noop};s={},Object.defineProperty(s,"__esModule",{value:!0}),s.observable=void 0,s.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",p={},E={};Object.defineProperty(E,"__esModule",{value:!0}),E.identity=void 0,E.identity=function(e){return e},Object.defineProperty(p,"__esModule",{value:!0}),p.pipeFromArray=p.pipe=void 0;var Uu=E;function Lu(t){return 0===t.length?Uu.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}p.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Lu(e)},p.pipeFromArray=Lu,Object.defineProperty(S,"__esModule",{value:!0}),S.Observable=void 0;var Fu=Ar,Bu=v,o=s,Wu=p,qu=b,zu=m,Vu=Ze;function Hu(e){e&&(this._subscribe=e)}function Gu(e){return null!=(e=null!=e?e:qu.config.Promise)?e:Promise}Hu.prototype.lift=function(e){var t=new Hu;return t.source=this,t.operator=e,t},Hu.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof Fu.Subscriber||function(e){return e&&zu.isFunction(e.next)&&zu.isFunction(e.error)&&zu.isFunction(e.complete)}(n)&&Bu.isSubscription(n)?e:new Fu.SafeSubscriber(e,t,r);return Vu.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},Hu.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},Hu.prototype.forEach=function(n,e){var o=this;return new(e=Gu(e))(function(e,t){var r=new Fu.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},Hu.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},Hu.prototype[o.observable]=function(){return this},Hu.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Wu.pipeFromArray(e)(this)},Hu.prototype.toPromise=function(e){var n=this;return new(e=Gu(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},Hu.create=function(e){return new Hu(e)},S.Observable=Hu;var P={},Tr={},u={},Yu=(Object.defineProperty(u,"__esModule",{value:!0}),u.operate=u.hasLift=void 0,m);function Ku(e){return Yu.isFunction(null==e?void 0:e.lift)}u.hasLift=Ku,u.operate=function(t){return function(e){if(Ku(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 Zu,_={},Dr=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)}),a=(Object.defineProperty(_,"__esModule",{value:!0}),_.OperatorSubscriber=_.createOperatorSubscriber=void 0,Ar);_.createOperatorSubscriber=function(e,t,r,n,o){return new Qu(e,t,r,n,o)};Dr(Ju,Xu=a.Subscriber),Ju.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,Xu.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var Xu,Qu=Ju;function Ju(t,r,e,n,o,i){var u=Xu.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:Xu.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:Xu.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:Xu.prototype._complete,u}_.OperatorSubscriber=Qu,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.refCount=void 0;var $u=u,ea=_;Tr.refCount=function(){return $u.operate(function(r,n){var o=null,e=(r._refCount++,ea.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 ta,g=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(P,"__esModule",{value:!0}),P.ConnectableObservable=void 0;var ra,na=v,oa=Tr,ia=_,ua=u,i=(ra=S.Observable,g(aa,ra),aa.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},aa.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},aa.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},aa.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new na.Subscription,t=this.getSubject(),e.add(this.source.subscribe(ia.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=na.Subscription.EMPTY)),e},aa.prototype.refCount=function(){return oa.refCount()(this)},aa);function aa(e,t){var r=ra.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,ua.hasLift(e)&&(r.lift=e.lift),r}P.ConnectableObservable=i;var sa,ca,la,fa,pa,t={},l={},w=(sa=l,Object.defineProperty(sa,"__esModule",{value:!0}),sa.performanceTimestampProvider=void 0,sa.performanceTimestampProvider={now:function(){return(sa.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),da=(ca=w,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){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(ca,"__esModule",{value:!0}),ca.animationFrameProvider=void 0,pa=v,ca.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=ca.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new pa.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=ca.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,fa([],la(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ca.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,fa([],la(e)))},delegate:void 0},Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0,S),ha=l,ba=w;function ya(a){return new da.Observable(function(r){var n=a||ha.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=ba.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&ba.animationFrameProvider.cancelAnimationFrame(i)}})}t.animationFrames=function(e){return e?ya(e):ma};var _a,va,ma=ya(),h={},o={},Dr=(Object.defineProperty(o,"__esModule",{value:!0}),o.ObjectUnsubscribedError=void 0,O),a=(o.ObjectUnsubscribedError=Dr.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),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)})),ga=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Oa=(Object.defineProperty(h,"__esModule",{value:!0}),h.AnonymousSubject=h.Subject=void 0,S),wa=v,Ea=o,Pa=Pt,Sa=Ze,g=(va=Oa.Observable,a(Ta,va),Ta.prototype.lift=function(e){var t=new Ca(this,this);return t.operator=e,t},Ta.prototype._throwIfClosed=function(){if(this.closed)throw new Ea.ObjectUnsubscribedError},Ta.prototype.next=function(o){var i=this;Sa.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=ga(i.currentObservers),n=r.next();!n.done;n=r.next())n.value.next(o)}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}})},Ta.prototype.error=function(t){var r=this;Sa.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)}})},Ta.prototype.complete=function(){var t=this;Sa.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},Ta.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(Ta.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),Ta.prototype._trySubscribe=function(e){return this._throwIfClosed(),va.prototype._trySubscribe.call(this,e)},Ta.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},Ta.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?wa.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new wa.Subscription(function(){t.currentObservers=null,Pa.arrRemove(o,e)}))},Ta.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},Ta.prototype.asObservable=function(){var e=new Oa.Observable;return e.source=this,e},Ta.create=function(e,t){return new Ca(e,t)},Ta);function Ta(){var e=va.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}h.Subject=g;a(Ia,ja=g),Ia.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},Ia.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},Ia.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},Ia.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:wa.EMPTY_SUBSCRIPTION};var ja,Ca=Ia;function Ia(e,t){var r=ja.call(this)||this;return r.destination=e,r.source=t,r}h.AnonymousSubject=Ca;var Ra,i={},l=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)});Object.defineProperty(i,"__esModule",{value:!0}),i.BehaviorSubject=void 0;Aa=h.Subject,l(ka,Aa),Object.defineProperty(ka.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),ka.prototype._subscribe=function(e){var t=Aa.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},ka.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},ka.prototype.next=function(e){Aa.prototype.next.call(this,this._value=e)};var Aa,Dr=ka;function ka(e){var t=Aa.call(this)||this;return t._value=e,t}i.BehaviorSubject=Dr;var Ma,Na,Ze={},a={},g=(Ma=a,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.dateTimestampProvider=void 0,Ma.dateTimestampProvider={now:function(){return(Ma.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(Na=function(e,t){return(Na=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}Na(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.ReplaySubject=void 0;var xa,Da=a,l=(xa=h.Subject,g(Ua,xa),Ua.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(),xa.prototype.next.call(this,e)},Ua.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},Ua.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)}},Ua);function Ua(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=Da.dateTimestampProvider);var n=xa.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}Ze.ReplaySubject=l;var La,Dr={},g=r&&r.__extends||(La=function(e,t){return(La=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}La(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.AsyncSubject=void 0;Fa=h.Subject,g(Ba,Fa),Ba.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())},Ba.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},Ba.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&Fa.prototype.next.call(this,t),Fa.prototype.complete.call(this))};var Fa,l=Ba;function Ba(){var e=null!==Fa&&Fa.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}Dr.AsyncSubject=l;var Wa,g={},l={},qa={},za={},Va=r&&r.__extends||(Wa=function(e,t){return(Wa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Wa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(za,"__esModule",{value:!0}),za.Action=void 0;Ha=v.Subscription,Va(Ga,Ha),Ga.prototype.schedule=function(e,t){return this};var Ha,Va=Ga;function Ga(e,t){return Ha.call(this)||this}za.Action=Va;var Ya,Ka,Za,Xa,Va={},Qa=(Ya=Va,Ka=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},Za=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(Ya,"__esModule",{value:!0}),Ya.intervalProvider=void 0,Ya.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Ya.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,Za([e,t],Ka(r))):setInterval.apply(void 0,Za([e,t],Ka(r)))},clearInterval:function(e){var t=Ya.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(Xa=function(e,t){return(Xa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Xa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(qa,"__esModule",{value:!0}),qa.AsyncAction=void 0;var Ja,$a=Va,es=Pt,Va=(Ja=za.Action,Qa(ts,Ja),ts.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},ts.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),$a.intervalProvider.setInterval(e.flush.bind(e,this),r)},ts.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&$a.intervalProvider.clearInterval(t)},ts.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))},ts.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},ts.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,es.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,Ja.prototype.unsubscribe.call(this))},ts);function ts(e,t){var r=Ja.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}qa.AsyncAction=Va;var rs,ns,os,is,us,as,za={},Qa={},ss=(Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.TestTools=Qa.Immediate=void 0,1),cs={};function ls(e){return e in cs&&(delete cs[e],!0)}Qa.Immediate={setImmediate:function(e){var t=ss++;return cs[t]=!0,(rs=rs||Promise.resolve()).then(function(){return ls(t)&&e()}),t},clearImmediate:function(e){ls(e)}},Qa.TestTools={pending:function(){return Object.keys(cs).length}},ns=za,os=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},is=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(ns,"__esModule",{value:!0}),ns.immediateProvider=void 0,us=Qa.Immediate.setImmediate,as=Qa.Immediate.clearImmediate,ns.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ns.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||us).apply(void 0,is([],os(e)))},clearImmediate:function(e){var t=ns.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||as)(e)},delegate:void 0};var fs,Va=r&&r.__extends||(fs=function(e,t){return(fs=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}fs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(l,"__esModule",{value:!0}),l.AsapAction=void 0;var ps,ds=za,Qa=(ps=qa.AsyncAction,Va(hs,ps),hs.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?ps.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=ds.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},hs.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return ps.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(ds.immediateProvider.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))},hs);function hs(e,t){var r=ps.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}l.AsapAction=Qa;var za={},Va={},Qa={},bs=(Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.Scheduler=void 0,a);function ys(e,t){void 0===t&&(t=ys.now),this.schedulerActionCtor=e,this.now=t}ys.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},ys.now=bs.dateTimestampProvider.now,Qa.Scheduler=ys;var _s,vs,bs=r&&r.__extends||(_s=function(e,t){return(_s=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}_s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ms=(Object.defineProperty(Va,"__esModule",{value:!0}),Va.AsyncScheduler=void 0,Qa),bs=(vs=ms.Scheduler,bs(gs,vs),gs.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}}},gs);function gs(e,t){void 0===t&&(t=ms.Scheduler.now);e=vs.call(this,e,t)||this;return e.actions=[],e._active=!1,e}Va.AsyncScheduler=bs;var Os,bs=r&&r.__extends||(Os=function(e,t){return(Os=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}Os(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(za,"__esModule",{value:!0}),za.AsapScheduler=void 0;ws=Va.AsyncScheduler,bs(Es,ws),Es.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 ws,bs=Es;function Es(){return null!==ws&&ws.apply(this,arguments)||this}za.AsapScheduler=bs,bs=g,Object.defineProperty(bs,"__esModule",{value:!0}),bs.asap=bs.asapScheduler=void 0,bs.asapScheduler=new za.AsapScheduler(l.AsapAction),bs.asap=bs.asapScheduler;var Ps,za={},bs=(l=za,Object.defineProperty(l,"__esModule",{value:!0}),l.async=l.asyncScheduler=void 0,l.asyncScheduler=new Va.AsyncScheduler(qa.AsyncAction),l.async=l.asyncScheduler,{}),l={},Ss=r&&r.__extends||(Ps=function(e,t){return(Ps=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}Ps(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(l,"__esModule",{value:!0}),l.QueueAction=void 0;Ts=qa.AsyncAction,Ss(js,Ts),js.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?Ts.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},js.prototype.execute=function(e,t){return 0<t||this.closed?Ts.prototype.execute.call(this,e,t):this._execute(e,t)},js.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?Ts.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var Ts,Ss=js;function js(e,t){var r=Ts.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}l.QueueAction=Ss;var Cs,Ss={},Is=r&&r.__extends||(Cs=function(e,t){return(Cs=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}Cs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.QueueScheduler=void 0;Rs=Va.AsyncScheduler,Is(As,Rs);var Rs,Is=As;function As(){return null!==Rs&&Rs.apply(this,arguments)||this}Ss.QueueScheduler=Is,Is=bs,Object.defineProperty(Is,"__esModule",{value:!0}),Is.queue=Is.queueScheduler=void 0,Is.queueScheduler=new Ss.QueueScheduler(l.QueueAction),Is.queue=Is.queueScheduler;var ks,Ss={},l={},Is=r&&r.__extends||(ks=function(e,t){return(ks=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ks(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(l,"__esModule",{value:!0}),l.AnimationFrameAction=void 0;var Ms,Ns=w,w=(Ms=qa.AsyncAction,Is(xs,Ms),xs.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Ms.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ns.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},xs.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Ms.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Ns.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},xs);function xs(e,t){var r=Ms.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}l.AnimationFrameAction=w;var Ds,Is={},w=r&&r.__extends||(Ds=function(e,t){return(Ds=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ds(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Is,"__esModule",{value:!0}),Is.AnimationFrameScheduler=void 0;Us=Va.AsyncScheduler,w(Ls,Us),Ls.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 Us,w=Ls;function Ls(){return null!==Us&&Us.apply(this,arguments)||this}Is.AnimationFrameScheduler=w,w=Ss,Object.defineProperty(w,"__esModule",{value:!0}),w.animationFrame=w.animationFrameScheduler=void 0,w.animationFrameScheduler=new Is.AnimationFrameScheduler(l.AnimationFrameAction),w.animationFrame=w.animationFrameScheduler;var Fs,Bs,Is={},l=r&&r.__extends||(Fs=function(e,t){return(Fs=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}Fs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),w=(Object.defineProperty(Is,"__esModule",{value:!0}),Is.VirtualAction=Is.VirtualTimeScheduler=void 0,qa),Ws=v,qa=(Bs=Va.AsyncScheduler,l(qs,Bs),qs.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}},qs.frameTimeFactor=10,qs);function qs(e,t){void 0===t&&(t=1/0);var r=Bs.call(this,e=void 0===e?Vs:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}Is.VirtualTimeScheduler=qa;zs=w.AsyncAction,l(Hs,zs),Hs.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return zs.prototype.schedule.call(this,e,t);this.active=!1;var r=new Hs(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return Ws.Subscription.EMPTY},Hs.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(Hs.sortActions),1},Hs.prototype.recycleAsyncId=function(e,t,r){},Hs.prototype._execute=function(e,t){if(!0===this.active)return zs.prototype._execute.call(this,e,t)},Hs.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 zs,Vs=Hs;function Hs(e,t,r){void 0===r&&(r=e.index+=1);var n=zs.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}Is.VirtualAction=Vs;var Gs,Ys,Va={},qa={},w=(Gs=qa,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.empty=Gs.EMPTY=void 0,Ys=S,Gs.EMPTY=new Ys.Observable(function(e){return e.complete()}),Gs.empty=function(e){return e?(t=e,new Ys.Observable(function(e){return t.schedule(function(){return e.complete()})})):Gs.EMPTY;var t},{}),l={},Ks={},Zs=(Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.isScheduler=void 0,m);Ks.isScheduler=function(e){return e&&Zs.isFunction(e.schedule)},Object.defineProperty(l,"__esModule",{value:!0}),l.popNumber=l.popScheduler=l.popResultSelector=void 0;var Xs=m,Qs=Ks;function Js(e){return e[e.length-1]}l.popResultSelector=function(e){return Xs.isFunction(Js(e))?e.pop():void 0},l.popScheduler=function(e){return Qs.isScheduler(Js(e))?e.pop():void 0},l.popNumber=function(e,t){return"number"==typeof Js(e)?e.pop():t};var $s={},ec={},tc={},j={},rc={},nc=(Object.defineProperty(rc,"__esModule",{value:!0}),rc.isArrayLike=void 0,rc.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),oc=(Object.defineProperty(nc,"__esModule",{value:!0}),nc.isPromise=void 0,m);nc.isPromise=function(e){return oc.isFunction(null==e?void 0:e.then)};var ic={},uc=(Object.defineProperty(ic,"__esModule",{value:!0}),ic.isInteropObservable=void 0,s),ac=m;ic.isInteropObservable=function(e){return ac.isFunction(e[uc.observable])};var sc={},cc=(Object.defineProperty(sc,"__esModule",{value:!0}),sc.isAsyncIterable=void 0,m);sc.isAsyncIterable=function(e){return Symbol.asyncIterator&&cc.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var lc={};Object.defineProperty(lc,"__esModule",{value:!0}),lc.createInvalidObservableTypeError=void 0,lc.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 fc={},pc={};function dc(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(pc,"__esModule",{value:!0}),pc.iterator=pc.getSymbolIterator=void 0,pc.getSymbolIterator=dc,pc.iterator=dc(),Object.defineProperty(fc,"__esModule",{value:!0}),fc.isIterable=void 0;var hc=pc,bc=m;fc.isIterable=function(e){return bc.isFunction(null==e?void 0:e[hc.iterator])};var yc={},_c=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}}}},vc=r&&r.__await||function(e){return this instanceof vc?(this.v=e,this):new vc(e)},mc=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 vc?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])}},gc=(Object.defineProperty(yc,"__esModule",{value:!0}),yc.isReadableStreamLike=yc.readableStreamLikeToAsyncGenerator=void 0,m);yc.readableStreamLikeToAsyncGenerator=function(o){return mc(this,arguments,function(){var t,r,n;return _c(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,vc(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,vc(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,vc(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]}})})},yc.isReadableStreamLike=function(e){return gc.isFunction(null==e?void 0:e.getReader)};var Oc=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())})},wc=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Ec=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 Pc?Pc(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)})}}},Pc=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.")},Sc=(Object.defineProperty(j,"__esModule",{value:!0}),j.fromReadableStreamLike=j.fromAsyncIterable=j.fromIterable=j.fromPromise=j.fromArrayLike=j.fromInteropObservable=j.innerFrom=void 0,rc),Tc=nc,jc=S,Cc=ic,Ic=sc,Rc=lc,Ac=fc,kc=yc,Mc=m,Nc=T,xc=s;function Dc(r){return new jc.Observable(function(e){var t=r[xc.observable]();if(Mc.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Uc(r){return new jc.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function Lc(e){return new jc.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Nc.reportUnhandledError)})}function Fc(u){return new jc.Observable(function(e){var t,r;try{for(var n=Pc(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 Bc(e){return new jc.Observable(function(t){!function(r,n){var o,i,u,a;return Oc(this,void 0,void 0,function(){var t;return wc(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=Ec(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 Wc(e){return Bc(kc.readableStreamLikeToAsyncGenerator(e))}j.innerFrom=function(e){if(e instanceof jc.Observable)return e;if(null!=e){if(Cc.isInteropObservable(e))return Dc(e);if(Sc.isArrayLike(e))return Uc(e);if(Tc.isPromise(e))return Lc(e);if(Ic.isAsyncIterable(e))return Bc(e);if(Ac.isIterable(e))return Fc(e);if(kc.isReadableStreamLike(e))return Wc(e)}throw Rc.createInvalidObservableTypeError(e)},j.fromInteropObservable=Dc,j.fromArrayLike=Uc,j.fromPromise=Lc,j.fromIterable=Fc,j.fromAsyncIterable=Bc,j.fromReadableStreamLike=Wc;var T={},qc={};Object.defineProperty(qc,"__esModule",{value:!0}),qc.executeSchedule=void 0,qc.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(T,"__esModule",{value:!0}),T.observeOn=void 0;var zc=qc,Vc=u,Hc=_;T.observeOn=function(r,n){return void 0===n&&(n=0),Vc.operate(function(e,t){e.subscribe(Hc.createOperatorSubscriber(t,function(e){return zc.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return zc.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return zc.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var Gc={},Yc=(Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.subscribeOn=void 0,u);Gc.subscribeOn=function(r,n){return void 0===n&&(n=0),Yc.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(tc,"__esModule",{value:!0}),tc.scheduleObservable=void 0;var Kc=j,Zc=T,Xc=Gc;tc.scheduleObservable=function(e,t){return Kc.innerFrom(e).pipe(Xc.subscribeOn(t),Zc.observeOn(t))};var Qc={},Jc=(Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.schedulePromise=void 0,j),$c=T,el=Gc;Qc.schedulePromise=function(e,t){return Jc.innerFrom(e).pipe(el.subscribeOn(t),$c.observeOn(t))};var tl={},rl=(Object.defineProperty(tl,"__esModule",{value:!0}),tl.scheduleArray=void 0,S);tl.scheduleArray=function(r,n){return new rl.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var nl={},ol=(Object.defineProperty(nl,"__esModule",{value:!0}),nl.scheduleIterable=void 0,S),il=pc,ul=m,al=qc;nl.scheduleIterable=function(e,t){return new ol.Observable(function(n){var o;return al.executeSchedule(n,t,function(){o=e[il.iterator](),al.executeSchedule(n,t,function(){var e,t,r;try{t=(e=o.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)},0,!0)}),function(){return ul.isFunction(null==o?void 0:o.return)&&o.return()}})};var pc={},sl=(Object.defineProperty(pc,"__esModule",{value:!0}),pc.scheduleAsyncIterable=void 0,S),cl=qc;pc.scheduleAsyncIterable=function(r,n){if(r)return new sl.Observable(function(t){cl.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();cl.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 ll={},fl=(Object.defineProperty(ll,"__esModule",{value:!0}),ll.scheduleReadableStreamLike=void 0,pc),pl=yc;ll.scheduleReadableStreamLike=function(e,t){return fl.scheduleAsyncIterable(pl.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(ec,"__esModule",{value:!0}),ec.scheduled=void 0;var dl=tc,hl=Qc,bl=tl,yl=nl,_l=pc,vl=ic,ml=nc,gl=rc,Ol=fc,wl=sc,El=lc,Pl=yc,Sl=ll;ec.scheduled=function(e,t){if(null!=e){if(vl.isInteropObservable(e))return dl.scheduleObservable(e,t);if(gl.isArrayLike(e))return bl.scheduleArray(e,t);if(ml.isPromise(e))return hl.schedulePromise(e,t);if(wl.isAsyncIterable(e))return _l.scheduleAsyncIterable(e,t);if(Ol.isIterable(e))return yl.scheduleIterable(e,t);if(Pl.isReadableStreamLike(e))return Sl.scheduleReadableStreamLike(e,t)}throw El.createInvalidObservableTypeError(e)},Object.defineProperty($s,"__esModule",{value:!0}),$s.from=void 0;var Tl=ec,jl=j;$s.from=function(e,t){return t?Tl.scheduled(e,t):jl.innerFrom(e)},Object.defineProperty(w,"__esModule",{value:!0}),w.of=void 0;var Cl=l,Il=$s;w.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Cl.popScheduler(e);return Il.from(e,r)};var Rl,Al,kl,Ml,tc={},Nl=(Object.defineProperty(tc,"__esModule",{value:!0}),tc.throwError=void 0,S),xl=m;function Dl(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function Ul(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)}tc.throwError=function(e,t){function r(e){return e.error(n())}var n=xl.isFunction(e)?e:function(){return e};return new Nl.Observable(t?function(e){return t.schedule(r,0,e)}:r)},Qc=Va,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.observeNotification=Qc.Notification=Qc.NotificationKind=void 0,Rl=qa,Al=w,kl=tc,Ml=m,(tl=Qc.NotificationKind||(Qc.NotificationKind={})).NEXT="N",tl.ERROR="E",tl.COMPLETE="C",Dl.prototype.observe=function(e){return Ul(this,e)},Dl.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()},Dl.prototype.accept=function(e,t,r){var n;return Ml.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},Dl.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?Al.of(t):"E"===e?kl.throwError(function(){return r}):"C"===e?Rl.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},Dl.createNext=function(e){return new Dl("N",e)},Dl.createError=function(e){return new Dl("E",void 0,e)},Dl.createComplete=function(){return Dl.completeNotification},Dl.completeNotification=new Dl("C"),tl=Dl,Qc.Notification=tl,Qc.observeNotification=Ul;var pc={},Ll=(Object.defineProperty(pc,"__esModule",{value:!0}),pc.isObservable=void 0,S),Fl=m;pc.isObservable=function(e){return!!e&&(e instanceof Ll.Observable||Fl.isFunction(e.lift)&&Fl.isFunction(e.subscribe))};var ic={},nc={},fc=(Object.defineProperty(nc,"__esModule",{value:!0}),nc.EmptyError=void 0,O),Bl=(nc.EmptyError=fc.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(ic,"__esModule",{value:!0}),ic.lastValueFrom=void 0,nc);ic.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 Bl.EmptyError)}})})};var sc={},Wl=(Object.defineProperty(sc,"__esModule",{value:!0}),sc.firstValueFrom=void 0,nc),ql=Ar;sc.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new ql.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new Wl.EmptyError)}});n.subscribe(r)})};var zl,Vl,Hl,Gl,Yl,Kl,Zl,lc={},yc=(Object.defineProperty(lc,"__esModule",{value:!0}),lc.ArgumentOutOfRangeError=void 0,O),ll=(lc.ArgumentOutOfRangeError=yc.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),tl=(Object.defineProperty(ll,"__esModule",{value:!0}),ll.NotFoundError=void 0,O),Qc=(ll.NotFoundError=tl.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),fc=(Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.SequenceError=void 0,O),yc=(Qc.SequenceError=fc.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),tl={};function Xl(e){throw new zl.TimeoutError(e)}Object.defineProperty(tl,"__esModule",{value:!0}),tl.isValidDate=void 0,tl.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},zl=yc,Object.defineProperty(zl,"__esModule",{value:!0}),zl.timeout=zl.TimeoutError=void 0,Vl=za,Hl=tl,Gl=u,Yl=j,Kl=_,Zl=qc,zl.TimeoutError=O.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),zl.timeout=function(e,t){var a=(e=Hl.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Xl:r,l=void 0===(r=e.scheduler)?null!=t?t:Vl.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return Gl.operate(function(e,t){function r(e){n=Zl.executeSchedule(t,l,function(){try{u.unsubscribe(),Yl.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(Kl.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 fc={},O={},Ql={},Jl={},$l=(Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.map=void 0,u),ef=_;Jl.map=function(n,o){return $l.operate(function(e,t){var r=0;e.subscribe(ef.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var tf=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},rf=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},nf=(Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.mapOneOrManyArgs=void 0,Jl),of=Array.isArray;Ql.mapOneOrManyArgs=function(r){return nf.map(function(e){return t=r,of(e=e)?t.apply(void 0,rf([],tf(e))):t(e);var t})};var uf=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},af=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},sf=(Object.defineProperty(O,"__esModule",{value:!0}),O.bindCallbackInternals=void 0,Ks),cf=S,lf=Gc,ff=Ql,pf=T,df=Dr;O.bindCallbackInternals=function r(a,s,n,o){if(n){if(!sf.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(ff.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(lf.subscribeOn(o),pf.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new df.AsyncSubject,u=!0;return new cf.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,af(af([],uf(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(fc,"__esModule",{value:!0}),fc.bindCallback=void 0;var hf=O;fc.bindCallback=function(e,t,r){return hf.bindCallbackInternals(!1,e,t,r)};var bf={},yf=(Object.defineProperty(bf,"__esModule",{value:!0}),bf.bindNodeCallback=void 0,O);bf.bindNodeCallback=function(e,t,r){return yf.bindCallbackInternals(!0,e,t,r)};var O={},_f={},vf=(Object.defineProperty(_f,"__esModule",{value:!0}),_f.argsArgArrayOrObject=void 0,Array.isArray),mf=Object.getPrototypeOf,gf=Object.prototype,Of=Object.keys;_f.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(vf(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&mf(r)===gf)return{args:(r=Of(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var wf={};Object.defineProperty(wf,"__esModule",{value:!0}),wf.createObject=void 0,wf.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(O,"__esModule",{value:!0}),O.combineLatestInit=O.combineLatest=void 0;var Ef=S,Pf=_f,Sf=$s,Tf=E,jf=Ql,Cf=l,If=wf,Rf=_,Af=qc;function kf(a,s,c){return void 0===c&&(c=Tf.identity),function(u){Mf(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){Mf(s,function(){var e=Sf.from(a[r],s),t=!1;e.subscribe(Rf.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 Mf(e,t,r){e?Af.executeSchedule(r,e,t):t()}O.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Cf.popScheduler(e),n=Cf.popResultSelector(e),o=Pf.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?Sf.from([],r):(o=new Ef.Observable(kf(i,r,u?function(e){return If.createObject(u,e)}:Tf.identity)),n?o.pipe(jf.mapOneOrManyArgs(n)):o)},O.combineLatestInit=kf;var Nf={},xf={},Df={},Uf={},Lf={},Ff=(Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.mergeInternals=void 0,j),Bf=qc,Wf=_;Lf.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;Ff.innerFrom(n(e,l++)).subscribe(Wf.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?Bf.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(Wf.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(Uf,"__esModule",{value:!0}),Uf.mergeMap=void 0;var qf=Jl,zf=j,Vf=u,Hf=Lf,Gf=m;Uf.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),Gf.isFunction(i)?e(function(r,n){return qf.map(function(e,t){return i(r,e,n,t)})(zf.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),Vf.operate(function(e,t){return Hf.mergeInternals(e,t,o,r)}))},Object.defineProperty(Df,"__esModule",{value:!0}),Df.mergeAll=void 0;var Yf=Uf,Kf=E;Df.mergeAll=function(e){return Yf.mergeMap(Kf.identity,e=void 0===e?1/0:e)},Object.defineProperty(xf,"__esModule",{value:!0}),xf.concatAll=void 0;var Zf=Df;xf.concatAll=function(){return Zf.mergeAll(1)},Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.concat=void 0;var Xf=xf,Qf=l,Jf=$s;Nf.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Xf.concatAll()(Jf.from(e,Qf.popScheduler(e)))};var $f={},ep={},tp=(Object.defineProperty(ep,"__esModule",{value:!0}),ep.defer=void 0,S),rp=j;ep.defer=function(t){return new tp.Observable(function(e){rp.innerFrom(t()).subscribe(e)})},Object.defineProperty($f,"__esModule",{value:!0}),$f.connectable=void 0;var np=h,op=S,ip=ep,up={connector:function(){return new np.Subject},resetOnDisconnect:!0};$f.connectable=function(e,t){var r=null,n=(t=void 0===t?up:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new op.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=ip.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var ap={},sp=(Object.defineProperty(ap,"__esModule",{value:!0}),ap.forkJoin=void 0,S),cp=_f,lp=j,fp=l,pp=_,dp=Ql,hp=wf;ap.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=fp.popResultSelector(e),u=(n=cp.argsArgArrayOrObject(e)).args,a=n.keys,n=new sp.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;lp.innerFrom(u[t]).subscribe(pp.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?hp.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(dp.mapOneOrManyArgs(r)):n};var _f={},bp=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},yp=(Object.defineProperty(_f,"__esModule",{value:!0}),_f.fromEvent=void 0,j),_p=S,vp=Uf,mp=rc,gp=m,Op=Ql,wp=["addListener","removeListener"],Ep=["addEventListener","removeEventListener"],Pp=["on","off"];function Sp(r,n){return function(t){return function(e){return r[t](n,e)}}}_f.fromEvent=function t(r,n,o,e){if(gp.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(Op.mapOneOrManyArgs(e));var e=bp((e=r,gp.isFunction(e.addEventListener)&&gp.isFunction(e.removeEventListener)?Ep.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,gp.isFunction(e.addListener)&&gp.isFunction(e.removeListener)?wp.map(Sp(r,n)):(e=r,gp.isFunction(e.on)&&gp.isFunction(e.off)?Pp.map(Sp(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&mp.isArrayLike(r))return vp.mergeMap(function(e){return t(e,n,o)})(yp.innerFrom(r));if(i)return new _p.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 wf={},Tp=(Object.defineProperty(wf,"__esModule",{value:!0}),wf.fromEventPattern=void 0,S),jp=m,Cp=Ql;wf.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(Cp.mapOneOrManyArgs(t)):new Tp.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 jp.isFunction(o)?function(){return o(e,t)}:void 0})};var rc={},Ip=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}}}},Rp=(Object.defineProperty(rc,"__esModule",{value:!0}),rc.generate=void 0,E),Ap=Ks,kp=ep,Mp=nl;rc.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return Ip(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?Rp.identity:i,o=e.scheduler):(a=e,!t||Ap.isScheduler(t)?(u=Rp.identity,o=t):u=t),kp.defer(o?function(){return Mp.scheduleIterable(s(),o)}:s)};var nl={},Np=(Object.defineProperty(nl,"__esModule",{value:!0}),nl.iif=void 0,ep);nl.iif=function(e,t,r){return Np.defer(function(){return e()?t:r})};var xp={},Dp={},Up=(Object.defineProperty(Dp,"__esModule",{value:!0}),Dp.timer=void 0,S),Lp=za,Fp=Ks,Bp=tl;Dp.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=Lp.async);var i=-1;return null!=e&&(Fp.isScheduler(e)?o=e:i=e),new Up.Observable(function(e){var t=Bp.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(xp,"__esModule",{value:!0}),xp.interval=void 0;var Wp=za,qp=Dp;xp.interval=function(e,t){return qp.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?Wp.asyncScheduler:t)};var Ks={},zp=(Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.merge=void 0,Df),Vp=j,Hp=qa,Gp=l,Yp=$s;Ks.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Gp.popScheduler(e),n=Gp.popNumber(e,1/0),o=e;return o.length?1===o.length?Vp.innerFrom(o[0]):zp.mergeAll(n)(Yp.from(o,r)):Hp.EMPTY};var Kp,Zp={},Xp=(Kp=Zp,Object.defineProperty(Kp,"__esModule",{value:!0}),Kp.never=Kp.NEVER=void 0,Kp.NEVER=new S.Observable(n.noop),Kp.never=function(){return Kp.NEVER},{}),Qp={},Jp=(Object.defineProperty(Qp,"__esModule",{value:!0}),Qp.argsOrArgArray=void 0,Array.isArray);Qp.argsOrArgArray=function(e){return 1===e.length&&Jp(e[0])?e[0]:e},Object.defineProperty(Xp,"__esModule",{value:!0}),Xp.onErrorResumeNext=void 0;var $p=S,ed=Qp,td=_,rd=n,nd=j;Xp.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=ed.argsOrArgArray(e);return new $p.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=nd.innerFrom(i[n++])}catch(e){return void o()}var t=new td.OperatorSubscriber(r,void 0,rd.noop,rd.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var od={},id=(Object.defineProperty(od,"__esModule",{value:!0}),od.pairs=void 0,$s);od.pairs=function(e,t){return id.from(Object.entries(e),t)};var ud={},ad={};Object.defineProperty(ad,"__esModule",{value:!0}),ad.not=void 0,ad.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var sd={},cd=(Object.defineProperty(sd,"__esModule",{value:!0}),sd.filter=void 0,u),ld=_;sd.filter=function(n,o){return cd.operate(function(e,t){var r=0;e.subscribe(ld.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(ud,"__esModule",{value:!0}),ud.partition=void 0;var fd=ad,pd=sd,dd=j;ud.partition=function(e,t,r){return[pd.filter(t,r)(dd.innerFrom(e)),pd.filter(fd.not(t,r))(dd.innerFrom(e))]};var hd={},bd=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.raceInit=hd.race=void 0,S),yd=j,_d=Qp,vd=_;function md(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(yd.innerFrom(t[r]).subscribe(vd.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)}}hd.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=_d.argsOrArgArray(e)).length?yd.innerFrom(e[0]):new bd.Observable(md(e))},hd.raceInit=md;var gd={},Od=(Object.defineProperty(gd,"__esModule",{value:!0}),gd.range=void 0,S),wd=qa;gd.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return wd.EMPTY;var o=e+r;return new Od.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 Ed={},Pd=(Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.using=void 0,S),Sd=j,Td=qa;Ed.using=function(n,o){return new Pd.Observable(function(e){var t=n(),r=o(t);return(r?Sd.innerFrom(r):Td.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var jd={},Cd=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},Id=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},Rd=(Object.defineProperty(jd,"__esModule",{value:!0}),jd.zip=void 0,S),Ad=j,kd=Qp,Md=qa,Nd=_,xd=l;jd.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=xd.popResultSelector(e),u=kd.argsOrArgArray(e);return u.length?new Rd.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){Ad.innerFrom(u[t]).subscribe(Nd.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,Id([],Cd(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}}):Md.EMPTY};var Dd={},Ud=(Object.defineProperty(Dd,"__esModule",{value:!0}),{}),Ld=(Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.audit=void 0,u),Fd=j,Bd=_;Ud.audit=function(s){return Ld.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(Bd.createOperatorSubscriber(t,function(e){o=!0,i=e,u||Fd.innerFrom(s(e)).subscribe(u=Bd.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var Wd={},qd=(Object.defineProperty(Wd,"__esModule",{value:!0}),Wd.auditTime=void 0,za),zd=Ud,Vd=Dp;Wd.auditTime=function(e,t){return void 0===t&&(t=qd.asyncScheduler),zd.audit(function(){return Vd.timer(e,t)})};var Hd={},Gd=(Object.defineProperty(Hd,"__esModule",{value:!0}),Hd.buffer=void 0,u),Yd=n,Kd=_,Zd=j;Hd.buffer=function(n){return Gd.operate(function(e,t){var r=[];return e.subscribe(Kd.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),Zd.innerFrom(n).subscribe(Kd.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},Yd.noop)),function(){r=null}})};var Xd={},Qd=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.")},Jd=(Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.bufferCount=void 0,u),$d=_,eh=Pt;Xd.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,Jd.operate(function(e,f){var p=[],d=0;e.subscribe($d.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=Qd(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=Qd(i),c=s.next();!c.done;c=s.next()){var l=c.value;eh.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=Qd(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 th={},rh=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.")},nh=(Object.defineProperty(th,"__esModule",{value:!0}),th.bufferTime=void 0,v),oh=u,ih=_,uh=Pt,ah=za,sh=l,ch=qc;th.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=sh.popScheduler(t))?e:ah.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return oh.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),uh.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new nh.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),ch.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?ch.executeSchedule(r,u,o,a,!0):n=!0,o(),ih.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=rh(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 lh={},fh=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.")},ph=(Object.defineProperty(lh,"__esModule",{value:!0}),lh.bufferToggle=void 0,v),dh=u,hh=j,bh=_,yh=n,_h=Pt;lh.bufferToggle=function(t,o){return dh.operate(function(e,n){var i=[];hh.innerFrom(t).subscribe(bh.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new ph.Subscription);r.add(hh.innerFrom(o(e)).subscribe(bh.createOperatorSubscriber(n,function(){_h.arrRemove(i,t),n.next(t),r.unsubscribe()},yh.noop)))},yh.noop)),e.subscribe(bh.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=fh(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 vh={},mh=(Object.defineProperty(vh,"__esModule",{value:!0}),vh.bufferWhen=void 0,u),gh=n,Oh=_,wh=j;vh.bufferWhen=function(i){return mh.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),wh.innerFrom(i()).subscribe(n=Oh.createOperatorSubscriber(t,o,gh.noop))};o(),e.subscribe(Oh.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 Eh={},Ph=(Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.catchError=void 0,j),Sh=_,Th=u;Eh.catchError=function u(a){return Th.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(Sh.createOperatorSubscriber(r,void 0,void 0,function(e){n=Ph.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 jh={},Ch={},C={},Ih={},Rh={},Ah={},kh=(Object.defineProperty(Ah,"__esModule",{value:!0}),Ah.scanInternals=void 0,_);Ah.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(kh.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(Rh,"__esModule",{value:!0}),Rh.reduce=void 0;var Mh=Ah,Nh=u;Rh.reduce=function(e,t){return Nh.operate(Mh.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(Ih,"__esModule",{value:!0}),Ih.toArray=void 0;function xh(e,t){return e.push(t),e}var Dh=Rh,Uh=u;Ih.toArray=function(){return Uh.operate(function(e,t){Dh.reduce(xh,[])(e).subscribe(t)})},Object.defineProperty(C,"__esModule",{value:!0}),C.joinAllInternals=void 0;var Lh=E,Fh=Ql,Bh=p,Wh=Uf,qh=Ih;C.joinAllInternals=function(t,e){return Bh.pipe(qh.toArray(),Wh.mergeMap(function(e){return t(e)}),e?Fh.mapOneOrManyArgs(e):Lh.identity)},Object.defineProperty(Ch,"__esModule",{value:!0}),Ch.combineLatestAll=void 0;var zh=O,Vh=C;Ch.combineLatestAll=function(e){return Vh.joinAllInternals(zh.combineLatest,e)},Object.defineProperty(jh,"__esModule",{value:!0}),jh.combineAll=void 0;jh.combineAll=Ch.combineLatestAll;var Hh={},Gh={},Yh=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},Kh=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},Zh=(Object.defineProperty(Gh,"__esModule",{value:!0}),Gh.combineLatest=void 0,O),Xh=u,Qh=Qp,Jh=Ql,$h=p,eb=l;function tb(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=eb.popResultSelector(r);return t?$h.pipe(tb.apply(void 0,Kh([],Yh(r))),Jh.mapOneOrManyArgs(t)):Xh.operate(function(e,t){Zh.combineLatestInit(Kh([e],Yh(Qh.argsOrArgArray(r))))(t)})}Gh.combineLatest=tb;var rb=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},nb=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(Hh,"__esModule",{value:!0}),Hh.combineLatestWith=void 0,Gh);Hh.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ob.combineLatest.apply(void 0,nb([],rb(e)))};var Ql={},ib=(Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.concatMap=void 0,Uf),ub=m;Ql.concatMap=function(e,t){return ub.isFunction(t)?ib.mergeMap(e,t,1):ib.mergeMap(e,1)};var ab={},sb=(Object.defineProperty(ab,"__esModule",{value:!0}),ab.concatMapTo=void 0,Ql),cb=m;ab.concatMapTo=function(e,t){return cb.isFunction(t)?sb.concatMap(function(){return e},t):sb.concatMap(function(){return e})};var lb={},fb={},pb=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},db=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},hb=(Object.defineProperty(fb,"__esModule",{value:!0}),fb.concat=void 0,u),bb=xf,yb=l,_b=$s;fb.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=yb.popScheduler(r);return hb.operate(function(e,t){bb.concatAll()(_b.from(db([e],pb(r)),n)).subscribe(t)})};var vb=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},mb=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},gb=(Object.defineProperty(lb,"__esModule",{value:!0}),lb.concatWith=void 0,fb);lb.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return gb.concat.apply(void 0,mb([],vb(e)))};var Ob={},wb={},Eb=(Object.defineProperty(wb,"__esModule",{value:!0}),wb.fromSubscribable=void 0,S);wb.fromSubscribable=function(t){return new Eb.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(Ob,"__esModule",{value:!0}),Ob.connect=void 0;var Pb=h,Sb=j,Tb=u,jb=wb,Cb={connector:function(){return new Pb.Subject}};Ob.connect=function(n,e){var o=(e=void 0===e?Cb:e).connector;return Tb.operate(function(e,t){var r=o();Sb.innerFrom(n(jb.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var wb={},Ib=(Object.defineProperty(wb,"__esModule",{value:!0}),wb.count=void 0,Rh);wb.count=function(n){return Ib.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var Rb={},Ab=(Object.defineProperty(Rb,"__esModule",{value:!0}),Rb.debounce=void 0,u),kb=n,Mb=_,Nb=j;Rb.debounce=function(u){return Ab.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(Mb.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=Mb.createOperatorSubscriber(t,r,kb.noop),Nb.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var xb={},Db=(Object.defineProperty(xb,"__esModule",{value:!0}),xb.debounceTime=void 0,za),Ub=u,Lb=_;xb.debounceTime=function(a,s){return void 0===s&&(s=Db.asyncScheduler),Ub.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(Lb.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 Fb={},Bb=(Object.defineProperty(Fb,"__esModule",{value:!0}),Fb.defaultIfEmpty=void 0,u),Wb=_;Fb.defaultIfEmpty=function(n){return Bb.operate(function(e,t){var r=!1;e.subscribe(Wb.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var I={},qb={},zb={},Vb=(Object.defineProperty(zb,"__esModule",{value:!0}),zb.take=void 0,qa),Hb=u,Gb=_;zb.take=function(n){return n<=0?function(){return Vb.EMPTY}:Hb.operate(function(e,t){var r=0;e.subscribe(Gb.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var Yb={},Kb=(Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.ignoreElements=void 0,u),Zb=_,Xb=n;Yb.ignoreElements=function(){return Kb.operate(function(e,t){e.subscribe(Zb.createOperatorSubscriber(t,Xb.noop))})};var Qb={},Jb=(Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.mapTo=void 0,Jl);Qb.mapTo=function(e){return Jb.map(function(){return e})},Object.defineProperty(qb,"__esModule",{value:!0}),qb.delayWhen=void 0;var $b=Nf,ey=zb,ty=Yb,ry=Qb,ny=Uf,oy=j;qb.delayWhen=function t(r,n){return n?function(e){return $b.concat(n.pipe(ey.take(1),ty.ignoreElements()),e.pipe(t(r)))}:ny.mergeMap(function(e,t){return oy.innerFrom(r(e,t)).pipe(ey.take(1),ry.mapTo(e))})},Object.defineProperty(I,"__esModule",{value:!0}),I.delay=void 0;var iy=za,uy=qb,ay=Dp;I.delay=function(e,t){var r=ay.timer(e,t=void 0===t?iy.asyncScheduler:t);return uy.delayWhen(function(){return r})};var sy={},cy=(Object.defineProperty(sy,"__esModule",{value:!0}),sy.dematerialize=void 0,Va),ly=u,fy=_;sy.dematerialize=function(){return ly.operate(function(e,t){e.subscribe(fy.createOperatorSubscriber(t,function(e){return cy.observeNotification(e,t)}))})};var py={},dy=(Object.defineProperty(py,"__esModule",{value:!0}),py.distinct=void 0,u),hy=_,by=n,yy=j;py.distinct=function(o,t){return dy.operate(function(e,r){var n=new Set;e.subscribe(hy.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&yy.innerFrom(t).subscribe(hy.createOperatorSubscriber(r,function(){return n.clear()},by.noop))})};var _y={},vy=(Object.defineProperty(_y,"__esModule",{value:!0}),_y.distinctUntilChanged=void 0,E),my=u,gy=_;function Oy(e,t){return e===t}_y.distinctUntilChanged=function(i,u){return void 0===u&&(u=vy.identity),i=null!=i?i:Oy,my.operate(function(e,r){var n,o=!0;e.subscribe(gy.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var wy={},Ey=(Object.defineProperty(wy,"__esModule",{value:!0}),wy.distinctUntilKeyChanged=void 0,_y);wy.distinctUntilKeyChanged=function(r,n){return Ey.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var Py={},Sy={},Ty=(Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.throwIfEmpty=void 0,nc),jy=u,Cy=_;function Iy(){return new Ty.EmptyError}Sy.throwIfEmpty=function(n){return void 0===n&&(n=Iy),jy.operate(function(e,t){var r=!1;e.subscribe(Cy.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(Py,"__esModule",{value:!0}),Py.elementAt=void 0;var Ry=lc,Ay=sd,ky=Sy,My=Fb,Ny=zb;Py.elementAt=function(r,t){if(r<0)throw new Ry.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(Ay.filter(function(e,t){return t===r}),Ny.take(1),n?My.defaultIfEmpty(t):ky.throwIfEmpty(function(){return new Ry.ArgumentOutOfRangeError}))}};var xy={},Dy=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},Uy=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.endWith=void 0,Nf),Fy=w;xy.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Ly.concat(e,Fy.of.apply(void 0,Uy([],Dy(t))))}};var By={},Wy=(Object.defineProperty(By,"__esModule",{value:!0}),By.every=void 0,u),qy=_;By.every=function(o,i){return Wy.operate(function(t,r){var n=0;t.subscribe(qy.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var zy={},Vy={},Hy={},Gy=(Object.defineProperty(Hy,"__esModule",{value:!0}),Hy.exhaustMap=void 0,Jl),Yy=j,Ky=u,Zy=_;Hy.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return Yy.innerFrom(i(r,n)).pipe(Gy.map(function(e,t){return o(r,e,n,t)}))}))}:Ky.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(Zy.createOperatorSubscriber(t,function(e){n||(n=Zy.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),Yy.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(Vy,"__esModule",{value:!0}),Vy.exhaustAll=void 0;var Xy=Hy,Qy=E;Vy.exhaustAll=function(){return Xy.exhaustMap(Qy.identity)},Object.defineProperty(zy,"__esModule",{value:!0}),zy.exhaust=void 0;zy.exhaust=Vy.exhaustAll;var Jy={},$y=(Object.defineProperty(Jy,"__esModule",{value:!0}),Jy.expand=void 0,u),e_=Lf;Jy.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,$y.operate(function(e,t){return e_.mergeInternals(e,t,r,n,void 0,!0,o)})};var t_={},r_=(Object.defineProperty(t_,"__esModule",{value:!0}),t_.finalize=void 0,u);t_.finalize=function(r){return r_.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var n_={},o_=(Object.defineProperty(n_,"__esModule",{value:!0}),n_.createFind=n_.find=void 0,u),i_=_;function u_(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(i_.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()}))}}n_.find=function(e,t){return o_.operate(u_(e,t,"value"))},n_.createFind=u_;var a_={},s_=(Object.defineProperty(a_,"__esModule",{value:!0}),a_.findIndex=void 0,u),c_=n_;a_.findIndex=function(e,t){return s_.operate(c_.createFind(e,t,"index"))};var l_={},f_=(Object.defineProperty(l_,"__esModule",{value:!0}),l_.first=void 0,nc),p_=sd,d_=zb,h_=Fb,b_=Sy,y_=E;l_.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?p_.filter(function(e,t){return n(e,t,r)}):y_.identity,d_.take(1),t?h_.defaultIfEmpty(e):b_.throwIfEmpty(function(){return new f_.EmptyError}))}};var __={},v_=(Object.defineProperty(__,"__esModule",{value:!0}),__.groupBy=void 0,S),m_=j,g_=h,O_=u,w_=_;__.groupBy=function(b,t,y,_){return O_.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 w_.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new g_.Subject),i=n,u=o,(a=new v_.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=w_.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(m_.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 E_={},P_=(Object.defineProperty(E_,"__esModule",{value:!0}),E_.isEmpty=void 0,u),S_=_;E_.isEmpty=function(){return P_.operate(function(e,t){e.subscribe(S_.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var T_={},j_={},C_=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.")},I_=(Object.defineProperty(j_,"__esModule",{value:!0}),j_.takeLast=void 0,qa),R_=u,A_=_;j_.takeLast=function(t){return t<=0?function(){return I_.EMPTY}:R_.operate(function(e,i){var u=[];e.subscribe(A_.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=C_(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(T_,"__esModule",{value:!0}),T_.last=void 0;var k_=nc,M_=sd,N_=j_,x_=Sy,D_=Fb,U_=E;T_.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?M_.filter(function(e,t){return n(e,t,r)}):U_.identity,N_.takeLast(1),t?D_.defaultIfEmpty(e):x_.throwIfEmpty(function(){return new k_.EmptyError}))}};var L_={},F_=(Object.defineProperty(L_,"__esModule",{value:!0}),L_.materialize=void 0,Va),B_=u,W_=_;L_.materialize=function(){return B_.operate(function(e,t){e.subscribe(W_.createOperatorSubscriber(t,function(e){t.next(F_.Notification.createNext(e))},function(){t.next(F_.Notification.createComplete()),t.complete()},function(e){t.next(F_.Notification.createError(e)),t.complete()}))})};var q_={},z_=(Object.defineProperty(q_,"__esModule",{value:!0}),q_.max=void 0,Rh),V_=m;q_.max=function(r){return z_.reduce(V_.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var H_={},G_=(Object.defineProperty(H_,"__esModule",{value:!0}),H_.flatMap=void 0,Uf),G_=(H_.flatMap=G_.mergeMap,{}),Y_=(Object.defineProperty(G_,"__esModule",{value:!0}),G_.mergeMapTo=void 0,Uf),K_=m;G_.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),K_.isFunction(t)?Y_.mergeMap(function(){return e},t,r):Y_.mergeMap(function(){return e},r="number"==typeof t?t:r)};var Z_={},X_=(Object.defineProperty(Z_,"__esModule",{value:!0}),Z_.mergeScan=void 0,u),Q_=Lf;Z_.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),X_.operate(function(e,t){var r=o;return Q_.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var Lf={},J_={},$_=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},ev=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},tv=(Object.defineProperty(J_,"__esModule",{value:!0}),J_.merge=void 0,u),rv=Qp,nv=Df,ov=l,iv=$s;J_.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=ov.popScheduler(r),o=ov.popNumber(r,1/0),r=rv.argsOrArgArray(r);return tv.operate(function(e,t){nv.mergeAll(o)(iv.from(ev([e],$_(r)),n)).subscribe(t)})};var uv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},av=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},sv=(Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.mergeWith=void 0,J_);Lf.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return sv.merge.apply(void 0,av([],uv(e)))};var cv={},lv=(Object.defineProperty(cv,"__esModule",{value:!0}),cv.min=void 0,Rh),fv=m;cv.min=function(r){return lv.reduce(fv.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var pv={},dv=(Object.defineProperty(pv,"__esModule",{value:!0}),pv.multicast=void 0,P),hv=m,bv=Ob;pv.multicast=function(e,t){var r=hv.isFunction(e)?e:function(){return e};return hv.isFunction(t)?bv.connect(t,{connector:r}):function(e){return new dv.ConnectableObservable(e,r)}};var yv={},_v=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},vv=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},mv=(Object.defineProperty(yv,"__esModule",{value:!0}),yv.onErrorResumeNext=yv.onErrorResumeNextWith=void 0,Qp),gv=Xp;function Ov(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=mv.argsOrArgArray(e);return function(e){return gv.onErrorResumeNext.apply(void 0,vv([e],_v(r)))}}yv.onErrorResumeNextWith=Ov,yv.onErrorResumeNext=Ov;var wv={},Ev=(Object.defineProperty(wv,"__esModule",{value:!0}),wv.pairwise=void 0,u),Pv=_;wv.pairwise=function(){return Ev.operate(function(e,r){var n,o=!1;e.subscribe(Pv.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var Sv={},Tv=(Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.pluck=void 0,Jl);Sv.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 Tv.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 jv={},Cv=(Object.defineProperty(jv,"__esModule",{value:!0}),jv.publish=void 0,h),Iv=pv,Rv=Ob;jv.publish=function(t){return t?function(e){return Rv.connect(t)(e)}:function(e){return Iv.multicast(new Cv.Subject)(e)}};var Av={},kv=(Object.defineProperty(Av,"__esModule",{value:!0}),Av.publishBehavior=void 0,i),Mv=P;Av.publishBehavior=function(r){return function(e){var t=new kv.BehaviorSubject(r);return new Mv.ConnectableObservable(e,function(){return t})}};var Nv={},xv=(Object.defineProperty(Nv,"__esModule",{value:!0}),Nv.publishLast=void 0,Dr),Dv=P;Nv.publishLast=function(){return function(e){var t=new xv.AsyncSubject;return new Dv.ConnectableObservable(e,function(){return t})}};var Uv={},Lv=(Object.defineProperty(Uv,"__esModule",{value:!0}),Uv.publishReplay=void 0,Ze),Fv=pv,Bv=m;Uv.publishReplay=function(t,r,e,n){e&&!Bv.isFunction(e)&&(n=e);var o=Bv.isFunction(e)?e:void 0;return function(e){return Fv.multicast(new Lv.ReplaySubject(t,r,n),o)(e)}};var Wv={},qv=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},zv=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},Vv=(Object.defineProperty(Wv,"__esModule",{value:!0}),Wv.raceWith=void 0,hd),Hv=u,Gv=E;Wv.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?Hv.operate(function(e,t){Vv.raceInit(zv([e],qv(r)))(t)}):Gv.identity};var Yv={},Kv=(Object.defineProperty(Yv,"__esModule",{value:!0}),Yv.repeat=void 0,qa),Zv=u,Xv=_,Qv=j,Jv=Dp;Yv.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 Kv.EMPTY}:Zv.operate(function(t,r){function n(){var e=!1;o=t.subscribe(Xv.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?Jv.timer(a):Qv.innerFrom(a(i)),t=Xv.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var $v={},em=(Object.defineProperty($v,"__esModule",{value:!0}),$v.repeatWhen=void 0,j),tm=h,rm=u,nm=_;$v.repeatWhen=function(l){return rm.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 tm.Subject,em.innerFrom(l(n)).subscribe(nm.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(nm.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var om={},im=(Object.defineProperty(om,"__esModule",{value:!0}),om.retry=void 0,u),um=_,am=E,sm=Dp,cm=j;om.retry=function(e){var t=(e=(e=void 0===e?1/0:e)&&"object"==typeof e?e:{count:e}).count,c=void 0===t?1/0:t,l=e.delay,r=void 0!==(t=e.resetOnSuccess)&&t;return c<=0?am.identity:im.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(um.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?sm.timer(l):cm.innerFrom(l(e,a)),n=um.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var lm={},fm=(Object.defineProperty(lm,"__esModule",{value:!0}),lm.retryWhen=void 0,j),pm=h,dm=u,hm=_;lm.retryWhen=function(u){return dm.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(hm.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new pm.Subject,fm.innerFrom(u(n)).subscribe(hm.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var bm={},ym=(Object.defineProperty(bm,"__esModule",{value:!0}),bm.sample=void 0,j),_m=u,vm=n,mm=_;bm.sample=function(o){return _m.operate(function(e,t){var r=!1,n=null;e.subscribe(mm.createOperatorSubscriber(t,function(e){r=!0,n=e})),ym.innerFrom(o).subscribe(mm.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},vm.noop))})};var gm={},Om=(Object.defineProperty(gm,"__esModule",{value:!0}),gm.sampleTime=void 0,za),wm=bm,Em=xp;gm.sampleTime=function(e,t){return wm.sample(Em.interval(e,t=void 0===t?Om.asyncScheduler:t))};var Pm={},Sm=(Object.defineProperty(Pm,"__esModule",{value:!0}),Pm.scan=void 0,u),Tm=Ah;Pm.scan=function(e,t){return Sm.operate(Tm.scanInternals(e,t,2<=arguments.length,!0))};var Ah={},jm=(Object.defineProperty(Ah,"__esModule",{value:!0}),Ah.sequenceEqual=void 0,u),Cm=_,Im=j;function Rm(){return{buffer:[],complete:!1}}Ah.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),jm.operate(function(e,t){function r(n,o){var r=Cm.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=Rm(),o=Rm(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),Im.innerFrom(u).subscribe(r(o,n))})};var Am={},km=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},Mm=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},Nm=(Object.defineProperty(Am,"__esModule",{value:!0}),Am.share=void 0,j),xm=h,Dm=Ar,Um=u;function Lm(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 Dm.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),Nm.innerFrom(t.apply(void 0,Mm([],km(n)))).subscribe(r)}Am.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new xm.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 Um.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=Lm(n,b))}),r.subscribe(t),!o&&0<a&&(o=new Dm.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=Lm(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=Lm(f,h),r.complete()}}),Nm.innerFrom(e).subscribe(o))})(e)}};var Fm={},Bm=(Object.defineProperty(Fm,"__esModule",{value:!0}),Fm.shareReplay=void 0,Ze),Wm=Am;Fm.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,Wm.share({connector:function(){return new Bm.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var qm={},zm=(Object.defineProperty(qm,"__esModule",{value:!0}),qm.single=void 0,nc),Vm=Qc,Hm=ll,Gm=u,Ym=_;qm.single=function(a){return Gm.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(Ym.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new Vm.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new Hm.NotFoundError("No matching values"):new zm.EmptyError)}))})};var Km={},Zm=(Object.defineProperty(Km,"__esModule",{value:!0}),Km.skip=void 0,sd);Km.skip=function(r){return Zm.filter(function(e,t){return r<=t})};var Xm={},Qm=(Object.defineProperty(Xm,"__esModule",{value:!0}),Xm.skipLast=void 0,E),Jm=u,$m=_;Xm.skipLast=function(u){return u<=0?Qm.identity:Jm.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe($m.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 e0={},t0=(Object.defineProperty(e0,"__esModule",{value:!0}),e0.skipUntil=void 0,u),r0=_,n0=j,o0=n;e0.skipUntil=function(o){return t0.operate(function(e,t){var r=!1,n=r0.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},o0.noop);n0.innerFrom(o).subscribe(n),e.subscribe(r0.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var i0={},u0=(Object.defineProperty(i0,"__esModule",{value:!0}),i0.skipWhile=void 0,u),a0=_;i0.skipWhile=function(o){return u0.operate(function(e,t){var r=!1,n=0;e.subscribe(a0.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var s0={},c0=(Object.defineProperty(s0,"__esModule",{value:!0}),s0.startWith=void 0,Nf),l0=l,f0=u;s0.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=l0.popScheduler(r);return f0.operate(function(e,t){(n?c0.concat(r,e,n):c0.concat(r,e)).subscribe(t)})};var p0={},d0={},h0=(Object.defineProperty(d0,"__esModule",{value:!0}),d0.switchMap=void 0,j),b0=u,y0=_;d0.switchMap=function(s,c){return b0.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(y0.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;h0.innerFrom(s(t,n)).subscribe(u=y0.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(p0,"__esModule",{value:!0}),p0.switchAll=void 0;var _0=d0,v0=E;p0.switchAll=function(){return _0.switchMap(v0.identity)};var m0={},g0=(Object.defineProperty(m0,"__esModule",{value:!0}),m0.switchMapTo=void 0,d0),O0=m;m0.switchMapTo=function(e,t){return O0.isFunction(t)?g0.switchMap(function(){return e},t):g0.switchMap(function(){return e})};var w0={},E0=(Object.defineProperty(w0,"__esModule",{value:!0}),w0.switchScan=void 0,d0),P0=u;w0.switchScan=function(n,o){return P0.operate(function(e,t){var r=o;return E0.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var S0={},T0=(Object.defineProperty(S0,"__esModule",{value:!0}),S0.takeUntil=void 0,u),j0=_,C0=j,I0=n;S0.takeUntil=function(r){return T0.operate(function(e,t){C0.innerFrom(r).subscribe(j0.createOperatorSubscriber(t,function(){return t.complete()},I0.noop)),t.closed||e.subscribe(t)})};var R0={},A0=(Object.defineProperty(R0,"__esModule",{value:!0}),R0.takeWhile=void 0,u),k0=_;R0.takeWhile=function(o,i){return void 0===i&&(i=!1),A0.operate(function(e,r){var n=0;e.subscribe(k0.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var M0={},N0=(Object.defineProperty(M0,"__esModule",{value:!0}),M0.tap=void 0,m),x0=u,D0=_,U0=E;M0.tap=function(e,t,r){var o=N0.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?x0.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(D0.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)}))}):U0.identity};var m={},L0=(Object.defineProperty(m,"__esModule",{value:!0}),m.throttle=void 0,u),F0=_,B0=j;m.throttle=function(h,b){return L0.operate(function(e,t){function r(){var e;a&&(a=!1,e=s,s=null,t.next(e),l||d(e))}var n=null!=b?b:{},o=n.leading,i=void 0===o||o,o=n.trailing,u=void 0!==o&&o,a=!1,s=null,c=null,l=!1,f=function(){null!=c&&c.unsubscribe(),c=null,u&&(r(),l&&t.complete())},p=function(){c=null,l&&t.complete()},d=function(e){return c=B0.innerFrom(h(e)).subscribe(F0.createOperatorSubscriber(t,f,p))};e.subscribe(F0.createOperatorSubscriber(t,function(e){a=!0,s=e,c&&!c.closed||(i?r():d(e))},function(){l=!0,u&&a&&c&&!c.closed||t.complete()}))})};var W0={},q0=(Object.defineProperty(W0,"__esModule",{value:!0}),W0.throttleTime=void 0,za),z0=m,V0=Dp;W0.throttleTime=function(e,t,r){var n=V0.timer(e,t=void 0===t?q0.asyncScheduler:t);return z0.throttle(function(){return n},r)};var H0={},G0=(Object.defineProperty(H0,"__esModule",{value:!0}),H0.TimeInterval=H0.timeInterval=void 0,za),Y0=u,K0=_;H0.timeInterval=function(i){return void 0===i&&(i=G0.asyncScheduler),Y0.operate(function(e,n){var o=i.now();e.subscribe(K0.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new Z0(e,r))}))})};var Z0=function(e,t){this.value=e,this.interval=t},X0=(H0.TimeInterval=Z0,{}),Q0=(Object.defineProperty(X0,"__esModule",{value:!0}),X0.timeoutWith=void 0,za),J0=tl,$0=yc;X0.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:Q0.async,J0.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 $0.timeout({first:n,each:o,scheduler:r,with:e})};var tl={},eg=(Object.defineProperty(tl,"__esModule",{value:!0}),tl.timestamp=void 0,a),tg=Jl;tl.timestamp=function(t){return void 0===t&&(t=eg.dateTimestampProvider),tg.map(function(e){return{value:e,timestamp:t.now()}})};var a={},rg=(Object.defineProperty(a,"__esModule",{value:!0}),a.window=void 0,h),ng=u,og=_,ig=n,ug=j;a.window=function(o){return ng.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new rg.Subject;t.next(n.asObservable());return e.subscribe(og.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),ug.innerFrom(o).subscribe(og.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new rg.Subject)},ig.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var ag={},sg=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.")},cg=(Object.defineProperty(ag,"__esModule",{value:!0}),ag.windowCount=void 0,h),lg=u,fg=_;ag.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return lg.operate(function(e,i){var u=[new cg.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(fg.createOperatorSubscriber(i,function(e){try{for(var t=sg(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 cg.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 pg={},dg=(Object.defineProperty(pg,"__esModule",{value:!0}),pg.windowTime=void 0,h),hg=za,bg=v,yg=u,_g=_,vg=Pt,mg=l,gg=qc;pg.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=mg.popScheduler(t))?e:hg.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return yg.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(),vg.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new bg.Subscription,n.add(e),t=new dg.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),gg.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?gg.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(_g.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 qc={},Og=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.")},wg=(Object.defineProperty(qc,"__esModule",{value:!0}),qc.windowToggle=void 0,h),Eg=v,Pg=u,Sg=j,Tg=_,jg=n,Cg=Pt;qc.windowToggle=function(t,a){return Pg.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];Sg.innerFrom(t).subscribe(Tg.createOperatorSubscriber(o,function(e){var t,r=new wg.Subject,n=(u.push(r),new Eg.Subscription);try{t=Sg.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(Tg.createOperatorSubscriber(o,function(){Cg.arrRemove(u,r),r.complete(),n.unsubscribe()},jg.noop,i)))},jg.noop)),e.subscribe(Tg.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=Og(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 Pt={},Ig=(Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.windowWhen=void 0,h),Rg=u,Ag=_,kg=j;Pt.windowWhen=function(u){return Rg.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 Ig.Subject,t.next(r.asObservable());try{e=kg.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=Ag.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(Ag.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var Mg={},Ng=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},xg=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},Dg=(Object.defineProperty(Mg,"__esModule",{value:!0}),Mg.withLatestFrom=void 0,u),Ug=_,Lg=j,Fg=E,Bg=n,Wg=l;Mg.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=Wg.popResultSelector(a);return Dg.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){Lg.innerFrom(a[t]).subscribe(Ug.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(Fg.identity))&&(o=null))},Bg.noop))}(u);e.subscribe(Ug.createOperatorSubscriber(r,function(e){i&&(e=xg([e],Ng(n)),r.next(s?s.apply(void 0,xg([],Ng(e))):e))}))})};var _={},qg=(Object.defineProperty(_,"__esModule",{value:!0}),_.zipAll=void 0,jd),zg=C;_.zipAll=function(e){return zg.joinAllInternals(qg.zip,e)};var j={},l={},Vg=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},Hg=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},Gg=(Object.defineProperty(l,"__esModule",{value:!0}),l.zip=void 0,jd),Yg=u;l.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Yg.operate(function(e,t){Gg.zip.apply(void 0,Hg([e],Vg(r))).subscribe(t)})};var Kg,Zg,Xg,Qg,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,AO,kO,MO,NO,xO,DO,UO,LO,FO,BO,WO,qO,zO,VO,HO,GO,YO,KO,ZO,XO,QO,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,Aw,kw,Mw,Nw,xw,Dw,Uw,Lw,Fw,Bw,Ww,qw,zw,Vw,Hw,Gw,Yw,Kw,Zw,Xw,Qw,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,AE,kE,ME,NE,xE,DE,UE,LE,FE,BE,WE,qE,zE,VE,HE,GE,YE,KE,ZE,XE,QE,JE,$E,eP=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},rP=(Object.defineProperty(j,"__esModule",{value:!0}),j.zipWith=void 0,l);j.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return rP.zip.apply(void 0,tP([],eP(e)))},C=Fr,Kg=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]}),u=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Kg(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,Zg=S,Object.defineProperty(C,"Observable",{enumerable:!0,get:function(){return Zg.Observable}}),Xg=P,Object.defineProperty(C,"ConnectableObservable",{enumerable:!0,get:function(){return Xg.ConnectableObservable}}),Qg=s,Object.defineProperty(C,"observable",{enumerable:!0,get:function(){return Qg.observable}}),Jg=t,Object.defineProperty(C,"animationFrames",{enumerable:!0,get:function(){return Jg.animationFrames}}),$g=h,Object.defineProperty(C,"Subject",{enumerable:!0,get:function(){return $g.Subject}}),eO=i,Object.defineProperty(C,"BehaviorSubject",{enumerable:!0,get:function(){return eO.BehaviorSubject}}),tO=Ze,Object.defineProperty(C,"ReplaySubject",{enumerable:!0,get:function(){return tO.ReplaySubject}}),rO=Dr,Object.defineProperty(C,"AsyncSubject",{enumerable:!0,get:function(){return rO.AsyncSubject}}),nO=g,Object.defineProperty(C,"asap",{enumerable:!0,get:function(){return nO.asap}}),Object.defineProperty(C,"asapScheduler",{enumerable:!0,get:function(){return nO.asapScheduler}}),oO=za,Object.defineProperty(C,"async",{enumerable:!0,get:function(){return oO.async}}),Object.defineProperty(C,"asyncScheduler",{enumerable:!0,get:function(){return oO.asyncScheduler}}),iO=bs,Object.defineProperty(C,"queue",{enumerable:!0,get:function(){return iO.queue}}),Object.defineProperty(C,"queueScheduler",{enumerable:!0,get:function(){return iO.queueScheduler}}),uO=Ss,Object.defineProperty(C,"animationFrame",{enumerable:!0,get:function(){return uO.animationFrame}}),Object.defineProperty(C,"animationFrameScheduler",{enumerable:!0,get:function(){return uO.animationFrameScheduler}}),aO=Is,Object.defineProperty(C,"VirtualTimeScheduler",{enumerable:!0,get:function(){return aO.VirtualTimeScheduler}}),Object.defineProperty(C,"VirtualAction",{enumerable:!0,get:function(){return aO.VirtualAction}}),sO=Qa,Object.defineProperty(C,"Scheduler",{enumerable:!0,get:function(){return sO.Scheduler}}),cO=v,Object.defineProperty(C,"Subscription",{enumerable:!0,get:function(){return cO.Subscription}}),lO=Ar,Object.defineProperty(C,"Subscriber",{enumerable:!0,get:function(){return lO.Subscriber}}),fO=Va,Object.defineProperty(C,"Notification",{enumerable:!0,get:function(){return fO.Notification}}),Object.defineProperty(C,"NotificationKind",{enumerable:!0,get:function(){return fO.NotificationKind}}),pO=p,Object.defineProperty(C,"pipe",{enumerable:!0,get:function(){return pO.pipe}}),dO=n,Object.defineProperty(C,"noop",{enumerable:!0,get:function(){return dO.noop}}),hO=E,Object.defineProperty(C,"identity",{enumerable:!0,get:function(){return hO.identity}}),bO=pc,Object.defineProperty(C,"isObservable",{enumerable:!0,get:function(){return bO.isObservable}}),yO=ic,Object.defineProperty(C,"lastValueFrom",{enumerable:!0,get:function(){return yO.lastValueFrom}}),_O=sc,Object.defineProperty(C,"firstValueFrom",{enumerable:!0,get:function(){return _O.firstValueFrom}}),vO=lc,Object.defineProperty(C,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return vO.ArgumentOutOfRangeError}}),mO=nc,Object.defineProperty(C,"EmptyError",{enumerable:!0,get:function(){return mO.EmptyError}}),gO=ll,Object.defineProperty(C,"NotFoundError",{enumerable:!0,get:function(){return gO.NotFoundError}}),OO=o,Object.defineProperty(C,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return OO.ObjectUnsubscribedError}}),wO=Qc,Object.defineProperty(C,"SequenceError",{enumerable:!0,get:function(){return wO.SequenceError}}),EO=yc,Object.defineProperty(C,"TimeoutError",{enumerable:!0,get:function(){return EO.TimeoutError}}),PO=y,Object.defineProperty(C,"UnsubscriptionError",{enumerable:!0,get:function(){return PO.UnsubscriptionError}}),SO=fc,Object.defineProperty(C,"bindCallback",{enumerable:!0,get:function(){return SO.bindCallback}}),TO=bf,Object.defineProperty(C,"bindNodeCallback",{enumerable:!0,get:function(){return TO.bindNodeCallback}}),jO=O,Object.defineProperty(C,"combineLatest",{enumerable:!0,get:function(){return jO.combineLatest}}),CO=Nf,Object.defineProperty(C,"concat",{enumerable:!0,get:function(){return CO.concat}}),IO=$f,Object.defineProperty(C,"connectable",{enumerable:!0,get:function(){return IO.connectable}}),RO=ep,Object.defineProperty(C,"defer",{enumerable:!0,get:function(){return RO.defer}}),AO=qa,Object.defineProperty(C,"empty",{enumerable:!0,get:function(){return AO.empty}}),kO=ap,Object.defineProperty(C,"forkJoin",{enumerable:!0,get:function(){return kO.forkJoin}}),MO=$s,Object.defineProperty(C,"from",{enumerable:!0,get:function(){return MO.from}}),NO=_f,Object.defineProperty(C,"fromEvent",{enumerable:!0,get:function(){return NO.fromEvent}}),xO=wf,Object.defineProperty(C,"fromEventPattern",{enumerable:!0,get:function(){return xO.fromEventPattern}}),DO=rc,Object.defineProperty(C,"generate",{enumerable:!0,get:function(){return DO.generate}}),UO=nl,Object.defineProperty(C,"iif",{enumerable:!0,get:function(){return UO.iif}}),LO=xp,Object.defineProperty(C,"interval",{enumerable:!0,get:function(){return LO.interval}}),FO=Ks,Object.defineProperty(C,"merge",{enumerable:!0,get:function(){return FO.merge}}),BO=Zp,Object.defineProperty(C,"never",{enumerable:!0,get:function(){return BO.never}}),WO=w,Object.defineProperty(C,"of",{enumerable:!0,get:function(){return WO.of}}),qO=Xp,Object.defineProperty(C,"onErrorResumeNext",{enumerable:!0,get:function(){return qO.onErrorResumeNext}}),zO=od,Object.defineProperty(C,"pairs",{enumerable:!0,get:function(){return zO.pairs}}),VO=ud,Object.defineProperty(C,"partition",{enumerable:!0,get:function(){return VO.partition}}),HO=hd,Object.defineProperty(C,"race",{enumerable:!0,get:function(){return HO.race}}),GO=gd,Object.defineProperty(C,"range",{enumerable:!0,get:function(){return GO.range}}),YO=tc,Object.defineProperty(C,"throwError",{enumerable:!0,get:function(){return YO.throwError}}),KO=Dp,Object.defineProperty(C,"timer",{enumerable:!0,get:function(){return KO.timer}}),ZO=Ed,Object.defineProperty(C,"using",{enumerable:!0,get:function(){return ZO.using}}),XO=jd,Object.defineProperty(C,"zip",{enumerable:!0,get:function(){return XO.zip}}),QO=ec,Object.defineProperty(C,"scheduled",{enumerable:!0,get:function(){return QO.scheduled}}),JO=qa,Object.defineProperty(C,"EMPTY",{enumerable:!0,get:function(){return JO.EMPTY}}),$O=Zp,Object.defineProperty(C,"NEVER",{enumerable:!0,get:function(){return $O.NEVER}}),u(Dd,C),ew=b,Object.defineProperty(C,"config",{enumerable:!0,get:function(){return ew.config}}),tw=Ud,Object.defineProperty(C,"audit",{enumerable:!0,get:function(){return tw.audit}}),rw=Wd,Object.defineProperty(C,"auditTime",{enumerable:!0,get:function(){return rw.auditTime}}),nw=Hd,Object.defineProperty(C,"buffer",{enumerable:!0,get:function(){return nw.buffer}}),ow=Xd,Object.defineProperty(C,"bufferCount",{enumerable:!0,get:function(){return ow.bufferCount}}),iw=th,Object.defineProperty(C,"bufferTime",{enumerable:!0,get:function(){return iw.bufferTime}}),uw=lh,Object.defineProperty(C,"bufferToggle",{enumerable:!0,get:function(){return uw.bufferToggle}}),aw=vh,Object.defineProperty(C,"bufferWhen",{enumerable:!0,get:function(){return aw.bufferWhen}}),sw=Eh,Object.defineProperty(C,"catchError",{enumerable:!0,get:function(){return sw.catchError}}),cw=jh,Object.defineProperty(C,"combineAll",{enumerable:!0,get:function(){return cw.combineAll}}),lw=Ch,Object.defineProperty(C,"combineLatestAll",{enumerable:!0,get:function(){return lw.combineLatestAll}}),fw=Hh,Object.defineProperty(C,"combineLatestWith",{enumerable:!0,get:function(){return fw.combineLatestWith}}),pw=xf,Object.defineProperty(C,"concatAll",{enumerable:!0,get:function(){return pw.concatAll}}),dw=Ql,Object.defineProperty(C,"concatMap",{enumerable:!0,get:function(){return dw.concatMap}}),hw=ab,Object.defineProperty(C,"concatMapTo",{enumerable:!0,get:function(){return hw.concatMapTo}}),bw=lb,Object.defineProperty(C,"concatWith",{enumerable:!0,get:function(){return bw.concatWith}}),yw=Ob,Object.defineProperty(C,"connect",{enumerable:!0,get:function(){return yw.connect}}),_w=wb,Object.defineProperty(C,"count",{enumerable:!0,get:function(){return _w.count}}),vw=Rb,Object.defineProperty(C,"debounce",{enumerable:!0,get:function(){return vw.debounce}}),mw=xb,Object.defineProperty(C,"debounceTime",{enumerable:!0,get:function(){return mw.debounceTime}}),gw=Fb,Object.defineProperty(C,"defaultIfEmpty",{enumerable:!0,get:function(){return gw.defaultIfEmpty}}),Ow=I,Object.defineProperty(C,"delay",{enumerable:!0,get:function(){return Ow.delay}}),ww=qb,Object.defineProperty(C,"delayWhen",{enumerable:!0,get:function(){return ww.delayWhen}}),Ew=sy,Object.defineProperty(C,"dematerialize",{enumerable:!0,get:function(){return Ew.dematerialize}}),Pw=py,Object.defineProperty(C,"distinct",{enumerable:!0,get:function(){return Pw.distinct}}),Sw=_y,Object.defineProperty(C,"distinctUntilChanged",{enumerable:!0,get:function(){return Sw.distinctUntilChanged}}),Tw=wy,Object.defineProperty(C,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Tw.distinctUntilKeyChanged}}),jw=Py,Object.defineProperty(C,"elementAt",{enumerable:!0,get:function(){return jw.elementAt}}),Cw=xy,Object.defineProperty(C,"endWith",{enumerable:!0,get:function(){return Cw.endWith}}),Iw=By,Object.defineProperty(C,"every",{enumerable:!0,get:function(){return Iw.every}}),Rw=zy,Object.defineProperty(C,"exhaust",{enumerable:!0,get:function(){return Rw.exhaust}}),Aw=Vy,Object.defineProperty(C,"exhaustAll",{enumerable:!0,get:function(){return Aw.exhaustAll}}),kw=Hy,Object.defineProperty(C,"exhaustMap",{enumerable:!0,get:function(){return kw.exhaustMap}}),Mw=Jy,Object.defineProperty(C,"expand",{enumerable:!0,get:function(){return Mw.expand}}),Nw=sd,Object.defineProperty(C,"filter",{enumerable:!0,get:function(){return Nw.filter}}),xw=t_,Object.defineProperty(C,"finalize",{enumerable:!0,get:function(){return xw.finalize}}),Dw=n_,Object.defineProperty(C,"find",{enumerable:!0,get:function(){return Dw.find}}),Uw=a_,Object.defineProperty(C,"findIndex",{enumerable:!0,get:function(){return Uw.findIndex}}),Lw=l_,Object.defineProperty(C,"first",{enumerable:!0,get:function(){return Lw.first}}),Fw=__,Object.defineProperty(C,"groupBy",{enumerable:!0,get:function(){return Fw.groupBy}}),Bw=Yb,Object.defineProperty(C,"ignoreElements",{enumerable:!0,get:function(){return Bw.ignoreElements}}),Ww=E_,Object.defineProperty(C,"isEmpty",{enumerable:!0,get:function(){return Ww.isEmpty}}),qw=T_,Object.defineProperty(C,"last",{enumerable:!0,get:function(){return qw.last}}),zw=Jl,Object.defineProperty(C,"map",{enumerable:!0,get:function(){return zw.map}}),Vw=Qb,Object.defineProperty(C,"mapTo",{enumerable:!0,get:function(){return Vw.mapTo}}),Hw=L_,Object.defineProperty(C,"materialize",{enumerable:!0,get:function(){return Hw.materialize}}),Gw=q_,Object.defineProperty(C,"max",{enumerable:!0,get:function(){return Gw.max}}),Yw=Df,Object.defineProperty(C,"mergeAll",{enumerable:!0,get:function(){return Yw.mergeAll}}),Kw=H_,Object.defineProperty(C,"flatMap",{enumerable:!0,get:function(){return Kw.flatMap}}),Zw=Uf,Object.defineProperty(C,"mergeMap",{enumerable:!0,get:function(){return Zw.mergeMap}}),Xw=G_,Object.defineProperty(C,"mergeMapTo",{enumerable:!0,get:function(){return Xw.mergeMapTo}}),Qw=Z_,Object.defineProperty(C,"mergeScan",{enumerable:!0,get:function(){return Qw.mergeScan}}),Jw=Lf,Object.defineProperty(C,"mergeWith",{enumerable:!0,get:function(){return Jw.mergeWith}}),$w=cv,Object.defineProperty(C,"min",{enumerable:!0,get:function(){return $w.min}}),eE=pv,Object.defineProperty(C,"multicast",{enumerable:!0,get:function(){return eE.multicast}}),tE=T,Object.defineProperty(C,"observeOn",{enumerable:!0,get:function(){return tE.observeOn}}),rE=yv,Object.defineProperty(C,"onErrorResumeNextWith",{enumerable:!0,get:function(){return rE.onErrorResumeNextWith}}),nE=wv,Object.defineProperty(C,"pairwise",{enumerable:!0,get:function(){return nE.pairwise}}),oE=Sv,Object.defineProperty(C,"pluck",{enumerable:!0,get:function(){return oE.pluck}}),iE=jv,Object.defineProperty(C,"publish",{enumerable:!0,get:function(){return iE.publish}}),uE=Av,Object.defineProperty(C,"publishBehavior",{enumerable:!0,get:function(){return uE.publishBehavior}}),aE=Nv,Object.defineProperty(C,"publishLast",{enumerable:!0,get:function(){return aE.publishLast}}),sE=Uv,Object.defineProperty(C,"publishReplay",{enumerable:!0,get:function(){return sE.publishReplay}}),cE=Wv,Object.defineProperty(C,"raceWith",{enumerable:!0,get:function(){return cE.raceWith}}),lE=Rh,Object.defineProperty(C,"reduce",{enumerable:!0,get:function(){return lE.reduce}}),fE=Yv,Object.defineProperty(C,"repeat",{enumerable:!0,get:function(){return fE.repeat}}),pE=$v,Object.defineProperty(C,"repeatWhen",{enumerable:!0,get:function(){return pE.repeatWhen}}),dE=om,Object.defineProperty(C,"retry",{enumerable:!0,get:function(){return dE.retry}}),hE=lm,Object.defineProperty(C,"retryWhen",{enumerable:!0,get:function(){return hE.retryWhen}}),bE=Tr,Object.defineProperty(C,"refCount",{enumerable:!0,get:function(){return bE.refCount}}),yE=bm,Object.defineProperty(C,"sample",{enumerable:!0,get:function(){return yE.sample}}),_E=gm,Object.defineProperty(C,"sampleTime",{enumerable:!0,get:function(){return _E.sampleTime}}),vE=Pm,Object.defineProperty(C,"scan",{enumerable:!0,get:function(){return vE.scan}}),mE=Ah,Object.defineProperty(C,"sequenceEqual",{enumerable:!0,get:function(){return mE.sequenceEqual}}),gE=Am,Object.defineProperty(C,"share",{enumerable:!0,get:function(){return gE.share}}),OE=Fm,Object.defineProperty(C,"shareReplay",{enumerable:!0,get:function(){return OE.shareReplay}}),wE=qm,Object.defineProperty(C,"single",{enumerable:!0,get:function(){return wE.single}}),EE=Km,Object.defineProperty(C,"skip",{enumerable:!0,get:function(){return EE.skip}}),PE=Xm,Object.defineProperty(C,"skipLast",{enumerable:!0,get:function(){return PE.skipLast}}),SE=e0,Object.defineProperty(C,"skipUntil",{enumerable:!0,get:function(){return SE.skipUntil}}),TE=i0,Object.defineProperty(C,"skipWhile",{enumerable:!0,get:function(){return TE.skipWhile}}),jE=s0,Object.defineProperty(C,"startWith",{enumerable:!0,get:function(){return jE.startWith}}),CE=Gc,Object.defineProperty(C,"subscribeOn",{enumerable:!0,get:function(){return CE.subscribeOn}}),IE=p0,Object.defineProperty(C,"switchAll",{enumerable:!0,get:function(){return IE.switchAll}}),RE=d0,Object.defineProperty(C,"switchMap",{enumerable:!0,get:function(){return RE.switchMap}}),AE=m0,Object.defineProperty(C,"switchMapTo",{enumerable:!0,get:function(){return AE.switchMapTo}}),kE=w0,Object.defineProperty(C,"switchScan",{enumerable:!0,get:function(){return kE.switchScan}}),ME=zb,Object.defineProperty(C,"take",{enumerable:!0,get:function(){return ME.take}}),NE=j_,Object.defineProperty(C,"takeLast",{enumerable:!0,get:function(){return NE.takeLast}}),xE=S0,Object.defineProperty(C,"takeUntil",{enumerable:!0,get:function(){return xE.takeUntil}}),DE=R0,Object.defineProperty(C,"takeWhile",{enumerable:!0,get:function(){return DE.takeWhile}}),UE=M0,Object.defineProperty(C,"tap",{enumerable:!0,get:function(){return UE.tap}}),LE=m,Object.defineProperty(C,"throttle",{enumerable:!0,get:function(){return LE.throttle}}),FE=W0,Object.defineProperty(C,"throttleTime",{enumerable:!0,get:function(){return FE.throttleTime}}),BE=Sy,Object.defineProperty(C,"throwIfEmpty",{enumerable:!0,get:function(){return BE.throwIfEmpty}}),WE=H0,Object.defineProperty(C,"timeInterval",{enumerable:!0,get:function(){return WE.timeInterval}}),qE=yc,Object.defineProperty(C,"timeout",{enumerable:!0,get:function(){return qE.timeout}}),zE=X0,Object.defineProperty(C,"timeoutWith",{enumerable:!0,get:function(){return zE.timeoutWith}}),VE=tl,Object.defineProperty(C,"timestamp",{enumerable:!0,get:function(){return VE.timestamp}}),HE=Ih,Object.defineProperty(C,"toArray",{enumerable:!0,get:function(){return HE.toArray}}),GE=a,Object.defineProperty(C,"window",{enumerable:!0,get:function(){return GE.window}}),YE=ag,Object.defineProperty(C,"windowCount",{enumerable:!0,get:function(){return YE.windowCount}}),KE=pg,Object.defineProperty(C,"windowTime",{enumerable:!0,get:function(){return KE.windowTime}}),ZE=qc,Object.defineProperty(C,"windowToggle",{enumerable:!0,get:function(){return ZE.windowToggle}}),XE=Pt,Object.defineProperty(C,"windowWhen",{enumerable:!0,get:function(){return XE.windowWhen}}),QE=Mg,Object.defineProperty(C,"withLatestFrom",{enumerable:!0,get:function(){return QE.withLatestFrom}}),JE=_,Object.defineProperty(C,"zipAll",{enumerable:!0,get:function(){return JE.zipAll}}),$E=j,Object.defineProperty(C,"zipWith",{enumerable:!0,get:function(){return $E.zipWith}});var S={},P={},nP=(Object.defineProperty(P,"__esModule",{value:!0}),P.partition=void 0,ad),oP=sd;P.partition=function(t,r){return function(e){return[oP.filter(t,r)(e),oP.filter(nP.not(t,r))(e)]}};var 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,AP,kP,MP,NP,xP,DP,UP,LP,FP,BP,WP,qP,zP,VP,HP,GP,YP,KP,ZP,XP,QP,JP,$P,eS,tS,rS,nS,oS,iS,uS,aS,sS,cS,lS,fS,pS,dS,hS,bS,yS,_S,vS,mS,gS,OS,wS,ES,PS,SS,TS,jS,CS,IS,RS,AS,kS,MS,NS,xS,DS,US,LS,FS,BS,WS,qS,zS,VS,HS,GS,YS,KS,ZS,XS,QS,JS,$S,e1,t1,r1,n1,o1,i1,u1,a1,s1,c1,s={},l1=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},f1=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},p1=(Object.defineProperty(s,"__esModule",{value:!0}),s.race=void 0,Qp),d1=Wv;s.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return d1.raceWith.apply(void 0,f1([],l1(p1.argsOrArgArray(e))))},t=S,Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0,iP=Ud,Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return iP.audit}}),uP=Wd,Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return uP.auditTime}}),aP=Hd,Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return aP.buffer}}),sP=Xd,Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return sP.bufferCount}}),cP=th,Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return cP.bufferTime}}),lP=lh,Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return lP.bufferToggle}}),fP=vh,Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return fP.bufferWhen}}),pP=Eh,Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return pP.catchError}}),dP=jh,Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return dP.combineAll}}),hP=Ch,Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return hP.combineLatestAll}}),bP=Gh,Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return bP.combineLatest}}),yP=Hh,Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return yP.combineLatestWith}}),_P=fb,Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return _P.concat}}),vP=xf,Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return vP.concatAll}}),mP=Ql,Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return mP.concatMap}}),gP=ab,Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return gP.concatMapTo}}),OP=lb,Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return OP.concatWith}}),wP=Ob,Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return wP.connect}}),EP=wb,Object.defineProperty(t,"count",{enumerable:!0,get:function(){return EP.count}}),PP=Rb,Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return PP.debounce}}),SP=xb,Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return SP.debounceTime}}),TP=Fb,Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return TP.defaultIfEmpty}}),jP=I,Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return jP.delay}}),CP=qb,Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return CP.delayWhen}}),IP=sy,Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return IP.dematerialize}}),RP=py,Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return RP.distinct}}),AP=_y,Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return AP.distinctUntilChanged}}),kP=wy,Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return kP.distinctUntilKeyChanged}}),MP=Py,Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return MP.elementAt}}),NP=xy,Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return NP.endWith}}),xP=By,Object.defineProperty(t,"every",{enumerable:!0,get:function(){return xP.every}}),DP=zy,Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return DP.exhaust}}),UP=Vy,Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return UP.exhaustAll}}),LP=Hy,Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return LP.exhaustMap}}),FP=Jy,Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return FP.expand}}),BP=sd,Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return BP.filter}}),WP=t_,Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return WP.finalize}}),qP=n_,Object.defineProperty(t,"find",{enumerable:!0,get:function(){return qP.find}}),zP=a_,Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return zP.findIndex}}),VP=l_,Object.defineProperty(t,"first",{enumerable:!0,get:function(){return VP.first}}),HP=__,Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return HP.groupBy}}),GP=Yb,Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return GP.ignoreElements}}),YP=E_,Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return YP.isEmpty}}),KP=T_,Object.defineProperty(t,"last",{enumerable:!0,get:function(){return KP.last}}),ZP=Jl,Object.defineProperty(t,"map",{enumerable:!0,get:function(){return ZP.map}}),XP=Qb,Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return XP.mapTo}}),QP=L_,Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return QP.materialize}}),JP=q_,Object.defineProperty(t,"max",{enumerable:!0,get:function(){return JP.max}}),$P=J_,Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return $P.merge}}),eS=Df,Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return eS.mergeAll}}),tS=H_,Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return tS.flatMap}}),rS=Uf,Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return rS.mergeMap}}),nS=G_,Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return nS.mergeMapTo}}),oS=Z_,Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return oS.mergeScan}}),iS=Lf,Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return iS.mergeWith}}),uS=cv,Object.defineProperty(t,"min",{enumerable:!0,get:function(){return uS.min}}),aS=pv,Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return aS.multicast}}),sS=T,Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return sS.observeOn}}),cS=yv,Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return cS.onErrorResumeNext}}),lS=wv,Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return lS.pairwise}}),fS=P,Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return fS.partition}}),pS=Sv,Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return pS.pluck}}),dS=jv,Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return dS.publish}}),hS=Av,Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return hS.publishBehavior}}),bS=Nv,Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return bS.publishLast}}),yS=Uv,Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return yS.publishReplay}}),_S=s,Object.defineProperty(t,"race",{enumerable:!0,get:function(){return _S.race}}),vS=Wv,Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return vS.raceWith}}),mS=Rh,Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return mS.reduce}}),gS=Yv,Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return gS.repeat}}),OS=$v,Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return OS.repeatWhen}}),wS=om,Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return wS.retry}}),ES=lm,Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return ES.retryWhen}}),PS=Tr,Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return PS.refCount}}),SS=bm,Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return SS.sample}}),TS=gm,Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return TS.sampleTime}}),jS=Pm,Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return jS.scan}}),CS=Ah,Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return CS.sequenceEqual}}),IS=Am,Object.defineProperty(t,"share",{enumerable:!0,get:function(){return IS.share}}),RS=Fm,Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return RS.shareReplay}}),AS=qm,Object.defineProperty(t,"single",{enumerable:!0,get:function(){return AS.single}}),kS=Km,Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return kS.skip}}),MS=Xm,Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return MS.skipLast}}),NS=e0,Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return NS.skipUntil}}),xS=i0,Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return xS.skipWhile}}),DS=s0,Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return DS.startWith}}),US=Gc,Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return US.subscribeOn}}),LS=p0,Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return LS.switchAll}}),FS=d0,Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return FS.switchMap}}),BS=m0,Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return BS.switchMapTo}}),WS=w0,Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return WS.switchScan}}),qS=zb,Object.defineProperty(t,"take",{enumerable:!0,get:function(){return qS.take}}),zS=j_,Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return zS.takeLast}}),VS=S0,Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return VS.takeUntil}}),HS=R0,Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return HS.takeWhile}}),GS=M0,Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return GS.tap}}),YS=m,Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return YS.throttle}}),KS=W0,Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return KS.throttleTime}}),ZS=Sy,Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return ZS.throwIfEmpty}}),XS=H0,Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return XS.timeInterval}}),QS=yc,Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return QS.timeout}}),JS=X0,Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return JS.timeoutWith}}),$S=tl,Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return $S.timestamp}}),e1=Ih,Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return e1.toArray}}),t1=a,Object.defineProperty(t,"window",{enumerable:!0,get:function(){return t1.window}}),r1=ag,Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return r1.windowCount}}),n1=pg,Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return n1.windowTime}}),o1=qc,Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return o1.windowToggle}}),i1=Pt,Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return i1.windowWhen}}),u1=Mg,Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return u1.withLatestFrom}}),a1=l,Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return a1.zip}}),s1=_,Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return s1.zipAll}}),c1=j,Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return c1.zipWith}});var h={},h1=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())})},b1=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}}}},y1=(Object.defineProperty(h,"__esModule",{value:!0}),e),_1=Fr,v1=S,m1=0,g1=1,O1=2;function w1(e,t){e=e.pipe((0,v1.publishReplay)(1),(0,v1.refCount)());this._result=e,this._keys=e.pipe((0,v1.mergeMap)(function(e){return(0,_1.from)(e.keys())}),(0,v1.publishReplay)(1),(0,v1.refCount)()),this._records=void 0,this._controls=new E1,this._summary=new _1.ReplaySubject,this._state=t||m1}w1.prototype.keys=function(){return this._keys},w1.prototype.records=function(){var r=this,e=this._result.pipe((0,v1.mergeMap)(function(t){return new _1.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},w1.prototype.consume=function(){var r=this;return this._result.pipe((0,v1.mergeMap)(function(t){return new _1.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},w1.prototype.pause=function(){this._controls.pause()},w1.prototype.resume=function(){return this._controls.resume()},w1.prototype.push=function(){return this._controls.push()},w1.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<g1?(this._state=g1,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,y1.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},w1.prototype._toObservable=function(){var n=this;return new _1.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new w1((t=e,new _1.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},w1.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new E1);var a=new _1.Subject,s=function(n){return h1(e,void 0,void 0,function(){var t,r;return b1(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 h1(this,void 0,void 0,function(){return b1(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 h1(t,void 0,void 0,function(){var t,r;return b1(this,function(e){switch(e.label){case 0:return this._state=O1,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=O1,t._summary.error(e)}},this._controls),this._records)},h.default=w1;P1.prototype.pause=function(){this._paused=!0},Object.defineProperty(P1.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(P1.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),P1.prototype.resume=function(){return h1(this,void 0,void 0,function(){var t;return b1(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]}})})},P1.prototype.push=function(){return h1(this,void 0,void 0,function(){return b1(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(P1.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var E1=P1;function P1(e){void 0===e&&(e=function(){return h1(t,void 0,void 0,function(){return b1(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var i={},Ze=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},S1=(Object.defineProperty(i,"__esModule",{value:!0}),Fr),T1=Ze(h);function j1(e){this._txc=e}Ze(e),j1.prototype.run=function(e,r){var n=this;return new T1.default(new S1.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},j1.prototype.commit=function(){var e=this;return new S1.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},j1.prototype.rollback=function(){var e=this;return new S1.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},j1.prototype.isOpen=function(){return this._txc.isOpen()},j1.prototype.close=function(){var e=this;return new S1.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},i.default=j1;Dr={},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function C1(e){e=e.run;this._run=e}Object.defineProperty(Dr,"__esModule",{value:!0}),g(h),g(i),C1.fromTransaction=function(e){return new C1({run:e.run.bind(e)})},C1.prototype.run=function(e,t){return this._run(e,t)},Dr.default=C1;var za={},I1=(Object.defineProperty(za,"__esModule",{value:!0}),e),R1=Fr,A1=S,k1=(I1.internal.logger.Logger,I1.error.SERVICE_UNAVAILABLE);function M1(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=N1(void 0===t?3e4:t,3e4),this._initialDelay=N1(r,1e3),this._delayMultiplier=N1(n,2),this._delayJitter=N1(o,.2),this._logger=e}function N1(e,t){return e||0===e?e:t}M1.prototype.retry=function(e){var a=this;return e.pipe((0,A1.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,A1.mergeMap)(function(e){if(!(0,I1.isRetriableError)(e))return(0,R1.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,I1.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),k1)).seenErrors=n,(0,R1.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,R1.of)(1).pipe((0,A1.delay)(r))}))}))},M1.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},za.default=M1;var bs=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},x1=(Object.defineProperty(Gt,"__esModule",{value:!0}),Fr),D1=S,U1=bs(h),Ss=e,L1=bs(i),F1=bs(Dr),B1=bs(za),Is=Ss.internal.constants,W1=Is.ACCESS_MODE_READ,q1=Is.ACCESS_MODE_WRITE,z1=Is.TELEMETRY_APIS,V1=Ss.internal.txConfig.TxConfig;function H1(e){var e=void 0===e?{}:e,t=e.session,r=e.config,e=e.log;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new B1.default({maxRetryTimeout:e})}(r),this._log=e}H1.prototype.run=function(e,r,n){var o=this;return new U1.default(new x1.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},H1.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:z1.UNMANAGED_TRANSACTION})},H1.prototype.readTransaction=function(e,t){return this._runTransaction(W1,e,t)},H1.prototype.writeTransaction=function(e,t){return this._runTransaction(q1,e,t)},H1.prototype.executeRead=function(e,t){return this._executeInTransaction(W1,e,t)},H1.prototype.executeWrite=function(e,t){return this._executeInTransaction(q1,e,t)},H1.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new F1.default({run:e.run.bind(e)})})},H1.prototype.close=function(){var e=this;return new x1.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},H1.prototype[Symbol.asyncDispose]=function(){return this.close()},H1.prototype.lastBookmark=function(){return this.lastBookmarks()},H1.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},H1.prototype._beginTransaction=function(e,t,r){var n=this,o=V1.empty();return t&&(o=new V1(t,this._log)),new x1.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new L1.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},H1.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),V1.empty()),u=(t&&(i=new V1(t)),{apiTelemetryConfig:{api:z1.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,x1.of)(1).pipe((0,D1.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,D1.mergeMap)(function(t){return(0,x1.defer)(function(){try{return r(n(t))}catch(e){return(0,x1.throwError)(function(){return e})}}).pipe((0,D1.catchError)(function(e){return t.rollback().pipe((0,D1.concatWith)((0,x1.throwError)(function(){return e})))}),(0,D1.concatWith)(t.commit()))})))},Gt.default=H1;var G1,Y1,Qa=r&&r.__extends||(G1=function(e,t){return(G1=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}G1(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}},Ar=(Object.defineProperty(B,"__esModule",{value:!0}),B.WRITE=B.READ=B.Driver=void 0,e),K1=v(Gt),Z1=Ar.internal.constants.FETCH_ALL,Va=Ar.driver.READ,X1=Ar.driver.WRITE,p=(B.READ=Va,B.WRITE=X1,Qa(Q1,Y1=Ar.Driver),Q1.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 K1.default({session:this._newSession({defaultAccessMode:void 0===t?X1: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===Z1)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(Z1," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,log:this._log}),config:this._config,log:this._log})},Q1);function Q1(){return null!==Y1&&Y1.apply(this,arguments)||this}B.Driver=p,B.default=p;n={},Object.defineProperty(n,"__esModule",{value:!0}),n.default="5.22.0",E={},pc={},ic={};function J1(){}Object.defineProperty(ic,"__esModule",{value:!0}),J1.prototype.selectReader=function(e){throw new Error("Abstract function")},J1.prototype.selectWriter=function(e){throw new Error("Abstract function")},ic.default=J1;sc={},lc={};function $1(e){this._offset=e||0}Object.defineProperty(lc,"__esModule",{value:!0}),$1.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},lc.default=$1;var eT,tT,nc=r&&r.__extends||(eT=function(e,t){return(eT=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}eT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ll=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rT=(Object.defineProperty(sc,"__esModule",{value:!0}),ll(lc)),o=ll(ic),Qc=(tT=o.default,nc(nT,tT),nT.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},nT.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},nT.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},nT);function nT(e){var t=tT.call(this)||this;return t._readersIndex=new rT.default,t._writersIndex=new rT.default,t._connectionPool=e,t}sc.default=Qc;y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(pc,"__esModule",{value:!0}),pc.LeastConnectedLoadBalancingStrategy=pc.LoadBalancingStrategy=void 0,fc=y(ic),pc.LoadBalancingStrategy=fc.default,bf=y(sc),pc.LeastConnectedLoadBalancingStrategy=bf.default,pc.default=bf.default,O={},Nf={},$f={},ep={},ap={},$s={},_f={},wf={byteLength:function(e){var e=lT(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};wf.toByteArray=function(e){var t,r,n=lT(e),o=n[0],n=n[1],i=new uT(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=iT[e.charCodeAt(r)]<<18|iT[e.charCodeAt(r+1)]<<12|iT[e.charCodeAt(r+2)]<<6|iT[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=iT[e.charCodeAt(r)]<<2|iT[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=iT[e.charCodeAt(r)]<<10|iT[e.charCodeAt(r+1)]<<4|iT[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},wf.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 oT[e>>18&63]+oT[e>>12&63]+oT[e>>6&63]+oT[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(oT[t>>2]+oT[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(oT[t>>10]+oT[t>>4&63]+oT[t<<2&63]+"="));return o.join("")};for(var oT=[],iT=[],uT="undefined"!=typeof Uint8Array?Uint8Array:Array,aT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sT=0,cT=aT.length;sT<cT;++sT)oT[sT]=aT[sT],iT[aT.charCodeAt(sT)]=sT;function lT(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]}iT["-".charCodeAt(0)]=62,iT["_".charCodeAt(0)]=63;rc={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 fT=_f;const vx=wf,mx=rc,gx=(nl="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,fT.Buffer=R,fT.SlowBuffer=function(e){+e!=e&&(e=0);return R.alloc(+e)},fT.INSPECT_MAX_BYTES=50,2147483647);function pT(e){if(e>gx)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,R.prototype),e}function R(e,t,r){if("number"!=typeof e)return dT(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return bT(e)}function dT(t,r,e){if("string"==typeof t){var n=t;var o=r;"string"==typeof o&&""!==o||(o="utf8");if(!R.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var i=0|mT(n,o);let e=pT(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return qT(o=t,Uint8Array)?_T((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):yT(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(qT(t,ArrayBuffer)||t&&qT(t.buffer,ArrayBuffer))return _T(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(qT(t,SharedArrayBuffer)||t&&qT(t.buffer,SharedArrayBuffer)))return _T(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 R.from(n,r,e);var u=function(e){{var t,r;if(R.isBuffer(e))return t=0|vT(e.length),0===(r=pT(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||zT(e.length)?pT(0):yT(e);if("Buffer"===e.type&&Array.isArray(e.data))return yT(e.data)}(t);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return R.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 hT(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 bT(e){return hT(e),pT(e<0?0:0|vT(e))}function yT(t){var r=t.length<0?0:0|vT(t.length);const n=pT(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function _T(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,R.prototype),n}function vT(e){if(e>=gx)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+gx.toString(16)+" bytes");return 0|e}function mT(e,t){if(R.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||qT(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 FT(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return BT(e).length;default:if(o)return n?-1:FT(e).length;t=(""+t).toLowerCase(),o=!0}}function gT(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+=Px[o[e]];return t;return}case"utf8":case"utf-8":return TT(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?vx.fromByteArray(d):vx.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 OT(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function wT(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=zT(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=R.from(t,n)),R.isBuffer(t))return 0===t.length?-1:ET(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):ET(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function ET(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 PT(e,t,r,n){return WT(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 ST(e,t,r,n){return WT(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 TT(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<=Ox)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=Ox));return e}}fT.kMaxLength=gx,(R.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(R.prototype,"parent",{enumerable:!0,get:function(){if(R.isBuffer(this))return this.buffer}}),Object.defineProperty(R.prototype,"offset",{enumerable:!0,get:function(){if(R.isBuffer(this))return this.byteOffset}}),R.poolSize=8192,R.from=dT,Object.setPrototypeOf(R.prototype,Uint8Array.prototype),Object.setPrototypeOf(R,Uint8Array),R.alloc=function(e,t,r){return t=t,r=r,hT(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?pT(e).fill(t,r):pT(e).fill(t):pT(e)},R.allocUnsafe=bT,R.allocUnsafeSlow=bT,R.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==R.prototype},R.compare=function(r,n){if(qT(r,Uint8Array)&&(r=R.from(r,r.offset,r.byteLength)),qT(n,Uint8Array)&&(n=R.from(n,n.offset,n.byteLength)),!R.isBuffer(r)||!R.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},R.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}},R.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return R.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=R.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(qT(e,Uint8Array))o+e.length>n.length?(e=R.isBuffer(e)?e:R.from(e)).copy(n,o):Uint8Array.prototype.set.call(n,e,o);else{if(!R.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},R.byteLength=mT,R.prototype._isBuffer=!0,R.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)OT(this,e,e+1);return this},R.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)OT(this,e,e+3),OT(this,e+1,e+2);return this},R.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)OT(this,e,e+7),OT(this,e+1,e+6),OT(this,e+2,e+5),OT(this,e+3,e+4);return this},R.prototype.toLocaleString=R.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?TT(this,0,e):gT.apply(this,arguments)},R.prototype.equals=function(e){if(R.isBuffer(e))return this===e||0===R.compare(this,e);throw new TypeError("Argument must be a Buffer")},R.prototype.inspect=function(){let e="";var t=fT.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},nl&&(R.prototype[nl]=R.prototype.inspect),R.prototype.compare=function(e,t,r,n,o){if(qT(e,Uint8Array)&&(e=R.from(e,e.offset,e.byteLength)),!R.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},R.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},R.prototype.indexOf=function(e,t,r){return wT(this,e,t,r,!0)},R.prototype.lastIndexOf=function(e,t,r){return wT(this,e,t,r,!1)},R.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(zT(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,WT(FT(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return PT(this,t,r,n);case"base64":return i=this,u=r,o=n,WT(BT(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ST(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),s=!0}},R.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Ox=4096;function jT(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 CT(e,t,r,n,o,i){if(!R.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 IT(e,t,r,n,o){DT(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 RT(e,t,r,n,o){DT(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 AT(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 kT(e,t,r,n,o){return t=+t,r>>>=0,o||AT(e,0,r,4),mx.write(e,t,r,n,23,4),r+4}function MT(e,t,r,n,o){return t=+t,r>>>=0,o||AT(e,0,r,8),mx.write(e,t,r,n,52,8),r+8}R.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,R.prototype),r},R.prototype.readUintLE=R.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||jT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},R.prototype.readUintBE=R.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||jT(e,t,this.length);let n=this[e+--t],o=1;for(;0<t&&(o*=256);)n+=this[e+--t]*o;return n},R.prototype.readUint8=R.prototype.readUInt8=function(e,t){return e>>>=0,t||jT(e,1,this.length),this[e]},R.prototype.readUint16LE=R.prototype.readUInt16LE=function(e,t){return e>>>=0,t||jT(e,2,this.length),this[e]|this[e+1]<<8},R.prototype.readUint16BE=R.prototype.readUInt16BE=function(e,t){return e>>>=0,t||jT(e,2,this.length),this[e]<<8|this[e+1]},R.prototype.readUint32LE=R.prototype.readUInt32LE=function(e,t){return e>>>=0,t||jT(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},R.prototype.readUint32BE=R.prototype.readUInt32BE=function(e,t){return e>>>=0,t||jT(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},R.prototype.readBigUInt64LE=VT(function(e){UT(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||LT(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))}),R.prototype.readBigUInt64BE=VT(function(e){UT(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||LT(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)}),R.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||jT(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},R.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||jT(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},R.prototype.readInt8=function(e,t){return e>>>=0,t||jT(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},R.prototype.readInt16LE=function(e,t){e>>>=0,t||jT(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},R.prototype.readInt16BE=function(e,t){e>>>=0,t||jT(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},R.prototype.readInt32LE=function(e,t){return e>>>=0,t||jT(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},R.prototype.readInt32BE=function(e,t){return e>>>=0,t||jT(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},R.prototype.readBigInt64LE=VT(function(e){UT(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||LT(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)}),R.prototype.readBigInt64BE=VT(function(e){UT(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||LT(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)}),R.prototype.readFloatLE=function(e,t){return e>>>=0,t||jT(e,4,this.length),mx.read(this,e,!0,23,4)},R.prototype.readFloatBE=function(e,t){return e>>>=0,t||jT(e,4,this.length),mx.read(this,e,!1,23,4)},R.prototype.readDoubleLE=function(e,t){return e>>>=0,t||jT(e,8,this.length),mx.read(this,e,!0,52,8)},R.prototype.readDoubleBE=function(e,t){return e>>>=0,t||jT(e,8,this.length),mx.read(this,e,!1,52,8)},R.prototype.writeUintLE=R.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||CT(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},R.prototype.writeUintBE=R.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||CT(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},R.prototype.writeUint8=R.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||CT(this,e,t,1,255,0),this[t]=255&e,t+1},R.prototype.writeUint16LE=R.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||CT(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},R.prototype.writeUint16BE=R.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||CT(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},R.prototype.writeUint32LE=R.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||CT(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},R.prototype.writeUint32BE=R.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||CT(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},R.prototype.writeBigUInt64LE=VT(function(e,t=0){return IT(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),R.prototype.writeBigUInt64BE=VT(function(e,t=0){return RT(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),R.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||CT(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},R.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||CT(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},R.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||CT(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},R.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||CT(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},R.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||CT(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},R.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||CT(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},R.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||CT(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},R.prototype.writeBigInt64LE=VT(function(e,t=0){return IT(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),R.prototype.writeBigInt64BE=VT(function(e,t=0){return RT(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),R.prototype.writeFloatLE=function(e,t,r){return kT(this,e,t,!0,r)},R.prototype.writeFloatBE=function(e,t,r){return kT(this,e,t,!1,r)},R.prototype.writeDoubleLE=function(e,t,r){return MT(this,e,t,!0,r)},R.prototype.writeDoubleBE=function(e,t,r){return MT(this,e,t,!1,r)},R.prototype.copy=function(e,t,r,n){if(!R.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},R.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&&!R.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=R.isBuffer(e)?e:R.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 wx={};function NT(e,t,r){wx[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 xT(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 DT(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 wx.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,UT(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||LT(u,r.length-(n+1))}function UT(e,t){if("number"!=typeof e)throw new wx.ERR_INVALID_ARG_TYPE(t,"number",e)}function LT(e,t,r){if(Math.floor(e)!==e)throw UT(e,r),new wx.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new wx.ERR_BUFFER_OUT_OF_BOUNDS;throw new wx.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}NT("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),NT("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),NT("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=xT(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=xT(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const Ex=/[^+/0-9A-Za-z-_]/g;function FT(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 BT(e){return vx.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Ex,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function WT(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 qT(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function zT(e){return e!=e}const Px=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 VT(e){return"undefined"==typeof BigInt?HT:e}function HT(){throw new Error("BigInt not supported")}}var GT,xp={},Ks={},w=r&&r.__extends||(GT=function(e,t){return(GT=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}GT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Xp=(Object.defineProperty(Ks,"__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 KT(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}Ks.default=Xp;w(ZT,YT=Xp),ZT.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},ZT.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},ZT.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},ZT.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},ZT.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},ZT.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var YT,KT=ZT;function ZT(e,t,r){t=YT.call(this,t)||this;return t._start=e,t._inner=r,t}var XT,QT,od=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ud=(Object.defineProperty(xp,"__esModule",{value:!0}),xp.BaseBuffer=void 0,od(Ks)),hd=(xp.BaseBuffer=ud.default,xp.default=ud.default,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)})),gd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},JT=(Object.defineProperty($s,"__esModule",{value:!0}),$s.alloc=void 0,gd(_f)),tc=gd(xp),$T=(QT=tc.default,hd(ej,QT),ej.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},ej.prototype.getInt8=function(e){return this._buffer.readInt8(e)},ej.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},ej.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},ej.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},ej.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},ej.prototype.putBytes=function(e,t){var r;t instanceof ej?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):QT.prototype.putBytes.call(this,e,t)},ej.prototype.getSlice=function(e,t){return new ej(this._buffer.slice(e,e+t))},ej);function ej(e){var t=this,e=(e=e)instanceof JT.default.Buffer?e:"number"==typeof e&&"function"==typeof JT.default.Buffer.alloc?JT.default.Buffer.alloc(e):new JT.default.Buffer(e);return(t=QT.call(this,e.length)||this)._buffer=e,t}$s.default=$T,$s.alloc=function(e){return new $T(e)};var Dp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},tj=(Object.defineProperty(ap,"__esModule",{value:!0}),Dp($s)),rj=e,Ed=rj.internal.util,nj=Ed.ENCRYPTION_OFF,oj=Ed.ENCRYPTION_ON;function ij(e,t,r){void 0===t&&(t=uj),void 0===r&&(r=function(e){return new WebSocket(e)});var n,o=this,t=(this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===oj}(e),n=function(e){return!1===e.encrypted||e.encrypted===nj}(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,rj.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:"'+nj+'"` 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 tj.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function uj(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}ij.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,rj.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,rj.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))},ij.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof tj.default))throw(0,rj.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()}}},ij.prototype.close=function(){var r=this;return null===this._closingPromise&&(this._closingPromise=new Promise(function(e,t){r._clearConnectionTimeout(),r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._ws.onclose=function(){e()},r._ws.close()):e()})),this._closingPromise},ij.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},ij.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},ij.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},ij.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,rj.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))},ij.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},ij.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},ap.default=ij;var aj,jd={},ec=r&&r.__extends||(aj=function(e,t){return(aj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}aj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(jd,"__esModule",{value:!0});var sj,qa=e.internal.resolver.BaseHostNameResolver,Zp=(ec(cj,sj=qa),cj.prototype.resolve=function(e){return this._resolveToItself(e)},cj);function cj(){return null!==sj&&sj.apply(this,arguments)||this}jd.default=Zp;var lj,u={},fj=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())})},pj=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}}}},Dd=(Object.defineProperty(u,"__esModule",{value:!0}),u.default={load:function(t){return fj(this,void 0,void 0,function(){return pj(this,function(e){return[2,t]})})}},r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}}),b=(Object.defineProperty(ep,"__esModule",{value:!0}),ep.ClientCertificatesLoader=ep.HostNameResolver=ep.Channel=void 0,Dd(ap)),C=Dd(jd),ad=Dd(u),Qp=(ep.Channel=b.default,ep.HostNameResolver=C.default,ep.ClientCertificatesLoader=ad.default,{}),Ud={},Wd=r&&r.__extends||(lj=function(e,t){return(lj=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}lj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Ud,"__esModule",{value:!0});var dj,hj=$s,Hd=(dj=xp.BaseBuffer,Wd(bj,dj),bj.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}},bj.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}},bj.prototype.getFloat64=function(e){for(var t=(0,hj.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},bj);function bj(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=dj.call(this,r)||this)._buffers=e,t}Ud.default=Hd;var yj,_j,Xd=r&&r.__extends||(yj=function(e,t){return(yj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),th=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lh=(Object.defineProperty(Qp,"__esModule",{value:!0}),Qp.Dechunker=Qp.Chunker=void 0,th(Ks)),vj=$s,mj=th(Ud),vh=(_j=lh.default,Xd(gj,_j),gj.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},gj.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},gj.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},gj.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},gj.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,vj.alloc)(this._bufferSize),this._chunkOpen=!1),this},gj.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},gj.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)},gj.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},gj);function gj(e,t){var r=_j.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,vj.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function Oj(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}Qp.Chunker=vh,Oj.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},Oj.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},Oj.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)},Oj.prototype.CLOSED=function(e){},Oj.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 mj.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},Oj.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},Qp.Dechunker=Oj;var Eh={},wj=(Object.defineProperty(Eh,"__esModule",{value:!0}),e),jh=wj.internal.util,Ch=jh.ENCRYPTION_OFF,Gh=jh.ENCRYPTION_ON,Ej=wj.error.SERVICE_UNAVAILABLE,Pj=[null,void 0,!0,!1,Gh,Ch],Sj=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];Eh.default=function(e,t,r,n){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==Pj.indexOf(e))return e;throw(0,wj.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(Pj))}(t),this.trust=function(e){e=e.trust;if(-1!==Sj.indexOf(e))return e;throw(0,wj.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(Sj))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||Ej,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=n};var Tj,jj,Hh={},fb={},xf={exports:{}};function Cj(e,t){for(var r in e)t[r]=e[r]}function Ij(e,t,r){return jj(e,t,r)}ab=(Ql=xf).exports,(jj=(Tj=_f).Buffer).from&&jj.alloc&&jj.allocUnsafe&&jj.allocUnsafeSlow?Ql.exports=Tj:(Cj(Tj,ab),ab.Buffer=Ij),Ij.prototype=Object.create(jj.prototype),Cj(jj,Ij),Ij.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return jj(e,t,r)},Ij.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=jj(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},Ij.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return jj(e)},Ij.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return Tj.SlowBuffer(e)};var Rj=xf.exports.Buffer,Aj=Rj.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 kj(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||Rj.isEncoding!==Aj&&Aj(e))return t||e;throw new Error("Unknown encoding: "+e)}function Mj(e){var t;switch(this.encoding=kj(e),this.encoding){case"utf16le":this.text=Dj,this.end=Uj,t=4;break;case"utf8":this.fillLast=xj,t=4;break;case"base64":this.text=Lj,this.end=Fj,t=3;break;default:return this.write=Bj,void(this.end=Wj)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Rj.allocUnsafe(t)}function Nj(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function xj(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 Dj(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 Uj(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 Lj(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 Fj(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Bj(e){return e.toString(this.encoding)}function Wj(e){return e&&e.length?this.write(e):""}(fb.StringDecoder=Mj).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||""},Mj.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},Mj.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=Nj(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=Nj(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=Nj(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)},Mj.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 qj,zj,Vj,Hj,Gj,lb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yj=(Object.defineProperty(Hh,"__esModule",{value:!0}),lb($s)),Kj=e,Zj=lb(_f),Xj=new fb.StringDecoder("utf8");Hh.default={encode:function(e){return new Yj.default((e=e,"function"==typeof Zj.default.Buffer.from?Zj.default.Buffer.from(e,"utf8"):new Zj.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 Xj.write(e._buffer)},r=function(){return Xj.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,Kj.newError)("Don't know how to decode strings from '".concat(e,"'"))}},Ob=$f,qj=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]}),wb=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||qj(t,e,r)},zj=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Ob,"__esModule",{value:!0}),Ob.utf8=Ob.alloc=Ob.ChannelConfig=void 0,wb(ep,Ob),wb(Qp,Ob),Vj=Eh,Object.defineProperty(Ob,"ChannelConfig",{enumerable:!0,get:function(){return zj(Vj).default}}),Hj=$s,Object.defineProperty(Ob,"alloc",{enumerable:!0,get:function(){return Hj.alloc}}),Gj=Hh,Object.defineProperty(Ob,"utf8",{enumerable:!0,get:function(){return zj(Gj).default}}),Object.defineProperty(Nf,"__esModule",{value:!0});var Qj=$f,Jj=e,$j=1616949271;function eC(e,t){return{major:e,minor:t}}function tC(){var e=[[eC(5,5),eC(5,0)],[eC(4,4),eC(4,2)],eC(4,1),eC(3,0)];if(4<e.length)throw(0,Jj.newError)("It should not have more than 4 versions of the protocol");var o=(0,Qj.alloc)(20);return o.writeInt32($j),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}Nf.default=function(t,o){var i=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(i),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e,t){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw t.error("Handshake failed since server responded with HTTP."),(0,Jj.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)");return Number(e[3]+"."+e[2])}(t,o);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(tC())})};var rC,Rb={},xb={},Fb={},I={},qb={},sy=r&&r.__extends||(rC=function(e,t){return(rC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}rC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),py=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_y=(Object.defineProperty(qb,"__esModule",{value:!0}),py(e),nC.ofRecord=function(e){return null===e?nC.ofNull():new fC(e)},nC.ofMessageResponse=function(e){return null===e?nC.ofNull():new iC(e)},nC.ofNull=function(){return new sC},Object.defineProperty(nC.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(nC.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(nC.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(nC.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),nC);function nC(){}qb.default=_y;sy(uC,oC=_y),Object.defineProperty(uC.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(uC.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(uC.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(uC.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var oC,iC=uC;function uC(e){var t=oC.call(this)||this;return t._response=e,t}sy(cC,aC=_y),Object.defineProperty(cC.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var aC,sC=cC;function cC(){return null!==aC&&aC.apply(this,arguments)||this}sy(pC,lC=_y),Object.defineProperty(pC.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(pC.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(pC.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(pC.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var lC,fC=pC;function pC(e){var t=lC.call(this)||this;return t._record=e,t}var wy={},Py={},dC=(Object.defineProperty(Py,"__esModule",{value:!0}),Py.reuseOngoingRequest=Py.identity=void 0,e);Py.identity=function(e){return e},Py.reuseOngoingRequest=function(o,i){void 0===i&&(i=null);var u=new Map;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=dC.json.stringify(e);if(u.has(r))return u.get(r);var n=o.apply(i,e);return u.set(r,n),n.finally(function(){u.delete(r)})}};var xy={},hC=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(xy,"__esModule",{value:!0}),xy.equals=void 0,xy.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=hC(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 bC,yC=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]}),_C=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),By=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)&&yC(t,e,r);return _C(t,e),t},zy=(Object.defineProperty(wy,"__esModule",{value:!0}),wy.object=wy.functional=void 0,wy.functional=By(Py),wy.object=By(xy),r&&r.__extends||(bC=function(e,t){return(bC=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}bC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Vy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vC=(Object.defineProperty(I,"__esModule",{value:!0}),I.TelemetryObserver=I.ProcedureRouteObserver=I.RouteObserver=I.CompletedObserver=I.FailedObserver=I.ResetObserver=I.LogoffObserver=I.LoginObserver=I.ResultStreamObserver=I.StreamObserver=void 0,e),mC=Vy(qb),gC=wy,OC=vC.internal.constants.FETCH_ALL,wC=vC.error.PROTOCOL_ERROR,Hy=(EC.prototype.onNext=function(e){},EC.prototype.onError=function(e){},EC.prototype.onCompleted=function(e){},EC);function EC(){}I.StreamObserver=Hy;zy(SC,PC=Hy),SC.prototype.pause=function(){this._paused=!0},SC.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},SC.prototype.onNext=function(e){this._haveRecordStreamed=!0;var t=new vC.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))},SC.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},SC.prototype.onError=function(e){this._state.onError(this,e)},SC.prototype.cancel=function(){this._discard=!0},SC.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(qC.STREAMING)},SC.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(qC.SUCCEEDED)},SC.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===qC.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===qC.READY&&this._handleStreaming()},SC.prototype._handleHasMore=function(e){this._setState(qC.READY),this._handleStreaming(),delete e.has_more},SC.prototype._handlePullSuccess=function(e){var t,r=this,n=this._enrichMetadata(Object.assign(this._server?{server:this._server}:{},this._meta,{stream_summary:{have_records_streamed:this._haveRecordStreamed,pulled:this._pulled,has_keys:0<this._fieldKeys.length}},e));[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(qC.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,vC.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),wC))},SC.prototype._handleRunSuccess=function(e,t){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&0<e.fields.length){this._fieldKeys=e.fields;for(var n=0;n<e.fields.length;n++)this._fieldLookup[e.fields[n]]=n}null!=e.fields&&delete e.fields,null!==e.qid&&void 0!==e.qid&&(this._queryId=e.qid,delete e.qid),this._storeMetadataForCompletion(e);var o=null,i=(this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys)),function(){r._head=r._fieldKeys,r._observers.some(function(e){return e.onKeys})&&r._observers.forEach(function(e){e.onKeys&&e.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),t()});o?Promise.resolve(o).then(i):i()}},SC.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(qC.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},SC.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},SC.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(qC.STREAMING)},SC.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},SC.prototype._setState=function(e){this._state=e},SC.prototype._setupAutoPull=function(){this._autoPull=!0};var PC,Jy=SC;function SC(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?OC:o,i=e.beforeError,u=e.afterError,a=e.beforeKeys,s=e.afterKeys,c=e.beforeComplete,l=e.afterComplete,f=e.server,p=e.highRecordWatermark,p=void 0===p?Number.MAX_VALUE:p,d=e.lowRecordWatermark,d=void 0===d?Number.MAX_VALUE:d,e=e.enrichMetadata,h=PC.call(this)||this;return h._fieldKeys=null,h._fieldLookup=null,h._head=null,h._queuedRecords=[],h._tail=null,h._error=null,h._observers=[],h._meta={},h._server=f,h._beforeError=i,h._afterError=u,h._beforeKeys=a,h._afterKeys=s,h._beforeComplete=c,h._afterComplete=l,h._enrichMetadata=e||gC.functional.identity,h._queryId=null,h._moreFunction=r,h._discardFunction=n,h._discard=!1,h._fetchSize=o,h._lowRecordWatermark=d,h._highRecordWatermark=p,h._setState(t?qC.READY:qC.READY_STREAMING),h._setupAutoPull(),h._paused=!1,h._pulled=!t,h._haveRecordStreamed=!1,h}I.ResultStreamObserver=Jy;zy(jC,TC=Hy),jC.prototype.onNext=function(e){this.onError((0,vC.newError)("Received RECORD when initializing "+vC.json.stringify(e)))},jC.prototype.onError=function(e){this._onError&&this._onError(e)},jC.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var TC,sd=jC;function jC(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=TC.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.LoginObserver=sd;zy(IC,CC=Hy),IC.prototype.onNext=function(e){this.onError((0,vC.newError)("Received RECORD when logging off "+vC.json.stringify(e)))},IC.prototype.onError=function(e){this._onError&&this._onError(e)},IC.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var CC,t_=IC;function IC(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=CC.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.LogoffObserver=t_;zy(AC,RC=Hy),AC.prototype.onNext=function(e){this.onError((0,vC.newError)("Received RECORD when resetting: received record is: "+vC.json.stringify(e),wC))},AC.prototype.onError=function(e){e.code===wC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},AC.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var RC,n_=AC;function AC(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=RC.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}I.ResetObserver=n_;zy(MC,kC=Jy),MC.prototype.onNext=function(e){this.onError((0,vC.newError)("Received RECORD when sending telemetry "+vC.json.stringify(e),wC))},MC.prototype.onError=function(e){this._onError&&this._onError(e)},MC.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var kC,a_=MC;function MC(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=kC.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.TelemetryObserver=a_;zy(xC,NC=Jy);var NC,l_=xC;function xC(e){var t=e.error,e=e.onError,e=NC.call(this,{beforeError:e})||this;return e.onError(t),e}I.FailedObserver=l_;zy(UC,DC=Jy);var DC,__=UC;function UC(){var e=DC.call(this)||this;return DC.prototype.markCompleted.call(e),e}I.CompletedObserver=__;zy(FC,LC=Hy),FC.prototype.onNext=function(e){this._records.push(e)},FC.prototype.onError=function(e){e.code===wC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},FC.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,vC.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+vC.json.stringify(this._records),wC)):this._onCompleted&&this._onCompleted(mC.default.ofRecord(this._records[0]))};var LC,Yb=FC;function FC(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=LC.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}I.ProcedureRouteObserver=Yb;zy(WC,BC=Hy),WC.prototype.onNext=function(e){this.onError((0,vC.newError)("Received RECORD when resetting: received record is: "+vC.json.stringify(e),wC))},WC.prototype.onError=function(e){e.code===wC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},WC.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(mC.default.ofMessageResponse(e))};var BC,E_=WC;function WC(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=BC.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}I.RouteObserver=E_;var qC={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(qC.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(){}}},zC=(Object.defineProperty(Fb,"__esModule",{value:!0}),Fb.assertNotificationFilterIsEmpty=Fb.assertImpersonatedUserIsEmpty=Fb.assertTxConfigIsEmpty=Fb.assertDatabaseIsEmpty=void 0,e);Fb.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,zC.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},Fb.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,zC.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},Fb.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,zC.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},Fb.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,zC.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(zC.json.stringify(e),"."))).message),r.onError(t),t};var T_={},Jl={},Qb={},VC=(Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.verifyStructSize=Qb.Structure=void 0,e),HC=VC.error.PROTOCOL_ERROR,L_=(Object.defineProperty(GC.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),GC.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+"])"},GC);function GC(e,t){this.signature=e,this.fields=t}Qb.Structure=L_,Qb.verifyStructSize=function(e,t,r){if(t!==r)throw(0,VC.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),HC)},Qb.default=L_,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.Unpacker=Jl.Packer=void 0;var YC=$f,KC=wy,ZC=Qb,XC=e,QC=XC.error.PROTOCOL_ERROR;function JC(e){this._ch=e,this._byteArraysSupported=!0}function $C(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}JC.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=KC.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,XC.int)(o))};if((0,XC.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 ZC.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))},JC.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,XC.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},JC.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},JC.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))},JC.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},JC.prototype.packString=function(e){var e=YC.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,XC.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)}},JC.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,XC.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)}},JC.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,XC.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])},JC.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,XC.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)}},JC.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,XC.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)}},JC.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,XC.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},JC.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},JC.prototype._nonPackableValue=function(e){return function(){throw(0,XC.newError)(e,QC)}},Jl.Packer=JC,$C.prototype.unpack=function(e,t){void 0===t&&(t=KC.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,XC.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,XC.newError)("Unknown packed value with marker "+r.toString(16))},$C.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,XC.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},$C.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},$C.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},$C.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,XC.int)(e):240<=e&&e<256?(0,XC.int)(e-256):200===e?(0,XC.int)(t.readInt8()):201===e?(0,XC.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,XC.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new XC.Integer(e,r)):null},$C.prototype._unpackString=function(e,t,r,n){return 128===t?YC.utf8.decode(n,r):208===e?YC.utf8.decode(n,n.readUInt8()):209===e?YC.utf8.decode(n,n.readUInt16()):210===e?YC.utf8.decode(n,n.readUInt32()):null},$C.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},$C.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},$C.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},$C.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},$C.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},$C.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},$C.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},$C.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new ZC.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},Jl.Unpacker=$C;var eI,tI,q_={},J_=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)}),rI=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),nI=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Df=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&rI(t,e,r);return nI(t,e),t},H_=(Object.defineProperty(q_,"__esModule",{value:!0}),q_.Unpacker=q_.Packer=void 0,Df(Jl)),Uf=(tI=H_.Packer,J_(oI,tI),oI.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},oI);function oI(){return null!==tI&&tI.apply(this,arguments)||this}q_.Packer=Uf;iI=H_.Unpacker,J_(uI,iI);var iI,G_=uI;function uI(e,t){return iI.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}q_.Unpacker=G_;var aI=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]}),sI=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Z_=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)&&aI(t,e,r);return sI(t,e),t},Lf=(Object.defineProperty(T_,"__esModule",{value:!0}),T_.structure=T_.v2=T_.v1=void 0,Z_(Jl)),cv=(T_.v1=Lf,Z_(q_)),pv=(T_.v2=cv,Z_(Qb)),T=(T_.structure=pv,T_.default=cv,{}),cI=(Object.defineProperty(T,"__esModule",{value:!0}),T.SIGNATURES=void 0,e),yv=cI.internal.constants,lI=yv.ACCESS_MODE_READ,fI=yv.FETCH_ALL,pI=cI.internal.util.assertString,wv=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),P=(T.SIGNATURES=wv,k.init=function(e,t){return new k(1,[e,t],function(){return"INIT ".concat(e," {...}")})},k.run=function(e,t){return new k(16,[e,t],function(){return"RUN ".concat(e," ").concat(cI.json.stringify(t))})},k.pullAll=function(){return _I},k.reset=function(){return vI},k.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 k(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},k.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new k(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},k.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return bI(n,t=void 0===t?null:t),r&&(n.routing=r),new k(1,[n],function(){return"HELLO ".concat(cI.json.stringify(n))})},k.hello5x3=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),bI(o,r),n&&(o.routing=n),new k(1,[o],function(){return"HELLO ".concat(cI.json.stringify(o))})},k.hello5x5=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),yI(o,r),n&&(o.routing=n),new k(1,[o],function(){return"HELLO ".concat(cI.json.stringify(o))})},k.logon=function(e){return new k(106,[e],function(){return"LOGON { ... }"})},k.logoff=function(){return new k(107,[],function(){return"LOGOFF"})},k.begin=function(e){var e=void 0===e?{}:e,t=dI(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new k(17,[t],function(){return"BEGIN ".concat(cI.json.stringify(t))})},k.begin5x5=function(e){var e=void 0===e?{}:e,t=dI(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter,{appendNotificationFilter:yI});return new k(17,[t],function(){return"BEGIN ".concat(cI.json.stringify(t))})},k.commit=function(){return mI},k.rollback=function(){return gI},k.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=dI(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new k(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(cI.json.stringify(t)," ").concat(cI.json.stringify(n))})},k.runWithMetadata5x5=function(e,t,r){var r=void 0===r?{}:r,n=dI(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter,{appendNotificationFilter:yI});return new k(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(cI.json.stringify(t)," ").concat(cI.json.stringify(n))})},k.goodbye=function(){return OI},k.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=hI(null==t?-1:t,(void 0===e?fI:e)||fI);return new k(63,[r],function(){return"PULL ".concat(cI.json.stringify(r))})},k.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=hI(null==t?-1:t,(void 0===e?fI:e)||fI);return new k(47,[r],function(){return"DISCARD ".concat(cI.json.stringify(r))})},k.telemetry=function(e){var e=e.api,t=(0,cI.int)(e);return new k(84,[t],function(){return"TELEMETRY ".concat(t.toString())})},k.route=function(e,t,r){return new k(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(cI.json.stringify(e)," ").concat(cI.json.stringify(t)," ").concat(r)})},k.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 k(102,[e,t,n],function(){return"ROUTE ".concat(cI.json.stringify(e)," ").concat(cI.json.stringify(t)," ").concat(cI.json.stringify(n))})},k);function k(e,t,r){this.signature=e,this.fields=t,this.toString=r}function dI(e,t,r,n,o,i,u){void 0===u&&(u={});var a={};return e.isEmpty()||(a.bookmarks=e.values()),null!==t.timeout&&(a.tx_timeout=t.timeout),t.metadata&&(a.tx_metadata=t.metadata),r&&(a.db=pI(r,"database")),o&&(a.imp_user=pI(o,"impersonatedUser")),n===lI&&(a.mode="r"),(null!=(e=u.appendNotificationFilter)?e:bI)(a,i),a}function hI(e,t){t={n:(0,cI.int)(t)};return-1!==e&&(t.qid=(0,cI.int)(e)),t}function bI(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_categories=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_categories=t.disabledClassifications))}function yI(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_classifications=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_classifications=t.disabledClassifications))}var _I=new(T.default=P)(63,[],function(){return"PULL_ALL"}),vI=new P(15,[],function(){return"RESET"}),mI=new P(18,[],function(){return"COMMIT"}),gI=new P(19,[],function(){return"ROLLBACK"}),OI=new P(2,[],function(){return"GOODBYE"}),Sv={},jv={},wI=(Object.defineProperty(jv,"__esModule",{value:!0}),jv.TypeTransformer=void 0,T_),EI=e.internal.objectUtil;function PI(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 SI(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)}PI.prototype.fromStructure=function(e){try{return e instanceof wI.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return EI.createBrokenObject(e)}},PI.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},jv.default=PI,SI.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new SI({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},jv.TypeTransformer=SI;var TI=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},jI=(Object.defineProperty(Sv,"__esModule",{value:!0}),e),CI=T_,II=jv,RI=jI.error.PROTOCOL_ERROR;Sv.default={createNodeTransformer:function(){return new II.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof jI.Node},toStructure:function(e){throw(0,jI.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),RI)},fromStructure:function(e){CI.structure.verifyStructSize("Node",3,e.size);var e=TI(e.fields,3),t=e[0],r=e[1],e=e[2];return new jI.Node(t,r,e)}})},createRelationshipTransformer:function(){return new II.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof jI.Relationship},toStructure:function(e){throw(0,jI.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),RI)},fromStructure:function(e){CI.structure.verifyStructSize("Relationship",5,e.size);var e=TI(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new jI.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new II.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof jI.UnboundRelationship},toStructure:function(e){throw(0,jI.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),RI)},fromStructure:function(e){CI.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=TI(e.fields,3),t=e[0],r=e[1],e=e[2];return new jI.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new II.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof jI.Path},toStructure:function(e){throw(0,jI.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),RI)},fromStructure:function(e){CI.structure.verifyStructSize("Path",3,e.size);for(var e=TI(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,jI.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof jI.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof jI.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new jI.PathSegment(i,c,a)),i=a}return new jI.Path(t[0],t[t.length-1],o)}})}};var AI=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]}),kI=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)&&AI(t,e,r);return kI(t,e),t},Nv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},MI=(Object.defineProperty(xb,"__esModule",{value:!0}),Fb),NI=T_,xI=Av(T),DI=I,UI=e,LI=Nv(Sv),FI=Nv(jv),BI=UI.internal.bookmarks.Bookmarks,Uv=UI.internal.constants,WI=Uv.ACCESS_MODE_WRITE,qI=Uv.BOLT_PROTOCOL_V1,zI=(UI.internal.logger.Logger,UI.internal.txConfig.TxConfig),s=(Object.defineProperty(M.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new FI.default(Object.values(LI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"version",{get:function(){return qI},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.boltAgent,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,u)}});return(0,MI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(xI.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 DI.LogoffObserver({onCompleted:t,onError:r})),t=(0,UI.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 DI.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,UI.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:BI.empty(),txConfig:zI.empty(),mode:WI,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:BI.empty(),txConfig:zI.empty(),mode:WI,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 DI.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,MI.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,MI.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,MI.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,MI.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(xI.default.run(e,t),a,!1),this.write(xI.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 DI.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(xI.default.reset(),t,!0),t},M.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new DI.CompletedObserver;return t&&t(),e},M.prototype._createPacker=function(e){return new NI.v1.Packer(e)},M.prototype._createUnpacker=function(e,t){return new NI.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 NI.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},M.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===xI.SIGNATURES.HELLO||this._lastMessageSignature===xI.SIGNATURES.LOGON},M.prototype.isLastMessageReset=function(){return this._lastMessageSignature===xI.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}}xb.default=s;var Wv={},Rh={},Yv={},VI=(Object.defineProperty(Yv,"__esModule",{value:!0}),Yv.epochSecondAndNanoToLocalDateTime=Yv.nanoOfDayToLocalTime=Yv.epochDayToDate=void 0,e),$v=VI.internal.temporalUtil,HI=$v.DAYS_0000_TO_1970,GI=$v.DAYS_PER_400_YEAR_CYCLE,YI=$v.NANOS_PER_HOUR,KI=$v.NANOS_PER_MINUTE,ZI=$v.NANOS_PER_SECOND,XI=$v.SECONDS_PER_DAY,QI=$v.floorDiv,JI=$v.floorMod;function $I(e){var e=(e=(0,VI.int)(e)).add(HI).subtract(60),t=(0,VI.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(GI).subtract(1)).multiply(400),e=e.add(r.multiply(-GI))),e.multiply(400).add(591).div(GI)),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 VI.Date(r,n,e)}function eR(e){var t=(e=(0,VI.int)(e)).div(YI),r=(e=e.subtract(t.multiply(YI))).div(KI),n=(e=e.subtract(r.multiply(KI))).div(ZI),e=e.subtract(n.multiply(ZI));return new VI.LocalTime(t,r,n,e)}Yv.epochDayToDate=$I,Yv.nanoOfDayToLocalTime=eR,Yv.epochSecondAndNanoToLocalDateTime=function(e,t){var r=QI(e,XI),e=JI(e,XI).multiply(ZI).add(t),t=$I(r),r=eR(e);return new VI.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var tR=r&&r.__assign||function(){return(tR=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)},rR=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},om=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nR=(Object.defineProperty(Rh,"__esModule",{value:!0}),e),oR=T_,iR=jv,uR=Yv,lm=om(Sv),Tr=nR.internal.temporalUtil,aR=Tr.dateToEpochDay,sR=Tr.localDateTimeToEpochSecond,cR=Tr.localTimeToNanoOfDay;function lR(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,nR.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}Rh.default=tR(tR({},lm.default),{createPoint2DTransformer:function(){return new iR.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,nR.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new oR.structure.Structure(88,[(0,nR.int)(e.srid),e.x,e.y])},fromStructure:function(e){oR.structure.verifyStructSize("Point2D",3,e.size);var e=rR(e.fields,3),t=e[0],r=e[1],e=e[2];return new nR.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new iR.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,nR.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new oR.structure.Structure(89,[(0,nR.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){oR.structure.verifyStructSize("Point3D",4,e.size);var e=rR(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new nR.Point(t,r,n,e)}})},createDurationTransformer:function(){return new iR.TypeTransformer({signature:69,isTypeInstance:nR.isDuration,toStructure:function(e){var t=(0,nR.int)(e.months),r=(0,nR.int)(e.days),n=(0,nR.int)(e.seconds),e=(0,nR.int)(e.nanoseconds);return new oR.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){oR.structure.verifyStructSize("Duration",4,e.size);var e=rR(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new nR.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new iR.TypeTransformer({signature:116,isTypeInstance:nR.isLocalTime,toStructure:function(e){e=cR(e.hour,e.minute,e.second,e.nanosecond);return new oR.structure.Structure(116,[e])},fromStructure:function(e){oR.structure.verifyStructSize("LocalTime",1,e.size);e=rR(e.fields,1)[0];return lR((0,uR.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new iR.TypeTransformer({signature:84,isTypeInstance:nR.isTime,toStructure:function(e){var t=cR(e.hour,e.minute,e.second,e.nanosecond),e=(0,nR.int)(e.timeZoneOffsetSeconds);return new oR.structure.Structure(84,[t,e])},fromStructure:function(e){oR.structure.verifyStructSize("Time",2,e.size);var e=rR(e.fields,2),t=e[0],e=e[1],t=(0,uR.nanoOfDayToLocalTime)(t);return lR(new nR.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new iR.TypeTransformer({signature:68,isTypeInstance:nR.isDate,toStructure:function(e){e=aR(e.year,e.month,e.day);return new oR.structure.Structure(68,[e])},fromStructure:function(e){oR.structure.verifyStructSize("Date",1,e.size);e=rR(e.fields,1)[0];return lR((0,uR.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new iR.TypeTransformer({signature:100,isTypeInstance:nR.isLocalDateTime,toStructure:function(e){var t=sR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,nR.int)(e.nanosecond);return new oR.structure.Structure(100,[t,e])},fromStructure:function(e){oR.structure.verifyStructSize("LocalDateTime",2,e.size);var e=rR(e.fields,2),t=e[0],e=e[1];return lR((0,uR.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new iR.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,nR.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=sR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,nR.int)(e.nanosecond),e=e.timeZoneId;return new oR.structure.Structure(102,[t,r,e])},fromStructure:function(e){oR.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=rR(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,uR.epochSecondAndNanoToLocalDateTime)(t,r);return lR(new nR.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 iR.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,nR.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=sR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,nR.int)(e.nanosecond),e=(0,nR.int)(e.timeZoneOffsetSeconds);return new oR.structure.Structure(70,[t,r,e])},fromStructure:function(e){oR.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=rR(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,uR.epochSecondAndNanoToLocalDateTime)(t,r);return lR(new nR.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var fR,pR,bm=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)}),gm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Pm=(Object.defineProperty(Wv,"__esModule",{value:!0}),gm(xb)),dR=gm(T_),Ah=e,hR=gm(Rh),bR=gm(jv),yR=Ah.internal.constants.BOLT_PROTOCOL_V2,Am=(pR=Pm.default,bm(_R,pR),_R.prototype._createPacker=function(e){return new dR.default.Packer(e)},_R.prototype._createUnpacker=function(e,t){return new dR.default.Unpacker(e,t)},Object.defineProperty(_R.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new bR.default(Object.values(hR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(_R.prototype,"version",{get:function(){return yR},enumerable:!1,configurable:!0}),_R);function _R(){return null!==pR&&pR.apply(this,arguments)||this}Wv.default=Am;var vR,mR,Fm={},qm={},gR=r&&r.__assign||function(){return(gR=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}},Xm=(Object.defineProperty(qm,"__esModule",{value:!0}),Km(Rh)),e0=(qm.default=gR({},Xm.default),r&&r.__extends||(vR=function(e,t){return(vR=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}vR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),OR=r&&r.__assign||function(){return(OR=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)},i0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s0=(Object.defineProperty(Fm,"__esModule",{value:!0}),i0(Wv)),wR=i0(T),ER=Fb,PR=I,SR=i0(qm),TR=i0(jv),jR=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),CR=e.internal.txConfig.TxConfig,IR="context",RR="CALL dbms.cluster.routing.getRoutingTable($".concat(IR,")"),AR=new PR.StreamObserver,Gc=(mR=s0.default,e0(kR,mR),Object.defineProperty(kR.prototype,"version",{get:function(){return jR},enumerable:!1,configurable:!0}),Object.defineProperty(kR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new TR.default(Object.values(SR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),kR.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},kR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new PR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,ER.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(wR.default.hello(r,n),e,!0),e},kR.prototype.prepareToClose=function(){this.write(wR.default.goodbye(),AR,!0)},kR.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 PR.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,ER.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,ER.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,ER.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(wR.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},kR.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new PR.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(wR.default.commit(),t,!0),t},kR.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new PR.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(wR.default.rollback(),t,!0),t},kR.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 PR.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,ER.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,ER.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,ER.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(wR.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(wR.default.pullAll(),c,b),c},kR.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(RR,((t={})[IR]=void 0===r?{}:r,t),OR(OR({},n),{txConfig:CR.empty()}));return new PR.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},kR);function kR(){return null!==mR&&mR.apply(this,arguments)||this}Fm.default=Gc;var MR,NR,p0={},d0={},xR=r&&r.__assign||function(){return(xR=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)},m0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w0=(Object.defineProperty(d0,"__esModule",{value:!0}),m0(qm)),zb=(d0.default=xR({},w0.default),r&&r.__extends||(MR=function(e,t){return(MR=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}MR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),DR=r&&r.__assign||function(){return(DR=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}},S0=(Object.defineProperty(p0,"__esModule",{value:!0}),j_(Fm)),UR=j_(T),LR=Fb,FR=I,BR=j_(d0),WR=j_(jv),R0=(e.internal.bookmarks.Bookmarks,e.internal.constants),qR=R0.BOLT_PROTOCOL_V4_0,zR=R0.FETCH_ALL,VR=e.internal.txConfig.TxConfig,HR="context",GR="database",YR="CALL dbms.routing.getRoutingTable($".concat(HR,", $").concat(GR,")"),M0=(NR=S0.default,zb(KR,NR),Object.defineProperty(KR.prototype,"version",{get:function(){return qR},enumerable:!1,configurable:!0}),Object.defineProperty(KR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new WR.default(Object.values(BR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),KR.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 FR.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,LR.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,LR.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(UR.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},KR.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===_?zR:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new FR.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,LR.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,LR.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(UR.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(UR.default.pull({n:_}),c,b),c},KR.prototype._requestMore=function(e,t,r){this.write(UR.default.pull({stmtId:e,n:t}),r,!0)},KR.prototype._requestDiscard=function(e,t){this.write(UR.default.discard({stmtId:e}),t,!0)},KR.prototype._noOp=function(){},KR.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(YR,((t={})[HR]=void 0===r?{}:r,t[GR]=n,t),DR(DR({},o),{txConfig:VR.empty()}));return new FR.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},KR);function KR(){return null!==NR&&NR.apply(this,arguments)||this}p0.default=M0;var ZR,XR,m={},W0={},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)},Sy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},H0=(Object.defineProperty(W0,"__esModule",{value:!0}),Sy(d0)),yc=(W0.default=QR({},H0.default),r&&r.__extends||(ZR=function(e,t){return(ZR=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}ZR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),X0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},tl=(Object.defineProperty(m,"__esModule",{value:!0}),X0(p0)),JR=X0(T),$R=I,Ih=e,eA=Fb,tA=X0(W0),rA=X0(jv),nA=Ih.internal.constants.BOLT_PROTOCOL_V4_1,a=(XR=tl.default,yc(oA,XR),Object.defineProperty(oA.prototype,"version",{get:function(){return nA},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new rA.default(Object.values(tA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),oA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new $R.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,eA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(JR.default.hello(r,n,this._serversideRouting),e,!0),e},oA);function oA(e,t,r,n,o,i,u){e=XR.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}m.default=a;var iA,uA,ag={},pg={},aA=r&&r.__assign||function(){return(aA=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)},qc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Pt=(Object.defineProperty(pg,"__esModule",{value:!0}),qc(W0)),Mg=(pg.default=aA({},Pt.default),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)})),l=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_=(Object.defineProperty(ag,"__esModule",{value:!0}),l(m)),j=e,sA=l(pg),cA=l(jv),lA=j.internal.constants.BOLT_PROTOCOL_V4_2,t=(uA=_.default,Mg(fA,uA),Object.defineProperty(fA.prototype,"version",{get:function(){return lA},enumerable:!1,configurable:!0}),Object.defineProperty(fA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new cA.default(Object.values(sA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),fA);function fA(){return null!==uA&&uA.apply(this,arguments)||this}ag.default=t;var Ze={},g={},pA=r&&r.__assign||function(){return(pA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Fr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},S=(Object.defineProperty(g,"__esModule",{value:!0}),Fr(pg)),bs=(g.default=pA({},S.default),{}),za={},dA=r&&r.__assign||function(){return(dA=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)},Is=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ss=(Object.defineProperty(za,"__esModule",{value:!0}),Is(g)),hA=(za.default=dA({},Ss.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}),v=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bA=(Object.defineProperty(bs,"__esModule",{value:!0}),T_),yA=e,_A=v(za),vA=Yv,mA=Py,gA=yA.internal.temporalUtil.localDateTimeToEpochSecond;var OA=new Map;function wA(e,t,r){e=e,OA.has(e)||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),OA.set(e,n));var n=OA.get(e),e=(0,yA.int)(t).multiply(1e3).add((0,yA.int)(r).div(1e6)).toNumber(),r=n.formatToParts(e).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:mA.identity:"hour"===t.type?e.hour=(0,yA.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,yA.int)(t.value)),e},{}),e=(r.year=r.adjustEra(r.year),gA(r.year,r.month,r.day,r.hour,r.minute,r.second,r.nanosecond));return r.timeZoneOffsetSeconds=e.subtract(t),r.hour=r.hour.modulo(24),r}function EA(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,yA.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}bs.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return _A.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){bA.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=hA(e.fields,3),t=e[0],r=e[1],e=e[2],t=wA(e,t,r);return EA(new yA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,yA.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=gA(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=wA(r,i,o),n=gA(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=wA(r,i,o),gA(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,yA.int)(e.nanosecond),i=e.timeZoneId;return new bA.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return _A.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=gA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,yA.int)(e.nanosecond),e=(0,yA.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new bA.structure.Structure(73,[t,r,e])},fromStructure:function(e){bA.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=hA(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,yA.int)(t).add(e),t=(0,vA.epochSecondAndNanoToLocalDateTime)(t,r);return EA(new yA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var PA,SA,Va=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)}),TA=r&&r.__assign||function(){return(TA=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)},Qa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ar=(Object.defineProperty(Ze,"__esModule",{value:!0}),Qa(ag)),jA=Qa(T),CA=I,IA=Fb,RA=Qa(g),AA=Qa(bs),kA=Qa(jv),MA=e.internal.bookmarks.Bookmarks,NA=e.internal.constants.BOLT_PROTOCOL_V4_3,p=(SA=Ar.default,Va(xA,SA),Object.defineProperty(xA.prototype,"version",{get:function(){return NA},enumerable:!1,configurable:!0}),Object.defineProperty(xA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new kA.default(Object.values(RA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),xA.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 CA.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||MA.empty();return this.write(jA.default.route(t,e.values(),r),o,!0),o},xA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new CA.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,IA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(jA.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},xA.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},xA.prototype._applyUtcPatch=function(){var t=this;this._transformer=new kA.default(Object.values(TA(TA({},RA.default),AA.default)).map(function(e){return e(t._config,t._log)}))},xA);function xA(){return null!==SA&&SA.apply(this,arguments)||this}Ze.default=p;var DA,UA,lc={},ll=r&&r.__extends||(DA=function(e,t){return(DA=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}DA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),LA=r&&r.__assign||function(){return(LA=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)},o=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nc=(Object.defineProperty(lc,"__esModule",{value:!0}),o(Ze)),Qc=e,FA=o(T),BA=I,WA=Fb,qA=o(za),zA=o(bs),VA=o(jv),ic=Qc.internal.constants,HA=ic.BOLT_PROTOCOL_V4_4,GA=ic.FETCH_ALL,YA=Qc.internal.bookmarks.Bookmarks,fc=(UA=nc.default,ll(KA,UA),Object.defineProperty(KA.prototype,"version",{get:function(){return HA},enumerable:!1,configurable:!0}),Object.defineProperty(KA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new VA.default(Object.values(qA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),KA.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 BA.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||YA.empty();return this.write(FA.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},KA.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===_?GA:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new BA.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,WA.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(FA.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(FA.default.pull({n:_}),c,b),c},KA.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 BA.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,WA.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(FA.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},KA.prototype._applyUtcPatch=function(){var t=this;this._transformer=new VA.default(Object.values(LA(LA({},qA.default),zA.default)).map(function(e){return e(t._config,t._log)}))},KA);function KA(){return null!==UA&&UA.apply(this,arguments)||this}lc.default=fc;var y={},sc={},ZA=r&&r.__assign||function(){return(ZA=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.__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},bf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},QA=(Object.defineProperty(sc,"__esModule",{value:!0}),T_),JA=e,$A=bf(za),wf=bf(bs);sc.default=ZA(ZA(ZA({},$A.default),wf.default),{createNodeTransformer:function(e){return $A.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){QA.structure.verifyStructSize("Node",4,e.size);var e=XA(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new JA.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return $A.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){QA.structure.verifyStructSize("Relationship",8,e.size);var e=XA(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 JA.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return $A.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){QA.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=XA(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new JA.UnboundRelationship(t,r,n,e)}})}});var ek,tk,rc=r&&r.__extends||(ek=function(e,t){return(ek=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}ek(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),nl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w=(Object.defineProperty(y,"__esModule",{value:!0}),nl(lc)),rk=Fb,nk=nl(sc),ok=nl(jv),ik=nl(T),uk=I,ak=e.internal.constants.BOLT_PROTOCOL_V5_0,Xp=(tk=w.default,rc(sk,tk),Object.defineProperty(sk.prototype,"version",{get:function(){return ak},enumerable:!1,configurable:!0}),Object.defineProperty(sk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new ok.default(Object.values(nk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),sk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new uk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,rk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(ik.default.hello(r,n,this._serversideRouting),e,!0),e},sk);function sk(){return null!==tk&&tk.apply(this,arguments)||this}y.default=Xp;var ck,lk,od={},ud={},fk=r&&r.__assign||function(){return(fk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},gd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},tc=(Object.defineProperty(ud,"__esModule",{value:!0}),gd(sc)),hd=(ud.default=fk({},tc.default),r&&r.__extends||(ck=function(e,t){return(ck=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ck(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),pk=r&&r.__assign||function(){return(pk=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)},Dp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ed=(Object.defineProperty(od,"__esModule",{value:!0}),Dp(y)),dk=Fb,hk=Dp(ud),bk=Dp(jv),yk=Dp(T),_k=I,vk=e.internal.constants.BOLT_PROTOCOL_V5_1,ec=(lk=Ed.default,hd(mk,lk),Object.defineProperty(mk.prototype,"version",{get:function(){return vk},enumerable:!1,configurable:!0}),Object.defineProperty(mk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new bk.default(Object.values(hk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(mk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),mk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new _k.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,dk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(yk.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(pk(pk({},e),a.metadata))},onError:i,flush:!0})},mk.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 _k.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(yk.default.logon(r),i,e),i},mk.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new _k.LogoffObserver({onCompleted:t,onError:r});return this.write(yk.default.logoff(),t,e),t},mk);function mk(){return null!==lk&&lk.apply(this,arguments)||this}od.default=ec;var gk,Ok,qa={},Zp={},wk=r&&r.__assign||function(){return(wk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ap=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jd=(Object.defineProperty(Zp,"__esModule",{value:!0}),ap(ud)),Dd=(Zp.default=wk({},jd.default),r&&r.__extends||(gk=function(e,t){return(gk=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}gk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Ek=r&&r.__assign||function(){return(Ek=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)},u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},b=(Object.defineProperty(qa,"__esModule",{value:!0}),u(od)),Pk=u(Zp),Sk=u(jv),Tk=u(T),jk=I,C=e.internal.constants,Ck=C.BOLT_PROTOCOL_V5_2,Ik=C.FETCH_ALL,ad=(Ok=b.default,Dd(Rk,Ok),Object.defineProperty(Rk.prototype,"version",{get:function(){return Ck},enumerable:!1,configurable:!0}),Object.defineProperty(Rk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Sk.default(Object.values(Pk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(Rk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),Rk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new jk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write(Tk.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Ek(Ek({},e),a.metadata))},onError:i,flush:!0})},Rk.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 jk.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(Tk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},Rk.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===_?Ik:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new jk.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(Tk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(Tk.default.pull({n:_}),c,b),c},Rk);function Rk(){return null!==Ok&&Ok.apply(this,arguments)||this}qa.default=ad;var Ak,kk,Wd={},Hd={},Mk=r&&r.__assign||function(){return(Mk=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)},Ks=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},th=(Object.defineProperty(Hd,"__esModule",{value:!0}),Ks(Zp)),Ud=(Hd.default=Mk({},th.default),r&&r.__extends||(Ak=function(e,t){return(Ak=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}Ak(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Nk=r&&r.__assign||function(){return(Nk=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)},lh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xd=(Object.defineProperty(Wd,"__esModule",{value:!0}),lh(qa)),xk=lh(Hd),Dk=lh(jv),Uk=lh(T),Lk=I,Fk=e.internal.constants.BOLT_PROTOCOL_V5_3,vh=(kk=Xd.default,Ud(Bk,kk),Object.defineProperty(Bk.prototype,"version",{get:function(){return Fk},enumerable:!1,configurable:!0}),Object.defineProperty(Bk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Dk.default(Object.values(xk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Bk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new Lk.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(Uk.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(Nk(Nk({},e),s.metadata))},onError:u,flush:!0})},Bk);function Bk(){return null!==kk&&kk.apply(this,arguments)||this}Wd.default=vh;var Wk,qk,jh={},Gh={},zk=r&&r.__assign||function(){return(zk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ch=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ql=(Object.defineProperty(Gh,"__esModule",{value:!0}),Ch(Hd)),ab=(Gh.default=zk({},Ql.default),r&&r.__extends||(Wk=function(e,t){return(Wk=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}Wk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),xf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lb=(Object.defineProperty(jh,"__esModule",{value:!0}),xf(Wd)),Vk=xf(Gh),Hk=xf(T),Gk=I,Yk=xf(jv),Kk=e.internal.constants.BOLT_PROTOCOL_V5_4,_f=(qk=lb.default,ab(Zk,qk),Object.defineProperty(Zk.prototype,"version",{get:function(){return Kk},enumerable:!1,configurable:!0}),Object.defineProperty(Zk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Yk.default(Object.values(Vk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Zk.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=t.onCompleted,t=new Gk.TelemetryObserver({onCompleted:t,onError:r});return this.write(Hk.default.telemetry({api:e}),t,!1),t},Zk);function Zk(){return null!==qk&&qk.apply(this,arguments)||this}jh.default=_f;var Xk,Qk,fb={},ep={},Jk=r&&r.__assign||function(){return(Jk=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)},wb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qp=(Object.defineProperty(ep,"__esModule",{value:!0}),wb(Hd)),Eh=(ep.default=Jk({},Qp.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)})),$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)},$s=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Hh=(Object.defineProperty(fb,"__esModule",{value:!0}),$s(jh)),eM=$s(ep),tM=$s(jv),rM=$s(T),nM=I,Ob=e.internal.constants,oM=Ob.BOLT_PROTOCOL_V5_5,iM=Ob.FETCH_ALL,uM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),py=(Qk=Hh.default,Eh(aM,Qk),Object.defineProperty(aM.prototype,"version",{get:function(){return oM},enumerable:!1,configurable:!0}),Object.defineProperty(aM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new tM.default(Object.values(eM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),aM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new nM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(rM.default.hello5x5(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a($k($k({},e),s.metadata))},onError:u,flush:!0})},aM.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 nM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(rM.default.begin5x5({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},aM.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===_?iM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new nM.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r,enrichMetadata:aM._enrichMetadata}),l=y;return this.write(rM.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(rM.default.pull({n:_}),c,b),c},aM._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return $k($k({},e),{diagnostic_record:null!==e.diagnostic_record?$k($k({},uM),e.diagnostic_record):null})})),e},aM);function aM(){return null!==Qk&&Qk.apply(this,arguments)||this}fb.default=py;var sy={},sM=(Object.defineProperty(sy,"__esModule",{value:!0}),e);function cM(){}function lM(e){return e}var fM={onNext:cM,onCompleted:cM,onError:cM};function pM(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.log,e=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=t||lM,this._observer=Object.assign({onObserversCountChange:cM,onError:cM,onFailure:cM,onErrorApplyTransformation:lM},e)}Object.defineProperty(pM.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),pM.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(sM.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(sM.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(sM.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,sM.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(sM.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,sM.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,sM.newError)("Unknown Bolt protocol message: "+e))}},pM.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(pM.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),pM.prototype._queueObserver=function(e){return(e=e||fM).onCompleted=e.onCompleted||cM,e.onError=e.onError||cM,e.onNext=e.onNext||cM,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},pM.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)}},pM.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},pM.prototype._resetFailure=function(){this._currentFailure=null},sy.default=pM;var dM,_y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hM=(Object.defineProperty(Rb,"__esModule",{value:!0}),e),bM=_y(xb),yM=_y(Wv),_M=_y(Fm),vM=_y(p0),mM=_y(m),gM=_y(ag),OM=_y(Ze),wM=_y(lc),EM=_y(y),PM=_y(od),SM=_y(qa),TM=_y(Wd),jM=_y(jh),CM=_y(fb),IM=_y(sy);Rb.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 IM.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 bM.default(p,d,h,y,v,_);case 2:return new yM.default(p,d,h,y,v,_);case 3:return new _M.default(p,d,h,y,v,_);case 4:return new vM.default(p,d,h,y,v,_);case 4.1:return new mM.default(p,d,h,y,v,_,b);case 4.2:return new gM.default(p,d,h,y,v,_,b);case 4.3:return new OM.default(p,d,h,y,v,_,b);case 4.4:return new wM.default(p,d,h,y,v,_,b);case 5:return new EM.default(p,d,h,y,v,_,b);case 5.1:return new PM.default(p,d,h,y,v,_,b);case 5.2:return new SM.default(p,d,h,y,v,_,b);case 5.3:return new TM.default(p,d,h,y,v,_,b);case 5.4:return new jM.default(p,d,h,y,v,_,b);case 5.5:return new CM.default(p,d,h,y,v,_,b);default:throw(0,hM.newError)("Unknown Bolt protocol version: "+f)}},By=O,dM=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]}),xy=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||dM(t,e,r)},Vy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(By,"__esModule",{value:!0}),By.RawRoutingTable=By.BoltProtocol=void 0,sd=Vy(Nf),t_=Vy(Rb),n_=Vy(Ze),Vy=Vy(qb),xy(I,By),By.BoltProtocol=n_.default,By.RawRoutingTable=Vy.default,By.default={handshake:sd.default,create:t_.default};a_={},l_={},Object.defineProperty(l_,"__esModule",{value:!0}),l_.DEFAULT_ACQUISITION_TIMEOUT=l_.DEFAULT_MAX_SIZE=void 0,l_.DEFAULT_MAX_SIZE=100,l_.DEFAULT_ACQUISITION_TIMEOUT=6e4,RM.defaultConfig=function(){return new RM(100,6e4)},RM.fromDriverConfig=function(e){return new RM(kM(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,kM(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},Jy=RM;function RM(e,t){this.maxSize=AM(e,100),this.acquisitionTimeout=AM(t,6e4)}function AM(e,t){return 0===e||e?e:t}function kM(e){return 0===e||e}l_.default=Jy;var __={},MM=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())})},NM=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}}}},Yb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},xM=(Object.defineProperty(__,"__esModule",{value:!0}),Yb(l_)),DM=e,UM=DM.internal.logger.Logger,zy=(LM.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,DM.newError)("Connection acquisition timed out in ".concat(a._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},a._acquisitionTimeout);"object"==typeof n&&n.unref(),r=new BM(s,o,u,e,t,n,a._log),c[s].push(r),a._processPendingAcquireRequests(i)})},LM.prototype.purge=function(e){return this._purgeKey(e.asKey())},LM.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},LM.prototype.close=function(){return MM(this,void 0,void 0,function(){var t=this;return NM(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()]}})})},LM.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)}))},LM.prototype.has=function(e){return e.asKey()in this._pools},LM.prototype.activeResourceCount=function(e){return this._activeResourceCounts[e.asKey()]||0},LM.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return t||(t=new HM,this._pools[e]=t,this._pendingCreates[e]=0),t},LM.prototype._acquire=function(a,s,c){return MM(this,void 0,void 0,function(){var t,r,n,o,i,u=this;return NM(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,DM.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()?(FM(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),FM(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}]}})})},LM.prototype._release=function(u,a,s){return MM(this,void 0,void 0,function(){var o,i=this;return NM(this,function(e){switch(e.label){case 0:o=u.asKey(),e.label=1;case 1:return(e.trys.push([1,,9,10]),s.isActive())?[4,this._validateOnRelease(a)]:[3,6];case 2:return e.sent()?[3,4]:(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 3:return e.sent(),[3,5];case 4: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=5;case 5:return[3,8];case 6: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 7:e.sent(),e.label=8;case 8:return[3,10];case 9:return t=o,r=this._activeResourceCounts,0<(n=(r[t]||0)-1)?r[t]=n:delete r[t],this._processPendingAcquireRequests(u),[7];case 10:return[2]}var t,r,n})})},LM.prototype._purgeKey=function(o){return MM(this,void 0,void 0,function(){var t,r,n;return NM(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]}})})},LM.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])},LM);function LM(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?xM.default.defaultConfig():a,e=e.log,e=void 0===e?UM.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 FM(e,t){var r=t[e]||0;t[e]=r+1}Object.defineProperty(WM.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(WM.prototype,"requireNew",{get:function(){return this._config.requireNew||!1},enumerable:!1,configurable:!0}),WM.prototype.isCompleted=function(){return this._completed},WM.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))},WM.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var BM=WM;function WM(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||{}}GM.prototype.isActive=function(){return this._active},GM.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},GM.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},GM.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(GM.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),GM.prototype.pop=function(){var e=this._elements.pop();return this._elementsInUse.add(e),e},GM.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},GM.prototype.pushInUse=function(e){this._elementsInUse.add(e)},GM.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var qM,zM,VM,HM=GM;function GM(){this._active=!0,this._elements=[],this._elementsInUse=new Set}__.default=zy,Hy=a_,qM=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]}),zM=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)&&qM(t,e,r);return zM(t,e),t},L_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Hy,"__esModule",{value:!0}),Hy.DEFAULT_MAX_SIZE=Hy.DEFAULT_ACQUISITION_TIMEOUT=Hy.PoolConfig=Hy.Pool=void 0,VM=E_(l_),Hy.PoolConfig=VM.default,Object.defineProperty(Hy,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return VM.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(Hy,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return VM.DEFAULT_MAX_SIZE}}),E_=L_(__),Hy.Pool=E_.default,Hy.default=E_.default;var YM,Df={},Uf={},H_=r&&r.__extends||(YM=function(e,t){return(YM=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}YM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Uf,"__esModule",{value:!0});H_(ZM,KM=e.ConnectionProvider),ZM.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 KM,J_=ZM;function ZM(e){var t=KM.call(this)||this;return t._connection=e,t}Uf.default=J_;var XM,G_={},Jl={},Lf={},q_=r&&r.__extends||(XM=function(e,t){return(XM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}XM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Lf,"__esModule",{value:!0});q_(JM,QM=e.Connection),Object.defineProperty(JM.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JM.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JM.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JM.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JM.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JM.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),JM.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(JM.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JM.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(JM.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),JM.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},JM.prototype.write=function(e,t,r){throw new Error("not implemented")},JM.prototype.close=function(){throw new Error("not implemented")},JM.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var QM,Z_=JM;function JM(e){var t=QM.call(this)||this;return t._errorHandler=e,t}Lf.default=Z_;var $M,Qb={},pv=r&&r.__extends||($M=function(e,t){return($M=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}$M(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),e2=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())})},t2=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}}}},cv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},r2=(Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.createChannelConnection=void 0,$f),n2=e,yv=cv(Lf),o2=cv(O),i2=n2.error.PROTOCOL_ERROR,u2=n2.internal.logger.Logger,a2=0;Qb.createChannelConnection=function(i,u,a,s,e,c,t){void 0===c&&(c=null);var l=(t=void 0===t?function(e){return new r2.Channel(e)}:t)(new r2.ChannelConfig(i,u,a.errorCode(),e));return o2.default.handshake(l,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new r2.Chunker(l),o=new r2.Dechunker,t=new c2(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return o2.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onObserversCountChange:t._handleOngoingRequestsNumberChange.bind(t),onError:t._handleFatalError.bind(t),onFailure:t._resetOnFailure.bind(t),onProtocolError:t._handleProtocolError.bind(t),onErrorApplyTransformation:function(e){return t.handleAndTransformError(e,t._address)}}})},u.telemetryDisabled);return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};s2=yv.default,pv(N,s2),N.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},N.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},N.prototype._sendTelemetryIfEnabled=function(e){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||null==e||null==e.apiTelemetryConfig||this._protocol.telemetry({api:e.apiTelemetryConfig.api},{onCompleted:e.apiTelemetryConfig.onTelemetrySuccess,onError:e.beforeError})},N.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},N.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},N.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(N.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),N.prototype.connect=function(t,n,o,i){return e2(this,void 0,void 0,function(){var r=this;return t2(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,n2.newError)("Connection does not support re-auth");return this._authToken=o,this._protocol.initialized?[3,2]:[4,this._initialize(t,n,o)];case 1:return[2,e.sent()];case 2:return i?[4,new Promise(function(e,t){r._protocol.logoff({onError:t}),r._protocol.logon({authToken:o,onError:t,onComplete:function(){return e(r)},flush:!0})})]:[3,4];case 3:return[2,e.sent()];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:o,flush:!0}),[2,this]}})})},N.prototype._initialize=function(e,n,o){var i=this,u=this;return new Promise(function(r,t){i._protocol.initialize({userAgent:e,boltAgent:n,authToken:o,notificationFilter:i._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,i.version&&!t||(i.version=t),t=e.connection_id,i.databaseId||(i.databaseId=t),e.hints&&(null!=(t=e.hints["connection.recv_timeout_seconds"])&&(t=(0,n2.toNumber)(t),Number.isInteger(t)&&0<t?i._ch.setupReceiveTimeout(1e3*t):i._log.info("Server located at ".concat(i._address," supplied an invalid connection receive timeout value (").concat(t,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")),!0===e.hints["telemetry.enabled"]&&(i._telemetryDisabledConnection=!1))),r(u)}})})},N.prototype.protocol=function(){return this._protocol},Object.defineProperty(N.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),N.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(n2.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},N.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},N.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},N.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},N.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},N.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()}})})},N.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},N.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()})}}))},N.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},N.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},N.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},N.prototype.close=function(){return e2(this,void 0,void 0,function(){return t2(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]}})})},N.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},N.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,n2.newError)(e,i2);return this._handleFatalError(e),e};var s2,c2=N;function N(e,t,r,n,o,i,u,a,s,c){void 0===o&&(o=!1),void 0===i&&(i=null);var l,f,t=s2.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=a2++,t._address=r,t._server={address:r.asHostPort()},t._creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(l=t,new u2((f=n)._level,function(e,t){return f._loggerFunction(e,"".concat(l," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._telemetryDisabledDriverConfig=!0===c,t._telemetryDisabledConnection=!0,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}Qb.default=c2;var l2,f2,wv={},P=r&&r.__extends||(l2=function(e,t){return(l2=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}l2(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}},Nv=(Object.defineProperty(wv,"__esModule",{value:!0}),Av(Lf)),Uv=(f2=Nv.default,P(p2,f2),p2.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},p2.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},p2.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},p2.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},p2.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(p2.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),p2.prototype.isOpen=function(){return this._delegate.isOpen()},p2.prototype.protocol=function(){return this._delegate.protocol()},p2.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},p2.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},p2.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},p2.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},p2.prototype.close=function(){return this._delegate.close()},p2.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},p2);function p2(e,t){var r=f2.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}wv.default=Uv;s={};Object.defineProperty(s,"__esModule",{value:!0});var d2,h2,b2,y2=e.error.SERVICE_UNAVAILABLE,_2=e.error.SESSION_EXPIRED;function v2(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||m2,this._handleWriteFailure=r||m2,this._handleSecurityError=n||m2}function m2(e){return e}v2.create=function(e){return new v2(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},v2.prototype.errorCode=function(){return this._errorCode},v2.prototype.handleAndTransformError=function(e,t,r){return null!=(n=e)&&null!=n.code&&n.code.startsWith("Neo.ClientError.Security.")?this._handleSecurityError(e,t,r):function(e){if(e)return e.code===_2||e.code===y2||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t,r):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t,r):e;var n},s.default=v2,$v=Jl,d2=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]}),h2=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),om=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)&&d2(t,e,r);return h2(t,e),t},Sv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty($v,"__esModule",{value:!0}),$v.createChannelConnection=$v.ConnectionErrorHandler=$v.DelegateConnection=$v.ChannelConnection=$v.Connection=void 0,Tr=Sv(Lf),$v.Connection=Tr.default,b2=om(Qb),$v.ChannelConnection=b2.default,Object.defineProperty($v,"createChannelConnection",{enumerable:!0,get:function(){return b2.createChannelConnection}}),om=Sv(wv),$v.DelegateConnection=om.default,om=Sv(s),$v.ConnectionErrorHandler=om.default,$v.default=Tr.default;var lm={},g2=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())})},O2=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}}}},w2=(Object.defineProperty(lm,"__esModule",{value:!0}),e),E2=wy;function P2(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,w2.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}P2.prototype.authenticate=function(e){var r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return g2(this,void 0,void 0,function(){var t;return O2(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!E2.object.equals(r.authToken,n)&&!0!==o||!0===u),null==r.authToken||t?[4,r.connect(this._userAgent,this._boltAgent,n,i||!1)]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,r];case 3:return[4,this._authTokenManager.getToken()];case 4:return t=e.sent(),E2.object.equals(t,r.authToken)?[3,6]:[4,r.connect(this._userAgent,this._boltAgent,t,!1)];case 5:return[2,e.sent()];case 6:return[2,r]}})})},P2.prototype.handleError=function(e){var t=e.connection,e=e.code;return!(!t||!e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},lm.default=P2;var gm={},S2=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())})},T2=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 j2(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(gm,"__esModule",{value:!0}),j2.prototype.check=function(r){return S2(this,void 0,void 0,function(){var t;return T2(this,function(e){switch(e.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(r)?[2,!0]:(t=Date.now()-r.idleTimestamp,0===this._connectionLivenessCheckTimeout||t>this._connectionLivenessCheckTimeout?[4,r.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,!0]}})})},Object.defineProperty(j2.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),j2.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},gm.default=j2;var Ah={},C2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},I2=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}}}},R2=(Object.defineProperty(Ah,"__esModule",{value:!0}),$f);function A2(e){var t=e.clientCertificateProvider,e=e.loader;this._clientCertificateProvider=t,this._loader=e||R2.ClientCertificatesLoader,this._clientCertificate=null}A2.prototype.getClientCertificate=function(){return C2(this,void 0,void 0,function(){var t,r,n=this;return I2(this,function(e){switch(e.label){case 0:return(t=null!=this._clientCertificateProvider)?(r=null==this._clientCertificate)?[3,2]:[4,this._clientCertificateProvider.hasUpdate()]:[3,3];case 1:r=e.sent(),e.label=2;case 2:t=r,e.label=3;case 3:return t&&(this._clientCertificate=Promise.resolve(this._clientCertificateProvider.getClientCertificate()).then(this._loader.load).then(function(e){return n._clientCertificate=e,n._clientCertificate}).catch(function(e){throw n._clientCertificate=null,e})),[2,this._clientCertificate]}})})},Ah.default=A2;var k2,M2,Pm=r&&r.__extends||(k2=function(e,t){return(k2=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}k2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),N2=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]}),x2=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),bm=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)&&N2(t,e,r);return x2(t,e),t},D2=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())})},U2=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}}}},L2=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},F2=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=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},B2=(Object.defineProperty(G_,"__esModule",{value:!0}),Jl),W2=bm(a_),q2=e,z2=Am(lm),V2=wy,H2=Am(gm),G2=Am(Ah),Y2=q2.error.SERVICE_UNAVAILABLE,K2=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],Km=(M2=q2.ConnectionProvider,Pm(Z2,M2),Z2.prototype._createConnectionErrorHandler=function(){return new B2.ConnectionErrorHandler(Y2)},Z2.prototype._getClientCertificate=function(){return D2(this,void 0,void 0,function(){return U2(this,function(e){return[2,this._config.clientCertificate.getClientCertificate()]})})},Z2.prototype._createConnection=function(e,r,n){var o=this,i=e.auth;return this._createChannelConnection(r).then(function(t){return t.release=function(){return t.idleTimestamp=Date.now(),n(r,t)},o._openConnections[t.id]=t,o._authenticationProvider.authenticate({connection:t,auth:i}).catch(function(e){throw o._destroyConnection(t),e})})},Z2.prototype._validateConnectionOnAcquire=function(e,r){var n=e.auth,o=e.skipReAuth;return D2(this,void 0,void 0,function(){var t;return U2(this,function(e){switch(e.label){case 0:if(!this._validateConnection(r))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(r)];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not alive because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:r,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not valid because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 7:return[2]}})})},Z2.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},Z2.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},Z2.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},Z2.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return D2(this,void 0,void 0,function(){var t,r;return U2(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new q2.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]}})})},Z2.prototype._verifyAuthentication=function(e){var u=e.getAddress,a=e.auth;return D2(this,void 0,void 0,function(){var t,r,n,o,i;return U2(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,q2.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(),K2.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]}})})},Z2.prototype._verifyStickyConnection=function(e){var n=e.auth,o=e.connection;return e.address,D2(this,void 0,void 0,function(){var t,r;return U2(this,function(e){switch(e.label){case 0:return(t=V2.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,q2.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},Z2.prototype.close=function(){return D2(this,void 0,void 0,function(){return U2(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]}})})},Z2._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},Z2._removeIdleObserverOnConnection=function(e){e._unsetIdle()},Z2.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},Z2);function Z2(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,e=void 0===e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(W2.default.bind.apply(W2.default,F2([void 0],L2(e),!1)))}:e,s=(void 0===t&&(t=null),M2.call(this)||this);return s._id=r,s._config=n,s._log=o,s._clientCertificateHolder=new G2.default({clientCertificateProvider:s._config.clientCertificate}),s._authenticationProvider=new z2.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new H2.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(n){return D2(s,void 0,void 0,function(){var t,r;return U2(this,function(e){switch(e.label){case 0:return t=B2.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent()]))]}})})},s._connectionPool=e({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validateOnAcquire:s._validateConnectionOnAcquire.bind(s),validateOnRelease:s._validateConnectionOnRelease.bind(s),installIdleObserver:Z2._installIdleObserverOnConnection.bind(s),removeIdleObserver:Z2._removeIdleObserverOnConnection.bind(s),config:W2.PoolConfig.fromDriverConfig(n),log:s._log}),s._openConnections={},s}G_.default=Km;var X2,Q2,Rh={},Xm=r&&r.__extends||(X2=function(e,t){return(X2=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}X2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),J2=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())})},$2=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}}}},i0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s0=(Object.defineProperty(Rh,"__esModule",{value:!0}),i0(G_)),eN=Jl,e0=e.internal.constants,tN=e0.BOLT_PROTOCOL_V3,rN=e0.BOLT_PROTOCOL_V4_0,nN=e0.BOLT_PROTOCOL_V4_4,oN=e0.BOLT_PROTOCOL_V5_1,iN=e.error.SERVICE_UNAVAILABLE,Gc=(Q2=s0.default,Xm(uN,Q2),uN.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return J2(this,void 0,void 0,function(){var t,r,n=this;return $2(this,function(e){switch(e.label){case 0:return t=eN.ConnectionErrorHandler.create({errorCode:iN,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r,o)}}),[4,this._connectionPool.acquire({auth:i,forceReAuth:u},this._address)];case 1:return(r=e.sent(),i)?[4,this._verifyStickyConnection({auth:i,connection:r,address:this._address})]:[3,3];case 2:return e.sent(),[2,r];case 3:return[2,new eN.DelegateConnection(r,t)]}})})},uN.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),Q2.prototype._handleSecurityError.call(this,e,t,r)},uN.prototype._hasProtocolVersion=function(n){return J2(this,void 0,void 0,function(){var t,r;return $2(this,function(e){switch(e.label){case 0:return[4,this._createChannelConnection(this._address)];case 1:return t=e.sent(),r=t.protocol()?t.protocol().version:null,[4,t.close()];case 2:return e.sent(),r?[2,n(r)]:[2,!1]}})})},uN.prototype.supportsMultiDb=function(){return J2(this,void 0,void 0,function(){return $2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return rN<=e})];case 1:return[2,e.sent()]}})})},uN.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},uN.prototype.supportsTransactionConfig=function(){return J2(this,void 0,void 0,function(){return $2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return tN<=e})];case 1:return[2,e.sent()]}})})},uN.prototype.supportsUserImpersonation=function(){return J2(this,void 0,void 0,function(){return $2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return nN<=e})];case 1:return[2,e.sent()]}})})},uN.prototype.supportsSessionAuth=function(){return J2(this,void 0,void 0,function(){return $2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return oN<=e})];case 1:return[2,e.sent()]}})})},uN.prototype.verifyAuthentication=function(e){var r=e.auth;return J2(this,void 0,void 0,function(){var t=this;return $2(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},uN.prototype.verifyConnectivityAndGetServerInfo=function(){return J2(this,void 0,void 0,function(){return $2(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},uN);function uN(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,t=Q2.call(this,{id:t,config:r,log:n,userAgent:i,boltAgent:u,authTokenManager:a,newPool:e})||this;return t._address=o,t}Rh.default=Gc;var m0={},qm={},w0={},j_={},aN=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},sN=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))},cN=(Object.defineProperty(j_,"__esModule",{value:!0}),j_.createValidRoutingTable=void 0,e),R0=cN.internal.constants,lN=R0.ACCESS_MODE_WRITE,fN=R0.ACCESS_MODE_READ,pN=cN.internal.serverAddress.ServerAddress,dN=cN.error.PROTOCOL_ERROR,hN=(bN.fromRawRoutingTable=_N,bN.prototype.forget=function(e){this.readers=yN(this.readers,e),this.writers=yN(this.writers,e)},bN.prototype.forgetRouter=function(e){this.routers=yN(this.routers,e)},bN.prototype.forgetWriter=function(e){this.writers=yN(this.writers,e)},bN.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===fN&&0===this.readers.length||e===lN&&0===this.writers.length},bN.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},bN.prototype.allServers=function(){return sN(sN(sN([],aN(this.routers),!1),aN(this.readers),!1),aN(this.writers),!1)},bN.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,"]]")},bN);function bN(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,cN.int)(0),this.ttl=e}function yN(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function _N(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,cN.int)(Date.now()),n=(0,cN.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?cN.Integer.MAX_VALUE:n}catch(e){throw(0,cN.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(cN.json.stringify(t),"\nError message: ").concat(e.message),dN)}}(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=mN(e).map(function(e){return pN.fromUrl(e)}):"WRITE"===t?i=mN(e).map(function(e){return pN.fromUrl(e)}):"READ"===t&&(o=mN(e).map(function(e){return pN.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,cN.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(cN.json.stringify(t.servers),"\nError message: ").concat(e.message),dN)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return vN(u,"routers",t),vN(a,"readers",t),new hN({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function vN(e,t,r){if(0===e.length)throw(0,cN.newError)("Received no "+t+" from router "+r,dN)}function mN(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}j_.default=hN,j_.createValidRoutingTable=_N;var S0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gN=(Object.defineProperty(w0,"__esModule",{value:!0}),S0(j_));function ON(e){this._routingContext=e}ON.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:gN.default.fromRawRoutingTable(r,n,e)})})},ON.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})})},w0.default=ON;var wN,EN,zb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},M0=(Object.defineProperty(qm,"__esModule",{value:!0}),qm.RoutingTable=qm.Rediscovery=void 0,zb(w0)),Sy=(qm.Rediscovery=M0.default,zb(j_)),d0=(qm.RoutingTable=Sy.default,qm.default=M0.default,r&&r.__extends||(wN=function(e,t){return(wN=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}wN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),PN=r&&r.__assign||function(){return(PN=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)},SN=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]}),TN=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),H0=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)&&SN(t,e,r);return TN(t,e),t},jN=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},CN=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},IN=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.")},RN=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},X0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},AN=(Object.defineProperty(m0,"__esModule",{value:!0}),e),kN=H0(qm),MN=$f,NN=X0(Uf),Ih=X0(G_),xN=pc,DN=Jl,UN=wy,LN=AN.error.SERVICE_UNAVAILABLE,FN=AN.error.SESSION_EXPIRED,BN=AN.internal.bookmarks.Bookmarks,tl=AN.internal.constants,WN=tl.ACCESS_MODE_READ,qN=tl.ACCESS_MODE_WRITE,zN=tl.BOLT_PROTOCOL_V3,VN=tl.BOLT_PROTOCOL_V4_0,HN=tl.BOLT_PROTOCOL_V4_4,GN=tl.BOLT_PROTOCOL_V5_1,YN=null,KN=(0,AN.int)(3e4),yc=(EN=Ih.default,d0(ZN,EN),ZN.prototype._createConnectionErrorHandler=function(){return new DN.ConnectionErrorHandler(FN)},ZN.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||YN),e},ZN.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),EN.prototype._handleSecurityError.call(this,e,t,r,n)},ZN.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||YN),(0,AN.newError)("No longer possible to write to server at "+t,FN,e)},ZN.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 jN(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return CN(this,function(e){switch(e.label){case 0:return n={database:c||YN},o=new DN.ConnectionErrorHandler(FN,function(e,t){return a._handleUnavailability(e,t,n.database)},function(e,t){return a._handleWriteFailure(e,t,n.database)},function(e,t,r){return a._handleSecurityError(e,t,r,n.database)}),[4,this._freshRoutingTable({accessMode:s,database:n.database,bookmarks:l,impersonatedUser:f,auth:d,onDatabaseNameResolved:function(e){n.database=n.database||e,p&&p(e)}})];case 1:if(u=e.sent(),s===WN)r=this._loadBalancingStrategy.selectReader(u.readers),t="read";else{if(s!==qN)throw(0,AN.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(u.writers),t="write"}if(!r)throw(0,AN.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(u),FN);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 DN.DelegateConnection(i,o)];case 6:throw u=e.sent(),o.handleAndTransformError(u,r);case 7:return[2]}})})},ZN.prototype._hasProtocolVersion=function(u){return jN(this,void 0,void 0,function(){var t,r,n,o,i;return CN(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=e.sent(),n=0,e.label=2;case 2:if(!(n<t.length))return[3,8];e.label=3;case 3:return e.trys.push([3,6,,7]),[4,this._createChannelConnection(t[n])];case 4:return i=e.sent(),o=i.protocol()?i.protocol().version:null,[4,i.close()];case 5:return e.sent(),o?[2,u(o)]:[2,!1];case 6:return i=e.sent(),r=i,[3,7];case 7:return n++,[3,2];case 8:if(r)throw r;return[2,!1]}})})},ZN.prototype.supportsMultiDb=function(){return jN(this,void 0,void 0,function(){return CN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return VN<=e})];case 1:return[2,e.sent()]}})})},ZN.prototype.supportsTransactionConfig=function(){return jN(this,void 0,void 0,function(){return CN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return zN<=e})];case 1:return[2,e.sent()]}})})},ZN.prototype.supportsUserImpersonation=function(){return jN(this,void 0,void 0,function(){return CN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return HN<=e})];case 1:return[2,e.sent()]}})})},ZN.prototype.supportsSessionAuth=function(){return jN(this,void 0,void 0,function(){return CN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return GN<=e})];case 1:return[2,e.sent()]}})})},ZN.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},ZN.prototype.verifyAuthentication=function(e){var n=e.database,o=e.accessMode,i=e.auth;return jN(this,void 0,void 0,function(){var t=this;return CN(this,function(e){return[2,this._verifyAuthentication({auth:i,getAddress:function(){return jN(t,void 0,void 0,function(){var t,r;return CN(this,function(e){switch(e.label){case 0:return t={database:n||YN},[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===qN?r.writers:r.readers).length)throw(0,AN.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),LN);return[2,r[0]]}})})}})]})})},ZN.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return jN(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return CN(this,function(e){switch(e.label){case 0:return t={database:l||YN},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===qN?r.writers:r.readers,n=(0,AN.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),LN),e.label=2;case 2:e.trys.push([2,9,10,11]),o=IN(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}})})},ZN.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},ZN.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},ZN.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 kN.RoutingTable({database:r})});return u.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(u)),this._refreshRoutingTable(u,n,o,e).then(function(e){return i(e.database),e})):u},ZN.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)},ZN.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return jN(this,void 0,void 0,function(){var t,r,n,o,i;return CN(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=RN.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],r)?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(u,a,s,c,l)];case 3:i=RN.apply(void 0,[e.sent(),2]),o=i[0],i=i[1],r=o,n=i||n,e.label=4;case 4:return[4,this._applyRoutingTableIfPossible(a,r,n)];case 5:return[2,e.sent()]}})})},ZN.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return jN(this,void 0,void 0,function(){var t,r,n;return CN(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=RN.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a,s)];case 2:n=RN.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,r)];case 4:return[2,e.sent()]}})})},ZN.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return jN(this,void 0,void 0,function(){var t,r;return CN(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=RN.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,ZN._forgetRouter(o,n,r),[2,[null,t]])}})})},ZN.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return jN(this,void 0,void 0,function(){var t;return CN(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()]}})})},ZN.prototype._resolveSeedRouter=function(n){return jN(this,void 0,void 0,function(){var t,r=this;return CN(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)]}})})},ZN.prototype._fetchRoutingTable=function(s,c,l,f,p){return jN(this,void 0,void 0,function(){var t=this;return CN(this,function(e){return[2,s.reduce(function(i,u,a){return jN(t,void 0,void 0,function(){var t,r,n,o;return CN(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=RN.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(ZN._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=RN.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]))]})})},ZN.prototype._createSessionForRediscovery=function(o,i,u,a){return jN(this,void 0,void 0,function(){var t,r,n=this;return CN(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=DN.ConnectionErrorHandler.create({errorCode:FN,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new DN.DelegateConnection(t):new DN.DelegateConnection(t,r),r=new NN.default(r),t.protocol().version<4?[2,[new AN.Session({mode:qN,bookmarks:BN.empty(),connectionProvider:r}),null]]:[2,[new AN.Session({mode:WN,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},ZN.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,AN.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),LN,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},ZN.prototype._applyRoutingTableIfPossible=function(t,r,n){return jN(this,void 0,void 0,function(){return CN(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,AN.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),LN,n);case 1:return e.sent(),[2,r]}})})},ZN.prototype._updateRoutingTable=function(t){return jN(this,void 0,void 0,function(){return CN(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return e.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),this._log.info("Updated routing table ".concat(t)),[2]}})})},ZN._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},ZN);function ZN(e){var t=e.id,r=e.address,n=e.routingContext,o=e.hostNameResolver,i=e.config,u=e.log,a=e.userAgent,s=e.boltAgent,c=e.authTokenManager,l=e.routingTablePurgeDelay,e=e.newPool,f=EN.call(this,{id:t,config:i,log:u,userAgent:a,boltAgent:s,authTokenManager:c,newPool:e},function(n){return jN(f,void 0,void 0,function(){var t,r;return CN(this,function(e){switch(e.label){case 0:return t=DN.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent(),this._routingContext]))]}})})})||this;return f._routingContext=PN(PN({},n),{address:r.toString()}),f._seedRouter=r,f._rediscovery=new kN.default(f._routingContext),f._loadBalancingStrategy=new xN.LeastConnectedLoadBalancingStrategy(f._connectionPool),f._hostNameResolver=o,f._dnsResolver=new MN.HostNameResolver,f._log=u,f._useSeedRouter=!0,f._routingTableRegistry=new hx(l?(0,AN.int)(l):KN),f._refreshRoutingTable=UN.functional.reuseOngoingRequest(f._refreshRoutingTable,f),f}m0.default=yc;bx.prototype.register=function(e){return this._tables.set(e.database,e),this},bx.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},bx.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},bx.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},bx.prototype._forEach=function(e){var t,r;try{for(var n=IN(this._tables),o=n.next();!o.done;o=n.next())e(RN(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},bx.prototype._remove=function(e){return this._tables.delete(e),this},bx.prototype._removeIf=function(e){var t,r;try{for(var n=IN(this._tables),o=n.next();!o.done;o=n.next()){var i=RN(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 XN,QN,JN,$N,ex,tx,rx,nx,ox,ix,ux,x,ax,sx,cx,lx,fx,px,dx,hx=bx;function bx(e){this._tables=new Map,this._routingTablePurgeDelay=e}function yx(e,t,r){void 0===r&&(r={}),cx(e,"Bolt URL");var n,o=px.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=sx,r.trust=n,r.clientCertificate=(0,x.resolveCertificateProvider)(r.clientCertificate)}var a=function(e){if("object"==typeof(t=e)&&null!=t&&"getToken"in t&&"handleSecurityException"in t&&"function"==typeof t.getToken&&"function"==typeof t.handleSecurityException)return e;var t=e;return(t=t||{}).scheme=t.scheme||"none",(0,x.staticAuthTokenManager)({authToken:t})}(t),s=(r.userAgent=r.userAgent||dx,r.boltAgent=x.internal.boltAgent.fromVersion(ux.default),fx.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new ix.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new ax.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(lx(o.query))return function(e,t,r){return new ax.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function _x(r,n){return nx(this,void 0,void 0,function(){var t;return ox(this,function(e){switch(e.label){case 0:t=yx(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 a=Df,XN=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(a,"__esModule",{value:!0}),a.RoutingConnectionProvider=a.DirectConnectionProvider=a.PooledConnectionProvider=a.SingleConnectionProvider=void 0,QN=Uf,Object.defineProperty(a,"SingleConnectionProvider",{enumerable:!0,get:function(){return XN(QN).default}}),JN=G_,Object.defineProperty(a,"PooledConnectionProvider",{enumerable:!0,get:function(){return XN(JN).default}}),$N=Rh,Object.defineProperty(a,"DirectConnectionProvider",{enumerable:!0,get:function(){return XN($N).default}}),ex=m0,Object.defineProperty(a,"RoutingConnectionProvider",{enumerable:!0,get:function(){return XN(ex).default}}),qc=E,tx=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]}),rx=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),W0=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)&&tx(t,e,r);return rx(t,e),t},Pt=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||tx(t,e,r)},Object.defineProperty(qc,"__esModule",{value:!0}),qc.pool=qc.packstream=qc.channel=qc.buf=qc.bolt=qc.loadBalancing=void 0,qc.loadBalancing=W0(pc),qc.bolt=W0(O),qc.buf=W0(xp),qc.channel=W0($f),qc.packstream=W0(T_),qc.pool=W0(a_),Pt(Df,qc),l=F,nx=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())})},ox=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},j=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(l,"__esModule",{value:!0}),l.UnboundRelationship=l.Relationship=l.Node=l.Record=l.ServerInfo=l.GqlStatusObject=l.Notification=l.QueryStatistics=l.ProfiledPlan=l.Plan=l.ResultSummary=l.RxResult=l.RxManagedTransaction=l.RxTransaction=l.RxSession=l.EagerResult=l.Result=l.ManagedTransaction=l.Transaction=l.Session=l.Driver=l.temporal=l.spatial=l.graph=l.error=l.routing=l.session=l.types=l.logging=l.auth=l.isRetryableError=l.Neo4jError=l.integer=l.isUnboundRelationship=l.isRelationship=l.isPathSegment=l.isPath=l.isNode=l.isDateTime=l.isLocalDateTime=l.isDate=l.isTime=l.isLocalTime=l.isDuration=l.isPoint=l.isInt=l.int=l.hasReachableServer=l.driver=l.authTokenManagers=void 0,l.clientCertificateProviders=l.notificationFilterMinimumSeverityLevel=l.notificationFilterDisabledClassification=l.notificationFilterDisabledCategory=l.notificationSeverityLevel=l.notificationClassification=l.notificationCategory=l.resultTransformers=l.bookmarkManager=l.DateTime=l.LocalDateTime=l.Date=l.Time=l.LocalTime=l.Duration=l.Integer=l.Point=l.PathSegment=l.Path=void 0,ix=B,Object.defineProperty(l,"Driver",{enumerable:!0,get:function(){return ix.Driver}}),ux=j(n),x=e,Object.defineProperty(l,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(l,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(l,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(l,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(l,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(l,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(l,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(l,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(l,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(l,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(l,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(l,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(l,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(l,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(l,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(l,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(l,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(l,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(l,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(l,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(l,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(l,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(l,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(l,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(l,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(l,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(l,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(l,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(l,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(l,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(l,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(l,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(l,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(l,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(l,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(l,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(l,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(l,"GqlStatusObject",{enumerable:!0,get:function(){return x.GqlStatusObject}}),Object.defineProperty(l,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(l,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(l,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(l,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(l,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(l,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(l,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(l,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(l,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(l,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(l,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(l,"notificationClassification",{enumerable:!0,get:function(){return x.notificationClassification}}),Object.defineProperty(l,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(l,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(l,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return x.notificationFilterDisabledClassification}}),Object.defineProperty(l,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(l,"clientCertificateProviders",{enumerable:!0,get:function(){return x.clientCertificateProviders}}),ax=E,_=j(Gt),l.RxSession=_.default,Mg=j(i),l.RxTransaction=Mg.default,t=j(Dr),l.RxManagedTransaction=t.default,j=j(h),l.RxResult=j.default,Fr=x.internal.util,sx=Fr.ENCRYPTION_ON,cx=Fr.assertString,lx=Fr.isEmptyObjectOrNull,fx=x.internal.serverAddress.ServerAddress,px=x.internal.urlUtil,dx="neo4j-javascript/"+ux.default,l.driver=yx,l.hasReachableServer=_x,Fr={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},l.logging=Fr,pg={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},l.types=pg,S={READ:ix.READ,WRITE:ix.WRITE},l.session=S,Is={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},l.integer=Is,Ss={isPoint:x.isPoint},l.spatial=Ss,v={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},l.temporal=v,Yv={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},l.graph=Yv,Is={authTokenManagers:x.authTokenManagers,driver:yx,hasReachableServer:_x,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:Is,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:Fr,types:pg,session:S,routing:x.routing,error:x.error,graph:Yv,spatial:Ss,temporal:v,Driver:ix.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:_.default,RxTransaction:Mg.default,RxManagedTransaction:t.default,RxResult:j.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,GqlStatusObject:x.GqlStatusObject,ServerInfo:x.ServerInfo,Record:x.Record,Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,Path:x.Path,PathSegment:x.PathSegment,Point:x.Point,Integer:x.Integer,Duration:x.Duration,LocalTime:x.LocalTime,Time:x.Time,Date:x.Date,LocalDateTime:x.LocalDateTime,DateTime:x.DateTime,bookmarkManager:x.bookmarkManager,resultTransformers:x.resultTransformers,notificationCategory:x.notificationCategory,notificationSeverityLevel:x.notificationSeverityLevel,notificationFilterDisabledCategory:x.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:x.notificationFilterMinimumSeverityLevel,clientCertificateProviders:x.clientCertificateProviders},l.default=Is,D(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 D(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U,L,F={},B={},e={},t={},n=r&&r.__extends||(U=function(e,t){return(U=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}U(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"),q=(t.SERVICE_UNAVAILABLE=W,"SessionExpired"),z=(t.SESSION_EXPIRED=q,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===q||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=z,t.newError=function(e,t,r){return new z(e,null!=t?t:"N/A",r)};n=z.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),e=d.toNumber(e);return 0==(t&=63)?d.ZERO:e<32?d.fromBits(this.low>>>t|this.high<<32-t,this.high>>t):d.fromBits(this.high>>t-32,0<=this.high?0:-1)},d.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},d.fromInt=function(e){if(-128<=(e|=0)&&e<128&&null!=(t=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?(!0===t.ceilFloat&&(e=Math.ceil(e)),d.fromNumber(e)):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(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={},X={},Q={},J=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.getBrokenObjectReason=Q.isBrokenObject=Q.createBrokenObject=void 0,"__isBrokenObject__"),$="__reason__";Q.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})},Q.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[J]},Q.getBrokenObjectReason=function(e){return e[$]},Object.defineProperty(X,"__esModule",{value:!0}),X.stringify=void 0;var ee=Q;X.stringify=function(e,r){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"):!0!==(null==r?void 0:r.useCustomToString)||"object"!=typeof t||Array.isArray(t)||"function"!=typeof t.toString||t.toString===Object.prototype.toString?t:null==t?void 0:t.toString()})};var a,te,re,ne,oe,ie,ue,ae=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),se=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)&&ae(t,e,r);return se(t,e),t},ce=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.")},le=(Object.defineProperty(u,"__esModule",{value:!0}),u.ENCRYPTION_OFF=u.ENCRYPTION_ON=u.equals=u.validateQueryAndParameters=u.toNumber=u.assertValidDate=u.assertNumberOrInteger=u.assertNumber=u.assertString=u.assertObject=u.isString=u.isObject=u.isEmptyObjectOrNull=void 0,s(n)),fe=X;u.ENCRYPTION_ON="ENCRYPTION_ON";function pe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function de(e,t){if(he(e))return e;throw new TypeError((0,fe.stringify)(t)+" expected to be string but was: "+(0,fe.stringify)(e))}function he(e){return"[object String]"===Object.prototype.toString.call(e)}function be(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,ne.int)(e),this._maxInteger=(0,ne.int)(t)}function ye(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 _e(e,t){return(0,oe.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))}function ve(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 me(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 ge(e,t){return e=(0,ne.int)(e),t=(0,ne.int)(t),e.subtract(me(e,t).multiply(t))}function Oe(e){return(e=(0,ne.int)(e)).equals(0)?"":"."+we(e,9)}function we(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(!pe(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},u.isObject=pe,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(de(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!pe(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(pe(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,fe.stringify)(e))},u.assertString=de,u.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,fe.stringify)(e));return e},u.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,le.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,fe.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,fe.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,fe.stringify)(e));return e},u.isString=he,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=ce(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},u.toNumber=function(e){return e instanceof le.default?e.toNumber():"bigint"==typeof e?(0,le.int)(e).toNumber():e},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,be.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},be.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},s=be,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(me(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return ge(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=ye(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=ye,a.durationToIsoString=function(e,t,r,n){return e=we(e),t=we(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=Oe((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=we(e,2),t=we(t,2),r=we(r,2),n=Oe(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=we((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=we(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:we(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 we(e,6,{usePositiveSign:!0});return we(e,4)}(e),t=we(t,2),r=we(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 ve(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return ve(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return ve(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return ve(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return ve(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return ve(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return ve(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},ue=new Map,a.assertValidZoneId=function(t,r){var e=ue.get(r);if(!0!==e){if(!1===e)throw _e(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),ue.set(r,!0)}catch(e){throw ue.set(r,!1),_e(r,t)}}},a.floorDiv=me,a.floorMod=ge;var 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]}),Pe=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)&&Ee(t,e,r);return Pe(t,e),t},Se=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)),Te=u,je=t,Ce=s(n),s={value:!0,enumerable:!1,configurable:!1,writable:!1},Ie="__isDuration__",Re="__isLocalTime__",Ae="__isTime__",ke="__isDate__",Me="__isLocalDateTime__",Ne="__isDateTime__",l=(xe.prototype.toString=function(){return c.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},xe);function xe(e,t,r,n){this.months=(0,Te.assertNumberOrInteger)(e,"Months"),this.days=(0,Te.assertNumberOrInteger)(t,"Days"),(0,Te.assertNumberOrInteger)(r,"Seconds"),(0,Te.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=c.normalizeSecondsForDuration(r,n),this.nanoseconds=c.normalizeNanosecondsForDuration(n),Object.freeze(this)}i.Duration=l,Object.defineProperty(l.prototype,Ie,s),i.isDuration=function(e){return We(e,Ie)};De.fromStandardDate=function(e,t){ze(e,t);t=c.totalNanoseconds(e,t);return new De(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Ce.default?t.toInt():"bigint"==typeof t?(0,Ce.int)(t).toInt():t)},De.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};l=De;function De(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,Re,s),i.isLocalTime=function(e){return We(e,Re)};Ue.fromStandardDate=function(e,t){return ze(e,t),new Ue(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ce.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e))},Ue.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+c.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};l=Ue;function Ue(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,Te.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}i.Time=l,Object.defineProperty(l.prototype,Ae,s),i.isTime=function(e){return We(e,Ae)};Le.fromStandardDate=function(e){return ze(e),new Le(e.getFullYear(),e.getMonth()+1,e.getDate())},Le.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Le.prototype.toString=function(){return c.dateToIsoString(this.year,this.month,this.day)};l=Le;function Le(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,ke,s),i.isDate=function(e){return We(e,ke)};Fe.fromStandardDate=function(e,t){return ze(e,t),new Fe(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ce.toNumber)(c.totalNanoseconds(e,t)))},Fe.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Fe.prototype.toString=function(){return qe(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};l=Fe;function Fe(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,Me,s),i.isLocalDateTime=function(e){return We(e,Me)};Be.fromStandardDate=function(e,t){return ze(e,t),new Be(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ce.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e),null)},Be.prototype.toStandardDate=function(){return c.toStandardDate(this._toUTC())},Be.prototype.toString=function(){var e;return qe(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,"]"):"")},Be.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,Ce.int)(e).multiply(1e3).add((0,Ce.int)(this.nanosecond).div(1e6)).toNumber()};l=Be;function Be(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=Se(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,je.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,Te.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Te.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 We(e,t){return null!=e&&!0===e[t]}function qe(e,t,r,n,o,i,u){return c.dateToIsoString(e,t,r)+"T"+c.timeToIsoString(n,o,i,u)}function ze(e,t){(0,Te.assertValidDate)(e,"Standard date"),null!=t&&(0,Te.assertNumberOrInteger)(t,"Nanosecond")}i.DateTime=l,Object.defineProperty(l.prototype,Ne,s),i.isDateTime=function(e){return We(e,Ne)};var l={},Ve=(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,X),s={value:!0,enumerable:!1,configurable:!1,writable:!1},He="__isNode__",Ge="__isRelationship__",Ye="__isUnboundRelationship__",Ke="__isPath__",Ze="__isPathSegment__";function Xe(e,t){return null!=e&&!0===e[t]}Je.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,Ve.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var Qe=Je;function Je(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=ot(n,function(){return e.toString()})}l.Node=Qe,Object.defineProperty(Qe.prototype,He,s),l.isNode=function(e){return Xe(e,He)};et.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,Ve.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var $e=et;function et(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=ot(i,function(){return e.toString()}),this.startNodeElementId=ot(u,function(){return t.toString()}),this.endNodeElementId=ot(a,function(){return r.toString()})}l.Relationship=$e,Object.defineProperty($e.prototype,Ge,s),l.isRelationship=function(e){return Xe(e,Ge)};tt.prototype.bind=function(e,t){return new $e(this.identity,e,t,this.type,this.properties,this.elementId)},tt.prototype.bindTo=function(e,t){return new $e(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},tt.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,Ve.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};Qe=tt;function tt(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=ot(n,function(){return e.toString()})}l.UnboundRelationship=Qe,Object.defineProperty(Qe.prototype,Ye,s),l.isUnboundRelationship=function(e){return Xe(e,Ye)};function rt(e,t,r){this.start=e,this.relationship=t,this.end=r}l.PathSegment=rt,Object.defineProperty(rt.prototype,Ze,s),l.isPathSegment=function(e){return Xe(e,Ze)};function nt(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function ot(e,t){return null==e?t():e}l.Path=nt,Object.defineProperty(nt.prototype,Ke,s),l.isPath=function(e){return Xe(e,Ke)};var Qe={},it=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}}}},ut=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.")},at=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},st=(Object.defineProperty(Qe,"__esModule",{value:!0}),t);function ct(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)}ct.prototype.forEach=function(e){var t,r;try{for(var n=ut(this.entries()),o=n.next();!o.done;o=n.next()){var i=at(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}}},ct.prototype.map=function(e){var t,r,n=[];try{for(var o=ut(this.entries()),i=o.next();!i.done;i=o.next()){var u=at(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},ct.prototype.entries=function(){var t;return it(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]}})},ct.prototype.values=function(){var t;return it(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]}})},ct.prototype[Symbol.iterator]=function(){var t;return it(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]}})},ct.prototype.toObject=function(){var t,e,r={};try{for(var n=ut(this.entries()),o=n.next();!o.done;o=n.next()){var i=at(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},ct.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,st.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,st.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]},ct.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},Qe.default=ct;var s={},lt=(Object.defineProperty(s,"__esModule",{value:!0}),s.isPoint=s.Point=void 0,u),ft="__isPoint__",f=(pt.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(dt(this.srid),", x=").concat(dt(this.x),", y=").concat(dt(this.y),"}"):"Point{srid=".concat(dt(this.srid),", x=").concat(dt(this.x),", y=").concat(dt(this.y),", z=").concat(dt(this.z),"}")},pt);function pt(e,t,r,n){this.srid=(0,lt.assertNumberOrInteger)(e,"SRID"),this.x=(0,lt.assertNumber)(t,"X coordinate"),this.y=(0,lt.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,lt.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function dt(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}s.Point=f,Object.defineProperty(f.prototype,ft,{value:!0,enumerable:!1,configurable:!1,writable:!1}),s.isPoint=function(e){return null!=e&&!0===e[ft]};var f={},p={},h={},b=(Object.defineProperty(h,"__esModule",{value:!0}),h.FailedObserver=h.CompletedObserver=void 0,ht.prototype.subscribe=function(e){yt(e,e.onKeys,[]),yt(e,e.onCompleted,{})},ht.prototype.cancel=function(){},ht.prototype.pause=function(){},ht.prototype.resume=function(){},ht.prototype.prepareToHandleSingleResponse=function(){},ht.prototype.markCompleted=function(){},ht.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},ht);function ht(){}function bt(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function yt(e,t,r){null!=t&&t.bind(e)(r)}h.CompletedObserver=b,bt.prototype.subscribe=function(e){yt(e,e.onError,this._error),this._observers.push(e)},bt.prototype.onError=function(t){yt(this,this._beforeError,t),this._observers.forEach(function(e){return yt(e,e.onError,t)})},bt.prototype.cancel=function(){},bt.prototype.pause=function(){},bt.prototype.resume=function(){},bt.prototype.markCompleted=function(){},bt.prototype.prepareToHandleSingleResponse=function(){},h.FailedObserver=bt;var b={},_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]}),vt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),y=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&_t(t,e,r);return vt(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},gt=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))},Ot=(Object.defineProperty(b,"__esModule",{value:!0}),b.Bookmarks=void 0,y(u)),y=(wt.empty=function(){return Et},wt.prototype.isEmpty=function(){return 0===this._values.length},wt.prototype.values=function(){return this._values},wt.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},wt.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},wt);function wt(e){this._values=function(e){if(null==e||""===e)return[];if(Ot.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(!Ot.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return gt([],mt(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var Et=new(b.Bookmarks=y)(null);var Pt,St,y={},_=(Object.defineProperty(y,"__esModule",{value:!0}),y.TELEMETRY_APIS=y.BOLT_PROTOCOL_V5_6=y.BOLT_PROTOCOL_V5_5=y.BOLT_PROTOCOL_V5_4=y.BOLT_PROTOCOL_V5_3=y.BOLT_PROTOCOL_V5_2=y.BOLT_PROTOCOL_V5_1=y.BOLT_PROTOCOL_V5_0=y.BOLT_PROTOCOL_V4_4=y.BOLT_PROTOCOL_V4_3=y.BOLT_PROTOCOL_V4_2=y.BOLT_PROTOCOL_V4_1=y.BOLT_PROTOCOL_V4_0=y.BOLT_PROTOCOL_V3=y.BOLT_PROTOCOL_V2=y.BOLT_PROTOCOL_V1=y.DEFAULT_POOL_MAX_SIZE=y.DEFAULT_POOL_ACQUISITION_TIMEOUT=y.DEFAULT_CONNECTION_TIMEOUT_MILLIS=y.ACCESS_MODE_WRITE=y.ACCESS_MODE_READ=y.FETCH_ALL=void 0,y.FETCH_ALL=-1,y.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,y.DEFAULT_POOL_MAX_SIZE=100,y.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,y.ACCESS_MODE_READ="READ",y.ACCESS_MODE_WRITE="WRITE",y.BOLT_PROTOCOL_V1=1,y.BOLT_PROTOCOL_V2=2,y.BOLT_PROTOCOL_V3=3,y.BOLT_PROTOCOL_V4_0=4,y.BOLT_PROTOCOL_V4_1=4.1,y.BOLT_PROTOCOL_V4_2=4.2,y.BOLT_PROTOCOL_V4_3=4.3,y.BOLT_PROTOCOL_V4_4=4.4,y.BOLT_PROTOCOL_V5_0=5,y.BOLT_PROTOCOL_V5_1=5.1,y.BOLT_PROTOCOL_V5_2=5.2,y.BOLT_PROTOCOL_V5_3=5.3,y.BOLT_PROTOCOL_V5_4=5.4,y.BOLT_PROTOCOL_V5_5=5.5,y.BOLT_PROTOCOL_V5_6=5.6,y.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),v={},m=r&&r.__extends||(Pt=function(e,t){return(Pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Pt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Tt=(Object.defineProperty(v,"__esModule",{value:!0}),v.Logger=void 0,t),jt="error",Ct="warn",It="info",Rt="debug",At=((g={})[jt]=0,g[Ct]=1,g[It]=2,g[Rt]=3,g),g=(kt.create=function(e){return null!=(null==e?void 0:e.logging)?new kt(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=At[e];if(null!=t||0===t)return e;throw(0,Tt.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(At).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,Tt.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},kt.noOp=function(){return Nt},kt.prototype.isErrorEnabled=function(){return xt(this._level,jt)},kt.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(jt,e)},kt.prototype.isWarnEnabled=function(){return xt(this._level,Ct)},kt.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(Ct,e)},kt.prototype.isInfoEnabled=function(){return xt(this._level,It)},kt.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(It,e)},kt.prototype.isDebugEnabled=function(){return xt(this._level,Rt)},kt.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(Rt,e)},kt);function kt(e,t){this._level=e,this._loggerFunction=t}function Mt(){return St.call(this,It,function(e,t){})||this}v.Logger=g,m(Mt,St=g),Mt.prototype.isErrorEnabled=function(){return!1},Mt.prototype.error=function(e){},Mt.prototype.isWarnEnabled=function(){return!1},Mt.prototype.warn=function(e){},Mt.prototype.isInfoEnabled=function(){return!1},Mt.prototype.info=function(e){},Mt.prototype.isDebugEnabled=function(){return!1},Mt.prototype.debug=function(e){};var Nt=new Mt;function xt(e,t){return At[e]>=At[t]}var Dt,m=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)}),Ut=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())})},Lt=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}}}},Ft=(Object.defineProperty(_,"__esModule",{value:!0}),_.EMPTY_CONNECTION_HOLDER=_.ReadOnlyConnectionHolder=_.ConnectionHolder=void 0,t),Bt=u,Wt=y,qt=b,zt=v,g=(Vt.prototype.mode=function(){return this._mode},Vt.prototype.database=function(){return this._database},Vt.prototype.setDatabase=function(e){this._database=e},Vt.prototype.bookmarks=function(){return this._bookmarks},Vt.prototype.connectionProvider=function(){return this._connectionProvider},Vt.prototype.referenceCount=function(){return this._referenceCount},Vt.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},Vt.prototype._createConnectionPromise=function(o){return Ut(this,void 0,void 0,function(){var t,r,n;return Lt(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()]}})})},Vt.prototype._getBookmarks=function(){return Ut(this,void 0,void 0,function(){return Lt(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},Vt.prototype.getConnection=function(){return this._connectionPromise},Vt.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},Vt.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},Vt.prototype.log=function(){return this._log},Vt.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(Zt).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},Vt.prototype._logError=function(e){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(e,". Stacktrace: ").concat(e.stack)),null},Vt);function Vt(e){var t=e.mode,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,a=e.getConnectionAcquistionBookmarks,s=e.auth,e=e.log;this._mode=null!=t?t:Wt.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,Bt.assertString)(r,"database"):"",this._bookmarks=null!=n?n:qt.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=s,this._log=e,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=null!=a?a:function(){return Promise.resolve(qt.Bookmarks.empty())}}_.ConnectionHolder=g;m(Yt,Ht=g),Yt.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},Yt.prototype.getConnection=function(){return this._connectionHolder.getConnection()},Yt.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},Yt.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var Ht,Gt,O=Yt;function Yt(e){var t=Ht.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider(),log:e.log()})||this;return t._connectionHolder=e,t}function Kt(){return Gt.call(this,{log:zt.Logger.create({})})||this}_.ReadOnlyConnectionHolder=O,_.default=O,m(Kt,Gt=g),Kt.prototype.mode=function(){},Kt.prototype.database=function(){},Kt.prototype.initializeConnection=function(){return!0},Kt.prototype.getConnection=function(){return Ut(this,void 0,void 0,function(){return Lt(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,Ft.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},Kt.prototype.releaseConnection=function(){return Ut(this,void 0,void 0,function(){return Lt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},Kt.prototype.close=function(){return Ut(this,void 0,void 0,function(){return Lt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};O=new Kt;function Zt(e){return null}_.EMPTY_CONNECTION_HOLDER=O;var m={},Xt=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]}),Qt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),g=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Xt(t,e,r);return Qt(t,e),t},Jt=(Object.defineProperty(m,"__esModule",{value:!0}),m.TxConfig=void 0,g(u)),$t=t,er=n,O=(tr.empty=function(){return rr},tr.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},tr);function tr(e,t){var r;null!=(r=e)&&Jt.assertObject(r,"Transaction config"),this.timeout=function(e,t){if(Jt.isObject(e)&&null!=e.timeout){Jt.assertNumberOrInteger(e.timeout,"Transaction timeout"),!function(e){return"number"==typeof e.timeout&&!Number.isInteger(e.timeout)}(e)||!0!==(null==t?void 0:t.isInfoEnabled())||null==t||t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up."));t=(0,er.int)(e.timeout,{ceilFloat:!0});if(t.isNegative())throw(0,$t.newError)("Transaction timeout should not be negative");return t}return null}(e,t),this.metadata=function(e){if(Jt.isObject(e)&&null!=e.metadata){e=e.metadata;if(Jt.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var rr=new(m.TxConfig=O)({});var g={},nr=r&&r.__assign||function(){return(nr=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)},or=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())})},ir=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}}}},ur=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},ar=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))},sr=(Object.defineProperty(g,"__esModule",{value:!0}),g.TransactionExecutor=void 0,t),cr=y;function lr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,ar([e,t],ur(r),!1))}function fr(e){return clearTimeout(e)}function pr(e,t,r,n,o){void 0===o&&(o={setTimeout:lr,clearTimeout:fr}),this._maxRetryTimeMs=dr(e,3e4),this._initialRetryDelayMs=dr(t,1e3),this._multiplier=dr(r,2),this._jitterFactor=dr(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=cr.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function dr(e,t){return null!=e?e:t}pr.prototype.execute=function(n,o,i){var u=this,a={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){a.apiTransactionConfig=void 0}}};return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i,a).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i,a)})},pr.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},pr.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,sr.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=c._computeDelayWithJitter(u),n=c._setTimeout(function(){c._inFlightTimeoutIds=c._inFlightTimeoutIds.filter(function(e){return e!==n}),c._executeTransactionInsidePromise(o,i,e,t,a,s).catch(t)},r);c._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*c._multiplier;return c._retryTransactionPromise(o,i,e,r,t,a,s)})},pr.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return or(this,void 0,void 0,function(){var t,r,n,o,i=this;return ir(this,function(e){switch(e.label){case 0:return(e.trys.push([0,4,,5]),r=u(null!=(null==f?void 0:f.apiTransactionConfig)?nr({},null==f?void 0:f.apiTransactionConfig):void 0),this.pipelineBegin)?(n=r,[3,3]):[3,1];case 1:return[4,r];case 2:n=e.sent(),e.label=3;case 3:return t=n,[3,5];case 4:return o=e.sent(),c(o),[2];case 5:return o=(null!=l?l:function(e){return e})(t),this._safeExecuteTransactionWork(o,a).then(function(e){return i._handleTransactionWorkSuccess(e,t,s,c)}).catch(function(e){return i._handleTransactionWorkFailure(e,t,c)}),[2]}})})},pr.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},pr.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},pr.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},pr.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},pr.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())},g.TransactionExecutor=pr;var O={},hr=r&&r.__assign||function(){return(hr=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)},br=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yr=(Object.defineProperty(O,"__esModule",{value:!0}),O.Url=O.formatIPv6Address=O.formatIPv4Address=O.defaultPortForScheme=O.parseDatabaseUrl=void 0,u),_r=7687,vr=7474,mr=7473,gr=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Or(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function wr(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 Er(e){return"http"===e?vr:"https"===e?mr:_r}O.Url=gr,O.parseDatabaseUrl=function(e){(0,yr.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]),br((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=hr(hr({},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(":")?wr(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)?Er(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=Or(e[0],"key",r),e=Or(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)?br(t.split("?"),2)[1]:null,e);return new gr(n,o,u,i,r)},O.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},O.formatIPv6Address=function(e,t){return e=wr(e),"".concat(e,":").concat(t)},O.defaultPortForScheme=Er;var w={},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]}),Sr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Tr=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)&&Pr(t,e,r);return Sr(t,e),t},jr=(Object.defineProperty(w,"__esModule",{value:!0}),w.ServerAddress=void 0,u),Cr=Tr(O);function Ir(e,t,r,n){this._host=(0,jr.assertString)(e,"host"),this._resolved=null!=t?(0,jr.assertString)(t,"resolved"):null,this._port=(0,jr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Ir.prototype.host=function(){return this._host},Ir.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Ir.prototype.port=function(){return this._port},Ir.prototype.resolveWith=function(e){return new Ir(this._host,e,this._port,this._hostPort)},Ir.prototype.asHostPort=function(){return this._hostPort},Ir.prototype.asKey=function(){return this._hostPort},Ir.prototype.toString=function(){return this._stringValue},Ir.fromUrl=function(e){e=Cr.parseDatabaseUrl(e);return new Ir(e.host,null,e.port,e.hostAndPort)},w.ServerAddress=Ir;var Tr={},E={};function Rr(){}Object.defineProperty(E,"__esModule",{value:!0}),Rr.prototype.resolve=function(){throw new Error("Abstract function")},Rr.prototype._resolveToItself=function(e){return Promise.resolve([e])},E.default=Rr;var Ar={},kr=(Object.defineProperty(Ar,"__esModule",{value:!0}),w);function Mr(e){return Promise.resolve([e])}function Nr(e){this._resolverFunction=null!=e?e:Mr}Nr.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 kr.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))})},Ar.default=Nr;var xr,P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E=(Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.ConfiguredCustomResolver=Tr.BaseHostNameResolver=void 0,P(E)),E=(Tr.BaseHostNameResolver=E.default,P(Ar)),P=(Tr.ConfiguredCustomResolver=E.default,{}),E={};Object.defineProperty(E,"__esModule",{value:!0}),E.fromVersion=void 0,E.fromVersion=function(e,t){var r=null!=(t=(t=void 0===t?function(){return{get userAgent(){}}}:t)()).userAgent?t.userAgent.split("(")[1].split(")")[0]:void 0,t=t.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:t}},S=P,xr=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]}),Dr=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||xr(t,e,r)},Object.defineProperty(S,"__esModule",{value:!0}),Dr(E,S);var Dr={},E={},S=(Object.defineProperty(E,"__esModule",{value:!0}),E.DEFAULT_ACQUISITION_TIMEOUT=E.DEFAULT_MAX_SIZE=void 0,E.DEFAULT_MAX_SIZE=100,E.DEFAULT_ACQUISITION_TIMEOUT=6e4,Ur.defaultConfig=function(){return new Ur(100,6e4)},Ur.fromDriverConfig=function(e){return new Ur(Fr(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,Fr(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},Ur);function Ur(e,t){this.maxSize=Lr(e,100),this.acquisitionTimeout=Lr(t,6e4)}function Lr(e,t){return Fr(e)?e:t}function Fr(e){return 0===e||null!=e}E.default=S;var S={},Br=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())})},Wr=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}}}},qr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zr=(Object.defineProperty(S,"__esModule",{value:!0}),qr(E)),Vr=t,Hr=v,qr=(Gr.prototype.acquire=function(a,s,c){return Br(this,void 0,void 0,function(){var o,i,u=this;return Wr(this,function(e){switch(e.label){case 0:return o=s.asKey(),i=this._acquireRequests,null==i[o]&&(i[o]=[]),[4,new Promise(function(e,t){var r=setTimeout(function(){var e,t=i[o];null!=t&&(i[o]=t.filter(function(e){return e!==n})),n.isCompleted()||(t=u.activeResourceCount(s),e=u.has(s)?u._pools[o].length:0,n.reject((0,Vr.newError)("Connection acquisition timed out in ".concat(u._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},u._acquisitionTimeout),n=("object"==typeof r&&r.unref(),new Kr(o,a,c,e,t,r,u._log));i[o].push(n),u._processPendingAcquireRequests(s)})];case 1:return[2,e.sent()]}})})},Gr.prototype.purge=function(t){return Br(this,void 0,void 0,function(){return Wr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t.asKey())];case 1:return[2,e.sent()]}})})},Gr.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},Gr.prototype.close=function(){return Br(this,void 0,void 0,function(){var r=this;return Wr(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(t){return Br(r,void 0,void 0,function(){return Wr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},Gr.prototype.keepAll=function(o){return Br(this,void 0,void 0,function(){var t,r,n=this;return Wr(this,function(e){switch(e.label){case 0:return t=o.map(function(e){return e.asKey()}),r=Object.keys(this._pools),r=r.filter(function(e){return!t.includes(e)}),[4,Promise.all(r.map(function(t){return Br(n,void 0,void 0,function(){return Wr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},Gr.prototype.has=function(e){return e.asKey()in this._pools},Gr.prototype.activeResourceCount=function(e){return null!=(e=this._activeResourceCounts[e.asKey()])?e:0},Gr.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return null==t&&(t=new $r,this._pools[e]=t,this._pendingCreates[e]=0),t},Gr.prototype._acquire=function(a,s,c){return Br(this,void 0,void 0,function(){var t,n,r,o,i,u=this;return Wr(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(),n=this._getOrInitializePoolFor(t),c)return[3,6];e.label=1;case 1:return 0<n.length?null==(r=n.pop())?[3,1]:(null!=this._removeIdleObserver&&this._removeIdleObserver(r),[4,this._validateOnAcquire(a,r)]):[3,6];case 2:return e.sent()?(Yr(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(r," acquired from the pool ").concat(t)),[2,{resource:r,pool:n}]):[3,3];case 3:return n.removeInUse(r),[4,this._destroy(r)];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:n}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=7;case 7:return(e.trys.push([7,,11,12]),this.activeResourceCount(s)+n.length>=this._maxSize&&c)?null==(i=n.pop())?[3,9]:(null!=this._removeIdleObserver&&this._removeIdleObserver(i),n.removeInUse(i),[4,this._destroy(i)]):[3,9];case 8:e.sent(),e.label=9;case 9:return[4,this._create(a,s,function(t,r){return Br(u,void 0,void 0,function(){return Wr(this,function(e){switch(e.label){case 0:return[4,this._release(t,r,n)];case 1:return[2,e.sent()]}})})})];case 10:return o=e.sent(),n.pushInUse(o),Yr(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:n}]}})})},Gr.prototype._release=function(u,a,s){return Br(this,void 0,void 0,function(){var o,i=this;return Wr(this,function(e){switch(e.label){case 0:o=u.asKey(),e.label=1;case 1:return(e.trys.push([1,,9,10]),s.isActive())?[4,this._validateOnRelease(a)]:[3,6];case 2:return e.sent()?[3,4]:(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 3:return e.sent(),[3,5];case 4:null!=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];null!=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=5;case 5:return[3,8];case 6: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 7:e.sent(),e.label=8;case 8:return[3,10];case 9:return t=o,r=this._activeResourceCounts,0<(n=(null!=(n=r[t])?n:0)-1)?r[t]=n:delete r[t],this._processPendingAcquireRequests(u),[7];case 10:return[2]}var t,r,n})})},Gr.prototype._purgeKey=function(o){return Br(this,void 0,void 0,function(){var t,r,n;return Wr(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],null==t)return[3,2];for(;0<t.length;)null!=(n=t.pop())&&(null!=this._removeIdleObserver&&this._removeIdleObserver(n),r.push(this._destroy(n)));return t.close(),delete this._pools[o],[4,Promise.all(r)];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Gr.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];null!=e&&(null!=(n=e.shift())?this._acquire(n.context,r,n.requireNew).catch(function(e){return n.reject(e),{resource:null,pool:null}}).then(function(e){var t=e.resource,e=e.pool;null!=t&&null!=e?n.isCompleted()?o._release(r,t,e).catch(function(e){o._log.isDebugEnabled()&&o._log.debug("".concat(t," could not be release back to the pool. Cause: ").concat(e))}):n.resolve(t):n.isCompleted()||(null==o._acquireRequests[i]&&(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}).catch(function(e){return n.reject(e)}):delete this._acquireRequests[i])},Gr);function Gr(e){var t=e.create,t=void 0===t?function(e,t,r){return Br(s,void 0,void 0,function(){return Wr(this,function(e){switch(e.label){case 0:return[4,Promise.reject(new Error("Not implemented"))];case 1:return[2,e.sent()]}})})}:t,r=e.destroy,r=void 0===r?function(e){return Br(s,void 0,void 0,function(){return Wr(this,function(e){switch(e.label){case 0:return[4,Promise.resolve()];case 1:return[2,e.sent()]}})})}:r,n=e.validateOnAcquire,n=void 0===n?function(e,t){return!0}:n,o=e.validateOnRelease,o=void 0===o?function(e){return!0}:o,i=e.installIdleObserver,i=void 0===i?function(e,t){}:i,u=e.removeIdleObserver,u=void 0===u?function(e){}:u,a=e.config,a=void 0===a?zr.default.defaultConfig():a,e=e.log,e=void 0===e?Hr.Logger.noOp():e,s=this;this._create=t,this._destroy=r,this._validateOnAcquire=n,this._validateOnRelease=o,this._installIdleObserver=i,this._removeIdleObserver=u,this._maxSize=a.maxSize,this._acquisitionTimeout=a.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function Yr(e,t){var r=null!=(r=t[e])?r: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(){var e;return null!=(e=this._config.requireNew)&&e},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 Kr=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=null!=r?r:{}}en.prototype.isActive=function(){return this._active},en.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},en.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},en.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(en.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),en.prototype.pop=function(){var e=this._elements.pop();return null!=e&&this._elementsInUse.add(e),e},en.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},en.prototype.pushInUse=function(e){this._elementsInUse.add(e)},en.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var Xr,Qr,Jr,$r=en;function en(){this._active=!0,this._elements=[],this._elementsInUse=new Set}S.default=qr,qr=Dr,Xr=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]}),Qr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),j=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)&&Xr(t,e,r);return Qr(t,e),t},T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(qr,"__esModule",{value:!0}),qr.DEFAULT_MAX_SIZE=qr.DEFAULT_ACQUISITION_TIMEOUT=qr.PoolConfig=qr.Pool=void 0,Jr=j(E),qr.PoolConfig=Jr.default,Object.defineProperty(qr,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return Jr.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(qr,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return Jr.DEFAULT_MAX_SIZE}}),j=T(S),qr.Pool=j.default,qr.default=j.default;var tn=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]}),rn=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)&&tn(t,e,r);return rn(t,e),t},T=(Object.defineProperty(p,"__esModule",{value:!0}),p.pool=p.boltAgent=p.objectUtil=p.resolver=p.serverAddress=p.urlUtil=p.logger=p.transactionExecutor=p.txConfig=p.connectionHolder=p.constants=p.bookmarks=p.observer=p.temporalUtil=p.util=void 0,E(u)),S=(p.util=T,E(o)),qr=(p.temporalUtil=S,E(h)),j=(p.observer=qr,E(b)),T=(p.bookmarks=j,E(y)),o=(p.constants=T,E(_)),S=(p.connectionHolder=o,E(m)),qr=(p.txConfig=S,E(g)),j=(p.transactionExecutor=qr,E(v)),T=(p.logger=j,E(O)),o=(p.urlUtil=T,E(w)),S=(p.serverAddress=o,E(Tr)),qr=(p.resolver=S,E(Q)),j=(p.objectUtil=qr,E(P)),O=(p.boltAgent=j,E(Dr)),T=(p.pool=O,{}),nn=r&&r.__assign||function(){return(nn=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)},on=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),un=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),w=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&on(t,e,r);return un(t,e),t},an=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},sn=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))},cn=(Object.defineProperty(T,"__esModule",{value:!0}),T.buildNotificationsFromMetadata=T.buildGqlStatusObjectFromMetadata=T.polyfillNotification=T.polyfillGqlStatusObject=T.GqlStatusObject=T.Notification=T.notificationClassification=T.notificationCategory=T.notificationSeverityLevel=void 0,w(X)),ln=p,fn={WARNING:{gql_status:"01N42",status_description:"warn: unknown warning"},NO_DATA:{gql_status:"02N42",status_description:"note: no data - unknown subcondition"},INFORMATION:{gql_status:"03N42",status_description:"info: unknown notification"},ERROR:{gql_status:"50N42",status_description:"error: general processing exception - unknown error"}},pn={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},dn=(T.notificationSeverityLevel=pn,Object.freeze(pn),Object.values(pn)),o={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",SCHEMA:"SCHEMA",UNKNOWN:"UNKNOWN"},hn=(T.notificationCategory=o,Object.freeze(o),Object.values(o)),bn=o,yn=(T.notificationClassification=bn,function(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=Sn(e.position),this.severityLevel=Tn(e.severity),this.rawSeverityLevel=e.severity,this.category=jn(e.category),this.rawCategory=e.category}),_n=(T.Notification=yn,Object.defineProperty(vn.prototype,"diagnosticRecordAsJsonString",{get:function(){return cn.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),vn);function vn(e){var t;this.gqlStatus=e.gql_status,this.statusDescription=e.status_description,this.diagnosticRecord=null!=(t=e.diagnostic_record)?t:{},this.position=null!=this.diagnosticRecord._position?Sn(this.diagnosticRecord._position):void 0,this.severity=Tn(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=jn(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=null!=e.neo4j_code,Object.freeze(this)}function mn(e){var t;if(null!=e.neo4j_code)return new yn({code:e.neo4j_code,title:e.title,description:e.description,severity:null==(t=e.diagnostic_record)?void 0:t._severity,category:null==(t=e.diagnostic_record)?void 0:t._classification,position:null==(t=e.diagnostic_record)?void 0:t._position})}function gn(e){var t=e.severity===pn.WARNING?fn.WARNING:fn.INFORMATION,r={gql_status:t.gql_status,status_description:null!=(r=e.description)?r:t.status_description,neo4j_code:e.code,title:e.title,diagnostic_record:nn({},On)};return null!=e.severity&&(r.diagnostic_record._severity=e.severity),null!=e.category&&(r.diagnostic_record._classification=e.category),null!=e.position&&(r.diagnostic_record._position=e.position),new _n(r)}T.GqlStatusObject=_n,T.polyfillNotification=mn,T.polyfillGqlStatusObject=gn;var On={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},wn=(Object.freeze(On),{SUCCESS:new _n({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:On}),NO_DATA:new _n({gql_status:"02000",status_description:"note: no data",diagnostic_record:On}),NO_DATA_UNKNOWN_SUBCONDITION:new _n(nn(nn({},fn.NO_DATA),{diagnostic_record:On})),OMITTED_RESULT:new _n({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:On})});Object.freeze(wn),T.buildGqlStatusObjectFromMetadata=function(e){if(null!=e.statuses)return e.statuses.map(function(e){return new _n(e)});var t=!0===(null==(t=e.stream_summary)?void 0:t.have_records_streamed)?wn.SUCCESS:!1===(null==t?void 0:t.has_keys)?wn.OMITTED_RESULT:!0===(null==t?void 0:t.pulled)?wn.NO_DATA:wn.NO_DATA_UNKNOWN_SUBCONDITION;return sn([t],an(null!=(e=null==(t=e.notifications)?void 0:t.map(gn))?e:[]),!1).sort(function(e,t){return Pn(e)-Pn(t)})};var En=Object.freeze({"02":0,"01":1,"00":2});function Pn(e){var e=null==(e=e.gqlStatus)?void 0:e.slice(0,2);return null!=(e=En[e])?e:9999}function Sn(e){return null==e?{}:{offset:ln.util.toNumber(e.offset),line:ln.util.toNumber(e.line),column:ln.util.toNumber(e.column)}}function Tn(e){return dn.includes(e)?e:pn.UNKNOWN}function jn(e){return hn.includes(e)?e:bn.UNKNOWN}T.buildNotificationsFromMetadata=function(e){return null!=e.notifications?e.notifications.map(function(e){return new yn(e)}):null!=e.statuses?e.statuses.map(mn).filter(function(e){return null!=e}):[]},T.default=yn,Object.defineProperty(f,"__esModule",{value:!0}),f.Stats=f.QueryStatistics=f.ProfiledPlan=f.Plan=f.ServerInfo=f.queryType=void 0;var Cn=p,In=T,Tr=(Rn.prototype.hasPlan=function(){return this.plan instanceof An},Rn.prototype.hasProfile=function(){return this.profile instanceof kn},Rn);function Rn(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new Nn(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new An(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new kn(r.profile),this.notifications=(0,In.buildNotificationsFromMetadata)(r),this.gqlStatusObjects=(0,In.buildGqlStatusObjectFromMetadata)(r),this.server=new Dn(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 An=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)}):[]},kn=(f.Plan=An,Mn.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},Mn);function Mn(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=Un("dbHits",e),this.rows=Un("rows",e),this.pageCacheMisses=Un("pageCacheMisses",e),this.pageCacheHits=Un("pageCacheHits",e),this.pageCacheHitRatio=Un("pageCacheHitRatio",e),this.time=Un("time",e),this.children=null!=e.children?e.children.map(function(e){return new Mn(e)}):[]}f.ProfiledPlan=kn;f.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},xn.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)},xn.prototype.updates=function(){return this._stats},xn.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},xn.prototype.systemUpdates=function(){return this._systemUpdates};var Nn=xn;function xn(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]=Cn.util.toNumber(r[e]):"systemUpdates"===t?n._systemUpdates=Cn.util.toNumber(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}f.QueryStatistics=Nn;var Dn=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Un(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?(t=t[e],Cn.util.toNumber(t)):r}f.ServerInfo=Dn;function Ln(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}function Fn(e){console.log("Uncaught error when processing result: "+e)}function Bn(e){}function Wn(e){}f.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},f.default=Tr;var qn,S={},Q=(Object.defineProperty(S,"__esModule",{value:!0}),S.notificationFilterDisabledClassification=S.notificationFilterDisabledCategory=S.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),qr=(S.notificationFilterMinimumSeverityLevel=Q,Object.freeze(Q),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"}),P=(S.notificationFilterDisabledCategory=qr,Object.freeze(qr),qr),j=(S.notificationFilterDisabledClassification=P,S.default=Ln,{}),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())})},Vn=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Hn=(Object.defineProperty(j,"__esModule",{value:!0}),E(f)),Gn=p,Yn=t,Kn=Gn.connectionHolder.EMPTY_CONNECTION_HOLDER;function Zn(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[qn]="Result",this._stack=null==(i=new Error("")).stack?null:i.stack.replace(/^Error(\n\r)*/,""),this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:Kn,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}Zn.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)})},Zn.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)})},Zn.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},Zn.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,Yn.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return zn(n,void 0,void 0,function(){var t;return Vn(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,Yn.newError)("InvalidState: Result stream finished without Summary",Yn.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 zn(n,void 0,void 0,function(){var t;return Vn(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 zn(n,void 0,void 0,function(){var t;return Vn(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 zn(n,void 0,void 0,function(){return Vn(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()]}})})}}},Zn.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},Zn.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},Zn.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},Zn.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},Zn.prototype.isOpen=function(){return null===this._summary&&null===this._error},Zn.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)})},Zn.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:Bn,i=null!=(e=n.onError)?e:Fn,r=null!=(e=n.onKeys)?e:Wn;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)}}},Zn.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},Zn.prototype._releaseConnectionAndGetSummary=function(t){var e=Gn.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(e){return o.releaseConnection().then(function(){return null==e?void 0:e.getProtocolVersion()})},function(e){}).then(function(e){return new Hn.default(r,n,t,e)})},Zn.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 zn(this,void 0,void 0,function(){var t;return Vn(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,Yn.newError)("Unexpected empty buffer",Yn.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 zn(e,void 0,void 0,function(){var t;return Vn(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 zn(e,void 0,void 0,function(){var t,r;return Vn(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},qn=Symbol.toStringTag,j.default=Zn;Dr={};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};O={},Object.defineProperty(O,"__esModule",{value:!0}),O.Releasable=void 0,Xn.prototype.release=function(){throw new Error("Not implemented")},w=Xn;function Xn(){}function Qn(){}O.Releasable=w,Qn.prototype.acquireConnection=function(e){throw Error("Not implemented")},Qn.prototype.supportsMultiDb=function(){throw Error("Not implemented")},Qn.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},Qn.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},Qn.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},Qn.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},Qn.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},Qn.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},Qn.prototype.close=function(){throw Error("Not implemented")},O.default=Qn;o={};function Jn(){}Object.defineProperty(o,"__esModule",{value:!0}),Jn.prototype.beginTransaction=function(e){throw new Error("Not implemented")},Jn.prototype.run=function(e,t,r){throw new Error("Not implemented")},Jn.prototype.commitTransaction=function(e){throw new Error("Not implemented")},Jn.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},Jn.prototype.resetAndFlush=function(){throw new Error("Not implemented")},Jn.prototype.isOpen=function(){throw new Error("Not implemented")},Jn.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},Jn.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},o.default=Jn;var Tr={},$n=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())})},eo=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}}}},Q=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},to=(Object.defineProperty(Tr,"__esModule",{value:!0}),u),ro=_,no=b,oo=m,io=h,uo=t,ao=Q(j);function so(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,f=this;this._connectionHolder=t,this._reactive=i,this._state=co.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=no.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}so.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return $n(t,void 0,void 0,function(){var t,r=this;return eo(this,function(e){switch(e.label){case 0:return(this._onConnection(),null==n)?[3,2]:(t=this,[4,o()]);case 1:return t._bookmarks=e.sent(),[2,n.beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(e){null!=u&&u.onError(e),r._onError(e).catch(function(){})},afterComplete:function(e){null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,uo.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},so.prototype.run=function(e,t){e=(0,to.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},so.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)}})})},so.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)}})})},so.prototype.isOpen=function(){return this._state===co.ACTIVE},so.prototype.close=function(){return $n(this,void 0,void 0,function(){return eo(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]}})})},so.prototype[Symbol.asyncDispose]=function(){return this.close()},so.prototype._onErrorCallback=function(t){return this._state===co.FAILED?Promise.resolve(null):(this._state=co.FAILED,this._onClose(),this._results.forEach(function(e){e.isOpen()&&e._streamObserverPromise.then(function(e){return e.onError(t)}).catch(function(e){})}),this._connectionHolder.releaseConnection())},so.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new no.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:no.Bookmarks.empty(),null==e?void 0:e.db)};var co={ACTIVE:{commit:function(e){return{result:lo(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:co.SUCCEEDED}},rollback:function(e){return{result:lo(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:co.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 fo(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:no.Bookmarks.empty(),txConfig:oo.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,uo.newError)("No connection available")}).catch(function(e){return new io.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:fo(new io.FailedObserver({error:(0,uo.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:co.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:fo(new io.CompletedObserver,"ROLLBACK",{},t,0,0),state:co.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,fo(new io.FailedObserver({error:(0,uo.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:fo(new io.FailedObserver({error:(0,uo.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},ro.EMPTY_CONNECTION_HOLDER,0,0),state:co.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:fo(new io.FailedObserver({error:(0,uo.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},ro.EMPTY_CONNECTION_HOLDER,0,0),state:co.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,fo(new io.FailedObserver({error:(0,uo.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:fo(new io.FailedObserver({error:(0,uo.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:co.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:fo(new io.FailedObserver({error:(0,uo.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:co.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,fo(new io.FailedObserver({error:(0,uo.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function lo(r,e,n,o,i,u,t){var a=null!=t?t:Promise.resolve(),t=e.getConnection().then(function(e){return a.then(function(){return e})}).then(function(t){return i(),u.forEach(function(e){return e._cancel()}),Promise.all(u.map(function(e){return e.summary()})).then(function(e){if(null!=t)return r?t.commitTransaction({beforeError:n,afterComplete:o}):t.rollbackTransaction({beforeError:n,afterComplete:o});throw(0,uo.newError)("No connection available")})}).catch(function(e){return new io.FailedObserver({error:e,onError:n})});return new ao.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function fo(e,t,r,n,o,i){return void 0===n&&(n=ro.EMPTY_CONNECTION_HOLDER),new ao.default(Promise.resolve(e),t,r,new ro.ReadOnlyConnectionHolder(null!=n?n:ro.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}Tr.default=so;qr={};function po(e){e=e.run;this._run=e}Object.defineProperty(qr,"__esModule",{value:!0}),po.fromTransaction=function(e){return new po({run:e.run.bind(e)})},po.prototype.run=function(e,t){return this._run(e,t)},qr.default=po;var ho,bo,yo,P={},E=r&&r.__extends||(ho=function(e,t){return(ho=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}ho(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),_o=r&&r.__assign||function(){return(_o=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)},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Q=(Object.defineProperty(P,"__esModule",{value:!0}),w(Tr)),w=(yo=Q.default,E(vo,yo),vo.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},vo.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},vo.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},vo.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},vo.prototype._toTransaction=function(){return _o(_o({},this),{run:yo.prototype.run.bind(this),commit:yo.prototype.commit.bind(this),rollback:yo.prototype.rollback.bind(this),close:yo.prototype.close.bind(this),isOpen:yo.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},vo.prototype._begin=function(e,t){return yo.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},vo.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},vo.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},vo);function vo(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,t=yo.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:l,apiTelemetryConfig:e})||this;return t[bo]="TransactionPromise",t}bo=Symbol.toStringTag,P.default=w;var Q={},mo=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())})},go=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}}}},Oo=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},wo=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))},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Eo=(Object.defineProperty(Q,"__esModule",{value:!0}),h),Po=u,So=y,To=t,jo=E(j),Co=_,Io=g,Ro=b,Ao=m,ko=E(P),Mo=E(qr);function No(e){var t=e.mode,r=e.connectionProvider,n=e.bookmarks,o=e.database,i=e.config,u=e.reactive,a=e.fetchSize,s=e.impersonatedUser,c=e.bookmarkManager,l=e.notificationFilter,f=e.auth,e=e.log,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new Co.ConnectionHolder({mode:So.ACCESS_MODE_READ,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._writeConnectionHolder=new Co.ConnectionHolder({mode:So.ACCESS_MODE_WRITE,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:Ro.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Io.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=l,this._log=e}No.prototype.run=function(e,t,r){var o=this,e=(0,Po.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Ao.TxConfig(r,this._log):Ao.TxConfig.empty(),t=this._run(i,u,function(n){return mo(o,void 0,void 0,function(){var t,r=this;return go(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,apiTelemetryConfig:{api:So.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(e){return r._onCompleteCallback(e,t)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter})]}})})});return this._results.push(t),t},No.prototype._run=function(e,t,r){var r=this._acquireAndConsumeConnection(r),n=r.connectionHolder,r=r.resultPromise.catch(function(e){return Promise.resolve(new Eo.FailedObserver({error:e}))}),o={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new jo.default(r,e,t,n,o)},No.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return mo(r,void 0,void 0,function(){return go(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},No.prototype._acquireAndConsumeConnection=function(t){var e=this._connectionHolderWithMode(this._mode),r=this._open?!this._hasTx&&e.initializeConnection()?e.getConnection().then(function(e){return t(e)}):Promise.reject((0,To.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,To.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:r}},No.prototype.beginTransaction=function(e){var t=Ao.TxConfig.empty();return null!=e&&(t=new Ao.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:So.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},No.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,To.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,To.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=No._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new ko.default({connectionHolder:e,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(e,t,r){return n._updateBookmarks(e,t,r)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:r});return e._begin(function(){return n._bookmarks()},t),e},No.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,To.newError)("You cannot run more transactions on a closed session.")},No.prototype._transactionClosed=function(){this._hasTx=!1},No.prototype.lastBookmark=function(){return this.lastBookmarks()},No.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},No.prototype._bookmarks=function(){var r;return mo(this,void 0,void 0,function(){var t;return go(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 Ro.Bookmarks(wo(wo([],Oo(t),!1),Oo(this._configuredBookmarks),!1))]}})})},No.prototype.readTransaction=function(e,t){t=new Ao.TxConfig(t,this._log);return this._runTransaction(So.ACCESS_MODE_READ,t,e)},No.prototype.writeTransaction=function(e,t){t=new Ao.TxConfig(t,this._log);return this._runTransaction(So.ACCESS_MODE_WRITE,t,e)},No.prototype._runTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e)},No.prototype.executeRead=function(e,t){t=new Ao.TxConfig(t,this._log);return this._executeInTransaction(So.ACCESS_MODE_READ,t,e)},No.prototype.executeWrite=function(e,t){t=new Ao.TxConfig(t,this._log);return this._executeInTransaction(So.ACCESS_MODE_WRITE,t,e)},No.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,Mo.default.fromTransaction)},No.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},No.prototype._getConnectionAcquistionBookmarks=function(){var r;return mo(this,void 0,void 0,function(){var t;return go(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 Ro.Bookmarks(wo(wo([],Oo(this._configuredBookmarks),!1),Oo(t),!1))]}})})},No.prototype._updateBookmarks=function(e,t,r){var n;null==e||e.isEmpty()||(null!=(n=this._bookmarkManager)&&n.updateBookmarks(null!=(n=null==t?void 0:t.values())?n:[],null!=(t=null==e?void 0:e.values())?t:[]).catch(function(){}),this._lastBookmarks=e,this._configuredBookmarks=Ro.Bookmarks.empty())},No.prototype.close=function(){return mo(this,void 0,void 0,function(){return go(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]}})})},No.prototype[Symbol.asyncDispose]=function(){return this.close()},No.prototype._connectionHolderWithMode=function(e){if(e===So.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===So.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,To.newError)("Unknown access mode: "+e)},No.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new Ro.Bookmarks(e.bookmark),t,e.db)},No.prototype._calculateWatermaks=function(){return this._fetchSize===So.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},No.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},No._validateSessionMode=function(e){e=null!=e?e:So.ACCESS_MODE_WRITE;if(e!==So.ACCESS_MODE_READ&&e!==So.ACCESS_MODE_WRITE)throw(0,To.newError)("Illegal session mode "+e);return e},Q.default=No;var w={},h={},xo=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())})},Do=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}}}},Uo=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.")},Lo=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},Fo=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))},_=(Object.defineProperty(h,"__esModule",{value:!0}),h.bookmarkManager=void 0,Bo.prototype.updateBookmarks=function(e,t){return xo(this,void 0,void 0,function(){return Do(this,function(e){throw new Error("Not implemented")})})},Bo.prototype.getBookmarks=function(){return xo(this,void 0,void 0,function(){return Do(this,function(e){throw new Error("Not implemented")})})},Bo);function Bo(){throw new Error("Not implemented")}h.default=_,h.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Wo(t,e.bookmarksSupplier,e.bookmarksConsumer)};qo.prototype.updateBookmarks=function(f,p){return xo(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return Do(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=Uo(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=Uo(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(Fo([],Lo(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},qo.prototype.getBookmarks=function(){var s;return xo(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return Do(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=Uo(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,Fo([],Lo(t),!1)]}})})};var Wo=qo;function qo(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var g={},zo=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())})},Vo=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}},Ho=(Object.defineProperty(g,"__esModule",{value:!0}),m(Dr)),Go=t;function Yo(){}Yo.prototype.eagerResultTransformer=function(){return Ko},Yo.prototype.eager=function(){return Ko},Yo.prototype.mappedResultTransformer=function(e){return Zo(e)},Yo.prototype.mapped=function(e){return Zo(e)},Yo.prototype.first=function(){return Xo},Yo.prototype.summary=function(){return Qo};E=new Yo;function Ko(o){return zo(this,void 0,void 0,function(){var t,r,n;return Vo(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 Ho.default(n,r,t)]}})})}function Zo(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,Go.newError)("Requires a map or/and a collect functions.");return function(o){return zo(e,void 0,void 0,function(){return Vo(this,function(e){switch(e.label){case 0:return[4,new Promise(function(t,r){var n={records:[],keys:[]};o.subscribe({onKeys:function(e){n.keys=e},onNext:function(e){var t;null!=i.map?void 0!==(t=i.map(e))&&n.records.push(t):n.records.push(e)},onCompleted:function(e){null!=i.collect?t(i.collect(n.records,e,n.keys)):(e={records:n.records,summary:e,keys:n.keys},t(e))},onError:function(e){r(e)}})})];case 1:return[2,e.sent()]}})})}}function Xo(o){return zo(this,void 0,void 0,function(){var t,r,n;return Vo(this,function(e){switch(e.label){case 0:return[4,(t=o[Symbol.asyncIterator]()).next()];case 1:n=e.sent(),r=n.value,n=n.done,e.label=2;case 2:return e.trys.push([2,,3,6]),!0===n?[2,void 0]:[2,r];case 3:return null==t.return?[3,5]:[4,t.return()];case 4:e.sent(),e.label=5;case 5:return[7];case 6:return[2]}})})}function Qo(t){return zo(this,void 0,void 0,function(){return Vo(this,function(e){switch(e.label){case 0:return[4,t.summary()];case 1:return[2,e.sent()]}})})}Object.freeze(E),g.default=E;var _={},Jo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},$o=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ei=(Object.defineProperty(_,"__esModule",{value:!0}),y);function ti(e){this._createSession=e}ti.prototype.execute=function(o,i,u){return Jo(this,void 0,void 0,function(){var t,r,n=this;return $o(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser,auth:o.auth}),r=function(e,t,r){"function"==typeof(null==e?void 0:e.addEventListener)&&e.addEventListener(t,r);return{uninstall:function(){"function"==typeof(null==e?void 0:e.removeEventListener)&&e.removeEventListener(t,r)}}}(o.signal,"abort",function(){return Jo(n,void 0,void 0,function(){return $o(this,function(e){switch(e.label){case 0:return[4,t.close()];case 1:return[2,e.sent()]}})})}),t._configureTransactionExecutor(!0,ei.TELEMETRY_APIS.EXECUTE_QUERY),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READ"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return Jo(n,void 0,void 0,function(){var t;return $o(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})},o.transactionConfig)];case 2:return[2,e.sent()];case 3:return r.uninstall(),[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},_.default=ti;function ri(){this.routing=gi.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0,this.auth=void 0,this.signal=void 0}var ni=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},oi=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}},ii=(Object.defineProperty(w,"__esModule",{value:!0}),w.QueryConfig=w.SessionConfig=w.routing=w.WRITE=w.READ=w.Driver=void 0,b),ui=m(Ar),ai=y,si=v,ci=m(Q),li=u,fi=h,pi=m(g),di=m(_),hi=t,bi=36e5,yi=1e3,_i=ai.ACCESS_MODE_READ,vi=(w.READ=_i,ai.ACCESS_MODE_WRITE),mi=(w.WRITE=vi,0),gi=(w.SessionConfig=function(){this.defaultAccessMode=vi,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"}),E=(w.routing=gi,Object.freeze(gi),w.QueryConfig=ri,Object.defineProperty(Oi.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Oi.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),ni(this,void 0,void 0,function(){var t,r,n;return oi(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:pi.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:gi.WRITE)!==gi.READ&&n!==gi.WRITE)throw(0,hi.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser,transactionConfig:u.transactionConfig,auth:u.auth,signal:u.signal},o,i)];case 1:return[2,e.sent()]}})})},Oi.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:_i})},Oi.prototype.verifyAuthentication=function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return ni(this,void 0,void 0,function(){return oi(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:_i})];case 1:return[2,e.sent()]}})})},Oi.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:_i})},Oi.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Oi.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Oi.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Oi.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},Oi.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Oi.prototype.isEncrypted=function(){return this._isEncrypted()},Oi.prototype._supportsRouting=function(){return this._meta.routing},Oi.prototype._isEncrypted=function(){return this._config.encrypted===li.ENCRYPTION_ON||!0===this._config.encrypted},Oi.prototype._getTrust=function(){return this._config.trust},Oi.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?vi:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:Ei(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},Oi.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Oi.prototype[Symbol.asyncDispose]=function(){return this.close()},Oi.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Oi.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=ci.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),r=null!=r?new ii.Bookmarks(r):ii.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:c,bookmarks:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:s,auth:e,log:this._log})},Oi.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new ui.default(e.resolver)))),this._connectionProvider},Oi);function Oi(e,t,r,n,o){void 0===n&&(n=function(e){return new ci.default(e)}),void 0===o&&(o=function(e){return new di.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=wi(i.maxConnectionLifetime,bi),i.maxConnectionPoolSize=wi(i.maxConnectionPoolSize,ai.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=wi(i.connectionAcquisitionTimeout,ai.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=Ei(i.fetchSize,yi),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?ai.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i),i.connectionLivenessCheckTimeout=function(e){if(null==e)return;e=parseInt(e,10);if(e<0||Number.isNaN(e))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(e));return e}(i.connectionLivenessCheckTimeout);var i=si.Logger.create(t);!function(e,t){var r=e.resolver;if(null!=r&&"function"!=typeof r)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof r));e.connectionAcquisitionTimeout<e.connectionTimeout&&t.warn('Configuration for "connectionAcquisitionTimeout" should be greater than or equal to "connectionTimeout". Otherwise, the connection acquisition timeout will take precedence for over the connection timeout in scenarios where a new connection is created while it is acquired');if(null==(null==(r=e.notificationFilter)?void 0:r.disabledCategories)||null==(null==(t=e.notificationFilter)?void 0:t.disabledClassifications))return;throw new Error('The notificationFilter can\'t have both "disabledCategories" and "disabledClassifications" configured at the same time.')}(t,i),this._id=mi++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,fi.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function wi(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function Ei(e,t){e=parseInt(e,10);if(0<e||e===ai.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(ai.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}w.Driver=E,w.default=E;b={};function Pi(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(b,"__esModule",{value:!0}),b.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 Pi(t)&&(n.credentials=t),Pi(r)&&(n.realm=r),Pi(o)&&(n.parameters=o),n}};var Ar={},Si=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())})},Ti=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}}}},y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ji=(Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.staticAuthTokenManager=Ar.authTokenManagers=Ar.AuthTokenAndExpiration=void 0,y(b)),Ci=p;function Ii(){}function Ri(){}Ii.prototype.getToken=function(){throw new Error("Not Implemented")},Ii.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},Ar.default=Ii,Ar.AuthTokenAndExpiration=function(){this.token=ji.default.none(),this.expiration=void 0},Ri.prototype.bearer=function(e){e=e.tokenProvider;if("function"!=typeof e)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof e));return new Mi(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},Ri.prototype.basic=function(e){var t=this,r=e.tokenProvider;if("function"!=typeof r)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof r));return new Mi(function(){return Si(t,void 0,void 0,function(){var t;return Ti(this,function(e){switch(e.label){case 0:return t={},[4,r()];case 1:return[2,(t.token=e.sent(),t)]}})})},["Neo.ClientError.Security.Unauthorized"])};v=new Ri;Ar.authTokenManagers=v,Object.freeze(v),Ar.staticAuthTokenManager=function(e){return e=e.authToken,new xi(e)};ki.prototype.subscribe=function(e){this._subscribers.push(e)},ki.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},ki.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var Ai=ki;function ki(e){this._subscribers=e=void 0===e?[]:e}Ni.prototype.getToken=function(){var t;return Si(this,void 0,void 0,function(){return Ti(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]}})})},Ni.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(Ci.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},Ni.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new Ai,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)},Ni.prototype._refreshAuthToken=function(){return Si(this,void 0,void 0,function(){var r=this;return Ti(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 Mi=Ni;function Ni(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}Di.prototype.getToken=function(){return this._authToken},Di.prototype.handleSecurityException=function(e,t){return!1};var xi=Di;function Di(e){this._authToken=e}function Ui(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0}var Li,Fi,u={},m=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)}),_=(Object.defineProperty(u,"__esModule",{value:!0}),u.InternalConfig=u.Config=void 0,u.Config=Ui,m(Bi,Fi=Ui),Bi);function Bi(){return null!==Fi&&Fi.apply(this,arguments)||this}u.InternalConfig=_;var Wi,E={},y=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)}),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)},zi=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]}),Vi=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&zi(t,e,r);return Vi(t,e),t},Hi=(Object.defineProperty(E,"__esModule",{value:!0}),E.resolveCertificateProvider=E.clientCertificateProviders=E.RotatingClientCertificateProvider=E.ClientCertificateProvider=void 0,v(X)),m=(E.default=function(){this.certfile="",this.keyfile="",this.password=void 0},Gi.prototype.hasUpdate=function(){throw new Error("Not Implemented")},Gi.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},Gi);function Gi(){}E.ClientCertificateProvider=m;y(Ki,Yi=m),Ki.prototype.updateCertificate=function(e){throw new Error("Not implemented")};var Yi,_=Ki;function Ki(){return null!==Yi&&Yi.apply(this,arguments)||this}function Zi(){}E.RotatingClientCertificateProvider=_,Zi.prototype.rotating=function(e){e=e.initialCertificate;if(null==e||!Xi(e))throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(Hi.stringify(e)));e=qi({},e);return new bu(e)};v=new Zi;function Xi(e){return null!=e&&"object"==typeof e&&"certfile"in e&&(Qi(r=e.certfile)||Ji(r,Qi))&&"keyfile"in e&&(t(r=e.keyfile)||Ji(r,t))&&$i("password",e);function t(e){return"string"==typeof e||null!=e&&"object"==typeof e&&"path"in e&&"string"==typeof e.path&&$i("password",e)}var r}function Qi(e){return"string"==typeof e}function Ji(e,t,r){return void 0===r&&(r=!1),Array.isArray(e)&&(r||0<e.length)&&e.filter(t).length===e.length}function $i(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}E.clientCertificateProviders=v,Object.freeze(v),E.resolveCertificateProvider=function(e){if(null!=e){if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;var t;if(Xi(e))return t=qi({},e),{getClientCertificate:function(){return t},hasUpdate:function(){return!1}};throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(Hi.stringify(e)))}};yu.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},yu.prototype.getClientCertificate=function(){return this._certificate},yu.prototype.updateCertificate=function(e){if(!Xi(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(Hi.stringify(e)));this._certificate=qi({},e),this._updated=!0};var eu,tu,ru,nu,ou,iu,uu,au,su,cu,lu,fu,pu,du,hu,bu=yu;function yu(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}y=e,eu=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]}),tu=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)&&eu(t,e,r);return tu(t,e),t},_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(y,"__esModule",{value:!0}),y.Releasable=y.ConnectionProvider=y.EagerResult=y.Result=y.Stats=y.QueryStatistics=y.ProfiledPlan=y.Plan=y.GqlStatusObject=y.Notification=y.ServerInfo=y.queryType=y.ResultSummary=y.Record=y.isPathSegment=y.PathSegment=y.isPath=y.Path=y.isUnboundRelationship=y.UnboundRelationship=y.isRelationship=y.Relationship=y.isNode=y.Node=y.Time=y.LocalTime=y.LocalDateTime=y.isTime=y.isLocalTime=y.isLocalDateTime=y.isDuration=y.isDateTime=y.isDate=y.Duration=y.DateTime=y.Date=y.Point=y.isPoint=y.internal=y.toString=y.toNumber=y.inSafeRange=y.isInt=y.int=y.Integer=y.error=y.isRetriableError=y.Neo4jError=y.newError=y.authTokenManagers=void 0,y.resolveCertificateProvider=y.clientCertificateProviders=y.notificationFilterMinimumSeverityLevel=y.notificationFilterDisabledClassification=y.notificationFilterDisabledCategory=y.notificationSeverityLevel=y.notificationClassification=y.notificationCategory=y.resultTransformers=y.routing=y.staticAuthTokenManager=y.bookmarkManager=y.auth=y.json=y.driver=y.types=y.Driver=y.Session=y.TransactionPromise=y.ManagedTransaction=y.Transaction=y.Connection=void 0,ru=t,Object.defineProperty(y,"newError",{enumerable:!0,get:function(){return ru.newError}}),Object.defineProperty(y,"Neo4jError",{enumerable:!0,get:function(){return ru.Neo4jError}}),Object.defineProperty(y,"isRetriableError",{enumerable:!0,get:function(){return ru.isRetriableError}}),nu=m(n),y.Integer=nu.default,Object.defineProperty(y,"int",{enumerable:!0,get:function(){return nu.int}}),Object.defineProperty(y,"isInt",{enumerable:!0,get:function(){return nu.isInt}}),Object.defineProperty(y,"inSafeRange",{enumerable:!0,get:function(){return nu.inSafeRange}}),Object.defineProperty(y,"toNumber",{enumerable:!0,get:function(){return nu.toNumber}}),Object.defineProperty(y,"toString",{enumerable:!0,get:function(){return nu.toString}}),ou=i,Object.defineProperty(y,"Date",{enumerable:!0,get:function(){return ou.Date}}),Object.defineProperty(y,"DateTime",{enumerable:!0,get:function(){return ou.DateTime}}),Object.defineProperty(y,"Duration",{enumerable:!0,get:function(){return ou.Duration}}),Object.defineProperty(y,"isDate",{enumerable:!0,get:function(){return ou.isDate}}),Object.defineProperty(y,"isDateTime",{enumerable:!0,get:function(){return ou.isDateTime}}),Object.defineProperty(y,"isDuration",{enumerable:!0,get:function(){return ou.isDuration}}),Object.defineProperty(y,"isLocalDateTime",{enumerable:!0,get:function(){return ou.isLocalDateTime}}),Object.defineProperty(y,"isLocalTime",{enumerable:!0,get:function(){return ou.isLocalTime}}),Object.defineProperty(y,"isTime",{enumerable:!0,get:function(){return ou.isTime}}),Object.defineProperty(y,"LocalDateTime",{enumerable:!0,get:function(){return ou.LocalDateTime}}),Object.defineProperty(y,"LocalTime",{enumerable:!0,get:function(){return ou.LocalTime}}),Object.defineProperty(y,"Time",{enumerable:!0,get:function(){return ou.Time}}),iu=l,Object.defineProperty(y,"Node",{enumerable:!0,get:function(){return iu.Node}}),Object.defineProperty(y,"isNode",{enumerable:!0,get:function(){return iu.isNode}}),Object.defineProperty(y,"Relationship",{enumerable:!0,get:function(){return iu.Relationship}}),Object.defineProperty(y,"isRelationship",{enumerable:!0,get:function(){return iu.isRelationship}}),Object.defineProperty(y,"UnboundRelationship",{enumerable:!0,get:function(){return iu.UnboundRelationship}}),Object.defineProperty(y,"isUnboundRelationship",{enumerable:!0,get:function(){return iu.isUnboundRelationship}}),Object.defineProperty(y,"Path",{enumerable:!0,get:function(){return iu.Path}}),Object.defineProperty(y,"isPath",{enumerable:!0,get:function(){return iu.isPath}}),Object.defineProperty(y,"PathSegment",{enumerable:!0,get:function(){return iu.PathSegment}}),Object.defineProperty(y,"isPathSegment",{enumerable:!0,get:function(){return iu.isPathSegment}}),v=_(Qe),y.Record=v.default,uu=s,Object.defineProperty(y,"isPoint",{enumerable:!0,get:function(){return uu.isPoint}}),Object.defineProperty(y,"Point",{enumerable:!0,get:function(){return uu.Point}}),au=m(f),y.ResultSummary=au.default,Object.defineProperty(y,"queryType",{enumerable:!0,get:function(){return au.queryType}}),Object.defineProperty(y,"ServerInfo",{enumerable:!0,get:function(){return au.ServerInfo}}),Object.defineProperty(y,"Plan",{enumerable:!0,get:function(){return au.Plan}}),Object.defineProperty(y,"ProfiledPlan",{enumerable:!0,get:function(){return au.ProfiledPlan}}),Object.defineProperty(y,"QueryStatistics",{enumerable:!0,get:function(){return au.QueryStatistics}}),Object.defineProperty(y,"Stats",{enumerable:!0,get:function(){return au.Stats}}),su=m(T),y.Notification=su.default,Object.defineProperty(y,"GqlStatusObject",{enumerable:!0,get:function(){return su.GqlStatusObject}}),Object.defineProperty(y,"notificationCategory",{enumerable:!0,get:function(){return su.notificationCategory}}),Object.defineProperty(y,"notificationClassification",{enumerable:!0,get:function(){return su.notificationClassification}}),Object.defineProperty(y,"notificationSeverityLevel",{enumerable:!0,get:function(){return su.notificationSeverityLevel}}),cu=S,Object.defineProperty(y,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return cu.notificationFilterDisabledCategory}}),Object.defineProperty(y,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return cu.notificationFilterDisabledClassification}}),Object.defineProperty(y,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return cu.notificationFilterMinimumSeverityLevel}}),t=_(j),y.Result=t.default,n=_(Dr),y.EagerResult=n.default,lu=m(O),y.ConnectionProvider=lu.default,Object.defineProperty(y,"Releasable",{enumerable:!0,get:function(){return lu.Releasable}}),i=_(o),y.Connection=i.default,l=_(Tr),y.Transaction=l.default,Qe=_(qr),y.ManagedTransaction=Qe.default,s=_(P),y.TransactionPromise=s.default,f=_(Q),y.Session=f.default,T=m(w),S=T,y.Driver=T.default,y.driver=S,j=_(b),y.auth=j.default,fu=h,Object.defineProperty(y,"bookmarkManager",{enumerable:!0,get:function(){return fu.bookmarkManager}}),pu=Ar,Object.defineProperty(y,"authTokenManagers",{enumerable:!0,get:function(){return pu.authTokenManagers}}),Object.defineProperty(y,"staticAuthTokenManager",{enumerable:!0,get:function(){return pu.staticAuthTokenManager}}),du=w,Object.defineProperty(y,"routing",{enumerable:!0,get:function(){return du.routing}}),Dr=m(u),y.types=Dr,O=m(X),y.json=O,_=_(g),y.resultTransformers=_.default,hu=E,Object.defineProperty(y,"clientCertificateProviders",{enumerable:!0,get:function(){return hu.clientCertificateProviders}}),Object.defineProperty(y,"resolveCertificateProvider",{enumerable:!0,get:function(){return hu.resolveCertificateProvider}}),m=m(p),y.internal=m,o={SERVICE_UNAVAILABLE:ru.SERVICE_UNAVAILABLE,SESSION_EXPIRED:ru.SESSION_EXPIRED,PROTOCOL_ERROR:ru.PROTOCOL_ERROR},y.error=o,o={authTokenManagers:pu.authTokenManagers,newError:ru.newError,Neo4jError:ru.Neo4jError,isRetriableError:ru.isRetriableError,error:o,Integer:nu.default,int:nu.int,isInt:nu.isInt,inSafeRange:nu.inSafeRange,toNumber:nu.toNumber,toString:nu.toString,internal:m,isPoint:uu.isPoint,Point:uu.Point,Date:ou.Date,DateTime:ou.DateTime,Duration:ou.Duration,isDate:ou.isDate,isDateTime:ou.isDateTime,isDuration:ou.isDuration,isLocalDateTime:ou.isLocalDateTime,isLocalTime:ou.isLocalTime,isTime:ou.isTime,LocalDateTime:ou.LocalDateTime,LocalTime:ou.LocalTime,Time:ou.Time,Node:iu.Node,isNode:iu.isNode,Relationship:iu.Relationship,isRelationship:iu.isRelationship,UnboundRelationship:iu.UnboundRelationship,isUnboundRelationship:iu.isUnboundRelationship,Path:iu.Path,isPath:iu.isPath,PathSegment:iu.PathSegment,isPathSegment:iu.isPathSegment,Record:v.default,ResultSummary:au.default,queryType:au.queryType,ServerInfo:au.ServerInfo,Notification:su.default,GqlStatusObject:su.GqlStatusObject,Plan:au.Plan,ProfiledPlan:au.ProfiledPlan,QueryStatistics:au.QueryStatistics,Stats:au.Stats,Result:t.default,EagerResult:n.default,Transaction:l.default,ManagedTransaction:Qe.default,TransactionPromise:s.default,Session:f.default,Driver:T.default,Connection:i.default,Releasable:lu.Releasable,types:Dr,driver:S,json:O,auth:j.default,bookmarkManager:fu.bookmarkManager,routing:du.routing,resultTransformers:_.default,notificationCategory:su.notificationCategory,notificationClassification:su.notificationClassification,notificationSeverityLevel:su.notificationSeverityLevel,notificationFilterDisabledCategory:cu.notificationFilterDisabledCategory,notificationFilterDisabledClassification:cu.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:cu.notificationFilterMinimumSeverityLevel,clientCertificateProviders:hu.clientCertificateProviders,resolveCertificateProvider:hu.resolveCertificateProvider},y.default=o;Tr={},qr={},P={},Q={},b={};Object.defineProperty(b,"__esModule",{value:!0}),b.isFunction=void 0,b.isFunction=function(e){return"function"==typeof e};h={},Ar={},w={};Object.defineProperty(w,"__esModule",{value:!0}),w.createErrorClass=void 0,w.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(Ar,"__esModule",{value:!0}),Ar.UnsubscriptionError=void 0;u=w,Ar.UnsubscriptionError=u.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}}),X={};Object.defineProperty(X,"__esModule",{value:!0}),X.arrRemove=void 0,X.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var _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=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},gu=(Object.defineProperty(h,"__esModule",{value:!0}),h.isSubscription=h.EMPTY_SUBSCRIPTION=h.Subscription=void 0,b),Ou=Ar,wu=X,Eu=(Pu.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=_u(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(gu.isFunction(u))try{u()}catch(e){r=e instanceof Ou.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=_u(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{Su(l)}catch(e){r=null!=r?r:[],e instanceof Ou.UnsubscriptionError?r=mu(mu([],vu(r)),vu(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 Ou.UnsubscriptionError(r)}},Pu.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Su(e);else{if(e instanceof Pu){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Pu.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Pu.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Pu.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&wu.arrRemove(t,e)},Pu.prototype.remove=function(e){var t=this._finalizers;t&&wu.arrRemove(t,e),e instanceof Pu&&e._removeParent(this)},Pu.EMPTY=((g=new Pu).closed=!0,g),Pu);function Pu(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function Su(e){gu.isFunction(e)?e():e.unsubscribe()}h.Subscription=Eu,h.EMPTY_SUBSCRIPTION=Eu.EMPTY,h.isSubscription=function(e){return e instanceof Eu||e&&"closed"in e&&gu.isFunction(e.remove)&&gu.isFunction(e.add)&&gu.isFunction(e.unsubscribe)};var Tu,ju,Cu,E={},p=(Object.defineProperty(E,"__esModule",{value:!0}),E.config=void 0,E.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),m={},Iu=(Tu=m,ju=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Cu=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.timeoutProvider=void 0,Tu.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Tu.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,Cu([e,t],ju(r))):setTimeout.apply(void 0,Cu([e,t],ju(r)))},clearTimeout:function(e){var t=Tu.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(p,"__esModule",{value:!0}),p.reportUnhandledError=void 0,E),Ru=m;p.reportUnhandledError=function(t){Ru.timeoutProvider.setTimeout(function(){var e=Iu.config.onUnhandledError;if(!e)throw t;e(t)})};v={};Object.defineProperty(v,"__esModule",{value:!0}),v.noop=void 0,v.noop=function(){};t={};function Au(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=Au("C",void 0,void 0),t.errorNotification=function(e){return Au("E",void 0,e)},t.nextNotification=function(e){return Au("N",e,void 0)},t.createNotification=Au;var ku,Mu,Nu,xu,Du,Uu,Lu,Fu,Bu,Wu,qu,zu,Vu,Hu,n={},Gu=(Object.defineProperty(n,"__esModule",{value:!0}),n.captureError=n.errorContext=void 0,E),Yu=null;function Ku(e){var t=Nu.call(this)||this;return t.isStopped=!1,e?(t.destination=e,Du.isSubscription(e)&&e.add(t)):t.destination=ku.EMPTY_OBSERVER,t}function Zu(e,t){return qu.call(e,t)}function Xu(e){this.partialObserver=e}function Qu(e,t,r){var n=Vu.call(this)||this;return r=xu.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&Uu.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&Zu(e.next,t),error:e.error&&Zu(e.error,t),complete:e.complete&&Zu(e.complete,t)}):e,n.destination=new zu(r),n}function Ju(e){Uu.config.useDeprecatedSynchronousErrorHandling?Wu.captureError(e):Lu.reportUnhandledError(e)}function $u(e,t){var r=Uu.config.onStoppedNotification;r&&Bu.timeoutProvider.setTimeout(function(){return r(e,t)})}n.errorContext=function(e){if(Gu.config.useDeprecatedSynchronousErrorHandling){var t=!Yu;if(t&&(Yu={errorThrown:!1,error:null}),e(),t){var t=Yu,r=t.errorThrown,t=t.error;if(Yu=null,r)throw t}}else e()},n.captureError=function(e){Gu.config.useDeprecatedSynchronousErrorHandling&&Yu&&(Yu.errorThrown=!0,Yu.error=e)},ku=Q,l=r&&r.__extends||(Mu=function(e,t){return(Mu=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}Mu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(ku,"__esModule",{value:!0}),ku.EMPTY_OBSERVER=ku.SafeSubscriber=ku.Subscriber=void 0,xu=b,Uu=E,Lu=p,Qe=v,Fu=t,Bu=m,Wu=n,Nu=(Du=h).Subscription,l(Ku,Nu),Ku.create=function(e,t,r){return new Hu(e,t,r)},Ku.prototype.next=function(e){this.isStopped?$u(Fu.nextNotification(e),this):this._next(e)},Ku.prototype.error=function(e){this.isStopped?$u(Fu.errorNotification(e),this):(this.isStopped=!0,this._error(e))},Ku.prototype.complete=function(){this.isStopped?$u(Fu.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},Ku.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,Nu.prototype.unsubscribe.call(this),this.destination=null)},Ku.prototype._next=function(e){this.destination.next(e)},Ku.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},Ku.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},s=Ku,ku.Subscriber=s,qu=Function.prototype.bind,Xu.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Ju(e)}},Xu.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Ju(e)}else Ju(e)},Xu.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Ju(e)}},zu=Xu,l(Qu,Vu=s),Hu=Qu,ku.SafeSubscriber=Hu,ku.EMPTY_OBSERVER={closed:!0,next:Qe.noop,error:function(e){throw e},complete:Qe.noop};f={},Object.defineProperty(f,"__esModule",{value:!0}),f.observable=void 0,f.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",T={},i={};Object.defineProperty(i,"__esModule",{value:!0}),i.identity=void 0,i.identity=function(e){return e},Object.defineProperty(T,"__esModule",{value:!0}),T.pipeFromArray=T.pipe=void 0;var ea=i;function ta(t){return 0===t.length?ea.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}T.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ta(e)},T.pipeFromArray=ta,Object.defineProperty(P,"__esModule",{value:!0}),P.Observable=void 0;var ra=Q,na=h,Dr=f,oa=T,ia=E,ua=b,aa=n;function sa(e){e&&(this._subscribe=e)}function ca(e){return null!=(e=null!=e?e:ia.config.Promise)?e:Promise}sa.prototype.lift=function(e){var t=new sa;return t.source=this,t.operator=e,t},sa.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof ra.Subscriber||function(e){return e&&ua.isFunction(e.next)&&ua.isFunction(e.error)&&ua.isFunction(e.complete)}(n)&&na.isSubscription(n)?e:new ra.SafeSubscriber(e,t,r);return aa.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},sa.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},sa.prototype.forEach=function(n,e){var o=this;return new(e=ca(e))(function(e,t){var r=new ra.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},sa.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},sa.prototype[Dr.observable]=function(){return this},sa.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return oa.pipeFromArray(e)(this)},sa.prototype.toPromise=function(e){var n=this;return new(e=ca(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},sa.create=function(e){return new sa(e)},P.Observable=sa;var S={},O={},j={},la=(Object.defineProperty(j,"__esModule",{value:!0}),j.operate=j.hasLift=void 0,b);function fa(e){return la.isFunction(null==e?void 0:e.lift)}j.hasLift=fa,j.operate=function(t){return function(e){if(fa(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 pa,_={},y=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)}),o=(Object.defineProperty(_,"__esModule",{value:!0}),_.OperatorSubscriber=_.createOperatorSubscriber=void 0,Q);_.createOperatorSubscriber=function(e,t,r,n,o){return new ha(e,t,r,n,o)};y(ba,da=o.Subscriber),ba.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,da.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var da,ha=ba;function ba(t,r,e,n,o,i){var u=da.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:da.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:da.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:da.prototype._complete,u}_.OperatorSubscriber=ha,Object.defineProperty(O,"__esModule",{value:!0}),O.refCount=void 0;var ya=j,_a=_;O.refCount=function(){return ya.operate(function(r,n){var o=null,e=(r._refCount++,_a.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 va,u=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(S,"__esModule",{value:!0}),S.ConnectableObservable=void 0;var ma,ga=h,Oa=O,wa=_,Ea=j,g=(ma=P.Observable,u(Pa,ma),Pa.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Pa.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Pa.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Pa.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new ga.Subscription,t=this.getSubject(),e.add(this.source.subscribe(wa.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=ga.Subscription.EMPTY)),e},Pa.prototype.refCount=function(){return Oa.refCount()(this)},Pa);function Pa(e,t){var r=ma.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,Ea.hasLift(e)&&(r.lift=e.lift),r}S.ConnectableObservable=g;var Sa,Ta,ja,Ca,Ia,t={},m={},l=(Sa=m,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.performanceTimestampProvider=void 0,Sa.performanceTimestampProvider={now:function(){return(Sa.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),Ra=(Ta=l,ja=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},Ca=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(Ta,"__esModule",{value:!0}),Ta.animationFrameProvider=void 0,Ia=h,Ta.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=Ta.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new Ia.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=Ta.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Ca([],ja(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ta.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,Ca([],ja(e)))},delegate:void 0},Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0,P),Aa=m,ka=l;function Ma(a){return new Ra.Observable(function(r){var n=a||Aa.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=ka.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&ka.animationFrameProvider.cancelAnimationFrame(i)}})}t.animationFrames=function(e){return e?Ma(e):Da};var Na,xa,Da=Ma(),s={},Qe={},Dr=(Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ObjectUnsubscribedError=void 0,w),y=(Qe.ObjectUnsubscribedError=Dr.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(Na=function(e,t){return(Na=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}Na(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Ua=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.")},La=(Object.defineProperty(s,"__esModule",{value:!0}),s.AnonymousSubject=s.Subject=void 0,P),Fa=h,Ba=Qe,Wa=X,qa=n,o=(xa=La.Observable,y(za,xa),za.prototype.lift=function(e){var t=new Ha(this,this);return t.operator=e,t},za.prototype._throwIfClosed=function(){if(this.closed)throw new Ba.ObjectUnsubscribedError},za.prototype.next=function(o){var i=this;qa.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=Ua(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}}}})},za.prototype.error=function(t){var r=this;qa.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)}})},za.prototype.complete=function(){var t=this;qa.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},za.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(za.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),za.prototype._trySubscribe=function(e){return this._throwIfClosed(),xa.prototype._trySubscribe.call(this,e)},za.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},za.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?Fa.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new Fa.Subscription(function(){t.currentObservers=null,Wa.arrRemove(o,e)}))},za.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},za.prototype.asObservable=function(){var e=new La.Observable;return e.source=this,e},za.create=function(e,t){return new Ha(e,t)},za);function za(){var e=xa.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}s.Subject=o;y(Ga,Va=o),Ga.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},Ga.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},Ga.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},Ga.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:Fa.EMPTY_SUBSCRIPTION};var Va,Ha=Ga;function Ga(e,t){var r=Va.call(this)||this;return r.destination=e,r.source=t,r}s.AnonymousSubject=Ha;var Ya,u={},g=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(u,"__esModule",{value:!0}),u.BehaviorSubject=void 0;Ka=s.Subject,g(Za,Ka),Object.defineProperty(Za.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),Za.prototype._subscribe=function(e){var t=Ka.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},Za.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},Za.prototype.next=function(e){Ka.prototype.next.call(this,this._value=e)};var Ka,m=Za;function Za(e){var t=Ka.call(this)||this;return t._value=e,t}u.BehaviorSubject=m;var Xa,Qa,Dr={},n={},y=(Xa=n,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.dateTimestampProvider=void 0,Xa.dateTimestampProvider={now:function(){return(Xa.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(Qa=function(e,t){return(Qa=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}Qa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.ReplaySubject=void 0;var Ja,$a=n,o=(Ja=s.Subject,y(es,Ja),es.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(),Ja.prototype.next.call(this,e)},es.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},es.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)}},es);function es(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=$a.dateTimestampProvider);var n=Ja.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}Dr.ReplaySubject=o;var ts,g={},m=r&&r.__extends||(ts=function(e,t){return(ts=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}ts(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(g,"__esModule",{value:!0}),g.AsyncSubject=void 0;rs=s.Subject,m(ns,rs),ns.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())},ns.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},ns.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&rs.prototype.next.call(this,t),rs.prototype.complete.call(this))};var rs,y=ns;function ns(){var e=null!==rs&&rs.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}g.AsyncSubject=y;var os,o={},m={},y={},is={},us=r&&r.__extends||(os=function(e,t){return(os=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}os(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(is,"__esModule",{value:!0}),is.Action=void 0;as=h.Subscription,us(ss,as),ss.prototype.schedule=function(e,t){return this};var as,us=ss;function ss(e,t){return as.call(this)||this}is.Action=us;var cs,ls,fs,ps,us={},ds=(cs=us,ls=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},fs=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(cs,"__esModule",{value:!0}),cs.intervalProvider=void 0,cs.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=cs.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,fs([e,t],ls(r))):setInterval.apply(void 0,fs([e,t],ls(r)))},clearInterval:function(e){var t=cs.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(ps=function(e,t){return(ps=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}ps(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(y,"__esModule",{value:!0}),y.AsyncAction=void 0;var hs,bs=us,ys=X,us=(hs=is.Action,ds(_s,hs),_s.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},_s.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),bs.intervalProvider.setInterval(e.flush.bind(e,this),r)},_s.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&bs.intervalProvider.clearInterval(t)},_s.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))},_s.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},_s.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,ys.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,hs.prototype.unsubscribe.call(this))},_s);function _s(e,t){var r=hs.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}y.AsyncAction=us;var vs,ms,gs,Os,ws,Es,is={},ds={},Ps=(Object.defineProperty(ds,"__esModule",{value:!0}),ds.TestTools=ds.Immediate=void 0,1),Ss={};function Ts(e){return e in Ss&&(delete Ss[e],!0)}ds.Immediate={setImmediate:function(e){var t=Ps++;return Ss[t]=!0,(vs=vs||Promise.resolve()).then(function(){return Ts(t)&&e()}),t},clearImmediate:function(e){Ts(e)}},ds.TestTools={pending:function(){return Object.keys(Ss).length}},ms=is,gs=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},Os=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(ms,"__esModule",{value:!0}),ms.immediateProvider=void 0,ws=ds.Immediate.setImmediate,Es=ds.Immediate.clearImmediate,ms.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ms.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||ws).apply(void 0,Os([],gs(e)))},clearImmediate:function(e){var t=ms.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||Es)(e)},delegate:void 0};var js,us=r&&r.__extends||(js=function(e,t){return(js=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}js(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(m,"__esModule",{value:!0}),m.AsapAction=void 0;var Cs,Is=is,ds=(Cs=y.AsyncAction,us(Rs,Cs),Rs.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Cs.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Is.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},Rs.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Cs.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Is.immediateProvider.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))},Rs);function Rs(e,t){var r=Cs.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}m.AsapAction=ds;var is={},us={},ds={},As=(Object.defineProperty(ds,"__esModule",{value:!0}),ds.Scheduler=void 0,n);function ks(e,t){void 0===t&&(t=ks.now),this.schedulerActionCtor=e,this.now=t}ks.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},ks.now=As.dateTimestampProvider.now,ds.Scheduler=ks;var Ms,Ns,As=r&&r.__extends||(Ms=function(e,t){return(Ms=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}Ms(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),xs=(Object.defineProperty(us,"__esModule",{value:!0}),us.AsyncScheduler=void 0,ds),As=(Ns=xs.Scheduler,As(Ds,Ns),Ds.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}}},Ds);function Ds(e,t){void 0===t&&(t=xs.Scheduler.now);e=Ns.call(this,e,t)||this;return e.actions=[],e._active=!1,e}us.AsyncScheduler=As;var Us,As=r&&r.__extends||(Us=function(e,t){return(Us=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Us(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(is,"__esModule",{value:!0}),is.AsapScheduler=void 0;Ls=us.AsyncScheduler,As(Fs,Ls),Fs.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 Ls,As=Fs;function Fs(){return null!==Ls&&Ls.apply(this,arguments)||this}is.AsapScheduler=As,As=o,Object.defineProperty(As,"__esModule",{value:!0}),As.asap=As.asapScheduler=void 0,As.asapScheduler=new is.AsapScheduler(m.AsapAction),As.asap=As.asapScheduler;var Bs,is={},As=(m=is,Object.defineProperty(m,"__esModule",{value:!0}),m.async=m.asyncScheduler=void 0,m.asyncScheduler=new us.AsyncScheduler(y.AsyncAction),m.async=m.asyncScheduler,{}),m={},Ws=r&&r.__extends||(Bs=function(e,t){return(Bs=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}Bs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(m,"__esModule",{value:!0}),m.QueueAction=void 0;qs=y.AsyncAction,Ws(zs,qs),zs.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?qs.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},zs.prototype.execute=function(e,t){return 0<t||this.closed?qs.prototype.execute.call(this,e,t):this._execute(e,t)},zs.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?qs.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var qs,Ws=zs;function zs(e,t){var r=qs.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}m.QueueAction=Ws;var Vs,Ws={},Hs=r&&r.__extends||(Vs=function(e,t){return(Vs=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}Vs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.QueueScheduler=void 0;Gs=us.AsyncScheduler,Hs(Ys,Gs);var Gs,Hs=Ys;function Ys(){return null!==Gs&&Gs.apply(this,arguments)||this}Ws.QueueScheduler=Hs,Hs=As,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.queue=Hs.queueScheduler=void 0,Hs.queueScheduler=new Ws.QueueScheduler(m.QueueAction),Hs.queue=Hs.queueScheduler;var Ks,Ws={},m={},Hs=r&&r.__extends||(Ks=function(e,t){return(Ks=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ks(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(m,"__esModule",{value:!0}),m.AnimationFrameAction=void 0;var Zs,Xs=l,l=(Zs=y.AsyncAction,Hs(Qs,Zs),Qs.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Zs.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Xs.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},Qs.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Zs.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Xs.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},Qs);function Qs(e,t){var r=Zs.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}m.AnimationFrameAction=l;var Js,Hs={},l=r&&r.__extends||(Js=function(e,t){return(Js=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Js(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.AnimationFrameScheduler=void 0;$s=us.AsyncScheduler,l(ec,$s),ec.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 $s,l=ec;function ec(){return null!==$s&&$s.apply(this,arguments)||this}Hs.AnimationFrameScheduler=l,l=Ws,Object.defineProperty(l,"__esModule",{value:!0}),l.animationFrame=l.animationFrameScheduler=void 0,l.animationFrameScheduler=new Hs.AnimationFrameScheduler(m.AnimationFrameAction),l.animationFrame=l.animationFrameScheduler;var tc,rc,Hs={},m=r&&r.__extends||(tc=function(e,t){return(tc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}tc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),l=(Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.VirtualAction=Hs.VirtualTimeScheduler=void 0,y),nc=h,y=(rc=us.AsyncScheduler,m(oc,rc),oc.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}},oc.frameTimeFactor=10,oc);function oc(e,t){void 0===t&&(t=1/0);var r=rc.call(this,e=void 0===e?uc:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}Hs.VirtualTimeScheduler=y;ic=l.AsyncAction,m(ac,ic),ac.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return ic.prototype.schedule.call(this,e,t);this.active=!1;var r=new ac(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return nc.Subscription.EMPTY},ac.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(ac.sortActions),1},ac.prototype.recycleAsyncId=function(e,t,r){},ac.prototype._execute=function(e,t){if(!0===this.active)return ic.prototype._execute.call(this,e,t)},ac.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 ic,uc=ac;function ac(e,t,r){void 0===r&&(r=e.index+=1);var n=ic.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}Hs.VirtualAction=uc;var sc,cc,us={},y={},l=(sc=y,Object.defineProperty(sc,"__esModule",{value:!0}),sc.empty=sc.EMPTY=void 0,cc=P,sc.EMPTY=new cc.Observable(function(e){return e.complete()}),sc.empty=function(e){return e?(t=e,new cc.Observable(function(e){return t.schedule(function(){return e.complete()})})):sc.EMPTY;var t},{}),m={},lc={},fc=(Object.defineProperty(lc,"__esModule",{value:!0}),lc.isScheduler=void 0,b);lc.isScheduler=function(e){return e&&fc.isFunction(e.schedule)},Object.defineProperty(m,"__esModule",{value:!0}),m.popNumber=m.popScheduler=m.popResultSelector=void 0;var pc=b,dc=lc;function hc(e){return e[e.length-1]}m.popResultSelector=function(e){return pc.isFunction(hc(e))?e.pop():void 0},m.popScheduler=function(e){return dc.isScheduler(hc(e))?e.pop():void 0},m.popNumber=function(e,t){return"number"==typeof hc(e)?e.pop():t};var bc={},yc={},_c={},C={},vc={},mc=(Object.defineProperty(vc,"__esModule",{value:!0}),vc.isArrayLike=void 0,vc.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),gc=(Object.defineProperty(mc,"__esModule",{value:!0}),mc.isPromise=void 0,b);mc.isPromise=function(e){return gc.isFunction(null==e?void 0:e.then)};var Oc={},wc=(Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.isInteropObservable=void 0,f),Ec=b;Oc.isInteropObservable=function(e){return Ec.isFunction(e[wc.observable])};var Pc={},Sc=(Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.isAsyncIterable=void 0,b);Pc.isAsyncIterable=function(e){return Symbol.asyncIterator&&Sc.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Tc={};Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.createInvalidObservableTypeError=void 0,Tc.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 jc={},Cc={};function Ic(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.iterator=Cc.getSymbolIterator=void 0,Cc.getSymbolIterator=Ic,Cc.iterator=Ic(),Object.defineProperty(jc,"__esModule",{value:!0}),jc.isIterable=void 0;var Rc=Cc,Ac=b;jc.isIterable=function(e){return Ac.isFunction(null==e?void 0:e[Rc.iterator])};var kc={},Mc=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}}}},Nc=r&&r.__await||function(e){return this instanceof Nc?(this.v=e,this):new Nc(e)},xc=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 Nc?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])}},Dc=(Object.defineProperty(kc,"__esModule",{value:!0}),kc.isReadableStreamLike=kc.readableStreamLikeToAsyncGenerator=void 0,b);kc.readableStreamLikeToAsyncGenerator=function(o){return xc(this,arguments,function(){var t,r,n;return Mc(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,Nc(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,Nc(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,Nc(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]}})})},kc.isReadableStreamLike=function(e){return Dc.isFunction(null==e?void 0:e.getReader)};var Uc=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())})},Lc=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}}}},Fc=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 Bc?Bc(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)})}}},Bc=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.")},Wc=(Object.defineProperty(C,"__esModule",{value:!0}),C.fromReadableStreamLike=C.fromAsyncIterable=C.fromIterable=C.fromPromise=C.fromArrayLike=C.fromInteropObservable=C.innerFrom=void 0,vc),qc=mc,zc=P,Vc=Oc,Hc=Pc,Gc=Tc,Yc=jc,Kc=kc,Zc=b,Xc=p,Qc=f;function Jc(r){return new zc.Observable(function(e){var t=r[Qc.observable]();if(Zc.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function $c(r){return new zc.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function el(e){return new zc.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Xc.reportUnhandledError)})}function tl(u){return new zc.Observable(function(e){var t,r;try{for(var n=Bc(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 rl(e){return new zc.Observable(function(t){!function(r,n){var o,i,u,a;return Uc(this,void 0,void 0,function(){var t;return Lc(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=Fc(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 nl(e){return rl(Kc.readableStreamLikeToAsyncGenerator(e))}C.innerFrom=function(e){if(e instanceof zc.Observable)return e;if(null!=e){if(Vc.isInteropObservable(e))return Jc(e);if(Wc.isArrayLike(e))return $c(e);if(qc.isPromise(e))return el(e);if(Hc.isAsyncIterable(e))return rl(e);if(Yc.isIterable(e))return tl(e);if(Kc.isReadableStreamLike(e))return nl(e)}throw Gc.createInvalidObservableTypeError(e)},C.fromInteropObservable=Jc,C.fromArrayLike=$c,C.fromPromise=el,C.fromIterable=tl,C.fromAsyncIterable=rl,C.fromReadableStreamLike=nl;var p={},ol={};Object.defineProperty(ol,"__esModule",{value:!0}),ol.executeSchedule=void 0,ol.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(p,"__esModule",{value:!0}),p.observeOn=void 0;var il=ol,ul=j,al=_;p.observeOn=function(r,n){return void 0===n&&(n=0),ul.operate(function(e,t){e.subscribe(al.createOperatorSubscriber(t,function(e){return il.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return il.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return il.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var sl={},cl=(Object.defineProperty(sl,"__esModule",{value:!0}),sl.subscribeOn=void 0,j);sl.subscribeOn=function(r,n){return void 0===n&&(n=0),cl.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(_c,"__esModule",{value:!0}),_c.scheduleObservable=void 0;var ll=C,fl=p,pl=sl;_c.scheduleObservable=function(e,t){return ll.innerFrom(e).pipe(pl.subscribeOn(t),fl.observeOn(t))};var dl={},hl=(Object.defineProperty(dl,"__esModule",{value:!0}),dl.schedulePromise=void 0,C),bl=p,yl=sl;dl.schedulePromise=function(e,t){return hl.innerFrom(e).pipe(yl.subscribeOn(t),bl.observeOn(t))};var _l={},vl=(Object.defineProperty(_l,"__esModule",{value:!0}),_l.scheduleArray=void 0,P);_l.scheduleArray=function(r,n){return new vl.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var ml={},gl=(Object.defineProperty(ml,"__esModule",{value:!0}),ml.scheduleIterable=void 0,P),Ol=Cc,wl=b,El=ol;ml.scheduleIterable=function(e,t){return new gl.Observable(function(n){var o;return El.executeSchedule(n,t,function(){o=e[Ol.iterator](),El.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 wl.isFunction(null==o?void 0:o.return)&&o.return()}})};var Cc={},Pl=(Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.scheduleAsyncIterable=void 0,P),Sl=ol;Cc.scheduleAsyncIterable=function(r,n){if(r)return new Pl.Observable(function(t){Sl.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();Sl.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 Tl={},jl=(Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.scheduleReadableStreamLike=void 0,Cc),Cl=kc;Tl.scheduleReadableStreamLike=function(e,t){return jl.scheduleAsyncIterable(Cl.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(yc,"__esModule",{value:!0}),yc.scheduled=void 0;var Il=_c,Rl=dl,Al=_l,kl=ml,Ml=Cc,Nl=Oc,xl=mc,Dl=vc,Ul=jc,Ll=Pc,Fl=Tc,Bl=kc,Wl=Tl;yc.scheduled=function(e,t){if(null!=e){if(Nl.isInteropObservable(e))return Il.scheduleObservable(e,t);if(Dl.isArrayLike(e))return Al.scheduleArray(e,t);if(xl.isPromise(e))return Rl.schedulePromise(e,t);if(Ll.isAsyncIterable(e))return Ml.scheduleAsyncIterable(e,t);if(Ul.isIterable(e))return kl.scheduleIterable(e,t);if(Bl.isReadableStreamLike(e))return Wl.scheduleReadableStreamLike(e,t)}throw Fl.createInvalidObservableTypeError(e)},Object.defineProperty(bc,"__esModule",{value:!0}),bc.from=void 0;var ql=yc,zl=C;bc.from=function(e,t){return t?ql.scheduled(e,t):zl.innerFrom(e)},Object.defineProperty(l,"__esModule",{value:!0}),l.of=void 0;var Vl=m,Hl=bc;l.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Vl.popScheduler(e);return Hl.from(e,r)};var Gl,Yl,Kl,Zl,_c={},Xl=(Object.defineProperty(_c,"__esModule",{value:!0}),_c.throwError=void 0,P),Ql=b;function Jl(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function $l(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)}_c.throwError=function(e,t){function r(e){return e.error(n())}var n=Ql.isFunction(e)?e:function(){return e};return new Xl.Observable(t?function(e){return t.schedule(r,0,e)}:r)},dl=us,Object.defineProperty(dl,"__esModule",{value:!0}),dl.observeNotification=dl.Notification=dl.NotificationKind=void 0,Gl=y,Yl=l,Kl=_c,Zl=b,(_l=dl.NotificationKind||(dl.NotificationKind={})).NEXT="N",_l.ERROR="E",_l.COMPLETE="C",Jl.prototype.observe=function(e){return $l(this,e)},Jl.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()},Jl.prototype.accept=function(e,t,r){var n;return Zl.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},Jl.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?Yl.of(t):"E"===e?Kl.throwError(function(){return r}):"C"===e?Gl.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},Jl.createNext=function(e){return new Jl("N",e)},Jl.createError=function(e){return new Jl("E",void 0,e)},Jl.createComplete=function(){return Jl.completeNotification},Jl.completeNotification=new Jl("C"),_l=Jl,dl.Notification=_l,dl.observeNotification=$l;var Cc={},ef=(Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.isObservable=void 0,P),tf=b;Cc.isObservable=function(e){return!!e&&(e instanceof ef.Observable||tf.isFunction(e.lift)&&tf.isFunction(e.subscribe))};var Oc={},mc={},jc=(Object.defineProperty(mc,"__esModule",{value:!0}),mc.EmptyError=void 0,w),rf=(mc.EmptyError=jc.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.lastValueFrom=void 0,mc);Oc.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 rf.EmptyError)}})})};var Pc={},nf=(Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.firstValueFrom=void 0,mc),of=Q;Pc.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new of.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new nf.EmptyError)}});n.subscribe(r)})};var uf,af,sf,cf,lf,ff,pf,Tc={},kc=(Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.ArgumentOutOfRangeError=void 0,w),Tl=(Tc.ArgumentOutOfRangeError=kc.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),_l=(Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.NotFoundError=void 0,w),dl=(Tl.NotFoundError=_l.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),jc=(Object.defineProperty(dl,"__esModule",{value:!0}),dl.SequenceError=void 0,w),kc=(dl.SequenceError=jc.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),_l={};function df(e){throw new uf.TimeoutError(e)}Object.defineProperty(_l,"__esModule",{value:!0}),_l.isValidDate=void 0,_l.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},uf=kc,Object.defineProperty(uf,"__esModule",{value:!0}),uf.timeout=uf.TimeoutError=void 0,af=is,sf=_l,cf=j,lf=C,ff=_,pf=ol,uf.TimeoutError=w.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),uf.timeout=function(e,t){var a=(e=sf.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?df:r,l=void 0===(r=e.scheduler)?null!=t?t:af.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return cf.operate(function(e,t){function r(e){n=pf.executeSchedule(t,l,function(){try{u.unsubscribe(),lf.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(ff.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 jc={},w={},hf={},bf={},yf=(Object.defineProperty(bf,"__esModule",{value:!0}),bf.map=void 0,j),_f=_;bf.map=function(n,o){return yf.operate(function(e,t){var r=0;e.subscribe(_f.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var vf=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},mf=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},gf=(Object.defineProperty(hf,"__esModule",{value:!0}),hf.mapOneOrManyArgs=void 0,bf),Of=Array.isArray;hf.mapOneOrManyArgs=function(r){return gf.map(function(e){return t=r,Of(e=e)?t.apply(void 0,mf([],vf(e))):t(e);var t})};var wf=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},Ef=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},Pf=(Object.defineProperty(w,"__esModule",{value:!0}),w.bindCallbackInternals=void 0,lc),Sf=P,Tf=sl,jf=hf,Cf=p,If=g;w.bindCallbackInternals=function r(a,s,n,o){if(n){if(!Pf.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(jf.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(Tf.subscribeOn(o),Cf.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new If.AsyncSubject,u=!0;return new Sf.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,Ef(Ef([],wf(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(jc,"__esModule",{value:!0}),jc.bindCallback=void 0;var Rf=w;jc.bindCallback=function(e,t,r){return Rf.bindCallbackInternals(!1,e,t,r)};var Af={},kf=(Object.defineProperty(Af,"__esModule",{value:!0}),Af.bindNodeCallback=void 0,w);Af.bindNodeCallback=function(e,t,r){return kf.bindCallbackInternals(!0,e,t,r)};var w={},Mf={},Nf=(Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.argsArgArrayOrObject=void 0,Array.isArray),xf=Object.getPrototypeOf,Df=Object.prototype,Uf=Object.keys;Mf.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(Nf(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&xf(r)===Df)return{args:(r=Uf(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var Lf={};Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.createObject=void 0,Lf.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(w,"__esModule",{value:!0}),w.combineLatestInit=w.combineLatest=void 0;var Ff=P,Bf=Mf,Wf=bc,qf=i,zf=hf,Vf=m,Hf=Lf,Gf=_,Yf=ol;function Kf(a,s,c){return void 0===c&&(c=qf.identity),function(u){Zf(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){Zf(s,function(){var e=Wf.from(a[r],s),t=!1;e.subscribe(Gf.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 Zf(e,t,r){e?Yf.executeSchedule(r,e,t):t()}w.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Vf.popScheduler(e),n=Vf.popResultSelector(e),o=Bf.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?Wf.from([],r):(o=new Ff.Observable(Kf(i,r,u?function(e){return Hf.createObject(u,e)}:qf.identity)),n?o.pipe(zf.mapOneOrManyArgs(n)):o)},w.combineLatestInit=Kf;var Xf={},Qf={},Jf={},$f={},ep={},tp=(Object.defineProperty(ep,"__esModule",{value:!0}),ep.mergeInternals=void 0,C),rp=ol,np=_;ep.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;tp.innerFrom(n(e,l++)).subscribe(np.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?rp.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(np.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty($f,"__esModule",{value:!0}),$f.mergeMap=void 0;var op=bf,ip=C,up=j,ap=ep,sp=b;$f.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),sp.isFunction(i)?e(function(r,n){return op.map(function(e,t){return i(r,e,n,t)})(ip.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),up.operate(function(e,t){return ap.mergeInternals(e,t,o,r)}))},Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.mergeAll=void 0;var cp=$f,lp=i;Jf.mergeAll=function(e){return cp.mergeMap(lp.identity,e=void 0===e?1/0:e)},Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.concatAll=void 0;var fp=Jf;Qf.concatAll=function(){return fp.mergeAll(1)},Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.concat=void 0;var pp=Qf,dp=m,hp=bc;Xf.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return pp.concatAll()(hp.from(e,dp.popScheduler(e)))};var bp={},yp={},_p=(Object.defineProperty(yp,"__esModule",{value:!0}),yp.defer=void 0,P),vp=C;yp.defer=function(t){return new _p.Observable(function(e){vp.innerFrom(t()).subscribe(e)})},Object.defineProperty(bp,"__esModule",{value:!0}),bp.connectable=void 0;var mp=s,gp=P,Op=yp,wp={connector:function(){return new mp.Subject},resetOnDisconnect:!0};bp.connectable=function(e,t){var r=null,n=(t=void 0===t?wp:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new gp.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=Op.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var Ep={},Pp=(Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.forkJoin=void 0,P),Sp=Mf,Tp=C,jp=m,Cp=_,Ip=hf,Rp=Lf;Ep.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=jp.popResultSelector(e),u=(n=Sp.argsArgArrayOrObject(e)).args,a=n.keys,n=new Pp.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;Tp.innerFrom(u[t]).subscribe(Cp.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?Rp.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Ip.mapOneOrManyArgs(r)):n};var Mf={},Ap=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},kp=(Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.fromEvent=void 0,C),Mp=P,Np=$f,xp=vc,Dp=b,Up=hf,Lp=["addListener","removeListener"],Fp=["addEventListener","removeEventListener"],Bp=["on","off"];function Wp(r,n){return function(t){return function(e){return r[t](n,e)}}}Mf.fromEvent=function t(r,n,o,e){if(Dp.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(Up.mapOneOrManyArgs(e));var e=Ap((e=r,Dp.isFunction(e.addEventListener)&&Dp.isFunction(e.removeEventListener)?Fp.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,Dp.isFunction(e.addListener)&&Dp.isFunction(e.removeListener)?Lp.map(Wp(r,n)):(e=r,Dp.isFunction(e.on)&&Dp.isFunction(e.off)?Bp.map(Wp(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&xp.isArrayLike(r))return Np.mergeMap(function(e){return t(e,n,o)})(kp.innerFrom(r));if(i)return new Mp.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 Lf={},qp=(Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.fromEventPattern=void 0,P),zp=b,Vp=hf;Lf.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(Vp.mapOneOrManyArgs(t)):new qp.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1===e.length?e[0]:e)}var t=n(e);return zp.isFunction(o)?function(){return o(e,t)}:void 0})};var vc={},Hp=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}}}},Gp=(Object.defineProperty(vc,"__esModule",{value:!0}),vc.generate=void 0,i),Yp=lc,Kp=yp,Zp=ml;vc.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return Hp(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?Gp.identity:i,o=e.scheduler):(a=e,!t||Yp.isScheduler(t)?(u=Gp.identity,o=t):u=t),Kp.defer(o?function(){return Zp.scheduleIterable(s(),o)}:s)};var ml={},Xp=(Object.defineProperty(ml,"__esModule",{value:!0}),ml.iif=void 0,yp);ml.iif=function(e,t,r){return Xp.defer(function(){return e()?t:r})};var Qp={},Jp={},$p=(Object.defineProperty(Jp,"__esModule",{value:!0}),Jp.timer=void 0,P),ed=is,td=lc,rd=_l;Jp.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=ed.async);var i=-1;return null!=e&&(td.isScheduler(e)?o=e:i=e),new $p.Observable(function(e){var t=rd.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(Qp,"__esModule",{value:!0}),Qp.interval=void 0;var nd=is,od=Jp;Qp.interval=function(e,t){return od.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?nd.asyncScheduler:t)};var lc={},id=(Object.defineProperty(lc,"__esModule",{value:!0}),lc.merge=void 0,Jf),ud=C,ad=y,sd=m,cd=bc;lc.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=sd.popScheduler(e),n=sd.popNumber(e,1/0),o=e;return o.length?1===o.length?ud.innerFrom(o[0]):id.mergeAll(n)(cd.from(o,r)):ad.EMPTY};var ld,fd={},pd=(ld=fd,Object.defineProperty(ld,"__esModule",{value:!0}),ld.never=ld.NEVER=void 0,ld.NEVER=new P.Observable(v.noop),ld.never=function(){return ld.NEVER},{}),dd={},hd=(Object.defineProperty(dd,"__esModule",{value:!0}),dd.argsOrArgArray=void 0,Array.isArray);dd.argsOrArgArray=function(e){return 1===e.length&&hd(e[0])?e[0]:e},Object.defineProperty(pd,"__esModule",{value:!0}),pd.onErrorResumeNext=void 0;var bd=P,yd=dd,_d=_,vd=v,md=C;pd.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=yd.argsOrArgArray(e);return new bd.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=md.innerFrom(i[n++])}catch(e){return void o()}var t=new _d.OperatorSubscriber(r,void 0,vd.noop,vd.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var gd={},Od=(Object.defineProperty(gd,"__esModule",{value:!0}),gd.pairs=void 0,bc);gd.pairs=function(e,t){return Od.from(Object.entries(e),t)};var wd={},Ed={};Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.not=void 0,Ed.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var Pd={},Sd=(Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.filter=void 0,j),Td=_;Pd.filter=function(n,o){return Sd.operate(function(e,t){var r=0;e.subscribe(Td.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(wd,"__esModule",{value:!0}),wd.partition=void 0;var jd=Ed,Cd=Pd,Id=C;wd.partition=function(e,t,r){return[Cd.filter(t,r)(Id.innerFrom(e)),Cd.filter(jd.not(t,r))(Id.innerFrom(e))]};var Rd={},Ad=(Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.raceInit=Rd.race=void 0,P),kd=C,Md=dd,Nd=_;function xd(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(kd.innerFrom(t[r]).subscribe(Nd.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)}}Rd.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=Md.argsOrArgArray(e)).length?kd.innerFrom(e[0]):new Ad.Observable(xd(e))},Rd.raceInit=xd;var Dd={},Ud=(Object.defineProperty(Dd,"__esModule",{value:!0}),Dd.range=void 0,P),Ld=y;Dd.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return Ld.EMPTY;var o=e+r;return new Ud.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 Fd={},Bd=(Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.using=void 0,P),Wd=C,qd=y;Fd.using=function(n,o){return new Bd.Observable(function(e){var t=n(),r=o(t);return(r?Wd.innerFrom(r):qd.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var zd={},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(zd,"__esModule",{value:!0}),zd.zip=void 0,P),Yd=C,Kd=dd,Zd=y,Xd=_,Qd=m;zd.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Qd.popResultSelector(e),u=Kd.argsOrArgArray(e);return u.length?new Gd.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){Yd.innerFrom(u[t]).subscribe(Xd.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,Hd([],Vd(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}}):Zd.EMPTY};var Jd={},$d=(Object.defineProperty(Jd,"__esModule",{value:!0}),{}),eh=(Object.defineProperty($d,"__esModule",{value:!0}),$d.audit=void 0,j),th=C,rh=_;$d.audit=function(s){return eh.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(rh.createOperatorSubscriber(t,function(e){o=!0,i=e,u||th.innerFrom(s(e)).subscribe(u=rh.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var nh={},oh=(Object.defineProperty(nh,"__esModule",{value:!0}),nh.auditTime=void 0,is),ih=$d,uh=Jp;nh.auditTime=function(e,t){return void 0===t&&(t=oh.asyncScheduler),ih.audit(function(){return uh.timer(e,t)})};var ah={},sh=(Object.defineProperty(ah,"__esModule",{value:!0}),ah.buffer=void 0,j),ch=v,lh=_,fh=C;ah.buffer=function(n){return sh.operate(function(e,t){var r=[];return e.subscribe(lh.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),fh.innerFrom(n).subscribe(lh.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},ch.noop)),function(){r=null}})};var ph={},dh=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.")},hh=(Object.defineProperty(ph,"__esModule",{value:!0}),ph.bufferCount=void 0,j),bh=_,yh=X;ph.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,hh.operate(function(e,f){var p=[],d=0;e.subscribe(bh.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=dh(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=dh(i),c=s.next();!c.done;c=s.next()){var l=c.value;yh.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=dh(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 _h={},vh=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.")},mh=(Object.defineProperty(_h,"__esModule",{value:!0}),_h.bufferTime=void 0,h),gh=j,Oh=_,wh=X,Eh=is,Ph=m,Sh=ol;_h.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=Ph.popScheduler(t))?e:Eh.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return gh.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),wh.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new mh.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),Sh.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?Sh.executeSchedule(r,u,o,a,!0):n=!0,o(),Oh.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=vh(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 Th={},jh=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.")},Ch=(Object.defineProperty(Th,"__esModule",{value:!0}),Th.bufferToggle=void 0,h),Ih=j,Rh=C,Ah=_,kh=v,Mh=X;Th.bufferToggle=function(t,o){return Ih.operate(function(e,n){var i=[];Rh.innerFrom(t).subscribe(Ah.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new Ch.Subscription);r.add(Rh.innerFrom(o(e)).subscribe(Ah.createOperatorSubscriber(n,function(){Mh.arrRemove(i,t),n.next(t),r.unsubscribe()},kh.noop)))},kh.noop)),e.subscribe(Ah.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=jh(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 Nh={},xh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.bufferWhen=void 0,j),Dh=v,Uh=_,Lh=C;Nh.bufferWhen=function(i){return xh.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),Lh.innerFrom(i()).subscribe(n=Uh.createOperatorSubscriber(t,o,Dh.noop))};o(),e.subscribe(Uh.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 Fh={},Bh=(Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.catchError=void 0,C),Wh=_,qh=j;Fh.catchError=function u(a){return qh.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(Wh.createOperatorSubscriber(r,void 0,void 0,function(e){n=Bh.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 zh={},Vh={},I={},Hh={},Gh={},Yh={},Kh=(Object.defineProperty(Yh,"__esModule",{value:!0}),Yh.scanInternals=void 0,_);Yh.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(Kh.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(Gh,"__esModule",{value:!0}),Gh.reduce=void 0;var Zh=Yh,Xh=j;Gh.reduce=function(e,t){return Xh.operate(Zh.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.toArray=void 0;function Qh(e,t){return e.push(t),e}var Jh=Gh,$h=j;Hh.toArray=function(){return $h.operate(function(e,t){Jh.reduce(Qh,[])(e).subscribe(t)})},Object.defineProperty(I,"__esModule",{value:!0}),I.joinAllInternals=void 0;var eb=i,tb=hf,rb=T,nb=$f,ob=Hh;I.joinAllInternals=function(t,e){return rb.pipe(ob.toArray(),nb.mergeMap(function(e){return t(e)}),e?tb.mapOneOrManyArgs(e):eb.identity)},Object.defineProperty(Vh,"__esModule",{value:!0}),Vh.combineLatestAll=void 0;var ib=w,ub=I;Vh.combineLatestAll=function(e){return ub.joinAllInternals(ib.combineLatest,e)},Object.defineProperty(zh,"__esModule",{value:!0}),zh.combineAll=void 0;zh.combineAll=Vh.combineLatestAll;var ab={},sb={},cb=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},lb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},fb=(Object.defineProperty(sb,"__esModule",{value:!0}),sb.combineLatest=void 0,w),pb=j,db=dd,hb=hf,bb=T,yb=m;function _b(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=yb.popResultSelector(r);return t?bb.pipe(_b.apply(void 0,lb([],cb(r))),hb.mapOneOrManyArgs(t)):pb.operate(function(e,t){fb.combineLatestInit(lb([e],cb(db.argsOrArgArray(r))))(t)})}sb.combineLatest=_b;var vb=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},mb=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},gb=(Object.defineProperty(ab,"__esModule",{value:!0}),ab.combineLatestWith=void 0,sb);ab.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return gb.combineLatest.apply(void 0,mb([],vb(e)))};var hf={},Ob=(Object.defineProperty(hf,"__esModule",{value:!0}),hf.concatMap=void 0,$f),wb=b;hf.concatMap=function(e,t){return wb.isFunction(t)?Ob.mergeMap(e,t,1):Ob.mergeMap(e,1)};var Eb={},Pb=(Object.defineProperty(Eb,"__esModule",{value:!0}),Eb.concatMapTo=void 0,hf),Sb=b;Eb.concatMapTo=function(e,t){return Sb.isFunction(t)?Pb.concatMap(function(){return e},t):Pb.concatMap(function(){return e})};var Tb={},jb={},Cb=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},Ib=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},Rb=(Object.defineProperty(jb,"__esModule",{value:!0}),jb.concat=void 0,j),Ab=Qf,kb=m,Mb=bc;jb.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=kb.popScheduler(r);return Rb.operate(function(e,t){Ab.concatAll()(Mb.from(Ib([e],Cb(r)),n)).subscribe(t)})};var Nb=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},Db=(Object.defineProperty(Tb,"__esModule",{value:!0}),Tb.concatWith=void 0,jb);Tb.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Db.concat.apply(void 0,xb([],Nb(e)))};var Ub={},Lb={},Fb=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.fromSubscribable=void 0,P);Lb.fromSubscribable=function(t){return new Fb.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(Ub,"__esModule",{value:!0}),Ub.connect=void 0;var Bb=s,Wb=C,qb=j,zb=Lb,Vb={connector:function(){return new Bb.Subject}};Ub.connect=function(n,e){var o=(e=void 0===e?Vb:e).connector;return qb.operate(function(e,t){var r=o();Wb.innerFrom(n(zb.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var Lb={},Hb=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.count=void 0,Gh);Lb.count=function(n){return Hb.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var Gb={},Yb=(Object.defineProperty(Gb,"__esModule",{value:!0}),Gb.debounce=void 0,j),Kb=v,Zb=_,Xb=C;Gb.debounce=function(u){return Yb.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(Zb.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=Zb.createOperatorSubscriber(t,r,Kb.noop),Xb.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var Qb={},Jb=(Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.debounceTime=void 0,is),$b=j,ey=_;Qb.debounceTime=function(a,s){return void 0===s&&(s=Jb.asyncScheduler),$b.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(ey.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 ty={},ry=(Object.defineProperty(ty,"__esModule",{value:!0}),ty.defaultIfEmpty=void 0,j),ny=_;ty.defaultIfEmpty=function(n){return ry.operate(function(e,t){var r=!1;e.subscribe(ny.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var R={},oy={},iy={},uy=(Object.defineProperty(iy,"__esModule",{value:!0}),iy.take=void 0,y),ay=j,sy=_;iy.take=function(n){return n<=0?function(){return uy.EMPTY}:ay.operate(function(e,t){var r=0;e.subscribe(sy.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var cy={},ly=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.ignoreElements=void 0,j),fy=_,py=v;cy.ignoreElements=function(){return ly.operate(function(e,t){e.subscribe(fy.createOperatorSubscriber(t,py.noop))})};var dy={},hy=(Object.defineProperty(dy,"__esModule",{value:!0}),dy.mapTo=void 0,bf);dy.mapTo=function(e){return hy.map(function(){return e})},Object.defineProperty(oy,"__esModule",{value:!0}),oy.delayWhen=void 0;var by=Xf,yy=iy,_y=cy,vy=dy,my=$f,gy=C;oy.delayWhen=function t(r,n){return n?function(e){return by.concat(n.pipe(yy.take(1),_y.ignoreElements()),e.pipe(t(r)))}:my.mergeMap(function(e,t){return gy.innerFrom(r(e,t)).pipe(yy.take(1),vy.mapTo(e))})},Object.defineProperty(R,"__esModule",{value:!0}),R.delay=void 0;var Oy=is,wy=oy,Ey=Jp;R.delay=function(e,t){var r=Ey.timer(e,t=void 0===t?Oy.asyncScheduler:t);return wy.delayWhen(function(){return r})};var Py={},Sy=(Object.defineProperty(Py,"__esModule",{value:!0}),Py.dematerialize=void 0,us),Ty=j,jy=_;Py.dematerialize=function(){return Ty.operate(function(e,t){e.subscribe(jy.createOperatorSubscriber(t,function(e){return Sy.observeNotification(e,t)}))})};var Cy={},Iy=(Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.distinct=void 0,j),Ry=_,Ay=v,ky=C;Cy.distinct=function(o,t){return Iy.operate(function(e,r){var n=new Set;e.subscribe(Ry.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&ky.innerFrom(t).subscribe(Ry.createOperatorSubscriber(r,function(){return n.clear()},Ay.noop))})};var My={},Ny=(Object.defineProperty(My,"__esModule",{value:!0}),My.distinctUntilChanged=void 0,i),xy=j,Dy=_;function Uy(e,t){return e===t}My.distinctUntilChanged=function(i,u){return void 0===u&&(u=Ny.identity),i=null!=i?i:Uy,xy.operate(function(e,r){var n,o=!0;e.subscribe(Dy.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var Ly={},Fy=(Object.defineProperty(Ly,"__esModule",{value:!0}),Ly.distinctUntilKeyChanged=void 0,My);Ly.distinctUntilKeyChanged=function(r,n){return Fy.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var By={},Wy={},qy=(Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.throwIfEmpty=void 0,mc),zy=j,Vy=_;function Hy(){return new qy.EmptyError}Wy.throwIfEmpty=function(n){return void 0===n&&(n=Hy),zy.operate(function(e,t){var r=!1;e.subscribe(Vy.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(By,"__esModule",{value:!0}),By.elementAt=void 0;var Gy=Tc,Yy=Pd,Ky=Wy,Zy=ty,Xy=iy;By.elementAt=function(r,t){if(r<0)throw new Gy.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(Yy.filter(function(e,t){return t===r}),Xy.take(1),n?Zy.defaultIfEmpty(t):Ky.throwIfEmpty(function(){return new Gy.ArgumentOutOfRangeError}))}};var Qy={},Jy=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},$y=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},e_=(Object.defineProperty(Qy,"__esModule",{value:!0}),Qy.endWith=void 0,Xf),t_=l;Qy.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e_.concat(e,t_.of.apply(void 0,$y([],Jy(t))))}};var r_={},n_=(Object.defineProperty(r_,"__esModule",{value:!0}),r_.every=void 0,j),o_=_;r_.every=function(o,i){return n_.operate(function(t,r){var n=0;t.subscribe(o_.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var i_={},u_={},a_={},s_=(Object.defineProperty(a_,"__esModule",{value:!0}),a_.exhaustMap=void 0,bf),c_=C,l_=j,f_=_;a_.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return c_.innerFrom(i(r,n)).pipe(s_.map(function(e,t){return o(r,e,n,t)}))}))}:l_.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(f_.createOperatorSubscriber(t,function(e){n||(n=f_.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),c_.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(u_,"__esModule",{value:!0}),u_.exhaustAll=void 0;var p_=a_,d_=i;u_.exhaustAll=function(){return p_.exhaustMap(d_.identity)},Object.defineProperty(i_,"__esModule",{value:!0}),i_.exhaust=void 0;i_.exhaust=u_.exhaustAll;var h_={},b_=(Object.defineProperty(h_,"__esModule",{value:!0}),h_.expand=void 0,j),y_=ep;h_.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,b_.operate(function(e,t){return y_.mergeInternals(e,t,r,n,void 0,!0,o)})};var __={},v_=(Object.defineProperty(__,"__esModule",{value:!0}),__.finalize=void 0,j);__.finalize=function(r){return v_.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var m_={},g_=(Object.defineProperty(m_,"__esModule",{value:!0}),m_.createFind=m_.find=void 0,j),O_=_;function w_(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(O_.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()}))}}m_.find=function(e,t){return g_.operate(w_(e,t,"value"))},m_.createFind=w_;var E_={},P_=(Object.defineProperty(E_,"__esModule",{value:!0}),E_.findIndex=void 0,j),S_=m_;E_.findIndex=function(e,t){return P_.operate(S_.createFind(e,t,"index"))};var T_={},j_=(Object.defineProperty(T_,"__esModule",{value:!0}),T_.first=void 0,mc),C_=Pd,I_=iy,R_=ty,A_=Wy,k_=i;T_.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?C_.filter(function(e,t){return n(e,t,r)}):k_.identity,I_.take(1),t?R_.defaultIfEmpty(e):A_.throwIfEmpty(function(){return new j_.EmptyError}))}};var M_={},N_=(Object.defineProperty(M_,"__esModule",{value:!0}),M_.groupBy=void 0,P),x_=C,D_=s,U_=j,L_=_;M_.groupBy=function(b,t,y,_){return U_.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 L_.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new D_.Subject),i=n,u=o,(a=new N_.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=L_.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(x_.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 F_={},B_=(Object.defineProperty(F_,"__esModule",{value:!0}),F_.isEmpty=void 0,j),W_=_;F_.isEmpty=function(){return B_.operate(function(e,t){e.subscribe(W_.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var q_={},z_={},V_=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.")},H_=(Object.defineProperty(z_,"__esModule",{value:!0}),z_.takeLast=void 0,y),G_=j,Y_=_;z_.takeLast=function(t){return t<=0?function(){return H_.EMPTY}:G_.operate(function(e,i){var u=[];e.subscribe(Y_.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=V_(u),n=r.next();!n.done;n=r.next()){var o=n.value;i.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}i.complete()},void 0,function(){u=null}))})},Object.defineProperty(q_,"__esModule",{value:!0}),q_.last=void 0;var K_=mc,Z_=Pd,X_=z_,Q_=Wy,J_=ty,$_=i;q_.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?Z_.filter(function(e,t){return n(e,t,r)}):$_.identity,X_.takeLast(1),t?J_.defaultIfEmpty(e):Q_.throwIfEmpty(function(){return new K_.EmptyError}))}};var ev={},tv=(Object.defineProperty(ev,"__esModule",{value:!0}),ev.materialize=void 0,us),rv=j,nv=_;ev.materialize=function(){return rv.operate(function(e,t){e.subscribe(nv.createOperatorSubscriber(t,function(e){t.next(tv.Notification.createNext(e))},function(){t.next(tv.Notification.createComplete()),t.complete()},function(e){t.next(tv.Notification.createError(e)),t.complete()}))})};var ov={},iv=(Object.defineProperty(ov,"__esModule",{value:!0}),ov.max=void 0,Gh),uv=b;ov.max=function(r){return iv.reduce(uv.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var av={},sv=(Object.defineProperty(av,"__esModule",{value:!0}),av.flatMap=void 0,$f),sv=(av.flatMap=sv.mergeMap,{}),cv=(Object.defineProperty(sv,"__esModule",{value:!0}),sv.mergeMapTo=void 0,$f),lv=b;sv.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),lv.isFunction(t)?cv.mergeMap(function(){return e},t,r):cv.mergeMap(function(){return e},r="number"==typeof t?t:r)};var fv={},pv=(Object.defineProperty(fv,"__esModule",{value:!0}),fv.mergeScan=void 0,j),dv=ep;fv.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),pv.operate(function(e,t){var r=o;return dv.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var ep={},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.merge=void 0,j),vv=dd,mv=Jf,gv=m,Ov=bc;hv.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=gv.popScheduler(r),o=gv.popNumber(r,1/0),r=vv.argsOrArgArray(r);return _v.operate(function(e,t){mv.mergeAll(o)(Ov.from(yv([e],bv(r)),n)).subscribe(t)})};var wv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ev=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},Pv=(Object.defineProperty(ep,"__esModule",{value:!0}),ep.mergeWith=void 0,hv);ep.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Pv.merge.apply(void 0,Ev([],wv(e)))};var Sv={},Tv=(Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.min=void 0,Gh),jv=b;Sv.min=function(r){return Tv.reduce(jv.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var Cv={},Iv=(Object.defineProperty(Cv,"__esModule",{value:!0}),Cv.multicast=void 0,S),Rv=b,Av=Ub;Cv.multicast=function(e,t){var r=Rv.isFunction(e)?e:function(){return e};return Rv.isFunction(t)?Av.connect(t,{connector:r}):function(e){return new Iv.ConnectableObservable(e,r)}};var kv={},Mv=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},Nv=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},xv=(Object.defineProperty(kv,"__esModule",{value:!0}),kv.onErrorResumeNext=kv.onErrorResumeNextWith=void 0,dd),Dv=pd;function Uv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xv.argsOrArgArray(e);return function(e){return Dv.onErrorResumeNext.apply(void 0,Nv([e],Mv(r)))}}kv.onErrorResumeNextWith=Uv,kv.onErrorResumeNext=Uv;var Lv={},Fv=(Object.defineProperty(Lv,"__esModule",{value:!0}),Lv.pairwise=void 0,j),Bv=_;Lv.pairwise=function(){return Fv.operate(function(e,r){var n,o=!1;e.subscribe(Bv.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var Wv={},qv=(Object.defineProperty(Wv,"__esModule",{value:!0}),Wv.pluck=void 0,bf);Wv.pluck=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];var i=o.length;if(0===i)throw new Error("list of properties cannot be empty.");return qv.map(function(e){for(var t=e,r=0;r<i;r++){var n=null==t?void 0:t[o[r]];if(void 0===n)return;t=n}return t})};var zv={},Vv=(Object.defineProperty(zv,"__esModule",{value:!0}),zv.publish=void 0,s),Hv=Cv,Gv=Ub;zv.publish=function(t){return t?function(e){return Gv.connect(t)(e)}:function(e){return Hv.multicast(new Vv.Subject)(e)}};var Yv={},Kv=(Object.defineProperty(Yv,"__esModule",{value:!0}),Yv.publishBehavior=void 0,u),Zv=S;Yv.publishBehavior=function(r){return function(e){var t=new Kv.BehaviorSubject(r);return new Zv.ConnectableObservable(e,function(){return t})}};var Xv={},Qv=(Object.defineProperty(Xv,"__esModule",{value:!0}),Xv.publishLast=void 0,g),Jv=S;Xv.publishLast=function(){return function(e){var t=new Qv.AsyncSubject;return new Jv.ConnectableObservable(e,function(){return t})}};var $v={},em=(Object.defineProperty($v,"__esModule",{value:!0}),$v.publishReplay=void 0,Dr),tm=Cv,rm=b;$v.publishReplay=function(t,r,e,n){e&&!rm.isFunction(e)&&(n=e);var o=rm.isFunction(e)?e:void 0;return function(e){return tm.multicast(new em.ReplaySubject(t,r,n),o)(e)}};var nm={},om=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},im=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},um=(Object.defineProperty(nm,"__esModule",{value:!0}),nm.raceWith=void 0,Rd),am=j,sm=i;nm.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?am.operate(function(e,t){um.raceInit(im([e],om(r)))(t)}):sm.identity};var cm={},lm=(Object.defineProperty(cm,"__esModule",{value:!0}),cm.repeat=void 0,y),fm=j,pm=_,dm=C,hm=Jp;cm.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 lm.EMPTY}:fm.operate(function(t,r){function n(){var e=!1;o=t.subscribe(pm.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?hm.timer(a):dm.innerFrom(a(i)),t=pm.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var bm={},ym=(Object.defineProperty(bm,"__esModule",{value:!0}),bm.repeatWhen=void 0,C),_m=s,vm=j,mm=_;bm.repeatWhen=function(l){return vm.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 _m.Subject,ym.innerFrom(l(n)).subscribe(mm.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(mm.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var gm={},Om=(Object.defineProperty(gm,"__esModule",{value:!0}),gm.retry=void 0,j),wm=_,Em=i,Pm=Jp,Sm=C;gm.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?Em.identity:Om.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(wm.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?Pm.timer(l):Sm.innerFrom(l(e,a)),n=wm.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var Tm={},jm=(Object.defineProperty(Tm,"__esModule",{value:!0}),Tm.retryWhen=void 0,C),Cm=s,Im=j,Rm=_;Tm.retryWhen=function(u){return Im.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(Rm.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new Cm.Subject,jm.innerFrom(u(n)).subscribe(Rm.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var Am={},km=(Object.defineProperty(Am,"__esModule",{value:!0}),Am.sample=void 0,C),Mm=j,Nm=v,xm=_;Am.sample=function(o){return Mm.operate(function(e,t){var r=!1,n=null;e.subscribe(xm.createOperatorSubscriber(t,function(e){r=!0,n=e})),km.innerFrom(o).subscribe(xm.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},Nm.noop))})};var Dm={},Um=(Object.defineProperty(Dm,"__esModule",{value:!0}),Dm.sampleTime=void 0,is),Lm=Am,Fm=Qp;Dm.sampleTime=function(e,t){return Lm.sample(Fm.interval(e,t=void 0===t?Um.asyncScheduler:t))};var Bm={},Wm=(Object.defineProperty(Bm,"__esModule",{value:!0}),Bm.scan=void 0,j),qm=Yh;Bm.scan=function(e,t){return Wm.operate(qm.scanInternals(e,t,2<=arguments.length,!0))};var Yh={},zm=(Object.defineProperty(Yh,"__esModule",{value:!0}),Yh.sequenceEqual=void 0,j),Vm=_,Hm=C;function Gm(){return{buffer:[],complete:!1}}Yh.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),zm.operate(function(e,t){function r(n,o){var r=Vm.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=Gm(),o=Gm(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),Hm.innerFrom(u).subscribe(r(o,n))})};var Ym={},Km=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},Zm=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},Xm=(Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.share=void 0,C),Qm=s,Jm=Q,$m=j;function e0(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 Jm.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),Xm.innerFrom(t.apply(void 0,Zm([],Km(n)))).subscribe(r)}Ym.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new Qm.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 $m.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=e0(n,b))}),r.subscribe(t),!o&&0<a&&(o=new Jm.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=e0(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=e0(f,h),r.complete()}}),Xm.innerFrom(e).subscribe(o))})(e)}};var t0={},r0=(Object.defineProperty(t0,"__esModule",{value:!0}),t0.shareReplay=void 0,Dr),n0=Ym;t0.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,n0.share({connector:function(){return new r0.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var o0={},i0=(Object.defineProperty(o0,"__esModule",{value:!0}),o0.single=void 0,mc),u0=dl,a0=Tl,s0=j,c0=_;o0.single=function(a){return s0.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(c0.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new u0.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new a0.NotFoundError("No matching values"):new i0.EmptyError)}))})};var l0={},f0=(Object.defineProperty(l0,"__esModule",{value:!0}),l0.skip=void 0,Pd);l0.skip=function(r){return f0.filter(function(e,t){return r<=t})};var p0={},d0=(Object.defineProperty(p0,"__esModule",{value:!0}),p0.skipLast=void 0,i),h0=j,b0=_;p0.skipLast=function(u){return u<=0?d0.identity:h0.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(b0.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 y0={},_0=(Object.defineProperty(y0,"__esModule",{value:!0}),y0.skipUntil=void 0,j),v0=_,m0=C,g0=v;y0.skipUntil=function(o){return _0.operate(function(e,t){var r=!1,n=v0.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},g0.noop);m0.innerFrom(o).subscribe(n),e.subscribe(v0.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var O0={},w0=(Object.defineProperty(O0,"__esModule",{value:!0}),O0.skipWhile=void 0,j),E0=_;O0.skipWhile=function(o){return w0.operate(function(e,t){var r=!1,n=0;e.subscribe(E0.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var P0={},S0=(Object.defineProperty(P0,"__esModule",{value:!0}),P0.startWith=void 0,Xf),T0=m,j0=j;P0.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=T0.popScheduler(r);return j0.operate(function(e,t){(n?S0.concat(r,e,n):S0.concat(r,e)).subscribe(t)})};var C0={},I0={},R0=(Object.defineProperty(I0,"__esModule",{value:!0}),I0.switchMap=void 0,C),A0=j,k0=_;I0.switchMap=function(s,c){return A0.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(k0.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;R0.innerFrom(s(t,n)).subscribe(u=k0.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(C0,"__esModule",{value:!0}),C0.switchAll=void 0;var M0=I0,N0=i;C0.switchAll=function(){return M0.switchMap(N0.identity)};var x0={},D0=(Object.defineProperty(x0,"__esModule",{value:!0}),x0.switchMapTo=void 0,I0),U0=b;x0.switchMapTo=function(e,t){return U0.isFunction(t)?D0.switchMap(function(){return e},t):D0.switchMap(function(){return e})};var L0={},F0=(Object.defineProperty(L0,"__esModule",{value:!0}),L0.switchScan=void 0,I0),B0=j;L0.switchScan=function(n,o){return B0.operate(function(e,t){var r=o;return F0.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var W0={},q0=(Object.defineProperty(W0,"__esModule",{value:!0}),W0.takeUntil=void 0,j),z0=_,V0=C,H0=v;W0.takeUntil=function(r){return q0.operate(function(e,t){V0.innerFrom(r).subscribe(z0.createOperatorSubscriber(t,function(){return t.complete()},H0.noop)),t.closed||e.subscribe(t)})};var G0={},Y0=(Object.defineProperty(G0,"__esModule",{value:!0}),G0.takeWhile=void 0,j),K0=_;G0.takeWhile=function(o,i){return void 0===i&&(i=!1),Y0.operate(function(e,r){var n=0;e.subscribe(K0.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var Z0={},X0=(Object.defineProperty(Z0,"__esModule",{value:!0}),Z0.tap=void 0,b),Q0=j,J0=_,$0=i;Z0.tap=function(e,t,r){var o=X0.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?Q0.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(J0.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)}))}):$0.identity};var b={},eg=(Object.defineProperty(b,"__esModule",{value:!0}),b.throttle=void 0,j),tg=_,rg=C;b.throttle=function(h,b){return eg.operate(function(e,t){function r(){var e;a&&(a=!1,e=s,s=null,t.next(e),l||d(e))}var n=null!=b?b:{},o=n.leading,i=void 0===o||o,o=n.trailing,u=void 0!==o&&o,a=!1,s=null,c=null,l=!1,f=function(){null!=c&&c.unsubscribe(),c=null,u&&(r(),l&&t.complete())},p=function(){c=null,l&&t.complete()},d=function(e){return c=rg.innerFrom(h(e)).subscribe(tg.createOperatorSubscriber(t,f,p))};e.subscribe(tg.createOperatorSubscriber(t,function(e){a=!0,s=e,c&&!c.closed||(i?r():d(e))},function(){l=!0,u&&a&&c&&!c.closed||t.complete()}))})};var ng={},og=(Object.defineProperty(ng,"__esModule",{value:!0}),ng.throttleTime=void 0,is),ig=b,ug=Jp;ng.throttleTime=function(e,t,r){var n=ug.timer(e,t=void 0===t?og.asyncScheduler:t);return ig.throttle(function(){return n},r)};var ag={},sg=(Object.defineProperty(ag,"__esModule",{value:!0}),ag.TimeInterval=ag.timeInterval=void 0,is),cg=j,lg=_;ag.timeInterval=function(i){return void 0===i&&(i=sg.asyncScheduler),cg.operate(function(e,n){var o=i.now();e.subscribe(lg.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new fg(e,r))}))})};var fg=function(e,t){this.value=e,this.interval=t},pg=(ag.TimeInterval=fg,{}),dg=(Object.defineProperty(pg,"__esModule",{value:!0}),pg.timeoutWith=void 0,is),hg=_l,bg=kc;pg.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:dg.async,hg.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 bg.timeout({first:n,each:o,scheduler:r,with:e})};var _l={},yg=(Object.defineProperty(_l,"__esModule",{value:!0}),_l.timestamp=void 0,n),_g=bf;_l.timestamp=function(t){return void 0===t&&(t=yg.dateTimestampProvider),_g.map(function(e){return{value:e,timestamp:t.now()}})};var n={},vg=(Object.defineProperty(n,"__esModule",{value:!0}),n.window=void 0,s),mg=j,gg=_,Og=v,wg=C;n.window=function(o){return mg.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new vg.Subject;t.next(n.asObservable());return e.subscribe(gg.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),wg.innerFrom(o).subscribe(gg.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new vg.Subject)},Og.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var Eg={},Pg=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.")},Sg=(Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.windowCount=void 0,s),Tg=j,jg=_;Eg.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return Tg.operate(function(e,i){var u=[new Sg.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(jg.createOperatorSubscriber(i,function(e){try{for(var t=Pg(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 Sg.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 Cg={},Ig=(Object.defineProperty(Cg,"__esModule",{value:!0}),Cg.windowTime=void 0,s),Rg=is,Ag=h,kg=j,Mg=_,Ng=X,xg=m,Dg=ol;Cg.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=xg.popScheduler(t))?e:Rg.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return kg.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(),Ng.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new Ag.Subscription,n.add(e),t=new Ig.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),Dg.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?Dg.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(Mg.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 ol={},Ug=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.")},Lg=(Object.defineProperty(ol,"__esModule",{value:!0}),ol.windowToggle=void 0,s),Fg=h,Bg=j,Wg=C,qg=_,zg=v,Vg=X;ol.windowToggle=function(t,a){return Bg.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];Wg.innerFrom(t).subscribe(qg.createOperatorSubscriber(o,function(e){var t,r=new Lg.Subject,n=(u.push(r),new Fg.Subscription);try{t=Wg.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(qg.createOperatorSubscriber(o,function(){Vg.arrRemove(u,r),r.complete(),n.unsubscribe()},zg.noop,i)))},zg.noop)),e.subscribe(qg.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=Ug(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 X={},Hg=(Object.defineProperty(X,"__esModule",{value:!0}),X.windowWhen=void 0,s),Gg=j,Yg=_,Kg=C;X.windowWhen=function(u){return Gg.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 Hg.Subject,t.next(r.asObservable());try{e=Kg.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=Yg.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(Yg.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var Zg={},Xg=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},Qg=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},Jg=(Object.defineProperty(Zg,"__esModule",{value:!0}),Zg.withLatestFrom=void 0,j),$g=_,eO=C,tO=i,rO=v,nO=m;Zg.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=nO.popResultSelector(a);return Jg.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){eO.innerFrom(a[t]).subscribe($g.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(tO.identity))&&(o=null))},rO.noop))}(u);e.subscribe($g.createOperatorSubscriber(r,function(e){i&&(e=Qg([e],Xg(n)),r.next(s?s.apply(void 0,Qg([],Xg(e))):e))}))})};var _={},oO=(Object.defineProperty(_,"__esModule",{value:!0}),_.zipAll=void 0,zd),iO=I;_.zipAll=function(e){return iO.joinAllInternals(oO.zip,e)};var C={},m={},uO=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},aO=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},sO=(Object.defineProperty(m,"__esModule",{value:!0}),m.zip=void 0,zd),cO=j;m.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return cO.operate(function(e,t){sO.zip.apply(void 0,aO([e],uO(r))).subscribe(t)})};var lO,fO,pO,dO,hO,bO,yO,_O,vO,mO,gO,OO,wO,EO,PO,SO,TO,jO,CO,IO,RO,AO,kO,MO,NO,xO,DO,UO,LO,FO,BO,WO,qO,zO,VO,HO,GO,YO,KO,ZO,XO,QO,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,Aw,kw,Mw,Nw,xw,Dw,Uw,Lw,Fw,Bw,Ww,qw,zw,Vw,Hw,Gw,Yw,Kw,Zw,Xw,Qw,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,AE,kE,ME,NE,xE,DE,UE,LE,FE,BE,WE,qE,zE,VE,HE,GE,YE,KE,ZE,XE,QE,JE,$E,eP,tP,rP,nP,oP,iP,uP,aP,sP,cP,lP,fP,pP,dP,hP,bP,yP=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.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},vP=(Object.defineProperty(C,"__esModule",{value:!0}),C.zipWith=void 0,m);C.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return vP.zip.apply(void 0,_P([],yP(e)))},I=qr,lO=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]}),j=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||lO(t,e,r)},Object.defineProperty(I,"__esModule",{value:!0}),I.interval=I.iif=I.generate=I.fromEventPattern=I.fromEvent=I.from=I.forkJoin=I.empty=I.defer=I.connectable=I.concat=I.combineLatest=I.bindNodeCallback=I.bindCallback=I.UnsubscriptionError=I.TimeoutError=I.SequenceError=I.ObjectUnsubscribedError=I.NotFoundError=I.EmptyError=I.ArgumentOutOfRangeError=I.firstValueFrom=I.lastValueFrom=I.isObservable=I.identity=I.noop=I.pipe=I.NotificationKind=I.Notification=I.Subscriber=I.Subscription=I.Scheduler=I.VirtualAction=I.VirtualTimeScheduler=I.animationFrameScheduler=I.animationFrame=I.queueScheduler=I.queue=I.asyncScheduler=I.async=I.asapScheduler=I.asap=I.AsyncSubject=I.ReplaySubject=I.BehaviorSubject=I.Subject=I.animationFrames=I.observable=I.ConnectableObservable=I.Observable=void 0,I.filter=I.expand=I.exhaustMap=I.exhaustAll=I.exhaust=I.every=I.endWith=I.elementAt=I.distinctUntilKeyChanged=I.distinctUntilChanged=I.distinct=I.dematerialize=I.delayWhen=I.delay=I.defaultIfEmpty=I.debounceTime=I.debounce=I.count=I.connect=I.concatWith=I.concatMapTo=I.concatMap=I.concatAll=I.combineLatestWith=I.combineLatestAll=I.combineAll=I.catchError=I.bufferWhen=I.bufferToggle=I.bufferTime=I.bufferCount=I.buffer=I.auditTime=I.audit=I.config=I.NEVER=I.EMPTY=I.scheduled=I.zip=I.using=I.timer=I.throwError=I.range=I.race=I.partition=I.pairs=I.onErrorResumeNext=I.of=I.never=I.merge=void 0,I.switchMap=I.switchAll=I.subscribeOn=I.startWith=I.skipWhile=I.skipUntil=I.skipLast=I.skip=I.single=I.shareReplay=I.share=I.sequenceEqual=I.scan=I.sampleTime=I.sample=I.refCount=I.retryWhen=I.retry=I.repeatWhen=I.repeat=I.reduce=I.raceWith=I.publishReplay=I.publishLast=I.publishBehavior=I.publish=I.pluck=I.pairwise=I.onErrorResumeNextWith=I.observeOn=I.multicast=I.min=I.mergeWith=I.mergeScan=I.mergeMapTo=I.mergeMap=I.flatMap=I.mergeAll=I.max=I.materialize=I.mapTo=I.map=I.last=I.isEmpty=I.ignoreElements=I.groupBy=I.first=I.findIndex=I.find=I.finalize=void 0,I.zipWith=I.zipAll=I.withLatestFrom=I.windowWhen=I.windowToggle=I.windowTime=I.windowCount=I.window=I.toArray=I.timestamp=I.timeoutWith=I.timeout=I.timeInterval=I.throwIfEmpty=I.throttleTime=I.throttle=I.tap=I.takeWhile=I.takeUntil=I.takeLast=I.take=I.switchScan=I.switchMapTo=void 0,fO=P,Object.defineProperty(I,"Observable",{enumerable:!0,get:function(){return fO.Observable}}),pO=S,Object.defineProperty(I,"ConnectableObservable",{enumerable:!0,get:function(){return pO.ConnectableObservable}}),dO=f,Object.defineProperty(I,"observable",{enumerable:!0,get:function(){return dO.observable}}),hO=t,Object.defineProperty(I,"animationFrames",{enumerable:!0,get:function(){return hO.animationFrames}}),bO=s,Object.defineProperty(I,"Subject",{enumerable:!0,get:function(){return bO.Subject}}),yO=u,Object.defineProperty(I,"BehaviorSubject",{enumerable:!0,get:function(){return yO.BehaviorSubject}}),_O=Dr,Object.defineProperty(I,"ReplaySubject",{enumerable:!0,get:function(){return _O.ReplaySubject}}),vO=g,Object.defineProperty(I,"AsyncSubject",{enumerable:!0,get:function(){return vO.AsyncSubject}}),mO=o,Object.defineProperty(I,"asap",{enumerable:!0,get:function(){return mO.asap}}),Object.defineProperty(I,"asapScheduler",{enumerable:!0,get:function(){return mO.asapScheduler}}),gO=is,Object.defineProperty(I,"async",{enumerable:!0,get:function(){return gO.async}}),Object.defineProperty(I,"asyncScheduler",{enumerable:!0,get:function(){return gO.asyncScheduler}}),OO=As,Object.defineProperty(I,"queue",{enumerable:!0,get:function(){return OO.queue}}),Object.defineProperty(I,"queueScheduler",{enumerable:!0,get:function(){return OO.queueScheduler}}),wO=Ws,Object.defineProperty(I,"animationFrame",{enumerable:!0,get:function(){return wO.animationFrame}}),Object.defineProperty(I,"animationFrameScheduler",{enumerable:!0,get:function(){return wO.animationFrameScheduler}}),EO=Hs,Object.defineProperty(I,"VirtualTimeScheduler",{enumerable:!0,get:function(){return EO.VirtualTimeScheduler}}),Object.defineProperty(I,"VirtualAction",{enumerable:!0,get:function(){return EO.VirtualAction}}),PO=ds,Object.defineProperty(I,"Scheduler",{enumerable:!0,get:function(){return PO.Scheduler}}),SO=h,Object.defineProperty(I,"Subscription",{enumerable:!0,get:function(){return SO.Subscription}}),TO=Q,Object.defineProperty(I,"Subscriber",{enumerable:!0,get:function(){return TO.Subscriber}}),jO=us,Object.defineProperty(I,"Notification",{enumerable:!0,get:function(){return jO.Notification}}),Object.defineProperty(I,"NotificationKind",{enumerable:!0,get:function(){return jO.NotificationKind}}),CO=T,Object.defineProperty(I,"pipe",{enumerable:!0,get:function(){return CO.pipe}}),IO=v,Object.defineProperty(I,"noop",{enumerable:!0,get:function(){return IO.noop}}),RO=i,Object.defineProperty(I,"identity",{enumerable:!0,get:function(){return RO.identity}}),AO=Cc,Object.defineProperty(I,"isObservable",{enumerable:!0,get:function(){return AO.isObservable}}),kO=Oc,Object.defineProperty(I,"lastValueFrom",{enumerable:!0,get:function(){return kO.lastValueFrom}}),MO=Pc,Object.defineProperty(I,"firstValueFrom",{enumerable:!0,get:function(){return MO.firstValueFrom}}),NO=Tc,Object.defineProperty(I,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return NO.ArgumentOutOfRangeError}}),xO=mc,Object.defineProperty(I,"EmptyError",{enumerable:!0,get:function(){return xO.EmptyError}}),DO=Tl,Object.defineProperty(I,"NotFoundError",{enumerable:!0,get:function(){return DO.NotFoundError}}),UO=Qe,Object.defineProperty(I,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return UO.ObjectUnsubscribedError}}),LO=dl,Object.defineProperty(I,"SequenceError",{enumerable:!0,get:function(){return LO.SequenceError}}),FO=kc,Object.defineProperty(I,"TimeoutError",{enumerable:!0,get:function(){return FO.TimeoutError}}),BO=Ar,Object.defineProperty(I,"UnsubscriptionError",{enumerable:!0,get:function(){return BO.UnsubscriptionError}}),WO=jc,Object.defineProperty(I,"bindCallback",{enumerable:!0,get:function(){return WO.bindCallback}}),qO=Af,Object.defineProperty(I,"bindNodeCallback",{enumerable:!0,get:function(){return qO.bindNodeCallback}}),zO=w,Object.defineProperty(I,"combineLatest",{enumerable:!0,get:function(){return zO.combineLatest}}),VO=Xf,Object.defineProperty(I,"concat",{enumerable:!0,get:function(){return VO.concat}}),HO=bp,Object.defineProperty(I,"connectable",{enumerable:!0,get:function(){return HO.connectable}}),GO=yp,Object.defineProperty(I,"defer",{enumerable:!0,get:function(){return GO.defer}}),YO=y,Object.defineProperty(I,"empty",{enumerable:!0,get:function(){return YO.empty}}),KO=Ep,Object.defineProperty(I,"forkJoin",{enumerable:!0,get:function(){return KO.forkJoin}}),ZO=bc,Object.defineProperty(I,"from",{enumerable:!0,get:function(){return ZO.from}}),XO=Mf,Object.defineProperty(I,"fromEvent",{enumerable:!0,get:function(){return XO.fromEvent}}),QO=Lf,Object.defineProperty(I,"fromEventPattern",{enumerable:!0,get:function(){return QO.fromEventPattern}}),JO=vc,Object.defineProperty(I,"generate",{enumerable:!0,get:function(){return JO.generate}}),$O=ml,Object.defineProperty(I,"iif",{enumerable:!0,get:function(){return $O.iif}}),ew=Qp,Object.defineProperty(I,"interval",{enumerable:!0,get:function(){return ew.interval}}),tw=lc,Object.defineProperty(I,"merge",{enumerable:!0,get:function(){return tw.merge}}),rw=fd,Object.defineProperty(I,"never",{enumerable:!0,get:function(){return rw.never}}),nw=l,Object.defineProperty(I,"of",{enumerable:!0,get:function(){return nw.of}}),ow=pd,Object.defineProperty(I,"onErrorResumeNext",{enumerable:!0,get:function(){return ow.onErrorResumeNext}}),iw=gd,Object.defineProperty(I,"pairs",{enumerable:!0,get:function(){return iw.pairs}}),uw=wd,Object.defineProperty(I,"partition",{enumerable:!0,get:function(){return uw.partition}}),aw=Rd,Object.defineProperty(I,"race",{enumerable:!0,get:function(){return aw.race}}),sw=Dd,Object.defineProperty(I,"range",{enumerable:!0,get:function(){return sw.range}}),cw=_c,Object.defineProperty(I,"throwError",{enumerable:!0,get:function(){return cw.throwError}}),lw=Jp,Object.defineProperty(I,"timer",{enumerable:!0,get:function(){return lw.timer}}),fw=Fd,Object.defineProperty(I,"using",{enumerable:!0,get:function(){return fw.using}}),pw=zd,Object.defineProperty(I,"zip",{enumerable:!0,get:function(){return pw.zip}}),dw=yc,Object.defineProperty(I,"scheduled",{enumerable:!0,get:function(){return dw.scheduled}}),hw=y,Object.defineProperty(I,"EMPTY",{enumerable:!0,get:function(){return hw.EMPTY}}),bw=fd,Object.defineProperty(I,"NEVER",{enumerable:!0,get:function(){return bw.NEVER}}),j(Jd,I),yw=E,Object.defineProperty(I,"config",{enumerable:!0,get:function(){return yw.config}}),_w=$d,Object.defineProperty(I,"audit",{enumerable:!0,get:function(){return _w.audit}}),vw=nh,Object.defineProperty(I,"auditTime",{enumerable:!0,get:function(){return vw.auditTime}}),mw=ah,Object.defineProperty(I,"buffer",{enumerable:!0,get:function(){return mw.buffer}}),gw=ph,Object.defineProperty(I,"bufferCount",{enumerable:!0,get:function(){return gw.bufferCount}}),Ow=_h,Object.defineProperty(I,"bufferTime",{enumerable:!0,get:function(){return Ow.bufferTime}}),ww=Th,Object.defineProperty(I,"bufferToggle",{enumerable:!0,get:function(){return ww.bufferToggle}}),Ew=Nh,Object.defineProperty(I,"bufferWhen",{enumerable:!0,get:function(){return Ew.bufferWhen}}),Pw=Fh,Object.defineProperty(I,"catchError",{enumerable:!0,get:function(){return Pw.catchError}}),Sw=zh,Object.defineProperty(I,"combineAll",{enumerable:!0,get:function(){return Sw.combineAll}}),Tw=Vh,Object.defineProperty(I,"combineLatestAll",{enumerable:!0,get:function(){return Tw.combineLatestAll}}),jw=ab,Object.defineProperty(I,"combineLatestWith",{enumerable:!0,get:function(){return jw.combineLatestWith}}),Cw=Qf,Object.defineProperty(I,"concatAll",{enumerable:!0,get:function(){return Cw.concatAll}}),Iw=hf,Object.defineProperty(I,"concatMap",{enumerable:!0,get:function(){return Iw.concatMap}}),Rw=Eb,Object.defineProperty(I,"concatMapTo",{enumerable:!0,get:function(){return Rw.concatMapTo}}),Aw=Tb,Object.defineProperty(I,"concatWith",{enumerable:!0,get:function(){return Aw.concatWith}}),kw=Ub,Object.defineProperty(I,"connect",{enumerable:!0,get:function(){return kw.connect}}),Mw=Lb,Object.defineProperty(I,"count",{enumerable:!0,get:function(){return Mw.count}}),Nw=Gb,Object.defineProperty(I,"debounce",{enumerable:!0,get:function(){return Nw.debounce}}),xw=Qb,Object.defineProperty(I,"debounceTime",{enumerable:!0,get:function(){return xw.debounceTime}}),Dw=ty,Object.defineProperty(I,"defaultIfEmpty",{enumerable:!0,get:function(){return Dw.defaultIfEmpty}}),Uw=R,Object.defineProperty(I,"delay",{enumerable:!0,get:function(){return Uw.delay}}),Lw=oy,Object.defineProperty(I,"delayWhen",{enumerable:!0,get:function(){return Lw.delayWhen}}),Fw=Py,Object.defineProperty(I,"dematerialize",{enumerable:!0,get:function(){return Fw.dematerialize}}),Bw=Cy,Object.defineProperty(I,"distinct",{enumerable:!0,get:function(){return Bw.distinct}}),Ww=My,Object.defineProperty(I,"distinctUntilChanged",{enumerable:!0,get:function(){return Ww.distinctUntilChanged}}),qw=Ly,Object.defineProperty(I,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return qw.distinctUntilKeyChanged}}),zw=By,Object.defineProperty(I,"elementAt",{enumerable:!0,get:function(){return zw.elementAt}}),Vw=Qy,Object.defineProperty(I,"endWith",{enumerable:!0,get:function(){return Vw.endWith}}),Hw=r_,Object.defineProperty(I,"every",{enumerable:!0,get:function(){return Hw.every}}),Gw=i_,Object.defineProperty(I,"exhaust",{enumerable:!0,get:function(){return Gw.exhaust}}),Yw=u_,Object.defineProperty(I,"exhaustAll",{enumerable:!0,get:function(){return Yw.exhaustAll}}),Kw=a_,Object.defineProperty(I,"exhaustMap",{enumerable:!0,get:function(){return Kw.exhaustMap}}),Zw=h_,Object.defineProperty(I,"expand",{enumerable:!0,get:function(){return Zw.expand}}),Xw=Pd,Object.defineProperty(I,"filter",{enumerable:!0,get:function(){return Xw.filter}}),Qw=__,Object.defineProperty(I,"finalize",{enumerable:!0,get:function(){return Qw.finalize}}),Jw=m_,Object.defineProperty(I,"find",{enumerable:!0,get:function(){return Jw.find}}),$w=E_,Object.defineProperty(I,"findIndex",{enumerable:!0,get:function(){return $w.findIndex}}),eE=T_,Object.defineProperty(I,"first",{enumerable:!0,get:function(){return eE.first}}),tE=M_,Object.defineProperty(I,"groupBy",{enumerable:!0,get:function(){return tE.groupBy}}),rE=cy,Object.defineProperty(I,"ignoreElements",{enumerable:!0,get:function(){return rE.ignoreElements}}),nE=F_,Object.defineProperty(I,"isEmpty",{enumerable:!0,get:function(){return nE.isEmpty}}),oE=q_,Object.defineProperty(I,"last",{enumerable:!0,get:function(){return oE.last}}),iE=bf,Object.defineProperty(I,"map",{enumerable:!0,get:function(){return iE.map}}),uE=dy,Object.defineProperty(I,"mapTo",{enumerable:!0,get:function(){return uE.mapTo}}),aE=ev,Object.defineProperty(I,"materialize",{enumerable:!0,get:function(){return aE.materialize}}),sE=ov,Object.defineProperty(I,"max",{enumerable:!0,get:function(){return sE.max}}),cE=Jf,Object.defineProperty(I,"mergeAll",{enumerable:!0,get:function(){return cE.mergeAll}}),lE=av,Object.defineProperty(I,"flatMap",{enumerable:!0,get:function(){return lE.flatMap}}),fE=$f,Object.defineProperty(I,"mergeMap",{enumerable:!0,get:function(){return fE.mergeMap}}),pE=sv,Object.defineProperty(I,"mergeMapTo",{enumerable:!0,get:function(){return pE.mergeMapTo}}),dE=fv,Object.defineProperty(I,"mergeScan",{enumerable:!0,get:function(){return dE.mergeScan}}),hE=ep,Object.defineProperty(I,"mergeWith",{enumerable:!0,get:function(){return hE.mergeWith}}),bE=Sv,Object.defineProperty(I,"min",{enumerable:!0,get:function(){return bE.min}}),yE=Cv,Object.defineProperty(I,"multicast",{enumerable:!0,get:function(){return yE.multicast}}),_E=p,Object.defineProperty(I,"observeOn",{enumerable:!0,get:function(){return _E.observeOn}}),vE=kv,Object.defineProperty(I,"onErrorResumeNextWith",{enumerable:!0,get:function(){return vE.onErrorResumeNextWith}}),mE=Lv,Object.defineProperty(I,"pairwise",{enumerable:!0,get:function(){return mE.pairwise}}),gE=Wv,Object.defineProperty(I,"pluck",{enumerable:!0,get:function(){return gE.pluck}}),OE=zv,Object.defineProperty(I,"publish",{enumerable:!0,get:function(){return OE.publish}}),wE=Yv,Object.defineProperty(I,"publishBehavior",{enumerable:!0,get:function(){return wE.publishBehavior}}),EE=Xv,Object.defineProperty(I,"publishLast",{enumerable:!0,get:function(){return EE.publishLast}}),PE=$v,Object.defineProperty(I,"publishReplay",{enumerable:!0,get:function(){return PE.publishReplay}}),SE=nm,Object.defineProperty(I,"raceWith",{enumerable:!0,get:function(){return SE.raceWith}}),TE=Gh,Object.defineProperty(I,"reduce",{enumerable:!0,get:function(){return TE.reduce}}),jE=cm,Object.defineProperty(I,"repeat",{enumerable:!0,get:function(){return jE.repeat}}),CE=bm,Object.defineProperty(I,"repeatWhen",{enumerable:!0,get:function(){return CE.repeatWhen}}),IE=gm,Object.defineProperty(I,"retry",{enumerable:!0,get:function(){return IE.retry}}),RE=Tm,Object.defineProperty(I,"retryWhen",{enumerable:!0,get:function(){return RE.retryWhen}}),AE=O,Object.defineProperty(I,"refCount",{enumerable:!0,get:function(){return AE.refCount}}),kE=Am,Object.defineProperty(I,"sample",{enumerable:!0,get:function(){return kE.sample}}),ME=Dm,Object.defineProperty(I,"sampleTime",{enumerable:!0,get:function(){return ME.sampleTime}}),NE=Bm,Object.defineProperty(I,"scan",{enumerable:!0,get:function(){return NE.scan}}),xE=Yh,Object.defineProperty(I,"sequenceEqual",{enumerable:!0,get:function(){return xE.sequenceEqual}}),DE=Ym,Object.defineProperty(I,"share",{enumerable:!0,get:function(){return DE.share}}),UE=t0,Object.defineProperty(I,"shareReplay",{enumerable:!0,get:function(){return UE.shareReplay}}),LE=o0,Object.defineProperty(I,"single",{enumerable:!0,get:function(){return LE.single}}),FE=l0,Object.defineProperty(I,"skip",{enumerable:!0,get:function(){return FE.skip}}),BE=p0,Object.defineProperty(I,"skipLast",{enumerable:!0,get:function(){return BE.skipLast}}),WE=y0,Object.defineProperty(I,"skipUntil",{enumerable:!0,get:function(){return WE.skipUntil}}),qE=O0,Object.defineProperty(I,"skipWhile",{enumerable:!0,get:function(){return qE.skipWhile}}),zE=P0,Object.defineProperty(I,"startWith",{enumerable:!0,get:function(){return zE.startWith}}),VE=sl,Object.defineProperty(I,"subscribeOn",{enumerable:!0,get:function(){return VE.subscribeOn}}),HE=C0,Object.defineProperty(I,"switchAll",{enumerable:!0,get:function(){return HE.switchAll}}),GE=I0,Object.defineProperty(I,"switchMap",{enumerable:!0,get:function(){return GE.switchMap}}),YE=x0,Object.defineProperty(I,"switchMapTo",{enumerable:!0,get:function(){return YE.switchMapTo}}),KE=L0,Object.defineProperty(I,"switchScan",{enumerable:!0,get:function(){return KE.switchScan}}),ZE=iy,Object.defineProperty(I,"take",{enumerable:!0,get:function(){return ZE.take}}),XE=z_,Object.defineProperty(I,"takeLast",{enumerable:!0,get:function(){return XE.takeLast}}),QE=W0,Object.defineProperty(I,"takeUntil",{enumerable:!0,get:function(){return QE.takeUntil}}),JE=G0,Object.defineProperty(I,"takeWhile",{enumerable:!0,get:function(){return JE.takeWhile}}),$E=Z0,Object.defineProperty(I,"tap",{enumerable:!0,get:function(){return $E.tap}}),eP=b,Object.defineProperty(I,"throttle",{enumerable:!0,get:function(){return eP.throttle}}),tP=ng,Object.defineProperty(I,"throttleTime",{enumerable:!0,get:function(){return tP.throttleTime}}),rP=Wy,Object.defineProperty(I,"throwIfEmpty",{enumerable:!0,get:function(){return rP.throwIfEmpty}}),nP=ag,Object.defineProperty(I,"timeInterval",{enumerable:!0,get:function(){return nP.timeInterval}}),oP=kc,Object.defineProperty(I,"timeout",{enumerable:!0,get:function(){return oP.timeout}}),iP=pg,Object.defineProperty(I,"timeoutWith",{enumerable:!0,get:function(){return iP.timeoutWith}}),uP=_l,Object.defineProperty(I,"timestamp",{enumerable:!0,get:function(){return uP.timestamp}}),aP=Hh,Object.defineProperty(I,"toArray",{enumerable:!0,get:function(){return aP.toArray}}),sP=n,Object.defineProperty(I,"window",{enumerable:!0,get:function(){return sP.window}}),cP=Eg,Object.defineProperty(I,"windowCount",{enumerable:!0,get:function(){return cP.windowCount}}),lP=Cg,Object.defineProperty(I,"windowTime",{enumerable:!0,get:function(){return lP.windowTime}}),fP=ol,Object.defineProperty(I,"windowToggle",{enumerable:!0,get:function(){return fP.windowToggle}}),pP=X,Object.defineProperty(I,"windowWhen",{enumerable:!0,get:function(){return pP.windowWhen}}),dP=Zg,Object.defineProperty(I,"withLatestFrom",{enumerable:!0,get:function(){return dP.withLatestFrom}}),hP=_,Object.defineProperty(I,"zipAll",{enumerable:!0,get:function(){return hP.zipAll}}),bP=C,Object.defineProperty(I,"zipWith",{enumerable:!0,get:function(){return bP.zipWith}});var P={},S={},mP=(Object.defineProperty(S,"__esModule",{value:!0}),S.partition=void 0,Ed),gP=Pd;S.partition=function(t,r){return function(e){return[gP.filter(t,r)(e),gP.filter(mP.not(t,r))(e)]}};var OP,wP,EP,PP,SP,TP,jP,CP,IP,RP,AP,kP,MP,NP,xP,DP,UP,LP,FP,BP,WP,qP,zP,VP,HP,GP,YP,KP,ZP,XP,QP,JP,$P,eS,tS,rS,nS,oS,iS,uS,aS,sS,cS,lS,fS,pS,dS,hS,bS,yS,_S,vS,mS,gS,OS,wS,ES,PS,SS,TS,jS,CS,IS,RS,AS,kS,MS,NS,xS,DS,US,LS,FS,BS,WS,qS,zS,VS,HS,GS,YS,KS,ZS,XS,QS,JS,$S,e1,t1,r1,n1,o1,i1,u1,a1,s1,c1,l1,f1,p1,d1,h1,b1,y1,_1,v1,m1,g1,O1,w1,E1,P1,S1,f={},T1=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},j1=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},C1=(Object.defineProperty(f,"__esModule",{value:!0}),f.race=void 0,dd),I1=nm;f.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return I1.raceWith.apply(void 0,j1([],T1(C1.argsOrArgArray(e))))},t=P,Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0,OP=$d,Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return OP.audit}}),wP=nh,Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return wP.auditTime}}),EP=ah,Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return EP.buffer}}),PP=ph,Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return PP.bufferCount}}),SP=_h,Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return SP.bufferTime}}),TP=Th,Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return TP.bufferToggle}}),jP=Nh,Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return jP.bufferWhen}}),CP=Fh,Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return CP.catchError}}),IP=zh,Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return IP.combineAll}}),RP=Vh,Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return RP.combineLatestAll}}),AP=sb,Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return AP.combineLatest}}),kP=ab,Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return kP.combineLatestWith}}),MP=jb,Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return MP.concat}}),NP=Qf,Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return NP.concatAll}}),xP=hf,Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return xP.concatMap}}),DP=Eb,Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return DP.concatMapTo}}),UP=Tb,Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return UP.concatWith}}),LP=Ub,Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return LP.connect}}),FP=Lb,Object.defineProperty(t,"count",{enumerable:!0,get:function(){return FP.count}}),BP=Gb,Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return BP.debounce}}),WP=Qb,Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return WP.debounceTime}}),qP=ty,Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return qP.defaultIfEmpty}}),zP=R,Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return zP.delay}}),VP=oy,Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return VP.delayWhen}}),HP=Py,Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return HP.dematerialize}}),GP=Cy,Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return GP.distinct}}),YP=My,Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return YP.distinctUntilChanged}}),KP=Ly,Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return KP.distinctUntilKeyChanged}}),ZP=By,Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return ZP.elementAt}}),XP=Qy,Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return XP.endWith}}),QP=r_,Object.defineProperty(t,"every",{enumerable:!0,get:function(){return QP.every}}),JP=i_,Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return JP.exhaust}}),$P=u_,Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return $P.exhaustAll}}),eS=a_,Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return eS.exhaustMap}}),tS=h_,Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return tS.expand}}),rS=Pd,Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return rS.filter}}),nS=__,Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return nS.finalize}}),oS=m_,Object.defineProperty(t,"find",{enumerable:!0,get:function(){return oS.find}}),iS=E_,Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return iS.findIndex}}),uS=T_,Object.defineProperty(t,"first",{enumerable:!0,get:function(){return uS.first}}),aS=M_,Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return aS.groupBy}}),sS=cy,Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return sS.ignoreElements}}),cS=F_,Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return cS.isEmpty}}),lS=q_,Object.defineProperty(t,"last",{enumerable:!0,get:function(){return lS.last}}),fS=bf,Object.defineProperty(t,"map",{enumerable:!0,get:function(){return fS.map}}),pS=dy,Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return pS.mapTo}}),dS=ev,Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return dS.materialize}}),hS=ov,Object.defineProperty(t,"max",{enumerable:!0,get:function(){return hS.max}}),bS=hv,Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return bS.merge}}),yS=Jf,Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return yS.mergeAll}}),_S=av,Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return _S.flatMap}}),vS=$f,Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return vS.mergeMap}}),mS=sv,Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return mS.mergeMapTo}}),gS=fv,Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return gS.mergeScan}}),OS=ep,Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return OS.mergeWith}}),wS=Sv,Object.defineProperty(t,"min",{enumerable:!0,get:function(){return wS.min}}),ES=Cv,Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ES.multicast}}),PS=p,Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return PS.observeOn}}),SS=kv,Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return SS.onErrorResumeNext}}),TS=Lv,Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return TS.pairwise}}),jS=S,Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return jS.partition}}),CS=Wv,Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return CS.pluck}}),IS=zv,Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return IS.publish}}),RS=Yv,Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return RS.publishBehavior}}),AS=Xv,Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return AS.publishLast}}),kS=$v,Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return kS.publishReplay}}),MS=f,Object.defineProperty(t,"race",{enumerable:!0,get:function(){return MS.race}}),NS=nm,Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return NS.raceWith}}),xS=Gh,Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return xS.reduce}}),DS=cm,Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return DS.repeat}}),US=bm,Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return US.repeatWhen}}),LS=gm,Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return LS.retry}}),FS=Tm,Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return FS.retryWhen}}),BS=O,Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return BS.refCount}}),WS=Am,Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return WS.sample}}),qS=Dm,Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return qS.sampleTime}}),zS=Bm,Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return zS.scan}}),VS=Yh,Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return VS.sequenceEqual}}),HS=Ym,Object.defineProperty(t,"share",{enumerable:!0,get:function(){return HS.share}}),GS=t0,Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return GS.shareReplay}}),YS=o0,Object.defineProperty(t,"single",{enumerable:!0,get:function(){return YS.single}}),KS=l0,Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return KS.skip}}),ZS=p0,Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return ZS.skipLast}}),XS=y0,Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return XS.skipUntil}}),QS=O0,Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return QS.skipWhile}}),JS=P0,Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return JS.startWith}}),$S=sl,Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return $S.subscribeOn}}),e1=C0,Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return e1.switchAll}}),t1=I0,Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return t1.switchMap}}),r1=x0,Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return r1.switchMapTo}}),n1=L0,Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return n1.switchScan}}),o1=iy,Object.defineProperty(t,"take",{enumerable:!0,get:function(){return o1.take}}),i1=z_,Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return i1.takeLast}}),u1=W0,Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return u1.takeUntil}}),a1=G0,Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return a1.takeWhile}}),s1=Z0,Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return s1.tap}}),c1=b,Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return c1.throttle}}),l1=ng,Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return l1.throttleTime}}),f1=Wy,Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return f1.throwIfEmpty}}),p1=ag,Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return p1.timeInterval}}),d1=kc,Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return d1.timeout}}),h1=pg,Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return h1.timeoutWith}}),b1=_l,Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return b1.timestamp}}),y1=Hh,Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return y1.toArray}}),_1=n,Object.defineProperty(t,"window",{enumerable:!0,get:function(){return _1.window}}),v1=Eg,Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return v1.windowCount}}),m1=Cg,Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return m1.windowTime}}),g1=ol,Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return g1.windowToggle}}),O1=X,Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return O1.windowWhen}}),w1=Zg,Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return w1.withLatestFrom}}),E1=m,Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return E1.zip}}),P1=_,Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return P1.zipAll}}),S1=C,Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return S1.zipWith}});var s={},R1=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())})},A1=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}}}},k1=(Object.defineProperty(s,"__esModule",{value:!0}),e),M1=qr,N1=P,x1=0,D1=1,U1=2;function L1(e,t){e=e.pipe((0,N1.publishReplay)(1),(0,N1.refCount)());this._result=e,this._keys=e.pipe((0,N1.mergeMap)(function(e){return(0,M1.from)(e.keys())}),(0,N1.publishReplay)(1),(0,N1.refCount)()),this._records=void 0,this._controls=new F1,this._summary=new M1.ReplaySubject,this._state=t||x1}L1.prototype.keys=function(){return this._keys},L1.prototype.records=function(){var r=this,e=this._result.pipe((0,N1.mergeMap)(function(t){return new M1.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},L1.prototype.consume=function(){var r=this;return this._result.pipe((0,N1.mergeMap)(function(t){return new M1.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},L1.prototype.pause=function(){this._controls.pause()},L1.prototype.resume=function(){return this._controls.resume()},L1.prototype.push=function(){return this._controls.push()},L1.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<D1?(this._state=D1,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,k1.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},L1.prototype._toObservable=function(){var n=this;return new M1.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new L1((t=e,new M1.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},L1.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new F1);var a=new M1.Subject,s=function(n){return R1(e,void 0,void 0,function(){var t,r;return A1(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 R1(this,void 0,void 0,function(){return A1(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 R1(t,void 0,void 0,function(){var t,r;return A1(this,function(e){switch(e.label){case 0:return this._state=U1,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=U1,t._summary.error(e)}},this._controls),this._records)},s.default=L1;B1.prototype.pause=function(){this._paused=!0},Object.defineProperty(B1.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(B1.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),B1.prototype.resume=function(){return R1(this,void 0,void 0,function(){var t;return A1(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]}})})},B1.prototype.push=function(){return R1(this,void 0,void 0,function(){return A1(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(B1.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var F1=B1;function B1(e){void 0===e&&(e=function(){return R1(t,void 0,void 0,function(){return A1(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var u={},Dr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},W1=(Object.defineProperty(u,"__esModule",{value:!0}),qr),q1=Dr(s);function z1(e){this._txc=e}Dr(e),z1.prototype.run=function(e,r){var n=this;return new q1.default(new W1.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},z1.prototype.commit=function(){var e=this;return new W1.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},z1.prototype.rollback=function(){var e=this;return new W1.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},z1.prototype.isOpen=function(){return this._txc.isOpen()},z1.prototype.close=function(){var e=this;return new W1.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},u.default=z1;g={},o=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function V1(e){e=e.run;this._run=e}Object.defineProperty(g,"__esModule",{value:!0}),o(s),o(u),V1.fromTransaction=function(e){return new V1({run:e.run.bind(e)})},V1.prototype.run=function(e,t){return this._run(e,t)},g.default=V1;var is={},H1=(Object.defineProperty(is,"__esModule",{value:!0}),e),G1=qr,Y1=P,K1=(H1.internal.logger.Logger,H1.error.SERVICE_UNAVAILABLE);function Z1(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=X1(void 0===t?3e4:t,3e4),this._initialDelay=X1(r,1e3),this._delayMultiplier=X1(n,2),this._delayJitter=X1(o,.2),this._logger=e}function X1(e,t){return e||0===e?e:t}Z1.prototype.retry=function(e){var a=this;return e.pipe((0,Y1.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,Y1.mergeMap)(function(e){if(!(0,H1.isRetriableError)(e))return(0,G1.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,H1.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),K1)).seenErrors=n,(0,G1.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,G1.of)(1).pipe((0,Y1.delay)(r))}))}))},Z1.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},is.default=Z1;var As=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Q1=(Object.defineProperty(Tr,"__esModule",{value:!0}),qr),J1=P,$1=As(s),Ws=e,eT=As(u),tT=As(g),rT=As(is),Hs=Ws.internal.constants,nT=Hs.ACCESS_MODE_READ,oT=Hs.ACCESS_MODE_WRITE,iT=Hs.TELEMETRY_APIS,uT=Ws.internal.txConfig.TxConfig;function aT(e){var e=void 0===e?{}:e,t=e.session,r=e.config,e=e.log;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new rT.default({maxRetryTimeout:e})}(r),this._log=e}aT.prototype.run=function(e,r,n){var o=this;return new $1.default(new Q1.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},aT.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:iT.UNMANAGED_TRANSACTION})},aT.prototype.readTransaction=function(e,t){return this._runTransaction(nT,e,t)},aT.prototype.writeTransaction=function(e,t){return this._runTransaction(oT,e,t)},aT.prototype.executeRead=function(e,t){return this._executeInTransaction(nT,e,t)},aT.prototype.executeWrite=function(e,t){return this._executeInTransaction(oT,e,t)},aT.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new tT.default({run:e.run.bind(e)})})},aT.prototype.close=function(){var e=this;return new Q1.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},aT.prototype[Symbol.asyncDispose]=function(){return this.close()},aT.prototype.lastBookmark=function(){return this.lastBookmarks()},aT.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},aT.prototype._beginTransaction=function(e,t,r){var n=this,o=uT.empty();return t&&(o=new uT(t,this._log)),new Q1.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new eT.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},aT.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),uT.empty()),u=(t&&(i=new uT(t)),{apiTelemetryConfig:{api:iT.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,Q1.of)(1).pipe((0,J1.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,J1.mergeMap)(function(t){return(0,Q1.defer)(function(){try{return r(n(t))}catch(e){return(0,Q1.throwError)(function(){return e})}}).pipe((0,J1.catchError)(function(e){return t.rollback().pipe((0,J1.concatWith)((0,Q1.throwError)(function(){return e})))}),(0,J1.concatWith)(t.commit()))})))},Tr.default=aT;var sT,cT,ds=r&&r.__extends||(sT=function(e,t){return(sT=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}sT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),h=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Q=(Object.defineProperty(B,"__esModule",{value:!0}),B.WRITE=B.READ=B.Driver=void 0,e),lT=h(Tr),fT=Q.internal.constants.FETCH_ALL,us=Q.driver.READ,pT=Q.driver.WRITE,T=(B.READ=us,B.WRITE=pT,ds(dT,cT=Q.Driver),dT.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 lT.default({session:this._newSession({defaultAccessMode:void 0===t?pT: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===fT)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(fT," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,log:this._log}),config:this._config,log:this._log})},dT);function dT(){return null!==cT&&cT.apply(this,arguments)||this}B.Driver=T,B.default=T;v={},Object.defineProperty(v,"__esModule",{value:!0}),v.default="5.24.0",i={},Cc={},Oc={};function hT(){}Object.defineProperty(Oc,"__esModule",{value:!0}),hT.prototype.selectReader=function(e){throw new Error("Abstract function")},hT.prototype.selectWriter=function(e){throw new Error("Abstract function")},Oc.default=hT;Pc={},Tc={};function bT(e){this._offset=e||0}Object.defineProperty(Tc,"__esModule",{value:!0}),bT.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},Tc.default=bT;var yT,_T,mc=r&&r.__extends||(yT=function(e,t){return(yT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Tl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vT=(Object.defineProperty(Pc,"__esModule",{value:!0}),Tl(Tc)),Qe=Tl(Oc),dl=(_T=Qe.default,mc(mT,_T),mT.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},mT.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},mT.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},mT);function mT(e){var t=_T.call(this)||this;return t._readersIndex=new vT.default,t._writersIndex=new vT.default,t._connectionPool=e,t}Pc.default=dl;Ar=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.LeastConnectedLoadBalancingStrategy=Cc.LoadBalancingStrategy=void 0,jc=Ar(Oc),Cc.LoadBalancingStrategy=jc.default,Af=Ar(Pc),Cc.LeastConnectedLoadBalancingStrategy=Af.default,Cc.default=Af.default,w={},Xf={},bp={},yp={},Ep={},bc={},Mf={},Lf={byteLength:function(e){var e=TT(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};Lf.toByteArray=function(e){var t,r,n=TT(e),o=n[0],n=n[1],i=new wT(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=OT[e.charCodeAt(r)]<<18|OT[e.charCodeAt(r+1)]<<12|OT[e.charCodeAt(r+2)]<<6|OT[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=OT[e.charCodeAt(r)]<<2|OT[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=OT[e.charCodeAt(r)]<<10|OT[e.charCodeAt(r+1)]<<4|OT[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},Lf.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 gT[e>>18&63]+gT[e>>12&63]+gT[e>>6&63]+gT[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(gT[t>>2]+gT[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(gT[t>>10]+gT[t>>4&63]+gT[t<<2&63]+"="));return o.join("")};for(var gT=[],OT=[],wT="undefined"!=typeof Uint8Array?Uint8Array:Array,ET="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",PT=0,ST=ET.length;PT<ST;++PT)gT[PT]=ET[PT],OT[ET.charCodeAt(PT)]=PT;function TT(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]}OT["-".charCodeAt(0)]=62,OT["_".charCodeAt(0)]=63;vc={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 jT=Mf;const Tx=Lf,jx=vc,Cx=(ml="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,jT.Buffer=A,jT.SlowBuffer=function(e){+e!=e&&(e=0);return A.alloc(+e)},jT.INSPECT_MAX_BYTES=50,2147483647);function CT(e){if(e>Cx)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,A.prototype),e}function A(e,t,r){if("number"!=typeof e)return IT(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return AT(e)}function IT(t,r,e){if("string"==typeof t){var n=t;var o=r;"string"==typeof o&&""!==o||(o="utf8");if(!A.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var i=0|xT(n,o);let e=CT(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return oj(o=t,Uint8Array)?MT((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):kT(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(oj(t,ArrayBuffer)||t&&oj(t.buffer,ArrayBuffer))return MT(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(oj(t,SharedArrayBuffer)||t&&oj(t.buffer,SharedArrayBuffer)))return MT(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 A.from(n,r,e);var u=function(e){{var t,r;if(A.isBuffer(e))return t=0|NT(e.length),0===(r=CT(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||ij(e.length)?CT(0):kT(e);if("Buffer"===e.type&&Array.isArray(e.data))return kT(e.data)}(t);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return A.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 RT(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 AT(e){return RT(e),CT(e<0?0:0|NT(e))}function kT(t){var r=t.length<0?0:0|NT(t.length);const n=CT(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function MT(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,A.prototype),n}function NT(e){if(e>=Cx)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Cx.toString(16)+" bytes");return 0|e}function xT(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||oj(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 tj(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return rj(e).length;default:if(o)return n?-1:tj(e).length;t=(""+t).toLowerCase(),o=!0}}function DT(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+=kx[o[e]];return t;return}case"utf8":case"utf-8":return qT(this,r,n);case"ascii":{var s=this;a=r;var c=n;let t="";c=Math.min(s.length,c);for(let e=a;e<c;++e)t+=String.fromCharCode(127&s[e]);return t;return}case"latin1":case"binary":{var l=this;i=r;var f=n;let t="";f=Math.min(l.length,f);for(let e=i;e<f;++e)t+=String.fromCharCode(l[e]);return t;return}case"base64":return d=this,b=n,0===(h=r)&&b===d.length?Tx.fromByteArray(d):Tx.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 UT(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function LT(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=ij(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=A.from(t,n)),A.isBuffer(t))return 0===t.length?-1:FT(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):FT(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function FT(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 BT(e,t,r,n){return nj(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 WT(e,t,r,n){return nj(function(t,r){var n,o;const i=[];for(let e=0;e<t.length&&!((r-=2)<0);++e)o=t.charCodeAt(e),n=o>>8,o=o%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function qT(u,e,t){t=Math.min(u.length,t);const r=[];let a=e;for(;a<t;){var s=u[a];let o=null,i=239<s?4:223<s?3:191<s?2:1;if(a+i<=t){let e,t,r,n;switch(i){case 1:s<128&&(o=s);break;case 2:128==(192&(e=u[a+1]))&&127<(n=(31&s)<<6|63&e)&&(o=n);break;case 3:e=u[a+1],t=u[a+2],128==(192&e)&&128==(192&t)&&2047<(n=(15&s)<<12|(63&e)<<6|63&t)&&(n<55296||57343<n)&&(o=n);break;case 4:e=u[a+1],t=u[a+2],r=u[a+3],128==(192&e)&&128==(192&t)&&128==(192&r)&&65535<(n=(15&s)<<18|(63&e)<<12|(63&t)<<6|63&r)&&n<1114112&&(o=n)}}null===o?(o=65533,i=1):65535<o&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}{var n=r,o=n.length;if(o<=Ix)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=Ix));return e}}jT.kMaxLength=Cx,(A.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(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}}),Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}}),A.poolSize=8192,A.from=IT,Object.setPrototypeOf(A.prototype,Uint8Array.prototype),Object.setPrototypeOf(A,Uint8Array),A.alloc=function(e,t,r){return t=t,r=r,RT(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?CT(e).fill(t,r):CT(e).fill(t):CT(e)},A.allocUnsafe=AT,A.allocUnsafeSlow=AT,A.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==A.prototype},A.compare=function(r,n){if(oj(r,Uint8Array)&&(r=A.from(r,r.offset,r.byteLength)),oj(n,Uint8Array)&&(n=A.from(n,n.offset,n.byteLength)),!A.isBuffer(r)||!A.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},A.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}},A.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return A.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=A.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(oj(e,Uint8Array))o+e.length>n.length?(e=A.isBuffer(e)?e:A.from(e)).copy(n,o):Uint8Array.prototype.set.call(n,e,o);else{if(!A.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},A.byteLength=xT,A.prototype._isBuffer=!0,A.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)UT(this,e,e+1);return this},A.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)UT(this,e,e+3),UT(this,e+1,e+2);return this},A.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)UT(this,e,e+7),UT(this,e+1,e+6),UT(this,e+2,e+5),UT(this,e+3,e+4);return this},A.prototype.toLocaleString=A.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?qT(this,0,e):DT.apply(this,arguments)},A.prototype.equals=function(e){if(A.isBuffer(e))return this===e||0===A.compare(this,e);throw new TypeError("Argument must be a Buffer")},A.prototype.inspect=function(){let e="";var t=jT.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},ml&&(A.prototype[ml]=A.prototype.inspect),A.prototype.compare=function(e,t,r,n,o){if(oj(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.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},A.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},A.prototype.indexOf=function(e,t,r){return LT(this,e,t,r,!0)},A.prototype.lastIndexOf=function(e,t,r){return LT(this,e,t,r,!1)},A.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(ij(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,nj(tj(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return BT(this,t,r,n);case"base64":return i=this,u=r,o=n,nj(rj(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return WT(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),s=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Ix=4096;function zT(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 VT(e,t,r,n,o,i){if(!A.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 HT(e,t,r,n,o){JT(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 GT(e,t,r,n,o){JT(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 YT(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 KT(e,t,r,n,o){return t=+t,r>>>=0,o||YT(e,0,r,4),jx.write(e,t,r,n,23,4),r+4}function ZT(e,t,r,n,o){return t=+t,r>>>=0,o||YT(e,0,r,8),jx.write(e,t,r,n,52,8),r+8}A.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,A.prototype),r},A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||zT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},A.prototype.readUintBE=A.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||zT(e,t,this.length);let n=this[e+--t],o=1;for(;0<t&&(o*=256);)n+=this[e+--t]*o;return n},A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e>>>=0,t||zT(e,1,this.length),this[e]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e>>>=0,t||zT(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e>>>=0,t||zT(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e>>>=0,t||zT(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e>>>=0,t||zT(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readBigUInt64LE=uj(function(e){$T(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||ej(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))}),A.prototype.readBigUInt64BE=uj(function(e){$T(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||ej(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)}),A.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||zT(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},A.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||zT(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},A.prototype.readInt8=function(e,t){return e>>>=0,t||zT(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){e>>>=0,t||zT(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},A.prototype.readInt16BE=function(e,t){e>>>=0,t||zT(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},A.prototype.readInt32LE=function(e,t){return e>>>=0,t||zT(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return e>>>=0,t||zT(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readBigInt64LE=uj(function(e){$T(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||ej(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)}),A.prototype.readBigInt64BE=uj(function(e){$T(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||ej(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)}),A.prototype.readFloatLE=function(e,t){return e>>>=0,t||zT(e,4,this.length),jx.read(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return e>>>=0,t||zT(e,4,this.length),jx.read(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return e>>>=0,t||zT(e,8,this.length),jx.read(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return e>>>=0,t||zT(e,8,this.length),jx.read(this,e,!1,52,8)},A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||VT(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},A.prototype.writeUintBE=A.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||VT(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},A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||VT(this,e,t,1,255,0),this[t]=255&e,t+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||VT(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||VT(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||VT(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},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||VT(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},A.prototype.writeBigUInt64LE=uj(function(e,t=0){return HT(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeBigUInt64BE=uj(function(e,t=0){return GT(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||VT(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},A.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||VT(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},A.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||VT(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},A.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||VT(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||VT(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||VT(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},A.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||VT(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},A.prototype.writeBigInt64LE=uj(function(e,t=0){return HT(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),A.prototype.writeBigInt64BE=uj(function(e,t=0){return GT(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),A.prototype.writeFloatLE=function(e,t,r){return KT(this,e,t,!0,r)},A.prototype.writeFloatBE=function(e,t,r){return KT(this,e,t,!1,r)},A.prototype.writeDoubleLE=function(e,t,r){return ZT(this,e,t,!0,r)},A.prototype.writeDoubleBE=function(e,t,r){return ZT(this,e,t,!1,r)},A.prototype.copy=function(e,t,r,n){if(!A.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},A.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&&!A.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=A.isBuffer(e)?e:A.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 Rx={};function XT(e,t,r){Rx[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 QT(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 JT(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 Rx.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,$T(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||ej(u,r.length-(n+1))}function $T(e,t){if("number"!=typeof e)throw new Rx.ERR_INVALID_ARG_TYPE(t,"number",e)}function ej(e,t,r){if(Math.floor(e)!==e)throw $T(e,r),new Rx.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new Rx.ERR_BUFFER_OUT_OF_BOUNDS;throw new Rx.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}XT("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),XT("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),XT("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=QT(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=QT(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const Ax=/[^+/0-9A-Za-z-_]/g;function tj(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 rj(e){return Tx.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Ax,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function nj(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 oj(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ij(e){return e!=e}const kx=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 uj(e){return"undefined"==typeof BigInt?aj:e}function aj(){throw new Error("BigInt not supported")}}var sj,Qp={},lc={},l=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)}),pd=(Object.defineProperty(lc,"__esModule",{value:!0}),k.prototype.getUInt8=function(e){throw new Error("Not implemented")},k.prototype.getInt8=function(e){throw new Error("Not implemented")},k.prototype.getFloat64=function(e){throw new Error("Not implemented")},k.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},k.prototype.putInt8=function(e,t){throw new Error("Not implemented")},k.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},k.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},k.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},k.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},k.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},k.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)},k.prototype.getSlice=function(e,t){return new lj(e,t,this)},k.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},k.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},k.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)},k.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)},k.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)},k.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},k.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},k.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},k.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},k.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},k.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},k.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},k.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},k.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},k.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},k.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},k.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},k.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},k.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},k.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},k.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},k.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},k.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},k.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},k.prototype.remaining=function(){return this.length-this.position},k.prototype.hasRemaining=function(){return 0<this.remaining()},k.prototype.reset=function(){this.position=0},k.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},k.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},k);function k(e){this.position=0,this.length=e}lc.default=pd;l(fj,cj=pd),fj.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},fj.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},fj.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},fj.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},fj.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},fj.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var cj,lj=fj;function fj(e,t,r){t=cj.call(this,t)||this;return t._start=e,t._inner=r,t}var pj,dj,gd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},wd=(Object.defineProperty(Qp,"__esModule",{value:!0}),Qp.BaseBuffer=void 0,gd(lc)),Rd=(Qp.BaseBuffer=wd.default,Qp.default=wd.default,r&&r.__extends||(pj=function(e,t){return(pj=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}pj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Dd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hj=(Object.defineProperty(bc,"__esModule",{value:!0}),bc.alloc=void 0,Dd(Mf)),_c=Dd(Qp),bj=(dj=_c.default,Rd(yj,dj),yj.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},yj.prototype.getInt8=function(e){return this._buffer.readInt8(e)},yj.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},yj.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},yj.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},yj.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},yj.prototype.putBytes=function(e,t){var r;t instanceof yj?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):dj.prototype.putBytes.call(this,e,t)},yj.prototype.getSlice=function(e,t){return new yj(this._buffer.slice(e,e+t))},yj);function yj(e){var t=this,e=(e=e)instanceof hj.default.Buffer?e:"number"==typeof e&&"function"==typeof hj.default.Buffer.alloc?hj.default.Buffer.alloc(e):new hj.default.Buffer(e);return(t=dj.call(this,e.length)||this)._buffer=e,t}bc.default=bj,bc.alloc=function(e){return new bj(e)};var Jp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_j=(Object.defineProperty(Ep,"__esModule",{value:!0}),Jp(bc)),vj=e,Fd=vj.internal.util,mj=Fd.ENCRYPTION_OFF,gj=Fd.ENCRYPTION_ON;function Oj(e,t,r){void 0===t&&(t=wj),void 0===r&&(r=function(e){return new WebSocket(e)});var n,o=this,t=(this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===gj}(e),n=function(e){return!1===e.encrypted||e.encrypted===mj}(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,vj.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:"'+mj+'"` 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 _j.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function wj(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}Oj.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,vj.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,vj.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))},Oj.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof _j.default))throw(0,vj.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()}}},Oj.prototype.close=function(){var r=this;return null===this._closingPromise&&(this._closingPromise=new Promise(function(e,t){r._clearConnectionTimeout(),r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._ws.onclose=function(){e()},r._ws.close()):e()})),this._closingPromise},Oj.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},Oj.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},Oj.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},Oj.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,vj.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))},Oj.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},Oj.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},Ep.default=Oj;var Ej,zd={},yc=r&&r.__extends||(Ej=function(e,t){return(Ej=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}Ej(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(zd,"__esModule",{value:!0});var Pj,y=e.internal.resolver.BaseHostNameResolver,fd=(yc(Sj,Pj=y),Sj.prototype.resolve=function(e){return this._resolveToItself(e)},Sj);function Sj(){return null!==Pj&&Pj.apply(this,arguments)||this}zd.default=fd;var Tj,j={},jj=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())})},Cj=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}}}},Jd=(Object.defineProperty(j,"__esModule",{value:!0}),j.default={load:function(t){return jj(this,void 0,void 0,function(){return Cj(this,function(e){return[2,t]})})}},r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}}),E=(Object.defineProperty(yp,"__esModule",{value:!0}),yp.ClientCertificatesLoader=yp.HostNameResolver=yp.Channel=void 0,Jd(Ep)),I=Jd(zd),Ed=Jd(j),dd=(yp.Channel=E.default,yp.HostNameResolver=I.default,yp.ClientCertificatesLoader=Ed.default,{}),$d={},nh=r&&r.__extends||(Tj=function(e,t){return(Tj=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}Tj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty($d,"__esModule",{value:!0});var Ij,Rj=bc,ah=(Ij=Qp.BaseBuffer,nh(Aj,Ij),Aj.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}},Aj.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}},Aj.prototype.getFloat64=function(e){for(var t=(0,Rj.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},Aj);function Aj(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=Ij.call(this,r)||this)._buffers=e,t}$d.default=ah;var kj,Mj,ph=r&&r.__extends||(kj=function(e,t){return(kj=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}kj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),_h=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Th=(Object.defineProperty(dd,"__esModule",{value:!0}),dd.Dechunker=dd.Chunker=void 0,_h(lc)),Nj=bc,xj=_h($d),Nh=(Mj=Th.default,ph(Dj,Mj),Dj.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},Dj.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},Dj.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},Dj.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},Dj.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,Nj.alloc)(this._bufferSize),this._chunkOpen=!1),this},Dj.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},Dj.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)},Dj.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},Dj);function Dj(e,t){var r=Mj.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,Nj.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function Uj(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}dd.Chunker=Nh,Uj.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},Uj.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},Uj.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)},Uj.prototype.CLOSED=function(e){},Uj.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 xj.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},Uj.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},dd.Dechunker=Uj;var Fh={},Lj=(Object.defineProperty(Fh,"__esModule",{value:!0}),e),zh=Lj.internal.util,Vh=zh.ENCRYPTION_OFF,sb=zh.ENCRYPTION_ON,Fj=Lj.error.SERVICE_UNAVAILABLE,Bj=[null,void 0,!0,!1,sb,Vh],Wj=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];Fh.default=function(e,t,r,n){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==Bj.indexOf(e))return e;throw(0,Lj.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(Bj))}(t),this.trust=function(e){e=e.trust;if(-1!==Wj.indexOf(e))return e;throw(0,Lj.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(Wj))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||Fj,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=n};var qj,zj,ab={},jb={},Qf={exports:{}};function Vj(e,t){for(var r in e)t[r]=e[r]}function Hj(e,t,r){return zj(e,t,r)}Eb=(hf=Qf).exports,(zj=(qj=Mf).Buffer).from&&zj.alloc&&zj.allocUnsafe&&zj.allocUnsafeSlow?hf.exports=qj:(Vj(qj,Eb),Eb.Buffer=Hj),Hj.prototype=Object.create(zj.prototype),Vj(zj,Hj),Hj.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return zj(e,t,r)},Hj.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=zj(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},Hj.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return zj(e)},Hj.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return qj.SlowBuffer(e)};var Gj=Qf.exports.Buffer,Yj=Gj.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 Kj(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||Gj.isEncoding!==Yj&&Yj(e))return t||e;throw new Error("Unknown encoding: "+e)}function Zj(e){var t;switch(this.encoding=Kj(e),this.encoding){case"utf16le":this.text=Jj,this.end=$j,t=4;break;case"utf8":this.fillLast=Qj,t=4;break;case"base64":this.text=eC,this.end=tC,t=3;break;default:return this.write=rC,void(this.end=nC)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Gj.allocUnsafe(t)}function Xj(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function Qj(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 Jj(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 $j(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 eC(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 tC(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function rC(e){return e.toString(this.encoding)}function nC(e){return e&&e.length?this.write(e):""}(jb.StringDecoder=Zj).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||""},Zj.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},Zj.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=Xj(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=Xj(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=Xj(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)},Zj.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 oC,iC,uC,aC,sC,Tb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cC=(Object.defineProperty(ab,"__esModule",{value:!0}),Tb(bc)),lC=e,fC=Tb(Mf),pC=new jb.StringDecoder("utf8");ab.default={encode:function(e){return new cC.default((e=e,"function"==typeof fC.default.Buffer.from?fC.default.Buffer.from(e,"utf8"):new fC.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 pC.write(e._buffer)},r=function(){return pC.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,lC.newError)("Don't know how to decode strings from '".concat(e,"'"))}},Ub=bp,oC=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]}),Lb=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||oC(t,e,r)},iC=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Ub,"__esModule",{value:!0}),Ub.utf8=Ub.alloc=Ub.ChannelConfig=void 0,Lb(yp,Ub),Lb(dd,Ub),uC=Fh,Object.defineProperty(Ub,"ChannelConfig",{enumerable:!0,get:function(){return iC(uC).default}}),aC=bc,Object.defineProperty(Ub,"alloc",{enumerable:!0,get:function(){return aC.alloc}}),sC=ab,Object.defineProperty(Ub,"utf8",{enumerable:!0,get:function(){return iC(sC).default}}),Object.defineProperty(Xf,"__esModule",{value:!0});var dC=bp,hC=e,bC=1616949271;function yC(e,t){return{major:e,minor:t}}function _C(){var e=[[yC(5,6),yC(5,0)],[yC(4,4),yC(4,2)],yC(4,1),yC(3,0)];if(4<e.length)throw(0,hC.newError)("It should not have more than 4 versions of the protocol");var o=(0,dC.alloc)(20);return o.writeInt32(bC),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}Xf.default=function(t,o){var i=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(i),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e,t){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw t.error("Handshake failed since server responded with HTTP."),(0,hC.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)");return Number(e[3]+"."+e[2])}(t,o);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(_C())})};var vC,Gb={},Qb={},ty={},R={},oy={},Py=r&&r.__extends||(vC=function(e,t){return(vC=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}vC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Cy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},My=(Object.defineProperty(oy,"__esModule",{value:!0}),Cy(e),mC.ofRecord=function(e){return null===e?mC.ofNull():new jC(e)},mC.ofMessageResponse=function(e){return null===e?mC.ofNull():new OC(e)},mC.ofNull=function(){return new PC},Object.defineProperty(mC.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(mC.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(mC.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(mC.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),mC);function mC(){}oy.default=My;Py(wC,gC=My),Object.defineProperty(wC.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(wC.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(wC.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(wC.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var gC,OC=wC;function wC(e){var t=gC.call(this)||this;return t._response=e,t}Py(SC,EC=My),Object.defineProperty(SC.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var EC,PC=SC;function SC(){return null!==EC&&EC.apply(this,arguments)||this}Py(CC,TC=My),Object.defineProperty(CC.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(CC.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(CC.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(CC.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var TC,jC=CC;function CC(e){var t=TC.call(this)||this;return t._record=e,t}var Ly={},By={},IC=(Object.defineProperty(By,"__esModule",{value:!0}),By.reuseOngoingRequest=By.identity=void 0,e);By.identity=function(e){return e},By.reuseOngoingRequest=function(o,i){void 0===i&&(i=null);var u=new Map;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=IC.json.stringify(e);if(u.has(r))return u.get(r);var n=o.apply(i,e);return u.set(r,n),n.finally(function(){u.delete(r)})}};var Qy={},RC=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(Qy,"__esModule",{value:!0}),Qy.equals=void 0,Qy.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=RC(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 AC,kC=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]}),MC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r_=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)&&kC(t,e,r);return MC(t,e),t},i_=(Object.defineProperty(Ly,"__esModule",{value:!0}),Ly.object=Ly.functional=void 0,Ly.functional=r_(By),Ly.object=r_(Qy),r&&r.__extends||(AC=function(e,t){return(AC=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}AC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),u_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},NC=(Object.defineProperty(R,"__esModule",{value:!0}),R.TelemetryObserver=R.ProcedureRouteObserver=R.RouteObserver=R.CompletedObserver=R.FailedObserver=R.ResetObserver=R.LogoffObserver=R.LoginObserver=R.ResultStreamObserver=R.StreamObserver=void 0,e),xC=u_(oy),DC=Ly,UC=NC.internal.constants.FETCH_ALL,LC=NC.error.PROTOCOL_ERROR,a_=(FC.prototype.onNext=function(e){},FC.prototype.onError=function(e){},FC.prototype.onCompleted=function(e){},FC);function FC(){}R.StreamObserver=a_;i_(WC,BC=a_),WC.prototype.pause=function(){this._paused=!0},WC.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},WC.prototype.onNext=function(e){this._haveRecordStreamed=!0;var t=new NC.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))},WC.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},WC.prototype.onError=function(e){this._state.onError(this,e)},WC.prototype.cancel=function(){this._discard=!0},WC.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(oI.STREAMING)},WC.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(oI.SUCCEEDED)},WC.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===oI.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===oI.READY&&this._handleStreaming()},WC.prototype._handleHasMore=function(e){this._setState(oI.READY),this._handleStreaming(),delete e.has_more},WC.prototype._handlePullSuccess=function(e){var t,r=this,n=this._enrichMetadata(Object.assign(this._server?{server:this._server}:{},this._meta,{stream_summary:{have_records_streamed:this._haveRecordStreamed,pulled:this._pulled,has_keys:0<this._fieldKeys.length}},e));[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(oI.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,NC.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),LC))},WC.prototype._handleRunSuccess=function(e,t){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&0<e.fields.length){this._fieldKeys=e.fields;for(var n=0;n<e.fields.length;n++)this._fieldLookup[e.fields[n]]=n}null!=e.fields&&delete e.fields,null!==e.qid&&void 0!==e.qid&&(this._queryId=e.qid,delete e.qid),this._storeMetadataForCompletion(e);var o=null,i=(this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys)),function(){r._head=r._fieldKeys,r._observers.some(function(e){return e.onKeys})&&r._observers.forEach(function(e){e.onKeys&&e.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),t()});o?Promise.resolve(o).then(i):i()}},WC.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(oI.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},WC.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},WC.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(oI.STREAMING)},WC.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},WC.prototype._setState=function(e){this._state=e},WC.prototype._setupAutoPull=function(){this._autoPull=!0};var BC,h_=WC;function WC(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?UC:o,i=e.beforeError,u=e.afterError,a=e.beforeKeys,s=e.afterKeys,c=e.beforeComplete,l=e.afterComplete,f=e.server,p=e.highRecordWatermark,p=void 0===p?Number.MAX_VALUE:p,d=e.lowRecordWatermark,d=void 0===d?Number.MAX_VALUE:d,e=e.enrichMetadata,h=BC.call(this)||this;return h._fieldKeys=null,h._fieldLookup=null,h._head=null,h._queuedRecords=[],h._tail=null,h._error=null,h._observers=[],h._meta={},h._server=f,h._beforeError=i,h._afterError=u,h._beforeKeys=a,h._afterKeys=s,h._beforeComplete=c,h._afterComplete=l,h._enrichMetadata=e||DC.functional.identity,h._queryId=null,h._moreFunction=r,h._discardFunction=n,h._discard=!1,h._fetchSize=o,h._lowRecordWatermark=d,h._highRecordWatermark=p,h._setState(t?oI.READY:oI.READY_STREAMING),h._setupAutoPull(),h._paused=!1,h._pulled=!t,h._haveRecordStreamed=!1,h}R.ResultStreamObserver=h_;i_(zC,qC=a_),zC.prototype.onNext=function(e){this.onError((0,NC.newError)("Received RECORD when initializing "+NC.json.stringify(e)))},zC.prototype.onError=function(e){this._onError&&this._onError(e)},zC.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var qC,Pd=zC;function zC(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=qC.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LoginObserver=Pd;i_(HC,VC=a_),HC.prototype.onNext=function(e){this.onError((0,NC.newError)("Received RECORD when logging off "+NC.json.stringify(e)))},HC.prototype.onError=function(e){this._onError&&this._onError(e)},HC.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var VC,__=HC;function HC(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=VC.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LogoffObserver=__;i_(YC,GC=a_),YC.prototype.onNext=function(e){this.onError((0,NC.newError)("Received RECORD when resetting: received record is: "+NC.json.stringify(e),LC))},YC.prototype.onError=function(e){e.code===LC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},YC.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var GC,m_=YC;function YC(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=GC.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}R.ResetObserver=m_;i_(ZC,KC=h_),ZC.prototype.onNext=function(e){this.onError((0,NC.newError)("Received RECORD when sending telemetry "+NC.json.stringify(e),LC))},ZC.prototype.onError=function(e){this._onError&&this._onError(e)},ZC.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var KC,E_=ZC;function ZC(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=KC.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.TelemetryObserver=E_;i_(QC,XC=h_);var XC,T_=QC;function QC(e){var t=e.error,e=e.onError,e=XC.call(this,{beforeError:e})||this;return e.onError(t),e}R.FailedObserver=T_;i_($C,JC=h_);var JC,M_=$C;function $C(){var e=JC.call(this)||this;return JC.prototype.markCompleted.call(e),e}R.CompletedObserver=M_;i_(tI,eI=a_),tI.prototype.onNext=function(e){this._records.push(e)},tI.prototype.onError=function(e){e.code===LC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},tI.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,NC.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+NC.json.stringify(this._records),LC)):this._onCompleted&&this._onCompleted(xC.default.ofRecord(this._records[0]))};var eI,cy=tI;function tI(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=eI.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}R.ProcedureRouteObserver=cy;i_(nI,rI=a_),nI.prototype.onNext=function(e){this.onError((0,NC.newError)("Received RECORD when resetting: received record is: "+NC.json.stringify(e),LC))},nI.prototype.onError=function(e){e.code===LC&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},nI.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(xC.default.ofMessageResponse(e))};var rI,F_=nI;function nI(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=rI.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}R.RouteObserver=F_;var oI={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(oI.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(){}}},iI=(Object.defineProperty(ty,"__esModule",{value:!0}),ty.assertNotificationFilterIsEmpty=ty.assertImpersonatedUserIsEmpty=ty.assertTxConfigIsEmpty=ty.assertDatabaseIsEmpty=void 0,e);ty.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,iI.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},ty.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,iI.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},ty.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,iI.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},ty.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,iI.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(iI.json.stringify(e),"."))).message),r.onError(t),t};var q_={},bf={},dy={},uI=(Object.defineProperty(dy,"__esModule",{value:!0}),dy.verifyStructSize=dy.Structure=void 0,e),aI=uI.error.PROTOCOL_ERROR,ev=(Object.defineProperty(sI.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),sI.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+"])"},sI);function sI(e,t){this.signature=e,this.fields=t}dy.Structure=ev,dy.verifyStructSize=function(e,t,r){if(t!==r)throw(0,uI.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),aI)},dy.default=ev,Object.defineProperty(bf,"__esModule",{value:!0}),bf.Unpacker=bf.Packer=void 0;var cI=bp,lI=Ly,fI=dy,pI=e,dI=pI.error.PROTOCOL_ERROR;function hI(e){this._ch=e,this._byteArraysSupported=!0}function bI(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}hI.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=lI.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,pI.int)(o))};if((0,pI.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 fI.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))},hI.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,pI.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},hI.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},hI.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))},hI.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},hI.prototype.packString=function(e){var e=cI.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,pI.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)}},hI.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,pI.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)}},hI.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,pI.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])},hI.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,pI.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)}},hI.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,pI.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)}},hI.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,pI.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},hI.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},hI.prototype._nonPackableValue=function(e){return function(){throw(0,pI.newError)(e,dI)}},bf.Packer=hI,bI.prototype.unpack=function(e,t){void 0===t&&(t=lI.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,pI.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,pI.newError)("Unknown packed value with marker "+r.toString(16))},bI.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,pI.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},bI.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},bI.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},bI.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,pI.int)(e):240<=e&&e<256?(0,pI.int)(e-256):200===e?(0,pI.int)(t.readInt8()):201===e?(0,pI.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,pI.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new pI.Integer(e,r)):null},bI.prototype._unpackString=function(e,t,r,n){return 128===t?cI.utf8.decode(n,r):208===e?cI.utf8.decode(n,n.readUInt8()):209===e?cI.utf8.decode(n,n.readUInt16()):210===e?cI.utf8.decode(n,n.readUInt32()):null},bI.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},bI.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},bI.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},bI.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},bI.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},bI.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},bI.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},bI.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new fI.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},bf.Unpacker=bI;var yI,_I,ov={},hv=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)}),vI=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]}),mI=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Jf=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)&&vI(t,e,r);return mI(t,e),t},av=(Object.defineProperty(ov,"__esModule",{value:!0}),ov.Unpacker=ov.Packer=void 0,Jf(bf)),$f=(_I=av.Packer,hv(gI,_I),gI.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},gI);function gI(){return null!==_I&&_I.apply(this,arguments)||this}ov.Packer=$f;OI=av.Unpacker,hv(wI,OI);var OI,sv=wI;function wI(e,t){return OI.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}ov.Unpacker=sv;var EI=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]}),PI=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),fv=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)&&EI(t,e,r);return PI(t,e),t},ep=(Object.defineProperty(q_,"__esModule",{value:!0}),q_.structure=q_.v2=q_.v1=void 0,fv(bf)),Sv=(q_.v1=ep,fv(ov)),Cv=(q_.v2=Sv,fv(dy)),p=(q_.structure=Cv,q_.default=Sv,{}),SI=(Object.defineProperty(p,"__esModule",{value:!0}),p.SIGNATURES=void 0,e),kv=SI.internal.constants,TI=kv.ACCESS_MODE_READ,jI=kv.FETCH_ALL,CI=SI.internal.util.assertString,Lv=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),S=(p.SIGNATURES=Lv,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(SI.json.stringify(t))})},M.pullAll=function(){return MI},M.reset=function(){return NI},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 AI(n,t=void 0===t?null:t),r&&(n.routing=r),new M(1,[n],function(){return"HELLO ".concat(SI.json.stringify(n))})},M.hello5x3=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),AI(o,r),n&&(o.routing=n),new M(1,[o],function(){return"HELLO ".concat(SI.json.stringify(o))})},M.hello5x5=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),kI(o,r),n&&(o.routing=n),new M(1,[o],function(){return"HELLO ".concat(SI.json.stringify(o))})},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=II(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new M(17,[t],function(){return"BEGIN ".concat(SI.json.stringify(t))})},M.begin5x5=function(e){var e=void 0===e?{}:e,t=II(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter,{appendNotificationFilter:kI});return new M(17,[t],function(){return"BEGIN ".concat(SI.json.stringify(t))})},M.commit=function(){return xI},M.rollback=function(){return DI},M.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=II(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(SI.json.stringify(t)," ").concat(SI.json.stringify(n))})},M.runWithMetadata5x5=function(e,t,r){var r=void 0===r?{}:r,n=II(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter,{appendNotificationFilter:kI});return new M(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(SI.json.stringify(t)," ").concat(SI.json.stringify(n))})},M.goodbye=function(){return UI},M.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=RI(null==t?-1:t,(void 0===e?jI:e)||jI);return new M(63,[r],function(){return"PULL ".concat(SI.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=RI(null==t?-1:t,(void 0===e?jI:e)||jI);return new M(47,[r],function(){return"DISCARD ".concat(SI.json.stringify(r))})},M.telemetry=function(e){var e=e.api,t=(0,SI.int)(e);return new M(84,[t],function(){return"TELEMETRY ".concat(t.toString())})},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(SI.json.stringify(e)," ").concat(SI.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(SI.json.stringify(e)," ").concat(SI.json.stringify(t)," ").concat(SI.json.stringify(n))})},M);function M(e,t,r){this.signature=e,this.fields=t,this.toString=r}function II(e,t,r,n,o,i,u){void 0===u&&(u={});var a={};return e.isEmpty()||(a.bookmarks=e.values()),null!==t.timeout&&(a.tx_timeout=t.timeout),t.metadata&&(a.tx_metadata=t.metadata),r&&(a.db=CI(r,"database")),o&&(a.imp_user=CI(o,"impersonatedUser")),n===TI&&(a.mode="r"),(null!=(e=u.appendNotificationFilter)?e:AI)(a,i),a}function RI(e,t){t={n:(0,SI.int)(t)};return-1!==e&&(t.qid=(0,SI.int)(e)),t}function AI(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_categories=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_categories=t.disabledClassifications))}function kI(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_classifications=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_classifications=t.disabledClassifications))}var MI=new(p.default=S)(63,[],function(){return"PULL_ALL"}),NI=new S(15,[],function(){return"RESET"}),xI=new S(18,[],function(){return"COMMIT"}),DI=new S(19,[],function(){return"ROLLBACK"}),UI=new S(2,[],function(){return"GOODBYE"}),Wv={},zv={},LI=(Object.defineProperty(zv,"__esModule",{value:!0}),zv.TypeTransformer=void 0,q_),FI=e.internal.objectUtil;function BI(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 WI(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)}BI.prototype.fromStructure=function(e){try{return e instanceof LI.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return FI.createBrokenObject(e)}},BI.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},zv.default=BI,WI.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new WI({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},zv.TypeTransformer=WI;var qI=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=(Object.defineProperty(Wv,"__esModule",{value:!0}),e),VI=q_,HI=zv,GI=zI.error.PROTOCOL_ERROR;Wv.default={createNodeTransformer:function(){return new HI.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof zI.Node},toStructure:function(e){throw(0,zI.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),GI)},fromStructure:function(e){VI.structure.verifyStructSize("Node",3,e.size);var e=qI(e.fields,3),t=e[0],r=e[1],e=e[2];return new zI.Node(t,r,e)}})},createRelationshipTransformer:function(){return new HI.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof zI.Relationship},toStructure:function(e){throw(0,zI.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),GI)},fromStructure:function(e){VI.structure.verifyStructSize("Relationship",5,e.size);var e=qI(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new zI.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new HI.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof zI.UnboundRelationship},toStructure:function(e){throw(0,zI.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),GI)},fromStructure:function(e){VI.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=qI(e.fields,3),t=e[0],r=e[1],e=e[2];return new zI.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new HI.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof zI.Path},toStructure:function(e){throw(0,zI.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),GI)},fromStructure:function(e){VI.structure.verifyStructSize("Path",3,e.size);for(var e=qI(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,zI.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof zI.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof zI.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new zI.PathSegment(i,c,a)),i=a}return new zI.Path(t[0],t[t.length-1],o)}})}};var YI=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]}),KI=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Yv=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)&&YI(t,e,r);return KI(t,e),t},Xv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ZI=(Object.defineProperty(Qb,"__esModule",{value:!0}),ty),XI=q_,QI=Yv(p),JI=R,$I=e,eR=Xv(Wv),tR=Xv(zv),rR=$I.internal.bookmarks.Bookmarks,$v=$I.internal.constants,nR=$v.ACCESS_MODE_WRITE,oR=$v.BOLT_PROTOCOL_V1,iR=($I.internal.logger.Logger,$I.internal.txConfig.TxConfig),f=(Object.defineProperty(N.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new tR.default(Object.values(eR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"version",{get:function(){return oR},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.boltAgent,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,u)}});return(0,ZI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(QI.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 JI.LogoffObserver({onCompleted:t,onError:r})),t=(0,$I.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 JI.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,$I.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:rR.empty(),txConfig:iR.empty(),mode:nR,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:rR.empty(),txConfig:iR.empty(),mode:nR,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 JI.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,ZI.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,ZI.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,ZI.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,ZI.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(QI.default.run(e,t),a,!1),this.write(QI.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 JI.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(QI.default.reset(),t,!0),t},N.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new JI.CompletedObserver;return t&&t(),e},N.prototype._createPacker=function(e){return new XI.v1.Packer(e)},N.prototype._createUnpacker=function(e,t){return new XI.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 XI.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},N.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===QI.SIGNATURES.HELLO||this._lastMessageSignature===QI.SIGNATURES.LOGON},N.prototype.isLastMessageReset=function(){return this._lastMessageSignature===QI.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}}Qb.default=f;var nm={},Gh={},cm={},uR=(Object.defineProperty(cm,"__esModule",{value:!0}),cm.epochSecondAndNanoToLocalDateTime=cm.nanoOfDayToLocalTime=cm.epochDayToDate=void 0,e),bm=uR.internal.temporalUtil,aR=bm.DAYS_0000_TO_1970,sR=bm.DAYS_PER_400_YEAR_CYCLE,cR=bm.NANOS_PER_HOUR,lR=bm.NANOS_PER_MINUTE,fR=bm.NANOS_PER_SECOND,pR=bm.SECONDS_PER_DAY,dR=bm.floorDiv,hR=bm.floorMod;function bR(e){var e=(e=(0,uR.int)(e)).add(aR).subtract(60),t=(0,uR.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(sR).subtract(1)).multiply(400),e=e.add(r.multiply(-sR))),e.multiply(400).add(591).div(sR)),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 uR.Date(r,n,e)}function yR(e){var t=(e=(0,uR.int)(e)).div(cR),r=(e=e.subtract(t.multiply(cR))).div(lR),n=(e=e.subtract(r.multiply(lR))).div(fR),e=e.subtract(n.multiply(fR));return new uR.LocalTime(t,r,n,e)}cm.epochDayToDate=bR,cm.nanoOfDayToLocalTime=yR,cm.epochSecondAndNanoToLocalDateTime=function(e,t){var r=dR(e,pR),e=hR(e,pR).multiply(fR).add(t),t=bR(r),r=yR(e);return new uR.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var _R=r&&r.__assign||function(){return(_R=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)},vR=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},gm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mR=(Object.defineProperty(Gh,"__esModule",{value:!0}),e),gR=q_,OR=zv,wR=cm,Tm=gm(Wv),O=mR.internal.temporalUtil,ER=O.dateToEpochDay,PR=O.localDateTimeToEpochSecond,SR=O.localTimeToNanoOfDay;function TR(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,mR.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}Gh.default=_R(_R({},Tm.default),{createPoint2DTransformer:function(){return new OR.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,mR.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new gR.structure.Structure(88,[(0,mR.int)(e.srid),e.x,e.y])},fromStructure:function(e){gR.structure.verifyStructSize("Point2D",3,e.size);var e=vR(e.fields,3),t=e[0],r=e[1],e=e[2];return new mR.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new OR.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,mR.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new gR.structure.Structure(89,[(0,mR.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){gR.structure.verifyStructSize("Point3D",4,e.size);var e=vR(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new mR.Point(t,r,n,e)}})},createDurationTransformer:function(){return new OR.TypeTransformer({signature:69,isTypeInstance:mR.isDuration,toStructure:function(e){var t=(0,mR.int)(e.months),r=(0,mR.int)(e.days),n=(0,mR.int)(e.seconds),e=(0,mR.int)(e.nanoseconds);return new gR.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){gR.structure.verifyStructSize("Duration",4,e.size);var e=vR(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new mR.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new OR.TypeTransformer({signature:116,isTypeInstance:mR.isLocalTime,toStructure:function(e){e=SR(e.hour,e.minute,e.second,e.nanosecond);return new gR.structure.Structure(116,[e])},fromStructure:function(e){gR.structure.verifyStructSize("LocalTime",1,e.size);e=vR(e.fields,1)[0];return TR((0,wR.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new OR.TypeTransformer({signature:84,isTypeInstance:mR.isTime,toStructure:function(e){var t=SR(e.hour,e.minute,e.second,e.nanosecond),e=(0,mR.int)(e.timeZoneOffsetSeconds);return new gR.structure.Structure(84,[t,e])},fromStructure:function(e){gR.structure.verifyStructSize("Time",2,e.size);var e=vR(e.fields,2),t=e[0],e=e[1],t=(0,wR.nanoOfDayToLocalTime)(t);return TR(new mR.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new OR.TypeTransformer({signature:68,isTypeInstance:mR.isDate,toStructure:function(e){e=ER(e.year,e.month,e.day);return new gR.structure.Structure(68,[e])},fromStructure:function(e){gR.structure.verifyStructSize("Date",1,e.size);e=vR(e.fields,1)[0];return TR((0,wR.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new OR.TypeTransformer({signature:100,isTypeInstance:mR.isLocalDateTime,toStructure:function(e){var t=PR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,mR.int)(e.nanosecond);return new gR.structure.Structure(100,[t,e])},fromStructure:function(e){gR.structure.verifyStructSize("LocalDateTime",2,e.size);var e=vR(e.fields,2),t=e[0],e=e[1];return TR((0,wR.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new OR.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,mR.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=PR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,mR.int)(e.nanosecond),e=e.timeZoneId;return new gR.structure.Structure(102,[t,r,e])},fromStructure:function(e){gR.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=vR(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,wR.epochSecondAndNanoToLocalDateTime)(t,r);return TR(new mR.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 OR.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,mR.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=PR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,mR.int)(e.nanosecond),e=(0,mR.int)(e.timeZoneOffsetSeconds);return new gR.structure.Structure(70,[t,r,e])},fromStructure:function(e){gR.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=vR(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,wR.epochSecondAndNanoToLocalDateTime)(t,r);return TR(new mR.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var jR,CR,Am=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)}),Dm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Bm=(Object.defineProperty(nm,"__esModule",{value:!0}),Dm(Qb)),IR=Dm(q_),Yh=e,RR=Dm(Gh),AR=Dm(zv),kR=Yh.internal.constants.BOLT_PROTOCOL_V2,Ym=(CR=Bm.default,Am(MR,CR),MR.prototype._createPacker=function(e){return new IR.default.Packer(e)},MR.prototype._createUnpacker=function(e,t){return new IR.default.Unpacker(e,t)},Object.defineProperty(MR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new AR.default(Object.values(RR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(MR.prototype,"version",{get:function(){return kR},enumerable:!1,configurable:!0}),MR);function MR(){return null!==CR&&CR.apply(this,arguments)||this}nm.default=Ym;var NR,xR,t0={},o0={},DR=r&&r.__assign||function(){return(DR=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)},l0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},p0=(Object.defineProperty(o0,"__esModule",{value:!0}),l0(Gh)),y0=(o0.default=DR({},p0.default),r&&r.__extends||(NR=function(e,t){return(NR=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}NR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),UR=r&&r.__assign||function(){return(UR=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)},O0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P0=(Object.defineProperty(t0,"__esModule",{value:!0}),O0(nm)),LR=O0(p),FR=ty,BR=R,WR=O0(o0),qR=O0(zv),zR=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),VR=e.internal.txConfig.TxConfig,HR="context",GR="CALL dbms.cluster.routing.getRoutingTable($".concat(HR,")"),YR=new BR.StreamObserver,sl=(xR=P0.default,y0(KR,xR),Object.defineProperty(KR.prototype,"version",{get:function(){return zR},enumerable:!1,configurable:!0}),Object.defineProperty(KR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new qR.default(Object.values(WR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),KR.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},KR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new BR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,FR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(LR.default.hello(r,n),e,!0),e},KR.prototype.prepareToClose=function(){this.write(LR.default.goodbye(),YR,!0)},KR.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 BR.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,FR.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,FR.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,FR.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(LR.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},KR.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new BR.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(LR.default.commit(),t,!0),t},KR.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new BR.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(LR.default.rollback(),t,!0),t},KR.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 BR.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,FR.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,FR.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,FR.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(LR.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(LR.default.pullAll(),c,b),c},KR.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(GR,((t={})[HR]=void 0===r?{}:r,t),UR(UR({},n),{txConfig:VR.empty()}));return new BR.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},KR);function KR(){return null!==xR&&xR.apply(this,arguments)||this}t0.default=sl;var ZR,XR,C0={},I0={},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)},x0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},L0=(Object.defineProperty(I0,"__esModule",{value:!0}),x0(o0)),iy=(I0.default=QR({},L0.default),r&&r.__extends||(ZR=function(e,t){return(ZR=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}ZR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),JR=r&&r.__assign||function(){return(JR=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)},z_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},W0=(Object.defineProperty(C0,"__esModule",{value:!0}),z_(t0)),$R=z_(p),eA=ty,tA=R,rA=z_(I0),nA=z_(zv),G0=(e.internal.bookmarks.Bookmarks,e.internal.constants),oA=G0.BOLT_PROTOCOL_V4_0,iA=G0.FETCH_ALL,uA=e.internal.txConfig.TxConfig,aA="context",sA="database",cA="CALL dbms.routing.getRoutingTable($".concat(aA,", $").concat(sA,")"),Z0=(XR=W0.default,iy(lA,XR),Object.defineProperty(lA.prototype,"version",{get:function(){return oA},enumerable:!1,configurable:!0}),Object.defineProperty(lA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new nA.default(Object.values(rA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),lA.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 tA.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,eA.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,eA.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write($R.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},lA.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===_?iA:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new tA.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,eA.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,eA.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write($R.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write($R.default.pull({n:_}),c,b),c},lA.prototype._requestMore=function(e,t,r){this.write($R.default.pull({stmtId:e,n:t}),r,!0)},lA.prototype._requestDiscard=function(e,t){this.write($R.default.discard({stmtId:e}),t,!0)},lA.prototype._noOp=function(){},lA.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(cA,((t={})[aA]=void 0===r?{}:r,t[sA]=n,t),JR(JR({},o),{txConfig:uA.empty()}));return new tA.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},lA);function lA(){return null!==XR&&XR.apply(this,arguments)||this}C0.default=Z0;var fA,pA,b={},ng={},dA=r&&r.__assign||function(){return(dA=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)},Wy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ag=(Object.defineProperty(ng,"__esModule",{value:!0}),Wy(I0)),kc=(ng.default=dA({},ag.default),r&&r.__extends||(fA=function(e,t){return(fA=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}fA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),pg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_l=(Object.defineProperty(b,"__esModule",{value:!0}),pg(C0)),hA=pg(p),bA=R,Hh=e,yA=ty,_A=pg(ng),vA=pg(zv),mA=Hh.internal.constants.BOLT_PROTOCOL_V4_1,n=(pA=_l.default,kc(gA,pA),Object.defineProperty(gA.prototype,"version",{get:function(){return mA},enumerable:!1,configurable:!0}),Object.defineProperty(gA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new vA.default(Object.values(_A.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),gA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new bA.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,yA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(hA.default.hello(r,n,this._serversideRouting),e,!0),e},gA);function gA(e,t,r,n,o,i,u){e=pA.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}b.default=n;var OA,wA,Eg={},Cg={},EA=r&&r.__assign||function(){return(EA=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)},ol=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},X=(Object.defineProperty(Cg,"__esModule",{value:!0}),ol(ng)),Zg=(Cg.default=EA({},X.default),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)})),m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_=(Object.defineProperty(Eg,"__esModule",{value:!0}),m(b)),C=e,PA=m(Cg),SA=m(zv),TA=C.internal.constants.BOLT_PROTOCOL_V4_2,t=(wA=_.default,Zg(jA,wA),Object.defineProperty(jA.prototype,"version",{get:function(){return TA},enumerable:!1,configurable:!0}),Object.defineProperty(jA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new SA.default(Object.values(PA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),jA);function jA(){return null!==wA&&wA.apply(this,arguments)||this}Eg.default=t;var Dr={},o={},CA=r&&r.__assign||function(){return(CA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},qr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P=(Object.defineProperty(o,"__esModule",{value:!0}),qr(Cg)),As=(o.default=CA({},P.default),{}),is={},IA=r&&r.__assign||function(){return(IA=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)},Hs=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ws=(Object.defineProperty(is,"__esModule",{value:!0}),Hs(o)),RA=(is.default=IA({},Ws.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}),h=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},AA=(Object.defineProperty(As,"__esModule",{value:!0}),q_),kA=e,MA=h(is),NA=cm,xA=By,DA=kA.internal.temporalUtil.localDateTimeToEpochSecond;var UA=new Map;function LA(e,t,r){e=e,UA.has(e)||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),UA.set(e,n));var n=UA.get(e),e=(0,kA.int)(t).multiply(1e3).add((0,kA.int)(r).div(1e6)).toNumber(),r=n.formatToParts(e).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:xA.identity:"hour"===t.type?e.hour=(0,kA.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,kA.int)(t.value)),e},{}),e=(r.year=r.adjustEra(r.year),DA(r.year,r.month,r.day,r.hour,r.minute,r.second,r.nanosecond));return r.timeZoneOffsetSeconds=e.subtract(t),r.hour=r.hour.modulo(24),r}function FA(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,kA.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}As.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return MA.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){AA.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=RA(e.fields,3),t=e[0],r=e[1],e=e[2],t=LA(e,t,r);return FA(new kA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,kA.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=DA(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=LA(r,i,o),n=DA(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=LA(r,i,o),DA(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,kA.int)(e.nanosecond),i=e.timeZoneId;return new AA.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return MA.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=DA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,kA.int)(e.nanosecond),e=(0,kA.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new AA.structure.Structure(73,[t,r,e])},fromStructure:function(e){AA.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=RA(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,kA.int)(t).add(e),t=(0,NA.epochSecondAndNanoToLocalDateTime)(t,r);return FA(new kA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var BA,WA,us=r&&r.__extends||(BA=function(e,t){return(BA=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}BA(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)},ds=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Q=(Object.defineProperty(Dr,"__esModule",{value:!0}),ds(Eg)),zA=ds(p),VA=R,HA=ty,GA=ds(o),YA=ds(As),KA=ds(zv),ZA=e.internal.bookmarks.Bookmarks,XA=e.internal.constants.BOLT_PROTOCOL_V4_3,T=(WA=Q.default,us(QA,WA),Object.defineProperty(QA.prototype,"version",{get:function(){return XA},enumerable:!1,configurable:!0}),Object.defineProperty(QA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new KA.default(Object.values(GA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),QA.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 VA.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||ZA.empty();return this.write(zA.default.route(t,e.values(),r),o,!0),o},QA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new VA.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,HA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(zA.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},QA.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},QA.prototype._applyUtcPatch=function(){var t=this;this._transformer=new KA.default(Object.values(qA(qA({},GA.default),YA.default)).map(function(e){return e(t._config,t._log)}))},QA);function QA(){return null!==WA&&WA.apply(this,arguments)||this}Dr.default=T;var JA,$A,Tc={},Tl=r&&r.__extends||(JA=function(e,t){return(JA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}JA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ek=r&&r.__assign||function(){return(ek=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)},Qe=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mc=(Object.defineProperty(Tc,"__esModule",{value:!0}),Qe(Dr)),dl=e,tk=Qe(p),rk=R,nk=ty,ok=Qe(is),ik=Qe(As),uk=Qe(zv),Oc=dl.internal.constants,ak=Oc.BOLT_PROTOCOL_V4_4,sk=Oc.FETCH_ALL,ck=dl.internal.bookmarks.Bookmarks,jc=($A=mc.default,Tl(lk,$A),Object.defineProperty(lk.prototype,"version",{get:function(){return ak},enumerable:!1,configurable:!0}),Object.defineProperty(lk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new uk.default(Object.values(ok.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),lk.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 rk.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||ck.empty();return this.write(tk.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},lk.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===_?sk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new rk.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,nk.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(tk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(tk.default.pull({n:_}),c,b),c},lk.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 rk.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,nk.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(tk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},lk.prototype._applyUtcPatch=function(){var t=this;this._transformer=new uk.default(Object.values(ek(ek({},ok.default),ik.default)).map(function(e){return e(t._config,t._log)}))},lk);function lk(){return null!==$A&&$A.apply(this,arguments)||this}Tc.default=jc;var Ar={},Pc={},fk=r&&r.__assign||function(){return(fk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},pk=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Af=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dk=(Object.defineProperty(Pc,"__esModule",{value:!0}),q_),hk=e,bk=Af(is),Lf=Af(As);Pc.default=fk(fk(fk({},bk.default),Lf.default),{createNodeTransformer:function(e){return bk.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){dk.structure.verifyStructSize("Node",4,e.size);var e=pk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new hk.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return bk.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){dk.structure.verifyStructSize("Relationship",8,e.size);var e=pk(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 hk.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return bk.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){dk.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=pk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new hk.UnboundRelationship(t,r,n,e)}})}});var yk,_k,vc=r&&r.__extends||(yk=function(e,t){return(yk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ml=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},l=(Object.defineProperty(Ar,"__esModule",{value:!0}),ml(Tc)),vk=ty,mk=ml(Pc),gk=ml(zv),Ok=ml(p),wk=R,Ek=e.internal.constants.BOLT_PROTOCOL_V5_0,pd=(_k=l.default,vc(Pk,_k),Object.defineProperty(Pk.prototype,"version",{get:function(){return Ek},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new gk.default(Object.values(mk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Pk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new wk.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(Ok.default.hello(r,n,this._serversideRouting),e,!0),e},Pk);function Pk(){return null!==_k&&_k.apply(this,arguments)||this}Ar.default=pd;var Sk,Tk,gd={},wd={},jk=r&&r.__assign||function(){return(jk=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}},_c=(Object.defineProperty(wd,"__esModule",{value:!0}),Dd(Pc)),Rd=(wd.default=jk({},_c.default),r&&r.__extends||(Sk=function(e,t){return(Sk=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}Sk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Ck=r&&r.__assign||function(){return(Ck=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)},Jp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fd=(Object.defineProperty(gd,"__esModule",{value:!0}),Jp(Ar)),Ik=ty,Rk=Jp(wd),Ak=Jp(zv),kk=Jp(p),Mk=R,Nk=e.internal.constants.BOLT_PROTOCOL_V5_1,yc=(Tk=Fd.default,Rd(xk,Tk),Object.defineProperty(xk.prototype,"version",{get:function(){return Nk},enumerable:!1,configurable:!0}),Object.defineProperty(xk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Ak.default(Object.values(Rk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(xk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),xk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new Mk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,Ik.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(kk.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Ck(Ck({},e),a.metadata))},onError:i,flush:!0})},xk.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 Mk.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(kk.default.logon(r),i,e),i},xk.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new Mk.LogoffObserver({onCompleted:t,onError:r});return this.write(kk.default.logoff(),t,e),t},xk);function xk(){return null!==Tk&&Tk.apply(this,arguments)||this}gd.default=yc;var Dk,Uk,y={},fd={},Lk=r&&r.__assign||function(){return(Lk=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)},Ep=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zd=(Object.defineProperty(fd,"__esModule",{value:!0}),Ep(wd)),Jd=(fd.default=Lk({},zd.default),r&&r.__extends||(Dk=function(e,t){return(Dk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Dk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Fk=r&&r.__assign||function(){return(Fk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},j=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E=(Object.defineProperty(y,"__esModule",{value:!0}),j(gd)),Bk=j(fd),Wk=j(zv),qk=j(p),zk=R,I=e.internal.constants,Vk=I.BOLT_PROTOCOL_V5_2,Hk=I.FETCH_ALL,Ed=(Uk=E.default,Jd(Gk,Uk),Object.defineProperty(Gk.prototype,"version",{get:function(){return Vk},enumerable:!1,configurable:!0}),Object.defineProperty(Gk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Wk.default(Object.values(Bk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(Gk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),Gk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new zk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write(qk.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Fk(Fk({},e),a.metadata))},onError:i,flush:!0})},Gk.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 zk.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(qk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},Gk.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===_?Hk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new zk.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(qk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(qk.default.pull({n:_}),c,b),c},Gk);function Gk(){return null!==Uk&&Uk.apply(this,arguments)||this}y.default=Ed;var Yk,Kk,nh={},ah={},Zk=r&&r.__assign||function(){return(Zk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},lc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_h=(Object.defineProperty(ah,"__esModule",{value:!0}),lc(fd)),$d=(ah.default=Zk({},_h.default),r&&r.__extends||(Yk=function(e,t){return(Yk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Yk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Xk=r&&r.__assign||function(){return(Xk=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)},Th=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ph=(Object.defineProperty(nh,"__esModule",{value:!0}),Th(y)),Qk=Th(ah),Jk=Th(zv),$k=Th(p),eM=R,tM=e.internal.constants.BOLT_PROTOCOL_V5_3,Nh=(Kk=ph.default,$d(rM,Kk),Object.defineProperty(rM.prototype,"version",{get:function(){return tM},enumerable:!1,configurable:!0}),Object.defineProperty(rM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Jk.default(Object.values(Qk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),rM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new eM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write($k.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(Xk(Xk({},e),s.metadata))},onError:u,flush:!0})},rM);function rM(){return null!==Kk&&Kk.apply(this,arguments)||this}nh.default=Nh;var nM,oM,zh={},sb={},iM=r&&r.__assign||function(){return(iM=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)},Vh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hf=(Object.defineProperty(sb,"__esModule",{value:!0}),Vh(ah)),Eb=(sb.default=iM({},hf.default),r&&r.__extends||(nM=function(e,t){return(nM=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}nM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Qf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Tb=(Object.defineProperty(zh,"__esModule",{value:!0}),Qf(nh)),uM=Qf(sb),aM=Qf(p),sM=R,cM=Qf(zv),lM=e.internal.constants.BOLT_PROTOCOL_V5_4,Mf=(oM=Tb.default,Eb(fM,oM),Object.defineProperty(fM.prototype,"version",{get:function(){return lM},enumerable:!1,configurable:!0}),Object.defineProperty(fM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new cM.default(Object.values(uM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),fM.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=t.onCompleted,t=new sM.TelemetryObserver({onCompleted:t,onError:r});return this.write(aM.default.telemetry({api:e}),t,!1),t},fM);function fM(){return null!==oM&&oM.apply(this,arguments)||this}zh.default=Mf;var pM,dM,jb={},yp={},hM=r&&r.__assign||function(){return(hM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Lb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dd=(Object.defineProperty(yp,"__esModule",{value:!0}),Lb(sb)),Fh=(yp.default=hM({},dd.default),r&&r.__extends||(pM=function(e,t){return(pM=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}pM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),bM=r&&r.__assign||function(){return(bM=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)},bc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ab=(Object.defineProperty(jb,"__esModule",{value:!0}),bc(zh)),yM=bc(yp),_M=bc(zv),vM=bc(p),mM=R,Ub=e.internal.constants,gM=Ub.BOLT_PROTOCOL_V5_5,OM=Ub.FETCH_ALL,wM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),Cy=(dM=ab.default,Fh(EM,dM),Object.defineProperty(EM.prototype,"version",{get:function(){return gM},enumerable:!1,configurable:!0}),Object.defineProperty(EM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new _M.default(Object.values(yM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),EM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new mM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(vM.default.hello5x5(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(bM(bM({},e),s.metadata))},onError:u,flush:!0})},EM.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 mM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(vM.default.begin5x5({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},EM.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===_?OM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new mM.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r,enrichMetadata:this._enrichMetadata}),l=y;return this.write(vM.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(vM.default.pull({n:_}),c,b),c},EM.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return bM(bM({},e),{description:null!=e.neo4j_code?e.status_description:e.description,diagnostic_record:null!==e.diagnostic_record?bM(bM({},wM),e.diagnostic_record):null})})),e},EM);function EM(){return null!==dM&&dM.apply(this,arguments)||this}jb.default=Cy;var PM,SM,Py={},My=r&&r.__extends||(PM=function(e,t){return(PM=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}PM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),TM=r&&r.__assign||function(){return(TM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},r_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qy=(Object.defineProperty(Py,"__esModule",{value:!0}),r_(jb)),jM=r_(yp),CM=r_(zv),IM=e.internal.constants.BOLT_PROTOCOL_V5_6,RM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),u_=(SM=Qy.default,My(AM,SM),Object.defineProperty(AM.prototype,"version",{get:function(){return IM},enumerable:!1,configurable:!0}),Object.defineProperty(AM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new CM.default(Object.values(jM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),AM.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return TM(TM({},e),{diagnostic_record:null!==e.diagnostic_record?TM(TM({},RM),e.diagnostic_record):null})})),e},AM);function AM(){return null!==SM&&SM.apply(this,arguments)||this}Py.default=u_;var Pd={},kM=(Object.defineProperty(Pd,"__esModule",{value:!0}),e);function MM(){}function NM(e){return e}var xM={onNext:MM,onCompleted:MM,onError:MM};function DM(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.log,e=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=t||NM,this._observer=Object.assign({onObserversCountChange:MM,onError:MM,onFailure:MM,onErrorApplyTransformation:NM},e)}Object.defineProperty(DM.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),DM.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(kM.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(kM.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(kM.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,kM.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(kM.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,kM.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,kM.newError)("Unknown Bolt protocol message: "+e))}},DM.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(DM.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),DM.prototype._queueObserver=function(e){return(e=e||xM).onCompleted=e.onCompleted||MM,e.onError=e.onError||MM,e.onNext=e.onNext||MM,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},DM.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)}},DM.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},DM.prototype._resetFailure=function(){this._currentFailure=null},Pd.default=DM;var UM,__=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},LM=(Object.defineProperty(Gb,"__esModule",{value:!0}),e),FM=__(Qb),BM=__(nm),WM=__(t0),qM=__(C0),zM=__(b),VM=__(Eg),HM=__(Dr),GM=__(Tc),YM=__(Ar),KM=__(gd),ZM=__(y),XM=__(nh),QM=__(zh),JM=__(jb),$M=__(Py),e2=__(Pd);Gb.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 e2.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 FM.default(p,d,h,y,v,_);case 2:return new BM.default(p,d,h,y,v,_);case 3:return new WM.default(p,d,h,y,v,_);case 4:return new qM.default(p,d,h,y,v,_);case 4.1:return new zM.default(p,d,h,y,v,_,b);case 4.2:return new VM.default(p,d,h,y,v,_,b);case 4.3:return new HM.default(p,d,h,y,v,_,b);case 4.4:return new GM.default(p,d,h,y,v,_,b);case 5:return new YM.default(p,d,h,y,v,_,b);case 5.1:return new KM.default(p,d,h,y,v,_,b);case 5.2:return new ZM.default(p,d,h,y,v,_,b);case 5.3:return new XM.default(p,d,h,y,v,_,b);case 5.4:return new QM.default(p,d,h,y,v,_,b);case 5.5:return new JM.default(p,d,h,y,v,_,b);case 5.6:return new $M.default(p,d,h,y,v,_,b);default:throw(0,LM.newError)("Unknown Bolt protocol version: "+f)}},m_=w,UM=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]}),E_=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||UM(t,e,r)},T_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(m_,"__esModule",{value:!0}),m_.RawRoutingTable=m_.BoltProtocol=void 0,h_=T_(Xf),M_=T_(Gb),cy=T_(Dr),T_=T_(oy),E_(R,m_),m_.BoltProtocol=cy.default,m_.RawRoutingTable=T_.default,m_.default={handshake:h_.default,create:M_.default};var t2,i_={},a_={},F_=r&&r.__extends||(t2=function(e,t){return(t2=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}t2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(a_,"__esModule",{value:!0});F_(n2,r2=e.ConnectionProvider),n2.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 r2,ev=n2;function n2(e){var t=r2.call(this)||this;return t._connection=e,t}a_.default=ev;var o2,Jf={},$f={},av={},hv=r&&r.__extends||(o2=function(e,t){return(o2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(av,"__esModule",{value:!0});hv(u2,i2=e.Connection),Object.defineProperty(u2.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),u2.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(u2.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(u2.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),u2.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},u2.prototype.write=function(e,t,r){throw new Error("not implemented")},u2.prototype.close=function(){throw new Error("not implemented")},u2.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var i2,sv=u2;function u2(e){var t=i2.call(this)||this;return t._errorHandler=e,t}av.default=sv;var a2,bf={},ep=r&&r.__extends||(a2=function(e,t){return(a2=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}a2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s2=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())})},c2=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}}}},ov=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},l2=(Object.defineProperty(bf,"__esModule",{value:!0}),bf.createChannelConnection=void 0,bp),f2=e,fv=ov(av),p2=ov(w),d2=f2.error.PROTOCOL_ERROR,h2=f2.internal.logger.Logger,b2=0;bf.createChannelConnection=function(i,u,a,s,e,c,t){void 0===c&&(c=null);var l=(t=void 0===t?function(e){return new l2.Channel(e)}:t)(new l2.ChannelConfig(i,u,a.errorCode(),e));return p2.default.handshake(l,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new l2.Chunker(l),o=new l2.Dechunker,t=new _2(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return p2.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onObserversCountChange:t._handleOngoingRequestsNumberChange.bind(t),onError:t._handleFatalError.bind(t),onFailure:t._resetOnFailure.bind(t),onProtocolError:t._handleProtocolError.bind(t),onErrorApplyTransformation:function(e){return t.handleAndTransformError(e,t._address)}}})},u.telemetryDisabled);return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};y2=fv.default,ep(v2,y2),v2.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},v2.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},v2.prototype._sendTelemetryIfEnabled=function(e){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||null==e||null==e.apiTelemetryConfig||this._protocol.telemetry({api:e.apiTelemetryConfig.api},{onCompleted:e.apiTelemetryConfig.onTelemetrySuccess,onError:e.beforeError})},v2.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},v2.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},v2.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(v2.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),v2.prototype.connect=function(t,n,o,i){return s2(this,void 0,void 0,function(){var r=this;return c2(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,f2.newError)("Connection does not support re-auth");return this._authToken=o,this._protocol.initialized?[3,2]:[4,this._initialize(t,n,o)];case 1:return[2,e.sent()];case 2:return i?[4,new Promise(function(e,t){r._protocol.logoff({onError:t}),r._protocol.logon({authToken:o,onError:t,onComplete:function(){return e(r)},flush:!0})})]:[3,4];case 3:return[2,e.sent()];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:o,flush:!0}),[2,this]}})})},v2.prototype._initialize=function(e,n,o){var i=this,u=this;return new Promise(function(r,t){i._protocol.initialize({userAgent:e,boltAgent:n,authToken:o,notificationFilter:i._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,i.version&&!t||(i.version=t),t=e.connection_id,i.databaseId||(i.databaseId=t),e.hints&&(null!=(t=e.hints["connection.recv_timeout_seconds"])&&(t=(0,f2.toNumber)(t),Number.isInteger(t)&&0<t?i._ch.setupReceiveTimeout(1e3*t):i._log.info("Server located at ".concat(i._address," supplied an invalid connection receive timeout value (").concat(t,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")),!0===e.hints["telemetry.enabled"]&&(i._telemetryDisabledConnection=!1))),r(u)}})})},v2.prototype.protocol=function(){return this._protocol},Object.defineProperty(v2.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),v2.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(f2.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},v2.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},v2.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},v2.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},v2.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},v2.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()}})})},v2.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},v2.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()})}}))},v2.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},v2.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},v2.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},v2.prototype.close=function(){return s2(this,void 0,void 0,function(){return c2(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]}})})},v2.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},v2.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,f2.newError)(e,d2);return this._handleFatalError(e),e};var y2,_2=v2;function v2(e,t,r,n,o,i,u,a,s,c){void 0===o&&(o=!1),void 0===i&&(i=null);var l,f,t=y2.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=b2++,t._address=r,t._server={address:r.asHostPort()},t._creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(l=t,new h2((f=n)._level,function(e,t){return f._loggerFunction(e,"".concat(l," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._telemetryDisabledDriverConfig=!0===c,t._telemetryDisabledConnection=!0,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}bf.default=_2;var m2,g2,dy={},Cv=r&&r.__extends||(m2=function(e,t){return(m2=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}m2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Sv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kv=(Object.defineProperty(dy,"__esModule",{value:!0}),Sv(av)),Lv=(g2=kv.default,Cv(O2,g2),O2.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},O2.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},O2.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},O2.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},O2.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(O2.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(O2.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(O2.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(O2.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(O2.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(O2.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(O2.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(O2.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(O2.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),O2.prototype.isOpen=function(){return this._delegate.isOpen()},O2.prototype.protocol=function(){return this._delegate.protocol()},O2.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},O2.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},O2.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},O2.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},O2.prototype.close=function(){return this._delegate.close()},O2.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},O2);function O2(e,t){var r=g2.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}dy.default=Lv;S={};Object.defineProperty(S,"__esModule",{value:!0});var w2,E2,P2,S2=e.error.SERVICE_UNAVAILABLE,T2=e.error.SESSION_EXPIRED;function j2(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||C2,this._handleWriteFailure=r||C2,this._handleSecurityError=n||C2}function C2(e){return e}j2.create=function(e){return new j2(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},j2.prototype.errorCode=function(){return this._errorCode},j2.prototype.handleAndTransformError=function(e,t,r){return null!=(n=e)&&null!=n.code&&n.code.startsWith("Neo.ClientError.Security.")?this._handleSecurityError(e,t,r):function(e){if(e)return e.code===T2||e.code===S2||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t,r):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t,r):e;var n},S.default=j2,Yv=$f,w2=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]}),E2=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Xv=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)&&w2(t,e,r);return E2(t,e),t},$v=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Yv,"__esModule",{value:!0}),Yv.createChannelConnection=Yv.ConnectionErrorHandler=Yv.DelegateConnection=Yv.ChannelConnection=Yv.Connection=void 0,f=$v(av),Yv.Connection=f.default,P2=Xv(bf),Yv.ChannelConnection=P2.default,Object.defineProperty(Yv,"createChannelConnection",{enumerable:!0,get:function(){return P2.createChannelConnection}}),Xv=$v(dy),Yv.DelegateConnection=Xv.default,Xv=$v(S),Yv.ConnectionErrorHandler=Xv.default,Yv.default=f.default;var bm={},I2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},R2=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},A2=(Object.defineProperty(bm,"__esModule",{value:!0}),e),k2=Ly;function M2(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,A2.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}M2.prototype.authenticate=function(e){var r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return I2(this,void 0,void 0,function(){var t;return R2(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!k2.object.equals(r.authToken,n)&&!0!==o||!0===u),null==r.authToken||t?[4,r.connect(this._userAgent,this._boltAgent,n,i||!1)]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,r];case 3:return[4,this._authTokenManager.getToken()];case 4:return t=e.sent(),k2.object.equals(t,r.authToken)?[3,6]:[4,r.connect(this._userAgent,this._boltAgent,t,!1)];case 5:return[2,e.sent()];case 6:return[2,r]}})})},M2.prototype.handleError=function(e){var t=e.connection,e=e.code;return!(!t||!e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},bm.default=M2;var gm={},N2=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())})},x2=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 D2(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(gm,"__esModule",{value:!0}),D2.prototype.check=function(r){return N2(this,void 0,void 0,function(){var t;return x2(this,function(e){switch(e.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(r)?[2,!0]:(t=Date.now()-r.idleTimestamp,0===this._connectionLivenessCheckTimeout||t>this._connectionLivenessCheckTimeout?[4,r.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,!0]}})})},Object.defineProperty(D2.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),D2.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},gm.default=D2;var Wv={},U2=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())})},L2=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}}}},F2=(Object.defineProperty(Wv,"__esModule",{value:!0}),bp);function B2(e){var t=e.clientCertificateProvider,e=e.loader;this._clientCertificateProvider=t,this._loader=e||F2.ClientCertificatesLoader,this._clientCertificate=null}B2.prototype.getClientCertificate=function(){return U2(this,void 0,void 0,function(){var t,r,n=this;return L2(this,function(e){switch(e.label){case 0:return(t=null!=this._clientCertificateProvider)?(r=null==this._clientCertificate)?[3,2]:[4,this._clientCertificateProvider.hasUpdate()]:[3,3];case 1:r=e.sent(),e.label=2;case 2:t=r,e.label=3;case 3:return t&&(this._clientCertificate=Promise.resolve(this._clientCertificateProvider.getClientCertificate()).then(this._loader.load).then(function(e){return n._clientCertificate=e,n._clientCertificate}).catch(function(e){throw n._clientCertificate=null,e})),[2,this._clientCertificate]}})})},Wv.default=B2;var W2,q2,O=r&&r.__extends||(W2=function(e,t){return(W2=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}W2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),z2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},V2=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}}}},H2=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},G2=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))},Tm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Y2=(Object.defineProperty(Jf,"__esModule",{value:!0}),$f),K2=e,Z2=Tm(bm),X2=Ly,Q2=Tm(gm),J2=Tm(Wv),$2=K2.error.SERVICE_UNAVAILABLE,eN=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],Dm=K2.internal.pool,tN=Dm.Pool,rN=Dm.PoolConfig,Yh=(q2=K2.ConnectionProvider,O(nN,q2),nN.prototype._createConnectionErrorHandler=function(){return new Y2.ConnectionErrorHandler($2)},nN.prototype._getClientCertificate=function(){return z2(this,void 0,void 0,function(){return V2(this,function(e){return[2,this._config.clientCertificate.getClientCertificate()]})})},nN.prototype._createConnection=function(e,r,n){var o=this,i=e.auth;return this._createChannelConnection(r).then(function(t){return t.release=function(){return t.idleTimestamp=Date.now(),n(r,t)},o._openConnections[t.id]=t,o._authenticationProvider.authenticate({connection:t,auth:i}).catch(function(e){throw o._destroyConnection(t),e})})},nN.prototype._validateConnectionOnAcquire=function(e,r){var n=e.auth,o=e.skipReAuth;return z2(this,void 0,void 0,function(){var t;return V2(this,function(e){switch(e.label){case 0:if(!this._validateConnection(r))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(r)];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not alive because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:r,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not valid because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 7:return[2]}})})},nN.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},nN.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},nN.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},nN.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return z2(this,void 0,void 0,function(){var t,r;return V2(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new K2.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]}})})},nN.prototype._verifyAuthentication=function(e){var u=e.getAddress,a=e.auth;return z2(this,void 0,void 0,function(){var t,r,n,o,i;return V2(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,K2.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(),eN.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]}})})},nN.prototype._verifyStickyConnection=function(e){var n=e.auth,o=e.connection;return e.address,z2(this,void 0,void 0,function(){var t,r;return V2(this,function(e){switch(e.label){case 0:return(t=X2.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,K2.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},nN.prototype.close=function(){return z2(this,void 0,void 0,function(){return V2(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]}})})},nN._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},nN._removeIdleObserverOnConnection=function(e){e._unsetIdle()},nN.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},nN);function nN(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,e=void 0===e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(tN.bind.apply(tN,G2([void 0],H2(e),!1)))}:e,s=(void 0===t&&(t=null),q2.call(this)||this);return s._id=r,s._config=n,s._log=o,s._clientCertificateHolder=new J2.default({clientCertificateProvider:s._config.clientCertificate}),s._authenticationProvider=new Z2.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new Q2.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(n){return z2(s,void 0,void 0,function(){var t,r;return V2(this,function(e){switch(e.label){case 0:return t=Y2.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent()]))]}})})},s._connectionPool=e({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validateOnAcquire:s._validateConnectionOnAcquire.bind(s),validateOnRelease:s._validateConnectionOnRelease.bind(s),installIdleObserver:nN._installIdleObserverOnConnection.bind(s),removeIdleObserver:nN._removeIdleObserverOnConnection.bind(s),config:rN.fromDriverConfig(n),log:s._log}),s._openConnections={},s}Jf.default=Yh;var oN,iN,Bm={},Am=r&&r.__extends||(oN=function(e,t){return(oN=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}oN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),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}}}},Ym=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},l0=(Object.defineProperty(Bm,"__esModule",{value:!0}),Ym(Jf)),sN=$f,Gh=e.internal.constants,cN=Gh.BOLT_PROTOCOL_V3,lN=Gh.BOLT_PROTOCOL_V4_0,fN=Gh.BOLT_PROTOCOL_V4_4,pN=Gh.BOLT_PROTOCOL_V5_1,dN=e.error.SERVICE_UNAVAILABLE,p0=(iN=l0.default,Am(hN,iN),hN.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return uN(this,void 0,void 0,function(){var t,r,n=this;return aN(this,function(e){switch(e.label){case 0:return t=sN.ConnectionErrorHandler.create({errorCode:dN,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r,o)}}),[4,this._connectionPool.acquire({auth:i,forceReAuth:u},this._address)];case 1:return(r=e.sent(),i)?[4,this._verifyStickyConnection({auth:i,connection:r,address:this._address})]:[3,3];case 2:return e.sent(),[2,r];case 3:return[2,new sN.DelegateConnection(r,t)]}})})},hN.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),iN.prototype._handleSecurityError.call(this,e,t,r)},hN.prototype._hasProtocolVersion=function(n){return uN(this,void 0,void 0,function(){var t,r;return aN(this,function(e){switch(e.label){case 0:return[4,this._createChannelConnection(this._address)];case 1:return t=e.sent(),r=t.protocol()?t.protocol().version:null,[4,t.close()];case 2:return e.sent(),r?[2,n(r)]:[2,!1]}})})},hN.prototype.supportsMultiDb=function(){return uN(this,void 0,void 0,function(){return aN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return lN<=e})];case 1:return[2,e.sent()]}})})},hN.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},hN.prototype.supportsTransactionConfig=function(){return uN(this,void 0,void 0,function(){return aN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return cN<=e})];case 1:return[2,e.sent()]}})})},hN.prototype.supportsUserImpersonation=function(){return uN(this,void 0,void 0,function(){return aN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return fN<=e})];case 1:return[2,e.sent()]}})})},hN.prototype.supportsSessionAuth=function(){return uN(this,void 0,void 0,function(){return aN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return pN<=e})];case 1:return[2,e.sent()]}})})},hN.prototype.verifyAuthentication=function(e){var r=e.auth;return uN(this,void 0,void 0,function(){var t=this;return aN(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},hN.prototype.verifyConnectivityAndGetServerInfo=function(){return uN(this,void 0,void 0,function(){return aN(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},hN);function hN(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,t=iN.call(this,{id:t,config:r,log:n,userAgent:i,boltAgent:u,authTokenManager:a,newPool:e})||this;return t._address=o,t}Bm.default=p0;var O0={},P0={},y0={},sl={},bN=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},yN=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))},_N=(Object.defineProperty(sl,"__esModule",{value:!0}),sl.createValidRoutingTable=void 0,e),x0=_N.internal.constants,vN=x0.ACCESS_MODE_WRITE,mN=x0.ACCESS_MODE_READ,gN=_N.internal.serverAddress.ServerAddress,ON=_N.error.PROTOCOL_ERROR,wN=(EN.fromRawRoutingTable=SN,EN.prototype.forget=function(e){this.readers=PN(this.readers,e),this.writers=PN(this.writers,e)},EN.prototype.forgetRouter=function(e){this.routers=PN(this.routers,e)},EN.prototype.forgetWriter=function(e){this.writers=PN(this.writers,e)},EN.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===mN&&0===this.readers.length||e===vN&&0===this.writers.length},EN.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},EN.prototype.allServers=function(){return yN(yN(yN([],bN(this.routers),!1),bN(this.readers),!1),bN(this.writers),!1)},EN.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,"]]")},EN);function EN(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,_N.int)(0),this.ttl=e}function PN(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function SN(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,_N.int)(Date.now()),n=(0,_N.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?_N.Integer.MAX_VALUE:n}catch(e){throw(0,_N.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(_N.json.stringify(t),"\nError message: ").concat(e.message),ON)}}(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=jN(e).map(function(e){return gN.fromUrl(e)}):"WRITE"===t?i=jN(e).map(function(e){return gN.fromUrl(e)}):"READ"===t&&(o=jN(e).map(function(e){return gN.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,_N.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(_N.json.stringify(t.servers),"\nError message: ").concat(e.message),ON)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return TN(u,"routers",t),TN(a,"readers",t),new wN({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function TN(e,t,r){if(0===e.length)throw(0,_N.newError)("Received no "+t+" from router "+r,ON)}function jN(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}sl.default=wN,sl.createValidRoutingTable=SN;var o0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},CN=(Object.defineProperty(y0,"__esModule",{value:!0}),o0(sl));function IN(e){this._routingContext=e}IN.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:CN.default.fromRawRoutingTable(r,n,e)})})},IN.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})})},y0.default=IN;var RN,AN,L0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},z_=(Object.defineProperty(P0,"__esModule",{value:!0}),P0.RoutingTable=P0.Rediscovery=void 0,L0(y0)),G0=(P0.Rediscovery=z_.default,L0(sl)),W0=(P0.RoutingTable=G0.default,P0.default=z_.default,r&&r.__extends||(RN=function(e,t){return(RN=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}RN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),kN=r&&r.__assign||function(){return(kN=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)},MN=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]}),NN=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),iy=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)&&MN(t,e,r);return NN(t,e),t},xN=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())})},DN=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}}}},UN=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.")},LN=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},Z0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},FN=(Object.defineProperty(O0,"__esModule",{value:!0}),e),BN=iy(P0),WN=bp,qN=Z0(a_),Wy=Z0(Jf),zN=Cc,VN=$f,HN=Ly,GN=FN.error.SERVICE_UNAVAILABLE,YN=FN.error.SESSION_EXPIRED,KN=FN.internal.bookmarks.Bookmarks,I0=FN.internal.constants,ZN=I0.ACCESS_MODE_READ,XN=I0.ACCESS_MODE_WRITE,QN=I0.BOLT_PROTOCOL_V3,JN=I0.BOLT_PROTOCOL_V4_0,$N=I0.BOLT_PROTOCOL_V4_4,ex=I0.BOLT_PROTOCOL_V5_1,tx=null,rx=(0,FN.int)(3e4),ag=(AN=Wy.default,W0(nx,AN),nx.prototype._createConnectionErrorHandler=function(){return new VN.ConnectionErrorHandler(YN)},nx.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||tx),e},nx.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),AN.prototype._handleSecurityError.call(this,e,t,r,n)},nx.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||tx),(0,FN.newError)("No longer possible to write to server at "+t,YN,e)},nx.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 xN(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return DN(this,function(e){switch(e.label){case 0:return n={database:c||tx},o=new VN.ConnectionErrorHandler(YN,function(e,t){return a._handleUnavailability(e,t,n.database)},function(e,t){return a._handleWriteFailure(e,t,n.database)},function(e,t,r){return a._handleSecurityError(e,t,r,n.database)}),[4,this._freshRoutingTable({accessMode:s,database:n.database,bookmarks:l,impersonatedUser:f,auth:d,onDatabaseNameResolved:function(e){n.database=n.database||e,p&&p(e)}})];case 1:if(u=e.sent(),s===ZN)r=this._loadBalancingStrategy.selectReader(u.readers),t="read";else{if(s!==XN)throw(0,FN.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(u.writers),t="write"}if(!r)throw(0,FN.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(u),YN);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 VN.DelegateConnection(i,o)];case 6:throw u=e.sent(),o.handleAndTransformError(u,r);case 7:return[2]}})})},nx.prototype._hasProtocolVersion=function(u){return xN(this,void 0,void 0,function(){var t,r,n,o,i;return DN(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=e.sent(),n=0,e.label=2;case 2:if(!(n<t.length))return[3,8];e.label=3;case 3:return e.trys.push([3,6,,7]),[4,this._createChannelConnection(t[n])];case 4:return i=e.sent(),o=i.protocol()?i.protocol().version:null,[4,i.close()];case 5:return e.sent(),o?[2,u(o)]:[2,!1];case 6:return i=e.sent(),r=i,[3,7];case 7:return n++,[3,2];case 8:if(r)throw r;return[2,!1]}})})},nx.prototype.supportsMultiDb=function(){return xN(this,void 0,void 0,function(){return DN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return JN<=e})];case 1:return[2,e.sent()]}})})},nx.prototype.supportsTransactionConfig=function(){return xN(this,void 0,void 0,function(){return DN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return QN<=e})];case 1:return[2,e.sent()]}})})},nx.prototype.supportsUserImpersonation=function(){return xN(this,void 0,void 0,function(){return DN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return $N<=e})];case 1:return[2,e.sent()]}})})},nx.prototype.supportsSessionAuth=function(){return xN(this,void 0,void 0,function(){return DN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return ex<=e})];case 1:return[2,e.sent()]}})})},nx.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},nx.prototype.verifyAuthentication=function(e){var n=e.database,o=e.accessMode,i=e.auth;return xN(this,void 0,void 0,function(){var t=this;return DN(this,function(e){return[2,this._verifyAuthentication({auth:i,getAddress:function(){return xN(t,void 0,void 0,function(){var t,r;return DN(this,function(e){switch(e.label){case 0:return t={database:n||tx},[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===XN?r.writers:r.readers).length)throw(0,FN.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),GN);return[2,r[0]]}})})}})]})})},nx.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return xN(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return DN(this,function(e){switch(e.label){case 0:return t={database:l||tx},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===XN?r.writers:r.readers,n=(0,FN.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),GN),e.label=2;case 2:e.trys.push([2,9,10,11]),o=UN(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}})})},nx.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},nx.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},nx.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 BN.RoutingTable({database:r})});return u.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(u)),this._refreshRoutingTable(u,n,o,e).then(function(e){return i(e.database),e})):u},nx.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)},nx.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return xN(this,void 0,void 0,function(){var t,r,n,o,i;return DN(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=LN.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],r)?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(u,a,s,c,l)];case 3:i=LN.apply(void 0,[e.sent(),2]),o=i[0],i=i[1],r=o,n=i||n,e.label=4;case 4:return[4,this._applyRoutingTableIfPossible(a,r,n)];case 5:return[2,e.sent()]}})})},nx.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return xN(this,void 0,void 0,function(){var t,r,n;return DN(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=LN.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a,s)];case 2:n=LN.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,r)];case 4:return[2,e.sent()]}})})},nx.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return xN(this,void 0,void 0,function(){var t,r;return DN(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=LN.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,nx._forgetRouter(o,n,r),[2,[null,t]])}})})},nx.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return xN(this,void 0,void 0,function(){var t;return DN(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()]}})})},nx.prototype._resolveSeedRouter=function(n){return xN(this,void 0,void 0,function(){var t,r=this;return DN(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)]}})})},nx.prototype._fetchRoutingTable=function(s,c,l,f,p){return xN(this,void 0,void 0,function(){var t=this;return DN(this,function(e){return[2,s.reduce(function(i,u,a){return xN(t,void 0,void 0,function(){var t,r,n,o;return DN(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=LN.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(nx._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=LN.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]))]})})},nx.prototype._createSessionForRediscovery=function(o,i,u,a){return xN(this,void 0,void 0,function(){var t,r,n=this;return DN(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=VN.ConnectionErrorHandler.create({errorCode:YN,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new VN.DelegateConnection(t):new VN.DelegateConnection(t,r),r=new qN.default(r),t.protocol().version<4?[2,[new FN.Session({mode:XN,bookmarks:KN.empty(),connectionProvider:r}),null]]:[2,[new FN.Session({mode:ZN,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},nx.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,FN.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),GN,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},nx.prototype._applyRoutingTableIfPossible=function(t,r,n){return xN(this,void 0,void 0,function(){return DN(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,FN.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),GN,n);case 1:return e.sent(),[2,r]}})})},nx.prototype._updateRoutingTable=function(t){return xN(this,void 0,void 0,function(){return DN(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return e.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),this._log.info("Updated routing table ".concat(t)),[2]}})})},nx._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},nx);function nx(e){var t=e.id,r=e.address,n=e.routingContext,o=e.hostNameResolver,i=e.config,u=e.log,a=e.userAgent,s=e.boltAgent,c=e.authTokenManager,l=e.routingTablePurgeDelay,e=e.newPool,f=AN.call(this,{id:t,config:i,log:u,userAgent:a,boltAgent:s,authTokenManager:c,newPool:e},function(n){return xN(f,void 0,void 0,function(){var t,r;return DN(this,function(e){switch(e.label){case 0:return t=VN.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent(),this._routingContext]))]}})})})||this;return f._routingContext=kN(kN({},n),{address:r.toString()}),f._seedRouter=r,f._rediscovery=new BN.default(f._routingContext),f._loadBalancingStrategy=new zN.LeastConnectedLoadBalancingStrategy(f._connectionPool),f._hostNameResolver=o,f._dnsResolver=new WN.HostNameResolver,f._log=u,f._useSeedRouter=!0,f._routingTableRegistry=new wx(l?(0,FN.int)(l):rx),f._refreshRoutingTable=HN.functional.reuseOngoingRequest(f._refreshRoutingTable,f),f}O0.default=ag;Ex.prototype.register=function(e){return this._tables.set(e.database,e),this},Ex.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},Ex.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},Ex.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},Ex.prototype._forEach=function(e){var t,r;try{for(var n=UN(this._tables),o=n.next();!o.done;o=n.next())e(LN(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},Ex.prototype._remove=function(e){return this._tables.delete(e),this},Ex.prototype._removeIf=function(e){var t,r;try{for(var n=UN(this._tables),o=n.next();!o.done;o=n.next()){var i=LN(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 ox,ix,ux,ax,sx,cx,lx,fx,px,dx,hx,x,bx,yx,_x,vx,mx,gx,Ox,wx=Ex;function Ex(e){this._tables=new Map,this._routingTablePurgeDelay=e}function Px(e,t,r){void 0===r&&(r={}),_x(e,"Bolt URL");var n,o=gx.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=yx,r.trust=n,r.clientCertificate=(0,x.resolveCertificateProvider)(r.clientCertificate)}var a=function(e){if("object"==typeof(t=e)&&null!=t&&"getToken"in t&&"handleSecurityException"in t&&"function"==typeof t.getToken&&"function"==typeof t.handleSecurityException)return e;var t=e;return(t=t||{}).scheme=t.scheme||"none",(0,x.staticAuthTokenManager)({authToken:t})}(t),s=(r.userAgent=r.userAgent||Ox,r.boltAgent=x.internal.boltAgent.fromVersion(hx.default),mx.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new dx.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new bx.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(vx(o.query))return function(e,t,r){return new bx.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function Sx(r,n){return fx(this,void 0,void 0,function(){var t;return px(this,function(e){switch(e.label){case 0:t=Px(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 pg=i_,ox=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(pg,"__esModule",{value:!0}),pg.RoutingConnectionProvider=pg.DirectConnectionProvider=pg.PooledConnectionProvider=pg.SingleConnectionProvider=void 0,ix=a_,Object.defineProperty(pg,"SingleConnectionProvider",{enumerable:!0,get:function(){return ox(ix).default}}),ux=Jf,Object.defineProperty(pg,"PooledConnectionProvider",{enumerable:!0,get:function(){return ox(ux).default}}),ax=Bm,Object.defineProperty(pg,"DirectConnectionProvider",{enumerable:!0,get:function(){return ox(ax).default}}),sx=O0,Object.defineProperty(pg,"RoutingConnectionProvider",{enumerable:!0,get:function(){return ox(sx).default}}),Hh=i,cx=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]}),lx=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_l=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&cx(t,e,r);return lx(t,e),t},kc=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||cx(t,e,r)},Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.packstream=Hh.channel=Hh.buf=Hh.bolt=Hh.loadBalancing=void 0,Hh.loadBalancing=_l(Cc),Hh.bolt=_l(w),Hh.buf=_l(Qp),Hh.channel=_l(bp),Hh.packstream=_l(q_),kc(i_,Hh),n=F,fx=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())})},px=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}}}},ol=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(n,"__esModule",{value:!0}),n.UnboundRelationship=n.Relationship=n.Node=n.Record=n.ServerInfo=n.GqlStatusObject=n.Notification=n.QueryStatistics=n.ProfiledPlan=n.Plan=n.ResultSummary=n.RxResult=n.RxManagedTransaction=n.RxTransaction=n.RxSession=n.EagerResult=n.Result=n.ManagedTransaction=n.Transaction=n.Session=n.Driver=n.temporal=n.spatial=n.graph=n.error=n.routing=n.session=n.types=n.logging=n.auth=n.isRetryableError=n.Neo4jError=n.integer=n.isUnboundRelationship=n.isRelationship=n.isPathSegment=n.isPath=n.isNode=n.isDateTime=n.isLocalDateTime=n.isDate=n.isTime=n.isLocalTime=n.isDuration=n.isPoint=n.isInt=n.int=n.hasReachableServer=n.driver=n.authTokenManagers=void 0,n.clientCertificateProviders=n.notificationFilterMinimumSeverityLevel=n.notificationFilterDisabledClassification=n.notificationFilterDisabledCategory=n.notificationSeverityLevel=n.notificationClassification=n.notificationCategory=n.resultTransformers=n.bookmarkManager=n.DateTime=n.LocalDateTime=n.Date=n.Time=n.LocalTime=n.Duration=n.Integer=n.Point=n.PathSegment=n.Path=void 0,dx=B,Object.defineProperty(n,"Driver",{enumerable:!0,get:function(){return dx.Driver}}),hx=ol(v),x=e,Object.defineProperty(n,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(n,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(n,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(n,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(n,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(n,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(n,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(n,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(n,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(n,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(n,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(n,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(n,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(n,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(n,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(n,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(n,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(n,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(n,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(n,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(n,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(n,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(n,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(n,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(n,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(n,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(n,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(n,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(n,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(n,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(n,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(n,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(n,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(n,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(n,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(n,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(n,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(n,"GqlStatusObject",{enumerable:!0,get:function(){return x.GqlStatusObject}}),Object.defineProperty(n,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(n,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(n,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(n,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(n,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(n,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(n,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(n,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(n,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(n,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(n,"notificationClassification",{enumerable:!0,get:function(){return x.notificationClassification}}),Object.defineProperty(n,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(n,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(n,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return x.notificationFilterDisabledClassification}}),Object.defineProperty(n,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(n,"clientCertificateProviders",{enumerable:!0,get:function(){return x.clientCertificateProviders}}),bx=i,ng=ol(Tr),n.RxSession=ng.default,X=ol(u),n.RxTransaction=X.default,m=ol(g),n.RxManagedTransaction=m.default,ol=ol(s),n.RxResult=ol.default,C=x.internal.util,yx=C.ENCRYPTION_ON,_x=C.assertString,vx=C.isEmptyObjectOrNull,mx=x.internal.serverAddress.ServerAddress,gx=x.internal.urlUtil,Ox="neo4j-javascript/"+hx.default,n.driver=Px,n.hasReachableServer=Sx,C={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},n.logging=C,_={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},n.types=_,Zg={READ:dx.READ,WRITE:dx.WRITE},n.session=Zg,t={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},n.integer=t,qr={isPoint:x.isPoint},n.spatial=qr,Cg={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},n.temporal=Cg,P={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},n.graph=P,t={authTokenManagers:x.authTokenManagers,driver:Px,hasReachableServer:Sx,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:t,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:C,types:_,session:Zg,routing:x.routing,error:x.error,graph:P,spatial:qr,temporal:Cg,Driver:dx.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:ng.default,RxTransaction:X.default,RxManagedTransaction:m.default,RxResult:ol.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,GqlStatusObject:x.GqlStatusObject,ServerInfo:x.ServerInfo,Record:x.Record,Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,Path:x.Path,PathSegment:x.PathSegment,Point:x.Point,Integer:x.Integer,Duration:x.Duration,LocalTime:x.LocalTime,Time:x.Time,Date:x.Date,LocalDateTime:x.LocalDateTime,DateTime:x.DateTime,bookmarkManager:x.bookmarkManager,resultTransformers:x.resultTransformers,notificationCategory:x.notificationCategory,notificationSeverityLevel:x.notificationSeverityLevel,notificationFilterDisabledCategory:x.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:x.notificationFilterMinimumSeverityLevel,clientCertificateProviders:x.clientCertificateProviders},n.default=t,D(F)});
|