From aff73c156d0158b1cbb9420aec5656ebf10a78a2 Mon Sep 17 00:00:00 2001 From: github-actions-bot Date: Thu, 26 Oct 2023 04:57:34 +0000 Subject: [PATCH] Updates --- asset-manifest.json | 6 +++--- index.html | 2 +- static/js/main.157c26f4.js | 3 +++ ...233a0a48.js.LICENSE.txt => main.157c26f4.js.LICENSE.txt} | 0 static/js/main.157c26f4.js.map | 1 + static/js/main.233a0a48.js | 3 --- static/js/main.233a0a48.js.map | 1 - static/js/process.worker.e308d4cc.chunk.js.map | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 static/js/main.157c26f4.js rename static/js/{main.233a0a48.js.LICENSE.txt => main.157c26f4.js.LICENSE.txt} (100%) create mode 100644 static/js/main.157c26f4.js.map delete mode 100644 static/js/main.233a0a48.js delete mode 100644 static/js/main.233a0a48.js.map diff --git a/asset-manifest.json b/asset-manifest.json index f57cd7c..97efd3c 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,17 +1,17 @@ { "files": { "main.css": "./static/css/main.33057441.css", - "main.js": "./static/js/main.233a0a48.js", + "main.js": "./static/js/main.157c26f4.js", "process.worker.js": "./static/js/process.worker.e308d4cc.chunk.js", "static/media/orb_logo.png": "./static/media/orb_logo.8956ce3915ca9959c3a8.png", "static/media/logo.png": "./static/media/logo.f04b85f70fa75cb174d7.png", "index.html": "./index.html", "main.33057441.css.map": "./static/css/main.33057441.css.map", - "main.233a0a48.js.map": "./static/js/main.233a0a48.js.map", + "main.157c26f4.js.map": "./static/js/main.157c26f4.js.map", "process.worker.e308d4cc.chunk.js.map": "./static/js/process.worker.e308d4cc.chunk.js.map" }, "entrypoints": [ "static/css/main.33057441.css", - "static/js/main.233a0a48.js" + "static/js/main.157c26f4.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index a648492..03d817a 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -cypherGUI
\ No newline at end of file +cypherGUI
\ No newline at end of file diff --git a/static/js/main.157c26f4.js b/static/js/main.157c26f4.js new file mode 100644 index 0000000..782391f --- /dev/null +++ b/static/js/main.157c26f4.js @@ -0,0 +1,3 @@ +/*! For license information please see main.157c26f4.js.LICENSE.txt */ +!function(){var e={2009:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,u)),c=0,f=u>0?a-4:a;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,l=r-o;sl?l:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var o,i,a=[],s=t;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},9778:function(e,t,n){"use strict";var r=n(6690).default,o=n(9728).default,i=n(6115).default,a=n(1655).default,s=n(6389).default,u=n(2009),l=n(4038),c="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=d,t.SlowBuffer=function(e){+e!=e&&(e=0);return d.alloc(+e)},t.INSPECT_MAX_BYTES=50;var f=2147483647;function h(e){if(e>f)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,d.prototype),t}function d(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return m(e)}return p(e,t,n)}function p(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!d.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|b(e,t),r=h(n),o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(ee(e,Uint8Array)){var t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return y(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ee(e,ArrayBuffer)||e&&ee(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(ee(e,SharedArrayBuffer)||e&&ee(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return d.from(r,t,n);var o=function(e){if(d.isBuffer(e)){var t=0|_(e.length),n=h(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||te(e.length)?h(0):y(e);if("Buffer"===e.type&&Array.isArray(e.data))return y(e.data)}(e);if(o)return o;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return d.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function v(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function m(e){return v(e),h(e<0?0:0|_(e))}function y(e){for(var t=e.length<0?0:0|_(e.length),n=h(t),r=0;r=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|e}function b(e,t){if(d.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ee(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(o)return r?-1:Q(e).length;t=(""+t).toLowerCase(),o=!0}}function w(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return N(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return j(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function O(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function x(e,t,n,r,o){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),te(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=d.from(t,r)),d.isBuffer(t))return 0===t.length?-1:S(e,t,n,r,o);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):S(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function S(e,t,n,r,o){var i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i,a=t.length;for(r>a/2&&(r=a/2),i=0;i>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function j(e,t,n){return 0===t&&n===e.length?u.fromByteArray(e):u.fromByteArray(e.slice(t,n))}function N(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:i>223?3:i>191?2:1;if(o+s<=n){var u=void 0,l=void 0,c=void 0,f=void 0;switch(s){case 1:i<128&&(a=i);break;case 2:128===(192&(u=e[o+1]))&&(f=(31&i)<<6|63&u)>127&&(a=f);break;case 3:u=e[o+1],l=e[o+2],128===(192&u)&&128===(192&l)&&(f=(15&i)<<12|(63&u)<<6|63&l)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],128===(192&u)&&128===(192&l)&&128===(192&c)&&(f=(15&i)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rr.length?(d.isBuffer(i)||(i=d.from(i)),i.copy(r,o)):Uint8Array.prototype.set.call(r,i,o);else{if(!d.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o)}o+=i.length}return r},d.byteLength=b,d.prototype._isBuffer=!0,d.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},c&&(d.prototype[c]=d.prototype.inspect),d.prototype.compare=function(e,t,n,r,o){if(ee(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),c=0;c>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return P(this,e,t,n);case"ascii":case"latin1":case"binary":return T(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function M(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,n,r,o,i){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function z(e,t,n,r,o){G(t,r,o,e,n,7);var i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function B(e,t,n,r,o){G(t,r,o,e,n,7);var i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function F(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function W(e,t,n,r,o){return t=+t,n>>>=0,o||F(e,0,n,4),l.write(e,t,n,r,23,4),n+4}function q(e,t,n,r,o){return t=+t,n>>>=0,o||F(e,0,n,8),l.write(e,t,n,r,52,8),n+8}d.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},d.prototype.readUint8=d.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readBigUInt64LE=re((function(e){Y(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);var r=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),o=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(o)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);var r=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],o=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(r)<>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},d.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},d.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},d.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readBigInt64LE=re((function(e){Y(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);var r=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);var r=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(r)<>>=0,t||D(e,4,this.length),l.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),l.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),l.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),l.read(this,e,!1,52,8)},d.prototype.writeUintLE=d.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||U(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r)||U(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},d.prototype.writeUint8=d.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,1,255,0),this[t]=255&e,t+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigUInt64LE=re((function(e){return z(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeBigUInt64BE=re((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);U(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},d.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);U(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigInt64LE=re((function(e){return z(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeBigInt64BE=re((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeFloatLE=function(e,t,n){return W(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return W(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return q(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return q(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,r){if(!d.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function G(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(i+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(i+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(i+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(n).concat(s),new H.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){Y(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||K(t,e.length-(n+1))}(r,o,i)}function Y(e,t){if("number"!==typeof e)throw new H.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,n){if(Math.floor(e)!==e)throw Y(e,n),new H.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new H.ERR_BUFFER_OUT_OF_BOUNDS;throw new H.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,n){var r='The value of "'.concat(e,'" is out of range.'),o=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?o=Z(String(n)):"bigint"===typeof n&&(o=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(o=Z(o)),o+="n"),r+=" It must be ".concat(t,". Received ").concat(o)}),RangeError);var X=/[^+/0-9A-Za-z-_]/g;function Q(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function J(e){return u.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function $(e,t,n,r){var o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function ee(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function te(e){return e!==e}var ne=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t}();function re(e){return"undefined"===typeof BigInt?oe:e}function oe(){throw new Error("BigInt not supported")}},4038:function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<>1,c=-7,f=n?o-1:0,h=n?-1:1,d=e[t+f];for(f+=h,i=d&(1<<-c)-1,d>>=-c,c+=s;c>0;i=256*i+e[t+f],f+=h,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===i)i=1-l;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=l}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,l=8*i-o-1,c=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=p,s/=256,o-=8);for(a=a<0;e[n+d]=255&a,d+=p,a/=256,l-=8);e[n+d-p]|=128*v}},8559:function(e,t){!function(e){"use strict";var t="1.8.0";function n(e){var t,n,r,o;for(n=1,r=arguments.length;n0?Math.floor(e):Math.ceil(e)};function R(e,t,n){return e instanceof I?e:y(e)?new I(e[0],e[1]):void 0===e||null===e?e:"object"===typeof e&&"x"in e&&"y"in e?new I(e.x,e.y):new I(e,t,n)}function A(e,t){if(e)for(var n=t?[e,t]:e,r=0,o=n.length;r=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=D(e);var t=this.min,n=this.max,r=e.min,o=e.max,i=o.x>=t.x&&r.x<=n.x,a=o.y>=t.y&&r.y<=n.y;return i&&a},overlaps:function(e){e=D(e);var t=this.min,n=this.max,r=e.min,o=e.max,i=o.x>t.x&&r.xt.y&&r.y=r.lat&&n.lat<=o.lat&&t.lng>=r.lng&&n.lng<=o.lng},intersects:function(e){e=z(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),o=e.getNorthEast(),i=o.lat>=t.lat&&r.lat<=n.lat,a=o.lng>=t.lng&&r.lng<=n.lng;return i&&a},overlaps:function(e){e=z(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),o=e.getNorthEast(),i=o.lat>t.lat&&r.latt.lng&&r.lng1,ke=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",l,t),window.removeEventListener("testPassiveEventSupport",l,t)}catch(n){}return e}(),Ce=!!document.createElement("canvas").getContext,je=!(!document.createElementNS||!X("svg").createSVGRect),Ne=!!je&&function(){var e=document.createElement("div");return e.innerHTML="","http://www.w3.org/2000/svg"===(e.firstChild&&e.firstChild.namespaceURI)}(),Ie=!je&&function(){try{var e=document.createElement("div");e.innerHTML='';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"===typeof t.adj}catch(n){return!1}}();function Me(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Re={ie:$,ielt9:ee,edge:te,webkit:ne,android:re,android23:oe,androidStock:ae,opera:se,chrome:ue,gecko:le,safari:ce,phantom:fe,opera12:he,win:de,ie3d:pe,webkit3d:ve,gecko3d:me,any3d:ye,mobile:ge,mobileWebkit:_e,mobileWebkit3d:be,msPointer:we,pointer:Oe,touch:Se,touchNative:xe,mobileOpera:Ee,mobileGecko:Pe,retina:Te,passiveEvents:ke,canvas:Ce,svg:je,vml:Ie,inlineSvg:Ne},Ae=Re.msPointer?"MSPointerDown":"pointerdown",Le=Re.msPointer?"MSPointerMove":"pointermove",De=Re.msPointer?"MSPointerUp":"pointerup",Ue=Re.msPointer?"MSPointerCancel":"pointercancel",ze={touchstart:Ae,touchmove:Le,touchend:De,touchcancel:Ue},Be={touchstart:Xe,touchmove:Ke,touchend:Ke,touchcancel:Ke},Fe={},We=!1;function qe(e,t,n){return"touchstart"===t&&Ye(),Be[t]?(n=Be[t].bind(this,n),e.addEventListener(ze[t],n,!1),n):(console.warn("wrong event specified:",t),L.Util.falseFn)}function He(e,t,n){ze[t]?e.removeEventListener(ze[t],n,!1):console.warn("wrong event specified:",t)}function Ve(e){Fe[e.pointerId]=e}function Ze(e){Fe[e.pointerId]&&(Fe[e.pointerId]=e)}function Ge(e){delete Fe[e.pointerId]}function Ye(){We||(document.addEventListener(Ae,Ve,!0),document.addEventListener(Le,Ze,!0),document.addEventListener(De,Ge,!0),document.addEventListener(Ue,Ge,!0),We=!0)}function Ke(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],Fe)t.touches.push(Fe[n]);t.changedTouches=[t],e(t)}}function Xe(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Vt(t),Ke(e,t)}function Qe(e){var t,n,r={};for(n in e)t=e[n],r[n]=t&&t.bind?t.bind(e):t;return e=r,r.type="dblclick",r.detail=2,r.isTrusted=!1,r._simulated=!0,r}var Je=200;function $e(e,t){e.addEventListener("dblclick",t);var n,r=0;function o(e){if(1===e.detail){if("mouse"!==e.pointerType&&(!e.sourceCapabilities||e.sourceCapabilities.firesTouchEvents)){var o=Date.now();o-r<=Je?2===++n&&t(Qe(e)):n=1,r=o}}else n=e.detail}return e.addEventListener("click",o),{dblclick:t,simDblclick:o}}function et(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}var tt,nt,rt,ot,it,at=xt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),st=xt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ut="webkitTransition"===st||"OTransition"===st?st+"End":"transitionend";function lt(e){return"string"===typeof e?document.getElementById(e):e}function ct(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){var r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return"auto"===n?null:n}function ft(e,t,n){var r=document.createElement(e);return r.className=t||"",n&&n.appendChild(r),r}function ht(e){var t=e.parentNode;t&&t.removeChild(e)}function dt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function pt(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function vt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function mt(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=bt(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function yt(e,t){if(void 0!==e.classList)for(var n=h(t),r=0,o=n.length;rthis.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,z(e));return n.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=R((t=t||{}).paddingTopLeft||t.padding||[0,0]),r=R(t.paddingBottomRight||t.padding||[0,0]),o=this.project(this.getCenter()),i=this.project(e),a=this.getPixelBounds(),s=D([a.min.add(n),a.max.subtract(r)]),u=s.getSize();if(!s.contains(i)){this._enforcingBounds=!0;var l=i.subtract(s.getCenter()),c=s.extend(i).getSize().subtract(u);o.x+=l.x<0?-c.x:c.x,o.y+=l.y<0?-c.y:c.y,this.panTo(this.unproject(o),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=n({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),i=t.divideBy(2).round(),a=r.divideBy(2).round(),s=i.subtract(a);return s.x||s.y?(e.animate&&e.pan?this.panBy(s):(e.pan&&this._rawPanBy(s),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=n({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=o(this._handleGeolocationResponse,this),r=o(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,r,e):navigator.geolocation.getCurrentPosition(t,r,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=new B(e.coords.latitude,e.coords.longitude),n=t.toBounds(2*e.coords.accuracy),r=this._locateOptions;if(r.setView){var o=this.getBoundsZoom(n);this.setView(t,r.maxZoom?Math.min(o,r.maxZoom):o)}var i={latlng:t,bounds:n,timestamp:e.timestamp};for(var a in e.coords)"number"===typeof e.coords[a]&&(i[a]=e.coords[a]);this.fire("locationfound",i)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ht(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)ht(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=ft("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new U(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=z(e),n=R(n||[0,0]);var r=this.getZoom()||0,o=this.getMinZoom(),i=this.getMaxZoom(),a=e.getNorthWest(),s=e.getSouthEast(),u=this.getSize().subtract(n),l=D(this.project(s,r),this.project(a,r)).getSize(),c=Re.any3d?this.options.zoomSnap:1,f=u.x/l.x,h=u.y/l.y,d=t?Math.max(f,h):Math.min(f,h);return r=this.getScaleZoom(d,r),c&&(r=Math.round(r/(c/100))*(c/100),r=t?Math.ceil(r/c)*c:Math.floor(r/c)*c),Math.max(o,Math.min(i,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new I(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new A(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"===typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=void 0===t?this._zoom:t;var r=n.zoom(e*n.scale(t));return isNaN(r)?1/0:r},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(F(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(R(e),t)},layerPointToLatLng:function(e){var t=R(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(F(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(F(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(z(e))},distance:function(e,t){return this.options.crs.distance(F(e),F(t))},containerPointToLayerPoint:function(e){return R(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return R(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(R(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(e)))},mouseEventToContainerPoint:function(e){return Gt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=lt(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");At(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Re.any3d,yt(e,"leaflet-container"+(Re.touch?" leaflet-touch":"")+(Re.retina?" leaflet-retina":"")+(Re.ielt9?" leaflet-oldie":"")+(Re.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=ct(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Et(this._mapPane,new I(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(yt(e.markerPane,"leaflet-zoom-hide"),yt(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t){Et(this._mapPane,new I(0,0));var n=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var r=this._zoom!==t;this._moveStart(r,!1)._move(e,t)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,r){void 0===t&&(t=this._zoom);var o=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),r?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){Et(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[a(this._container)]=this;var t=e?Dt:At;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Re.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=E((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,r=[],o="mouseout"===t||"mouseover"===t,i=e.target||e.srcElement,s=!1;i;){if((n=this._targets[a(i)])&&("click"===t||"preclick"===t)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(t,!0)){if(o&&!Xt(i,e))break;if(r.push(n),o)break}if(i===this._container)break;i=i.parentNode}return r.length||s||o||!this.listens(t,!0)||(r=[this]),r},_isClickDisabled:function(e){for(;e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(t))){var n=e.type;"mousedown"===n&&jt(t),this._fireDOMEvent(e,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,r){if("click"===e.type){var o=n({},e);o.type="preclick",this._fireDOMEvent(o,o.type,r)}var i=this._findEventTargets(e,t);if(r){for(var a=[],s=0;s0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),r=Re.any3d?this.options.zoomSnap:1;return r&&(e=Math.round(e/r)*r),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){gt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n))&&(this.panBy(n,t),!0)},_createAnimProxy:function(){var e=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",(function(e){var t=at,n=this._proxy.style[t];St(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ht(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();St(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),o=this._getCenterOffset(e)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(o))&&(E((function(){this._moveStart(!0,!1)._animateZoom(e,t,!0)}),this),!0)},_animateZoom:function(e,t,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,yt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:r}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&>(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function en(e,t){return new $t(e,t)}var tn=k.extend({options:{position:"topright"},initialize:function(e){d(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return yt(t,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(t,r.firstChild):r.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ht(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),nn=function(e){return new tn(e)};$t.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",n=this._controlContainer=ft("div",t+"control-container",this._container);function r(r,o){var i=t+r+" "+t+o;e[r+o]=ft("div",i,n)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)ht(this._controlCorners[e]);ht(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rn=tn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,r){return n1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(a(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n='",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(e){var t,n=document.createElement("label"),r=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=r):t=this._createRadioElement("leaflet-base-layers_"+a(this),r),this._layerControlInputs.push(t),t.layerId=a(e.layer),At(t,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+e.name;var i=document.createElement("span");return n.appendChild(i),i.appendChild(t),i.appendChild(o),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var e,t,n=this._layerControlInputs,r=[],o=[];this._handlingClick=!0;for(var i=n.length-1;i>=0;i--)e=n[i],t=this._getLayer(e.layerId).layer,e.checked?r.push(t):e.checked||o.push(t);for(i=0;i=0;o--)e=n[o],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&rt.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),on=function(e,t,n){return new rn(e,t,n)},an=tn.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=ft("div",t+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,r,o){var i=ft("a",n,r);return i.innerHTML=e,i.href="#",i.title=t,i.setAttribute("role","button"),i.setAttribute("aria-label",t),Ht(i),At(i,"click",Zt),At(i,"click",o,this),At(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";gt(this._zoomInButton,t),gt(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(yt(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(yt(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});$t.mergeOptions({zoomControl:!0}),$t.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new an,this.addControl(this.zoomControl))}));var sn=function(e){return new an(e)},un=tn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=ft("div",t),r=this.options;return this._addScales(r,t+"-line",n),e.on(r.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=ft("div",t,n)),e.imperial&&(this._iScale=ft("div",t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t,n,r,o=3.2808399*e;o>5280?(t=o/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mi",n/t)):(r=this._getRoundNum(o),this._updateScale(this._iScale,r+" ft",r/o))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),ln=function(e){return new un(e)},cn='',fn=tn.extend({options:{position:"bottomright",prefix:''+(Re.inlineSvg?cn+" ":"")+"Leaflet"},initialize:function(e){d(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),Ht(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",(function(){this.removeAttribution(e.layer.getAttribution())}),this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' ')}}});$t.mergeOptions({attributionControl:!0}),$t.addInitHook((function(){this.options.attributionControl&&(new fn).addTo(this)}));var hn=function(e){return new fn(e)};tn.Layers=rn,tn.Zoom=an,tn.Scale=un,tn.Attribution=fn,nn.layers=on,nn.zoom=sn,nn.scale=ln,nn.attribution=hn;var dn=k.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});dn.addTo=function(e,t){return e.addHandler(t,this),this};var pn,vn={Events:j},mn=Re.touch?"touchstart mousedown":"mousedown",yn=N.extend({options:{clickTolerance:3},initialize:function(e,t,n,r){d(this,r),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(At(this._dragStartTarget,mn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(yn._dragging===this&&this.finishDrag(!0),Dt(this._dragStartTarget,mn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!mt(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)yn._dragging===this&&this.finishDrag();else if(!(yn._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches)&&(yn._dragging=this,this._preventOutline&&jt(this._element),kt(),tt(),!this._moving)){this.fire("down");var t=e.touches?e.touches[0]:e,n=It(this._element);this._startPoint=new I(t.clientX,t.clientY),this._startPos=Pt(this._element),this._parentScale=Mt(n);var r="mousedown"===e.type;At(document,r?"mousemove":"touchmove",this._onMove,this),At(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,n=new I(t.clientX,t.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)u&&(i=a,u=s);u>n&&(t[i]=1,On(e,t,n,r,i),On(e,t,n,i,o))}function xn(e,t){for(var n=[e[0]],r=1,o=0,i=e.length;rt&&(n.push(e[r]),o=r);return ot.max.x&&(n|=2),e.yt.max.y&&(n|=8),n}function Tn(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function kn(e,t,n,r){var o,i=t.x,a=t.y,s=n.x-i,u=n.y-a,l=s*s+u*u;return l>0&&((o=((e.x-i)*s+(e.y-a)*u)/l)>1?(i=n.x,a=n.y):o>0&&(i+=s*o,a+=u*o)),s=e.x-i,u=e.y-a,r?s*s+u*u:new I(i,a)}function Cn(e){return!y(e[0])||"object"!==typeof e[0][0]&&"undefined"!==typeof e[0][0]}function jn(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Cn(e)}var Nn={__proto__:null,simplify:gn,pointToSegmentDistance:_n,closestPointOnSegment:bn,clipSegment:Sn,_getEdgeIntersection:En,_getBitCode:Pn,_sqClosestPointOnSegment:kn,isFlat:Cn,_flat:jn};function In(e,t,n){var r,o,i,a,s,u,l,c,f,h=[1,4,2,8];for(o=0,l=e.length;o1e-7;u++)t=i*Math.sin(s),t=Math.pow((1-t)/(1+t),i/2),s+=l=Math.PI/2-2*Math.atan(a*t)-s;return new B(s*n,e.x*n/r)}},Ln={__proto__:null,LonLat:Rn,Mercator:An,SphericalMercator:V},Dn=n({},q,{code:"EPSG:3395",projection:An,transformation:function(){var e=.5/(Math.PI*An.R);return G(e,.5,-e,.5)}()}),Un=n({},q,{code:"EPSG:4326",projection:Rn,transformation:G(1/180,1,-1/180,.5)}),zn=n({},W,{projection:Rn,transformation:G(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,r=t.lat-e.lat;return Math.sqrt(n*n+r*r)},infinite:!0});W.Earth=q,W.EPSG3395=Dn,W.EPSG3857=Y,W.EPSG900913=K,W.EPSG4326=Un,W.Simple=zn;var Bn=N.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[a(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[a(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once("remove",(function(){t.off(n,this)}),this)}this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this})}}});$t.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=a(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=a(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return a(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?y(e)?e:[e]:[]).length;tthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t)return a=(r-t)/n,this._map.layerPointToLatLng([i.x-a*(i.x-o.x),i.y-a*(i.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=F(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new U,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return Cn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=Cn(e),r=0,o=e.length;r=2&&t[0]instanceof B&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){nr.prototype._setLatLngs.call(this,e),Cn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Cn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new I(t,t);if(e=new A(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var r,o=0,i=this._rings.length;oe.y!==r.y>e.y&&e.x<(r.x-n.x)*(e.y-n.y)/(r.y-n.y)+n.x&&(l=!l);return l||nr.prototype._containsPoint.call(this,e,!0)}});function ir(e,t){return new or(e,t)}var ar=qn.extend({initialize:function(e,t){d(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,r,o=y(e)?e:e.features;if(o){for(t=0,n=o.length;t0?r:[t.src]}else{y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var a=0;ao?(t.height=o+"px",yt(e,i)):gt(e,i),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();Et(this._container,t.add(n))},_adjustPan:function(e){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,n=parseInt(ct(this._container,"marginBottom"),10)||0,r=this._container.offsetHeight+n,o=this._containerWidth,i=new I(this._containerLeft,-r-this._containerBottom);i._add(Pt(this._container));var a=t.layerPointToContainerPoint(i),s=R(this.options.autoPanPadding),u=R(this.options.autoPanPaddingTopLeft||s),l=R(this.options.autoPanPaddingBottomRight||s),c=t.getSize(),f=0,h=0;a.x+o+l.x>c.x&&(f=a.x+o-c.x+l.x),a.x-f-u.x<0&&(f=a.x-u.x),a.y+r+l.y>c.y&&(h=a.y+r-c.y+l.y),a.y-h-u.y<0&&(h=a.y-u.y),(f||h)&&t.fire("autopanstart").panBy([f,h],{animate:e&&"moveend"===e.type})}},_getAnchor:function(){return R(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Pr=function(e,t){return new Er(e,t)};$t.mergeOptions({closePopupOnClick:!0}),$t.include({openPopup:function(e,t,n){return this._initOverlay(Er,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),Bn.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Er,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&this._popup._prepareOpen(e)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){Zt(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof Qn?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var Tr=Sr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Sr.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Sr.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Sr.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,r=this._map,o=this._container,i=r.latLngToContainerPoint(r.getCenter()),a=r.layerPointToContainerPoint(e),s=this.options.direction,u=o.offsetWidth,l=o.offsetHeight,c=R(this.options.offset),f=this._getAnchor();"top"===s?(t=u/2,n=l):"bottom"===s?(t=u/2,n=0):"center"===s?(t=u/2,n=l/2):"right"===s?(t=0,n=l/2):"left"===s?(t=u,n=l/2):a.xthis.options.maxZoom||nr&&this._retainParent(o,i,a,r))},_retainChildren:function(e,t,n,r){for(var o=2*e;o<2*e+2;o++)for(var i=2*t;i<2*t+2;i++){var a=new I(o,i);a.z=n+1;var s=this._tileCoordsToKey(a),u=this._tiles[s];u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(e,n);else{for(var f=o.min.y;f<=o.max.y;f++)for(var h=o.min.x;h<=o.max.x;h++){var d=new I(h,f);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:a.push(d)}}if(a.sort((function(e,t){return e.distanceTo(i)-t.distanceTo(i)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(h=0;hn.max.x)||!t.wrapLat&&(e.yn.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(e);return z(this.options.bounds).overlaps(r)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),r=e.scaleBy(n),o=r.add(n);return[t.unproject(r,e.z),t.unproject(o,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new U(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),n=new I(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(ht(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){yt(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=l,e.onmousemove=l,Re.ielt9&&this.options.opacity<1&&wt(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),r=this._tileCoordsToKey(e),i=this.createTile(this._wrapCoords(e),o(this._tileReady,this,e));this._initTile(i),this.createTile.length<2&&E(o(this._tileReady,this,e,null,i)),Et(i,n),this._tiles[r]={el:i,coords:e,current:!0},t.appendChild(i),this.fire("tileloadstart",{tile:i,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var r=this._tileCoordsToKey(e);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(wt(n.el,0),P(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(yt(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Re.ielt9||!this._map._fadeAnimated?E(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new I(this._wrapX?u(e.x,this._wrapX):e.x,this._wrapY?u(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new A(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Ir(e){return new Nr(e)}var Mr=Nr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=d(this,t)).detectRetina&&Re.retina&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom++):(t.zoomOffset++,t.maxZoom--),t.minZoom=Math.max(0,t.minZoom)),"string"===typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return At(n,"load",o(this._tileOnLoad,this,t,n)),At(n,"error",o(this._tileOnError,this,t,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"===typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:Re.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=r),t["-y"]=r}return m(this._url,n(t,this.options))},_tileOnLoad:function(e,t){Re.ielt9?setTimeout(o(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var r=this.options.errorTileUrl;r&&t.getAttribute("src")!==r&&(t.src=r),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=l,t.onerror=l,!t.complete)){t.src=_;var n=this._tiles[e].coords;ht(t),delete this._tiles[e],this.fire("tileabort",{tile:t,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",_),Nr.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==_))return Nr.prototype._tileReady.call(this,e,t,n)}});function Rr(e,t){return new Mr(e,t)}var Ar=Mr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var r=n({},this.defaultWmsParams);for(var o in t)o in this.options||(r[o]=t[o]);var i=(t=d(this,t)).detectRetina&&Re.retina?2:1,a=this.getTileSize();r.width=a.x*i,r.height=a.y*i,this.wmsParams=r},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,Mr.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,r=D(n.project(t[0]),n.project(t[1])),o=r.min,i=r.max,a=(this._wmsVersion>=1.3&&this._crs===Un?[o.y,o.x,i.y,i.x]:[o.x,o.y,i.x,i.y]).join(","),s=Mr.prototype.getTileUrl.call(this,e);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(e,t){return n(this.wmsParams,e),t||this.redraw(),this}});function Lr(e,t){return new Ar(e,t)}Mr.WMS=Ar,Rr.wms=Lr;var Dr=Bn.extend({options:{padding:.1},initialize:function(e){d(this,e),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&yt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,t),i=r.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(e,t));Re.any3d?St(this._container,i,n):Et(this._container,i)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new A(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ur=Dr.extend({options:{tolerance:0},getEvents:function(){var e=Dr.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Dr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");At(e,"mousemove",this._onMouseMove,this),At(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),At(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,ht(this._container),Dt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Dr.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),r=Re.retina?2:1;Et(t,e.min),t.width=r*n.x,t.height=r*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",Re.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){Dr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[a(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,r=t.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete e._order,delete this._layers[a(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"===typeof e.options.dashArray){var t,n,r=e.options.dashArray.split(/[, ]+/),o=[];for(n=0;n')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Fr={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Dr.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=Br("shape");yt(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=Br("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[a(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;ht(t),e.removeInteractiveTarget(t),delete this._layers[a(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,r=e.options,o=e._container;o.stroked=!!r.stroke,o.filled=!!r.fill,r.stroke?(t||(t=e._stroke=Br("stroke")),o.appendChild(t),t.weight=r.weight+"px",t.color=r.color,t.opacity=r.opacity,r.dashArray?t.dashStyle=y(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=r.lineCap.replace("butt","flat"),t.joinstyle=r.lineJoin):t&&(o.removeChild(t),e._stroke=null),r.fill?(n||(n=e._fill=Br("fill")),o.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(o.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),r=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+r+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){pt(e._container)},_bringToBack:function(e){vt(e._container)}},Wr=Re.vml?Br:X,qr=Dr.extend({_initContainer:function(){this._container=Wr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ht(this._container),Dt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Dr.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),Et(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=Wr("path");e.options.className&&yt(t,e.options.className),e.options.interactive&&yt(t,"leaflet-interactive"),this._updateStyle(e),this._layers[a(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){ht(e._path),e.removeInteractiveTarget(e._path),delete this._layers[a(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute("stroke",n.color),t.setAttribute("stroke-opacity",n.opacity),t.setAttribute("stroke-width",n.weight),t.setAttribute("stroke-linecap",n.lineCap),t.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?t.setAttribute("stroke-dasharray",n.dashArray):t.removeAttribute("stroke-dasharray"),n.dashOffset?t.setAttribute("stroke-dashoffset",n.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),n.fill?(t.setAttribute("fill",n.fillColor||n.color),t.setAttribute("fill-opacity",n.fillOpacity),t.setAttribute("fill-rule",n.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,Q(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),r="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",o=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+r+2*n+",0 "+r+2*-n+",0 ";this._setPath(e,o)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){pt(e._path)},_bringToBack:function(e){vt(e._path)}});function Hr(e){return Re.svg||Re.vml?new qr(e):null}Re.vml&&qr.include(Fr),$t.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&zr(e)||Hr(e)}});var Vr=or.extend({initialize:function(e,t){or.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=z(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function Zr(e,t){return new Vr(e,t)}qr.create=Wr,qr.pointsToPath=Q,ar.geometryToLayer=sr,ar.coordsToLatLng=lr,ar.coordsToLatLngs=cr,ar.latLngToCoords=fr,ar.latLngsToCoords=hr,ar.getFeature=dr,ar.asFeature=pr,$t.mergeOptions({boxZoom:!0});var Gr=dn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){At(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Dt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ht(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),tt(),kt(),this._startPoint=this._map.mouseEventToContainerPoint(e),At(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),yt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new A(this._point,this._startPoint),n=t.getSize();Et(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ht(this._box),gt(this._container,"leaflet-crosshair")),nt(),Ct(),Dt(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var t=new U(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});$t.addInitHook("addHandler","boxZoom",Gr),$t.mergeOptions({doubleClickZoom:!0});var Yr=dn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),r=t.options.zoomDelta,o=e.originalEvent.shiftKey?n-r:n+r;"center"===t.options.doubleClickZoom?t.setZoom(o):t.setZoomAround(e.containerPoint,o)}});$t.addInitHook("addHandler","doubleClickZoom",Yr),$t.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Kr=dn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new yn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}yt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){gt(this._map._container,"leaflet-grab"),gt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=z(this._map.options.maxBounds);this._offsetLimit=D(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.xt.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,o=(r-t+n)%e+t-n,i=(r+t+n)%e-t-n,a=Math.abs(o+n)0?i:-i))-t;this._delta=0,this._startTime=null,a&&("center"===e.options.scrollWheelZoom?e.setZoom(t+a):e.setZoomAround(this._lastMousePos,t+a))}});$t.addInitHook("addHandler","scrollWheelZoom",Qr);var Jr=600;$t.mergeOptions({tapHold:Re.touchNative&&Re.safari&&Re.mobile,tapTolerance:15});var $r=dn.extend({addHooks:function(){At(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Dt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new I(t.clientX,t.clientY),this._holdTimeout=setTimeout(o((function(){this._cancel(),this._isTapValid()&&(At(document,"touchend",Vt),At(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))}),this),Jr),At(document,"touchend touchcancel contextmenu",this._cancel,this),At(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Dt(document,"touchend",Vt),Dt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Dt(document,"touchend touchcancel contextmenu",this._cancel,this),Dt(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new I(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}});$t.addInitHook("addHandler","tapHold",$r),$t.mergeOptions({touchZoom:Re.touch,bounceAtZoomLimits:!0});var eo=dn.extend({addHooks:function(){yt(this._map._container,"leaflet-touch-zoom"),At(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){gt(this._map._container,"leaflet-touch-zoom"),Dt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),At(document,"touchmove",this._onTouchMove,this),At(document,"touchend touchcancel",this._onTouchEnd,this),Vt(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]),i=n.distanceTo(r)/this._startDist;if(this._zoom=t.getScaleZoom(i,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoomt.getMaxZoom()&&i>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===i)return}else{var a=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===i&&0===a.x&&0===a.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),P(this._animRequest);var s=o(t._move,t,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=E(s,this,!0),Vt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),Dt(document,"touchmove",this._onTouchMove,this),Dt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});$t.addInitHook("addHandler","touchZoom",eo),$t.BoxZoom=Gr,$t.DoubleClickZoom=Yr,$t.Drag=Kr,$t.Keyboard=Xr,$t.ScrollWheelZoom=Qr,$t.TapHold=$r,$t.TouchZoom=eo,e.Bounds=A,e.Browser=Re,e.CRS=W,e.Canvas=Ur,e.Circle=er,e.CircleMarker=Jn,e.Class=k,e.Control=tn,e.DivIcon=Cr,e.DivOverlay=Sr,e.DomEvent=Qt,e.DomUtil=Rt,e.Draggable=yn,e.Evented=N,e.FeatureGroup=qn,e.GeoJSON=ar,e.GridLayer=Nr,e.Handler=dn,e.Icon=Vn,e.ImageOverlay=gr,e.LatLng=B,e.LatLngBounds=U,e.Layer=Bn,e.LayerGroup=Fn,e.LineUtil=Nn,e.Map=$t,e.Marker=Kn,e.Mixin=vn,e.Path=Qn,e.Point=I,e.PolyUtil=Mn,e.Polygon=or,e.Polyline=nr,e.Popup=Er,e.PosAnimation=Jt,e.Projection=Ln,e.Rectangle=Vr,e.Renderer=Dr,e.SVG=qr,e.SVGOverlay=Or,e.TileLayer=Mr,e.Tooltip=Tr,e.Transformation=Z,e.Util=T,e.VideoOverlay=br,e.bind=o,e.bounds=D,e.canvas=zr,e.circle=tr,e.circleMarker=$n,e.control=nn,e.divIcon=jr,e.extend=n,e.featureGroup=Hn,e.geoJSON=mr,e.geoJson=yr,e.gridLayer=Ir,e.icon=Zn,e.imageOverlay=_r,e.latLng=F,e.latLngBounds=z,e.layerGroup=Wn,e.map=en,e.marker=Xn,e.point=R,e.polygon=ir,e.polyline=rr,e.popup=Pr,e.rectangle=Zr,e.setOptions=d,e.stamp=a,e.svg=Hr,e.svgOverlay=xr,e.tileLayer=Rr,e.tooltip=kr,e.transformation=G,e.version=t,e.videoOverlay=wr;var to=window.L;e.noConflict=function(){return window.L=to,this},window.L=e}(t)},290:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNotificationFilterIsEmpty=t.assertImpersonatedUserIsEmpty=t.assertTxConfigIsEmpty=t.assertDatabaseIsEmpty=void 0;var r=n(6666);n(2752);t.assertTxConfigIsEmpty=function(e,t,n){if(void 0===t&&(t=function(){}),e&&!e.isEmpty()){var o=(0,r.newError)("Driver is connected to the database that does not support transaction configuration. Please upgrade to neo4j 3.5.0 or later in order to use this functionality");throw t(o.message),n.onError(o),o}},t.assertDatabaseIsEmpty=function(e,t,n){if(void 0===t&&(t=function(){}),e){var o=(0,r.newError)("Driver is connected to the database that does not support multiple databases. Please upgrade to neo4j 4.0.0 or later in order to use this functionality");throw t(o.message),n.onError(o),o}},t.assertImpersonatedUserIsEmpty=function(e,t,n){if(void 0===t&&(t=function(){}),e){var o=(0,r.newError)("Driver is connected to the database that does not support user impersonation. Please upgrade to neo4j 4.4.0 or later in order to use this functionality. "+"Trying to impersonate ".concat(e,"."));throw t(o.message),n.onError(o),o}},t.assertNotificationFilterIsEmpty=function(e,t,n){if(void 0===t&&(t=function(){}),void 0!==e){var o=(0,r.newError)("Driver is connected to a database that does not support user notification filters. Please upgrade to Neo4j 5.7.0 or later in order to use this functionality. "+"Trying to set notifications to ".concat(r.json.stringify(e),"."));throw t(o.message),n.onError(o),o}}},8718:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(290),u=(n(1349),n(6663)),l=i(n(5071)),c=n(2752),f=n(6666),h=a(n(6026)),d=a(n(7524)),p=f.internal.bookmarks.Bookmarks,v=f.internal.constants,m=v.ACCESS_MODE_WRITE,y=v.BOLT_PROTOCOL_V1,g=(f.internal.logger.Logger,f.internal.txConfig.TxConfig),_=function(){function e(e,t,n,r,o,i){var a=void 0===n?{}:n,s=a.disableLosslessIntegers,u=a.useBigInt;void 0===r&&(r=function(){return null}),this._server=e||{},this._chunker=t,this._packer=this._createPacker(t),this._unpacker=this._createUnpacker(s,u),this._responseHandler=r(this),this._log=o,this._onProtocolError=i,this._fatalError=null,this._lastMessageSignature=null,this._config={disableLosslessIntegers:s,useBigInt:u}}return Object.defineProperty(e.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new d.default(Object.values(h.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),e.prototype.packer=function(){return this._packer},e.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},e.prototype.unpacker=function(){return this._unpacker},e.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},e.prototype.transformMetadata=function(e){return e},e.prototype.initialize=function(e){var t=this,n=void 0===e?{}:e,r=n.userAgent,o=(n.boltAgent,n.authToken),i=n.notificationFilter,a=n.onError,u=n.onComplete,f=new c.LoginObserver({onError:function(e){return t._onLoginError(e,a)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,s.assertNotificationFilterIsEmpty)(i,this._onProtocolError,f),this.write(l.default.init(r,o),f,!0),f},e.prototype.logoff=function(e){var t=void 0===e?{}:e,n=t.onComplete,r=t.onError,o=(t.flush,new c.LogoffObserver({onCompleted:n,onError:r})),i=(0,f.newError)("Driver is connected to a database that does not support logoff. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(i.message),o.onError(i),i},e.prototype.logon=function(e){var t=this,n=void 0===e?{}:e,r=n.authToken,o=n.onComplete,i=n.onError,a=(n.flush,new c.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,o)},onError:function(e){return t._onLoginError(e,i)}})),s=(0,f.newError)("Driver is connected to a database that does not support logon. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(s.message),a.onError(s),s},e.prototype.prepareToClose=function(){},e.prototype.beginTransaction=function(e){var t=void 0===e?{}:e,n=t.bookmarks,r=t.txConfig,o=t.database,i=t.mode,a=t.impersonatedUser,s=t.notificationFilter,u=t.beforeError,l=t.afterError,c=t.beforeComplete,f=t.afterComplete;return this.run("BEGIN",n?n.asBeginTransactionParameters():{},{bookmarks:n,txConfig:r,database:o,mode:i,impersonatedUser:a,notificationFilter:s,beforeError:u,afterError:l,beforeComplete:c,afterComplete:f,flush:!1})},e.prototype.commitTransaction=function(e){var t=void 0===e?{}:e,n=t.beforeError,r=t.afterError,o=t.beforeComplete,i=t.afterComplete;return this.run("COMMIT",{},{bookmarks:p.empty(),txConfig:g.empty(),mode:m,beforeError:n,afterError:r,beforeComplete:o,afterComplete:i})},e.prototype.rollbackTransaction=function(e){var t=void 0===e?{}:e,n=t.beforeError,r=t.afterError,o=t.beforeComplete,i=t.afterComplete;return this.run("ROLLBACK",{},{bookmarks:p.empty(),txConfig:g.empty(),mode:m,beforeError:n,afterError:r,beforeComplete:o,afterComplete:i})},e.prototype.run=function(e,t,n){var r=void 0===n?{}:n,o=(r.bookmarks,r.txConfig),i=r.database,a=(r.mode,r.impersonatedUser),u=r.notificationFilter,f=r.beforeKeys,h=r.afterKeys,d=r.beforeError,p=r.afterError,v=r.beforeComplete,m=r.afterComplete,y=r.flush,g=void 0===y||y,_=r.highRecordWatermark,b=void 0===_?Number.MAX_VALUE:_,w=r.lowRecordWatermark,O=void 0===w?Number.MAX_VALUE:w,x=new c.ResultStreamObserver({server:this._server,beforeKeys:f,afterKeys:h,beforeError:d,afterError:p,beforeComplete:v,afterComplete:m,highRecordWatermark:b,lowRecordWatermark:O});return(0,s.assertTxConfigIsEmpty)(o,this._onProtocolError,x),(0,s.assertDatabaseIsEmpty)(i,this._onProtocolError,x),(0,s.assertImpersonatedUserIsEmpty)(a,this._onProtocolError,x),(0,s.assertNotificationFilterIsEmpty)(u,this._onProtocolError,x),this.write(l.default.run(e,t),x,!1),this.write(l.default.pullAll(),x,g),x},Object.defineProperty(e.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),e.prototype.reset=function(e){var t=void 0===e?{}:e,n=t.onError,r=t.onComplete,o=new c.ResetObserver({onProtocolError:this._onProtocolError,onError:n,onComplete:r});return this.write(l.default.reset(),o,!0),o},e.prototype.telemetry=function(e,t){e.api;var n=void 0===t?{}:t,r=(n.onError,n.onCompleted),o=new c.CompletedObserver;return r&&r(),o},e.prototype._createPacker=function(e){return new u.v1.Packer(e)},e.prototype._createUnpacker=function(e,t){return new u.v1.Unpacker(e,t)},e.prototype.write=function(e,t,n){if(this.queueObserverIfProtocolIsNotBroken(t)){this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature;var r=new u.structure.Structure(e.signature,e.fields);this.packable(r)(),this._chunker.messageBoundary(),n&&this._chunker.flush()}},e.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===l.SIGNATURES.HELLO||this._lastMessageSignature===l.SIGNATURES.LOGON},e.prototype.isLastMessageReset=function(){return this._lastMessageSignature===l.SIGNATURES.RESET},e.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},e.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},e.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},e.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},e.prototype.isBroken=function(){return!!this._fatalError},e.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},e.prototype.resetFailure=function(){this._responseHandler._resetFailure()},e.prototype._onLoginCompleted=function(e,t,n){if(this._initialized=!0,this._authToken=t,e){var r=e.server;this._server.version||(this._server.version=r)}n&&n(e)},e.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},e}();t.default=_},6026:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6666),i=n(6663),a=n(7524),s=o.error.PROTOCOL_ERROR;t.default={createNodeTransformer:function(){return new a.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof o.Node},toStructure:function(e){throw(0,o.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),s)},fromStructure:function(e){i.structure.verifyStructSize("Node",3,e.size);var t=r(e.fields,3),n=t[0],a=t[1],s=t[2];return new o.Node(n,a,s)}})},createRelationshipTransformer:function(){return new a.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof o.Relationship},toStructure:function(e){throw(0,o.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),s)},fromStructure:function(e){i.structure.verifyStructSize("Relationship",5,e.size);var t=r(e.fields,5),n=t[0],a=t[1],s=t[2],u=t[3],l=t[4];return new o.Relationship(n,a,s,u,l)}})},createUnboundRelationshipTransformer:function(){return new a.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof o.UnboundRelationship},toStructure:function(e){throw(0,o.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),s)},fromStructure:function(e){i.structure.verifyStructSize("UnboundRelationship",3,e.size);var t=r(e.fields,3),n=t[0],a=t[1],s=t[2];return new o.UnboundRelationship(n,a,s)}})},createPathTransformer:function(){return new a.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof o.Path},toStructure:function(e){throw(0,o.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),s)},fromStructure:function(e){i.structure.verifyStructSize("Path",3,e.size);for(var t=r(e.fields,3),n=t[0],a=t[1],s=t[2],u=[],l=n[0],c=0;c0?(d=a[h-1])instanceof o.UnboundRelationship&&(a[h-1]=d=d.bindTo(l,f)):(d=a[-h-1])instanceof o.UnboundRelationship&&(a[-h-1]=d=d.bindTo(f,l)),u.push(new o.PathSegment(l,d,f)),l=f}return new o.Path(n[0],n[n.length-1],u)}})}}},5974:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(8718)),a=o(n(6663)),s=n(6666),u=o(n(1777)),l=o(n(7524)),c=s.internal.constants.BOLT_PROTOCOL_V2,f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype._createPacker=function(e){return new a.default.Packer(e)},t.prototype._createUnpacker=function(e,t){return new a.default.Unpacker(e,t)},Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new l.default(Object.values(u.default).map((function(t){return t(e._config,e._log)})))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),t}(i.default);t.default=f},1777:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6666),s=n(6663),u=n(7524),l=n(2629),c=i(n(6026)),f=a.internal.temporalUtil,h=f.dateToEpochDay,d=f.localDateTimeToEpochSecond,p=f.localTimeToNanoOfDay;function v(e,t,n){if(!t&&!n)return e;var r=function(e){return n?e.toBigInt():e.toNumberOrInfinity()},o=Object.create(Object.getPrototypeOf(e));for(var i in e)if(!0===Object.prototype.hasOwnProperty.call(e,i)){var s=e[i];o[i]=(0,a.isInt)(s)?r(s):s}return Object.freeze(o),o}t.default=r(r({},c.default),{createPoint2DTransformer:function(){return new u.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,a.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new s.structure.Structure(88,[(0,a.int)(e.srid),e.x,e.y])},fromStructure:function(e){s.structure.verifyStructSize("Point2D",3,e.size);var t=o(e.fields,3),n=t[0],r=t[1],i=t[2];return new a.Point(n,r,i,void 0)}})},createPoint3DTransformer:function(){return new u.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,a.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new s.structure.Structure(89,[(0,a.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){s.structure.verifyStructSize("Point3D",4,e.size);var t=o(e.fields,4),n=t[0],r=t[1],i=t[2],u=t[3];return new a.Point(n,r,i,u)}})},createDurationTransformer:function(){return new u.TypeTransformer({signature:69,isTypeInstance:a.isDuration,toStructure:function(e){var t=(0,a.int)(e.months),n=(0,a.int)(e.days),r=(0,a.int)(e.seconds),o=(0,a.int)(e.nanoseconds);return new s.structure.Structure(69,[t,n,r,o])},fromStructure:function(e){s.structure.verifyStructSize("Duration",4,e.size);var t=o(e.fields,4),n=t[0],r=t[1],i=t[2],u=t[3];return new a.Duration(n,r,i,u)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,n=e.useBigInt;return new u.TypeTransformer({signature:116,isTypeInstance:a.isLocalTime,toStructure:function(e){var t=p(e.hour,e.minute,e.second,e.nanosecond);return new s.structure.Structure(116,[t])},fromStructure:function(e){s.structure.verifyStructSize("LocalTime",1,e.size);var r=o(e.fields,1)[0];return v((0,l.nanoOfDayToLocalTime)(r),t,n)}})},createTimeTransformer:function(e){var t=e.disableLosslessIntegers,n=e.useBigInt;return new u.TypeTransformer({signature:84,isTypeInstance:a.isTime,toStructure:function(e){var t=p(e.hour,e.minute,e.second,e.nanosecond),n=(0,a.int)(e.timeZoneOffsetSeconds);return new s.structure.Structure(84,[t,n])},fromStructure:function(e){s.structure.verifyStructSize("Time",2,e.size);var r=o(e.fields,2),i=r[0],u=r[1],c=(0,l.nanoOfDayToLocalTime)(i);return v(new a.Time(c.hour,c.minute,c.second,c.nanosecond,u),t,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,n=e.useBigInt;return new u.TypeTransformer({signature:68,isTypeInstance:a.isDate,toStructure:function(e){var t=h(e.year,e.month,e.day);return new s.structure.Structure(68,[t])},fromStructure:function(e){s.structure.verifyStructSize("Date",1,e.size);var r=o(e.fields,1)[0];return v((0,l.epochDayToDate)(r),t,n)}})},createLocalDateTimeTransformer:function(e){var t=e.disableLosslessIntegers,n=e.useBigInt;return new u.TypeTransformer({signature:100,isTypeInstance:a.isLocalDateTime,toStructure:function(e){var t=d(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),n=(0,a.int)(e.nanosecond);return new s.structure.Structure(100,[t,n])},fromStructure:function(e){s.structure.verifyStructSize("LocalDateTime",2,e.size);var r=o(e.fields,2),i=r[0],a=r[1];return v((0,l.epochSecondAndNanoToLocalDateTime)(i,a),t,n)}})},createDateTimeWithZoneIdTransformer:function(e){var t=e.disableLosslessIntegers,n=e.useBigInt;return new u.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,a.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=d(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),n=(0,a.int)(e.nanosecond),r=e.timeZoneId;return new s.structure.Structure(102,[t,n,r])},fromStructure:function(e){s.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var r=o(e.fields,3),i=r[0],u=r[1],c=r[2],f=(0,l.epochSecondAndNanoToLocalDateTime)(i,u);return v(new a.DateTime(f.year,f.month,f.day,f.hour,f.minute,f.second,f.nanosecond,null,c),t,n)}})},createDateTimeWithOffsetTransformer:function(e){var t=e.disableLosslessIntegers,n=e.useBigInt;return new u.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,a.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=d(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),n=(0,a.int)(e.nanosecond),r=(0,a.int)(e.timeZoneOffsetSeconds);return new s.structure.Structure(70,[t,n,r])},fromStructure:function(e){s.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var r=o(e.fields,3),i=r[0],u=r[1],c=r[2],f=(0,l.epochSecondAndNanoToLocalDateTime)(i,u);return v(new a.DateTime(f.year,f.month,f.day,f.hour,f.minute,f.second,f.nanosecond,c,null),t,n)}})}})},1726:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6663),s=n(6666),u=i(n(2755)),l=i(n(4925));t.default=r(r(r({},u.default),l.default),{createNodeTransformer:function(e){return u.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){a.structure.verifyStructSize("Node",4,e.size);var t=o(e.fields,4),n=t[0],r=t[1],i=t[2],u=t[3];return new s.Node(n,r,i,u)}})},createRelationshipTransformer:function(e){return u.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){a.structure.verifyStructSize("Relationship",8,e.size);var t=o(e.fields,8),n=t[0],r=t[1],i=t[2],u=t[3],l=t[4],c=t[5],f=t[6],h=t[7];return new s.Relationship(n,r,i,u,l,c,f,h)}})},createUnboundRelationshipTransformer:function(e){return u.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){a.structure.verifyStructSize("UnboundRelationship",4,e.size);var t=o(e.fields,4),n=t[0],r=t[1],i=t[2],u=t[3];return new s.UnboundRelationship(n,r,i,u)}})}})},4925:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6663),a=n(6666),s=o(n(2755)),u=n(2629),l=n(9828),c=a.internal.temporalUtil.localDateTimeToEpochSecond;function f(e,t,n){var r=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),o=(0,a.int)(t).multiply(1e3).add((0,a.int)(n).div(1e6)).toNumber(),i=r.formatToParts(o).reduce((function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:l.identity:"hour"===t.type?e.hour=(0,a.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,a.int)(t.value)),e}),{});i.year=i.adjustEra(i.year);var s=c(i.year,i.month,i.day,i.hour,i.minute,i.second,i.nanosecond);return i.timeZoneOffsetSeconds=s.subtract(t),i.hour=i.hour.modulo(24),i}function h(e,t,n){if(!t&&!n)return e;var r=function(e){return n?e.toBigInt():e.toNumberOrInfinity()},o=Object.create(Object.getPrototypeOf(e));for(var i in e)if(!0===Object.prototype.hasOwnProperty.call(e,i)){var s=e[i];o[i]=(0,a.isInt)(s)?r(s):s}return Object.freeze(o),o}t.default={createDateTimeWithZoneIdTransformer:function(e,t){var n=e.disableLosslessIntegers,o=e.useBigInt;return s.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){i.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var t=r(e.fields,3),s=t[0],u=t[1],l=t[2],c=f(l,s,u);return h(new a.DateTime(c.year,c.month,c.day,c.hour,c.minute,c.second,(0,a.int)(u),c.timeZoneOffsetSeconds,l),n,o)},toStructure:function(e){var n=c(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=null!=e.timeZoneOffsetSeconds?e.timeZoneOffsetSeconds:function(e,t,n){var r=f(e,t,n),o=c(r.year,r.month,r.day,r.hour,r.minute,r.second,n).subtract(t),i=t.subtract(o),a=f(e,i,n),s=c(a.year,a.month,a.day,a.hour,a.minute,a.second,n).subtract(i);return s}(e.timeZoneId,n,e.nanosecond);null==e.timeZoneOffsetSeconds&&t.warn('DateTime objects without "timeZoneOffsetSeconds" property are prune to bugs related to ambiguous times. For instance, 2022-10-30T2:30:00[Europe/Berlin] could be GMT+1 or GMT+2.');var o=n.subtract(r),s=(0,a.int)(e.nanosecond),u=e.timeZoneId;return new i.structure.Structure(105,[o,s,u])}})},createDateTimeWithOffsetTransformer:function(e){var t=e.disableLosslessIntegers,n=e.useBigInt;return s.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=c(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),n=(0,a.int)(e.nanosecond),r=(0,a.int)(e.timeZoneOffsetSeconds),o=t.subtract(r);return new i.structure.Structure(73,[o,n,r])},fromStructure:function(e){i.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var o=r(e.fields,3),s=o[0],l=o[1],c=o[2],f=(0,a.int)(s).add(c),d=(0,u.epochSecondAndNanoToLocalDateTime)(f,l);return h(new a.DateTime(d.year,d.month,d.day,d.hour,d.minute,d.second,d.nanosecond,c,null),t,n)}})}}},2336:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n4)throw(0,o.newError)("It should not have more than 4 versions of the protocol");var t=(0,r.alloc)(20);return t.writeInt32(i),e.forEach((function(e){if(e instanceof Array){var n=e[0],r=n.major,o=(i=n.minor)-e[1].minor;t.writeInt32(o<<16|i<<8|r)}else{r=e.major;var i=e.minor;t.writeInt32(i<<8|r)}})),t.reset(),t}([[a(5,4),a(5,0)],[a(4,4),a(4,2)],a(4,1),a(3,0)])}t.default=function(e,t){var n=this;return new Promise((function(r,i){var a=function(e){i(e)};e.onerror=a.bind(n),e._error&&a(e._error),e.onmessage=function(e){try{var n=function(e,t){var n=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()];if(72===n[0]&&84===n[1]&&84===n[2]&&80===n[3])throw t.error("Handshake failed since server responded with HTTP."),(0,o.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)");return Number(n[3]+"."+n[2])}(e,t);r({protocolVersion:n,consumeRemainingBuffer:function(t){e.hasRemaining()&&t(e.readSlice(e.remaining()))}})}catch(a){i(a)}},e.write(s())}))}},6159:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RawRoutingTable=t.BoltProtocol=void 0;var a=i(n(8279)),s=i(n(6903)),u=i(n(7479)),l=i(n(4782));o(n(2752),t),t.BoltProtocol=u.default,t.RawRoutingTable=l.default,t.default={handshake:a.default,create:s.default}},5071:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SIGNATURES=void 0;var r=n(6666),o=r.internal.constants,i=o.ACCESS_MODE_READ,a=o.FETCH_ALL,s=r.internal.util.assertString,u=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63});t.SIGNATURES=u;var l=function(){function e(e,t,n){this.signature=e,this.fields=t,this.toString=n}return e.init=function(t,n){return new e(1,[t,n],(function(){return"INIT ".concat(t," {...}")}))},e.run=function(t,n){return new e(16,[t,n],(function(){return"RUN ".concat(t," ").concat(r.json.stringify(n))}))},e.pullAll=function(){return h},e.reset=function(){return d},e.hello=function(t,n,r,o){void 0===r&&(r=null),void 0===o&&(o=null);var i=Object.assign({user_agent:t},n);return r&&(i.routing=r),o&&(i.patch_bolt=o),new e(1,[i],(function(){return"HELLO {user_agent: '".concat(t,"', ...}")}))},e.hello5x1=function(t,n){void 0===n&&(n=null);var r={user_agent:t};return n&&(r.routing=n),new e(1,[r],(function(){return"HELLO {user_agent: '".concat(t,"', ...}")}))},e.hello5x2=function(t,n,o){void 0===n&&(n=null),void 0===o&&(o=null);var i={user_agent:t};return n&&(n.minimumSeverityLevel&&(i.notifications_minimum_severity=n.minimumSeverityLevel),n.disabledCategories&&(i.notifications_disabled_categories=n.disabledCategories)),o&&(i.routing=o),new e(1,[i],(function(){return"HELLO ".concat(r.json.stringify(i))}))},e.hello5x3=function(t,n,o,i){void 0===o&&(o=null),void 0===i&&(i=null);var a={};return t&&(a.user_agent=t),n&&(a.bolt_agent={product:n.product,platform:n.platform,language:n.language,language_details:n.languageDetails}),o&&(o.minimumSeverityLevel&&(a.notifications_minimum_severity=o.minimumSeverityLevel),o.disabledCategories&&(a.notifications_disabled_categories=o.disabledCategories)),i&&(a.routing=i),new e(1,[a],(function(){return"HELLO ".concat(r.json.stringify(a))}))},e.logon=function(t){return new e(106,[t],(function(){return"LOGON { ... }"}))},e.logoff=function(){return new e(107,[],(function(){return"LOGOFF"}))},e.begin=function(t){var n=void 0===t?{}:t,o=c(n.bookmarks,n.txConfig,n.database,n.mode,n.impersonatedUser,n.notificationFilter);return new e(17,[o],(function(){return"BEGIN ".concat(r.json.stringify(o))}))},e.commit=function(){return p},e.rollback=function(){return v},e.runWithMetadata=function(t,n,o){var i=void 0===o?{}:o,a=c(i.bookmarks,i.txConfig,i.database,i.mode,i.impersonatedUser,i.notificationFilter);return new e(16,[t,n,a],(function(){return"RUN ".concat(t," ").concat(r.json.stringify(n)," ").concat(r.json.stringify(a))}))},e.goodbye=function(){return m},e.pull=function(t){var n=void 0===t?{}:t,o=n.stmtId,i=void 0===o?-1:o,s=n.n,u=f(null===i||void 0===i?-1:i,(void 0===s?a:s)||a);return new e(63,[u],(function(){return"PULL ".concat(r.json.stringify(u))}))},e.discard=function(t){var n=void 0===t?{}:t,o=n.stmtId,i=void 0===o?-1:o,s=n.n,u=f(null===i||void 0===i?-1:i,(void 0===s?a:s)||a);return new e(47,[u],(function(){return"DISCARD ".concat(r.json.stringify(u))}))},e.telemetry=function(t){var n=t.api,o=(0,r.int)(n);return new e(84,[o],(function(){return"TELEMETRY ".concat(o.toString())}))},e.route=function(t,n,o){return void 0===t&&(t={}),void 0===n&&(n=[]),void 0===o&&(o=null),new e(102,[t,n,o],(function(){return"ROUTE ".concat(r.json.stringify(t)," ").concat(r.json.stringify(n)," ").concat(o)}))},e.routeV4x4=function(t,n,o){void 0===t&&(t={}),void 0===n&&(n=[]),void 0===o&&(o={});var i={};return o.databaseName&&(i.db=o.databaseName),o.impersonatedUser&&(i.imp_user=o.impersonatedUser),new e(102,[t,n,i],(function(){return"ROUTE ".concat(r.json.stringify(t)," ").concat(r.json.stringify(n)," ").concat(r.json.stringify(i))}))},e}();function c(e,t,n,r,o,a){var u={};return e.isEmpty()||(u.bookmarks=e.values()),null!==t.timeout&&(u.tx_timeout=t.timeout),t.metadata&&(u.tx_metadata=t.metadata),n&&(u.db=s(n,"database")),o&&(u.imp_user=s(o,"impersonatedUser")),r===i&&(u.mode="r"),a&&(a.minimumSeverityLevel&&(u.notifications_minimum_severity=a.minimumSeverityLevel),a.disabledCategories&&(u.notifications_disabled_categories=a.disabledCategories)),u}function f(e,t){var n={n:(0,r.int)(t)};return-1!==e&&(n.qid=(0,r.int)(e)),n}t.default=l;var h=new l(63,[],(function(){return"PULL_ALL"})),d=new l(15,[],(function(){return"RESET"})),p=new l(18,[],(function(){return"COMMIT"})),v=new l(19,[],(function(){return"ROLLBACK"})),m=new l(2,[],(function(){return"GOODBYE"}))},2008:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6666);function o(){}function i(e){return e}var a={onNext:o,onCompleted:o,onError:o},s=function(){function e(e){var t=void 0===e?{}:e,n=t.transformMetadata,r=t.log,a=t.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=n||i,this._observer=Object.assign({onPendingObserversChange:o,onError:o,onFailure:o,onErrorApplyTransformation:i},a)}return Object.defineProperty(e.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),e.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(r.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(r.json.stringify(e)));try{var n=this._transformMetadata(t);this._currentObserver.onCompleted(n)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(r.json.stringify(e)));try{var o=function(e){if("Neo.TransientError.Transaction.Terminated"===e)return"Neo.ClientError.Transaction.Terminated";if("Neo.TransientError.Transaction.LockClientStopped"===e)return"Neo.ClientError.Transaction.LockClientStopped";return e}(t.code),i=(0,r.newError)(t.message,o);this._currentFailure=this._observer.onErrorApplyTransformation(i),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED ".concat(r.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,r.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,r.newError)("Unknown Bolt protocol message: "+e))}},e.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onPendingObserversChange(this._pendingObservers.length)},e.prototype._queueObserver=function(e){return(e=e||a).onCompleted=e.onCompleted||o,e.onError=e.onError||o,e.onNext=e.onNext||o,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onPendingObserversChange(this._pendingObservers.length),!0},e.prototype._notifyErrorToObservers=function(e){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(e);this._pendingObservers.length>0;){var t=this._pendingObservers.shift();t&&t.onError&&t.onError(e)}},e.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||this._pendingObservers.length>0},e.prototype._resetFailure=function(){this._currentFailure=null},e}();t.default=s},4782:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});o(n(6666));var i=function(){function e(){}return e.ofRecord=function(t){return null===t?e.ofNull():new u(t)},e.ofMessageResponse=function(t){return null===t?e.ofNull():new a(t)},e.ofNull=function(){return new s},Object.defineProperty(e.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),e}();t.default=i;var a=function(e){function t(t){var n=e.call(this)||this;return n._response=t,n}return r(t,e),Object.defineProperty(t.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0}),t}(i),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),t}(i),u=function(e){function t(t){var n=e.call(this)||this;return n._record=t,n}return r(t,e),Object.defineProperty(t.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0}),t}(i)},2752:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryObserver=t.ProcedureRouteObserver=t.RouteObserver=t.CompletedObserver=t.FailedObserver=t.ResetObserver=t.LogoffObserver=t.LoginObserver=t.ResultStreamObserver=t.StreamObserver=void 0;var i=n(6666),a=o(n(4782)),s=i.internal.constants.FETCH_ALL,u=i.error.PROTOCOL_ERROR,l=function(){function e(){}return e.prototype.onNext=function(e){},e.prototype.onError=function(e){},e.prototype.onCompleted=function(e){},e}();t.StreamObserver=l;var c=function(e){function t(t){var n=void 0===t?{}:t,r=n.reactive,o=void 0!==r&&r,i=n.moreFunction,a=n.discardFunction,u=n.fetchSize,l=void 0===u?s:u,c=n.beforeError,f=n.afterError,h=n.beforeKeys,d=n.afterKeys,p=n.beforeComplete,v=n.afterComplete,m=n.server,y=n.highRecordWatermark,g=void 0===y?Number.MAX_VALUE:y,b=n.lowRecordWatermark,w=void 0===b?Number.MAX_VALUE:b,O=e.call(this)||this;return O._fieldKeys=null,O._fieldLookup=null,O._head=null,O._queuedRecords=[],O._tail=null,O._error=null,O._observers=[],O._meta={},O._server=m,O._beforeError=c,O._afterError=f,O._beforeKeys=h,O._afterKeys=d,O._beforeComplete=p,O._afterComplete=v,O._queryId=null,O._moreFunction=i,O._discardFunction=a,O._discard=!1,O._fetchSize=l,O._lowRecordWatermark=w,O._highRecordWatermark=g,O._setState(o?_.READY:_.READY_STREAMING),O._setupAutoPull(),O._paused=!1,O}return r(t,e),t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},t.prototype.onNext=function(e){var t=new i.Record(this._fieldKeys,e,this._fieldLookup);this._observers.some((function(e){return e.onNext}))?this._observers.forEach((function(e){e.onNext&&e.onNext(t)})):(this._queuedRecords.push(t),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},t.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},t.prototype.onError=function(e){this._state.onError(this,e)},t.prototype.cancel=function(){this._discard=!0},t.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(_.STREAMING)},t.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(_.SUCCEEDED)},t.prototype.subscribe=function(e){if(this._head&&e.onKeys&&e.onKeys(this._head),this._queuedRecords.length>0&&e.onNext)for(var t=0;t0){this._fieldKeys=e.fields;for(var r=0;r>8),this.putUInt8(e+1,255&t)},e.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},e.prototype.putInt32=function(e,t){this.putInt8(e,t>>24),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},e.prototype.putUInt32=function(e,t){this.putUInt8(e,t>>24&255),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},e.prototype.putInt64=function(e,t){this.putInt8(e,t>>48),this.putUInt8(e+1,t>>42&255),this.putUInt8(e+2,t>>36&255),this.putUInt8(e+3,t>>30&255),this.putUInt8(e+4,t>>24&255),this.putUInt8(e+5,t>>16&255),this.putUInt8(e+6,t>>8&255),this.putUInt8(e+7,255&t)},e.prototype.putBytes=function(e,t){for(var n=0,r=t.remaining();n0},e.prototype.reset=function(){this.position=0},e.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},e.prototype.toHex=function(){for(var e="",t=0;t=0}(t);if(function(e,t,n){null===n||(e&&!n?console.warn("Neo4j driver is configured to use secure WebSocket on a HTTP web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to not use encryption."):t&&n&&console.warn("Neo4j driver is configured to use insecure WebSocket on a HTTPS web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to use encryption."))}(n,r,a),r)return{scheme:"ws",error:null};if(a)return{scheme:"wss",error:null};if(n){return o&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==o?{scheme:null,error:(0,i.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+o+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+s+'"` in the driver configuration.')}:{scheme:"wss",error:null}}return{scheme:"ws",error:null}}(e,t),l=a.scheme,f=a.error;if(f)this._error=f;else{this._ws=function(e,t,n){var r=e+"://"+t.asHostPort();try{return n(r)}catch(f){if(function(e,t){return"SyntaxError"===e.name&&(n=t.asHostPort(),"["===n.charAt(0)&&-1!==n.indexOf("]"));var n}(f,t)){var o=function(e,t){var n=t.host().replace(/:/g,"-"),r=n.replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(r,":").concat(t.port())}(e,t);return n(o)}throw f}}(l,e.address,n),this._ws.binaryType="arraybuffer";var h=this;this._ws.onclose=function(e){e&&!e.wasClean&&h._handleConnectionError(),h._open=!1},this._ws.onopen=function(){h._clearConnectionTimeout();var e=h._pending;h._pending=null;for(var t=0;t0;)this._ensure(1),this._buffer.remaining()>t.remaining()?this._buffer.writeBytes(t):this._buffer.writeBytes(t.readSlice(this._buffer.remaining()));return this},t.prototype.flush=function(){if(this._buffer.position>0){this._closeChunkIfOpen();var e=this._buffer;this._buffer=null,this._ch.write(e.getSlice(0,e.position)),this._buffer=(0,a.alloc)(this._bufferSize),this._chunkOpen=!1}return this},t.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},t.prototype._ensure=function(e){var t=this._chunkOpen?e:e+2;this._buffer.remaining()=2?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},e.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},e.prototype.IN_CHUNK=function(e){return this._chunkSize<=e.remaining()?(this._currentMessage.push(e.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=e.remaining(),this._currentMessage.push(e.readSlice(e.remaining())),this.IN_CHUNK)},e.prototype.CLOSED=function(e){},e.prototype._onHeader=function(e){if(0===e){var t=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:t=this._currentMessage[0];break;default:t=new s.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK}return this._chunkSize=e,this.IN_CHUNK},e.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},e}();t.Dechunker=l},3297:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(1034),i=n(1073),a=function(e){function t(t){for(var n=this,r=0,o=0;o=n.length))return n.getUInt8(e);e-=n.length}},t.prototype.getInt8=function(e){for(var t=0;t=n.length))return n.getInt8(e);e-=n.length}},t.prototype.getFloat64=function(e){for(var t=(0,i.alloc)(8),n=0;n<8;n++)t.putUInt8(n,this.getUInt8(e+n));return t.getFloat64(0)},t}(o.BaseBuffer);t.default=a},1349:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.utf8=t.alloc=t.ChannelConfig=void 0,o(n(4688),t),o(n(2716),t);var a=n(5161);Object.defineProperty(t,"ChannelConfig",{enumerable:!0,get:function(){return i(a).default}});var s=n(1073);Object.defineProperty(t,"alloc",{enumerable:!0,get:function(){return s.alloc}});var u=n(4156);Object.defineProperty(t,"utf8",{enumerable:!0,get:function(){return i(u).default}})},4156:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(1073)),i=n(6666),a=r(n(9778)),s=new(n(5948).StringDecoder)("utf8");t.default={encode:function(e){return new o.default(function(e){return"function"===typeof a.default.Buffer.from?a.default.Buffer.from(e,"utf8"):new a.default.Buffer(e,"utf8")}(e))},decode:function(e,t){if(Object.prototype.hasOwnProperty.call(e,"_buffer"))return function(e,t){var n=e.position,r=n+t;return e.position=Math.min(r,e.length),e._buffer.toString("utf8",n,r)}(e,t);if(Object.prototype.hasOwnProperty.call(e,"_buffers"))return function(e,t){return function(e,t,n,r){var o=t,i=e.position;return e._updatePos(Math.min(t,e.length-i)),e._buffers.reduce((function(e,t){if(o<=0)return e;if(i>=t.length)return i-=t.length,"";t._updatePos(i-t.position);var r=Math.min(t.length-i,o),a=t.readSlice(r);return t._updatePos(r),o=Math.max(o-a.length,0),i=0,e+n(a)}),"")+r()}(e,t,(function(e){return s.write(e._buffer)}),(function(){return s.end()}))}(e,t);throw(0,i.newError)("Don't know how to decode strings from '".concat(e,"'"))}}},162:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=h}))];case 1:return[2,e.sent()]}}))}))},t.prototype.getNegotiatedProtocolVersion=function(){var e=this;return new Promise((function(t,n){e._hasProtocolVersion(t).catch(n)}))},t.prototype.supportsTransactionConfig=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=f}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsUserImpersonation=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=d}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsSessionAuth=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=p}))];case 1:return[2,e.sent()]}}))}))},t.prototype.verifyAuthentication=function(e){var t=e.auth;return o(this,void 0,void 0,(function(){var e=this;return i(this,(function(n){return[2,this._verifyAuthentication({auth:t,getAddress:function(){return e._address}})]}))}))},t.prototype.verifyConnectivityAndGetServerInfo=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}}))}))},t}(s.default);t.default=m},5419:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},c=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;ot)},t.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},t.prototype._verifyConnectivityAndGetServerVersion=function(e){var t=e.address;return s(this,void 0,void 0,(function(){var e,n;return u(this,(function(r){switch(r.label){case 0:return[4,this._connectionPool.acquire({},t)];case 1:e=r.sent(),n=new p.ServerInfo(e.server,e.protocol().version),r.label=2;case 2:return r.trys.push([2,,5,7]),e.protocol().isLastMessageLogon()?[3,4]:[4,e.resetAndFlush()];case 3:r.sent(),r.label=4;case 4:return[3,7];case 5:return[4,e.release()];case 6:return r.sent(),[7];case 7:return[2,n]}}))}))},t.prototype._verifyAuthentication=function(e){var t=e.getAddress,n=e.auth;return s(this,void 0,void 0,(function(){var e,r,o,i,a,s;return u(this,(function(u){switch(u.label){case 0:e=[],u.label=1;case 1:return u.trys.push([1,8,9,11]),[4,t()];case 2:return r=u.sent(),[4,this._connectionPool.acquire({auth:n,skipReAuth:!0},r)];case 3:if(o=u.sent(),e.push(o),i=!o.protocol().isLastMessageLogon(),!o.supportsReAuth)throw(0,p.newError)("Driver is connected to a database that does not support user switch.");return i&&o.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:o,auth:n,waitReAuth:!0,forceReAuth:!0})]:[3,5];case 4:return u.sent(),[3,7];case 5:return!i||o.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:n},r,{requireNew:!0})];case 6:(a=u.sent())._sticky=!0,e.push(a),u.label=7;case 7:return[2,!0];case 8:if(s=u.sent(),g.includes(s.code))return[2,!1];throw s;case 9:return[4,Promise.all(e.map((function(e){return e.release()})))];case 10:return u.sent(),[7];case 11:return[2]}}))}))},t.prototype._verifyStickyConnection=function(e){var t=e.auth,n=e.connection;e.address;return s(this,void 0,void 0,(function(){var e,r;return u(this,(function(o){switch(o.label){case 0:return e=m.object.equals(t,n.authToken),r=!e,n._sticky=e&&!n.supportsReAuth,r||n._sticky?[4,n.release()]:[3,2];case 1:throw o.sent(),(0,p.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}}))}))},t.prototype.close=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this._connectionPool.close()];case 1:return e.sent(),[4,Promise.all(Object.values(this._openConnections).map((function(e){return e.close()})))];case 2:return e.sent(),[2]}}))}))},t._installIdleObserverOnConnection=function(e,t){e._queueObserver(t)},t._removeIdleObserverOnConnection=function(e){e._updateCurrentObserver()},t.prototype._handleSecurityError=function(e,t,n){return this._authenticationProvider.handleError({connection:n,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,(function(e){e.authToken=null})),n&&n.close().catch((function(){})),e},t}(p.ConnectionProvider);t.default=_},2143:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=n(6666),p=s(n(3896)),v=n(1349),m=h(n(8803)),y=h(n(5419)),g=n(2912),_=n(4707),b=n(7326),w=d.error.SERVICE_UNAVAILABLE,O=d.error.SESSION_EXPIRED,x=d.internal.bookmarks.Bookmarks,S=d.internal.constants,E=S.ACCESS_MODE_READ,P=S.ACCESS_MODE_WRITE,T=S.BOLT_PROTOCOL_V3,k=S.BOLT_PROTOCOL_V4_0,C=S.BOLT_PROTOCOL_V4_4,j=S.BOLT_PROTOCOL_V5_1,N="Neo.ClientError.Database.DatabaseNotFound",I="Neo.ClientError.Transaction.InvalidBookmark",M="Neo.ClientError.Transaction.InvalidBookmarkMixture",R="Neo.ClientError.Security.AuthorizationExpired",A="Neo.ClientError.Statement.ArgumentError",L="Neo.ClientError.Request.Invalid",D="Neo.ClientError.Statement.TypeError",U="N/A",z=null,B=(0,d.int)(3e4),F=function(e){function t(t){var n=t.id,r=t.address,i=t.routingContext,a=t.hostNameResolver,s=t.config,u=t.log,l=t.userAgent,c=t.boltAgent,f=t.authTokenManager,h=t.routingTablePurgeDelay,m=t.newPool,y=e.call(this,{id:n,config:s,log:u,userAgent:l,boltAgent:c,authTokenManager:f,newPool:m},(function(e){return(0,_.createChannelConnection)(e,y._config,y._createConnectionErrorHandler(),y._log,y._routingContext)}))||this;return y._routingContext=o(o({},i),{address:r.toString()}),y._seedRouter=r,y._rediscovery=new p.default(y._routingContext),y._loadBalancingStrategy=new g.LeastConnectedLoadBalancingStrategy(y._connectionPool),y._hostNameResolver=a,y._dnsResolver=new v.HostNameResolver,y._log=u,y._useSeedRouter=!0,y._routingTableRegistry=new W(h?(0,d.int)(h):B),y._refreshRoutingTable=b.functional.reuseOngoingRequest(y._refreshRoutingTable,y),y}return r(t,e),t.prototype._createConnectionErrorHandler=function(){return new _.ConnectionErrorHandler(O)},t.prototype._handleUnavailability=function(e,t,n){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,n||z),e},t.prototype._handleSecurityError=function(t,n,r,o){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(n," for database '").concat(o,"' because of an error ").concat(t.code," '").concat(t.message,"'")),e.prototype._handleSecurityError.call(this,t,n,r,o)},t.prototype._handleWriteFailure=function(e,t,n){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forgetWriter(t,n||z),(0,d.newError)("No longer possible to write to server at "+t,O,e)},t.prototype.acquireConnection=function(e){var t=void 0===e?{}:e,n=t.accessMode,r=t.database,o=t.bookmarks,i=t.impersonatedUser,a=t.onDatabaseNameResolved,s=t.auth;return u(this,void 0,void 0,(function(){var e,t,u,c,f,h,p,v=this;return l(this,(function(l){switch(l.label){case 0:return u={database:r||z},c=new _.ConnectionErrorHandler(O,(function(e,t){return v._handleUnavailability(e,t,u.database)}),(function(e,t){return v._handleWriteFailure(e,t,u.database)}),(function(e,t,n){return v._handleSecurityError(e,t,n,u.database)})),[4,this._freshRoutingTable({accessMode:n,database:u.database,bookmarks:o,impersonatedUser:i,auth:s,onDatabaseNameResolved:function(e){u.database=u.database||e,a&&a(e)}})];case 1:if(f=l.sent(),n===E)t=this._loadBalancingStrategy.selectReader(f.readers),e="read";else{if(n!==P)throw(0,d.newError)("Illegal mode "+n);t=this._loadBalancingStrategy.selectWriter(f.writers),e="write"}if(!t)throw(0,d.newError)("Failed to obtain connection towards ".concat(e," server. Known routing table is: ").concat(f),O);l.label=2;case 2:return l.trys.push([2,6,,7]),[4,this._connectionPool.acquire({auth:s},t)];case 3:return h=l.sent(),s?[4,this._verifyStickyConnection({auth:s,connection:h,address:t})]:[3,5];case 4:return l.sent(),[2,h];case 5:return[2,new _.DelegateConnection(h,c)];case 6:throw p=l.sent(),c.handleAndTransformError(p,t);case 7:return[2]}}))}))},t.prototype._hasProtocolVersion=function(e){return u(this,void 0,void 0,(function(){var t,n,r,o,i,a;return l(this,(function(s){switch(s.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=s.sent(),r=0,s.label=2;case 2:if(!(r=k}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsTransactionConfig=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=T}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsUserImpersonation=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=C}))];case 1:return[2,e.sent()]}}))}))},t.prototype.supportsSessionAuth=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion((function(e){return e>=j}))];case 1:return[2,e.sent()]}}))}))},t.prototype.getNegotiatedProtocolVersion=function(){var e=this;return new Promise((function(t,n){e._hasProtocolVersion(t).catch(n)}))},t.prototype.verifyAuthentication=function(e){var t=e.database,n=e.accessMode,r=e.auth;return u(this,void 0,void 0,(function(){var e=this;return l(this,(function(o){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return u(e,void 0,void 0,(function(){var e,o,i;return l(this,(function(a){switch(a.label){case 0:return e={database:t||z},[4,this._freshRoutingTable({accessMode:n,database:e.database,auth:r,onDatabaseNameResolved:function(t){e.database=e.database||t}})];case 1:if(o=a.sent(),0===(i=n===P?o.writers:o.readers).length)throw(0,d.newError)("No servers available for database '".concat(e.database,"' with access mode '").concat(n,"'"),w);return[2,i[0]]}}))}))}})]}))}))},t.prototype.verifyConnectivityAndGetServerInfo=function(e){var t=e.database,n=e.accessMode;return u(this,void 0,void 0,(function(){var e,r,o,i,a,s,u,f,h,p,v;return l(this,(function(l){switch(l.label){case 0:return e={database:t||z},[4,this._freshRoutingTable({accessMode:n,database:e.database,onDatabaseNameResolved:function(t){e.database=e.database||t}})];case 1:r=l.sent(),o=n===P?r.writers:r.readers,i=(0,d.newError)("No servers available for database '".concat(e.database,"' with access mode '").concat(n,"'"),w),l.label=2;case 2:l.trys.push([2,9,10,11]),a=c(o),s=a.next(),l.label=3;case 3:if(s.done)return[3,8];u=s.value,l.label=4;case 4:return l.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:u})];case 5:return[2,l.sent()];case 6:return f=l.sent(),i=f,[3,7];case 7:return s=a.next(),[3,3];case 8:return[3,11];case 9:return h=l.sent(),p={error:h},[3,11];case 10:try{s&&!s.done&&(v=a.return)&&v.call(a)}finally{if(p)throw p.error}return[7];case 11:throw i}}))}))},t.prototype.forget=function(e,t){this._routingTableRegistry.apply(t,{applyWhenExists:function(t){return t.forget(e)}}),this._connectionPool.purge(e).catch((function(){}))},t.prototype.forgetWriter=function(e,t){this._routingTableRegistry.apply(t,{applyWhenExists:function(t){return t.forgetWriter(e)}})},t.prototype._freshRoutingTable=function(e){var t=void 0===e?{}:e,n=t.accessMode,r=t.database,o=t.bookmarks,i=t.impersonatedUser,a=t.onDatabaseNameResolved,s=t.auth,u=this._routingTableRegistry.get(r,(function(){return new p.RoutingTable({database:r})}));return u.isStaleFor(n)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(n,'": ').concat(u)),this._refreshRoutingTable(u,o,i,s).then((function(e){return a(e.database),e}))):u},t.prototype._refreshRoutingTable=function(e,t,n,r){var o=e.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,e,t,n,r):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,e,t,n,r)},t.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(e,t,n,r,o){return u(this,void 0,void 0,(function(){var i,a,s,u,c,h,d;return l(this,(function(l){switch(l.label){case 0:return i=[],[4,this._fetchRoutingTableUsingSeedRouter(i,this._seedRouter,t,n,r,o)];case 1:return a=f.apply(void 0,[l.sent(),2]),s=a[0],u=a[1],s?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(e,t,n,r,o)];case 3:c=f.apply(void 0,[l.sent(),2]),h=c[0],d=c[1],s=h,u=d||u,l.label=4;case 4:return[4,this._applyRoutingTableIfPossible(t,s,u)];case 5:return[2,l.sent()]}}))}))},t.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(e,t,n,r,o){return u(this,void 0,void 0,(function(){var i,a,s,u;return l(this,(function(l){switch(l.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(e,t,n,r,o)];case 1:return i=f.apply(void 0,[l.sent(),2]),a=i[0],s=i[1],a?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(e,this._seedRouter,t,n,r,o)];case 2:u=f.apply(void 0,[l.sent(),2]),a=u[0],s=u[1],l.label=3;case 3:return[4,this._applyRoutingTableIfPossible(t,a,s)];case 4:return[2,l.sent()]}}))}))},t.prototype._fetchRoutingTableUsingKnownRouters=function(e,n,r,o,i){return u(this,void 0,void 0,(function(){var a,s,u,c;return l(this,(function(l){switch(l.label){case 0:return[4,this._fetchRoutingTable(e,n,r,o,i)];case 1:return a=f.apply(void 0,[l.sent(),2]),s=a[0],u=a[1],s?[2,[s,null]]:(c=e.length-1,t._forgetRouter(n,e,c),[2,[null,u]])}}))}))},t.prototype._fetchRoutingTableUsingSeedRouter=function(e,t,n,r,o,i){return u(this,void 0,void 0,(function(){var a,s;return l(this,(function(u){switch(u.label){case 0:return[4,this._resolveSeedRouter(t)];case 1:return a=u.sent(),s=a.filter((function(t){return e.indexOf(t)<0})),[4,this._fetchRoutingTable(s,n,r,o,i)];case 2:return[2,u.sent()]}}))}))},t.prototype._resolveSeedRouter=function(e){return u(this,void 0,void 0,(function(){var t,n,r=this;return l(this,(function(o){switch(o.label){case 0:return[4,this._hostNameResolver.resolve(e)];case 1:return t=o.sent(),[4,Promise.all(t.map((function(e){return r._dnsResolver.resolve(e)})))];case 2:return n=o.sent(),[2,[].concat.apply([],n)]}}))}))},t.prototype._fetchRoutingTable=function(e,n,r,o,i){return u(this,void 0,void 0,(function(){var a=this;return l(this,(function(s){return[2,e.reduce((function(s,c,h){return u(a,void 0,void 0,(function(){var a,u,d,p,v,m,y;return l(this,(function(l){switch(l.label){case 0:return[4,s];case 1:return a=f.apply(void 0,[l.sent(),1]),(u=a[0])?[2,[u,null]]:(d=h-1,t._forgetRouter(n,e,d),[4,this._createSessionForRediscovery(c,r,o,i)]);case 2:if(p=f.apply(void 0,[l.sent(),2]),v=p[0],m=p[1],!v)return[3,8];l.label=3;case 3:return l.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(v,n.database,c,o)];case 4:return[2,[l.sent(),null]];case 5:return y=l.sent(),[2,this._handleRediscoveryError(y,c)];case 6:return v.close(),[7];case 7:return[3,9];case 8:return[2,[null,m]];case 9:return[2]}}))}))}),Promise.resolve([null,null]))]}))}))},t.prototype._createSessionForRediscovery=function(e,t,n,r){return u(this,void 0,void 0,(function(){var o,i,a,s,u,c=this;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:r},e)];case 1:return o=l.sent(),r?[4,this._verifyStickyConnection({auth:r,connection:o,address:e})]:[3,3];case 2:l.sent(),l.label=3;case 3:return i=_.ConnectionErrorHandler.create({errorCode:O,handleSecurityError:function(e,t,n){return c._handleSecurityError(e,t,n)}}),a=o._sticky?new _.DelegateConnection(o):new _.DelegateConnection(o,i),s=new m.default(a),o.protocol().version<4?[2,[new d.Session({mode:P,bookmarks:x.empty(),connectionProvider:s}),null]]:[2,[new d.Session({mode:E,database:"system",bookmarks:t,connectionProvider:s,impersonatedUser:n}),null]];case 4:return u=l.sent(),[2,this._handleRediscoveryError(u,e)];case 5:return[2]}}))}))},t.prototype._handleRediscoveryError=function(e,t){if(function(e){return[N,I,M,A,L,D,U].includes(e.code)}(e)||function(e){return e.code.startsWith("Neo.ClientError.Security.")&&![R].includes(e.code)}(e))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,d.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),w,e);return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},t.prototype._applyRoutingTableIfPossible=function(e,t,n){return u(this,void 0,void 0,(function(){return l(this,(function(r){switch(r.label){case 0:if(!t)throw(0,d.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(e),w,n);return 0===t.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(t)];case 1:return r.sent(),[2,t]}}))}))},t.prototype._updateRoutingTable=function(e){return u(this,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return[4,this._connectionPool.keepAll(e.allServers())];case 1:return t.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(e),this._log.info("Updated routing table ".concat(e)),[2]}}))}))},t._forgetRouter=function(e,t,n){var r=t[n];e&&r&&e.forgetRouter(r)},t}(y.default);t.default=F;var W=function(){function e(e){this._tables=new Map,this._routingTablePurgeDelay=e}return e.prototype.register=function(e){return this._tables.set(e.database,e),this},e.prototype.apply=function(e,t){var n=void 0===t?{}:t,r=n.applyWhenExists,o=n.applyWhenDontExists,i=void 0===o?function(){}:o;return this._tables.has(e)?r(this._tables.get(e)):"string"===typeof e||null===e?i():this._forEach(r),this},e.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"===typeof t?t():t},e.prototype.removeExpired=function(){var e=this;return this._removeIf((function(t){return t.isExpiredFor(e._routingTablePurgeDelay)}))},e.prototype._forEach=function(e){var t,n;try{for(var r=c(this._tables),o=r.next();!o.done;o=r.next()){e(f(o.value,2)[1])}}catch(i){t={error:i}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype._remove=function(e){return this._tables.delete(e),this},e.prototype._removeIf=function(e){var t,n;try{for(var r=c(this._tables),o=r.next();!o.done;o=r.next()){var i=f(o.value,2),a=i[0];e(i[1])&&this._remove(a)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e}()},8803:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this)||this;return n._connection=t,n}return r(t,e),t.prototype.acquireConnection=function(e){var t=void 0===e?{}:e,n=(t.accessMode,t.database,t.bookmarks,this._connection);return this._connection=null,Promise.resolve(n)},t}(n(6666).ConnectionProvider);t.default=o},1875:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RoutingConnectionProvider=t.DirectConnectionProvider=t.PooledConnectionProvider=t.SingleConnectionProvider=void 0;var o=n(8803);Object.defineProperty(t,"SingleConnectionProvider",{enumerable:!0,get:function(){return r(o).default}});var i=n(5419);Object.defineProperty(t,"PooledConnectionProvider",{enumerable:!0,get:function(){return r(i).default}});var a=n(3900);Object.defineProperty(t,"DirectConnectionProvider",{enumerable:!0,get:function(){return r(a).default}});var s=n(2143);Object.defineProperty(t,"RoutingConnectionProvider",{enumerable:!0,get:function(){return r(s).default}})},143:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?r._ch.setupReceiveTimeout(1e3*s):r._log.info("Server located at ".concat(r._address," supplied an invalid connection receive timeout value (").concat(s,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")}!0===e.hints["telemetry.enabled"]&&(r._telemetryDisabledConnection=!1)}}i(o)}})}))},t.prototype.protocol=function(){return this._protocol},Object.defineProperty(t.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),t.prototype._handleFatalError=function(e){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||e,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(u.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},t.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},t.prototype.hasOngoingObservableRequests=function(){return this._protocol.hasOngoingObservableRequests()},t.prototype.resetAndFlush=function(){var e=this;return new Promise((function(t,n){e._reset({onError:function(t){if(e._isBroken)n(t);else{var r=e._handleProtocolError("Received FAILURE as a response for RESET: "+t);n(r)}},onComplete:function(){t()}})}))},t.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},t.prototype._reset=function(e){var t=this;if(this._reseting)this._protocol.isLastMessageReset()?this._resetObservers.push(e):this._protocol.reset({onError:function(t){e.onError(t)},onComplete:function(){e.onComplete()}});else{this._resetObservers.push(e),this._reseting=!0;var n=function(e){t._reseting=!1;var n=t._resetObservers;t._resetObservers=[],n.forEach(e)};this._protocol.reset({onError:function(e){n((function(t){return t.onError(e)}))},onComplete:function(){n((function(e){return e.onComplete()}))}})}},t.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},t.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},t.prototype._handleOngoingRequestsNumberChange=function(e){0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout()},t.prototype.close=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return e.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}}))}))},t.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},t.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();var t=(0,u.newError)(e,f);return this._handleFatalError(t),t},t}(l.default);t.default=p},2427:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){var r=e.call(this,n)||this;return n&&(r._originalErrorHandler=t._errorHandler,t._errorHandler=r._errorHandler),r._delegate=t,r}return r(t,e),t.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},t.prototype.run=function(e,t,n){return this._delegate.run(e,t,n)},t.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},t.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},t.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(t.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),t.prototype.isOpen=function(){return this._delegate.isOpen()},t.prototype.protocol=function(){return this._delegate.protocol()},t.prototype.connect=function(e,t,n,r){return this._delegate.connect(e,t,n,r)},t.prototype.write=function(e,t,n){return this._delegate.write(e,t,n)},t.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},t.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},t.prototype.close=function(){return this._delegate.close()},t.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},t}(o(n(6821)).default);t.default=i},5271:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6666),o=r.error.SERVICE_UNAVAILABLE,i=r.error.SESSION_EXPIRED,a=function(){function e(e,t,n,r){this._errorCode=e,this._handleUnavailability=t||s,this._handleWriteFailure=n||s,this._handleSecurityError=r||s}return e.create=function(t){return new e(t.errorCode,t.handleUnavailability,t.handleWriteFailure,t.handleSecurityError)},e.prototype.errorCode=function(){return this._errorCode},e.prototype.handleAndTransformError=function(e,t,n){return function(e){return null!=e&&null!=e.code&&e.code.startsWith("Neo.ClientError.Security.")}(e)?this._handleSecurityError(e,t,n):function(e){if(e)return e.code===i||e.code===o||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return!1}(e)?this._handleUnavailability(e,t,n):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return!1}(e)?this._handleWriteFailure(e,t,n):e},e}();function s(e){return e}t.default=a},6821:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});n(6159);var o=function(e){function t(t){var n=e.call(this)||this;return n._errorHandler=t,n}return r(t,e),Object.defineProperty(t.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),t.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(t.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),t.prototype.connect=function(e,t,n,r){throw new Error("not implemented")},t.prototype.write=function(e,t,n){throw new Error("not implemented")},t.prototype.close=function(){throw new Error("not implemented")},t.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e},t}(n(6666).Connection);t.default=o},4707:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createChannelConnection=t.ConnectionErrorHandler=t.DelegateConnection=t.ChannelConnection=t.Connection=void 0;var s=a(n(6821));t.Connection=s.default;var u=i(n(143));t.ChannelConnection=u.default,Object.defineProperty(t,"createChannelConnection",{enumerable:!0,get:function(){return u.createChannelConnection}});var l=a(n(2427));t.DelegateConnection=l.default;var c=a(n(5271));t.ConnectionErrorHandler=c.default,t.default=s.default},6486:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.pool=t.packstream=t.channel=t.buf=t.bolt=t.loadBalancing=void 0,t.loadBalancing=i(n(2912)),t.bolt=i(n(6159)),t.buf=i(n(1034)),t.channel=i(n(1349)),t.packstream=i(n(6663)),t.pool=i(n(2169)),a(n(1875),t)},9828:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reuseOngoingRequest=t.identity=void 0;var r=n(6666);t.identity=function(e){return e},t.reuseOngoingRequest=function(e,t){void 0===t&&(t=null);var n=new Map;return function(){for(var o=[],i=0;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.equals=void 0,t.equals=function(e,t){var r,o;if(e===t)return!0;if(null===e||null===t)return!1;if("object"===typeof e&&"object"===typeof t){var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;try{for(var s=n(i),u=s.next();!u.done;u=s.next()){var l=u.value;if(e[l]!==t[l])return!1}}catch(c){r={error:c}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return!0}return!1}},2912:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LeastConnectedLoadBalancingStrategy=t.LoadBalancingStrategy=void 0;var o=r(n(2835));t.LoadBalancingStrategy=o.default;var i=r(n(5146));t.LeastConnectedLoadBalancingStrategy=i.default,t.default=i.default},5146:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(5202)),a=function(e){function t(t){var n=e.call(this)||this;return n._readersIndex=new i.default,n._writersIndex=new i.default,n._connectionPool=t,n}return r(t,e),t.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},t.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},t.prototype._select=function(e,t){var n=e.length;if(0===n)return null;var r=t.next(n),o=r,i=null,a=Number.MAX_SAFE_INTEGER;do{var s=e[o],u=this._connectionPool.activeResourceCount(s);u>0),this._ch.writeUInt8(n%256),this._ch.writeBytes(t);else{if(!(n<4294967296))throw(0,a.newError)("UTF-8 strings of size "+n+" are not supported");this._ch.writeUInt8(210),this._ch.writeUInt8((n/16777216>>0)%256),this._ch.writeUInt8((n/65536>>0)%256),this._ch.writeUInt8((n/256>>0)%256),this._ch.writeUInt8(n%256),this._ch.writeBytes(t)}},e.prototype.packListHeader=function(e){if(e<16)this._ch.writeUInt8(144|e);else if(e<256)this._ch.writeUInt8(212),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,a.newError)("Lists of size "+e+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},e.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,a.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(e.length);for(var t=0;t>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,a.newError)("Byte arrays of size "+e+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},e.prototype.packMapHeader=function(e){if(e<16)this._ch.writeUInt8(160|e);else if(e<256)this._ch.writeUInt8(216),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,a.newError)("Maps of size "+e+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},e.prototype.packStructHeader=function(e,t){if(e<16)this._ch.writeUInt8(176|e),this._ch.writeUInt8(t);else if(e<256)this._ch.writeUInt8(220),this._ch.writeUInt8(e),this._ch.writeUInt8(t);else{if(!(e<65536))throw(0,a.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},e.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},e.prototype._nonPackableValue=function(e){return function(){throw(0,a.newError)(e,s)}},e}();t.Packer=u;var l=function(){function e(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this._disableLosslessIntegers=e,this._useBigInt=t}return e.prototype.unpack=function(e,t){void 0===t&&(t=o.functional.identity);var n=e.readUInt8(),r=240&n,i=15&n;if(192===n)return null;var s=this._unpackBoolean(n);if(null!==s)return s;var u=this._unpackNumberOrInteger(n,e);if(null!==u){if((0,a.isInt)(u)){if(this._useBigInt)return u.toBigInt();if(this._disableLosslessIntegers)return u.toNumberOrInfinity()}return u}var l=this._unpackString(n,r,i,e);if(null!==l)return l;var c=this._unpackList(n,r,i,e,t);if(null!==c)return c;var f=this._unpackByteArray(n,e);if(null!==f)return f;var h=this._unpackMap(n,r,i,e,t);if(null!==h)return h;var d=this._unpackStruct(n,r,i,e,t);if(null!==d)return d;throw(0,a.newError)("Unknown packed value with marker "+n.toString(16))},e.prototype.unpackInteger=function(e){var t=e.readUInt8(),n=this._unpackInteger(t,e);if(null==n)throw(0,a.newError)("Unable to unpack integer value with marker "+t.toString(16));return n},e.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},e.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},e.prototype._unpackInteger=function(e,t){if(e>=0&&e<128)return(0,a.int)(e);if(e>=240&&e<256)return(0,a.int)(e-256);if(200===e)return(0,a.int)(t.readInt8());if(201===e)return(0,a.int)(t.readInt16());if(202===e){var n=t.readInt32();return(0,a.int)(n)}if(203===e){var r=t.readInt32(),o=t.readInt32();return new a.Integer(o,r)}return null},e.prototype._unpackString=function(e,t,n,o){return 128===t?r.utf8.decode(o,n):208===e?r.utf8.decode(o,o.readUInt8()):209===e?r.utf8.decode(o,o.readUInt16()):210===e?r.utf8.decode(o,o.readUInt32()):null},e.prototype._unpackList=function(e,t,n,r,o){return 144===t?this._unpackListWithSize(n,r,o):212===e?this._unpackListWithSize(r.readUInt8(),r,o):213===e?this._unpackListWithSize(r.readUInt16(),r,o):214===e?this._unpackListWithSize(r.readUInt32(),r,o):null},e.prototype._unpackListWithSize=function(e,t,n){for(var r=[],o=0;o0&&(e+=", "),e+=this.fields[t];return"Structure("+this.signature+", ["+e+"])"},e}();t.Structure=i,t.verifyStructSize=function(e,t,n){if(t!==n)throw(0,r.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(n),o)},t.default=i},2169:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_MAX_SIZE=t.DEFAULT_ACQUISITION_TIMEOUT=t.PoolConfig=t.Pool=void 0;var s=i(n(2442));t.PoolConfig=s.default,Object.defineProperty(t,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return s.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(t,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return s.DEFAULT_MAX_SIZE}});var u=a(n(8010));t.Pool=u.default,t.default=u.default},2442:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_ACQUISITION_TIMEOUT=t.DEFAULT_MAX_SIZE=void 0;var n=100;t.DEFAULT_MAX_SIZE=n;var r=6e4;t.DEFAULT_ACQUISITION_TIMEOUT=r;var o=function(){function e(e,t){this.maxSize=i(e,n),this.acquisitionTimeout=i(t,r)}return e.defaultConfig=function(){return new e(n,r)},e.fromDriverConfig=function(t){return new e(a(t.maxConnectionPoolSize)?t.maxConnectionPoolSize:n,a(t.connectionAcquisitionTimeout)?t.connectionAcquisitionTimeout:r)},e}();function i(e,t){return 0===e||e?e:t}function a(e){return 0===e||e}t.default=o},8010:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&this.activeResourceCount(t)+this._pendingCreates[r]>=this._maxSize)return[2,{resource:null,pool:i}];this._pendingCreates[r]=this._pendingCreates[r]+1,o.label=7;case 7:return o.trys.push([7,,11,12]),this.activeResourceCount(t)+i.length>=this._maxSize&&n?(l=i.pop(),this._removeIdleObserver&&this._removeIdleObserver(l),i.removeInUse(l),[4,this._destroy(l)]):[3,9];case 8:o.sent(),o.label=9;case 9:return[4,this._create(e,t,(function(e,t){return f._release(e,t,i)}))];case 10:return u=o.sent(),i.pushInUse(u),c(r,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(u," created for the pool ").concat(r)),[3,12];case 11:return this._pendingCreates[r]=this._pendingCreates[r]-1,[7];case 12:return[2,{resource:u,pool:i}]}}))}))},e.prototype._release=function(e,t,n){return r(this,void 0,void 0,(function(){var r,i=this;return o(this,(function(o){switch(o.label){case 0:r=e.asKey(),o.label=1;case 1:return o.trys.push([1,,9,10]),n.isActive()?[4,this._validateOnRelease(t)]:[3,6];case 2:return o.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(t," destroyed and can't be released to the pool ").concat(r," because it is not functional")),n.removeInUse(t),[4,this._destroy(t)]);case 3:return o.sent(),[3,5];case 4:this._installIdleObserver&&this._installIdleObserver(t,{onError:function(e){i._log.debug("Idle connection ".concat(t," destroyed because of error: ").concat(e));var n=i._pools[r];n&&(i._pools[r]=n.filter((function(e){return e!==t})),n.removeInUse(t)),i._destroy(t).catch((function(){}))}}),n.push(t),this._log.isDebugEnabled()&&this._log.debug("".concat(t," released to the pool ").concat(r)),o.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(t," destroyed and can't be released to the pool ").concat(r," because pool has been purged")),n.removeInUse(t),[4,this._destroy(t)];case 7:o.sent(),o.label=8;case 8:return[3,10];case 9:return function(e,t){var n=t[e]||0,r=n-1;r>0?t[e]=r:delete t[e]}(r,this._activeResourceCounts),this._processPendingAcquireRequests(e),[7];case 10:return[2]}}))}))},e.prototype._purgeKey=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return o(this,(function(o){switch(o.label){case 0:if(t=this._pools[e],n=[],!t)return[3,2];for(;t.length;)r=t.pop(),this._removeIdleObserver&&this._removeIdleObserver(r),n.push(this._destroy(r));return t.close(),delete this._pools[e],[4,Promise.all(n)];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},e.prototype._processPendingAcquireRequests=function(e){var t=this,n=e.asKey(),r=this._acquireRequests[n];if(r){var o=r.shift();o?this._acquire(o.context,e,o.requireNew).catch((function(e){return o.reject(e),{resource:null}})).then((function(r){var i=r.resource,a=r.pool;i?o.isCompleted()?t._release(e,i,a):o.resolve(i):o.isCompleted()||(t._acquireRequests[n]||(t._acquireRequests[n]=[]),t._acquireRequests[n].unshift(o))})):delete this._acquireRequests[n]}},e}();function c(e,t){var n=t[e]||0;t[e]=n+1}var f=function(){function e(e,t,n,r,o,i,a){this._key=e,this._context=t,this._resolve=r,this._reject=o,this._timeoutId=i,this._log=a,this._completed=!1,this._config=n||{}}return Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requireNew",{get:function(){return this._config.requireNew||!1},enumerable:!1,configurable:!0}),e.prototype.isCompleted=function(){return this._completed},e.prototype.resolve=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(e," acquired from the pool ").concat(this._key)),this._resolve(e))},e.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))},e}(),h=function(){function e(){this._active=!0,this._elements=[],this._elementsInUse=new Set}return e.prototype.isActive=function(){return this._active},e.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},e.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},e.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),e.prototype.pop=function(){var e=this._elements.pop();return this._elementsInUse.add(e),e},e.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},e.prototype.pushInUse=function(e){this._elementsInUse.add(e)},e.prototype.removeInUse=function(e){this._elementsInUse.delete(e)},e}();t.default=l},3896:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RoutingTable=t.Rediscovery=void 0;var o=r(n(4616));t.Rediscovery=o.default;var i=r(n(4821));t.RoutingTable=i.default,t.default=o.default},4616:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(4821)),i=(n(6666),function(){function e(e){this._routingContext=e}return e.prototype.lookupRoutingTableOnRouter=function(e,t,n,r){var i=this;return e._acquireConnection((function(a){return i._requestRawRoutingTable(a,e,t,n,r).then((function(e){return e.isNull?null:o.default.fromRawRoutingTable(t,n,e)}))}))},e.prototype._requestRawRoutingTable=function(e,t,n,r,o){var i=this;return new Promise((function(r,a){e.protocol().requestRoutingInformation({routingContext:i._routingContext,databaseName:n,impersonatedUser:o,sessionContext:{bookmarks:t._lastBookmarks,mode:t._mode,database:t._database,afterComplete:t._onComplete},onCompleted:r,onError:a})}))},e}());t.default=i},4821:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0||0===n?n:n<0?Number.MAX_SAFE_INTEGER:t}function E(e,t){var n=parseInt(e,10);if(n>0||n===u.FETCH_ALL)return n;if(0===n||n<0)throw new Error("The fetch size can only be a positive value or ".concat(u.FETCH_ALL," for ALL. However fetchSize = ").concat(n));return t}t.Driver=x,t.default=x},6024:function(e,t){"use strict";var n=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.Neo4jError=t.isRetriableError=t.newError=void 0;var r="ServiceUnavailable";t.SERVICE_UNAVAILABLE=r;var o="SessionExpired";t.SESSION_EXPIRED=o;t.PROTOCOL_ERROR="ProtocolError";var i=function(e){function t(n,i,a){var s=e.call(this,n,null!=a?{cause:a}:void 0)||this;return s.constructor=t,s.__proto__=t.prototype,s.code=i,s.name="Neo4jError",s.retriable=function(e){return e===r||e===o||function(e){return"Neo.ClientError.Security.AuthorizationExpired"===e}(e)||function(e){return!0===(null===e||void 0===e?void 0:e.includes("TransientError"))}(e)}(i),s}return n(t,e),t.isRetriable=function(e){return null!==e&&void 0!==e&&e instanceof t&&e.retriable},t}(Error);t.Neo4jError=i,t.newError=function(e,t,n){return new i(e,null!==t&&void 0!==t?t:"N/A",n)};var a=i.isRetriable;t.isRetriableError=a},1236:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPathSegment=t.PathSegment=t.isPath=t.Path=t.isUnboundRelationship=t.UnboundRelationship=t.isRelationship=t.Relationship=t.isNode=t.Node=void 0;var r=n(4052),o={value:!0,enumerable:!1,configurable:!1,writable:!1},i="__isNode__",a="__isRelationship__",s="__isUnboundRelationship__",u="__isPath__",l="__isPathSegment__";function c(e,t){return null!=e&&!0===e[t]}var f=function(){function e(e,t,n,r){this.identity=e,this.labels=t,this.properties=n,this.elementId=m(r,(function(){return e.toString()}))}return e.prototype.toString=function(){for(var e="("+this.elementId,t=0;t0){e+=" {";for(t=0;t0&&(e+=","),e+=n[t]+":"+(0,r.stringify)(this.properties[n[t]]);e+="}"}return e+=")"},e}();t.Node=f,Object.defineProperty(f.prototype,i,o),t.isNode=function(e){return c(e,i)};var h=function(){function e(e,t,n,r,o,i,a,s){this.identity=e,this.start=t,this.end=n,this.type=r,this.properties=o,this.elementId=m(i,(function(){return e.toString()})),this.startNodeElementId=m(a,(function(){return t.toString()})),this.endNodeElementId=m(s,(function(){return n.toString()}))}return e.prototype.toString=function(){var e="("+this.startNodeElementId+")-[:"+this.type,t=Object.keys(this.properties);if(t.length>0){e+=" {";for(var n=0;n0&&(e+=","),e+=t[n]+":"+(0,r.stringify)(this.properties[t[n]]);e+="}"}return e+="]->("+this.endNodeElementId+")"},e}();t.Relationship=h,Object.defineProperty(h.prototype,a,o),t.isRelationship=function(e){return c(e,a)};var d=function(){function e(e,t,n,r){this.identity=e,this.type=t,this.properties=n,this.elementId=m(r,(function(){return e.toString()}))}return e.prototype.bind=function(e,t){return new h(this.identity,e,t,this.type,this.properties,this.elementId)},e.prototype.bindTo=function(e,t){return new h(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(t.length>0){e+=" {";for(var n=0;n0&&(e+=","),e+=t[n]+":"+(0,r.stringify)(this.properties[t[n]]);e+="}"}return e+="]->"},e}();t.UnboundRelationship=d,Object.defineProperty(d.prototype,s,o),t.isUnboundRelationship=function(e){return c(e,s)};var p=function(e,t,n){this.start=e,this.relationship=t,this.end=n};t.PathSegment=p,Object.defineProperty(p.prototype,l,o),t.isPathSegment=function(e){return c(e,l)};var v=function(e,t,n){this.start=e,this.end=t,this.segments=n,this.length=n.length};function m(e,t){return void 0===e||null===e?t():e}t.Path=v,Object.defineProperty(v.prototype,u,o),t.isPath=function(e){return c(e,u)}},6666:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=t.Connection=t.ConnectionProvider=t.EagerResult=t.Result=t.Stats=t.QueryStatistics=t.ProfiledPlan=t.Plan=t.Notification=t.ServerInfo=t.queryType=t.ResultSummary=t.Record=t.isPathSegment=t.PathSegment=t.isPath=t.Path=t.isUnboundRelationship=t.UnboundRelationship=t.isRelationship=t.Relationship=t.isNode=t.Node=t.Time=t.LocalTime=t.LocalDateTime=t.isTime=t.isLocalTime=t.isLocalDateTime=t.isDuration=t.isDateTime=t.isDate=t.Duration=t.DateTime=t.Date=t.Point=t.isPoint=t.internal=t.toString=t.toNumber=t.inSafeRange=t.isInt=t.int=t.Integer=t.error=t.isRetriableError=t.Neo4jError=t.newError=t.authTokenManagers=void 0,t.notificationFilterMinimumSeverityLevel=t.notificationFilterDisabledCategory=t.notificationSeverityLevel=t.notificationCategory=t.resultTransformers=t.routing=t.staticAuthTokenManager=t.bookmarkManager=t.auth=t.json=t.driver=t.types=t.Driver=t.Session=t.TransactionPromise=t.ManagedTransaction=void 0;var s=n(6024);Object.defineProperty(t,"newError",{enumerable:!0,get:function(){return s.newError}}),Object.defineProperty(t,"Neo4jError",{enumerable:!0,get:function(){return s.Neo4jError}}),Object.defineProperty(t,"isRetriableError",{enumerable:!0,get:function(){return s.isRetriableError}});var u=i(n(2765));t.Integer=u.default,Object.defineProperty(t,"int",{enumerable:!0,get:function(){return u.int}}),Object.defineProperty(t,"isInt",{enumerable:!0,get:function(){return u.isInt}}),Object.defineProperty(t,"inSafeRange",{enumerable:!0,get:function(){return u.inSafeRange}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return u.toNumber}}),Object.defineProperty(t,"toString",{enumerable:!0,get:function(){return u.toString}});var l=n(7334);Object.defineProperty(t,"Date",{enumerable:!0,get:function(){return l.Date}}),Object.defineProperty(t,"DateTime",{enumerable:!0,get:function(){return l.DateTime}}),Object.defineProperty(t,"Duration",{enumerable:!0,get:function(){return l.Duration}}),Object.defineProperty(t,"isDate",{enumerable:!0,get:function(){return l.isDate}}),Object.defineProperty(t,"isDateTime",{enumerable:!0,get:function(){return l.isDateTime}}),Object.defineProperty(t,"isDuration",{enumerable:!0,get:function(){return l.isDuration}}),Object.defineProperty(t,"isLocalDateTime",{enumerable:!0,get:function(){return l.isLocalDateTime}}),Object.defineProperty(t,"isLocalTime",{enumerable:!0,get:function(){return l.isLocalTime}}),Object.defineProperty(t,"isTime",{enumerable:!0,get:function(){return l.isTime}}),Object.defineProperty(t,"LocalDateTime",{enumerable:!0,get:function(){return l.LocalDateTime}}),Object.defineProperty(t,"LocalTime",{enumerable:!0,get:function(){return l.LocalTime}}),Object.defineProperty(t,"Time",{enumerable:!0,get:function(){return l.Time}});var c=n(1236);Object.defineProperty(t,"Node",{enumerable:!0,get:function(){return c.Node}}),Object.defineProperty(t,"isNode",{enumerable:!0,get:function(){return c.isNode}}),Object.defineProperty(t,"Relationship",{enumerable:!0,get:function(){return c.Relationship}}),Object.defineProperty(t,"isRelationship",{enumerable:!0,get:function(){return c.isRelationship}}),Object.defineProperty(t,"UnboundRelationship",{enumerable:!0,get:function(){return c.UnboundRelationship}}),Object.defineProperty(t,"isUnboundRelationship",{enumerable:!0,get:function(){return c.isUnboundRelationship}}),Object.defineProperty(t,"Path",{enumerable:!0,get:function(){return c.Path}}),Object.defineProperty(t,"isPath",{enumerable:!0,get:function(){return c.isPath}}),Object.defineProperty(t,"PathSegment",{enumerable:!0,get:function(){return c.PathSegment}}),Object.defineProperty(t,"isPathSegment",{enumerable:!0,get:function(){return c.isPathSegment}});var f=a(n(4457));t.Record=f.default;var h=n(585);Object.defineProperty(t,"isPoint",{enumerable:!0,get:function(){return h.isPoint}}),Object.defineProperty(t,"Point",{enumerable:!0,get:function(){return h.Point}});var d=i(n(7936));t.ResultSummary=d.default,Object.defineProperty(t,"queryType",{enumerable:!0,get:function(){return d.queryType}}),Object.defineProperty(t,"ServerInfo",{enumerable:!0,get:function(){return d.ServerInfo}}),Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return d.Notification}}),Object.defineProperty(t,"Plan",{enumerable:!0,get:function(){return d.Plan}}),Object.defineProperty(t,"ProfiledPlan",{enumerable:!0,get:function(){return d.ProfiledPlan}}),Object.defineProperty(t,"QueryStatistics",{enumerable:!0,get:function(){return d.QueryStatistics}}),Object.defineProperty(t,"Stats",{enumerable:!0,get:function(){return d.Stats}}),Object.defineProperty(t,"notificationCategory",{enumerable:!0,get:function(){return d.notificationCategory}}),Object.defineProperty(t,"notificationSeverityLevel",{enumerable:!0,get:function(){return d.notificationSeverityLevel}});var p=n(6730);Object.defineProperty(t,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return p.notificationFilterDisabledCategory}}),Object.defineProperty(t,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return p.notificationFilterMinimumSeverityLevel}});var v=a(n(9135));t.Result=v.default;var m=a(n(6483));t.EagerResult=m.default;var y=a(n(7376));t.ConnectionProvider=y.default;var g=a(n(9537));t.Connection=g.default;var _=a(n(2076));t.Transaction=_.default;var b=a(n(1451));t.ManagedTransaction=b.default;var w=a(n(9875));t.TransactionPromise=w.default;var O=a(n(9906));t.Session=O.default;var x=i(n(9776)),S=x;t.Driver=x.default,t.driver=S;var E=a(n(4172));t.auth=E.default;var P=n(2192);Object.defineProperty(t,"bookmarkManager",{enumerable:!0,get:function(){return P.bookmarkManager}});var T=n(6527);Object.defineProperty(t,"authTokenManagers",{enumerable:!0,get:function(){return T.authTokenManagers}}),Object.defineProperty(t,"staticAuthTokenManager",{enumerable:!0,get:function(){return T.staticAuthTokenManager}});var k=n(9776);Object.defineProperty(t,"routing",{enumerable:!0,get:function(){return k.routing}});var C=i(n(5136));t.types=C;var j=i(n(4052));t.json=j;var N=a(n(3904));t.resultTransformers=N.default;var I=i(n(9143));t.internal=I;var M={SERVICE_UNAVAILABLE:s.SERVICE_UNAVAILABLE,SESSION_EXPIRED:s.SESSION_EXPIRED,PROTOCOL_ERROR:s.PROTOCOL_ERROR};t.error=M;var R={authTokenManagers:T.authTokenManagers,newError:s.newError,Neo4jError:s.Neo4jError,isRetriableError:s.isRetriableError,error:M,Integer:u.default,int:u.int,isInt:u.isInt,inSafeRange:u.inSafeRange,toNumber:u.toNumber,toString:u.toString,internal:I,isPoint:h.isPoint,Point:h.Point,Date:l.Date,DateTime:l.DateTime,Duration:l.Duration,isDate:l.isDate,isDateTime:l.isDateTime,isDuration:l.isDuration,isLocalDateTime:l.isLocalDateTime,isLocalTime:l.isLocalTime,isTime:l.isTime,LocalDateTime:l.LocalDateTime,LocalTime:l.LocalTime,Time:l.Time,Node:c.Node,isNode:c.isNode,Relationship:c.Relationship,isRelationship:c.isRelationship,UnboundRelationship:c.UnboundRelationship,isUnboundRelationship:c.isUnboundRelationship,Path:c.Path,isPath:c.isPath,PathSegment:c.PathSegment,isPathSegment:c.isPathSegment,Record:f.default,ResultSummary:d.default,queryType:d.queryType,ServerInfo:d.ServerInfo,Notification:d.Notification,Plan:d.Plan,ProfiledPlan:d.ProfiledPlan,QueryStatistics:d.QueryStatistics,Stats:d.Stats,Result:v.default,EagerResult:m.default,Transaction:_.default,ManagedTransaction:b.default,TransactionPromise:w.default,Session:O.default,Driver:x.default,Connection:g.default,types:C,driver:S,json:j,auth:E.default,bookmarkManager:P.bookmarkManager,routing:k.routing,resultTransformers:N.default,notificationCategory:d.notificationCategory,notificationSeverityLevel:d.notificationSeverityLevel,notificationFilterDisabledCategory:p.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:p.notificationFilterMinimumSeverityLevel};t.default=R},2765:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toString=t.toNumber=t.inSafeRange=t.isInt=t.int=void 0;var r=n(6024),o=new Map,i=function(){function e(e,t){this.low=null!==e&&void 0!==e?e:0,this.high=null!==t&&void 0!==t?t:0}return e.prototype.inSafeRange=function(){return this.greaterThanOrEqual(e.MIN_SAFE_VALUE)&&this.lessThanOrEqual(e.MAX_SAFE_VALUE)},e.prototype.toInt=function(){return this.low},e.prototype.toNumber=function(){return this.high*s+(this.low>>>0)},e.prototype.toBigInt=function(){if(this.isZero())return BigInt(0);if(this.isPositive())return BigInt(this.high>>>0)*BigInt(s)+BigInt(this.low>>>0);var e=this.negate();return BigInt(-1)*(BigInt(e.high>>>0)*BigInt(s)+BigInt(e.low>>>0))},e.prototype.toNumberOrInfinity=function(){return this.lessThan(e.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(e.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},e.prototype.toString=function(t){if((t=null!==t&&void 0!==t?t:10)<2||t>36)throw RangeError("radix out of range: "+t.toString());if(this.isZero())return"0";var n;if(this.isNegative()){if(this.equals(e.MIN_VALUE)){var r=e.fromNumber(t),o=this.div(r);return n=o.multiply(r).subtract(this),o.toString(t)+n.toInt().toString(t)}return"-"+this.negate().toString(t)}var i=e.fromNumber(Math.pow(t,6));n=this;for(var a="";;){var s=n.div(i),u=(n.subtract(s.multiply(i)).toInt()>>>0).toString(t);if((n=s).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},e.prototype.valueOf=function(){return this.toBigInt()},e.prototype.getHighBits=function(){return this.high},e.prototype.getLowBits=function(){return this.low},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();var t=0!==this.high?this.high:this.low,n=0;for(n=31;n>0&&0===(t&1<=0},e.prototype.isOdd=function(){return 1===(1&this.low)},e.prototype.isEven=function(){return 0===(1&this.low)},e.prototype.equals=function(t){var n=e.fromValue(t);return this.high===n.high&&this.low===n.low},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.lessThan=function(e){return this.compare(e)<0},e.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},e.prototype.greaterThan=function(e){return this.compare(e)>0},e.prototype.greaterThanOrEqual=function(e){return this.compare(e)>=0},e.prototype.compare=function(t){var n=e.fromValue(t);if(this.equals(n))return 0;var r=this.isNegative(),o=n.isNegative();return r&&!o?-1:!r&&o?1:this.subtract(n).isNegative()?-1:1},e.prototype.negate=function(){return this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.add=function(t){var n=e.fromValue(t),r=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,s=n.high>>>16,u=65535&n.high,l=n.low>>>16,c=0,f=0,h=0,d=0;return h+=(d+=a+(65535&n.low))>>>16,d&=65535,f+=(h+=i+l)>>>16,h&=65535,c+=(f+=o+u)>>>16,f&=65535,c+=r+s,c&=65535,e.fromBits(h<<16|d,c<<16|f)},e.prototype.subtract=function(t){var n=e.fromValue(t);return this.add(n.negate())},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;var n=e.fromValue(t);if(n.isZero())return e.ZERO;if(this.equals(e.MIN_VALUE))return n.isOdd()?e.MIN_VALUE:e.ZERO;if(n.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return n.isNegative()?this.negate().multiply(n.negate()):this.negate().multiply(n).negate();if(n.isNegative())return this.multiply(n.negate()).negate();if(this.lessThan(l)&&n.lessThan(l))return e.fromNumber(this.toNumber()*n.toNumber());var r=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,s=n.high>>>16,u=65535&n.high,c=n.low>>>16,f=65535&n.low,h=0,d=0,p=0,v=0;return p+=(v+=a*f)>>>16,v&=65535,d+=(p+=i*f)>>>16,p&=65535,d+=(p+=a*c)>>>16,p&=65535,h+=(d+=o*f)>>>16,d&=65535,h+=(d+=i*c)>>>16,d&=65535,h+=(d+=a*u)>>>16,d&=65535,h+=r*f+o*c+i*u+a*s,h&=65535,e.fromBits(p<<16|v,h<<16|d)},e.prototype.div=function(t){var n,o,i,a=e.fromValue(t);if(a.isZero())throw(0,r.newError)("division by zero");if(this.isZero())return e.ZERO;if(this.equals(e.MIN_VALUE))return a.equals(e.ONE)||a.equals(e.NEG_ONE)?e.MIN_VALUE:a.equals(e.MIN_VALUE)?e.ONE:(n=this.shiftRight(1).div(a).shiftLeft(1)).equals(e.ZERO)?a.isNegative()?e.ONE:e.NEG_ONE:(o=this.subtract(a.multiply(n)),i=n.add(o.div(a)));if(a.equals(e.MIN_VALUE))return e.ZERO;if(this.isNegative())return a.isNegative()?this.negate().div(a.negate()):this.negate().div(a).negate();if(a.isNegative())return this.div(a.negate()).negate();for(i=e.ZERO,o=this;o.greaterThanOrEqual(a);){n=Math.max(1,Math.floor(o.toNumber()/a.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),u=s<=48?1:Math.pow(2,s-48),l=e.fromNumber(n),c=l.multiply(a);c.isNegative()||c.greaterThan(o);)n-=u,c=(l=e.fromNumber(n)).multiply(a);l.isZero()&&(l=e.ONE),i=i.add(l),o=o.subtract(c)}return i},e.prototype.modulo=function(t){var n=e.fromValue(t);return this.subtract(this.div(n).multiply(n))},e.prototype.not=function(){return e.fromBits(~this.low,~this.high)},e.prototype.and=function(t){var n=e.fromValue(t);return e.fromBits(this.low&n.low,this.high&n.high)},e.prototype.or=function(t){var n=e.fromValue(t);return e.fromBits(this.low|n.low,this.high|n.high)},e.prototype.xor=function(t){var n=e.fromValue(t);return e.fromBits(this.low^n.low,this.high^n.high)},e.prototype.shiftLeft=function(t){var n=e.toNumber(t);return 0===(n&=63)?e.ZERO:n<32?e.fromBits(this.low<>>32-n):e.fromBits(0,this.low<>>n|this.high<<32-n,this.high>>n):e.fromBits(this.high>>n-32,this.high>=0?0:-1)},e.isInteger=function(e){return!0===(null===e||void 0===e?void 0:e.__isInteger__)},e.fromInt=function(t){var n;if((t|=0)>=-128&&t<128&&null!=(n=o.get(t)))return n;var r=new e(t,t<0?-1:0);return t>=-128&&t<128&&o.set(t,r),r},e.fromBits=function(t,n){return new e(t,n)},e.fromNumber=function(t){return isNaN(t)||!isFinite(t)?e.ZERO:t<=-u?e.MIN_VALUE:t+1>=u?e.MAX_VALUE:t<0?e.fromNumber(-t).negate():new e(t%s|0,t/s|0)},e.fromString=function(t,n,o){var i,s=(void 0===o?{}:o).strictStringValidation;if(0===t.length)throw(0,r.newError)("number format error: empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if((n=null!==n&&void 0!==n?n:10)<2||n>36)throw(0,r.newError)("radix out of range: "+n.toString());if((i=t.indexOf("-"))>0)throw(0,r.newError)('number format error: interior "-" character: '+t);if(0===i)return e.fromString(t.substring(1),n).negate();for(var u=e.fromNumber(Math.pow(n,8)),l=e.ZERO,c=0;c0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=f[t]}},145:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBrokenObjectReason=t.isBrokenObject=t.createBrokenObject=void 0;var n="__isBrokenObject__",r="__reason__";t.createBrokenObject=function(e,t){void 0===t&&(t={});var o=function(){throw e};return new Proxy(t,{get:function(t,i){return i===n||(i===r?e:void("toJSON"!==i&&o()))},set:o,apply:o,construct:o,defineProperty:o,deleteProperty:o,getOwnPropertyDescriptor:o,getPrototypeOf:o,has:o,isExtensible:o,ownKeys:o,preventExtensions:o,setPrototypeOf:o})},t.isBrokenObject=function(e){return null!==e&&"object"===typeof e&&!0===e[n]},t.getBrokenObjectReason=function(e){return e[r]}},6234:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FailedObserver=t.CompletedObserver=void 0;var n=function(){function e(){}return e.prototype.subscribe=function(e){o(e,e.onKeys,[]),o(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}();t.CompletedObserver=n;var r=function(){function e(e){var t=e.error,n=e.onError;this._error=t,this._beforeError=n,this._observers=[],this.onError(t)}return e.prototype.subscribe=function(e){o(e,e.onError,this._error),this._observers.push(e)},e.prototype.onError=function(e){o(this,this._beforeError,e),this._observers.forEach((function(t){return o(t,t.onError,e)}))},e.prototype.cancel=function(){},e.prototype.pause=function(){},e.prototype.resume=function(){},e.prototype.markCompleted=function(){},e.prototype.prepareToHandleSingleResponse=function(){},e}();function o(e,t,n){null!=t&&t.bind(e)(n)}t.FailedObserver=r},8125:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]:'. Got: ".concat(e));return e.map((function(e){return r.ServerAddress.fromUrl(e)}))}))},e}();t.default=i},4709:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfiguredCustomResolver=t.BaseHostNameResolver=void 0;var o=r(n(4073));t.BaseHostNameResolver=o.default;var i=r(n(5814));t.ConfiguredCustomResolver=i.default},6940:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAddress=void 0;var a=n(6996),s=i(n(1741)),u=function(){function e(e,t,n,r){this._host=(0,a.assertString)(e,"host"),this._resolved=null!=t?(0,a.assertString)(t,"resolved"):null,this._port=(0,a.assertNumber)(n,"port"),this._hostPort=r,this._stringValue=null!=t?"".concat(r,"(").concat(t,")"):"".concat(r)}return e.prototype.host=function(){return this._host},e.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},e.prototype.port=function(){return this._port},e.prototype.resolveWith=function(t){return new e(this._host,t,this._port,this._hostPort)},e.prototype.asHostPort=function(){return this._hostPort},e.prototype.asKey=function(){return this._hostPort},e.prototype.toString=function(){return this._stringValue},e.fromUrl=function(t){var n=s.parseDatabaseUrl(t);return new e(n.host,null,n.port,n.hostAndPort)},e}();t.ServerAddress=u},786:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.floorMod=t.floorDiv=t.assertValidZoneId=t.assertValidNanosecond=t.assertValidSecond=t.assertValidMinute=t.assertValidHour=t.assertValidDay=t.assertValidMonth=t.assertValidYear=t.timeZoneOffsetInSeconds=t.totalNanoseconds=t.newDate=t.toStandardDate=t.isoStringToStandardDate=t.dateToIsoString=t.timeZoneOffsetToIsoString=t.timeToIsoString=t.durationToIsoString=t.dateToEpochDay=t.localDateTimeToEpochSecond=t.localTimeToNanoOfDay=t.normalizeNanosecondsForDuration=t.normalizeSecondsForDuration=t.SECONDS_PER_DAY=t.DAYS_PER_400_YEAR_CYCLE=t.DAYS_0000_TO_1970=t.NANOS_PER_HOUR=t.NANOS_PER_MINUTE=t.NANOS_PER_MILLISECOND=t.NANOS_PER_SECOND=t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE=t.MINUTES_PER_HOUR=t.NANOSECOND_OF_SECOND_RANGE=t.SECOND_OF_MINUTE_RANGE=t.MINUTE_OF_HOUR_RANGE=t.HOUR_OF_DAY_RANGE=t.DAY_OF_MONTH_RANGE=t.MONTH_OF_YEAR_RANGE=t.YEAR_RANGE=void 0;var a=i(n(2765)),s=n(6024),u=n(6996),l=function(){function e(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,a.int)(e),this._maxInteger=(0,a.int)(t)}return e.prototype.contains=function(e){if((0,a.isInt)(e)&&e instanceof a.default)return e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger);if("bigint"===typeof e){var t=(0,a.int)(e);return t.greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger)}return e>=this._minNumber&&e<=this._maxNumber},e.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},e}();function c(e,n,r){e=(0,a.int)(e),n=(0,a.int)(n),r=(0,a.int)(r);var o=e.multiply(365);return o=(o=(o=e.greaterThanOrEqual(0)?o.add(e.add(3).div(4).subtract(e.add(99).div(100)).add(e.add(399).div(400))):o.subtract(e.div(-4).subtract(e.div(-100)).add(e.div(-400)))).add(n.multiply(367).subtract(362).div(12))).add(r.subtract(1)),n.greaterThan(2)&&(o=o.subtract(1),function(e){return e=(0,a.int)(e),!!e.modulo(4).equals(0)&&(!e.modulo(100).equals(0)||!!e.modulo(400).equals(0))}(e)||(o=o.subtract(1))),o.subtract(t.DAYS_0000_TO_1970)}function f(e,t,n){if((0,u.assertNumberOrInteger)(e,n),!t.contains(e))throw(0,s.newError)("".concat(n," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()));return e}function h(e,t){e=(0,a.int)(e),t=(0,a.int)(t);var n=e.div(t);return e.isPositive()!==t.isPositive()&&n.multiply(t).notEquals(e)&&(n=n.subtract(1)),n}function d(e,t){return e=(0,a.int)(e),t=(0,a.int)(t),e.subtract(h(e,t).multiply(t))}function p(e){return(e=(0,a.int)(e)).equals(0)?"":"."+v(e,9)}function v(e,t,n){var r=(e=(0,a.int)(e)).isNegative();r&&(e=e.negate());var o=e.toString();if(null!=t)for(;o.length=e.getUTCSeconds()?e.getSeconds()-e.getUTCSeconds():e.getSeconds()-e.getUTCSeconds()+60,r=e.getTimezoneOffset();return 0===r?0+n:-1*r*t.SECONDS_PER_MINUTE+n},t.assertValidYear=function(e){return f(e,t.YEAR_RANGE,"Year")},t.assertValidMonth=function(e){return f(e,t.MONTH_OF_YEAR_RANGE,"Month")},t.assertValidDay=function(e){return f(e,t.DAY_OF_MONTH_RANGE,"Day")},t.assertValidHour=function(e){return f(e,t.HOUR_OF_DAY_RANGE,"Hour")},t.assertValidMinute=function(e){return f(e,t.MINUTE_OF_HOUR_RANGE,"Minute")},t.assertValidSecond=function(e){return f(e,t.SECOND_OF_MINUTE_RANGE,"Second")},t.assertValidNanosecond=function(e){return f(e,t.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},t.assertValidZoneId=function(e,t){try{Intl.DateTimeFormat(void 0,{timeZone:t})}catch(n){throw(0,s.newError)("".concat(e,' is expected to be a valid ZoneId but was: "').concat(t,'"'))}},t.floorDiv=h,t.floorMod=d},6068:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;othis._maxRetryTimeMs||!(0,u.isRetriableError)(n)?Promise.reject(n):new Promise((function(n,r){var u=s._computeDelayWithJitter(o),l=s._setTimeout((function(){s._inFlightTimeoutIds=s._inFlightTimeoutIds.filter((function(e){return e!==l})),s._executeTransactionInsidePromise(e,t,n,r,i,a).catch(r)}),u);s._inFlightTimeoutIds.push(l)})).catch((function(n){var u=o*s._multiplier;return s._retryTransactionPromise(e,t,n,r,u,i,a)}))},e.prototype._executeTransactionInsidePromise=function(e,t,n,a,s,u){return o(this,void 0,void 0,(function(){var o,l,c,f,h,d,p=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),l=e(null!=(null===u||void 0===u?void 0:u.apiTransactionConfig)?r({},null===u||void 0===u?void 0:u.apiTransactionConfig):void 0),this.pipelineBegin?(c=l,[3,3]):[3,1];case 1:return[4,l];case 2:c=i.sent(),i.label=3;case 3:return o=c,[3,5];case 4:return f=i.sent(),a(f),[2];case 5:return h=null!==s&&void 0!==s?s:function(e){return e},d=h(o),this._safeExecuteTransactionWork(d,t).then((function(e){return p._handleTransactionWorkSuccess(e,o,n,a)})).catch((function(e){return p._handleTransactionWorkFailure(e,o,a)})),[2]}}))}))},e.prototype._safeExecuteTransactionWork=function(e,t){try{var n=t(e);return Promise.resolve(n)}catch(r){return Promise.reject(r)}},e.prototype._handleTransactionWorkSuccess=function(e,t,n,r){t.isOpen()?t.commit().then((function(){n(e)})).catch((function(e){r(e)})):n(e)},e.prototype._handleTransactionWorkFailure=function(e,t,n){t.isOpen()?t.rollback().catch((function(e){})).then((function(){return n(e)})).catch(n):n(e)},e.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,n=e-t,r=e+t;return Math.random()*(r-n)+n},e.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,u.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,u.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,u.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||this._jitterFactor>1)throw(0,u.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},e}();function d(e,t){return null!=e?e:t}t.TransactionExecutor=h},1611:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TxConfig=void 0;var a=i(n(6996)),s=n(6024),u=n(2765),l=function(){function e(e,t){!function(e){null!=e&&a.assertObject(e,"Transaction config")}(e),this.timeout=function(e,t){if(a.isObject(e)&&null!=e.timeout){a.assertNumberOrInteger(e.timeout,"Transaction timeout"),function(e){return"number"===typeof e.timeout&&!Number.isInteger(e.timeout)}(e)&&!0===(null===t||void 0===t?void 0:t.isInfoEnabled())&&(null===t||void 0===t||t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up.")));var n=(0,u.int)(e.timeout,{ceilFloat:!0});if(n.isNegative())throw(0,s.newError)("Transaction timeout should not be negative");return n}return null}(e,t),this.metadata=function(e){if(a.isObject(e)&&null!=e.metadata){var t=e.metadata;if(a.assertObject(t,"config.metadata"),0!==Object.keys(t).length)return t}return null}(e)}return e.empty=function(){return c},e.prototype.isEmpty=function(){return Object.values(this).every((function(e){return null==e}))},e}();t.TxConfig=l;var c=new l({})},1741:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.Url=t.formatIPv6Address=t.formatIPv4Address=t.defaultPortForScheme=t.parseDatabaseUrl=void 0;var i=n(6996),a=7687,s=7474,u=7473,l=function(e,t,n,r,o){this.scheme=e,this.host=t,this.port=n,this.hostAndPort=r,this.query=o};function c(e,t,n){if(""===(e=(null!==e&&void 0!==e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(n,"'"));return e}function f(e){var t="["===e.charAt(0),n="]"===e.charAt(e.length-1);if(t||n){if(t&&n)return e;throw new Error("Illegal IPv6 address ".concat(e))}return"[".concat(e,"]")}function h(e){return"http"===e?s:"https"===e?u:a}t.Url=l,t.parseDatabaseUrl=function(e){var t;(0,i.assertString)(e,"URL");var n=function(e){if(e=e.trim(),!e.includes("://"))return{schemeMissing:!0,url:"none://".concat(e)};return{schemeMissing:!1,url:e}}(e),a=function(e){function t(e,t){var n=e.indexOf(t);return n>=0?[e.substring(0,n),e[n],e.substring(n+1)]:[e,"",""]}function n(e,t){var n=e.lastIndexOf(t);return n>=0?[e.substring(0,n),e[n],e.substring(n+1)]:["","",e]}function i(e,n,r){var o=t(e,n),i=t(o[2],r);return[i[0],i[2]]}function a(e){var r,a={};"@"===(r=n(e,"@"))[1]&&(a.userInfo=decodeURIComponent(r[0]),e=r[2]);var s=o(i(e,"[","]"),2),u=s[0],l=s[1];return""!==u?(a.host=u,r=t(l,":")):(r=t(e,":"),a.host=r[0]),":"===r[1]&&(a.port=r[2]),a}var s,u={};":"===(s=t(e,":"))[1]&&(u.scheme=decodeURIComponent(s[0]),e=s[2]);"#"===(s=t(e,"#"))[1]&&(u.fragment=decodeURIComponent(s[2]),e=s[0]);"?"===(s=t(e,"?"))[1]&&(u.query=s[2],e=s[0]);e.startsWith("//")?(s=t(e.substr(2),"/"),(u=r(r({},u),a(s[0]))).path=s[1]+s[2]):u.path=e;return u}(n.url),s=n.schemeMissing?null:function(e){if(null!=e)return":"===(e=e.trim()).charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e;return null}(a.scheme),u=function(e,t){if(null==e)throw new Error("Unable to extract host from null or undefined URL");return e.trim()}(a.host),d=function(e){if(""===e||null==e)throw new Error("Illegal host ".concat(e));var t=e.includes(":");return t?f(e):e}(u),p=function(e,t){var n="string"===typeof e?parseInt(e,10):e;return null==n||isNaN(n)?h(t):n}(a.port,s),v="".concat(d,":").concat(p),m=function(e,t){var n=null!=e?function(e){e=(null!==e&&void 0!==e?e:"").trim(),"?"===(null===e||void 0===e?void 0:e.charAt(0))&&(e=e.substring(1,e.length));return e}(e):null,r={};null!=n&&n.split("&").forEach((function(e){var n=e.split("=");if(2!==n.length)throw new Error("Invalid parameters: '".concat(n.toString(),"' in URL '").concat(t,"'."));var o=c(n[0],"key",t),i=c(n[1],"value",t);if(void 0!==r[o])throw new Error("Duplicated query parameters with key '".concat(o,"' in URL '").concat(t,"'"));r[o]=i}));return r}(null!==(t=a.query)&&void 0!==t?t:function(e){if("string"!==typeof e)return null;var t=o(e.split("?"),2),n=t[1];return n}(a.resourceName),e);return new l(s,u,p,v,m)},t.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},t.formatIPv6Address=function(e,t){var n=f(e);return"".concat(n,":").concat(t)},t.defaultPortForScheme=h},6996:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ENCRYPTION_OFF=t.ENCRYPTION_ON=t.equals=t.validateQueryAndParameters=t.assertValidDate=t.assertNumberOrInteger=t.assertNumber=t.assertString=t.assertObject=t.isString=t.isObject=t.isEmptyObjectOrNull=void 0;var o=n(2765),i=n(4052);t.ENCRYPTION_ON="ENCRYPTION_ON";function a(e){return"object"===typeof e&&!Array.isArray(e)&&null!==e}function s(e,t){if(!u(e))throw new TypeError((0,i.stringify)(t)+" expected to be string but was: "+(0,i.stringify)(e));return e}function u(e){return"[object String]"===Object.prototype.toString.call(e)}t.ENCRYPTION_OFF="ENCRYPTION_OFF",t.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!a(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},t.isObject=a,t.validateQueryAndParameters=function(e,t,n){var r,o,i="",u=null!==t&&void 0!==t?t:{},l=null!==(r=null===n||void 0===n?void 0:n.skipAsserts)&&void 0!==r&&r;return"string"===typeof e?i=e:e instanceof String?i=e.toString():"object"===typeof e&&null!=e.text&&(i=e.text,u=null!==(o=e.parameters)&&void 0!==o?o:{}),l||(function(e){if(s(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")}(i),function(e){if(!a(e)){var t=null!=e.constructor?" "+e.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(t," ").concat(JSON.stringify(e)))}}(u)),{validatedQuery:i,params:u}},t.assertObject=function(e,t){if(!a(e))throw new TypeError(t+" expected to be an object but was: "+(0,i.stringify)(e));return e},t.assertString=s,t.assertNumber=function(e,t){if("number"!==typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,i.stringify)(e));return e},t.assertNumberOrInteger=function(e,t){if("number"!==typeof e&&"bigint"!==typeof e&&!(0,o.isInt)(e))throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,i.stringify)(e));return e},t.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,i.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,i.stringify)(e));return e},t.isString=u,t.equals=function e(t,n){var o,i;if(t===n)return!0;if(null===t||null===n)return!1;if("object"===typeof t&&"object"===typeof n){var a=Object.keys(t),s=Object.keys(n);if(a.length!==s.length)return!1;try{for(var u=r(a),l=u.next();!l.done;l=u.next()){var c=l.value;if(!e(t[c],n[c]))return!1}}catch(f){o={error:f}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return!0}return!1}},4052:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;var r=n(145);t.stringify=function(e){return JSON.stringify(e,(function(e,t){return(0,r.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,r.getBrokenObjectReason)(t)}:"bigint"===typeof t?"".concat(t,"n"):t}))}},6730:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notificationFilterDisabledCategory=t.notificationFilterMinimumSeverityLevel=void 0;var n={OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"};t.notificationFilterMinimumSeverityLevel=n,Object.freeze(n);var r={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC"};t.notificationFilterDisabledCategory=r,Object.freeze(r);var o=function(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,new Error("Not implemented")};t.default=o},4457:function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6024);var s=function(){function e(e,t,n){this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!==n&&void 0!==n?n:function(e){var t={};return e.forEach((function(e,n){t[e]=n})),t}(e)}return e.prototype.forEach=function(e){var t,n;try{for(var r=o(this.entries()),a=r.next();!a.done;a=r.next()){var s=i(a.value,2),u=s[0];e(s[1],u,this)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.map=function(e){var t,n,r=[];try{for(var a=o(this.entries()),s=a.next();!s.done;s=a.next()){var u=i(s.value,2),l=u[0],c=u[1];r.push(e(c,l,this))}}catch(f){t={error:f}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r},e.prototype.entries=function(){var e;return r(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return ethis._fields.length-1||t<0)throw(0,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?e>=0&&e0||this.pageCacheHits>0||this.pageCacheHitRatio>0},e}();t.ProfiledPlan=l;var c=function(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0};t.Stats=c;var f=function(){function e(e){var t=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(e).forEach((function(n){var r=n.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}));r in t._stats?t._stats[r]=g(e[n]):"systemUpdates"===r?t._systemUpdates=g(e[n]):"containsSystemUpdates"===r?t._containsSystemUpdates=e[n]:"containsUpdates"===r&&(t._containsUpdates=e[n])})),this._stats=Object.freeze(this._stats)}return e.prototype.containsUpdates=function(){var e=this;return void 0!==this._containsUpdates?this._containsUpdates:Object.keys(this._stats).reduce((function(t,n){return t+e._stats[n]}),0)>0},e.prototype.updates=function(){return this._stats},e.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:this._systemUpdates>0},e.prototype.systemUpdates=function(){return this._systemUpdates},e}();t.QueryStatistics=f;var h={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"};t.notificationSeverityLevel=h,Object.freeze(h);var d=Object.values(h),p={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",UNKNOWN:"UNKNOWN"};t.notificationCategory=p,Object.freeze(p);var v=Object.values(p),m=function(){function e(t){this.code=t.code,this.title=t.title,this.description=t.description,this.severity=t.severity,this.position=e._constructPosition(t.position),this.severityLevel=d.includes(t.severity)?t.severity:h.UNKNOWN,this.rawSeverityLevel=t.severity,this.category=v.includes(t.category)?t.category:p.UNKNOWN,this.rawCategory=t.category}return e._constructPosition=function(e){return null==e?{}:{offset:g(e.offset),line:g(e.line),column:g(e.column)}},e}();t.Notification=m;var y=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function g(e){return e instanceof a.default?e.toNumber():"bigint"===typeof e?(0,a.int)(e).toNumber():e}function _(e,t,n){return void 0===n&&(n=0),!1!==t&&e in t?g(t[e]):n}t.ServerInfo=y;t.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},t.default=s},3904:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e._watermarks.high,a=o<=e._watermarks.low;i&&!n.paused?(n.paused=!0,n.streaming.pause()):(a&&n.paused||n.firstRun&&!i)&&(n.firstRun=!1,n.paused=!1,n.streaming.resume())}},a=function(){return r(e,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return void 0!==n.queuedObserver?[3,2]:(n.queuedObserver=this._createQueuedResultObserver(i),e=n,[4,this._subscribe(n.queuedObserver,!0).catch((function(){}))]);case 1:e.streaming=t.sent(),i(),t.label=2;case 2:return[2,n.queuedObserver]}}))}))},s=function(e){if(void 0===e)throw(0,u.newError)("InvalidState: Result stream finished without Summary",u.PROTOCOL_ERROR);return!0};return{next:function(){return r(e,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return n.finished&&s(n.summary)?[2,{done:!0,value:n.summary}]:[4,a()];case 1:return[4,t.sent().dequeue()];case 2:return!0===(e=t.sent()).done&&(n.finished=e.done,n.summary=e.value),[2,e]}}))}))},return:function(t){return r(e,void 0,void 0,(function(){var e,r;return o(this,(function(o){switch(o.label){case 0:return n.finished&&s(n.summary)?[2,{done:!0,value:null!==t&&void 0!==t?t:n.summary}]:(null===(r=n.streaming)||void 0===r||r.cancel(),[4,a()]);case 1:return[4,o.sent().dequeueUntilDone()];case 2:return e=o.sent(),n.finished=!0,e.value=null!==t&&void 0!==t?t:e.value,n.summary=e.value,[2,e]}}))}))},peek:function(){return r(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return n.finished&&s(n.summary)?[2,{done:!0,value:n.summary}]:[4,a()];case 1:return[4,e.sent().head()];case 2:return[2,e.sent()]}}))}))}}},e.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},e.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},e.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},e.prototype.subscribe=function(e){this._subscribe(e).catch((function(){}))},e.prototype.isOpen=function(){return null===this._summary&&null===this._error},e.prototype._subscribe=function(e,t){void 0===t&&(t=!1);var n=this._decorateObserver(e);return this._streamObserverPromise.then((function(e){return t&&e.pause(),e.subscribe(n),e})).catch((function(e){return null!=n.onError&&n.onError(e),Promise.reject(e)}))},e.prototype._decorateObserver=function(e){var t,n,r,o=this,i=null!==(t=e.onCompleted)&&void 0!==t?t:f,a=null!==(n=e.onError)&&void 0!==n?n:c,s=null!==(r=e.onKeys)&&void 0!==r?r:h;return{onNext:null!=e.onNext?e.onNext.bind(e):void 0,onKeys:function(t){return o._keys=t,s.call(e,t)},onCompleted:function(t){o._releaseConnectionAndGetSummary(t).then((function(t){return null!==o._summary?i.call(e,o._summary):(o._summary=t,i.call(e,t))})).catch(a)},onError:function(t){o._connectionHolder.releaseConnection().then((function(){!function(e,t){null!=t&&(e.stack=e.toString()+"\n"+t)}(t,o._stack),o._error=t,a.call(e,t)})).catch(a)}}},e.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then((function(e){return e.cancel()})).catch((function(){}))},e.prototype._releaseConnectionAndGetSummary=function(e){var t=s.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),n=t.validatedQuery,r=t.params,o=this._connectionHolder;return o.getConnection().then((function(e){return o.releaseConnection().then((function(){return null===e||void 0===e?void 0:e.getProtocolVersion()}))}),(function(e){})).then((function(t){return new a.default(n,r,e,t)}))},e.prototype._createQueuedResultObserver=function(e){var t=this;function n(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}function i(e){return e instanceof Error}function a(){var t;return r(this,void 0,void 0,(function(){var r;return o(this,(function(o){switch(o.label){case 0:if(s.length>0){if(r=null!==(t=s.shift())&&void 0!==t?t:(0,u.newError)("Unexpected empty buffer",u.PROTOCOL_ERROR),e(),i(r))throw r;return[2,r]}return l.resolvable=n(),[4,l.resolvable.promise];case 1:return[2,o.sent()]}}))}))}var s=[],l={resolvable:null},c={onNext:function(e){c._push({done:!1,value:e})},onCompleted:function(e){c._push({done:!0,value:e})},onError:function(e){c._push(e)},_push:function(t){if(null!==l.resolvable){var n=l.resolvable;l.resolvable=null,i(t)?n.reject(t):n.resolve(t)}else s.push(t),e()},dequeue:a,dequeueUntilDone:function(){return r(t,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return[4,a()];case 1:return!0===(e=t.sent()).done?[2,e]:[3,0];case 2:return[2]}}))}))},head:function(){return r(t,void 0,void 0,(function(){var t,r;return o(this,(function(o){switch(o.label){case 0:if(s.length>0){if(i(t=s[0]))throw t;return[2,t]}l.resolvable=n(),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,l.resolvable.promise];case 2:return t=o.sent(),s.unshift(t),[2,t];case 3:throw r=o.sent(),s.unshift(r),r;case 4:return e(),[7];case 5:return[2]}}))}))},get size(){return s.length}};return c},e}();Symbol.toStringTag,t.default=d},9906:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.isDateTime=t.DateTime=t.isLocalDateTime=t.LocalDateTime=t.isDate=t.Date=t.isTime=t.Time=t.isLocalTime=t.LocalTime=t.isDuration=t.Duration=void 0;var s=i(n(786)),u=n(6996),l=n(6024),c=i(n(2765)),f={value:!0,enumerable:!1,configurable:!1,writable:!1},h="__isDuration__",d="__isLocalTime__",p="__isTime__",v="__isDate__",m="__isLocalDateTime__",y="__isDateTime__",g=function(){function e(e,t,n,r){this.months=(0,u.assertNumberOrInteger)(e,"Months"),this.days=(0,u.assertNumberOrInteger)(t,"Days"),(0,u.assertNumberOrInteger)(n,"Seconds"),(0,u.assertNumberOrInteger)(r,"Nanoseconds"),this.seconds=s.normalizeSecondsForDuration(n,r),this.nanoseconds=s.normalizeNanosecondsForDuration(r),Object.freeze(this)}return e.prototype.toString=function(){return s.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},e}();t.Duration=g,Object.defineProperty(g.prototype,h,f),t.isDuration=function(e){return S(e,h)};var _=function(){function e(e,t,n,r){this.hour=s.assertValidHour(e),this.minute=s.assertValidMinute(t),this.second=s.assertValidSecond(n),this.nanosecond=s.assertValidNanosecond(r),Object.freeze(this)}return e.fromStandardDate=function(t,n){P(t,n);var r=s.totalNanoseconds(t,n);return new e(t.getHours(),t.getMinutes(),t.getSeconds(),r instanceof c.default?r.toInt():"bigint"===typeof r?(0,c.int)(r).toInt():r)},e.prototype.toString=function(){return s.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},e}();t.LocalTime=_,Object.defineProperty(_.prototype,d,f),t.isLocalTime=function(e){return S(e,d)};var b=function(){function e(e,t,n,r,o){this.hour=s.assertValidHour(e),this.minute=s.assertValidMinute(t),this.second=s.assertValidSecond(n),this.nanosecond=s.assertValidNanosecond(r),this.timeZoneOffsetSeconds=(0,u.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}return e.fromStandardDate=function(t,n){return P(t,n),new e(t.getHours(),t.getMinutes(),t.getSeconds(),(0,c.toNumber)(s.totalNanoseconds(t,n)),s.timeZoneOffsetInSeconds(t))},e.prototype.toString=function(){return s.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+s.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},e}();t.Time=b,Object.defineProperty(b.prototype,p,f),t.isTime=function(e){return S(e,p)};var w=function(){function e(e,t,n){this.year=s.assertValidYear(e),this.month=s.assertValidMonth(t),this.day=s.assertValidDay(n),Object.freeze(this)}return e.fromStandardDate=function(t){return P(t),new e(t.getFullYear(),t.getMonth()+1,t.getDate())},e.prototype.toStandardDate=function(){return s.isoStringToStandardDate(this.toString())},e.prototype.toString=function(){return s.dateToIsoString(this.year,this.month,this.day)},e}();t.Date=w,Object.defineProperty(w.prototype,v,f),t.isDate=function(e){return S(e,v)};var O=function(){function e(e,t,n,r,o,i,a){this.year=s.assertValidYear(e),this.month=s.assertValidMonth(t),this.day=s.assertValidDay(n),this.hour=s.assertValidHour(r),this.minute=s.assertValidMinute(o),this.second=s.assertValidSecond(i),this.nanosecond=s.assertValidNanosecond(a),Object.freeze(this)}return e.fromStandardDate=function(t,n){return P(t,n),new e(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),(0,c.toNumber)(s.totalNanoseconds(t,n)))},e.prototype.toStandardDate=function(){return s.isoStringToStandardDate(this.toString())},e.prototype.toString=function(){return E(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},e}();t.LocalDateTime=O,Object.defineProperty(O.prototype,m,f),t.isLocalDateTime=function(e){return S(e,m)};var x=function(){function e(e,t,n,r,o,i,c,f,h){this.year=s.assertValidYear(e),this.month=s.assertValidMonth(t),this.day=s.assertValidDay(n),this.hour=s.assertValidHour(r),this.minute=s.assertValidMinute(o),this.second=s.assertValidSecond(i),this.nanosecond=s.assertValidNanosecond(c);var d=a(function(e,t){var n=null!==e&&void 0!==e,r=null!==t&&void 0!==t&&""!==t;if(!n&&!r)throw(0,l.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];n&&((0,u.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);r&&((0,u.assertString)(t,"Time zone ID"),s.assertValidZoneId("Time zone ID",t),o[1]=t);return o}(f,h),2),p=d[0],v=d[1];this.timeZoneOffsetSeconds=p,this.timeZoneId=null!==v&&void 0!==v?v:void 0,Object.freeze(this)}return e.fromStandardDate=function(t,n){return P(t,n),new e(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),(0,c.toNumber)(s.totalNanoseconds(t,n)),s.timeZoneOffsetInSeconds(t),null)},e.prototype.toStandardDate=function(){return s.toStandardDate(this._toUTC())},e.prototype.toString=function(){var e;return E(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?s.timeZoneOffsetToIsoString(null!==(e=this.timeZoneOffsetSeconds)&&void 0!==e?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},e.prototype._toUTC=function(){var e;if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var t=s.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!==(e=this.timeZoneOffsetSeconds)&&void 0!==e?e:0);return(0,c.int)(t).multiply(1e3).add((0,c.int)(this.nanosecond).div(1e6)).toNumber()},e}();function S(e,t){return null!=e&&!0===e[t]}function E(e,t,n,r,o,i,a){return s.dateToIsoString(e,t,n)+"T"+s.timeToIsoString(r,o,i,a)}function P(e,t){(0,u.assertValidDate)(e,"Standard date"),null!==t&&void 0!==t&&(0,u.assertNumberOrInteger)(t,"Nanosecond")}t.DateTime=x,Object.defineProperty(x.prototype,y,f),t.isDateTime=function(e){return S(e,y)}},1451:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){var t=e.run;this._run=t}return e.fromTransaction=function(t){return new e({run:t.run.bind(t)})},e.prototype.run=function(e,t){return this._run(e,t)},e}();t.default=n},9875:function(e,t,n){"use strict";var r,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0||n===s)return n;if(0===n||n<0)throw new Error("The fetch size can only be a positive value or ".concat(s," for ALL. However fetchSize = ").concat(n));return t}t.Driver=c,t.default=c},1187:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=2&&Date.now()-s>=t._maxRetryTimeout){var c=(0,r.newError)("Failed after retried for ".concat(u," times in ").concat(t._maxRetryTimeout," ms. Make sure that your database is online and retry again."),a);return c.seenErrors=n,(0,o.throwError)((function(){return c}))}var f=t._computeNextDelay(l);return l*=t._delayMultiplier,u++,t._logger&&t._logger.warn("Transaction failed and will be retried in ".concat(f)),(0,o.of)(1).pipe((0,i.delay)(f))})))})))},e.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},e}();function u(e,t){return e||0===e?e:t}t.default=s},2774:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]