neo4j-driver
Version:
The official Neo4j driver for Javascript
1 lines • 540 kB
JavaScript
!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"),z=(t.SERVICE_UNAVAILABLE=W,"SessionExpired"),q=(t.SESSION_EXPIRED=z,t.PROTOCOL_ERROR="ProtocolError",L=Error,n(V,L),V.isRetriable=function(e){return null!=e&&e instanceof V&&e.retriable},V);function V(e,t,r){e=L.call(this,e,null!=r?{cause:r}:void 0)||this;return e.constructor=V,e.__proto__=V.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===W||r===z||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=q,t.newError=function(e,t,r){return new q(e,null!=t?t:"N/A",r)};n=q.isRetriable;t.isRetriableError=n;var n={},H=(Object.defineProperty(n,"__esModule",{value:!0}),n.toString=n.toNumber=n.inSafeRange=n.isInt=n.int=void 0,t),G=new Map,Y=(d.prototype.inSafeRange=function(){return this.greaterThanOrEqual(d.MIN_SAFE_VALUE)&&this.lessThanOrEqual(d.MAX_SAFE_VALUE)},d.prototype.toInt=function(){return this.low},d.prototype.toNumber=function(){return this.high*K+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(K)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(K)+BigInt(e.low>>>0)))},d.prototype.toNumberOrInfinity=function(){return this.lessThan(d.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(d.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},d.prototype.toString=function(e){if((e=null!=e?e:10)<2||36<e)throw RangeError("radix out of range: "+e.toString());if(this.isZero())return"0";var t,r,n;if(this.isNegative())return this.equals(d.MIN_VALUE)?(t=d.fromNumber(e),n=(r=this.div(t)).multiply(t).subtract(this),r.toString(e)+n.toInt().toString(e)):"-"+this.negate().toString(e);for(var o=d.fromNumber(Math.pow(e,6)),i=(n=this,"");;){var u=n.div(o),a=(n.subtract(u.multiply(o)).toInt()>>>0).toString(e);if((n=u).isZero())return a+i;for(;a.length<6;)a="0"+a;i=""+a+i}},d.prototype.valueOf=function(){return this.toBigInt()},d.prototype.getHighBits=function(){return this.high},d.prototype.getLowBits=function(){return this.low},d.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(d.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,t=0,t=31;0<t&&0==(e&1<<t);t--);return 0!==this.high?t+33:t+1},d.prototype.isZero=function(){return 0===this.high&&0===this.low},d.prototype.isNegative=function(){return this.high<0},d.prototype.isPositive=function(){return 0<=this.high},d.prototype.isOdd=function(){return 1==(1&this.low)},d.prototype.isEven=function(){return 0==(1&this.low)},d.prototype.equals=function(e){e=d.fromValue(e);return this.high===e.high&&this.low===e.low},d.prototype.notEquals=function(e){return!this.equals(e)},d.prototype.lessThan=function(e){return this.compare(e)<0},d.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},d.prototype.greaterThan=function(e){return 0<this.compare(e)},d.prototype.greaterThanOrEqual=function(e){return 0<=this.compare(e)},d.prototype.compare=function(e){e=d.fromValue(e);if(this.equals(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r||(t||!r)&&this.subtract(e).isNegative()?-1:1},d.prototype.negate=function(){return this.equals(d.MIN_VALUE)?d.MIN_VALUE:this.not().add(d.ONE)},d.prototype.add=function(e){var e=d.fromValue(e),t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,s=0,c=0,l=0,f=0;return c+=(l=l+((f+=o+(65535&e.low))>>>16)+(n+a))>>>16,d.fromBits((l&=65535)<<16|(f&=65535),((s+=(c+=r+u)>>>16)+(t+i)&65535)<<16|(c&=65535))},d.prototype.subtract=function(e){e=d.fromValue(e);return this.add(e.negate())},d.prototype.multiply=function(e){if(this.isZero())return d.ZERO;e=d.fromValue(e);if(e.isZero())return d.ZERO;if(this.equals(d.MIN_VALUE))return e.isOdd()?d.MIN_VALUE:d.ZERO;if(e.equals(d.MIN_VALUE))return this.isOdd()?d.MIN_VALUE:d.ZERO;if(this.isNegative())return e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate();if(e.isNegative())return this.multiply(e.negate()).negate();if(this.lessThan(Q)&&e.lessThan(Q))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<=-Z?d.MIN_VALUE:Z<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%K|0,e/K|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,H.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return d.ZERO;if((t=null!=t?t:10)<2||36<t)throw(0,H.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,H.newError)('number format error: interior "-" character: '+e);if(0===r)return d.fromString(e.substring(1),t).negate();for(var o,i,u=d.fromNumber(Math.pow(t,8)),a=d.ZERO,s=0;s<e.length;s+=8){var c,l=Math.min(8,e.length-s),f=e.substring(s,s+l),p=parseInt(f,t);if(!0===n&&(o=f,c=p,i=t,Number.isNaN(o)||Number.isNaN(c)||function(e,t,r){e=e.toString(t),t=Math.max(r-e.length,0),r="0".repeat(t);return"".concat(r).concat(e)}(c,i,o.length)!==o.toLowerCase()))throw(0,H.newError)('number format error: "'.concat(f,'" is NaN in radix ').concat(t,": ").concat(e));a=l<8?(c=d.fromNumber(Math.pow(t,l)),a.multiply(c).add(d.fromNumber(p))):(a=a.multiply(u)).add(d.fromNumber(p))}return a},d.fromValue=function(e,t){return void 0===t&&(t={}),e instanceof d?e:"number"==typeof e?(!0===t.ceilFloat&&(e=Math.ceil(e)),d.fromNumber(e)):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(Y.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var K=4294967296,Z=K*K/2,Q=Y.fromInt(1<<24),o=Y.fromValue,o=(n.int=o,Y.isInteger),o=(n.isInt=o,Y.inSafeRange),o=(n.inSafeRange=o,Y.toNumber),o=(n.toNumber=o,Y.toString),o=(n.toString=o,n.default=Y,{}),Y={},i={},X={},u={},J=(Object.defineProperty(u,"__esModule",{value:!0}),u.getBrokenObjectReason=u.isBrokenObject=u.createBrokenObject=void 0,"__isBrokenObject__"),$="__reason__";u.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})},u.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[J]},u.getBrokenObjectReason=function(e){return e[$]},Object.defineProperty(X,"__esModule",{value:!0}),X.stringify=void 0;var ee=u;X.stringify=function(e){return JSON.stringify(e,function(e,t){return(0,ee.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,ee.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):t})};var a,te,re,ne,oe,ie,ue,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(i,"__esModule",{value:!0}),i.ENCRYPTION_OFF=i.ENCRYPTION_ON=i.equals=i.validateQueryAndParameters=i.assertValidDate=i.assertNumberOrInteger=i.assertNumber=i.assertString=i.assertObject=i.isString=i.isObject=i.isEmptyObjectOrNull=void 0,n),ce=X;i.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,ne.int)(e),this._maxInteger=(0,ne.int)(t)}function he(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 be(e,t){return(0,oe.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))}function ye(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 _e(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 ve(e,t){return e=(0,ne.int)(e),t=(0,ne.int)(t),e.subtract(_e(e,t).multiply(t))}function me(e){return(e=(0,ne.int)(e)).equals(0)?"":"."+ge(e,9)}function ge(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}i.ENCRYPTION_OFF="ENCRYPTION_OFF",i.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},i.isObject=le,i.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}},i.assertObject=function(e,t){if(le(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,ce.stringify)(e))},i.assertString=fe,i.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},i.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))},i.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},i.isString=pe,i.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},a=Y,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=i,de.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},de.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},s=de,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(_e(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return ve(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=he(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=he,a.durationToIsoString=function(e,t,r,n){return e=ge(e),t=ge(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=me((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=ge(e,2),t=ge(t,2),r=ge(r,2),n=me(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=ge((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=ge(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:ge(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 ge(e,6,{usePositiveSign:!0});return ge(e,4)}(e),t=ge(t,2),r=ge(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 ye(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return ye(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return ye(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return ye(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return ye(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return ye(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return ye(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 be(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),ue.set(r,!0)}catch(e){throw ue.set(r,!1),be(r,t)}}},a.floorDiv=_e,a.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}),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)&&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},c=(Object.defineProperty(o,"__esModule",{value:!0}),o.isDateTime=o.DateTime=o.isLocalDateTime=o.LocalDateTime=o.isDate=o.Date=o.isTime=o.Time=o.isLocalTime=o.LocalTime=o.isDuration=o.Duration=void 0,s(Y)),Pe=i,Se=t,Te=s(n),s={value:!0,enumerable:!1,configurable:!1,writable:!1},je="__isDuration__",Ce="__isLocalTime__",Ie="__isTime__",Re="__isDate__",ke="__isLocalDateTime__",Ae="__isDateTime__",l=(Me.prototype.toString=function(){return c.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=c.normalizeSecondsForDuration(r,n),this.nanoseconds=c.normalizeNanosecondsForDuration(n),Object.freeze(this)}o.Duration=l,Object.defineProperty(l.prototype,je,s),o.isDuration=function(e){return Fe(e,je)};Ne.fromStandardDate=function(e,t){We(e,t);t=c.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 c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};l=Ne;function Ne(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)}o.LocalTime=l,Object.defineProperty(l.prototype,Ce,s),o.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)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e))},xe.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+c.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};l=xe;function xe(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,Pe.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}o.Time=l,Object.defineProperty(l.prototype,Ie,s),o.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 c.isoStringToStandardDate(this.toString())},De.prototype.toString=function(){return c.dateToIsoString(this.year,this.month,this.day)};l=De;function De(e,t,r){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),Object.freeze(this)}o.Date=l,Object.defineProperty(l.prototype,Re,s),o.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)(c.totalNanoseconds(e,t)))},Ue.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Ue.prototype.toString=function(){return Be(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};l=Ue;function Ue(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)}o.LocalDateTime=l,Object.defineProperty(l.prototype,ke,s),o.isLocalDateTime=function(e){return Fe(e,ke)};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)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e),null)},Le.prototype.toStandardDate=function(){return c.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?c.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=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,Te.int)(e).multiply(1e3).add((0,Te.int)(this.nanosecond).div(1e6)).toNumber()};l=Le;function Le(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=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"),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 Fe(e,t){return null!=e&&!0===e[t]}function Be(e,t,r,n,o,i,u){return c.dateToIsoString(e,t,r)+"T"+c.timeToIsoString(n,o,i,u)}function We(e,t){(0,Pe.assertValidDate)(e,"Standard date"),null!=t&&(0,Pe.assertNumberOrInteger)(t,"Nanosecond")}o.DateTime=l,Object.defineProperty(l.prototype,Ae,s),o.isDateTime=function(e){return Fe(e,Ae)};var l={},ze=(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},qe="__isNode__",Ve="__isRelationship__",He="__isUnboundRelationship__",Ge="__isPath__",Ye="__isPathSegment__";function Ke(e,t){return null!=e&&!0===e[t]}Ze.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,ze.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var f=Ze;function Ze(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=tt(n,function(){return e.toString()})}l.Node=f,Object.defineProperty(f.prototype,qe,s),l.isNode=function(e){return Ke(e,qe)};Xe.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,ze.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var Qe=Xe;function Xe(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=tt(i,function(){return e.toString()}),this.startNodeElementId=tt(u,function(){return t.toString()}),this.endNodeElementId=tt(a,function(){return r.toString()})}l.Relationship=Qe,Object.defineProperty(Qe.prototype,Ve,s),l.isRelationship=function(e){return Ke(e,Ve)};Je.prototype.bind=function(e,t){return new Qe(this.identity,e,t,this.type,this.properties,this.elementId)},Je.prototype.bindTo=function(e,t){return new Qe(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},Je.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,ze.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};f=Je;function Je(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=tt(n,function(){return e.toString()})}l.UnboundRelationship=f,Object.defineProperty(f.prototype,He,s),l.isUnboundRelationship=function(e){return Ke(e,He)};function $e(e,t,r){this.start=e,this.relationship=t,this.end=r}l.PathSegment=$e,Object.defineProperty($e.prototype,Ye,s),l.isPathSegment=function(e){return Ke(e,Ye)};function et(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function tt(e,t){return null==e?t():e}l.Path=et,Object.defineProperty(et.prototype,Ge,s),l.isPath=function(e){return Ke(e,Ge)};var f={},rt=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}}}},nt=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.")},ot=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},it=(Object.defineProperty(f,"__esModule",{value:!0}),t);function ut(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)}ut.prototype.forEach=function(e){var t,r;try{for(var n=nt(this.entries()),o=n.next();!o.done;o=n.next()){var i=ot(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}}},ut.prototype.map=function(e){var t,r,n=[];try{for(var o=nt(this.entries()),i=o.next();!i.done;i=o.next()){var u=ot(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},ut.prototype.entries=function(){var t;return rt(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]}})},ut.prototype.values=function(){var t;return rt(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]}})},ut.prototype[Symbol.iterator]=function(){var t;return rt(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]}})},ut.prototype.toObject=function(){var t,e,r={};try{for(var n=nt(this.entries()),o=n.next();!o.done;o=n.next()){var i=ot(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},ut.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,it.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,it.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]},ut.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},f.default=ut;var s={},at=(Object.defineProperty(s,"__esModule",{value:!0}),s.isPoint=s.Point=void 0,i),st="__isPoint__",p=(ct.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(lt(this.srid),", x=").concat(lt(this.x),", y=").concat(lt(this.y),"}"):"Point{srid=".concat(lt(this.srid),", x=").concat(lt(this.x),", y=").concat(lt(this.y),", z=").concat(lt(this.z),"}")},ct);function ct(e,t,r,n){this.srid=(0,at.assertNumberOrInteger)(e,"SRID"),this.x=(0,at.assertNumber)(t,"X coordinate"),this.y=(0,at.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,at.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function lt(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}s.Point=p,Object.defineProperty(p.prototype,st,{value:!0,enumerable:!1,configurable:!1,writable:!1}),s.isPoint=function(e){return null!=e&&!0===e[st]};var p={},ft=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]}),pt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),dt=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)&&ft(t,e,r);return pt(t,e),t},ht=(Object.defineProperty(p,"__esModule",{value:!0}),p.notificationCategory=p.notificationSeverityLevel=p.Stats=p.QueryStatistics=p.ProfiledPlan=p.Plan=p.Notification=p.ServerInfo=p.queryType=void 0,dt(n)),dt=(bt.prototype._buildNotifications=function(e){return null==e?[]:e.map(function(e){return new St(e)})},bt.prototype.hasPlan=function(){return this.plan instanceof yt},bt.prototype.hasProfile=function(){return this.profile instanceof _t},bt);function bt(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new mt(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new yt(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new _t(r.profile),this.notifications=this._buildNotifications(r.notifications),this.server=new jt(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 yt=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)}):[]},_t=(p.Plan=yt,vt.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},vt);function vt(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=It("dbHits",e),this.rows=It("rows",e),this.pageCacheMisses=It("pageCacheMisses",e),this.pageCacheHits=It("pageCacheHits",e),this.pageCacheHitRatio=It("pageCacheHitRatio",e),this.time=It("time",e),this.children=null!=e.children?e.children.map(function(e){return new vt(e)}):[]}p.ProfiledPlan=_t;p.Stats=function(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0},gt.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)},gt.prototype.updates=function(){return this._stats},gt.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},gt.prototype.systemUpdates=function(){return this._systemUpdates};var mt=gt;function gt(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]=Ct(r[e]):"systemUpdates"===t?n._systemUpdates=Ct(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}p.QueryStatistics=mt;var Ot={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},wt=(p.notificationSeverityLevel=Ot,Object.freeze(Ot),Object.values(Ot)),Et={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",UNKNOWN:"UNKNOWN"},Pt=(p.notificationCategory=Et,Object.freeze(Et),Object.values(Et)),St=(Tt._constructPosition=function(e){return null==e?{}:{offset:Ct(e.offset),line:Ct(e.line),column:Ct(e.column)}},Tt);function Tt(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=Tt._constructPosition(e.position),this.severityLevel=wt.includes(e.severity)?e.severity:Ot.UNKNOWN,this.rawSeverityLevel=e.severity,this.category=Pt.includes(e.category)?e.category:Et.UNKNOWN,this.rawCategory=e.category}p.Notification=St;var jt=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Ct(e){return e instanceof ht.default?e.toNumber():"bigint"==typeof e?(0,ht.int)(e).toNumber():e}function It(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?Ct(t[e]):r}p.ServerInfo=jt;function Rt(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,new Error("Not implemented")}p.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},p.default=dt;var dt={},kt=(Object.defineProperty(dt,"__esModule",{value:!0}),dt.notificationFilterDisabledCategory=dt.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),kt=(dt.notificationFilterMinimumSeverityLevel=kt,Object.freeze(kt),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC"}),kt=(dt.notificationFilterDisabledCategory=kt,Object.freeze(kt),dt.default=Rt,{}),h={},b={},At=(Object.defineProperty(b,"__esModule",{value:!0}),b.FailedObserver=b.CompletedObserver=void 0,Mt.prototype.subscribe=function(e){xt(e,e.onKeys,[]),xt(e,e.onCompleted,{})},Mt.prototype.cancel=function(){},Mt.prototype.pause=function(){},Mt.prototype.resume=function(){},Mt.prototype.prepareToHandleSingleResponse=function(){},Mt.prototype.markCompleted=function(){},Mt.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},Mt);function Mt(){}function Nt(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function xt(e,t,r){null!=t&&t.bind(e)(r)}b.CompletedObserver=At,Nt.prototype.subscribe=function(e){xt(e,e.onError,this._error),this._observers.push(e)},Nt.prototype.onError=function(t){xt(this,this._beforeError,t),this._observers.forEach(function(e){return xt(e,e.onError,t)})},Nt.prototype.cancel=function(){},Nt.prototype.pause=function(){},Nt.prototype.resume=function(){},Nt.prototype.markCompleted=function(){},Nt.prototype.prepareToHandleSingleResponse=function(){},b.FailedObserver=Nt;var At={},Dt=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Ut=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)&&Dt(t,e,r);return Ut(t,e),t},Lt=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},Ft=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))},Bt=(Object.defineProperty(At,"__esModule",{value:!0}),At.Bookmarks=void 0,y(i)),y=(Wt.empty=function(){return zt},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(Bt.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(!Bt.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return Ft([],Lt(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var zt=new(At.Bookmarks=y)(null);var qt,Vt,y={},_=(Object.defineProperty(y,"__esModule",{value:!0}),y.TELEMETRY_APIS=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.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),v={},m=r&&r.__extends||(qt=function(e,t){return(qt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}qt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ht=(Object.defineProperty(v,"__esModule",{value:!0}),v.Logger=void 0,t),Gt="error",Yt="warn",Kt="info",Zt="debug",Qt=((g={})[Gt]=0,g[Yt]=1,g[Kt]=2,g[Zt]=3,g),g=(Xt.create=function(e){return null!=(null==e?void 0:e.logging)?new Xt(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=Qt[e];if(null!=t||0===t)return e;throw(0,Ht.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(Qt).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,Ht.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},Xt.noOp=function(){return $t},Xt.prototype.isErrorEnabled=function(){return er(this._level,Gt)},Xt.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(Gt,e)},Xt.prototype.isWarnEnabled=function(){return er(this._level,Yt)},Xt.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(Yt,e)},Xt.prototype.isInfoEnabled=function(){return er(this._level,Kt)},Xt.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(Kt,e)},Xt.prototype.isDebugEnabled=function(){return er(this._level,Zt)},Xt.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(Zt,e)},Xt);function Xt(e,t){this._level=e,this._loggerFunction=t}function Jt(){return Vt.call(this,Kt,function(e,t){})||this}v.Logger=g,m(Jt,Vt=g),Jt.prototype.isErrorEnabled=function(){return!1},Jt.prototype.error=function(e){},Jt.prototype.isWarnEnabled=function(){return!1},Jt.prototype.warn=function(e){},Jt.prototype.isInfoEnabled=function(){return!1},Jt.prototype.info=function(e){},Jt.prototype.isDebugEnabled=function(){return!1},Jt.prototype.debug=function(e){};var $t=new Jt;function er(e,t){return Qt[e]>=Qt[t]}var tr,m=r&&r.__extends||(tr=function(e,t){return(tr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}tr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),rr=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())})},nr=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}}}},or=(Object.defineProperty(_,"__esModule",{value:!0}),_.EMPTY_CONNECTION_HOLDER=_.ReadOnlyConnectionHolder=_.ConnectionHolder=void 0,t),ir=i,ur=y,ar=At,sr=v,g=(cr.prototype.mode=function(){return this._mode},cr.prototype.database=function(){return this._database},cr.prototype.setDatabase=function(e){this._database=e},cr.prototype.bookmarks=function(){return this._bookmarks},cr.prototype.connectionProvider=function(){return this._connectionProvider},cr.prototype.referenceCount=function(){return this._referenceCount},cr.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},cr.prototype._create