UNPKG

neo4j-driver

Version:
1 lines 680 kB
var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lib$2={},driver$1={},lib$1={},error={},json$3={},objectUtil$2={},__isBrokenObject__=(Object.defineProperty(objectUtil$2,"__esModule",{value:!0}),objectUtil$2.getBrokenObjectReason=objectUtil$2.isBrokenObject=objectUtil$2.createBrokenObject=void 0,"__isBrokenObject__"),__reason__="__reason__";function createBrokenObject(r,e){void 0===e&&(e={});function n(){throw r}return new Proxy(e,{get:function(e,t){return t===__isBrokenObject__||(t===__reason__?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})}function isBrokenObject(e){return null!==e&&"object"==typeof e&&!0===e[__isBrokenObject__]}function getBrokenObjectReason(e){return e[__reason__]}objectUtil$2.createBrokenObject=createBrokenObject,objectUtil$2.isBrokenObject=isBrokenObject,objectUtil$2.getBrokenObjectReason=getBrokenObjectReason,Object.defineProperty(json$3,"__esModule",{value:!0}),json$3.stringify=void 0;var object_util_1=objectUtil$2;function stringify(e,r){return JSON.stringify(e,function(e,t){return(0,object_util_1.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,object_util_1.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()})}json$3.stringify=stringify;var gqlConstants={},__extends$R=(!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.rawPolyfilledDiagnosticRecord=void 0,e.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(e.rawPolyfilledDiagnosticRecord)}(gqlConstants),commonjsGlobal&&commonjsGlobal.__extends||function(){var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}()),__createBinding$d=commonjsGlobal&&commonjsGlobal.__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]}),__setModuleDefault$d=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$d=commonjsGlobal&&commonjsGlobal.__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)&&__createBinding$d(t,e,r);return __setModuleDefault$d(t,e),t},json$2=(Object.defineProperty(error,"__esModule",{value:!0}),error.PROTOCOL_ERROR=error.SESSION_EXPIRED=error.SERVICE_UNAVAILABLE=error.GQLError=error.Neo4jError=error.isRetriableError=error.newGQLError=error.newError=void 0,__importStar$d(json$3)),gql_constants_1$1=gqlConstants,errorClassification={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"},classifications=(Object.freeze(errorClassification),Object.values(errorClassification)),SERVICE_UNAVAILABLE$6="ServiceUnavailable",SESSION_EXPIRED$2=(error.SERVICE_UNAVAILABLE=SERVICE_UNAVAILABLE$6,"SessionExpired"),PROTOCOL_ERROR$6=(error.SESSION_EXPIRED=SESSION_EXPIRED$2,"ProtocolError"),NOT_AVAILABLE$1=(error.PROTOCOL_ERROR=PROTOCOL_ERROR$6,"N/A"),GQLError=function(a){function s(e,t,r,n,o){var i=this;return(i=a.call(this,e,null!=o?{cause:o}:void 0)||this).constructor=s,i.__proto__=s.prototype,i.cause=null!=o?o:void 0,i.gqlStatus=t,i.gqlStatusDescription=r,i.diagnosticRecord=n,i.classification=_extractClassification(i.diagnosticRecord),i.rawClassification=null!=(e=null==n?void 0:n._classification)?e:void 0,i.name="GQLError",i}return __extends$R(s,a),Object.defineProperty(s.prototype,"diagnosticRecordAsJsonString",{get:function(){return json$2.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),s}(Error),Neo4jError=function(a){function s(e,t,r,n,o,i){e=a.call(this,e,r,n,o,i)||this;return e.constructor=s,e.__proto__=s.prototype,e.code=t,e.name="Neo4jError",e.retriable=_isRetriableCode(t),e}return __extends$R(s,a),s.isRetriable=function(e){return null!=e&&e instanceof s&&e.retriable},s}(error.GQLError=GQLError);function newError(e,t,r,n,o,i){return new Neo4jError(e,null!=t?t:NOT_AVAILABLE$1,null!=n?n:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:gql_constants_1$1.rawPolyfilledDiagnosticRecord,r)}function newGQLError(e,t,r,n,o){return new GQLError(e,null!=r?r:"50N42",null!=n?n:"error: general processing exception - unexpected error. "+e,null!=o?o:gql_constants_1$1.rawPolyfilledDiagnosticRecord,t)}error.Neo4jError=Neo4jError,error.newError=newError,error.newGQLError=newGQLError;var isRetriableError=Neo4jError.isRetriable;function _isRetriableCode(e){return e===SERVICE_UNAVAILABLE$6||e===SESSION_EXPIRED$2||_isAuthorizationExpired(e)||_isTransientError(e)}function _isTransientError(e){return!0===(null==e?void 0:e.includes("TransientError"))}function _isAuthorizationExpired(e){return"Neo.ClientError.Security.AuthorizationExpired"===e}function _extractClassification(e){return void 0!==e&&void 0!==e._classification&&classifications.includes(e._classification)?null==e?void 0:e._classification:"UNKNOWN"}error.isRetriableError=isRetriableError;var integer={},error_1$c=(Object.defineProperty(integer,"__esModule",{value:!0}),integer.toString=integer.toNumber=integer.inSafeRange=integer.isInt=integer.int=void 0,error),INT_CACHE=new Map,Integer=function(){function _(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}return _.prototype.inSafeRange=function(){return this.greaterThanOrEqual(_.MIN_SAFE_VALUE)&&this.lessThanOrEqual(_.MAX_SAFE_VALUE)},_.prototype.toInt=function(){return this.low},_.prototype.toNumber=function(){return this.high*TWO_PWR_32_DBL+(this.low>>>0)},_.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(TWO_PWR_32_DBL)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(TWO_PWR_32_DBL)+BigInt(e.low>>>0)))},_.prototype.toNumberOrInfinity=function(){return this.lessThan(_.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(_.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},_.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(_.MIN_VALUE)?(t=_.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=_.fromNumber(Math.pow(e,6)),i=(n=this,"");;){var a=n.div(o),s=(n.subtract(a.multiply(o)).toInt()>>>0).toString(e);if((n=a).isZero())return s+i;for(;s.length<6;)s="0"+s;i=""+s+i}},_.prototype.valueOf=function(){return this.toBigInt()},_.prototype.getHighBits=function(){return this.high},_.prototype.getLowBits=function(){return this.low},_.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(_.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},_.prototype.isZero=function(){return 0===this.high&&0===this.low},_.prototype.isNegative=function(){return this.high<0},_.prototype.isPositive=function(){return 0<=this.high},_.prototype.isOdd=function(){return 1==(1&this.low)},_.prototype.isEven=function(){return 0==(1&this.low)},_.prototype.equals=function(e){e=_.fromValue(e);return this.high===e.high&&this.low===e.low},_.prototype.notEquals=function(e){return!this.equals(e)},_.prototype.lessThan=function(e){return this.compare(e)<0},_.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},_.prototype.greaterThan=function(e){return 0<this.compare(e)},_.prototype.greaterThanOrEqual=function(e){return 0<=this.compare(e)},_.prototype.compare=function(e){e=_.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},_.prototype.negate=function(){return this.equals(_.MIN_VALUE)?_.MIN_VALUE:this.not().add(_.ONE)},_.prototype.add=function(e){var e=_.fromValue(e),t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,a=65535&e.high,s=e.low>>>16,u=0,c=0,l=0,f=0;return c+=(l=l+((f+=o+(65535&e.low))>>>16)+(n+s))>>>16,_.fromBits((l&=65535)<<16|(f&=65535),((u+=(c+=r+a)>>>16)+(t+i)&65535)<<16|(c&=65535))},_.prototype.subtract=function(e){e=_.fromValue(e);return this.add(e.negate())},_.prototype.multiply=function(e){if(this.isZero())return _.ZERO;e=_.fromValue(e);if(e.isZero())return _.ZERO;if(this.equals(_.MIN_VALUE))return e.isOdd()?_.MIN_VALUE:_.ZERO;if(e.equals(_.MIN_VALUE))return this.isOdd()?_.MIN_VALUE:_.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(TWO_PWR_24)&&e.lessThan(TWO_PWR_24))return _.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,a=65535&e.high,s=e.low>>>16,e=65535&e.low,u=0,c=0,l=0,f=(f=0)+((c=c+((l+=o*e)>>>16)+n*e)>>>16)+((c=(c&65535)+o*s)>>>16);return _.fromBits((c&=65535)<<16|(l&=65535),((u+=(f+=r*e)>>>16)+((f=(f&65535)+n*s)>>>16)+((f=(f&65535)+o*a)>>>16)+(t*e+r*s+n*a+o*i)&65535)<<16|(f&=65535))},_.prototype.div=function(e){var t,r,n,o=_.fromValue(e);if(o.isZero())throw(0,error_1$c.newError)("division by zero");if(this.isZero())return _.ZERO;{if(this.equals(_.MIN_VALUE))return o.equals(_.ONE)||o.equals(_.NEG_ONE)?_.MIN_VALUE:o.equals(_.MIN_VALUE)?_.ONE:(n=this.shiftRight(1).div(o).shiftLeft(1)).equals(_.ZERO)?o.isNegative()?_.ONE:_.NEG_ONE:(t=this.subtract(o.multiply(n)),n.add(t.div(o)));if(o.equals(_.MIN_VALUE))return _.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=_.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),a=i<=48?1:Math.pow(2,i-48),s=_.fromNumber(n),u=s.multiply(o);u.isNegative()||u.greaterThan(t);)u=(s=_.fromNumber(n-=a)).multiply(o);s.isZero()&&(s=_.ONE),r=r.add(s),t=t.subtract(u)}return r},_.prototype.modulo=function(e){e=_.fromValue(e);return this.subtract(this.div(e).multiply(e))},_.prototype.not=function(){return _.fromBits(~this.low,~this.high)},_.prototype.and=function(e){e=_.fromValue(e);return _.fromBits(this.low&e.low,this.high&e.high)},_.prototype.or=function(e){e=_.fromValue(e);return _.fromBits(this.low|e.low,this.high|e.high)},_.prototype.xor=function(e){e=_.fromValue(e);return _.fromBits(this.low^e.low,this.high^e.high)},_.prototype.shiftLeft=function(e){e=_.toNumber(e);return 0==(e&=63)?_.ZERO:e<32?_.fromBits(this.low<<e,this.high<<e|this.low>>>32-e):_.fromBits(0,this.low<<e-32)},_.prototype.shiftRight=function(e){var t=_.toNumber(e),e=_.toNumber(e);return 0==(t&=63)?_.ZERO:e<32?_.fromBits(this.low>>>t|this.high<<32-t,this.high>>t):_.fromBits(this.high>>t-32,0<=this.high?0:-1)},_.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},_.fromInt=function(e){if(-128<=(e|=0)&&e<128&&null!=(t=INT_CACHE.get(e)))return t;var t=new _(e,e<0?-1:0);return-128<=e&&e<128&&INT_CACHE.set(e,t),t},_.fromBits=function(e,t){return new _(e,t)},_.fromNumber=function(e){return isNaN(e)||!isFinite(e)?_.ZERO:e<=-TWO_PWR_63_DBL?_.MIN_VALUE:TWO_PWR_63_DBL<=e+1?_.MAX_VALUE:e<0?_.fromNumber(-e).negate():new _(e%TWO_PWR_32_DBL|0,e/TWO_PWR_32_DBL|0)},_.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,error_1$c.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return _.ZERO;if((t=null!=t?t:10)<2||36<t)throw(0,error_1$c.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,error_1$c.newError)('number format error: interior "-" character: '+e);if(0===r)return _.fromString(e.substring(1),t).negate();for(var o=_.fromNumber(Math.pow(t,8)),i=_.ZERO,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),u=e.substring(a,a+s),c=parseInt(u,t);if(!0===n&&!_isValidNumberFromString(u,c,t))throw(0,error_1$c.newError)('number format error: "'.concat(u,'" is NaN in radix ').concat(t,": ").concat(e));i=s<8?(u=_.fromNumber(Math.pow(t,s)),i.multiply(u).add(_.fromNumber(c))):(i=i.multiply(o)).add(_.fromNumber(c))}return i},_.fromValue=function(e,t){return void 0===t&&(t={}),e instanceof _?e:"number"==typeof e?(!0===t.ceilFloat&&(e=Math.ceil(e)),_.fromNumber(e)):"string"==typeof e?_.fromString(e,void 0,t):"bigint"==typeof e?_.fromString(e.toString()):new _(e.low,e.high)},_.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return _.fromValue(e).toNumber()}},_.toString=function(e,t){return _.fromValue(e).toString(t)},_.inSafeRange=function(e){return _.fromValue(e).inSafeRange()},_.ZERO=_.fromInt(0),_.ONE=_.fromInt(1),_.NEG_ONE=_.fromInt(-1),_.MAX_VALUE=_.fromBits(-1,2147483647),_.MIN_VALUE=_.fromBits(0,-2147483648),_.MIN_SAFE_VALUE=_.fromBits(1,-2097152),_.MAX_SAFE_VALUE=_.fromBits(-1,2097151),_.__isInteger__=!0,_}();function _convertNumberToString(e,t,r){e=e.toString(t),t=Math.max(r-e.length,0),r="0".repeat(t);return"".concat(r).concat(e)}function _isValidNumberFromString(e,t,r){return!Number.isNaN(e)&&!Number.isNaN(t)&&_convertNumberToString(t,r,e.length)===e.toLowerCase()}Object.defineProperty(Integer.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var TWO_PWR_16_DBL=65536,TWO_PWR_24_DBL=1<<24,TWO_PWR_32_DBL=TWO_PWR_16_DBL*TWO_PWR_16_DBL,TWO_PWR_64_DBL=TWO_PWR_32_DBL*TWO_PWR_32_DBL,TWO_PWR_63_DBL=TWO_PWR_64_DBL/2,TWO_PWR_24=Integer.fromInt(TWO_PWR_24_DBL),int=Integer.fromValue,isInt=(integer.int=int,Integer.isInteger),inSafeRange=(integer.isInt=isInt,Integer.inSafeRange),toNumber$1=(integer.inSafeRange=inSafeRange,Integer.toNumber),toString=(integer.toNumber=toNumber$1,Integer.toString),temporalTypes=(integer.toString=toString,integer.default=Integer,{}),temporalUtil$1={},util$4={},__createBinding$c=commonjsGlobal&&commonjsGlobal.__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]}),__setModuleDefault$c=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$c=commonjsGlobal&&commonjsGlobal.__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)&&__createBinding$c(t,e,r);return __setModuleDefault$c(t,e),t},__values$d=commonjsGlobal&&commonjsGlobal.__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.")},integer_1$2=(Object.defineProperty(util$4,"__esModule",{value:!0}),util$4.ENCRYPTION_OFF=util$4.ENCRYPTION_ON=util$4.equals=util$4.validateQueryAndParameters=util$4.toNumber=util$4.assertValidDate=util$4.assertNumberOrInteger=util$4.assertNumber=util$4.assertString=util$4.assertObject=util$4.isString=util$4.isObject=util$4.isEmptyObjectOrNull=void 0,__importStar$c(integer)),json_1$1=json$3,ENCRYPTION_ON$2="ENCRYPTION_ON",ENCRYPTION_OFF$2=(util$4.ENCRYPTION_ON=ENCRYPTION_ON$2,"ENCRYPTION_OFF");function isEmptyObjectOrNull(e){if(null===e)return!0;if(!isObject(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0}function isObject(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function validateQueryAndParameters(e,t,r){var n="",t=null!=t?t:{},r=null!=(r=null==r?void 0:r.skipAsserts)&&r;return"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||(assertCypherQuery(n),assertQueryParameters(t)),{validatedQuery:n,params:t}}function assertObject(e,t){if(isObject(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,json_1$1.stringify)(e))}function assertString$1(e,t){if(isString$1(e))return e;throw new TypeError((0,json_1$1.stringify)(t)+" expected to be string but was: "+(0,json_1$1.stringify)(e))}function assertNumber(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,json_1$1.stringify)(e));return e}function assertNumberOrInteger(e,t){if("number"==typeof e||"bigint"==typeof e||(0,integer_1$2.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,json_1$1.stringify)(e))}function assertValidDate(e,t){if("[object Date]"!==Object.prototype.toString.call(e))throw new TypeError(t+" expected to be a standard JavaScript Date but was: "+(0,json_1$1.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,json_1$1.stringify)(e));return e}function assertCypherQuery(e){if(assertString$1(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")}function assertQueryParameters(e){var t;if(!isObject(e))throw t=null!=e.constructor?" "+e.constructor.name:"",new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(t," ").concat(JSON.stringify(e)))}function isString$1(e){return"[object String]"===Object.prototype.toString.call(e)}function equals$1(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 a=__values$d(o),s=a.next();!s.done;s=a.next()){var u=s.value;if(!equals$1(e[u],t[u]))return!1}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!0}function toNumber(e){return e instanceof integer_1$2.default?e.toNumber():"bigint"==typeof e?(0,integer_1$2.int)(e).toNumber():e}util$4.ENCRYPTION_OFF=ENCRYPTION_OFF$2,util$4.isEmptyObjectOrNull=isEmptyObjectOrNull,util$4.isObject=isObject,util$4.validateQueryAndParameters=validateQueryAndParameters,util$4.assertObject=assertObject,util$4.assertString=assertString$1,util$4.assertNumber=assertNumber,util$4.assertNumberOrInteger=assertNumberOrInteger,util$4.assertValidDate=assertValidDate,util$4.isString=isString$1,util$4.equals=equals$1,util$4.toNumber=toNumber,function(s){var n=commonjsGlobal&&commonjsGlobal.__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]}),o=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),e=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},u=(Object.defineProperty(s,"__esModule",{value:!0}),s.floorMod=s.floorDiv=s.assertValidZoneId=s.assertValidNanosecond=s.assertValidSecond=s.assertValidMinute=s.assertValidHour=s.assertValidDay=s.assertValidMonth=s.assertValidYear=s.timeZoneOffsetInSeconds=s.totalNanoseconds=s.newDate=s.toStandardDate=s.isoStringToStandardDate=s.dateToIsoString=s.timeZoneOffsetToIsoString=s.timeToIsoString=s.durationToIsoString=s.dateToEpochDay=s.localDateTimeToEpochSecond=s.localTimeToNanoOfDay=s.normalizeNanosecondsForDuration=s.normalizeSecondsForDuration=s.SECONDS_PER_DAY=s.DAYS_PER_400_YEAR_CYCLE=s.DAYS_0000_TO_1970=s.NANOS_PER_HOUR=s.NANOS_PER_MINUTE=s.NANOS_PER_MILLISECOND=s.NANOS_PER_SECOND=s.SECONDS_PER_HOUR=s.SECONDS_PER_MINUTE=s.MINUTES_PER_HOUR=s.NANOSECOND_OF_SECOND_RANGE=s.SECOND_OF_MINUTE_RANGE=s.MINUTE_OF_HOUR_RANGE=s.HOUR_OF_DAY_RANGE=s.DAY_OF_MONTH_RANGE=s.MONTH_OF_YEAR_RANGE=s.YEAR_RANGE=void 0,e(integer)),i=error,a=util$4,e=(t.prototype.contains=function(e){var t;return(0,u.isInt)(e)&&e instanceof u.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,u.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},t.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},t);function t(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,u.int)(e),this._maxInteger=(0,u.int)(t)}function c(e,t,r){e=(0,u.int)(e),t=(0,u.int)(t),r=(0,u.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,u.int)(e)).modulo(4).equals(0))return!e.modulo(100).equals(0)||!!e.modulo(400).equals(0)}(e)||(n=n.subtract(1))),n.subtract(s.DAYS_0000_TO_1970)}s.YEAR_RANGE=new e(-999999999,999999999),s.MONTH_OF_YEAR_RANGE=new e(1,12),s.DAY_OF_MONTH_RANGE=new e(1,31),s.HOUR_OF_DAY_RANGE=new e(0,23),s.MINUTE_OF_HOUR_RANGE=new e(0,59),s.SECOND_OF_MINUTE_RANGE=new e(0,59),s.NANOSECOND_OF_SECOND_RANGE=new e(0,999999999),s.MINUTES_PER_HOUR=60,s.SECONDS_PER_MINUTE=60,s.SECONDS_PER_HOUR=s.SECONDS_PER_MINUTE*s.MINUTES_PER_HOUR,s.NANOS_PER_SECOND=1e9,s.NANOS_PER_MILLISECOND=1e6,s.NANOS_PER_MINUTE=s.NANOS_PER_SECOND*s.SECONDS_PER_MINUTE,s.NANOS_PER_HOUR=s.NANOS_PER_MINUTE*s.MINUTES_PER_HOUR,s.DAYS_0000_TO_1970=719528,s.DAYS_PER_400_YEAR_CYCLE=146097,s.SECONDS_PER_DAY=86400,s.normalizeSecondsForDuration=function(e,t){return(0,u.int)(e).add(_(t,s.NANOS_PER_SECOND))},s.normalizeNanosecondsForDuration=function(e){return p(e,s.NANOS_PER_SECOND)},s.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,u.int)(e),t=(0,u.int)(t),r=(0,u.int)(r),n=(0,u.int)(n),(e=(e=(e=e.multiply(s.NANOS_PER_HOUR)).add(t.multiply(s.NANOS_PER_MINUTE))).add(r.multiply(s.NANOS_PER_SECOND))).add(n)},s.localDateTimeToEpochSecond=function(e,t,r,n,o,i,a){return e=c(e,t,r),t=function(e,t,r){e=(0,u.int)(e),t=(0,u.int)(t),r=(0,u.int)(r);e=e.multiply(s.SECONDS_PER_HOUR);return(e=e.add(t.multiply(s.SECONDS_PER_MINUTE))).add(r)}(n,o,i),e.multiply(s.SECONDS_PER_DAY).add(t)},s.dateToEpochDay=c,s.durationToIsoString=function(e,t,r,n){return e=b(e),t=b(t),r=function(e,t){e=(0,u.int)(e),t=(0,u.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=d((n?t.negate().add(2*s.NANOS_PER_SECOND):t.add(s.NANOS_PER_SECOND)).modulo(s.NANOS_PER_SECOND)));return null!=r?e+r:e}(r,n),"P".concat(e,"M").concat(t,"DT").concat(r,"S")},s.timeToIsoString=function(e,t,r,n){return e=b(e,2),t=b(t,2),r=b(r,2),n=d(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},s.timeZoneOffsetToIsoString=function(e){if((e=(0,u.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=b((e=r?e.multiply(-1):e).div(s.SECONDS_PER_HOUR),2),n=b(e.div(s.SECONDS_PER_MINUTE).modulo(s.MINUTES_PER_HOUR),2);return null!=(e=(e=e.modulo(s.SECONDS_PER_MINUTE)).equals(0)?null:b(e,2))?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},s.dateToIsoString=function(e,t,r){return e=function(e){e=(0,u.int)(e);if(e.isNegative()||e.greaterThan(9999))return b(e,6,{usePositiveSign:!0});return b(e,4)}(e),t=b(t,2),r=b(r,2),"".concat(e,"-").concat(t,"-").concat(r)},s.isoStringToStandardDate=function(e){return new Date(e)},s.toStandardDate=function(e){return new Date(e)},s.newDate=function(e){return new Date(e)},s.totalNanoseconds=function(e,t){return t=null!=t?t:0,e=e.getMilliseconds()*s.NANOS_PER_MILLISECOND,t instanceof u.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},s.timeZoneOffsetInSeconds=function(e){var t=e.getSeconds()>=e.getUTCSeconds()?e.getSeconds()-e.getUTCSeconds():e.getSeconds()-e.getUTCSeconds()+60;return 0===(e=e.getTimezoneOffset())?0+t:-1*e*s.SECONDS_PER_MINUTE+t},s.assertValidYear=function(e){return r(e,s.YEAR_RANGE,"Year")},s.assertValidMonth=function(e){return r(e,s.MONTH_OF_YEAR_RANGE,"Month")},s.assertValidDay=function(e){return r(e,s.DAY_OF_MONTH_RANGE,"Day")},s.assertValidHour=function(e){return r(e,s.HOUR_OF_DAY_RANGE,"Hour")},s.assertValidMinute=function(e){return r(e,s.MINUTE_OF_HOUR_RANGE,"Minute")},s.assertValidSecond=function(e){return r(e,s.SECOND_OF_MINUTE_RANGE,"Second")},s.assertValidNanosecond=function(e){return r(e,s.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")};function l(e,t){return(0,i.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))}var f=new Map;function r(e,t,r){if((0,a.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,i.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function _(e,t){e=(0,u.int)(e),t=(0,u.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function p(e,t){return e=(0,u.int)(e),t=(0,u.int)(t),e.subtract(_(e,t).multiply(t))}function d(e){return(e=(0,u.int)(e)).equals(0)?"":"."+b(e,9)}function b(e,t,r){var n=(e=(0,u.int)(e)).isNegative(),o=(e=n?e.negate():e).toString();if(null!=t)for(;o.length<t;)o="0"+o;return n?"-"+o:!0===(null==r?void 0:r.usePositiveSign)?"+"+o:o}s.assertValidZoneId=function(t,r){var e=f.get(r);if(!0!==e){if(!1===e)throw l(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),f.set(r,!0)}catch(e){throw f.set(r,!1),l(r,t)}}},s.floorDiv=_,s.floorMod=p}(temporalUtil$1);var __createBinding$b=commonjsGlobal&&commonjsGlobal.__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]}),__setModuleDefault$b=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$b=commonjsGlobal&&commonjsGlobal.__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)&&__createBinding$b(t,e,r);return __setModuleDefault$b(t,e),t},__read$x=commonjsGlobal&&commonjsGlobal.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)a.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 a},util$3=(Object.defineProperty(temporalTypes,"__esModule",{value:!0}),temporalTypes.isDateTime=temporalTypes.DateTime=temporalTypes.isLocalDateTime=temporalTypes.LocalDateTime=temporalTypes.isDate=temporalTypes.Date=temporalTypes.isTime=temporalTypes.Time=temporalTypes.isLocalTime=temporalTypes.LocalTime=temporalTypes.isDuration=temporalTypes.Duration=void 0,__importStar$b(temporalUtil$1)),util_1$7=util$4,error_1$b=error,integer_1$1=__importStar$b(integer),IDENTIFIER_PROPERTY_ATTRIBUTES$1={value:!0,enumerable:!1,configurable:!1,writable:!1},DURATION_IDENTIFIER_PROPERTY="__isDuration__",LOCAL_TIME_IDENTIFIER_PROPERTY="__isLocalTime__",TIME_IDENTIFIER_PROPERTY="__isTime__",DATE_IDENTIFIER_PROPERTY="__isDate__",LOCAL_DATE_TIME_IDENTIFIER_PROPERTY="__isLocalDateTime__",DATE_TIME_IDENTIFIER_PROPERTY="__isDateTime__",Duration=function(){function e(e,t,r,n){this.months=(0,util_1$7.assertNumberOrInteger)(e,"Months"),this.days=(0,util_1$7.assertNumberOrInteger)(t,"Days"),(0,util_1$7.assertNumberOrInteger)(r,"Seconds"),(0,util_1$7.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=util$3.normalizeSecondsForDuration(r,n),this.nanoseconds=util$3.normalizeNanosecondsForDuration(n),Object.freeze(this)}return e.prototype.toString=function(){return util$3.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},e}();function isDuration(e){return hasIdentifierProperty$1(e,DURATION_IDENTIFIER_PROPERTY)}temporalTypes.Duration=Duration,Object.defineProperty(Duration.prototype,DURATION_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES$1),temporalTypes.isDuration=isDuration;var LocalTime=function(){function r(e,t,r,n){this.hour=util$3.assertValidHour(e),this.minute=util$3.assertValidMinute(t),this.second=util$3.assertValidSecond(r),this.nanosecond=util$3.assertValidNanosecond(n),Object.freeze(this)}return r.fromStandardDate=function(e,t){verifyStandardDateAndNanos(e,t);t=util$3.totalNanoseconds(e,t);return new r(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof integer_1$1.default?t.toInt():"bigint"==typeof t?(0,integer_1$1.int)(t).toInt():t)},r.prototype.toString=function(){return util$3.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},r}();function isLocalTime(e){return hasIdentifierProperty$1(e,LOCAL_TIME_IDENTIFIER_PROPERTY)}temporalTypes.LocalTime=LocalTime,Object.defineProperty(LocalTime.prototype,LOCAL_TIME_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES$1),temporalTypes.isLocalTime=isLocalTime;var Time=function(){function r(e,t,r,n,o){this.hour=util$3.assertValidHour(e),this.minute=util$3.assertValidMinute(t),this.second=util$3.assertValidSecond(r),this.nanosecond=util$3.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,util_1$7.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}return r.fromStandardDate=function(e,t){return verifyStandardDateAndNanos(e,t),new r(e.getHours(),e.getMinutes(),e.getSeconds(),(0,integer_1$1.toNumber)(util$3.totalNanoseconds(e,t)),util$3.timeZoneOffsetInSeconds(e))},r.prototype.toString=function(){return util$3.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+util$3.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},r}();function isTime(e){return hasIdentifierProperty$1(e,TIME_IDENTIFIER_PROPERTY)}temporalTypes.Time=Time,Object.defineProperty(Time.prototype,TIME_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES$1),temporalTypes.isTime=isTime;var Date$1=function(){function t(e,t,r){this.year=util$3.assertValidYear(e),this.month=util$3.assertValidMonth(t),this.day=util$3.assertValidDay(r),Object.freeze(this)}return t.fromStandardDate=function(e){return verifyStandardDateAndNanos(e),new t(e.getFullYear(),e.getMonth()+1,e.getDate())},t.prototype.toStandardDate=function(){return util$3.isoStringToStandardDate(this.toString())},t.prototype.toString=function(){return util$3.dateToIsoString(this.year,this.month,this.day)},t}();function isDate$1(e){return hasIdentifierProperty$1(e,DATE_IDENTIFIER_PROPERTY)}temporalTypes.Date=Date$1,Object.defineProperty(Date$1.prototype,DATE_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES$1),temporalTypes.isDate=isDate$1;var LocalDateTime=function(){function r(e,t,r,n,o,i,a){this.year=util$3.assertValidYear(e),this.month=util$3.assertValidMonth(t),this.day=util$3.assertValidDay(r),this.hour=util$3.assertValidHour(n),this.minute=util$3.assertValidMinute(o),this.second=util$3.assertValidSecond(i),this.nanosecond=util$3.assertValidNanosecond(a),Object.freeze(this)}return r.fromStandardDate=function(e,t){return verifyStandardDateAndNanos(e,t),new r(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,integer_1$1.toNumber)(util$3.totalNanoseconds(e,t)))},r.prototype.toStandardDate=function(){return util$3.isoStringToStandardDate(this.toString())},r.prototype.toString=function(){return localDateTimeToString(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},r}();function isLocalDateTime(e){return hasIdentifierProperty$1(e,LOCAL_DATE_TIME_IDENTIFIER_PROPERTY)}temporalTypes.LocalDateTime=LocalDateTime,Object.defineProperty(LocalDateTime.prototype,LOCAL_DATE_TIME_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES$1),temporalTypes.isLocalDateTime=isLocalDateTime;var DateTime=function(){function r(e,t,r,n,o,i,a,s,u){this.year=util$3.assertValidYear(e),this.month=util$3.assertValidMonth(t),this.day=util$3.assertValidDay(r),this.hour=util$3.assertValidHour(n),this.minute=util$3.assertValidMinute(o),this.second=util$3.assertValidSecond(i),this.nanosecond=util$3.assertValidNanosecond(a);e=__read$x(verifyTimeZoneArguments(s,u),2),t=e[0],r=e[1];this.timeZoneOffsetSeconds=t,this.timeZoneId=null!=r?r:void 0,Object.freeze(this)}return r.fromStandardDate=function(e,t){return verifyStandardDateAndNanos(e,t),new r(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,integer_1$1.toNumber)(util$3.totalNanoseconds(e,t)),util$3.timeZoneOffsetInSeconds(e),null)},r.prototype.toStandardDate=function(){return util$3.toStandardDate(this._toUTC())},r.prototype.toString=function(){var e;return localDateTimeToString(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?util$3.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},r.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=util$3.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,integer_1$1.int)(e).multiply(1e3).add((0,integer_1$1.int)(this.nanosecond).div(1e6)).toNumber()},r}();function isDateTime(e){return hasIdentifierProperty$1(e,DATE_TIME_IDENTIFIER_PROPERTY)}function hasIdentifierProperty$1(e,t){return null!=e&&!0===e[t]}function localDateTimeToString(e,t,r,n,o,i,a){return util$3.dateToIsoString(e,t,r)+"T"+util$3.timeToIsoString(n,o,i,a)}function verifyTimeZoneArguments(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,error_1$b.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];return r&&((0,util_1$7.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e),n&&((0,util_1$7.assertString)(t,"Time zone ID"),util$3.assertValidZoneId("Time zone ID",t),o[1]=t),o}function verifyStandardDateAndNanos(e,t){(0,util_1$7.assertValidDate)(e,"Standard date"),null!=t&&(0,util_1$7.assertNumberOrInteger)(t,"Nanosecond")}temporalTypes.DateTime=DateTime,Object.defineProperty(DateTime.prototype,DATE_TIME_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES$1),temporalTypes.isDateTime=isDateTime;var graphTypes={},json_1=(Object.defineProperty(graphTypes,"__esModule",{value:!0}),graphTypes.isPathSegment=graphTypes.PathSegment=graphTypes.isPath=graphTypes.Path=graphTypes.isUnboundRelationship=graphTypes.UnboundRelationship=graphTypes.isRelationship=graphTypes.Relationship=graphTypes.isNode=graphTypes.Node=void 0,json$3),IDENTIFIER_PROPERTY_ATTRIBUTES={value:!0,enumerable:!1,configurable:!1,writable:!1},NODE_IDENTIFIER_PROPERTY="__isNode__",RELATIONSHIP_IDENTIFIER_PROPERTY="__isRelationship__",UNBOUND_RELATIONSHIP_IDENTIFIER_PROPERTY="__isUnboundRelationship__",PATH_IDENTIFIER_PROPERTY="__isPath__",PATH_SEGMENT_IDENTIFIER_PROPERTY="__isPathSegment__";function hasIdentifierProperty(e,t){return null!=e&&!0===e[t]}var Node=function(){function e(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=_valueOrGetDefault(n,function(){return e.toString()})}return e.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,json_1.stringify)(this.properties[r[t]]);e+="}"}return e+=")"},e}();function isNode(e){return hasIdentifierProperty(e,NODE_IDENTIFIER_PROPERTY)}graphTypes.Node=Node,Object.defineProperty(Node.prototype,NODE_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES),graphTypes.isNode=isNode;var Relationship=function(){function e(e,t,r,n,o,i,a,s){this.identity=e,this.start=t,this.end=r,this.type=n,this.properties=o,this.elementId=_valueOrGetDefault(i,function(){return e.toString()}),this.startNodeElementId=_valueOrGetDefault(a,function(){return t.toString()}),this.endNodeElementId=_valueOrGetDefault(s,function(){return r.toString()})}return e.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,json_1.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"},e}();function isRelationship(e){return hasIdentifierProperty(e,RELATIONSHIP_IDENTIFIER_PROPERTY)}graphTypes.Relationship=Relationship,Object.defineProperty(Relationship.prototype,RELATIONSHIP_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES),graphTypes.isRelationship=isRelationship;var UnboundRelationship=function(){function e(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=_valueOrGetDefault(n,function(){return e.toString()})}return e.prototype.bind=function(e,t){return new Relationship(this.identity,e,t,this.type,this.properties,this.elementId)},e.prototype.bindTo=function(e,t){return new Relationship(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,json_1.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"},e}();function isUnboundRelationship(e){return hasIdentifierProperty(e,UNBOUND_RELATIONSHIP_IDENTIFIER_PROPERTY)}graphTypes.UnboundRelationship=UnboundRelationship,Object.defineProperty(UnboundRelationship.prototype,UNBOUND_RELATIONSHIP_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES),graphTypes.isUnboundRelationship=isUnboundRelationship;var PathSegment=function(e,t,r){this.start=e,this.relationship=t,this.end=r};function isPathSegment(e){return hasIdentifierProperty(e,PATH_SEGMENT_IDENTIFIER_PROPERTY)}graphTypes.PathSegment=PathSegment,Object.defineProperty(PathSegment.prototype,PATH_SEGMENT_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES),graphTypes.isPathSegment=isPathSegment;var Path=function(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length};function isPath(e){return hasIdentifierProperty(e,PATH_IDENTIFIER_PROPERTY)}function _valueOrGetDefault(e,t){return null==e?t():e}graphTypes.Path=Path,Object.defineProperty(Path.prototype,PATH_IDENTIFIER_PROPERTY,IDENTIFIER_PROPERTY_ATTRIBUTES),graphTypes.isPath=isPath;var record={},__generator$n=commonjsGlobal&&commonjsGlobal.__generator||function(n,o){var i,a,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[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(;u=c&&t[c=0]?0:u;)try{if(i=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,a=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){u.label=t[1];break}if(6===t[0]&&u.label<s[1]){u.label=s[1],s=t;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(t);break}s[2]&&u.ops.pop(),u.trys.pop();continue}t=o.call(n,u)}catch(e){t=[6,e],a=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},__values$c=commonjsGlobal&&commonjsGlobal.__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.")},__read$w=commonjsGlobal&&commonjsGlobal.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)a.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 a},error_1$a=(Object.defineProperty(record,"__esModule",{value:!0}),error);function generateFieldLookup(e){var r={};return e.forEach(function(e,t){r[e]=t}),r}var Record=function(){function e(e,t,r){this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=r?r:generateFieldLookup(e)}return e.prototype.forEach=function(e){var t,r;try{for(var n=__values$c(this.entries()),o=n.next();!o.done;o=n.next()){var i=__read$w(o.value,2),a=i[0];e(i[1],a,this)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.map=function(e){var t,r,n=[];try{for(var o=__values$c(this.entries()),i=o.next();!i.done;i=o.next()){var a=__read$w(i.value,2),s=a[0],u=a[1];n.push(e(u,s,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},e.prototype.entries=function(){var t;return __generator$n(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]}})},e.prototype.values=function(){var t;return __generator$n(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]}})},e.prototype[Symbol.iterator]=function(){var t;return __generator$n(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]}})},e.prototype.toObject=function(){var t,e,r={};try{for(var n=__values$c(this.entries()),o=n.next();!o.done;o=n.next()){var i=__read$w(o.value,2),a=i[0],s=i[1];r[a]=s}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},e.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,error_1$a.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,error_1$a.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]},e.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},e}(),spatialTypes=(record.default=Record,{}),util_1$6=(Object.defineProperty(spatialTypes,"__esModule",{value:!0}),spatialTypes.isPoint=spatialTypes.Point=void 0,util$4),POINT_IDENTIFIER_PROPERTY="__isPoint__",Point=function(){function e(e,t,r,n){this.srid=(0,util_1$6.assertNumberOrInteger)(e,"SRID"),this.x=(0,util_1$6.assertNumber)(t,"X coordinate"),this.y=(0,util_1$6.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,util_1$6.assertNumber)(n,"Z coordinate"),Object.freeze(this)}return e.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(formatAsFloat(this.srid),", x=").concat(formatAsFloat(this.x),", y=").concat(formatAsFloat(this.y),"}"):"Point{srid=".concat(formatAsFloat(this.srid),", x=").concat(formatAsFloat(this.x),", y=").concat(formatAsFloat(this.y),", z=").concat(formatAsFloat(this.z),"}")},e}();function formatAsFloat(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}function isPoint(e){return null!=e&&!0===e[POINT_IDENTIFIER_PROPERTY]}spatialTypes.Point=Point,Object.defineProperty(Point.prototype,POINT_IDENTIFIER_PROPERTY,{value:!0,enumerable:!1,configurable:!1,writable:!1}),spatialTypes.isPoint=isPoint;var resultSummary={},internal={},observers={},CompletedObserver$1=(Object.defineProperty(observers,"__esModule",{value:!0}),observers.FailedObserver=observers.CompletedObserver=void 0,function(){function e(){}return e.prototype.subscribe=function(e){apply(e,e.onKeys,[]),apply(e,e.onCompleted,{})},e.prototype.cancel=function(){},e.prototype.pause=function(){},e.prototype.resume=function(){},e.prototype.prepareToHandleSingleResponse=function(){},e.prototype.markCompleted=function(){},e.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},e}()),FailedObserver$1=(observers.CompletedObserver=CompletedObserver$1,function(){function e(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}return e.prototype.subscribe=function(e){apply(e,e.onError,this._error),this._observers.push(e)},e.prototype.onError=function(t){apply(this,this._beforeError,t),this._observers.forEach(function(e){return apply(e,e.onError,t)})},e.prototype.cancel=function(){},e.prototype.pause=function(){},e.prototype.resume=function(){},e.prototype.markCompleted=function(){},e.prototype.prepareToHandleSingleResponse=function(){},e}());function apply(e,t,r){null!=t&&t.bind(e)(r)}observers.FailedObserver=FailedObserver$1;var bookmarks$1={},__createBinding$a=commonjsGlobal&&commonjsGlobal.__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]}),__setModuleDefault$a=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$a=commonjsGlobal&&commonjsGlobal.__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)&&__createBinding$a(t,e,r);return __setModuleDefault$a(t,e),t},__read$v=commonjsGlobal&&commonjsGlobal.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)a.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 a},__spreadArray$o=commonjsGlobal&&commonjsGlobal.__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))},util$2=(Object.defineProperty(bookmarks$1,"__esModule",{value:!0}),bookmarks$1.Bookmarks=void 0,__importStar$a(util$4)),BOOKMARKS_KEY="bookmarks",Bookmarks$4=function(){function e(e){this._values=asStringArray(e)}return e.empty=function(){return EMPTY_BOOKMARK},e.prototype.isEmpty=function(){return 0===this._values.length},e.prototype.values=function(){return this._values},e.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},e.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={})[BOOKMARKS_KEY]=this._values,e)},e}(),EMPTY_BOOKMARK=new(bookmarks$1.Bookmarks=Bookmarks$4)(null);function asStringArray(e){if(null==e||""===e)return[];if(util$2.isString(e))return[e];if(Array.isArray(e)){for(var t=new Set,r=flattenArray(e),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!util$2.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return __spreadArray$o([],__read$v(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}function flattenArray(e){return e.reduce(function(e,t){return Array.isArray(t)?e.concat(flattenArray(t)):e.concat(t)},[])}var _a$h,constants$1={},FETCH_ALL$7=(Object.defineProperty(constants$1,"__esModule",{value:!0}),constants$1.TELEMETRY_APIS=constants$1.BOLT_PROTOCOL_V5_7=constants$1.BOLT_PROTOCOL_V5_6=constants$1.BOLT_PROTOCOL_V5_5=constants$1.BOLT_PROTOCOL_V5_4=constants$1.BOLT_PROTOCOL_V5_3=constants$1.BOLT_PROTOCOL_V5_2=constants$1.BOLT_PROTOCOL_V5_1=constants$1.BOLT_PROTOCOL_V5_0=constants$1.BOLT_PROTOCOL_V4_4=constants$1.BOLT_PROTOCOL_V4_3=constants$1.BOLT_PROTOCOL_V4_2=constants$1.BOLT_PROTOCOL_V4_1=constants$1.BOLT_PROTOCOL_V4_0=constants$1.BOLT_PROTOCOL_V3=constants$1.BOLT_PROTOCOL_V2=constants$1.BOLT_PROTOCOL_V1=constants$1.DEFAULT_POOL_MAX_SIZE=constants$1.DEFAULT_POOL_ACQUISITION_TIMEOUT=constants$1.DEFAULT_CONNECTION_TIMEOUT_MILLIS=constants$1.ACCESS_MODE_WRITE=constant