From 83ce016b5916e9acfbdbf48aedd0de887fa29d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Fri, 17 Oct 2025 15:48:03 +0200 Subject: [PATCH] Update js dependencies --- js-applet/package.json | 6 +++--- .../src/neo4j_viz/resources/nvl_entrypoint/base.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js-applet/package.json b/js-applet/package.json index a52eb5d..952f7b1 100644 --- a/js-applet/package.json +++ b/js-applet/package.json @@ -9,12 +9,12 @@ "babel-loader": "^10.0.0", "ts-loader": "^9.4.4", "ts-node": "^10.9.2", - "typescript": "5.8.3", + "typescript": "5.9.3", "webpack": "^5.75.0", "webpack-cli": "^6.0.1" }, "dependencies": { - "@neo4j-nvl/base": "0.3.8", - "@neo4j-nvl/interaction-handlers": "0.3.8" + "@neo4j-nvl/base": "1.0.0", + "@neo4j-nvl/interaction-handlers": "1.0.0" } } diff --git a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/base.js b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/base.js index e9929de..737f255 100644 --- a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/base.js +++ b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/base.js @@ -1,2 +1,2 @@ /*! For license information please see base.js.LICENSE.txt */ -var NVLBase;(()=>{var e,t,n,r,o={2:(e,t,n)=>{var r=n(2199),o=n(4664),i=n(5950);e.exports=function(e){return r(e,i,o)}},79:(e,t,n)=>{var r=n(3702),o=n(80),i=n(4739),a=n(8655),s=n(1175);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},104:(e,t,n)=>{var r=n(3661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},117:(e,t,n)=>{var r;try{r={clone:n(2629),constant:n(7334),each:n(6135),filter:n(7612),has:n(1448),isArray:n(6449),isEmpty:n(2193),isFunction:n(1882),isUndefined:n(2216),keys:n(5950),map:n(5378),reduce:n(860),size:n(7091),transform:n(9752),union:n(299),values:n(5880)}}catch(e){}r||(r=window._),e.exports=r},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},270:(e,t,n)=>{var r=n(7068),o=n(346);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},289:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},299:(e,t,n)=>{var r=n(3120),o=n(9302),i=n(5765),a=n(3693),s=o(function(e){return i(r(e,1,a,!0))});e.exports=s},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},356:(e,t)=>{"use strict";var n=/\d{13}/;t.is=function(e){return n.test(e)},t.parse=function(e){return e=parseInt(e,10),new Date(e)}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{e.exports=function(e,t){return null==e?void 0:e[t]}},426:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},472:(e,t,n)=>{"use strict";n.d(t,{Ud:()=>a,kJ:()=>o,rY:()=>i});var r="analytics";function o(){return window[r]}function i(e){r=e}function a(e){window[r]=e}},498:(e,t,n)=>{var r=n(9888);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},514:(e,t,n)=>{var r=n(4932);e.exports=function(e,t){return r(t,function(t){return e[t]})}},524:(e,t,n)=>{"use strict";function r(e,t){return t=t||{},new Promise(function(n,r){var o=new XMLHttpRequest,i=[],a=[],s={},u=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:u,headers:{keys:function(){return i},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in o.open(t.method||"get",e,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,n){i.push(t=t.toLowerCase()),a.push([t,n]),s[t]=s[t]?s[t]+","+n:n}),n(u())},o.onerror=r,o.withCredentials="include"==t.credentials,t.headers)o.setRequestHeader(l,t.headers[l]);o.send(t.body||null)})}n.d(t,{h:()=>i});var o=n(2453),i=function(){for(var e=[],t=0;t{var r=n(7237),o=n(7255),i=n(8586),a=n(7797);e.exports=function(e){return i(e)?r(a(e)):o(e)}},631:(e,t,n)=>{var r=n(8077),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},641:(e,t,n)=>{var r=n(6649),o=n(5950);e.exports=function(e,t){return e&&r(e,t,o)}},659:(e,t,n)=>{var r=n(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},689:(e,t,n)=>{var r=n(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var u=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!u)return!1;for(var f=c;f--;){var h=l[f];if(!(u?h in t:o.call(t,h)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=u;++f{var r=n(8096),o=n(2428),i=n(6449),a=n(3656),s=n(361),u=n(7167),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&o(e),f=!n&&!c&&a(e),h=!n&&!c&&!f&&u(e),d=n||c||f||h,p=d?r(e.length,String):[],v=p.length;for(var g in e)!t&&!l.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||p.push(g);return p}},756:(e,t,n)=>{var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},776:(e,t,n)=>{var r=n(756),o=n(5950);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},860:(e,t,n)=>{var r=n(882),o=n(909),i=n(5389),a=n(5558),s=n(6449);e.exports=function(e,t,n){var u=s(e)?r:a,l=arguments.length<3;return u(e,i(t,4),n,l,o)}},882:e=>{e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o{var r=n(641),o=n(8329)(r);e.exports=o},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945:(e,t,n)=>{var r=n(79),o=n(8223),i=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},1033:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},1042:(e,t,n)=>{var r=n(6110)(Object,"create");e.exports=r},1045:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"post")}},1094:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var r=n(1635);function o(e,t){var n,o=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce(function(e,t){var n,o,i=t[0],a=t[1];return"object"==typeof a?(0,r.Cl)((0,r.Cl)({},e),((n={})[i]=a,n)):(0,r.Cl)((0,r.Cl)({},e),((o={})[i]={},o))},{});return Object.entries(e.integrations).reduce(function(e,t){var n,i=t[0],a=t[1];return(0,r.Cl)((0,r.Cl)({},e),((n={})[i]=(0,r.Cl)((0,r.Cl)({},a),o[i]),n))},{})}},1137:e=>{e.exports=function(e,t,n,r){var o=e[0],i=e[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=t.length);for(var s=r-n,u=0,l=s-1;ui!=d>i&&o<(h-c)*(i-f)/(d-f)+c&&(a=!a)}return a}},1166:(e,t,n)=>{e.exports={Graph:n(6454),version:n(4458)}},1175:(e,t,n)=>{var r=n(6025);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},1298:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var r="npm";function o(){return r}},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1418:(e,t,n)=>{"use strict";var r=n(2543),o=n(6718);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),function(t){!function(e,t){var n,r,i,a=t.v,s=e.node(a).rank,u=t.w,l=e.node(u).rank,c=t.name,f=e.edge(t),h=f.labelRank;if(l!==s+1){for(e.removeEdge(t),i=0,++s;s{var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},1448:(e,t,n)=>{var r=n(426),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},1476: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;n{var r=n(2032),o=n(3862),i=n(6721),a=n(2749),s=n(5749);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{"use strict";var r=n(2543),o=n(2856),i=n(3382).slack,a=n(3382).longestPath,s=n(8362).alg.preorder,u=n(8362).alg.postorder,l=n(6718).simplify;function c(e){e=l(e),a(e);var t,n=o(e);for(d(n),f(n,e);t=v(n);)y(n,e,t,g(n,e,t))}function f(e,t){var n=u(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=h(e,t,n)}(e,t,n)})}function h(e,t,n){var o=e.node(n).parent,i=!0,a=t.edge(n,o),s=0;return a||(i=!1,a=t.edge(o,n)),s=a.weight,r.forEach(t.nodeEdges(n),function(r){var a,u,l=r.v===n,c=l?r.w:r.v;if(c!==o){var f=l===i,h=t.edge(r).weight;if(s+=f?h:-h,a=n,u=c,e.hasEdge(a,u)){var d=e.edge(n,c).cutvalue;s+=f?-d:d}}}),s}function d(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,o,i){var a=n,s=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),function(i){r.has(t,i)||(n=p(e,t,n,i,o))}),s.low=a,s.lim=n++,i?s.parent=i:delete s.parent,n}function v(e){return r.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function g(e,t,n){var o=n.v,a=n.w;t.hasEdge(o,a)||(o=n.w,a=n.v);var s=e.node(o),u=e.node(a),l=s,c=!1;s.lim>u.lim&&(l=u,c=!0);var f=r.filter(t.edges(),function(t){return c===m(0,e.node(t.v),l)&&c!==m(0,e.node(t.w),l)});return r.minBy(f,function(e){return i(t,e)})}function y(e,t,n,o){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),d(e),f(e,t),function(e,t){var n=r.find(e.nodes(),function(e){return!t.node(e).parent}),o=s(e,n);o=o.slice(1),r.forEach(o,function(n){var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)})}(e,t)}function m(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=d,c.initCutValues=f,c.calcCutValue=h,c.leaveEdge=v,c.enterEdge=g,c.exchangeEdges=y},1582:(e,t,n)=>{"use strict";var r=n(5341),o=n(4262),i=n(9095),a=n(3467).orient2d;function s(e,t,n){t=Math.max(0,void 0===t?2:t),n=n||0;var o=function(e){for(var t=e[0],n=e[0],r=e[0],o=e[0],a=0;ar[0]&&(r=s),s[1]o[1]&&(o=s)}var u=[t,n,r,o],l=u.slice();for(a=0;a=2&&d(t[t.length-2],t[t.length-1],e[n])<=0;)t.pop();t.push(e[n])}for(var r=[],o=e.length-1;o>=0;o--){for(;r.length>=2&&d(r[r.length-2],r[r.length-1],e[o])<=0;)r.pop();r.push(e[o])}return r.pop(),t.pop(),t.concat(r)}(l)}(e),a=new r(16);a.toBBox=function(e){return{minX:e[0],minY:e[1],maxX:e[0],maxY:e[1]}},a.compareMinX=function(e,t){return e[0]-t[0]},a.compareMinY=function(e,t){return e[1]-t[1]},a.load(e);for(var s,l=[],c=0;ca||u.push({node:p,dist:v})}for(;u.length&&!u.peek().node.children;){var g=u.pop(),y=g.node,b=m(y,t,n),_=m(y,r,i);if(g.dist=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function h(e,t,n){for(var r=Math.min(e[0],t[0]),o=Math.min(e[1],t[1]),i=Math.max(e[0],t[0]),a=Math.max(e[1],t[1]),s=n.search({minX:r,minY:o,maxX:i,maxY:a}),u=0;u0!=d(e,t,r)>0&&d(n,r,e)>0!=d(n,r,t)>0}function v(e){var t=e.p,n=e.next.p;return e.minX=Math.min(t[0],n[0]),e.minY=Math.min(t[1],n[1]),e.maxX=Math.max(t[0],n[0]),e.maxY=Math.max(t[1],n[1]),e}function g(e,t){var n={p:e,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(n.next=t.next,n.prev=t,t.next.prev=n,t.next=n):(n.prev=n,n.next=n),n}function y(e,t){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function m(e,t,n){var r=t[0],o=t[1],i=n[0]-r,a=n[1]-o;if(0!==i||0!==a){var s=((e[0]-r)*i+(e[1]-o)*a)/(i*i+a*a);s>1?(r=n[0],o=n[1]):s>0&&(r+=i*s,o+=a*s)}return(i=e[0]-r)*i+(a=e[1]-o)*a}function b(e,t,n,r,o,i,a,s){var u,l,c,f,h=n-e,d=r-t,p=a-o,v=s-i,g=e-o,y=t-i,m=h*h+d*d,b=h*p+d*v,_=p*p+v*v,w=h*g+d*y,x=p*g+v*y,E=m*_-b*b,O=E,S=E;0===E?(l=0,O=1,f=x,S=_):(f=m*x-b*w,(l=b*x-_*w)<0?(l=0,f=x,S=_):l>O&&(l=O,f=x+b,S=_)),f<0?(f=0,-w<0?l=0:-w>m?l=O:(l=-w,O=m)):f>S&&(f=S,-w+b<0?l=0:-w+b>m?l=O:(l=-w+b,O=m));var T=(1-(c=0===f?0:f/S))*o+c*a-((1-(u=0===l?0:l/O))*e+u*n),P=(1-c)*i+c*s-((1-u)*t+u*r);return T*T+P*P}function _(e,t){return e[0]===t[0]?e[1]-t[1]:e[0]-t[0]}o.default&&(o=o.default),e.exports=s,e.exports.default=s},1635:(e,t,n)=>{"use strict";n.d(t,{C6:()=>o,Cl:()=>i,Tt:()=>a,YH:()=>u,fX:()=>l,sH:()=>s});var r=function(e,t){return r=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])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=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])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{e.exports={components:n(3619),dijkstra:n(8905),dijkstraAll:n(4919),findCycles:n(6678),floydWarshall:n(3590),isAcyclic:n(498),postorder:n(1045),preorder:n(6016),prim:n(4423),tarjan:n(6291),topsort:n(9888)}},1737:(e,t,n)=>{var r=n(117);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(e){return e.key})},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n>1].priority{var r=n(6449),o=n(8586),i=n(1802),a=n(3222);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},1791:(e,t,n)=>{var r=n(6547),o=n(3360);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s{var r=n(7217),o=n(270);e.exports=function(e,t,n,i){var a=n.length,s=a,u=!i;if(null==e)return!s;for(e=Object(e);a--;){var l=n[a];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a{var r=n(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)}),t});e.exports=a},1811:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},1873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},1882:(e,t,n)=>{var r=n(2552),o=n(3805);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,n)=>{var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},1986:(e,t,n)=>{var r=n(1873),o=n(7828),i=n(5288),a=n(5911),s=n(317),u=n(4247),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,f,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=u),e.size!=t.size&&!p)return!1;var v=h.get(e);if(v)return v==t;r|=2,h.set(e,t);var g=a(d(e),d(t),r,l,f,h);return h.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},1993:(e,t,n)=>{var r=n(9811),o=n(9698),i=n(7927);e.exports=function(e){return o(e)?i(e):r(e)}},2032:(e,t,n)=>{var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2079:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var r=function(){function e(e){var t;this.callbacks={},this.warned=!1,this.maxListeners=null!==(t=null==e?void 0:e.maxListeners)&&void 0!==t?t:10}return e.prototype.warnIfPossibleMemoryLeak=function(e){this.warned||this.maxListeners&&this.callbacks[e].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(e)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},e.prototype.on=function(e,t){return this.callbacks[e]?(this.callbacks[e].push(t),this.warnIfPossibleMemoryLeak(e)):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var o=[],i=0;i{var r=n(8984),o=n(5861),i=n(2428),a=n(6449),s=n(4894),u=n(3656),l=n(5527),c=n(7167),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(l(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},2199:(e,t,n)=>{var r=n(4528),o=n(6449);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},2216:e=>{e.exports=function(e){return void 0===e}},2224:(e,t,n)=>{var r=n(104);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},2271:(e,t,n)=>{var r=n(1791),o=n(4664);e.exports=function(e,t){return r(e,o(e),t)}},2321:(e,t,n)=>{"use strict";function r(e){return"string"==typeof e}function o(e){return"number"==typeof e}function i(e){return"function"==typeof e}function a(e){return null!=e}function s(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}n.d(t,{Et:()=>o,Kg:()=>r,Qd:()=>s,Tn:()=>i,t2:()=>a})},2360: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.Alias=void 0;var o=r(n(6698)),i=n(4500);function a(e,t){i.Facade.call(this,e,t)}t.Alias=a,o.default(a,i.Facade),a.prototype.action=function(){return"alias"},a.prototype.type=a.prototype.action,a.prototype.previousId=function(){return this.field("previousId")||this.field("from")},a.prototype.from=a.prototype.previousId,a.prototype.userId=function(){return this.field("userId")||this.field("to")},a.prototype.to=a.prototype.userId},2404:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},2428:(e,t,n)=>{var r=n(7534),o=n(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},2453:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var r=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:null}},2523:e=>{e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i"']/g,q=RegExp(H.source),X=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Oe="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="["+we+"]",Ae="["+Pe+"]",ke="["+xe+"]",Ie="\\d+",Re="["+Ee+"]",je="["+Oe+"]",Me="[^"+we+Pe+Ie+Ee+Oe+Se+"]",Ne="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Se+"]",Ue="\\u200d",ze="(?:"+je+"|"+Me+")",Ve="(?:"+Fe+"|"+Me+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ge="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+ke+"|"+Ne+")?",Ye="["+Te+"]?",qe=Ye+He+"(?:"+Ue+"(?:"+[De,Le,Be].join("|")+")"+Ye+He+")*",Xe="(?:"+[Re,Le,Be].join("|")+")"+qe,Ke="(?:"+[De+ke+"?",ke,Le,Be,Ce].join("|")+")",Ze=RegExp("['’]","g"),$e=RegExp(ke,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ke+qe,"g"),Je=RegExp([Fe+"?"+je+"+"+We+"(?="+[Ae,Fe,"$"].join("|")+")",Ve+"+"+Ge+"(?="+[Ae,Fe+ze,"$"].join("|")+")",Fe+"?"+ze+"+"+We,Fe+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Xe].join("|"),"g"),et=RegExp("["+Ue+we+xe+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[j]=ot[M]=ot[N]=ot[D]=ot[L]=ot[B]=ot[F]=ot[U]=ot[z]=!0,ot[v]=ot[g]=ot[I]=ot[y]=ot[R]=ot[m]=ot[b]=ot[_]=ot[x]=ot[E]=ot[O]=ot[T]=ot[P]=ot[C]=ot[k]=!1;var it={};it[v]=it[g]=it[I]=it[R]=it[y]=it[m]=it[j]=it[M]=it[N]=it[D]=it[L]=it[x]=it[E]=it[O]=it[T]=it[P]=it[C]=it[A]=it[B]=it[F]=it[U]=it[z]=!0,it[b]=it[_]=it[k]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ct||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,vt=pt&<.process,gt=function(){try{return dt&&dt.require&&dt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,mt=gt&>.isDate,bt=gt&>.isMap,_t=gt&>.isRegExp,wt=gt&>.isSet,xt=gt&>.isTypedArray;function Et(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ot(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function kt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function Jt(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var en=Gt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n",""":'"',"'":"'"}),pn=function e(t){var n,r=(t=null==t?ft:pn.defaults(ft.Object(),t,pn.pick(ft,nt))).Array,oe=t.Date,we=t.Error,xe=t.Function,Ee=t.Math,Oe=t.Object,Se=t.RegExp,Te=t.String,Pe=t.TypeError,Ce=r.prototype,Ae=xe.prototype,ke=Oe.prototype,Ie=t["__core-js_shared__"],Re=Ae.toString,je=ke.hasOwnProperty,Me=0,Ne=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=ke.toString,Le=Re.call(Oe),Be=ft._,Fe=Se("^"+Re.call(je).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=pt?t.Buffer:o,ze=t.Symbol,Ve=t.Uint8Array,We=Ue?Ue.allocUnsafe:o,Ge=an(Oe.getPrototypeOf,Oe),He=Oe.create,Ye=ke.propertyIsEnumerable,qe=Ce.splice,Xe=ze?ze.isConcatSpreadable:o,Ke=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=li(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,lt=oe&&oe.now!==ft.Date.now&&oe.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Ee.ceil,dt=Ee.floor,vt=Oe.getOwnPropertySymbols,gt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Gt=Ce.join,vn=an(Oe.keys,Oe),gn=Ee.max,yn=Ee.min,mn=oe.now,bn=t.parseInt,_n=Ee.random,wn=Ce.reverse,xn=li(t,"DataView"),En=li(t,"Map"),On=li(t,"Promise"),Sn=li(t,"Set"),Tn=li(t,"WeakMap"),Pn=li(Oe,"create"),Cn=Tn&&new Tn,An={},kn=Li(xn),In=Li(En),Rn=Li(On),jn=Li(Sn),Mn=Li(Tn),Nn=ze?ze.prototype:o,Dn=Nn?Nn.valueOf:o,Ln=Nn?Nn.toString:o;function Bn(e){if(es(e)&&!Wa(e)&&!(e instanceof Vn)){if(e instanceof zn)return e;if(je.call(e,"__wrapped__"))return Bi(e)}return new zn(e)}var Fn=function(){function e(){}return function(t){if(!Ja(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Un(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ar(e,t,n,r,i,a){var s,u=1&t,l=2&t,c=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!Ja(e))return e;var f=Wa(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Po(e,s)}else{var h=hi(e),d=h==_||h==w;if(qa(e))return wo(e,u);if(h==O||h==v||d&&!i){if(s=l||d?{}:pi(e),!u)return l?function(e,t){return Co(e,fi(e),t)}(e,function(e,t){return e&&Co(t,Is(t),e)}(s,e)):function(e,t){return Co(e,ci(e),t)}(e,nr(s,e))}else{if(!it[h])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case I:return xo(e);case y:case m:return new o(+e);case R:return function(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case j:case M:case N:case D:case L:case B:case F:case U:case z:return Eo(e,n);case x:return new o;case E:case C:return new o(e);case T:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new o;case A:return r=e,Dn?Oe(Dn.call(r)):{}}}(e,h,u)}}a||(a=new qn);var p=a.get(e);if(p)return p;a.set(e,s),is(e)?e.forEach(function(r){s.add(ar(r,t,n,r,e,a))}):ts(e)&&e.forEach(function(r,o){s.set(o,ar(r,t,n,o,e,a))});var g=f?o:(c?l?ni:ti:l?Is:ks)(e);return St(g||e,function(r,o){g&&(r=e[o=r]),Jn(s,o,ar(r,t,n,o,e,a))}),s}function sr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Oe(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Pe(i);return Ci(function(){e.apply(o,n)},t)}function lr(e,t,n,r){var o=-1,i=At,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=It(t,Kt(n))),r?(i=kt,a=!1):t.length>=200&&(i=$t,a=!1,t=new Yn(t));e:for(;++o-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(En||Gn),string:new Wn}},Hn.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return si(this,e).get(e)},Hn.prototype.has=function(e){return si(this,e).has(e)},Hn.prototype.set=function(e,t){var n=si(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,a),this},Yn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.clear=function(){this.__data__=new Gn,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var cr=Io(mr),fr=Io(br,!0);function hr(e,t){var n=!0;return cr(e,function(e,r,o){return n=!!t(e,r,o)}),n}function dr(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?vr(s,t-1,n,r,o):Rt(o,s):r||(o[o.length]=s)}return o}var gr=Ro(),yr=Ro(!0);function mr(e,t){return e&&gr(e,t,ks)}function br(e,t){return e&&yr(e,t,ks)}function _r(e,t){return Ct(t,function(t){return Za(e[t])})}function wr(e,t){for(var n=0,r=(t=yo(t,e)).length;null!=e&&nt}function Sr(e,t){return null!=e&&je.call(e,t)}function Tr(e,t){return null!=e&&t in Oe(e)}function Pr(e,t,n){for(var i=n?kt:At,a=e[0].length,s=e.length,u=s,l=r(s),c=1/0,f=[];u--;){var h=e[u];u&&t&&(h=It(h,Kt(t))),c=yn(h.length,c),l[u]=!n&&(t||a>=120&&h.length>=120)?new Yn(u&&h):o}h=e[0];var d=-1,p=l[0];e:for(;++d=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(o)}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&qe.call(s,u,1),qe.call(e,u,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;gi(o)?qe.call(e,o,1):uo(e,o)}}return e}function Hr(e,t){return e+dt(_n()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function qr(e,t){return Ai(Oi(e,t,nu),e+"")}function Xr(e){return Kn(Fs(e))}function Kr(e,t){var n=Fs(e);return Ri(n,ir(t,0,n.length))}function Zr(e,t,n,r){if(!Ja(e))return e;for(var i=-1,a=(t=yo(t,e)).length,s=a-1,u=e;null!=u&&++ii?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o>>1,a=e[i];null!==a&&!ss(a)&&(n?a<=t:a=200){var l=t?null:qo(e);if(l)return un(l);a=!1,o=$t,u=new Yn}else u=t?[]:s;e:for(;++r=r?e:eo(e,t,n)}var _o=at||function(e){return ft.clearTimeout(e)};function wo(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function xo(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Eo(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=ss(e),s=t!==o,u=null===t,l=t==t,c=ss(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&e1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&yi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Oe(t);++r-1?i[a?t[s]:s]:o}}function Lo(e){return ei(function(t){var n=t.length,r=n,a=zn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Pe(i);if(a&&!u&&"wrapper"==oi(s))var u=new zn([],!0)}for(r=u?r:n;++r1&&_.reverse(),d&&fu))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var h=-1,d=!0,p=2&n?new Yn:o;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return St(p,function(n){var r="_."+n[0];t&n[1]&&!At(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ii(e){var t=0,n=0;return function(){var r=mn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,oa(e,n)});function fa(e){var t=Bn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var da=ei(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&gi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new zn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)}),pa=Ao(function(e,t,n){je.call(e,n)?++e[n]:rr(e,n,1)}),va=Do(Vi),ga=Do(Wi);function ya(e,t){return(Wa(e)?St:cr)(e,ai(t,3))}function ma(e,t){return(Wa(e)?Tt:fr)(e,ai(t,3))}var ba=Ao(function(e,t,n){je.call(e,n)?e[n].push(t):rr(e,n,[t])}),_a=qr(function(e,t,n){var o=-1,i="function"==typeof t,a=Ha(e)?r(e.length):[];return cr(e,function(e){a[++o]=i?Et(t,e,n):Cr(e,t,n)}),a}),wa=Ao(function(e,t,n){rr(e,n,t)});function xa(e,t){return(Wa(e)?It:Dr)(e,ai(t,3))}var Ea=Ao(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Oa=qr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yi(e,t[0],t[1])?t=[]:n>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,vr(t,1),[])}),Sa=lt||function(){return ft.Date.now()};function Ta(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Ko(e,l,o,o,o,o,t)}function Pa(e,t){var n;if("function"!=typeof t)throw new Pe(i);return e=ds(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ca=qr(function(e,t,n){var r=1;if(n.length){var o=sn(n,ii(Ca));r|=u}return Ko(e,r,t,n,o)}),Aa=qr(function(e,t,n){var r=3;if(n.length){var o=sn(n,ii(Aa));r|=u}return Ko(t,r,e,n,o)});function ka(e,t,n){var r,a,s,u,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Pe(i);function v(t){var n=r,i=a;return r=a=o,f=t,u=e.apply(i,n)}function g(e){var n=e-c;return c===o||n>=t||n<0||d&&e-f>=s}function y(){var e=Sa();if(g(e))return m(e);l=Ci(y,function(e){var n=t-(e-c);return d?yn(n,s-(e-f)):n}(e))}function m(e){return l=o,p&&r?v(e):(r=a=o,u)}function b(){var e=Sa(),n=g(e);if(r=arguments,a=this,c=e,n){if(l===o)return function(e){return f=e,l=Ci(y,t),h?v(e):u}(c);if(d)return _o(l),l=Ci(y,t),v(c)}return l===o&&(l=Ci(y,t)),u}return t=vs(t)||0,Ja(n)&&(h=!!n.leading,s=(d="maxWait"in n)?gn(vs(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==o&&_o(l),f=0,r=c=a=l=o},b.flush=function(){return l===o?u:m(Sa())},b}var Ia=qr(function(e,t){return ur(e,1,t)}),Ra=qr(function(e,t,n){return ur(e,vs(t)||0,n)});function ja(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ja.Cache||Hn),n}function Ma(e){if("function"!=typeof e)throw new Pe(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ja.Cache=Hn;var Na=mo(function(e,t){var n=(t=1==t.length&&Wa(t[0])?It(t[0],Kt(ai())):It(vr(t,1),Kt(ai()))).length;return qr(function(r){for(var o=-1,i=yn(r.length,n);++o=t}),Va=Ar(function(){return arguments}())?Ar:function(e){return es(e)&&je.call(e,"callee")&&!Ye.call(e,"callee")},Wa=r.isArray,Ga=yt?Kt(yt):function(e){return es(e)&&Er(e)==I};function Ha(e){return null!=e&&Qa(e.length)&&!Za(e)}function Ya(e){return es(e)&&Ha(e)}var qa=gt||vu,Xa=mt?Kt(mt):function(e){return es(e)&&Er(e)==m};function Ka(e){if(!es(e))return!1;var t=Er(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Za(e){if(!Ja(e))return!1;var t=Er(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $a(e){return"number"==typeof e&&e==ds(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Ja(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Kt(bt):function(e){return es(e)&&hi(e)==x};function ns(e){return"number"==typeof e||es(e)&&Er(e)==E}function rs(e){if(!es(e)||Er(e)!=O)return!1;var t=Ge(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==Le}var os=_t?Kt(_t):function(e){return es(e)&&Er(e)==T},is=wt?Kt(wt):function(e){return es(e)&&hi(e)==P};function as(e){return"string"==typeof e||!Wa(e)&&es(e)&&Er(e)==C}function ss(e){return"symbol"==typeof e||es(e)&&Er(e)==A}var us=xt?Kt(xt):function(e){return es(e)&&Qa(e.length)&&!!ot[Er(e)]},ls=Go(Nr),cs=Go(function(e,t){return e<=t});function fs(e){if(!e)return[];if(Ha(e))return as(e)?fn(e):Po(e);if(Ke&&e[Ke])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ke]());var t=hi(e);return(t==x?on:t==P?un:Fs)(e)}function hs(e){return e?(e=vs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ds(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?ir(ds(e),0,d):0}function vs(e){if("number"==typeof e)return e;if(ss(e))return h;if(Ja(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ja(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=pe.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function gs(e){return Co(e,Is(e))}function ys(e){return null==e?"":ao(e)}var ms=ko(function(e,t){if(wi(t)||Ha(t))Co(t,ks(t),e);else for(var n in t)je.call(t,n)&&Jn(e,n,t[n])}),bs=ko(function(e,t){Co(t,Is(t),e)}),_s=ko(function(e,t,n,r){Co(t,Is(t),e,r)}),ws=ko(function(e,t,n,r){Co(t,ks(t),e,r)}),xs=ei(or),Es=qr(function(e,t){e=Oe(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(r=1);++n1),t}),Co(e,ni(e),n),r&&(n=ar(n,7,Qo));for(var o=t.length;o--;)uo(n,t[o]);return n}),Ns=ei(function(e,t){return null==e?{}:function(e,t){return Vr(e,t,function(t,n){return Ts(e,n)})}(e,t)});function Ds(e,t){if(null==e)return{};var n=It(ni(e),function(e){return[e]});return t=ai(t),Vr(e,n,function(e,n){return t(e,n[0])})}var Ls=Xo(ks),Bs=Xo(Is);function Fs(e){return null==e?[]:Zt(e,ks(e))}var Us=Mo(function(e,t,n){return t=t.toLowerCase(),e+(n?zs(t):t)});function zs(e){return Ks(ys(e).toLowerCase())}function Vs(e){return(e=ys(e))&&e.replace(me,en).replace($e,"")}var Ws=Mo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Gs=Mo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Hs=jo("toLowerCase"),Ys=Mo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),qs=Mo(function(e,t,n){return e+(n?" ":"")+Ks(t)}),Xs=Mo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=jo("toUpperCase");function Zs(e,t,n){return e=ys(e),(t=n?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var $s=qr(function(e,t){try{return Et(e,o,t)}catch(e){return Ka(e)?e:new we(e)}}),Qs=ei(function(e,t){return St(t,function(t){t=Di(t),rr(e,t,Ca(e[t],e))}),e});function Js(e){return function(){return e}}var eu=Lo(),tu=Lo(!0);function nu(e){return e}function ru(e){return jr("function"==typeof e?e:ar(e,1))}var ou=qr(function(e,t){return function(n){return Cr(n,e,t)}}),iu=qr(function(e,t){return function(n){return Cr(e,n,t)}});function au(e,t,n){var r=ks(t),o=_r(t,r);null!=n||Ja(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=_r(t,ks(t)));var i=!(Ja(n)&&"chain"in n&&!n.chain),a=Za(e);return St(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Po(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Rt([this.value()],arguments))})}),e}function su(){}var uu=zo(It),lu=zo(Pt),cu=zo(Nt);function fu(e){return mi(e)?Wt(Di(e)):function(e){return function(t){return wr(t,e)}}(e)}var hu=Wo(),du=Wo(!0);function pu(){return[]}function vu(){return!1}var gu,yu=Uo(function(e,t){return e+t},0),mu=Yo("ceil"),bu=Uo(function(e,t){return e/t},1),_u=Yo("floor"),wu=Uo(function(e,t){return e*t},1),xu=Yo("round"),Eu=Uo(function(e,t){return e-t},0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Pe(i);return e=ds(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Ta,Bn.assign=ms,Bn.assignIn=bs,Bn.assignInWith=_s,Bn.assignWith=ws,Bn.at=xs,Bn.before=Pa,Bn.bind=Ca,Bn.bindAll=Qs,Bn.bindKey=Aa,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Bn.chain=fa,Bn.chunk=function(e,t,n){t=(n?yi(e,t,n):t===o)?1:gn(ds(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(ht(i/t));ai?0:i+n),(r=r===o||r>i?i:ds(r))<0&&(r+=i),r=n>r?0:ps(r);n>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&rn(e)?bo(fn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Pe(i);return t=null==t?0:gn(ds(t),0),qr(function(n){var r=n[t],o=bo(n,0,t);return r&&Rt(o,r),Et(e,this,o)})},Bn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:ds(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=r-(t=n||t===o?1:ds(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?co(e,ai(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?co(e,ai(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Pe(i);return Ja(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ka(e,t,{leading:r,maxWait:t,trailing:o})},Bn.thru=ha,Bn.toArray=fs,Bn.toPairs=Ls,Bn.toPairsIn=Bs,Bn.toPath=function(e){return Wa(e)?It(e,Di):ss(e)?[e]:Po(Ni(ys(e)))},Bn.toPlainObject=gs,Bn.transform=function(e,t,n){var r=Wa(e),o=r||qa(e)||us(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ja(e)&&Za(i)?Fn(Ge(e)):{}}return(o?St:mr)(e,function(e,r,o){return t(n,e,r,o)}),n},Bn.unary=function(e){return Ta(e,1)},Bn.union=ea,Bn.unionBy=ta,Bn.unionWith=na,Bn.uniq=function(e){return e&&e.length?so(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?so(e,ai(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},Bn.unset=function(e,t){return null==e||uo(e,t)},Bn.unzip=ra,Bn.unzipWith=oa,Bn.update=function(e,t,n){return null==e?e:lo(e,t,go(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:lo(e,t,go(n),r)},Bn.values=Fs,Bn.valuesIn=function(e){return null==e?[]:Zt(e,Is(e))},Bn.without=ia,Bn.words=Zs,Bn.wrap=function(e,t){return Da(go(t),e)},Bn.xor=aa,Bn.xorBy=sa,Bn.xorWith=ua,Bn.zip=la,Bn.zipObject=function(e,t){return po(e||[],t||[],Jn)},Bn.zipObjectDeep=function(e,t){return po(e||[],t||[],Zr)},Bn.zipWith=ca,Bn.entries=Ls,Bn.entriesIn=Bs,Bn.extend=bs,Bn.extendWith=_s,au(Bn,Bn),Bn.add=yu,Bn.attempt=$s,Bn.camelCase=Us,Bn.capitalize=zs,Bn.ceil=mu,Bn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=vs(n))==n?n:0),t!==o&&(t=(t=vs(t))==t?t:0),ir(vs(e),t,n)},Bn.clone=function(e){return ar(e,4)},Bn.cloneDeep=function(e){return ar(e,5)},Bn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},Bn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},Bn.conformsTo=function(e,t){return null==t||sr(e,t,ks(t))},Bn.deburr=Vs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=bu,Bn.endsWith=function(e,t,n){e=ys(e),t=ao(t);var r=e.length,i=n=n===o?r:ir(ds(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Bn.eq=Fa,Bn.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(Y,tn):e},Bn.escapeRegExp=function(e){return(e=ys(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Bn.every=function(e,t,n){var r=Wa(e)?Pt:hr;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},Bn.find=va,Bn.findIndex=Vi,Bn.findKey=function(e,t){return Lt(e,ai(t,3),mr)},Bn.findLast=ga,Bn.findLastIndex=Wi,Bn.findLastKey=function(e,t){return Lt(e,ai(t,3),br)},Bn.floor=_u,Bn.forEach=ya,Bn.forEachRight=ma,Bn.forIn=function(e,t){return null==e?e:gr(e,ai(t,3),Is)},Bn.forInRight=function(e,t){return null==e?e:yr(e,ai(t,3),Is)},Bn.forOwn=function(e,t){return e&&mr(e,ai(t,3))},Bn.forOwnRight=function(e,t){return e&&br(e,ai(t,3))},Bn.get=Ss,Bn.gt=Ua,Bn.gte=za,Bn.has=function(e,t){return null!=e&&di(e,t,Sr)},Bn.hasIn=Ts,Bn.head=Hi,Bn.identity=nu,Bn.includes=function(e,t,n,r){e=Ha(e)?e:Fs(e),n=n&&!r?ds(n):0;var o=e.length;return n<0&&(n=gn(o+n,0)),as(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ft(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ds(n);return o<0&&(o=gn(r+o,0)),Ft(e,t,o)},Bn.inRange=function(e,t,n){return t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n){return e>=yn(t,n)&&e=-9007199254740991&&e<=f},Bn.isSet=is,Bn.isString=as,Bn.isSymbol=ss,Bn.isTypedArray=us,Bn.isUndefined=function(e){return e===o},Bn.isWeakMap=function(e){return es(e)&&hi(e)==k},Bn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Er(e)},Bn.join=function(e,t){return null==e?"":Gt.call(e,t)},Bn.kebabCase=Ws,Bn.last=Ki,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ds(n))<0?gn(r+i,0):yn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Bt(e,zt,i,!0)},Bn.lowerCase=Gs,Bn.lowerFirst=Hs,Bn.lt=ls,Bn.lte=cs,Bn.max=function(e){return e&&e.length?dr(e,nu,Or):o},Bn.maxBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Or):o},Bn.mean=function(e){return Vt(e,nu)},Bn.meanBy=function(e,t){return Vt(e,ai(t,2))},Bn.min=function(e){return e&&e.length?dr(e,nu,Nr):o},Bn.minBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Nr):o},Bn.stubArray=pu,Bn.stubFalse=vu,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=wu,Bn.nth=function(e,t){return e&&e.length?Ur(e,ds(t)):o},Bn.noConflict=function(){return ft._===this&&(ft._=Be),this},Bn.noop=su,Bn.now=Sa,Bn.pad=function(e,t,n){e=ys(e);var r=(t=ds(t))?cn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(dt(o),n)+e+Vo(ht(o),n)},Bn.padEnd=function(e,t,n){e=ys(e);var r=(t=ds(t))?cn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=_n();return yn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Hr(e,t)},Bn.reduce=function(e,t,n){var r=Wa(e)?jt:Ht,o=arguments.length<3;return r(e,ai(t,4),n,o,cr)},Bn.reduceRight=function(e,t,n){var r=Wa(e)?Mt:Ht,o=arguments.length<3;return r(e,ai(t,4),n,o,fr)},Bn.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:ds(t),Yr(ys(e),t)},Bn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++rf)return[];var n=d,r=yn(e,d);t=ai(t),e-=d;for(var o=qt(r,t);++n=a)return e;var u=n-cn(r);if(u<1)return r;var l=s?bo(s,0,u).join(""):e.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),os(i)){if(e.slice(u).search(i)){var c,f=l;for(i.global||(i=Se(i.source,ys(he.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(e.indexOf(ao(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Bn.unescape=function(e){return(e=ys(e))&&q.test(e)?e.replace(H,dn):e},Bn.uniqueId=function(e){var t=++Me;return ys(e)+t},Bn.upperCase=Xs,Bn.upperFirst=Ks,Bn.each=ya,Bn.eachRight=ma,Bn.first=Hi,au(Bn,(gu={},mr(Bn,function(e,t){je.call(Bn.prototype,t)||(gu[t]=e)}),gu),{chain:!1}),Bn.VERSION="4.17.21",St(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bn[e].placeholder=Bn}),St(["drop","take"],function(e,t){Vn.prototype[e]=function(n){n=n===o?1:gn(ds(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),St(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),St(["head","last"],function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}}),St(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}}),Vn.prototype.compact=function(){return this.filter(nu)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=qr(function(e,t){return"function"==typeof e?new Vn(this):this.map(function(n){return Cr(n,e,t)})}),Vn.prototype.reject=function(e){return this.filter(Ma(ai(e)))},Vn.prototype.slice=function(e,t){e=ds(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=ds(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(d)},mr(Vn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Bn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Vn,l=s[0],c=u||Wa(t),f=function(e){var t=i.apply(Bn,Rt([e],s));return r&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=u&&!d;if(!a&&c){t=v?t:new Vn(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[f],thisArg:o}),new zn(g,h)}return p&&v?e.apply(this,s):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})}),St(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Wa(o)?o:[],e)}return this[n](function(n){return t.apply(Wa(n)?n:[],e)})}}),mr(Vn.prototype,function(e,t){var n=Bn[t];if(n){var r=n.name+"";je.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}}),An[Bo(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Un;){var r=Bi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Ji],thisArg:o}),new zn(t,this.__chain__)}return this.thru(Ji)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Ke&&(Bn.prototype[Ke]=function(){return this}),Bn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},2552:(e,t,n)=>{var r=n(1873),o=n(659),i=n(9350),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},2572: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(6041));function i(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return o.default(n,"address."+e)||o.default(n,e)||(t?o.default(n,"address."+t):null)||(t?o.default(n,t):null)||o.default(r,"address."+e)||o.default(r,e)||(t?o.default(r,"address."+t):null)||(t?o.default(r,t):null)}}t.default=function(e){e.zip=i("postalCode","zip"),e.country=i("country"),e.street=i("street"),e.state=i("state"),e.city=i("city"),e.region=i("region")}},2613:(e,t,n)=>{"use strict";n.d(t,{_:()=>o});var r=n(1635),o=function(e,t){return(0,r.sH)(void 0,void 0,void 0,function(){var n;return(0,r.YH)(this,function(o){return n=function(o){return(0,r.sH)(void 0,void 0,void 0,function(){var i;return(0,r.YH)(this,function(r){switch(r.label){case 0:return e(o)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[r.sent()])];case 2:return[2]}})})},[2,n(void 0)]})})}},2629:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,4)}},2651:(e,t,n)=>{var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},2749:(e,t,n)=>{var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},2804:(e,t,n)=>{var r=n(6110)(n(9325),"Promise");e.exports=r},2856:(e,t,n)=>{"use strict";var r=n(2543),o=n(8362).Graph,i=n(3382).slack;function a(e,t){return r.forEach(e.nodes(),function n(o){r.forEach(t.nodeEdges(o),function(r){var a=r.v,s=o===a?r.w:a;e.hasNode(s)||i(t,r)||(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))})}),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)})}function u(e,t,n){r.forEach(e.nodes(),function(e){t.node(e).rank+=n})}e.exports=function(e){var t,n,r=new o({directed:!1}),l=e.nodes()[0],c=e.nodeCount();for(r.setNode(l,{});a(r,e){var r=n(9570),o=n(1811)(r);e.exports=o},2903:(e,t,n)=>{var r=n(3805),o=n(5527),i=n(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},2949:(e,t,n)=>{var r=n(2651);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},3007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(1549),o=n(79),i=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},3120:(e,t,n)=>{var r=n(4528),o=n(5891);e.exports=function e(t,n,i,a,s){var u=-1,l=t.length;for(i||(i=o),s||(s=[]);++u0&&i(c)?n>1?e(c,n-1,i,a,s):r(s,c):a||(s[s.length]=c)}return s}},3143:function(e){var t;t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r},function(e,t,n){"use strict";var r=n(2),o=n(8),i=n(9);function a(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[s];a.prototype.getSource=function(){return this.source},a.prototype.getTarget=function(){return this.target},a.prototype.isInterGraph=function(){return this.isInterGraph},a.prototype.getLength=function(){return this.length},a.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},a.prototype.getBendpoints=function(){return this.bendpoints},a.prototype.getLca=function(){return this.lca},a.prototype.getSourceInLca=function(){return this.sourceInLca},a.prototype.getTargetInLca=function(){return this.targetInLca},a.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},a.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},a.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},a.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=a},function(e,t,n){"use strict";e.exports=function(e){this.vGraphObject=e}},function(e,t,n){"use strict";var r=n(2),o=n(10),i=n(13),a=n(0),s=n(16),u=n(4);function l(e,t,n,a){null==n&&null==a&&(a=t),r.call(this,a),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=a,this.edges=[],this.graphManager=e,this.rect=null!=n&&null!=t?new i(t.x,t.y,n.width,n.height):new i}for(var c in l.prototype=Object.create(r.prototype),r)l[c]=r[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw"Incorrect edge source!";t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=e&&r.source!=e||t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw"Incorrect incidency!";e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),n=0;nt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>a.WORLD_BOUNDARY?t=a.WORLD_BOUNDARY:t<-a.WORLD_BOUNDARY&&(t=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var r=new u(t,n),o=e.inverseTransformPoint(r);this.setLocation(o.x,o.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=l},function(e,t,n){"use strict";function r(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r},function(e,t,n){"use strict";var r=n(2),o=n(10),i=n(0),a=n(6),s=n(3),u=n(1),l=n(13),c=n(12),f=n(11);function h(e,t,n){r.call(this,n),this.estimatedSize=o.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof a?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var d in h.prototype=Object.create(r.prototype),r)h[d]=r[d];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(e,t,n){if(null==t&&null==n){var r=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var o=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(t.owner!=n.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=n.owner?null:(o.source=t,o.target=n,o.isInterGraph=!1,this.getEdges().push(o),t.edges.push(o),n!=t&&n.edges.push(o),o)},h.prototype.remove=function(e){var t=e;if(e instanceof s){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=t.edges.slice(),r=n.length,o=0;o-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(i.source.edges.splice(l,1),i.target!=i.source&&i.target.edges.splice(c,1),-1==(a=i.source.owner.getEdges().indexOf(i)))throw"Not in owner's edge list!";i.source.owner.getEdges().splice(a,1)}},h.prototype.updateLeftTop=function(){for(var e,t,n,r=o.MAX_VALUE,i=o.MAX_VALUE,a=this.getNodes(),s=a.length,u=0;u(e=l.getTop())&&(r=e),i>(t=l.getLeft())&&(i=t)}return r==o.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=i-n,this.top=r-n,new c(this.left,this.top))},h.prototype.updateBounds=function(e){for(var t,n,r,i,a,s=o.MAX_VALUE,u=-o.MAX_VALUE,c=o.MAX_VALUE,f=-o.MAX_VALUE,h=this.nodes,d=h.length,p=0;p(t=v.getLeft())&&(s=t),u<(n=v.getRight())&&(u=n),c>(r=v.getTop())&&(c=r),f<(i=v.getBottom())&&(f=i)}var g=new l(s,c,u-s,f-c);s==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=h[0].getParent().paddingLeft?h[0].getParent().paddingLeft:this.margin,this.left=g.x-a,this.right=g.x+g.width+a,this.top=g.y-a,this.bottom=g.y+g.height+a},h.calculateBounds=function(e){for(var t,n,r,i,a=o.MAX_VALUE,s=-o.MAX_VALUE,u=o.MAX_VALUE,c=-o.MAX_VALUE,f=e.length,h=0;h(t=d.getLeft())&&(a=t),s<(n=d.getRight())&&(s=n),u>(r=d.getTop())&&(u=r),c<(i=d.getBottom())&&(c=i)}return new l(a,u,s-a,c-u)},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r=this.nodes.length){var u=0;o.forEach(function(t){t.owner==e&&u++}),u==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},e.exports=h},function(e,t,n){"use strict";var r,o=n(1);function i(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},i.prototype.add=function(e,t,n,r,o){if(null==n&&null==r&&null==o){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return e.parent=t,t.child=e,e}o=n,n=e;var i=(r=t).getOwner(),a=o.getOwner();if(null==i||i.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(i==a)return n.isInterGraph=!1,i.add(n,r,o);if(n.isInterGraph=!0,n.source=r,n.target=o,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},i.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var n,i=[],a=(i=i.concat(t.getEdges())).length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var i=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(i=1);var a=i*n[0],s=n[1]/i;n[0]a)return n[0]=r,n[1]=u,n[2]=i,n[3]=b,!1;if(oi)return n[0]=s,n[1]=o,n[2]=y,n[3]=a,!1;if(ri?(n[0]=c,n[1]=f,E=!0):(n[0]=l,n[1]=u,E=!0):S===P&&(r>i?(n[0]=s,n[1]=u,E=!0):(n[0]=h,n[1]=f,E=!0)),-T===P?i>r?(n[2]=m,n[3]=b,O=!0):(n[2]=y,n[3]=g,O=!0):T===P&&(i>r?(n[2]=v,n[3]=g,O=!0):(n[2]=_,n[3]=b,O=!0)),E&&O)return!1;if(r>i?o>a?(C=this.getCardinalDirection(S,P,4),A=this.getCardinalDirection(T,P,2)):(C=this.getCardinalDirection(-S,P,3),A=this.getCardinalDirection(-T,P,1)):o>a?(C=this.getCardinalDirection(-S,P,1),A=this.getCardinalDirection(-T,P,3)):(C=this.getCardinalDirection(S,P,2),A=this.getCardinalDirection(T,P,4)),!E)switch(C){case 1:I=u,k=r+-p/P,n[0]=k,n[1]=I;break;case 2:k=h,I=o+d*P,n[0]=k,n[1]=I;break;case 3:I=f,k=r+p/P,n[0]=k,n[1]=I;break;case 4:k=c,I=o+-d*P,n[0]=k,n[1]=I}if(!O)switch(A){case 1:j=g,R=i+-x/P,n[2]=R,n[3]=j;break;case 2:R=_,j=a+w*P,n[2]=R,n[3]=j;break;case 3:j=b,R=i+x/P,n[2]=R,n[3]=j;break;case 4:R=m,j=a+-w*P,n[2]=R,n[3]=j}}return!1},o.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},o.getIntersection=function(e,t,n,o){if(null==o)return this.getIntersection2(e,t,n);var i,a,s,u,l,c,f,h=e.x,d=e.y,p=t.x,v=t.y,g=n.x,y=n.y,m=o.x,b=o.y;return 0===(f=(i=v-d)*(u=g-m)-(a=b-y)*(s=h-p))?null:new r((s*(c=m*y-g*b)-u*(l=p*d-h*v))/f,(a*l-i*c)/f)},o.angleOfVector=function(e,t,n,r){var o=void 0;return e!==n?(o=Math.atan((r-t)/(n-e)),n0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r},function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var c=s[0];s.splice(0,1),a.add(c);var f=c.getEdges();for(i=0;i-1&&l.splice(v,1)}a=new Set,u=new Map}else e=[]}return e},h.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),o=0;o0){for(var o=this.edgeToDummyNodes.get(n),i=0;i=0&&t.splice(f,1),c.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;1==t&&u.push(e),r.set(e,t)}})}n=n.concat(u),1!=t.length&&2!=t.length||(o=!0,i=t[0])}return i},h.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=h},function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},e.exports=r},function(e,t,n){"use strict";var r=n(4);function o(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(e){this.lworldExtX=e},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(e){this.lworldExtY=e},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},o.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return 0!=n&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},o.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return 0!=n&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},o.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return 0!=n&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},o.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return 0!=n&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},o.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=o},function(e,t,n){"use strict";var r=n(15),o=n(7),i=n(0),a=n(8),s=n(9);function u(){r.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.springConstant=o.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=o.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}for(var l in u.prototype=Object.create(r.prototype),r)u[l]=r[l];u.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,a,s,u=this.getGraphManager().getAllEdges(),l=0;lo.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(e-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),i=new Set,e=0;e(u=t.getEstimatedSize()*this.gravityRangeFactor)||s>u)&&(e.gravitationForceX=-this.gravityConstant*o,e.gravitationForceY=-this.gravityConstant*i):(a>(u=t.getEstimatedSize()*this.compoundGravityRangeFactor)||s>u)&&(e.gravitationForceX=-this.gravityConstant*o*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*i*this.compoundGravityConstant)},u.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=s.length||l>=s[0].length))for(var c=0;ce}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=o,this.gap_penalty=i,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var a=0;a=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},o.emit=function(e,t){for(var n=0;n{"use strict";function r(e,t,n){t.split&&(t=t.split("."));for(var r,o,i=0,a=t.length,s=e;ir})},3201:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},3221:e=>{e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}},3222:(e,t,n)=>{var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},3243:(e,t,n)=>{var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3290:(e,t,n)=>{e=n.nmd(e);var r=n(9325),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},3335: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.Group=void 0;var o=r(n(6698)),i=r(n(6659)),a=r(n(5316)),s=n(4500);function u(e,t){s.Facade.call(this,e,t)}t.Group=u,o.default(u,s.Facade);var l=u.prototype;l.action=function(){return"group"},l.type=l.action,l.groupId=s.Facade.field("groupId"),l.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return a.default(e)},l.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return i.default(t)?t:void 0},l.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=null==this[r]?this.proxy("traits."+r):this[r]();if(null==o)continue;t[e[r]]=o,delete t[r]}return t},l.name=s.Facade.proxy("traits.name"),l.industry=s.Facade.proxy("traits.industry"),l.employees=s.Facade.proxy("traits.employees"),l.properties=function(){return this.field("traits")||this.field("properties")||{}}},3345:e=>{e.exports=function(){return[]}},3349:(e,t,n)=>{var r=n(2199),o=n(6375),i=n(7241);e.exports=function(e){return r(e,i,o)}},3353:e=>{e.exports="0.8.14"},3357:(e,t,n)=>{"use strict";function r(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find(function(t){return t.src===e})}function o(e,t){var n=r(e);if(void 0!==n){var o=null==n?void 0:n.getAttribute("status");if("loaded"===o)return Promise.resolve(n);if("loading"===o)return new Promise(function(e,t){n.addEventListener("load",function(){return e(n)}),n.addEventListener("error",function(e){return t(e)})})}return new Promise(function(n,r){var o,i=window.document.createElement("script");i.type="text/javascript",i.src=e,i.async=!0,i.setAttribute("status","loading");for(var a=0,s=Object.entries(null!=t?t:{});ai,k:()=>o})},3360:(e,t,n)=>{var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3382:(e,t,n)=>{"use strict";var r=n(2543);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),function n(o){var i=e.node(o);if(r.has(t,o))return i.rank;t[o]=!0;var a=r.min(r.map(e.outEdges(o),function(t){return n(t.w)-e.edge(t).minlen}));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},3457:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).layoutBase.LayoutConstants,o=n(0).layoutBase.FDLayoutConstants,i=n(0).CoSEConstants,a=n(0).CoSELayout,s=n(0).CoSENode,u=n(0).layoutBase.PointD,l=n(0).layoutBase.DimensionD,c={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function f(e){this.options=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}(c,e),h(this.options)}var h=function(e){null!=e.nodeRepulsion&&(i.DEFAULT_REPULSION_STRENGTH=o.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),null!=e.idealEdgeLength&&(i.DEFAULT_EDGE_LENGTH=o.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),null!=e.edgeElasticity&&(i.DEFAULT_SPRING_STRENGTH=o.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),null!=e.nestingFactor&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(i.DEFAULT_GRAVITY_STRENGTH=o.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(i.MAX_ITERATIONS=o.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=o.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),"draft"==e.quality?r.QUALITY=0:"proof"==e.quality?r.QUALITY=2:r.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,i.ANIMATE=o.ANIMATE=r.ANIMATE=e.animate,i.TILE=e.tile,i.TILING_PADDING_VERTICAL="function"==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL="function"==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};f.prototype.run=function(){var e,t,n=this.options,r=(this.idToLNode={},this.layout=new a),o=this;o.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var i=r.newGraphManager();this.gm=i;var s=this.options.eles.nodes(),u=this.options.eles.edges();this.root=i.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var l=0;l0&&(a=n.getGraphManager().add(n.newGraph(),i),this.processChildrenList(a,f,n))}},f.prototype.stop=function(){return this.stopped=!0,this};var d=function(e){e("layout","cose-bilkent",f)};"undefined"!=typeof cytoscape&&d(cytoscape),e.exports=d}])},e.exports=r(n(7799))},3467:function(e,t){!function(e){"use strict";const t=134217729;function n(e,t,n,r,o){let i,a,s,u,l=t[0],c=r[0],f=0,h=0;c>l==c>-l?(i=l,l=t[++f]):(i=c,c=r[++h]);let d=0;if(fl==c>-l?(s=i-((a=l+i)-l),l=t[++f]):(s=i-((a=c+i)-c),c=r[++h]),i=a,0!==s&&(o[d++]=s);fl==c>-l?(s=i-((a=i+l)-(u=a-i))+(l-u),l=t[++f]):(s=i-((a=i+c)-(u=a-i))+(c-u),c=r[++h]),i=a,0!==s&&(o[d++]=s);for(;f0!=p>0)return v;const g=Math.abs(d+p);return Math.abs(v)>=33306690738754716e-32*g?v:-function(e,r,l,c,f,h,d){let p,v,g,y,m,b,_,w,x,E,O,S,T,P,C,A,k,I;const R=e-f,j=l-f,M=r-h,N=c-h;m=(C=(w=R-(_=(b=t*R)-(b-R)))*(E=N-(x=(b=t*N)-(b-N)))-((P=R*N)-_*x-w*x-_*E))-(O=C-(k=(w=M-(_=(b=t*M)-(b-M)))*(E=j-(x=(b=t*j)-(b-j)))-((A=M*j)-_*x-w*x-_*E))),o[0]=C-(O+m)+(m-k),m=(T=P-((S=P+O)-(m=S-P))+(O-m))-(O=T-A),o[1]=T-(O+m)+(m-A),m=(I=S+O)-S,o[2]=S-(I-m)+(O-m),o[3]=I;let D=function(e,t){let n=t[0];for(let e=1;e<4;e++)n+=t[e];return n}(0,o),L=22204460492503146e-32*d;if(D>=L||-D>=L)return D;if(p=e-(R+(m=e-R))+(m-f),g=l-(j+(m=l-j))+(m-f),v=r-(M+(m=r-M))+(m-h),y=c-(N+(m=c-N))+(m-h),0===p&&0===v&&0===g&&0===y)return D;if(L=11093356479670487e-47*d+33306690738754706e-32*Math.abs(D),(D+=R*y+N*p-(M*g+j*v))>=L||-D>=L)return D;m=(C=(w=p-(_=(b=t*p)-(b-p)))*(E=N-(x=(b=t*N)-(b-N)))-((P=p*N)-_*x-w*x-_*E))-(O=C-(k=(w=v-(_=(b=t*v)-(b-v)))*(E=j-(x=(b=t*j)-(b-j)))-((A=v*j)-_*x-w*x-_*E))),u[0]=C-(O+m)+(m-k),m=(T=P-((S=P+O)-(m=S-P))+(O-m))-(O=T-A),u[1]=T-(O+m)+(m-A),m=(I=S+O)-S,u[2]=S-(I-m)+(O-m),u[3]=I;const B=n(4,o,4,u,i);m=(C=(w=R-(_=(b=t*R)-(b-R)))*(E=y-(x=(b=t*y)-(b-y)))-((P=R*y)-_*x-w*x-_*E))-(O=C-(k=(w=M-(_=(b=t*M)-(b-M)))*(E=g-(x=(b=t*g)-(b-g)))-((A=M*g)-_*x-w*x-_*E))),u[0]=C-(O+m)+(m-k),m=(T=P-((S=P+O)-(m=S-P))+(O-m))-(O=T-A),u[1]=T-(O+m)+(m-A),m=(I=S+O)-S,u[2]=S-(I-m)+(O-m),u[3]=I;const F=n(B,i,4,u,a);m=(C=(w=p-(_=(b=t*p)-(b-p)))*(E=y-(x=(b=t*y)-(b-y)))-((P=p*y)-_*x-w*x-_*E))-(O=C-(k=(w=v-(_=(b=t*v)-(b-v)))*(E=g-(x=(b=t*g)-(b-g)))-((A=v*g)-_*x-w*x-_*E))),u[0]=C-(O+m)+(m-k),m=(T=P-((S=P+O)-(m=S-P))+(O-m))-(O=T-A),u[1]=T-(O+m)+(m-A),m=(I=S+O)-S,u[2]=S-(I-m)+(O-m),u[3]=I;const U=n(F,a,4,u,s);return s[U-1]}(e,r,l,c,f,h,g)},e.orient2dfast=function(e,t,n,r,o,i){return(t-i)*(n-o)-(e-o)*(r-i)},Object.defineProperty(e,"__esModule",{value:!0})}(t)},3488:e=>{e.exports=function(e){return e}},3508:(e,t,n)=>{"use strict";var r=n(3382).longestPath,o=n(2856),i=n(1581);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){i(e)}(e);break;case"tight-tree":!function(e){r(e),o(e)}(e);break;case"longest-path":a(e)}};var a=r},3585:(e,t,n)=>{var r=n(2543);e.exports=function(e,t){return r.map(t,function(t){var n=e.inEdges(t);if(n.length){var o=r.reduce(n,function(t,n){var r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}})}},3590:(e,t,n)=>{var r=n(117);e.exports=function(e,t,n){return function(e,t,n){var r={},o=e.nodes();return o.forEach(function(e){r[e]={},r[e][e]={distance:0},o.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}})}),o.forEach(function(e){var t=r[e];o.forEach(function(n){var i=r[n];o.forEach(function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s{e.exports=function(e){return this.__data__.get(e)}},3619:(e,t,n)=>{var r=n(117);e.exports=function(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),function(e){t=[],i(e),t.length&&o.push(t)}),o}},3650:(e,t,n)=>{var r=n(4335)(Object.keys,Object);e.exports=r},3656:(e,t,n)=>{e=n.nmd(e);var r=n(9325),o=n(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;e.exports=u},3661:(e,t,n)=>{var r=n(3040),o=n(7670),i=n(289),a=n(4509),s=n(2949);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(1799),o=n(776),i=n(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},3693:(e,t,n)=>{var r=n(4894),o=n(346);e.exports=function(e){return o(e)&&r(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3729:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(1873),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3838:(e,t,n)=>{var r=n(1791),o=n(7241);e.exports=function(e,t){return e&&r(t,o(t),e)}},3841:e=>{e.exports=function(e,t,n,r){var o=e[0],i=e[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=t.length);for(var s=(r-n)/2,u=0,l=s-1;ui!=d>i&&o<(h-c)*(i-f)/(d-f)+c&&(a=!a)}return a}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},3863: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.Track=void 0;var o=r(n(6698)),i=n(4500),a=n(7538),s=r(n(6659)),u=r(n(6041));function l(e,t){i.Facade.call(this,e,t)}t.Track=l,o.default(l,i.Facade);var c=l.prototype;c.action=function(){return"track"},c.type=c.action,c.event=i.Facade.field("event"),c.value=i.Facade.proxy("properties.value"),c.category=i.Facade.proxy("properties.category"),c.id=i.Facade.proxy("properties.id"),c.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},c.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},c.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},c.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},c.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},c.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},c.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},c.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},c.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},c.sku=i.Facade.proxy("properties.sku"),c.tax=i.Facade.proxy("properties.tax"),c.name=i.Facade.proxy("properties.name"),c.price=i.Facade.proxy("properties.price"),c.total=i.Facade.proxy("properties.total"),c.repeat=i.Facade.proxy("properties.repeat"),c.coupon=i.Facade.proxy("properties.coupon"),c.shipping=i.Facade.proxy("properties.shipping"),c.discount=i.Facade.proxy("properties.discount"),c.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},c.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},c.description=i.Facade.proxy("properties.description"),c.plan=i.Facade.proxy("properties.plan"),c.subtotal=function(){var e=u.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},c.products=function(){var e=this.properties(),t=u.default(e,"products");return Array.isArray(t)?t.filter(function(e){return null!==e}):[]},c.quantity=function(){return(this.obj.properties||{}).quantity||1},c.currency=function(){return(this.obj.properties||{}).currency||"USD"},c.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},c.query=i.Facade.proxy("options.query"),c.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},c.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},c.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return s.default(t)?t:void 0},c.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(e){if("number"==typeof e)return e;if("string"==typeof e)return e=e.replace(/\$/g,""),e=parseFloat(e),isNaN(e)?void 0:e}}(e)},c.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},c.identify=function(){var e=this.json();return e.traits=this.traits(),new a.Identify(e,this.opts)}},3950:e=>{e.exports=function(){}},4066:(e,t,n)=>{var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},4190:(e,t,n)=>{"use strict";var r=n(2543),o=n(8362).Graph,i=n(6718);function a(e,t){var n={};return r.reduce(t,function(t,o){var i=0,a=0,s=t.length,l=r.last(o);return r.forEach(o,function(t,c){var f=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),function(t){return e.node(t).dummy})}(e,t),h=f?e.node(f).order:s;(f||t===l)&&(r.forEach(o.slice(a,c+1),function(t){r.forEach(e.predecessors(t),function(r){var o=e.node(r),a=o.order;!(a1e3)return n;function o(t,o,i,a,s){var l;r.forEach(r.range(o,i),function(o){l=t[o],e.node(l).dummy&&r.forEach(e.predecessors(l),function(t){var r=e.node(t);r.dummy&&(r.orders)&&u(n,t,l)})})}return r.reduce(t,function(t,n){var i,a=-1,s=0;return r.forEach(n,function(r,u){if("border"===e.node(r).dummy){var l=e.predecessors(r);l.length&&(i=e.node(l[0]).order,o(n,s,u,a,i),s=u,a=i)}o(n,s,n.length,i,t.length)}),n}),n}function u(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function l(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function c(e,t,n,o){var i={},a={},s={};return r.forEach(t,function(e){r.forEach(e,function(e,t){i[e]=e,a[e]=e,s[e]=t})}),r.forEach(t,function(e){var t=-1;r.forEach(e,function(e){var u=o(e);if(u.length){u=r.sortBy(u,function(e){return s[e]});for(var c=(u.length-1)/2,f=Math.floor(c),h=Math.ceil(c);f<=h;++f){var d=u[f];a[e]===e&&t{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},4248:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{"use strict";n.r(t),n.d(t,{default:()=>r});class r{constructor(e=[],t=o){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:n}=this,r=t[e];for(;e>0;){const o=e-1>>1,i=t[o];if(n(r,i)>=0)break;t[e]=i,e=o}t[e]=r}_down(e){const{data:t,compare:n}=this,r=this.length>>1,o=t[e];for(;e=0)break;t[e]=i,e=r}t[e]=o}}function o(e,t){return et?1:0}},4267:(e,t,n)=>{"use strict";var r=n(2543),o=n(8785),i=n(1418),a=n(3508),s=n(6718).normalizeRanks,u=n(4619),l=n(6718).removeEmptyRanks,c=n(9074),f=n(9564),h=n(9637),d=n(5454),p=n(5125),v=n(6718),g=n(8362).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?v.time:v.notime,P=n("layout",function(){return P=n(" buildLayoutGraph",function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=T(e.graph());return t.setGraph(r.merge({},m,S(n,y),r.pick(n,b))),r.forEach(e.nodes(),function(n){var o=T(e.node(n));t.setNode(n,r.defaults(S(o,_),w)),t.setParent(n,e.parent(n))}),r.forEach(e.edges(),function(n){var o=T(e.edge(n));t.setEdge(n,r.merge({},E,S(o,x),r.pick(o,O)))}),t}(e)}),n(" runLayout",function(){!function(e,t){t(" makeSpaceForEdgeLabels",function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(e)}),t(" removeSelfEdges",function(){!function(e){r.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}(e)}),t(" acyclic",function(){o.run(e)}),t(" nestingGraph.run",function(){c.run(e)}),t(" rank",function(){a(v.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",o,"_ep")}})}(e)}),t(" removeEmptyRanks",function(){l(e)}),t(" nestingGraph.cleanup",function(){c.cleanup(e)}),t(" normalizeRanks",function(){s(e)}),t(" assignRankMinMax",function(){!function(e){var t=0;r.forEach(e.nodes(),function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))}),e.graph().maxRank=t}(e)}),t(" removeEdgeLabelProxies",function(){!function(e){r.forEach(e.nodes(),function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}(e)}),t(" normalize.run",function(){i.run(e)}),t(" parentDummyChains",function(){u(e)}),t(" addBorderSegments",function(){f(e)}),t(" order",function(){d(e)}),t(" insertSelfEdges",function(){!function(e){var t=v.buildLayerMatrix(e);r.forEach(t,function(t){var n=0;r.forEach(t,function(t,o){var i=e.node(t);i.order=o+n,r.forEach(i.selfEdges,function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:o+ ++n,e:t.e,label:t.label},"_se")}),delete i.selfEdges})})}(e)}),t(" adjustCoordinateSystem",function(){h.adjust(e)}),t(" position",function(){p(e)}),t(" positionSelfEdges",function(){!function(e){r.forEach(e.nodes(),function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}})}(e)}),t(" removeBorderNodes",function(){!function(e){r.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-o.y),n.x=a.x+n.width/2,n.y=o.y+n.height/2}}),r.forEach(e.nodes(),function(t){"border"===e.node(t).dummy&&e.removeNode(t)})}(e)}),t(" normalize.undo",function(){i.undo(e)}),t(" fixupEdgeLabelCoords",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(e)}),t(" undoCoordinateSystem",function(){h.undo(e)}),t(" translateGraph",function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,u=a.marginy||0;function l(e){var r=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),o=Math.min(o,a-u/2),i=Math.max(i,a+u/2)}r.forEach(e.nodes(),function(t){l(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.has(n,"x")&&l(n)}),t-=s,o-=u,r.forEach(e.nodes(),function(n){var r=e.node(n);r.x-=t,r.y-=o}),r.forEach(e.edges(),function(n){var i=e.edge(n);r.forEach(i.points,function(e){e.x-=t,e.y-=o}),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=o)}),a.width=n-t+s,a.height=i-o+u}(e)}),t(" assignNodeIntersects",function(){!function(e){r.forEach(e.edges(),function(t){var n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(v.intersectRect(i,n)),o.points.push(v.intersectRect(a,r))})}(e)}),t(" reversePoints",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}(e)}),t(" acyclic.undo",function(){o.undo(e)})}(P,n)}),n(" updateInputGraph",function(){!function(e,t){r.forEach(e.nodes(),function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))}),r.forEach(e.edges(),function(n){var o=e.edge(n),i=t.edge(n);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,P)}),P});return P};var y=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],_=["width","height"],w={width:0,height:0},x=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function S(e,t){return r.mapValues(r.pick(e,t),Number)}function T(e){var t={};return r.forEach(e,function(e,n){t[n.toLowerCase()]=e}),t}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},4385:(e,t)=>{"use strict";var n=/\d{10}/;t.is=function(e){return n.test(e)},t.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)}},4394:(e,t,n)=>{var r=n(2552),o=n(346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},4423:(e,t,n)=>{var r=n(117),o=n(6454),i=n(1737);e.exports=function(e,t){var n,a=new o,s={},u=new i;function l(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(n).forEach(l)}return a}},4458:e=>{e.exports="2.1.8"},4500: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.Facade=void 0;var o=r(n(2572)),i=n(4857),a=r(n(8822)),s=r(n(5316)),u=r(n(6041)),l=r(n(7631));function c(e,t){t=t||{},this.raw=i.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=i.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?s.default(e.timestamp):new Date,t.traverse&&l.default(e),this.opts=t,this.obj=e}t.Facade=c;var f=c.prototype;function h(e){return i.clone(e)}f.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=u.default(n,t.join("."))),this.opts.clone?h(n):n):n},f.field=function(e){var t=this.obj[e];return this.opts.clone?h(t):t},c.proxy=function(e){return function(){return this.proxy(e)}},c.field=function(e){return function(){return this.field(e)}},c.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?i.clone(n):n]),n||[]}},c.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},f.json=function(){var e=this.opts.clone?i.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},f.rawEvent=function(){return this.raw},f.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?i.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),o=r[e]||u.default(r,e);return"object"!=typeof o&&(o=u.default(this.options(),e)),"object"==typeof o?o:{}}},f.context=f.options,f.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&a.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var o=r[e];n="boolean"!=typeof o||o}return!!n},f.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},f.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},f.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},f.sessionId=f.anonymousId,f.groupId=c.proxy("options.groupId"),f.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==o)continue;t[e[r]]=o,delete t[r]}return t},f.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},f.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},f.userAgent=c.proxy("context.userAgent"),f.timezone=c.proxy("context.timezone"),f.timestamp=c.field("timestamp"),f.channel=c.field("channel"),f.ip=c.proxy("context.ip"),f.userId=c.field("userId"),o.default(f)},4509:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},4517:(e,t,n)=>{var r=n(6545),o=n(3950),i=n(4247),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},4528:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n{"use strict";n.d(t,{U:()=>h});var r=n(1635),o=n(6490),i=n(524),a=n(8167),s=n(1298),u=n(7947);function l(e){console.error("Error sending segment performance metrics",e)}var c,f=function(){function e(e){var t,n,r,o,i,a=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:u.a,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(o=null==e?void 0:e.maxQueueSize)&&void 0!==o?o:20,this.protocol=null!==(i=null==e?void 0:e.protocol)&&void 0!==i?i:"https",this.queue=[],this.sampleRate>0){var s=!1,c=function(){s||(s=!0,a.flush().catch(l),s=!1,setTimeout(c,a.flushTimer))};c()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var o=t.reduce(function(e,t){var n=t.split(":"),r=n[0],o=n[1];return e[r]=o,e},{});return{type:"Counter",metric:e,value:1,tags:(0,r.Cl)((0,r.Cl)({},o),{library:"analytics.js",library_version:"web"===n?"next-".concat(a.r):"npm:next-".concat(a.r)})}}(e,t,(0,s.X)());this.queue.push(n),e.includes("error")&&this.flush().catch(l)}},e.prototype.flush=function(){return(0,r.sH)(this,void 0,void 0,function(){var e=this;return(0,r.YH)(this,function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(t){l(t),e.sampleRate=0})];case 1:return t.sent(),[2]}})})},e.prototype.send=function(){return(0,r.sH)(this,void 0,void 0,function(){var e,t,n;return(0,r.YH)(this,function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,(0,i.h)(n,{headers:t,body:JSON.stringify(e),method:"POST"})]})})},e}(),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),t.initRemoteMetrics=function(e){c=new f(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==c||c.increment(t,null!=r?r:[])},t}(o.p)},4619:(e,t,n)=>{var r=n(2543);e.exports=function(e){var t=function(e){var t={},n=0;return r.forEach(e.children(),function o(i){var a=n;r.forEach(e.children(i),o),t[i]={low:a,lim:n++}}),t}(e);r.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),o=r.edgeObj,i=function(e,t,n,r){var o,i,a=[],s=[],u=Math.min(t[n].low,t[r].low),l=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||l>t[o].lim));for(i=o,o=r;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,s=i.lca,u=0,l=a[u],c=!0;n!==o.w;){if(r=e.node(n),c){for(;(l=a[u])!==s&&e.node(l).maxRank{var r=n(9770),o=n(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=s},4733:(e,t,n)=>{var r=n(1791),o=n(5950);e.exports=function(e,t){return e&&r(t,o(t),e)}},4739:(e,t,n)=>{var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4757:(e,t,n)=>{"use strict";function r(e,t){var n=t.methodName,r=t.integrationName,o=t.type,i=t.didError,a=void 0!==i&&i;e.stats.increment("analytics_js.integration.invoke".concat(a?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(o)])}n.d(t,{y:()=>r})},4840:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t}},4894:(e,t,n)=>{var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4901:(e,t,n)=>{var r=n(2552),o=n(294),i=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},4919:(e,t,n)=>{var r=n(8905),o=n(117);e.exports=function(e,t,n){return o.transform(e.nodes(),function(o,i){o[i]=r(e,i,t,n)},{})}},4932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n{"use strict";n.d(t,{C:()=>i,D:()=>a});var r=n(1635),o=n(9952);function i(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),i=t[e.event.type];return void 0===i?Promise.resolve(e):function(){return(0,r.sH)(this,void 0,void 0,function(){var n;return(0,r.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.apply(t,[e])];case 1:return[2,r.sent()];case 2:return n=r.sent(),[2,Promise.reject(n)];case 3:return[2]}})})}().then(function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e}).catch(function(n){if(n instanceof o.d&&"middleware_cancellation"===n.type)throw n;return n instanceof o.d?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)})}function a(e,t){return i(e,t).then(function(t){if(t instanceof o.j)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)})}},5015:(e,t,n)=>{var r=n(2552),o=n(6449),i=n(346);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},5083:(e,t,n)=>{var r=n(1882),o=n(7296),i=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,h=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?h:s).test(a(e))}},5125:(e,t,n)=>{"use strict";var r=n(2543),o=n(6718),i=n(4190).positionX;e.exports=function(e){(function(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,i=0;r.forEach(t,function(t){var o=r.max(r.map(t,function(t){return e.node(t).height}));r.forEach(t,function(t){e.node(t).y=i+o/2}),i+=o+n})})(e=o.asNonCompoundGraph(e)),r.forEach(i(e),function(t,n){e.node(n).x=t})}},5128:(e,t,n)=>{var r=n(909),o=n(4894);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,function(e,r,o){i[++n]=t(e,r,o)}),i}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5316:(e,t,n)=>{"use strict";var r=n(8661),o=n(356),i=n(4385),a=Object.prototype.toString;e.exports=function(e){return t=e,"[object Date]"===a.call(t)?e:function(e){return"[object Number]"===a.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):r.is(e)?r.parse(e):o.is(e)?o.parse(e):i.is(e)?i.parse(e):new Date(e);var t,n}},5325:(e,t,n)=>{var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},5341:function(e){e.exports=function(){"use strict";function e(e,r,o,i,a){!function e(n,r,o,i,a){for(;i>o;){if(i-o>600){var s=i-o+1,u=r-o+1,l=Math.log(s),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);e(n,r,Math.max(o,Math.floor(r-u*c/s+f)),Math.min(i,Math.floor(r+(s-u)*c/s+f)),a)}var h=n[r],d=o,p=i;for(t(n,o,r),a(n[i],h)>0&&t(n,o,i);d0;)p--}0===a(n[o],h)?t(n,o,p):t(n,++p,i),p<=r&&(o=p+1),r<=p&&(i=p-1)}}(e,r,o||0,i||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return et?1:0}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r=e.minX&&t.maxY>=e.minY}function p(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,n,r,o,i){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=o)){var s=n+Math.ceil((r-n)/o/2)*o;e(t,s,n,r,i),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!d(e,t))return n;for(var r=this.toBBox,o=[];t;){for(var i=0;i=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);var a=this._chooseSplitIndex(n,o,r),s=p(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,i(n,this.toBBox),i(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(e,t){this.data=p([e,t]),this.data.height=e.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,o,i,s,u,l,f,h=1/0,d=1/0,p=t;p<=n-t;p++){var v=a(e,0,p,this.toBBox),g=a(e,p,n,this.toBBox),y=(o=v,i=g,void 0,void 0,void 0,void 0,s=Math.max(o.minX,i.minX),u=Math.max(o.minY,i.minY),l=Math.min(o.maxX,i.maxX),f=Math.min(o.maxY,i.maxY),Math.max(0,l-s)*Math.max(0,f-u)),m=c(v)+c(g);y=t;d--){var p=e.children[d];s(u,e.leaf?o(p):p),l+=f(u)}return l},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)s(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():i(e[t],this.toBBox)},r}()},5378:(e,t,n)=>{var r=n(4932),o=n(5389),i=n(5128),a=n(6449);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},5389:(e,t,n)=>{var r=n(3663),o=n(7978),i=n(3488),a=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}},5454:(e,t,n)=>{"use strict";var r=n(2543),o=n(7603),i=n(8300),a=n(6487),s=n(6027),u=n(8261),l=n(8362).Graph,c=n(6718);function f(e,t,n){return r.map(t,function(t){return s(e,t,n)})}function h(e,t){var n=new l;r.forEach(e,function(e){var o=e.graph().root,i=a(e,o,n,t);r.forEach(i.vs,function(t,n){e.node(t).order=n}),u(e,n,i.vs)})}function d(e,t){r.forEach(t,function(t){r.forEach(t,function(t,n){e.node(t).order=n})})}e.exports=function(e){var t=c.maxRank(e),n=f(e,r.range(1,t+1),"inEdges"),a=f(e,r.range(t-1,-1,-1),"outEdges"),s=o(e);d(e,s);for(var u,l=Number.POSITIVE_INFINITY,p=0,v=0;v<4;++p,++v){h(p%2?n:a,p%4>=2),s=c.buildLayerMatrix(e);var g=i(e,s);g{e.exports=function(e){return e!=e}},5481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];e.exports=r},5525: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.Page=void 0;var o=r(n(6698)),i=n(4500),a=n(3863),s=r(n(6659));function u(e,t){i.Facade.call(this,e,t)}t.Page=u,o.default(u,i.Facade);var l=u.prototype;l.action=function(){return"page"},l.type=l.action,l.category=i.Facade.field("category"),l.name=i.Facade.field("name"),l.title=i.Facade.proxy("properties.title"),l.path=i.Facade.proxy("properties.path"),l.url=i.Facade.proxy("properties.url"),l.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},l.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var o in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=null==this[o]?this.proxy("properties."+o):this[o]();if(null==i)continue;t[e[o]]=i,o!==e[o]&&delete t[o]}return t},l.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return s.default(t)?t:void 0},l.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},l.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},l.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new a.Track(t,this.opts)}},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5529:(e,t,n)=>{var r=n(9344),o=n(8879),i=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},5558:e=>{e.exports=function(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}},5580:(e,t,n)=>{var r=n(6110)(n(9325),"DataView");e.exports=r},5749:(e,t,n)=>{var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5765:(e,t,n)=>{var r=n(8859),o=n(5325),i=n(9905),a=n(9219),s=n(4517),u=n(4247);e.exports=function(e,t,n){var l=-1,c=o,f=e.length,h=!0,d=[],p=d;if(n)h=!1,c=i;else if(f>=200){var v=t?null:s(e);if(v)return u(v);h=!1,c=a,p=new r}else p=t?[]:d;e:for(;++l{"use strict";function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}n.d(t,{p:()=>r})},5791:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(1476);function o(e,t){var n=new r.Facade(e,t);return"track"===e.type&&(n=new r.Track(e,t)),"identify"===e.type&&(n=new r.Identify(e,t)),"page"===e.type&&(n=new r.Page(e,t)),"alias"===e.type&&(n=new r.Alias(e,t)),"group"===e.type&&(n=new r.Group(e,t)),"screen"===e.type&&(n=new r.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}},5861:(e,t,n)=>{var r=n(5580),o=n(8223),i=n(2804),a=n(6545),s=n(8303),u=n(2552),l=n(7473),c="[object Map]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",p="[object DataView]",v=l(r),g=l(o),y=l(i),m=l(a),b=l(s),_=u;(r&&_(new r(new ArrayBuffer(1)))!=p||o&&_(new o)!=c||i&&_(i.resolve())!=f||a&&_(new a)!=h||s&&_(new s)!=d)&&(_=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case v:return p;case g:return c;case y:return f;case m:return h;case b:return d}return t}),e.exports=_},5880:(e,t,n)=>{var r=n(514),o=n(5950);e.exports=function(e){return null==e?[]:r(e,o(e))}},5881:(e,t,n)=>{"use strict";n.d(t,{x:()=>h});var r=n(1635),o=n(6115),i=n(7977),a=n(9839),s={getItem:function(){},setItem:function(){},removeItem:function(){}};try{s=(0,a.B)()&&window.localStorage?window.localStorage:s}catch(e){console.warn("Unable to access localStorage",e)}function u(e){var t=s.getItem(e);return(t?JSON.parse(t):[]).map(function(e){return new i.o(e.event,e.id)})}function l(e){var t=s.getItem(e);return t?JSON.parse(t):{}}function c(e){s.removeItem(e)}function f(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),o=s.getItem(r),i=o?JSON.parse(o):null,a=null===i||function(e){return(new Date).getTime()>e}(i);if(a)return s.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void s.removeItem(r);!a&&n<3?setTimeout(function(){f(e,t,n+1)},50):console.error("Unable to retrieve lock")}var h=function(e){function t(t,n){var o=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),h=[],d={};return f(n,function(){try{h=u(i),d=l(a),c(i),c(a),o.queue=(0,r.fX)((0,r.fX)([],h,!0),o.queue,!0),o.seen=(0,r.Cl)((0,r.Cl)({},d),o.seen)}catch(e){console.error(e)}}),window.addEventListener("pagehide",function(){if(o.todo>0){var e=(0,r.fX)((0,r.fX)([],o.queue,!0),o.future,!0);try{f(n,function(){!function(e,t){var n=u(e),o=(0,r.fX)((0,r.fX)([],t,!0),n,!0).reduce(function(e,t){var n;return(0,r.Cl)((0,r.Cl)({},e),((n={})[t.id]=t,n))},{});s.setItem(e,JSON.stringify(Object.values(o)))}(i,e),function(e,t){var n=l(e);s.setItem(e,JSON.stringify((0,r.Cl)((0,r.Cl)({},n),t)))}(a,o.seen)})}catch(e){console.error(e)}}}),o}return(0,r.C6)(t,e),t}(o.M)},5891:(e,t,n)=>{var r=n(1873),o=n(2428),i=n(6449),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},5911:(e,t,n)=>{var r=n(8859),o=n(4248),i=n(9219);e.exports=function(e,t,n,a,s,u){var l=1&n,c=e.length,f=t.length;if(c!=f&&!(l&&f>c))return!1;var h=u.get(e),d=u.get(t);if(h&&d)return h==t&&d==e;var p=-1,v=!0,g=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p{"use strict";n.r(t),n.d(t,{applyDestinationMiddleware:()=>a,sourceMiddlewarePlugin:()=>s});var r=n(1635),o=n(9952),i=n(5791);function a(e,t,n){return(0,r.sH)(this,void 0,void 0,function(){function o(t,n){return(0,r.sH)(this,void 0,void 0,function(){var o,a,s;return(0,r.YH)(this,function(u){switch(u.label){case 0:return o=!1,a=null,[4,n({payload:(0,i.W)(t,{clone:!0,traverse:!1}),integration:e,next:function(e){o=!0,null===e&&(a=null),e&&(a=e.obj)}})];case 1:return u.sent(),o||null===a||(a.integrations=(0,r.Cl)((0,r.Cl)({},t.integrations),((s={})[e]=!1,s))),[2,a]}})})}var a,s,u,l,c;return(0,r.YH)(this,function(e){switch(e.label){case 0:a=(0,i.W)(t,{clone:!0,traverse:!1}).rawEvent(),s=0,u=n,e.label=1;case 1:return s{var r=n(695),o=n(8984),i=n(4894);e.exports=function(e){return i(e)?r(e):o(e)}},6e3:(e,t,n)=>{"use strict";n.d(t,{v4:()=>a});for(var r,o=256,i=[];o--;)i[o]=(o+256).toString(16).substring(1);function a(){var e,t=0,n="";if(!r||o+16>256){for(r=Array(t=256);t--;)r[t]=256*Math.random()|0;t=o=0}for(;t<16;t++)e=r[o+t],n+=6==t?i[15&e|64]:8==t?i[63&e|128]:i[e],1&t&&t>1&&t<11&&(n+="-");return o++,n}},6009:(e,t,n)=>{e=n.nmd(e);var r=n(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},6016:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"pre")}},6025:(e,t,n)=>{var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},6027:(e,t,n)=>{var r=n(2543),o=n(8362).Graph;e.exports=function(e,t,n){var i=function(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}(e),a=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return r.forEach(e.nodes(),function(o){var s=e.node(o),u=e.parent(o);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(a.setNode(o),a.setParent(o,u||i),r.forEach(e[n](o),function(t){var n=t.v===o?t.w:t.v,i=a.edge(n,o),s=r.isUndefined(i)?0:i.weight;a.setEdge(n,o,{weight:e.edge(t).weight+s})}),r.has(s,"minRank")&&a.setNode(o,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),a}},6038:(e,t,n)=>{var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},6041:e=>{function t(e){return function(t,n,r,i){var a,s=i&&function(e){return"function"==typeof e}(i.normalizer)?i.normalizer:o;n=s(n);for(var u=!1;!u;)l();function l(){for(a in t){var e=s(a);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var o=t[a];return null==o?void(u=!0):n.length?void(t=o):void(u=!0)}}}a=void 0,u=!0}if(a)return null==t?t:e(t,a,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function o(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t(function(e,t){if(e.hasOwnProperty(t))return e[t]}),e.exports.find=e.exports,e.exports.replace=function(e,n,o,i){return t(r).call(this,e,n,o,i),e},e.exports.del=function(e,r,o){return t(n).call(this,e,r,null,o),e}},6110:(e,t,n)=>{var r=n(5083),o=n(392);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},6115:(e,t,n)=>{"use strict";n.d(t,{g:()=>i,M:()=>a});var r=n(1635),o=n(2079),i="onRemoveFromFuture",a=function(e){function t(t,n,r){var o=e.call(this)||this;return o.future=[],o.maxAttempts=t,o.queue=n,o.seen=null!=r?r:{},o}return(0,r.C6)(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;ne.maxAttempts||e.includes(t)||(e.queue.push(t),0))});return this.queue=this.queue.sort(function(t,n){return e.getAttempts(t)-e.getAttempts(n)}),r},t.prototype.pushWithBackoff=function(e,t){var n=this;if(void 0===t&&(t=0),0==t&&0===this.getAttempts(e))return this.push(e)[0];var r=this.updateAttempts(e);if(r>this.maxAttempts||this.includes(e))return!1;var o=function(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,o=e.factor,i=void 0===o?2:o,a=e.attempt,s=e.maxTimeout,u=void 0===s?1/0:s;return Math.min(t*r*Math.pow(i,a),u)}({attempt:r-1});return t>0&&o{var r=n(2523),o=n(5463),i=n(6959);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},6135:(e,t,n)=>{e.exports=n(9754)},6169:(e,t,n)=>{var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},6189:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},6251:(e,t,n)=>{"use strict";n.d(t,{u:()=>r});var r=function(){var e,t,n=!1,r=new Promise(function(r,o){e=function(){for(var e=[],t=0;t{var r=n(117);e.exports=function(e){var t=0,n=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach(function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))}),u.lowlink===u.index){var l,c=[];do{l=n.pop(),o[l].onStack=!1,c.push(l)}while(s!==l);i.push(c)}}return e.nodes().forEach(function(e){r.has(o,e)||a(e)}),i}},6375:(e,t,n)=>{var r=n(4528),o=n(8879),i=n(4664),a=n(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},6449:e=>{var t=Array.isArray;e.exports=t},6454:(e,t,n)=>{"use strict";var r=n(117);e.exports=i;var o="\0";function i(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[o]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function u(e,t,n,o){var i=""+t,a=""+n;if(!e&&i>a){var s=i;i=a,a=s}return i+""+a+""+(r.isUndefined(o)?"\0":o)}function l(e,t){return u(e,t.v,t.w,t.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._in[t])})},i.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._out[t])})},i.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,function(e){n.length>1?o.setNode(e,t):o.setNode(e)}),this},i.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=o,this._children[e]={},this._children[o][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return r.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=o;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==o)return t}},i.prototype.children=function(e){if(r.isUndefined(e)&&(e=o),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===o)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),r.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var o={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:i(r)}return this._isCompound&&r.each(t.nodes(),function(e){t.setParent(e,i(e))}),t},i.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r}),this},i.prototype.setEdge=function(){var e,t,n,o,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var l=u(this._isDirected,e,t,n);if(r.has(this._edgeLabels,l))return i&&(this._edgeLabels[l]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=i?o:this._defaultEdgeLabelFn(e,t,n);var c=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[l]=c,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][l]=c,this._out[e][l]=c,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.v===t}):o}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.w===t}):o}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},6487:(e,t,n)=>{var r=n(2543),o=n(3585),i=n(8644),a=n(9708);e.exports=function e(t,n,s,u){var l=t.children(n),c=t.node(n),f=c?c.borderLeft:void 0,h=c?c.borderRight:void 0,d={};f&&(l=r.filter(l,function(e){return e!==f&&e!==h}));var p=o(t,l);r.forEach(p,function(n){if(t.children(n.v).length){var o=e(t,n.v,s,u);d[n.v]=o,r.has(o,"barycenter")&&(i=n,a=o,r.isUndefined(i.barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}var i,a});var v=i(p,s);!function(e,t){r.forEach(e,function(e){e.vs=r.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}(v,d);var g=a(v,u);if(f&&(g.vs=r.flatten([f,g.vs,h],!0),t.predecessors(f).length)){var y=t.node(t.predecessors(f)[0]),m=t.node(t.predecessors(h)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+y.order+m.order)/(g.weight+2),g.weight+=2}return g}},6490:(e,t,n)=>{"use strict";n.d(t,{p:()=>o,r:()=>i});var r=n(1635),o=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map(function(e){return(0,r.Cl)((0,r.Cl)({},e),{tags:e.tags.join(",")})});console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map(function(e){return{m:e.metric,v:e.value,t:e.tags,k:(t=e.type,{gauge:"g",counter:"c"}[t]),e:e.timestamp};var t})},e}(),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),t.prototype.gauge=function(){for(var e=[],t=0;t{var r=n(6110)(n(9325),"Set");e.exports=r},6547:(e,t,n)=>{var r=n(3360),o=n(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},6556:(e,t,n)=>{"use strict";function r(e,t){return new Promise(function(n,r){var o=setTimeout(function(){r(Error("Promise timed out"))},t);e.then(function(e){return clearTimeout(o),n(e)}).catch(r)})}function o(e,t,n){var o;return(o=n,new Promise(function(e){return setTimeout(e,o)})).then(function(){return r(function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}(),1e3)}).catch(function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")}).then(function(){return e})}n.d(t,{s2:()=>r,w_:()=>o})},6574:(e,t,n)=>{var r=n(909);e.exports=function(e,t){var n=[];return r(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}},6649:(e,t,n)=>{var r=n(3221)();e.exports=r},6659:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/.+\@.+\..+/;t.default=function(e){return n.test(e)}},6678:(e,t,n)=>{var r=n(117),o=n(6291);e.exports=function(e){return r.filter(o(e),function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6718:(e,t,n)=>{"use strict";var r=n(2543),o=n(8362).Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function a(e){return r.max(r.map(e.nodes(),function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n}))}e.exports={addDummyNode:i,simplify:function(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t},asNonCompoundGraph:function(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t},successorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.outEdges(t),function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.inEdges(t),function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,l=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*l?(s<0&&(l=-l),n=l*a/s,r=l):(a<0&&(u=-u),n=u,r=u*s/a),{x:o+n,y:i+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),function(){return[]});return r.forEach(e.nodes(),function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)}),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank}));r.forEach(e.nodes(),function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)})},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank})),n=[];r.forEach(e.nodes(),function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)});var o=0,i=e.graph().nodeRankFactor;r.forEach(n,function(t,n){r.isUndefined(t)&&n%i!==0?--o:o&&r.forEach(t,function(t){e.node(t).rank+=o})})},addBorderNode:function(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(e,"border",o,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},6721:(e,t,n)=>{var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},6757:(e,t,n)=>{var r=n(1033),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a{e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r{var r=n(7217),o=n(5911),i=n(1986),a=n(689),s=n(5861),u=n(6449),l=n(3656),c=n(7167),f="[object Arguments]",h="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,g,y){var m=u(e),b=u(t),_=m?h:s(e),w=b?h:s(t),x=(_=_==f?d:_)==d,E=(w=w==f?d:w)==d,O=_==w;if(O&&l(e)){if(!l(t))return!1;m=!0,x=!1}if(O&&!x)return y||(y=new r),m||c(e)?o(e,t,n,v,g,y):i(e,t,_,n,v,g,y);if(!(1&n)){var S=x&&p.call(e,"__wrapped__"),T=E&&p.call(t,"__wrapped__");if(S||T){var P=S?e.value():e,C=T?t.value():t;return y||(y=new r),g(P,C,n,v,y)}}return!!O&&(y||(y=new r),a(e,t,n,v,g,y))}},7091:(e,t,n)=>{var r=n(8984),o=n(5861),i=n(4894),a=n(5015),s=n(1993);e.exports=function(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},7167:(e,t,n)=>{var r=n(4901),o=n(7301),i=n(6009),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},7199:(e,t,n)=>{var r=n(9653),o=n(6169),i=n(3201),a=n(3736),s=n(1961);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},7217:(e,t,n)=>{var r=n(79),o=n(1420),i=n(938),a=n(3605),s=n(9817),u=n(945);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=s,l.prototype.set=u,e.exports=l},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7241:(e,t,n)=>{var r=n(695),o=n(2903),i=n(4894);e.exports=function(e){return i(e)?r(e,!0):o(e)}},7255:(e,t,n)=>{var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},7296:(e,t,n)=>{var r,o=n(5481),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},7334:e=>{e.exports=function(e){return function(){return e}}},7422:(e,t,n)=>{var r=n(1769),o=n(7797);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7494:(e,t,n)=>{var r=n(117),o=n(6454);function i(e){return r.map(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i})}function a(e){return r.map(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o})}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),r.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}},7534:(e,t,n)=>{var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},7538: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.Identify=void 0;var o=n(4500),i=r(n(6041)),a=r(n(6698)),s=r(n(6659)),u=r(n(5316)),l=function(e){return e.trim()};function c(e,t){o.Facade.call(this,e,t)}t.Identify=c,a.default(c,o.Facade);var f=c.prototype;f.action=function(){return"identify"},f.type=f.action,f.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var o=null==this[r]?this.proxy("traits."+r):this[r]();null!=o&&(t[e[r]]=o,r!==e[r]&&delete t[r])}return t},f.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return s.default(t)?t:void 0},f.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return u.default(e)},f.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return u.default(e)},f.companyName=function(){return this.proxy("traits.company.name")},f.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return l(e);var t=this.firstName(),n=this.lastName();return t&&n?l(t+" "+n):void 0},f.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return l(e);var t=this.proxy("traits.name");return"string"==typeof t?l(t).split(" ")[0]:void 0},f.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return l(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=l(t).indexOf(" ");if(-1!==n)return l(t.substr(n+1))}},f.uid=function(){return this.userId()||this.username()||this.email()},f.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},f.age=function(){var e=this.birthday(),t=i.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},f.avatar=function(){var e=this.traits();return i.default(e,"avatar")||i.default(e,"photoUrl")||i.default(e,"avatarUrl")},f.position=function(){var e=this.traits();return i.default(e,"position")||i.default(e,"jobTitle")},f.username=o.Facade.proxy("traits.username"),f.website=o.Facade.one("traits.website"),f.websites=o.Facade.multi("traits.website"),f.phone=o.Facade.one("traits.phone"),f.phones=o.Facade.multi("traits.phone"),f.address=o.Facade.proxy("traits.address"),f.gender=o.Facade.proxy("traits.gender"),f.birthday=o.Facade.proxy("traits.birthday")},7556:(e,t,n)=>{var r=n(1873),o=n(4932),i=n(6449),a=n(4394),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7571:e=>{var t=function(){};t.prototype={fit:function(e){var t,n,r,o,i=e.length,a=i>0?e[0].width:0,s=i>0?e[0].height:0;for(this.root={x:0,y:0,width:a,height:s},t=0;t=this.root.width+e,i=n&&this.root.width>=this.root.height+t;return o?this.growRight(e,t):i?this.growDown(e,t):r?this.growRight(e,t):n?this.growDown(e,t):null},growRight:function(e,t){var n;return this.root={used:!0,x:0,y:0,width:this.root.width+e,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:e,height:this.root.height}},(n=this.findNode(this.root,e,t))?this.splitNode(n,e,t):null},growDown:function(e,t){var n;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+t,down:{x:0,y:this.root.height,width:this.root.width,height:t},right:this.root},(n=this.findNode(this.root,e,t))?this.splitNode(n,e,t):null}},e.exports=t},7603:(e,t,n)=>{"use strict";var r=n(2543);e.exports=function(e){var t={},n=r.filter(e.nodes(),function(t){return!e.children(t).length}),o=r.max(r.map(n,function(t){return e.node(t).rank})),i=r.map(r.range(o+1),function(){return[]}),a=r.sortBy(n,function(t){return e.node(t).rank});return r.forEach(a,function n(o){if(!r.has(t,o)){t[o]=!0;var a=e.node(o);i[a.rank].push(o),r.forEach(e.successors(o),n)}}),i}},7612:(e,t,n)=>{var r=n(9770),o=n(6574),i=n(5389),a=n(6449);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},7631:(e,t,n)=>{"use strict";var r=n(8661);e.exports=function e(t,n){return void 0===n&&(n=!0),t&&"object"==typeof t?function(t,n){return Object.keys(t).forEach(function(r){t[r]=e(t[r],n)}),t}(t,n):Array.isArray(t)?function(t,n){return t.forEach(function(r,o){t[o]=e(r,n)}),t}(t,n):r.is(t,n)?r.parse(t):t}},7670:(e,t,n)=>{var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},7697: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.Delete=void 0;var o=r(n(6698)),i=n(4500);function a(e,t){i.Facade.call(this,e,t)}t.Delete=a,o.default(a,i.Facade),a.prototype.type=function(){return"delete"}},7718:(e,t,n)=>{"use strict";n.d(t,{a:()=>i,s:()=>o});var r=n(9839);function o(){return!(0,r.B)()||window.navigator.onLine}function i(){return!o()}},7730:(e,t,n)=>{var r=n(9172),o=n(7301),i=n(6009),a=i&&i.isMap,s=a?o(a):r;e.exports=s},7797:(e,t,n)=>{var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7799:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function o(){}for(var i in r)o[i]=r[i];o.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,o.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,o.DEFAULT_COMPONENT_SEPERATION=60,o.TILE=!0,o.TILING_PADDING_VERTICAL=10,o.TILING_PADDING_HORIZONTAL=10,o.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=o},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function o(e,t,n){r.call(this,e,t,n)}for(var i in o.prototype=Object.create(r.prototype),r)o[i]=r[i];e.exports=o},function(e,t,n){"use strict";var r=n(0).LGraph;function o(e,t,n){r.call(this,e,t,n)}for(var i in o.prototype=Object.create(r.prototype),r)o[i]=r[i];e.exports=o},function(e,t,n){"use strict";var r=n(0).LGraphManager;function o(e){r.call(this,e)}for(var i in o.prototype=Object.create(r.prototype),r)o[i]=r[i];e.exports=o},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,o=n(0).IMath;function i(e,t,n,o){r.call(this,e,t,n,o)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*o.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*o.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),o=0;o0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},m.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},m.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)for(s=0;sr&&(r=Math.floor(a.y)),i=Math.floor(a.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new h(c.WORLD_CENTER_X-a.x/2,c.WORLD_CENTER_Y-a.y/2))},m.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),u.DEFAULT_RADIAL_SEPARATION);m.branchRadialLayout(t,null,0,359,0,r);var o=g.calculateBounds(e),i=new y;i.setDeviceOrgX(o.getMinX()),i.setDeviceOrgY(o.getMinY()),i.setWorldOrgX(n.x),i.setWorldOrgY(n.y);for(var a=0;a1;){var y=g[0];g.splice(0,1);var b=c.indexOf(y);b>=0&&c.splice(b,1),p--,f--}h=null!=t?(c.indexOf(g[0])+1)%p:0;for(var _=Math.abs(r-n)/f,w=h;d!=f;w=++w%p){var x=c[w].getOtherEnd(e);if(x!=t){var E=(n+d*_)%360,O=(E+_)%360;m.branchRadialLayout(x,e,E,O,o+i,i),d++}}},m.maxDiagonalInTree=function(e){for(var t=p.MIN_VALUE,n=0;nt&&(t=r)}return t},m.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},m.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),o=0;o1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var o=t[n][0].getParent(),i=new a(e.graphManager);i.id=r,i.paddingLeft=o.paddingLeft||0,i.paddingRight=o.paddingRight||0,i.paddingBottom=o.paddingBottom||0,i.paddingTop=o.paddingTop||0,e.idToDummyNode[r]=i;var s=e.getGraphManager().add(e.newGraph(),i),u=o.getChild();u.add(i);for(var l=0;l=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,o=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,o)}},m.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],o=r.paddingLeft,i=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,o,i)})},m.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),o=0;o0)return this.toBeTiled[t]=!1,!1;if(null!=i.getChild()){if(!this.getToBeTiled(i))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[i.id]=!1}return this.toBeTiled[t]=!0,!0},m.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=c.rect.height)}n+=u+e.verticalPadding}},m.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var o=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],o.paddingLeft+o.paddingRight),o.rect.width=n.tiledMemberPack[r].width,o.rect.height=n.tiledMemberPack[r].height})},m.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height0&&(i+=e.horizontalPadding),e.rowWidth[n]=i,e.width0&&(a+=e.verticalPadding);var s=0;a>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=a,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},m.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},m.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var o=e.rowWidth[r];if(o+e.horizontalPadding+t<=e.width)return!0;var i,a,s=0;return e.rowHeight[r]0&&(s=n+e.verticalPadding-e.rowHeight[r]),i=e.width-o>=t+e.horizontalPadding?(e.height+s)/(o+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(a=e.widthi&&t!=n){r.splice(-1,1),e.rows[n].push(o),e.rowWidth[t]=e.rowWidth[t]-i,e.rowWidth[n]=e.rowWidth[n]+i,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=r[s].height);t>0&&(a+=e.verticalPadding);var u=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=a,e.rowHeight[n]0)for(var c=o;c<=i;c++)u[0]+=this.grid[c][a-1].length+this.grid[c][a].length-1;if(i0)for(c=a;c<=s;c++)u[3]+=this.grid[o-1][c].length+this.grid[o][c].length-1;for(var f,h,d=p.MAX_VALUE,v=0;v{var r=n(9325).Uint8Array;e.exports=r},7927:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+o+")?",l="[\\ufe0e\\ufe0f]?",c=l+u+"(?:\\u200d(?:"+[i,a,s].join("|")+")"+l+u+")*",f="(?:"+[i+r+"?",r,a,s,n].join("|")+")",h=RegExp(o+"(?="+o+")|"+f+c,"g");e.exports=function(e){for(var t=h.lastIndex=0;h.test(e);)++t;return t}},7947:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});var r="api.segment.io/v1"},7977:(e,t,n)=>{"use strict";n.d(t,{o:()=>a});var r=n(1635),o=n(9952),i=n(4568),a=function(e){function t(t,n){return e.call(this,t,n,new i.U)||this}return(0,r.C6)(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(o.j)},7978:(e,t,n)=>{var r=n(270),o=n(8156),i=n(631),a=n(8586),s=n(756),u=n(7197),l=n(7797);e.exports=function(e,t){return a(e)&&s(t)?u(l(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},8002:(e,t,n)=>{var r=n(2543),o=n(8362).Graph,i=n(2404);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new o,a=0,s=0;r.forEach(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),r.forEach(e.edges(),function(e){var r=n.edge(e.v,e.w)||0,o=t(e),i=r+o;n.setEdge(e.v,e.w,i),s=Math.max(s,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)});var l=r.range(s+a+3).map(function(){return new i}),c=a+1;return r.forEach(n.nodes(),function(e){u(l,c,n.node(e))}),{graph:n,buckets:l,zeroIdx:c}}(e,t||a),l=function(e,t,n){for(var r,o=[],i=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)s(e,t,n,r);for(;r=i.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var u=t.length-2;u>0;--u)if(r=t[u].dequeue()){o=o.concat(s(e,t,n,r,!0));break}}return o}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(l,function(t){return e.outEdges(t.v,t.w)}),!0)};var a=r.constant(1);function s(e,t,n,o,i){var a=i?[]:void 0;return r.forEach(e.inEdges(o.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,u(t,n,s)}),r.forEach(e.outEdges(o.v),function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,u(t,n,a)}),e.removeNode(o.v),a}function u(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},8096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(7422);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},8167:(e,t,n)=>{"use strict";n.d(t,{r:()=>r});var r="1.81.1"},8223:(e,t,n)=>{var r=n(6110)(n(9325),"Map");e.exports=r},8261:(e,t,n)=>{var r=n(2543);e.exports=function(e,t,n){var o,i={};r.forEach(n,function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=i[r],i[r]=s):(a=o,o=s),a&&a!==s)return void t.setEdge(a,s);s=r}})}},8294:(e,t,n)=>{var r=n(2543),o=n(6718),i=n(8362).Graph;e.exports={debugOrdering:function(e){var t=o.buildLayerMatrix(e),n=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)}),r.forEach(e.edges(),function(e){n.setEdge(e.v,e.w,{},e.name)}),r.forEach(t,function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),r.reduce(e,function(e,t){return n.setEdge(e,t,{style:"invis"}),t})}),n}}},8300:(e,t,n)=>{"use strict";var r=n(2543);function o(e,t,n){for(var o=r.zipObject(n,r.map(n,function(e,t){return t})),i=r.flatten(r.map(t,function(t){return r.sortBy(r.map(e.outEdges(t),function(t){return{pos:o[t.w],weight:e.edge(t).weight}}),"pos")}),!0),a=1;a0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;l+=e.weight*n})),l}e.exports=function(e,t){for(var n=0,r=1;r{var r=n(6110)(n(9325),"WeakMap");e.exports=r},8329:(e,t,n)=>{var r=n(4894);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a{e.exports={graphlib:n(8362),layout:n(4267),debug:n(8294),util:{time:n(6718).time,notime:n(6718).notime},version:n(3353)}},8362:(e,t,n)=>{var r=n(1166);e.exports={Graph:r.Graph,json:n(7494),alg:n(1667),version:r.version}},8440:(e,t,n)=>{var r=n(6038),o=n(7301),i=n(6009),a=i&&i.isSet,s=a?o(a):r;e.exports=s},8586:(e,t,n)=>{var r=n(6449),o=n(4394),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},8644:(e,t,n)=>{"use strict";var r=n(2543);e.exports=function(e,t){var n={};return r.forEach(e,function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)}),r.forEach(t.edges(),function(e){var t=n[e.v],o=n[e.w];r.isUndefined(t)||r.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))}),function(e){var t=[];function n(e){return function(t){var n,o,i,a;t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&(o=t,i=0,a=0,(n=e).weight&&(i+=n.barycenter*n.weight,a+=n.weight),o.weight&&(i+=o.barycenter*o.weight,a+=o.weight),n.vs=o.vs.concat(n.vs),n.barycenter=i/a,n.weight=a,n.i=Math.min(o.i,n.i),o.merged=!0)}}function o(t){return function(n){n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,o(i))}return r.map(r.filter(t,function(e){return!e.merged}),function(e){return r.pick(e,["vs","i","barycenter","weight"])})}(r.filter(n,function(e){return!e.indegree}))}},8655:(e,t,n)=>{var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},8661:(e,t)=>{"use strict";var n=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;t.parse=function(e){var t=[1,5,6,7,11,12],r=n.exec(e),o=0;if(!r)return new Date(e);for(var i,a=0;i=t[a];a++)r[i]=parseInt(r[i],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0," "===r[4]?o=(new Date).getTimezoneOffset():"Z"!==r[9]&&r[10]&&(o=60*r[11]+r[12],"+"===r[10]&&(o=0-o));var s=Date.UTC(r[1],r[2],r[3],r[5],r[6]+o,r[7],r[8]);return new Date(s)},t.is=function(e,t){return"string"==typeof e&&(!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&n.test(e)}},8785:(e,t,n)=>{"use strict";var r=n(2543),o=n(8002);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?o(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},o={};return r.forEach(e.nodes(),function i(a){r.has(o,a)||(o[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),function(e){r.has(n,e.w)?t.push(e):i(e.w)}),delete n[a])}),t}(e);r.forEach(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))})},undo:function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}},8812:(e,t,n)=>{"use strict";var r=n(7571);e.exports=function(e,t){t=t||{};var n=new r,o=t.inPlace||!1,i=e.map(function(e){return o?e:{width:e.width,height:e.height,item:e}});i=i.sort(function(e,t){return t.width*t.height-e.width*e.height}),n.fit(i);var a={width:i.reduce(function(e,t){return Math.max(e,t.x+t.width)},0),height:i.reduce(function(e,t){return Math.max(e,t.y+t.height)},0)};return o||(a.items=i),a}},8822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Salesforce:!0};t.default=function(e){return!n[e]}},8859:(e,t,n)=>{var r=n(3661),o=n(1380),i=n(1459);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},8905:(e,t,n)=>{var r=n(117),o=n(1737);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,a,s={},u=new o,l=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),l=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);l0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(l);return s}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},8948:(e,t,n)=>{var r=n(1791),o=n(6375);e.exports=function(e,t){return r(e,o(e),t)}},8984:(e,t,n)=>{var r=n(5527),o=n(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9074:(e,t,n)=>{var r=n(2543),o=n(6718);function i(e,t,n,a,s,u,l){var c=e.children(l);if(c.length){var f=o.addBorderNode(e,"_bt"),h=o.addBorderNode(e,"_bb"),d=e.node(l);e.setParent(f,l),d.borderTop=f,e.setParent(h,l),d.borderBottom=h,r.forEach(c,function(r){i(e,t,n,a,s,u,r);var o=e.node(r),c=o.borderTop?o.borderTop:r,d=o.borderBottom?o.borderBottom:r,p=o.borderTop?a:2*a,v=c!==d?1:s-u[l]+1;e.setEdge(f,c,{weight:p,minlen:v,nestingEdge:!0}),e.setEdge(d,h,{weight:p,minlen:v,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,f,{weight:0,minlen:s+u[l]})}else l!==t&&e.setEdge(t,l,{weight:0,minlen:n})}e.exports={run:function(e){var t=o.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(o,i){var a=e.children(o);a&&a.length&&r.forEach(a,function(e){n(e,i+1)}),t[o]=i}return r.forEach(e.children(),function(e){n(e,1)}),t}(e),a=r.max(r.values(n))-1,s=2*a+1;e.graph().nestingRoot=t,r.forEach(e.edges(),function(t){e.edge(t).minlen*=s});var u=function(e){return r.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}(e)+1;r.forEach(e.children(),function(r){i(e,t,s,u,a,n,r)}),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}}},9095:(e,t,n)=>{var r=n(3841),o=n(1137);e.exports=function(e,t,n,i){return t.length>0&&Array.isArray(t[0])?o(e,t,n,i):r(e,t,n,i)},e.exports.nested=o,e.exports.flat=r},9172:(e,t,n)=>{var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},9219:e=>{e.exports=function(e,t){return e.has(t)}},9276:(e,t,n)=>{var r=n(117);function o(e,t,n,i,a,s){r.has(i,t)||(i[t]=!0,n||s.push(t),r.each(a(t),function(t){o(e,t,n,i,a,s)}),n&&s.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);o(e,t,"post"===n,s,i,a)}),a}},9302:(e,t,n)=>{var r=n(3488),o=n(6757),i=n(2865);e.exports=function(e,t){return i(o(e,t,r),e+"")}},9325:(e,t,n)=>{var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},9326:(e,t,n)=>{var r=n(1769),o=n(2428),i=n(6449),a=n(361),s=n(294),u=n(7797);e.exports=function(e,t,n){for(var l=-1,c=(t=r(t,e)).length,f=!1;++l{var r=n(3805),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9456:(e,t,n)=>{"use strict";n.d(t,{I2:()=>s,YM:()=>u,qQ:()=>a});var r,o=n(472),i=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,a=function(e){var t=(0,o.kJ)();t&&(t._cdn=e),r=e},s=function(){var e,t=null!=r?r:null===(e=(0,o.kJ)())||void 0===e?void 0:e._cdn;if(t)return t;var n,a=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach(function(e){var t,r=null!==(t=e.getAttribute("src"))&&void 0!==t?t:"",o=i.exec(r);o&&o[1]&&(n=o[1])}),n);return a||"https://cdn.segment.com"},u=function(){var e=s();return"".concat(e,"/next-integrations")}},9564:(e,t,n)=>{var r=n(2543),o=n(6718);function i(e,t,n,r,i,a){var s={width:0,height:0,rank:a,borderType:t},u=i[t][a-1],l=o.addDummyNode(e,"border",s,n);i[t][a]=l,e.setParent(l,r),u&&e.setEdge(u,l,{weight:1})}e.exports=function(e){r.forEach(e.children(),function t(n){var o=e.children(n),a=e.node(n);if(o.length&&r.forEach(o,t),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,u=a.maxRank+1;s{var r=n(7334),o=n(3243),i=n(3488),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},9637:(e,t,n)=>{"use strict";var r=n(2543);function o(e){r.forEach(e.nodes(),function(t){i(e.node(t))}),r.forEach(e.edges(),function(t){i(e.edge(t))})}function i(e){var t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||o(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),function(t){a(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"y")&&a(n)})}(e),"lr"!==t&&"rl"!==t||(function(e){r.forEach(e.nodes(),function(t){s(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)})}(e),o(e))}}},9653:(e,t,n)=>{var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},9698:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},9708:(e,t,n)=>{var r=n(2543),o=n(6718);function i(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}e.exports=function(e,t){var n,a=o.partition(e,function(e){return r.has(e,"barycenter")}),s=a.lhs,u=r.sortBy(a.rhs,function(e){return-e.i}),l=[],c=0,f=0,h=0;s.sort((n=!!t,function(e,t){return e.barycentert.barycenter?1:n?t.i-e.i:e.i-t.i})),h=i(l,u,h),r.forEach(s,function(e){h+=e.vs.length,l.push(e.vs),c+=e.barycenter*e.weight,f+=e.weight,h=i(l,u,h)});var d={vs:r.flatten(l,!0)};return f&&(d.barycenter=c/f,d.weight=f),d}},9752:(e,t,n)=>{var r=n(3729),o=n(9344),i=n(641),a=n(5389),s=n(8879),u=n(6449),l=n(3656),c=n(1882),f=n(3805),h=n(7167);e.exports=function(e,t,n){var d=u(e),p=d||l(e)||h(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=p?d?new v:[]:f(e)&&c(v)?o(s(e)):{}}return(p?r:i)(e,function(e,r,o){return t(n,e,r,o)}),n}},9754:(e,t,n)=>{var r=n(3729),o=n(909),i=n(4066),a=n(6449);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},9770:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n{var r=n(7237)("length");e.exports=r},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},9839:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof window}function o(){return!r()}n.d(t,{B:()=>r,S:()=>o})},9888:(e,t,n)=>{var r=n(117);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))}),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},9905:e=>{e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r{e.exports=function(){return!1}},9952:(e,t,n)=>{"use strict";n.d(t,{d:()=>u,j:()=>l});var r=n(6e3),o=n(3172),i=n(1635),a=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce(function(e,t){var n,r,o,a=(0,i.Cl)((0,i.Cl)({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete a.time;var s=null!==(o=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==o?o:"";return e[s]&&(s="".concat(s,"-").concat(Math.random())),(0,i.Cl)((0,i.Cl)({},e),((n={})[s]=a,n))},{});console.table?console.table(e):console.log(e)}else this.logs.forEach(function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")});this._logs=[]},e}(),s=n(6490),u=function(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""},l=function(){function e(e,t,n,o){void 0===t&&(t=(0,r.v4)()),void 0===n&&(n=new s.r),void 0===o&&(o=new a),this.attempts=0,this.event=e,this._id=t,this.logger=o,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new u({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return(0,o.J)(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}()},9999:(e,t,n)=>{var r=n(7217),o=n(3729),i=n(6547),a=n(4733),s=n(3838),u=n(3290),l=n(3007),c=n(2271),f=n(8948),h=n(2),d=n(3349),p=n(5861),v=n(6189),g=n(7199),y=n(5529),m=n(6449),b=n(3656),_=n(7730),w=n(3805),x=n(8440),E=n(5950),O=n(7241),S="[object Arguments]",T="[object Function]",P="[object Object]",C={};C[S]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C[P]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C[T]=C["[object WeakMap]"]=!1,e.exports=function e(t,n,A,k,I,R){var j,M=1&n,N=2&n,D=4&n;if(A&&(j=I?A(t,k,I,R):A(t)),void 0!==j)return j;if(!w(t))return t;var L=m(t);if(L){if(j=v(t),!M)return l(t,j)}else{var B=p(t),F=B==T||"[object GeneratorFunction]"==B;if(b(t))return u(t,M);if(B==P||B==S||F&&!I){if(j=N||F?{}:y(t),!M)return N?f(t,s(j,t)):c(t,a(j,t))}else{if(!C[B])return I?t:{};j=g(t,B,M)}}R||(R=new r);var U=R.get(t);if(U)return U;R.set(t,j),x(t)?t.forEach(function(r){j.add(e(r,n,A,r,t,R))}):_(t)&&t.forEach(function(r,o){j.set(o,e(r,n,A,o,t,R))});var z=L?void 0:(D?N?d:h:N?O:E)(t);return o(z||t,function(r,o){z&&(r=t[o=r]),i(j,o,e(r,n,A,o,t,R))}),j}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,n)=>(a.f[n](e,t),t),[])),a.u=e=>(({10:"tsub-middleware",50:"ajs-destination",104:"schemaFilter",248:"auto-track",521:"remoteMiddleware",538:"queryString",574:"CoseBilkentLayout",654:"HierarchicalLayout",694:"legacyVideos"}[e]||e)+".js"),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="NVLBase:",a.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var s,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c{s.onerror=s.onload=null,clearTimeout(d);var o=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(e=>e(r)),t)return t(r)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),u&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.p="",(()=>{a.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={152:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((n,o)=>r=e[t]=[n,o]);n.push(r[2]=o);var i=a.p+a.u(t),s=new Error;a.l(i,n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,r[1](s)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,s,u]=n,l=0;if(i.some(t=>0!==e[t])){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);u&&u(a)}for(t&&t(n);l{"use strict";a.r(s),a.d(s,{NVL:()=>Vp});var e={};function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function i(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}a.r(e),a.d(e,{coseBilkentLayoutFallbackWorker:()=>fh,createCoseBilkentLayoutWorker:()=>hh,createHierarchicalLayoutWorker:()=>Ih,hierarchicalLayoutFallbackWorker:()=>kh});var d="undefined"==typeof window?null:window,p=d?d.navigator:null;d&&d.document;var v,g,y,m,b,_,w,x,E,O,S,T,P,C,A,k,I,R,j,M,N,D,L,B,F,U,z,V,W=f(""),G=f({}),H=f(function(){}),Y="undefined"==typeof HTMLElement?"undefined":f(HTMLElement),q=function(e){return e&&e.instanceString&&K(e.instanceString)?e.instanceString():null},X=function(e){return null!=e&&f(e)==W},K=function(e){return null!=e&&f(e)===H},Z=function(e){return!ee(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},$=function(e){return null!=e&&f(e)===G&&!Z(e)&&e.constructor===Object},Q=function(e){return null!=e&&f(e)===f(1)&&!isNaN(e)},J=function(e){return"undefined"===Y?void 0:null!=e&&e instanceof HTMLElement},ee=function(e){return te(e)||ne(e)},te=function(e){return"collection"===q(e)&&e._private.single},ne=function(e){return"collection"===q(e)&&!e._private.single},re=function(e){return"core"===q(e)},oe=function(e){return"stylesheet"===q(e)},ie=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},ae=function(e){return function(e){return null!=e&&f(e)===G}(e)&&K(e.then)},se=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},be=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n255)return;t.push(Math.floor(i))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var u=n[4];if(void 0!==u){if((u=parseFloat(u))<0||u>1)return;t.push(u)}}return t}(e)||function(e){var t,n,r,o,i,a,s,u;function l(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+ge+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(o=parseFloat(c[3]))<0||o>100)return;if(o/=100,void 0!==(i=c[4])&&((i=parseFloat(i))<0||i>1))return;if(0===r)a=s=u=Math.round(255*o);else{var f=o<.5?o*(1+r):o+r-o*r,h=2*o-f;a=Math.round(255*l(h,f,n+1/3)),s=Math.round(255*l(h,f,n)),u=Math.round(255*l(h,f,n-1/3))}t=[a,s,u,i]}return t}(e)},we={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},xe=function(e){for(var t=e.map,n=e.keys,r=n.length,o=0;o=a||t<0||g&&e-p>=c}function _(){var e=t();if(b(e))return w(e);h=setTimeout(_,function(e){var t=a-(e-d);return g?o(t,c-(e-p)):t}(e))}function w(e){return h=void 0,y&&u?m(e):(u=l=void 0,f)}function x(){var e=t(),n=b(e);if(u=arguments,l=this,d=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(_,a),v?m(e):f}(d);if(g)return clearTimeout(h),h=setTimeout(_,a),m(d)}return void 0===h&&(h=setTimeout(_,a)),f}return a=n(a)||0,e(s)&&(v=!!s.leading,c=(g="maxWait"in s)?r(n(s.maxWait)||0,a):c,y="trailing"in s?!!s.trailing:y),x.cancel=function(){void 0!==h&&clearTimeout(h),p=0,u=d=l=h=void 0},x.flush=function(){return void 0===h?f:w(t())},x}}()),Re=d?d.performance:null,je=Re&&Re.now?function(){return Re.now()}:function(){return Date.now()},Me=function(){if(d){if(d.requestAnimationFrame)return function(e){d.requestAnimationFrame(e)};if(d.mozRequestAnimationFrame)return function(e){d.mozRequestAnimationFrame(e)};if(d.webkitRequestAnimationFrame)return function(e){d.webkitRequestAnimationFrame(e)};if(d.msRequestAnimationFrame)return function(e){d.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(je())},1e3/60)}}(),Ne=function(e){return Me(e)},De=je,Le=9261,Be=5381,Fe=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le;!(t=e.next()).done;)n=65599*n+t.value|0;return n},Ue=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le)+e|0},ze=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Be;return(t<<5)+t+e|0},Ve=function(e){return 2097152*e[0]+e[1]},We=function(e,t){return[Ue(e[0],t[0]),ze(e[1],t[1])]},Ge=function(e,t){var n={value:0,done:!1},r=0,o=e.length;return Fe({next:function(){return r=0;r--)e[r]===t&&e.splice(r,1)},ft=function(e){e.splice(0,e.length)},ht=function(e,t,n){return n&&(t=ce(n,t)),e[t]},dt=function(e,t,n,r){n&&(t=ce(n,t)),e[t]=r},pt="undefined"!=typeof Map?Map:function(){return r(function e(){n(this,e),this._obj={}},[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}])}(),vt=function(){return r(function e(t){if(n(this,e),this._obj=Object.create(null),this.size=0,null!=t){var r;r=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var o=0;o2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&re(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var o=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new gt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==o.position.x&&(o.position.x=0),null==o.position.y&&(o.position.y=0),t.renderedPosition){var i=t.renderedPosition,a=e.pan(),s=e.zoom();o.position={x:(i.x-a.x)/s,y:(i.y-a.y)/s}}var u=[];Z(t.classes)?u=t.classes:X(t.classes)&&(u=t.classes.split(/\s+/));for(var l=0,c=u.length;lt?1:0},u=function(e,r,o,i,a){var s;if(null==o&&(o=0),null==a&&(a=t),o<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);or;0<=r?t++:t--)l.push(t);return l}.apply(this).reverse()).length;iv;0<=v?++h:--h)g.push(o(e,i));return g},d=function(e,n,r,o){var i,a,s;for(null==o&&(o=t),i=e[r];r>n&&o(i,a=e[s=r-1>>1])<0;)e[r]=a,r=s;return e[r]=i},p=function(e,n,r){var o,i,a,s,u;for(null==r&&(r=t),i=e.length,u=n,a=e[n],o=2*n+1;o0;){var w=y.pop(),x=v(w),E=w.id();if(f[E]=x,x!==1/0)for(var O=w.neighborhood().intersect(d),S=0;S0)for(n.unshift(t);c[o];){var i=c[o];n.unshift(i.edge),n.unshift(i.node),o=(r=i.node).id()}return a.spawn(n)}}}},At={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,o=n.length,i=new Array(o),a=n,s=function(e){for(var t=0;t0;){if(_(),x++,l===f){for(var E=[],O=o,S=f,T=m[S];E.unshift(O),null!=T&&E.unshift(T),null!=(O=y[S]);)T=m[S=O.id()];return{found:!0,distance:h[l],path:this.spawn(E),steps:x}}p[l]=!0;for(var P=u._private.edges,C=0;CT&&(d[S]=T,y[S]=O,m[S]=_),!o){var P=O*l+E;!o&&d[P]>T&&(d[P]=T,y[P]=E,m[P]=_)}}}for(var C=0;C1&&void 0!==arguments[1]?arguments[1]:i,r=[],o=m(e);;){if(null==o)return t.spawn();var a=y(o),u=a.edge,l=a.pred;if(r.unshift(o[0]),o.same(n)&&r.length>0)break;null!=u&&r.unshift(u),o=l}return s.spawn(r)},hasNegativeWeightCycle:p,negativeWeightCycles:v}}},Dt=Math.sqrt(2),Lt=function(e,t,n){0===n.length&&nt("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],o=r[1],i=r[2],a=t[o],s=t[i],u=n,l=u.length-1;l>=0;l--){var c=u[l],f=c[1],h=c[2];(t[f]===a&&t[h]===s||t[f]===s&&t[h]===a)&&u.splice(l,1)}for(var d=0;dr;){var o=Math.floor(Math.random()*t.length);t=Lt(o,e,t),n--}return t},Ft={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy(function(e){return e.isLoop()});var o=n.length,i=r.length,a=Math.ceil(Math.pow(Math.log(o)/Math.LN2,2)),s=Math.floor(o/Dt);if(!(o<2)){for(var u=[],l=0;l0?1:e<0?-1:0},Yt=function(e,t){return Math.sqrt(qt(e,t))},qt=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Xt=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Jt=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},en=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},tn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},nn=function(e){var t,n,r,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===i.length)t=n=r=o=i[0];else if(2===i.length)t=r=i[0],o=n=i[1];else if(4===i.length){var a=u(i,4);t=a[0],n=a[1],r=a[2],o=a[3]}return e.x1-=o,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},rn=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},on=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},an=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},sn=function(e,t){return an(e,t.x,t.y)},un=function(e,t){return an(e,t.x1,t.y1)&&an(e,t.x2,t.y2)},ln=null!==(Ot=Math.hypot)&&void 0!==Ot?Ot:function(e,t){return Math.sqrt(e*e+t*t)};var cn=function(e,t,n,r,o,i,a){var s,u,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===l?An(o,i):l,f=o/2,h=i/2,d=(c=Math.min(c,f,h))!==f,p=c!==h;if(d){var v=r-h-a;if((s=xn(e,t,n,r,n-f+c-a,v,n+f-c+a,v,!1)).length>0)return s}if(p){var g=n+f+a;if((s=xn(e,t,n,r,g,r-h+c-a,g,r+h-c+a,!1)).length>0)return s}if(d){var y=r+h+a;if((s=xn(e,t,n,r,n-f+c-a,y,n+f-c+a,y,!1)).length>0)return s}if(p){var m=n-f-a;if((s=xn(e,t,n,r,m,r-h+c-a,m,r+h-c+a,!1)).length>0)return s}var b=n-f+c,_=r-h+c;if((u=_n(e,t,n,r,b,_,c+a)).length>0&&u[0]<=b&&u[1]<=_)return[u[0],u[1]];var w=n+f-c,x=r-h+c;if((u=_n(e,t,n,r,w,x,c+a)).length>0&&u[0]>=w&&u[1]<=x)return[u[0],u[1]];var E=n+f-c,O=r+h-c;if((u=_n(e,t,n,r,E,O,c+a)).length>0&&u[0]>=E&&u[1]>=O)return[u[0],u[1]];var S=n-f+c,T=r+h-c;return(u=_n(e,t,n,r,S,T,c+a)).length>0&&u[0]<=S&&u[1]>=T?[u[0],u[1]]:[]},fn=function(e,t,n,r,o,i,a){var s=a,u=Math.min(n,o),l=Math.max(n,o),c=Math.min(r,i),f=Math.max(r,i);return u-s<=e&&e<=l+s&&c-s<=t&&t<=f+s},hn=function(e,t,n,r,o,i,a,s,u){var l=Math.min(n,a,o)-u,c=Math.max(n,a,o)+u,f=Math.min(r,s,i)-u,h=Math.max(r,s,i)+u;return!(ec||th)},dn=function(e,t,n,r,o,i,a,s){var u=[];!function(e,t,n,r,o){var i,a,s,u,l,c,f,h;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),i=(a=(3*n-t*t)/9)*a*a+(s/=54)*s,o[1]=0,f=t/3,i>0?(l=(l=s+Math.sqrt(i))<0?-Math.pow(-l,1/3):Math.pow(l,1/3),c=(c=s-Math.sqrt(i))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),o[0]=-f+l+c,f+=(l+c)/2,o[4]=o[2]=-f,f=Math.sqrt(3)*(-c+l)/2,o[3]=f,o[5]=-f):(o[5]=o[3]=0,0===i?(h=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),o[0]=2*h-f,o[4]=o[2]=-(h+f)):(u=(a=-a)*a*a,u=Math.acos(s/Math.sqrt(u)),h=2*Math.sqrt(a),o[0]=-f+h*Math.cos(u/3),o[2]=-f+h*Math.cos((u+2*Math.PI)/3),o[4]=-f+h*Math.cos((u+4*Math.PI)/3)))}(1*n*n-4*n*o+2*n*a+4*o*o-4*o*a+a*a+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s,9*n*o-3*n*n-3*n*a-6*o*o+3*o*a+9*r*i-3*r*r-3*r*s-6*i*i+3*i*s,3*n*n-6*n*o+n*a-n*e+2*o*o+2*o*e-a*e+3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t,1*n*o-n*n+n*e-o*e+r*i-r*r+r*t-i*t,u);for(var l=[],c=0;c<6;c+=2)Math.abs(u[c+1])<1e-7&&u[c]>=0&&u[c]<=1&&l.push(u[c]);l.push(1),l.push(0);for(var f,h,d,p=-1,v=0;v=0?du?(e-o)*(e-o)+(t-i)*(t-i):l-f},vn=function(e,t,n){for(var r,o,i,a,s=0,u=0;u=e&&e>=i||r<=e&&e<=i))continue;(e-r)/(i-r)*(a-o)+o>t&&s++}return s%2!=0},gn=function(e,t,n,r,o,i,a,s,u){var l,c=new Array(n.length);null!=s[0]?(l=Math.atan(s[1]/s[0]),s[0]<0?l+=Math.PI/2:l=-l-Math.PI/2):l=s;for(var f,h=Math.cos(-l),d=Math.sin(-l),p=0;p0){var v=mn(c,-u);f=yn(v)}else f=c;return vn(e,t,f)},yn=function(e){for(var t,n,r,o,i,a,s,u,l=new Array(e.length/2),c=0;c=0&&p<=1&&g.push(p),v>=0&&v<=1&&g.push(v),0===g.length)return[];var y=g[0]*s[0]+e,m=g[0]*s[1]+t;return g.length>1?g[0]==g[1]?[y,m]:[y,m,g[1]*s[0]+e,g[1]*s[1]+t]:[y,m]},wn=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},xn=function(e,t,n,r,o,i,a,s,u){var l=e-o,c=n-e,f=a-o,h=t-i,d=r-t,p=s-i,v=f*h-p*l,g=c*h-d*l,y=p*c-f*d;if(0!==y){var m=v/y,b=g/y,_=-.001;return _<=m&&m<=1.001&&_<=b&&b<=1.001||u?[e+m*c,t+m*d]:[]}return 0===v||0===g?wn(e,n,a)===a?[a,s]:wn(e,n,o)===o?[o,i]:wn(o,a,n)===n?[n,r]:[]:[]},En=function(e,t,n,r,o){var i=[],a=r/2,s=o/2,u=t,l=n;i.push({x:u+a*e[0],y:l+s*e[1]});for(var c=1;c0){var m=mn(v,-s);l=yn(m)}else l=v}else l=n;for(var b=0;bl&&(l=t)},f=function(e){return u[e]},h=0;h0?_.edgesTo(b)[0]:b.edgesTo(_)[0];var w=r(m);b=b.id(),l[b]>l[v]+w&&(l[b]=l[v]+w,h.nodes.indexOf(b)<0?h.push(b):h.updateItem(b),u[b]=0,n[b]=[]),l[b]==l[v]+w&&(u[b]=u[b]+u[v],n[b].push(v))}else for(var x=0;x0;){for(var T=t.pop(),P=0;P0&&a.push(n[s]);0!==a.length&&o.push(r.collection(a))}return o}(c,u,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:$n,a=r,s=0;s=2?rr(e,t,n,0,er,tr):rr(e,t,n,0,Jn)},squaredEuclidean:function(e,t,n){return rr(e,t,n,0,er)},manhattan:function(e,t,n){return rr(e,t,n,0,Jn)},max:function(e,t,n){return rr(e,t,n,-1/0,nr)}};function ir(e,t,n,r,o,i){var a;return a=K(e)?e:or[e]||or.euclidean,0===t&&K(e)?a(o,i):a(t,n,r,o,i)}or["squared-euclidean"]=or.squaredEuclidean,or.squaredeuclidean=or.squaredEuclidean;var ar=lt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),sr=function(e){return ar(e)},ur=function(e,t,n,r,o){var i="kMedoids"!==o?function(e){return n[e]}:function(e){return r[e](n)},a=n,s=t;return ir(e,r.length,i,function(e){return r[e](t)},a,s)},lr=function(e,t,n){for(var r=n.length,o=new Array(r),i=new Array(r),a=new Array(t),s=null,u=0;un)return!1;return!0},pr=function(e,t,n){for(var r=0;ro&&(o=t[u][l],i=l);a[i].push(e[u])}for(var c=0;c=o.threshold||"dendrogram"===o.mode&&1===e.length)return!1;var d,p=t[a],v=t[r[a]];d="dendrogram"===o.mode?{left:p,right:v,key:p.key}:{value:p.value.concat(v.value),key:p.key},e[p.index]=d,e.splice(v.index,1),t[p.key]=d;for(var g=0;gn[v.key][y.key]&&(i=n[v.key][y.key])):"max"===o.linkage?(i=n[p.key][y.key],n[p.key][y.key]a&&(i=u,a=t[o*e+u])}i>0&&r.push(i)}for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var i=0,a=e.length-1;a>=0;a--){var s=e[a];o?isFinite(s)||(e[a]=-1/0,i++):e.splice(a,1)}r&&e.sort(function(e,t){return e-t});var u=e.length,l=Math.floor(u/2);return u%2!=0?e[l+1+i]:(e[l-1+i]+e[l+i])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,o=0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,o=t;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,o=t;o=T?(P=T,T=A,C=k):A>P&&(P=A);for(var I=0;I0?1:0;E[x%l.minIterations*t+L]=B,D+=B}if(D>0&&(x>=l.minIterations-1||x==l.maxIterations-1)){for(var F=0,U=0;U0&&r.push(o);return r}(t,i,a),W=function(e,t,n){for(var r=Ir(e,t,n),o=0;ou&&(s=l,u=c)}n[o]=i[s]}return Ir(e,t,n)}(t,r,V),G={},H=0;H1)}});var u=Object.keys(t).filter(function(e){return t[e].cutVertex}).map(function(t){return e.getElementById(t)});return{cut:e.spawn(u),components:o}},Dr=function(){var e=this,t={},n=0,r=[],o=[],i=e.spawn(e),a=function(s){if(o.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach(function(e){var n=e.target().id();n!==s&&(n in t||a(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))}),t[s].index===t[s].low){for(var u=e.spawn();;){var l=o.pop();if(u.merge(e.getElementById(l)),t[l].low=t[s].index,t[l].explored=!0,l===s)break}var c=u.edgesWith(u),f=u.merge(c);r.push(f),i=i.difference(f)}};return e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||a(n)}}),{cut:i,components:r}},Lr={};[bt,Ct,At,It,jt,Nt,Ft,Mn,Dn,Bn,Un,Zn,_r,Cr,jr,{hierholzer:function(e){if(!$(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,o,i=Mr(e),a=i.root,s=i.directed,u=this,l=!1;a&&(o=X(a)?this.filter(a)[0].id():a[0].id());var c={},f={};s?u.forEach(function(e){var t=e.id();if(e.isNode()){var o=e.indegree(!0),i=e.outdegree(!0),a=o-i,s=i-o;1==a?n?l=!0:n=t:1==s?r?l=!0:r=t:(s>1||a>1)&&(l=!0),c[t]=[],e.outgoers().forEach(function(e){e.isEdge()&&c[t].push(e.id())})}else f[t]=[void 0,e.target().id()]}):u.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?l=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach(function(e){return c[t].push(e.id())})):f[t]=[e.source().id(),e.target().id()]});var h={found:!1,trail:void 0};if(l)return h;if(r&&n)if(s){if(o&&r!=o)return h;o=r}else{if(o&&r!=o&&n!=o)return h;o||(o=r)}else o||(o=u[0].id());var d=function(e){for(var t,n,r,o=e,i=[e];c[o].length;)t=c[o].shift(),n=f[t][0],o!=(r=f[t][1])?(c[r]=c[r].filter(function(e){return e!=t}),o=r):s||o==n||(c[n]=c[n].filter(function(e){return e!=t}),o=n),i.unshift(t),i.unshift(o);return i},p=[],v=[];for(v=d(o);1!=v.length;)0==c[v[0]].length?(p.unshift(u.getElementById(v.shift())),p.unshift(u.getElementById(v.shift()))):v=d(v.shift()).concat(v);for(var g in p.unshift(u.getElementById(v.shift())),c)if(c[g].length)return h;return h.found=!0,h.trail=this.spawn(p,!0),h}},{hopcroftTarjanBiconnected:Nr,htbc:Nr,htb:Nr,hopcroftTarjanBiconnectedComponents:Nr},{tarjanStronglyConnected:Dr,tsc:Dr,tscc:Dr,tarjanStronglyConnectedComponents:Dr}].forEach(function(e){be(Lr,e)});var Br=function(e){if(!(this instanceof Br))return new Br(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Br.prototype={fulfill:function(e){return Fr(this,1,"fulfillValue",e)},reject:function(e){return Fr(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new Br;return n.onFulfilled.push(Vr(e,r,"fulfill")),n.onRejected.push(Vr(t,r,"reject")),Ur(n),r.proxy}};var Fr=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Ur(e)),e},Ur=function(e){1===e.state?zr(e,"onFulfilled",e.fulfillValue):2===e.state&&zr(e,"onRejected",e.rejectReason)},zr=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var o=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}}(),o=function(){if(Fo)return Bo;Fo=1;var e=Ri();return Bo=function(t,n){var r=this.__data__,o=e(r,t);return o<0?(++this.size,r.push([t,n])):r[o][1]=n,this},Bo}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&t%1==0&&t0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){Z(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,o=[],i=0,a=n.length;i0&&this.spawn(o).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}};ha.className=ha.classNames=ha.classes;var da={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:de,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};da.variable="(?:[\\w-.]|(?:\\\\"+da.metaChar+"))+",da.className="(?:[\\w-]|(?:\\\\"+da.metaChar+"))+",da.value=da.string+"|"+da.number,da.id=da.variable,function(){var e,t,n;for(e=da.comparatorOp.split("|"),n=0;n=0||"="!==t&&(da.comparatorOp+="|\\!"+t)}();var pa=20,va=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(e,t){return function(e,t){return-1*me(e,t)}(e.selector,t.selector)}),ga=function(){for(var e,t={},n=0;n0&&l.edgeCount>0)return ot("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(l.edgeCount>1)return ot("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&ot("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return X(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(o,i){return o.checks.reduce(function(a,s,u){return a+(i===o&&0===u?"$":"")+function(o,i){var a=o.type,s=o.value;switch(a){case 0:var u=e(s);return u.substring(0,u.length-1);case 3:var l=o.field,c=o.operator;return"["+l+n(e(c))+t(s)+"]";case 5:var f=o.operator,h=o.field;return"["+e(f)+h+"]";case 4:return"["+o.field+"]";case 6:var d=o.operator;return"[["+o.field+n(e(d))+t(s)+"]]";case 7:return s;case 8:return"#"+s;case 9:return"."+s;case 17:case 15:return r(o.parent,i)+n(">")+r(o.child,i);case 18:case 16:return r(o.ancestor,i)+" "+r(o.descendant,i);case 19:var p=r(o.left,i),v=r(o.subject,i),g=r(o.right,i);return p+(p.length>0?" ":"")+v+g;case pa:return""}}(s,i)},"")},o="",i=0;i1&&i=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),l=!0),(a||u||l)&&(o=a||s?""+e:"",i=""+n),l&&(e=o=o.toLowerCase(),n=i=i.toLowerCase()),t){case"*=":r=o.indexOf(i)>=0;break;case"$=":r=o.indexOf(i,o.length-i.length)>=0;break;case"^=":r=0===o.indexOf(i);break;case"=":r=e===n;break;case">":f=!0,r=e>n;break;case">=":f=!0,r=e>=n;break;case"<":f=!0,r=e0;){var l=o.shift();t(l),i.add(l.id()),a&&r(o,i,l)}return e}function Da(e,t,n){if(n.isParent())for(var r=n._private.children,o=0;o1&&void 0!==arguments[1])||arguments[1],Da)},Ma.forEachUp=function(e){return Na(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],La)},Ma.forEachUpAndDown=function(e){return Na(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Ba)},Ma.ancestors=Ma.parents,(Ia=Ra={data:ca.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:ca.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:ca.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ca.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:ca.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:ca.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Ia.data,Ia.removeAttr=Ia.removeData;var Fa,Ua,za=Ra,Va={};function Wa(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,o=n[0],i=o._private.edges,a=0;at}),minIndegree:Ga("indegree",function(e,t){return et}),minOutdegree:Ga("outdegree",function(e,t){return et})}),be(Va,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=l;l&&(u=u[0]);var f=c?u.position():{x:0,y:0};return o={x:s.x-f.x,y:s.y-f.y},void 0===e?o:o[e]}for(var h=0;h0,g=v;v&&(p=p[0]);var y=g?p.position():{x:0,y:0};void 0!==t?d.position(e,t+y[e]):void 0!==o&&d.position({x:o.x+y.x,y:o.y+y.y})}}else if(!i)return;return this}},Fa.modelPosition=Fa.point=Fa.position,Fa.modelPositions=Fa.points=Fa.positions,Fa.renderedPoint=Fa.renderedPosition,Fa.relativePoint=Fa.relativePosition;var qa,Xa,Ka=Ua;qa=Xa={},Xa.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),o=n.pan(),i=t.x1*r+o.x,a=t.x2*r+o.x,s=t.y1*r+o.y,u=t.y2*r+o.y;return{x1:i,x2:a,y1:s,y2:u,w:a-i,h:u-s}},Xa.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}}),this):this},Xa.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,o={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),a=t.position;0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=a.x-i.w/2,i.x2=a.x+i.w/2,i.y1=a.y-i.h/2,i.y2=a.y+i.h/2);var s=o.width.left.value;"px"===o.width.left.units&&o.width.val>0&&(s=100*s/o.width.val);var u=o.width.right.value;"px"===o.width.right.units&&o.width.val>0&&(u=100*u/o.width.val);var l=o.height.top.value;"px"===o.height.top.units&&o.height.val>0&&(l=100*l/o.height.val);var c=o.height.bottom.value;"px"===o.height.bottom.units&&o.height.val>0&&(c=100*c/o.height.val);var f=y(o.width.val-i.w,s,u),h=f.biasDiff,d=f.biasComplementDiff,p=y(o.height.val-i.h,l,c),v=p.biasDiff,g=p.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,o.width.val),a.x=(-h+i.x1+i.x2+d)/2,t.autoHeight=Math.max(i.h,o.height.val),a.y=(-v+i.y1+i.y2+g)/2}function y(e,t,n){var r=0,o=0,i=t+n;return e>0&&i>0&&(r=t/i*e,o=n/i*e),{biasDiff:r,biasComplementDiff:o}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?o:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},Qa=function(e,t){return null==t?e:$a(e,t.x1,t.y1,t.x2,t.y2)},Ja=function(e,t,n){return ht(e,t,n)},es=function(e,t,n){if(!t.cy().headless()){var r,o,i=t._private,a=i.rstyle,s=a.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=a.srcX,o=a.srcY):"target"===n?(r=a.tgtX,o=a.tgtY):(r=a.midX,o=a.midY);var u=i.arrowBounds=i.arrowBounds||{},l=u[n]=u[n]||{};l.x1=r-s,l.y1=o-s,l.x2=r+s,l.y2=o+s,l.w=l.x2-l.x1,l.h=l.y2-l.y1,tn(l,1),$a(e,l.x1,l.y1,l.x2,l.y2)}}},ts=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var o=t._private,i=o.rstyle;if(t.pstyle(r+"label").strValue){var a,s,u,l,c=t.pstyle("text-halign"),f=t.pstyle("text-valign"),h=Ja(i,"labelWidth",n),d=Ja(i,"labelHeight",n),p=Ja(i,"labelX",n),v=Ja(i,"labelY",n),g=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),_=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,x=t.pstyle("text-background-padding").pfValue,E=d,O=h,S=O/2,T=E/2;if(m)a=p-S,s=p+S,u=v-T,l=v+T;else{switch(c.value){case"left":a=p-O,s=p;break;case"center":a=p-S,s=p+S;break;case"right":a=p,s=p+O}switch(f.value){case"top":u=v-E,l=v;break;case"center":u=v-T,l=v+T;break;case"bottom":u=v,l=v+E}}var P=g-Math.max(_,w)-x-2,C=g+Math.max(_,w)+x+2,A=y-Math.max(_,w)-x-2,k=y+Math.max(_,w)+x+2;a+=P,s+=C,u+=A,l+=k;var I=n||"main",R=o.labelBounds,j=R[I]=R[I]||{};j.x1=a,j.y1=u,j.x2=s,j.y2=l,j.w=s-a,j.h=l-u,j.leftPad=P,j.rightPad=C,j.topPad=A,j.botPad=k;var M=m&&"autorotate"===b.strValue,N=null!=b.pfValue&&0!==b.pfValue;if(M||N){var D=M?Ja(o.rstyle,"labelAngle",n):b.pfValue,L=Math.cos(D),B=Math.sin(D),F=(a+s)/2,U=(u+l)/2;if(!m){switch(c.value){case"left":F=s;break;case"right":F=a}switch(f.value){case"top":U=l;break;case"bottom":U=u}}var z=function(e,t){return{x:(e-=F)*L-(t-=U)*B+F,y:e*B+t*L+U}},V=z(a,u),W=z(a,l),G=z(s,u),H=z(s,l);a=Math.min(V.x,W.x,G.x,H.x),s=Math.max(V.x,W.x,G.x,H.x),u=Math.min(V.y,W.y,G.y,H.y),l=Math.max(V.y,W.y,G.y,H.y)}var Y=I+"Rot",q=R[Y]=R[Y]||{};q.x1=a,q.y1=u,q.x2=s,q.y2=l,q.w=s-a,q.h=l-u,$a(e,a,u,s,l),$a(o.labelBounds.all,a,u,s,l)}return e}},ns=function(e,t){if(!t.cy().headless()){var n=t.pstyle("outline-opacity").value,r=t.pstyle("outline-width").value+t.pstyle("outline-offset").value;rs(e,t,n,r,"outside",r/2)}},rs=function(e,t,n,r,o,i){if(!(0===n||r<=0||"inside"===o)){var a=t.cy(),s=t.pstyle("shape").value,u=a.renderer().nodeShapes[s],l=t.position(),c=l.x,f=l.y,h=t.width(),d=t.height();if(u.hasMiterBounds){"center"===o&&(r/=2);var p=u.miterBounds(c,f,h,d,r);Qa(e,p)}else null!=i&&i>0&&nn(e,[i,i,i,i])}},os=function(e){var t=0,n=function(e){return(e?1:0)<(r=C[1].x)){var A=n;n=r,r=A}if(o>(i=C[1].y)){var k=o;o=i,i=k}$a(h,n-E,o-E,r+E,i+E)}}else if("bezier"===P||"unbundled-bezier"===P||he(P,"segments")||he(P,"taxi")){var I;switch(P){case"bezier":case"unbundled-bezier":I=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":I=g.linePts}if(null!=I)for(var R=0;R(r=N.x)){var D=n;n=r,r=D}if((o=M.y)>(i=N.y)){var L=o;o=i,i=L}$a(h,n-=E,o-=E,r+=E,i+=E)}if(c&&t.includeEdges&&v&&(es(h,e,"mid-source"),es(h,e,"mid-target"),es(h,e,"source"),es(h,e,"target")),c&&"yes"===e.pstyle("ghost").value){var B=e.pstyle("ghost-offset-x").pfValue,F=e.pstyle("ghost-offset-y").pfValue;$a(h,h.x1+B,h.y1+F,h.x2+B,h.y2+F)}var U=d.bodyBounds=d.bodyBounds||{};rn(U,h),nn(U,y),tn(U,1),c&&(n=h.x1,r=h.x2,o=h.y1,i=h.y2,$a(h,n-x,o-x,r+x,i+x));var z=d.overlayBounds=d.overlayBounds||{};rn(z,h),nn(z,y),tn(z,1);var V=d.labelBounds=d.labelBounds||{};null!=V.all?((u=V.all).x1=1/0,u.y1=1/0,u.x2=-1/0,u.y2=-1/0,u.w=0,u.h=0):V.all=Qt(),c&&t.includeLabels&&(t.includeMainLabels&&ts(h,e,null),v&&(t.includeSourceLabels&&ts(h,e,"source"),t.includeTargetLabels&&ts(h,e,"target")))}return h.x1=Za(h.x1),h.y1=Za(h.y1),h.x2=Za(h.x2),h.y2=Za(h.y2),h.w=Za(h.x2-h.x1),h.h=Za(h.y2-h.y1),h.w>0&&h.h>0&&b&&(nn(h,y),tn(h,1)),h}(e,ss),r.bbCache=n,r.bbCachePosKey=is(e)):n=r.bbCache,!i){var a=e.isNode();n=Qt(),(t.includeNodes&&a||t.includeEdges&&!a)&&(t.includeOverlays?Qa(n,r.overlayBounds):Qa(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!o||t.includeSourceLabels&&t.includeTargetLabels)?Qa(n,r.labelBounds.all):(t.includeMainLabels&&Qa(n,r.labelBounds.mainRot),t.includeSourceLabels&&Qa(n,r.labelBounds.sourceRot),t.includeTargetLabels&&Qa(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},ss={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},us=os(ss),ls=lt(ss);Xa.boundingBox=function(e){var t,n=void 0===e||void 0===e.useCache||!0===e.useCache,r=se(function(e){var t=e._private;return null==t.bbCache||t.styleDirty||t.bbCachePosKey!==is(e)},function(e){return e.id()});if(n&&1===this.length&&!r(this[0]))e=void 0===e?ss:ls(e),t=as(this[0],e);else{t=Qt();var o=ls(e=e||ss),i=this,a=i.cy().styleEnabled();this.edges().forEach(r),this.nodes().forEach(r),a&&this.recalculateRenderedStyle(n),this.updateCompoundBounds(!n);for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:Os,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)a(s);return this},Ts.removeAllListeners=function(){return this.removeListener("*")},Ts.emit=Ts.trigger=function(e,t,n){var r=this.listeners,o=r.length;return this.emitting++,Z(t)||(t=[t]),function(e,t,n){if("event"!==q(n))if($(n))t(e,Cs(e,n));else for(var r=Z(n)?n:n.split(/\s+/),o=0;o1&&!r){var o=this.length-1,i=this[o],a=i._private.data.id;this[o]=void 0,this[e]=i,n.set(a,{ele:i,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var o=r.index;return this.unmergeAt(o),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&X(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],r=this,o=0;or&&(r=s,n=a)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,o=this,i=0;i=0&&o1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n));var o=n._private.style[e];return null!=o?o:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,o=n.style();if($(e)){var i=e;o.applyBypass(this,i,r),this.emitAndNotify("style")}else if(X(e)){if(void 0===t){var a=this[0];return a?o.getStylePropertyValue(a,e):void 0}o.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?o.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),o=this;if(void 0===e)for(var i=0;i0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),Js.neighbourhood=Js.neighborhood,Js.closedNeighbourhood=Js.closedNeighborhood,Js.openNeighbourhood=Js.openNeighborhood,be(Js,{source:ja(function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t},"source"),target:ja(function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t},"target"),sources:ru({attr:"source"}),targets:ru({attr:"target"})}),be(Js,{edgesWith:ja(ou(),"edgesWith"),edgesTo:ja(ou({thisIsSrc:!0}),"edgesTo")}),be(Js,{connectedEdges:ja(function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),Js.componentsOf=Js.components;var au=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var o=new pt,i=!1;if(t){if(t.length>0&&$(t[0])&&!te(t[0])){i=!0;for(var a=[],s=new gt,u=0,l=t.length;u0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this,i=o.cy(),a=i._private,s=[],u=[],l=0,c=o.length;l0){for(var M=e.length===o.length?o:new au(i,e),N=0;N0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],o={},i=n._private.cy;function a(e){var n=o[e.id()];t&&e.removed()||n||(o[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?E.emitAndNotify("remove"):t&&E.emit("remove"));for(var O=0;O=.001?function(t,r){for(var o=0;o<4;++o){var i=h(r,e,n);if(0===i)return r;r-=(f(r,e,n)-t)/i}return r}(t,a):0===u?a:function(t,r,o){var i,a,s=0;do{(i=f(a=r+(o-r)/2,e,n)-t)>0?o=a:r=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+o)}(i),t,r)};p.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var v="generateBezier("+[e,t,n,r]+")";return p.toString=function(){return v},p}var cu=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var o={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:o.v,dv:e(o)}}function n(n,r){var o={dx:n.v,dv:e(n)},i=t(n,.5*r,o),a=t(n,.5*r,i),s=t(n,r,a),u=1/6*(o.dx+2*(i.dx+a.dx)+s.dx),l=1/6*(o.dv+2*(i.dv+a.dv)+s.dv);return n.x=n.x+u*r,n.v=n.v+l*r,n}return function e(t,r,o){var i,a,s,u={x:-1,v:0,tension:null,friction:null},l=[0],c=0,f=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,o=o||null,u.tension=t,u.friction=r,a=(i=null!==o)?(c=e(t,r))/o*.016:.016;s=n(s||u,a),l.push(1+s.x),c+=16,Math.abs(s.x)>f&&Math.abs(s.v)>f;);return i?function(e){return l[e*(l.length-1)|0]}:c}}(),fu=function(e,t,n,r){var o=lu(e,t,n,r);return function(e,t,n){return e+(t-e)*o(n)}},hu={linear:function(e,t,n){return e+(t-e)*n},ease:fu(.25,.1,.25,1),"ease-in":fu(.42,0,1,1),"ease-out":fu(0,0,.58,1),"ease-in-out":fu(.42,0,.58,1),"ease-in-sine":fu(.47,0,.745,.715),"ease-out-sine":fu(.39,.575,.565,1),"ease-in-out-sine":fu(.445,.05,.55,.95),"ease-in-quad":fu(.55,.085,.68,.53),"ease-out-quad":fu(.25,.46,.45,.94),"ease-in-out-quad":fu(.455,.03,.515,.955),"ease-in-cubic":fu(.55,.055,.675,.19),"ease-out-cubic":fu(.215,.61,.355,1),"ease-in-out-cubic":fu(.645,.045,.355,1),"ease-in-quart":fu(.895,.03,.685,.22),"ease-out-quart":fu(.165,.84,.44,1),"ease-in-out-quart":fu(.77,0,.175,1),"ease-in-quint":fu(.755,.05,.855,.06),"ease-out-quint":fu(.23,1,.32,1),"ease-in-out-quint":fu(.86,0,.07,1),"ease-in-expo":fu(.95,.05,.795,.035),"ease-out-expo":fu(.19,1,.22,1),"ease-in-out-expo":fu(1,0,0,1),"ease-in-circ":fu(.6,.04,.98,.335),"ease-out-circ":fu(.075,.82,.165,1),"ease-in-out-circ":fu(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return hu.linear;var r=cu(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":fu};function du(e,t,n,r,o){if(1===r)return n;if(t===n)return n;var i=o(t,n,r);return null==e||((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max&&(i=Math.min(i,e.max))),i}function pu(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function vu(e,t,n,r,o){var i=null!=o?o.type:null;n<0?n=0:n>1&&(n=1);var a=pu(e,o),s=pu(t,o);if(Q(a)&&Q(s))return du(i,a,s,n,r);if(Z(a)&&Z(s)){for(var u=[],l=0;l0?("spring"===f&&h.push(a.duration),a.easingImpl=hu[f].apply(null,h)):a.easingImpl=hu[f]}var d,p=a.easingImpl;if(d=0===a.duration?1:(n-u)/a.duration,a.applying&&(d=a.progress),d<0?d=0:d>1&&(d=1),null==a.delay){var v=a.startPosition,g=a.position;if(g&&o&&!e.locked()){var y={};yu(v.x,g.x)&&(y.x=vu(v.x,g.x,d,p)),yu(v.y,g.y)&&(y.y=vu(v.y,g.y,d,p)),e.position(y)}var m=a.startPan,b=a.pan,_=i.pan,w=null!=b&&r;w&&(yu(m.x,b.x)&&(_.x=vu(m.x,b.x,d,p)),yu(m.y,b.y)&&(_.y=vu(m.y,b.y,d,p)),e.emit("pan"));var x=a.startZoom,E=a.zoom,O=null!=E&&r;O&&(yu(x,E)&&(i.zoom=$t(i.minZoom,vu(x,E,d,p),i.maxZoom)),e.emit("zoom")),(w||O)&&e.emit("viewport");var S=a.style;if(S&&S.length>0&&o){for(var T=0;T=0;t--)(0,e[t])();e.splice(0,e.length)},c=i.length-1;c>=0;c--){var f=i[c],h=f._private;h.stopped?(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,l(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||mu(0,f,e),gu(t,f,e,n),h.applying&&(h.applying=!1),l(h.frames),null!=h.step&&h.step(e),f.completed()&&(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,l(h.completes)),s=!0)}return n||0!==i.length||0!==a.length||r.push(t),s}for(var i=!1,a=0;a0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var _u={animate:ca.animate(),animation:ca.animation(),animated:ca.animated(),clearQueue:ca.clearQueue(),delay:ca.delay(),delayAnimation:ca.delayAnimation(),stop:ca.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender(function(t,n){bu(n,e)},t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&Ne(function(n){bu(n,e),t()})}()}}},wu={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&te(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},xu=function(e){return X(e)?new Ca(e):e},Eu={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Ss(wu,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,xu(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,xu(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,xu(t),n),this},once:function(e,t,n){return this.emitter().one(e,xu(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};ca.eventAliasesOn(Eu);var Ou={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Ou.jpeg=Ou.jpg;var Su={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,r=e.name,o=t.extension("layout",r);if(null!=o)return n=X(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new o(be({},e,{cy:t,eles:n}));nt("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else nt("A `name` must be specified to make a layout");else nt("Layout options must be specified to make a layout")}};Su.createLayout=Su.makeLayout=Su.layout;var Tu={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var o=this.renderer();!this.destroyed()&&o&&o.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Cu.invalidateDimensions=Cu.resize;var Au={collection:function(e,t){return X(e)?this.$(e):ee(e)?e.collection():Z(e)?(t||(t={}),new au(this,e,t.unique,t.removed)):new au(this)},nodes:function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Au.elements=Au.filter=Au.$;var ku={},Iu="t";ku.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(h||f&&d){var p=void 0;h&&d||h?p=l.properties:d&&(p=l.mappedProperties);for(var v=0;v1&&(g=1),s.color){var w=o.valueMin[0],x=o.valueMax[0],E=o.valueMin[1],O=o.valueMax[1],S=o.valueMin[2],T=o.valueMax[2],P=null==o.valueMin[3]?1:o.valueMin[3],C=null==o.valueMax[3]?1:o.valueMax[3],A=[Math.round(w+(x-w)*g),Math.round(E+(O-E)*g),Math.round(S+(T-S)*g),Math.round(P+(C-P)*g)];n={bypass:o.bypass,name:o.name,value:A,strValue:"rgb("+A[0]+", "+A[1]+", "+A[2]+")"}}else{if(!s.number)return!1;var k=o.valueMin+(o.valueMax-o.valueMin)*g;n=this.parse(o.name,k,o.bypass,h)}if(!n)return v(),!1;n.mapping=o,o=n;break;case a.data:for(var I=o.field.split("."),R=f.data,j=0;j0&&i>0){for(var s={},u=!1,l=0;l0?e.delayAnimation(a).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:i,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(e,o),e.emitAndNotify("style"),r.transitioning=!1})}else r.transitioning&&(this.removeBypasses(e,o),e.emitAndNotify("style"),r.transitioning=!1)},ku.checkTrigger=function(e,t,n,r,o,i){var a=this.properties[t],s=o(a);e.removed()||null!=s&&s(n,r,e)&&i(a)},ku.checkZOrderTrigger=function(e,t,n,r){var o=this;this.checkTrigger(e,t,n,r,function(e){return e.triggersZOrder},function(){o._private.cy.notify("zorder",e)})},ku.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})},ku.checkConnectedEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfConnectedEdges},function(t){e.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},ku.checkParallelEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfParallelEdges},function(t){e.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},ku.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r),this.checkConnectedEdgesBoundsTrigger(e,t,n,r),this.checkParallelEdgesBoundsTrigger(e,t,n,r)};var Ru={applyBypass:function(e,t,n,r){var o=[];if("*"===t||"**"===t){if(void 0!==n)for(var i=0;it.length?i.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");!i.match(/^\s*$/);){var u=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!u){ot("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=u[0];var l=u[1];if("core"!==l&&new Ca(l).invalid)ot("Skipping parsing of block: Invalid selector found in string stylesheet: "+l),a();else{var c=u[2],f=!1;n=c;for(var h=[];!n.match(/^\s*$/);){var d=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!d){ot("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),f=!0;break}r=d[0];var p=d[1],v=d[2];this.properties[p]?o.parse(p,v)?(h.push({name:p,val:v}),s()):(ot("Skipping property: Invalid property definition in: "+r),s()):(ot("Skipping property: Invalid property name in: "+r),s())}if(f){a();break}o.selector(l);for(var g=0;g=7&&"d"===t[0]&&(l=new RegExp(s.data.regex).exec(t))){if(n)return!1;var h=s.data;return{name:e,value:l,strValue:""+t,mapped:h,field:l[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(f.multiple)return!1;var d=s.mapData;if(!f.color&&!f.number)return!1;var p=this.parse(e,c[4]);if(!p||p.mapped)return!1;var v=this.parse(e,c[5]);if(!v||v.mapped)return!1;if(p.pfValue===v.pfValue||p.strValue===v.strValue)return ot("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+p.strValue+"`"),this.parse(e,p.strValue);if(f.color){var g=p.value,y=v.value;if(!(g[0]!==y[0]||g[1]!==y[1]||g[2]!==y[2]||g[3]!==y[3]&&(null!=g[3]&&1!==g[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:d,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:p.value,valueMax:v.value,bypass:n}}}if(f.multiple&&"multiple"!==r){var m;if(m=u?t.split(/\s+/):Z(t)?t:[t],f.evenMultiple&&m.length%2!=0)return null;for(var b=[],_=[],w=[],x="",E=!1,O=0;O0?" ":"")+S.strValue}return f.validate&&!f.validate(b,_)?null:f.singleEnum&&E?1===b.length&&X(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:w,strValue:x,bypass:n,units:_}}var T,P,C=function(){for(var r=0;rf.max||f.strictMax&&t===f.max))return null;var j={name:e,value:t,strValue:""+t+(A||""),units:A,bypass:n};return f.unitless||"px"!==A&&"em"!==A?j.pfValue=t:j.pfValue="px"!==A&&A?this.getEmSizeInPixels()*t:t,"ms"!==A&&"s"!==A||(j.pfValue="ms"===A?t:1e3*t),"deg"!==A&&"rad"!==A||(j.pfValue="rad"===A?t:(T=t,Math.PI*T/180)),"%"===A&&(j.pfValue=t/100),j}if(f.propList){var M=[],N=""+t;if("none"===N);else{for(var D=N.split(/\s*,\s*|\s+/),L=0;L0&&u>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*t)/n.w,(u-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,o=r.pan,i=r.zoom,a=!1;if(r.zoomingEnabled||(a=!0),Q(e)?n=e:$(e)&&(n=e.level,null!=e.position?t=Ut(e.position,i,o):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(a=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?i=!0:(t.zoom=s,o.push("zoom"))}if(r&&(!i||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;Q(u.x)&&(t.pan.x=u.x,a=!1),Q(u.y)&&(t.pan.y=u.y,a=!1),a||o.push("pan")}return o.length>0&&(o.push("viewport"),this.emit(o.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(X(e)){var n=e;e=this.mutableElements().filter(n)}else ee(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),o=this.width(),i=this.height();return{x:(o-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=this.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};Vu.centre=Vu.center,Vu.autolockNodes=Vu.autolock,Vu.autoungrabifyNodes=Vu.autoungrabify;var Wu={data:ca.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:ca.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:ca.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ca.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Wu.attr=Wu.data,Wu.removeAttr=Wu.removeData;var Gu=function(e){var t=this,n=(e=be({},e)).container;n&&!J(n)&&J(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var o=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var i=void 0!==d&&void 0!==n&&!e.headless,a=e;a.layout=be({name:i?"grid":"null"},a.layout),a.renderer=be({name:i?"canvas":"null"},a.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},u=this._private={container:n,ready:!1,options:a,elements:new au(this),listeners:[],aniEles:new au(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,a.zoomingEnabled),userZoomingEnabled:s(!0,a.userZoomingEnabled),panningEnabled:s(!0,a.panningEnabled),userPanningEnabled:s(!0,a.userPanningEnabled),boxSelectionEnabled:s(!0,a.boxSelectionEnabled),autolock:s(!1,a.autolock,a.autolockNodes),autoungrabify:s(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:s(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?i:a.styleEnabled,zoom:Q(a.zoom)?a.zoom:1,pan:{x:$(a.pan)&&Q(a.pan.x)?a.pan.x:0,y:$(a.pan)&&Q(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,a.multiClickDebounceTime)};this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),u.styleEnabled&&t.setStyle([]);var l=be({},a,a.renderer);t.initRenderer(l),function(e,t){if(e.some(ae))return Gr.all(e).then(t);t(e)}([a.style,a.elements],function(e){var n=e[0],i=e[1];u.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var o=t.mutableElements();o.length>0&&o.remove(),null!=e&&($(e)||Z(e))&&t.add(e),t.one("layoutready",function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",r),t.emit("done")});var i=be({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,function(){t.startAnimationLoop(),u.ready=!0,K(a.ready)&&t.on("ready",a.ready);for(var e=0;e0,u=!!t.boundingBox,l=Qt(u?t.boundingBox:structuredClone(n.extent()));if(ee(t.roots))e=t.roots;else if(Z(t.roots)){for(var c=[],f=0;f0;){var A=C(),k=O(A,T);if(k)A.outgoers().filter(function(e){return e.isNode()&&r.has(e)}).forEach(P);else if(null===k){ot("Detected double maximal shift for node `"+A.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var I=0;if(t.avoidOverlap)for(var R=0;R0&&y[0].length<=3?i/2:0),s=2*Math.PI/y[r].length*o;return 0===r&&1===y[0].length&&(a=1),{x:H+a*Math.cos(s),y:Y+a*Math.sin(s)}}var c=y[r].length,f=Math.max(1===c?0:u?(l.w-2*t.padding-q.w)/((t.grid?$:c)-1):(l.w-2*t.padding-q.w)/((t.grid?$:c)+1),I);return{x:H+(o+1-(c+1)/2)*f,y:Y+(r+1-(F+1)/2)*K}}(e),l,Q[t.direction])}),this};var $u={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Qu(e){this.options=be({},$u,e)}Qu.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,o=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));for(var a,s=Qt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),u=s.x1+s.w/2,l=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/i.length:t.sweep)/Math.max(1,i.length-1),f=0,h=0;h1&&t.avoidOverlap){f*=1.75;var g=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(f*f/(g*g+y*y));a=Math.max(m,a)}return r.nodes().layoutPositions(this,t,function(e,n){var r=t.startAngle+n*c*(o?1:-1),i=a*Math.cos(r),s=a*Math.sin(r);return{x:u+i,y:l+s}}),this};var Ju,el={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function tl(e){this.options=be({},el,e)}tl.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,o=t.eles,i=o.nodes().not(":parent"),a=Qt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=a.x1+a.w/2,u=a.y1+a.h/2,l=[],c=0,f=0;f0&&Math.abs(m[0].value-_.value)>=g&&(m=[],y.push(m)),m.push(_)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var x=y.length>0&&y[0].length>1,E=(Math.min(a.w,a.h)/2-w)/(y.length+x?1:0);w=Math.min(w,E)}for(var O=0,S=0;S1&&t.avoidOverlap){var A=Math.cos(C)-Math.cos(0),k=Math.sin(C)-Math.sin(0),I=Math.sqrt(w*w/(A*A+k*k));O=Math.max(I,O)}T.r=O,O+=w}if(t.equidistant){for(var R=0,j=0,M=0;M=e.numIter||(cl(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&i(),Ne(c)):(xl(r,e),s())};c()}else{for(;l;)l=a(u),u++;xl(r,e),s()}return this},rl.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},rl.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var ol=function(e,t,n){for(var r=n.eles.edges(),o=n.eles.nodes(),i=Qt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),a={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:o.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:i.w,clientHeight:i.h,boundingBox:i},s=n.eles.components(),u={},l=0;l0)for(a.graphSet.push(w),l=0;lr.count?0:r.graph},al=function(e,t,n,r){var o=r.graphSet[n];if(-10)var s=(l=r.nodeOverlap*a)*o/(v=Math.sqrt(o*o+i*i)),u=l*i/v;else{var l,c=vl(e,o,i),f=vl(t,-1*o,-1*i),h=f.x-c.x,d=f.y-c.y,p=h*h+d*d,v=Math.sqrt(p);s=(l=(e.nodeRepulsion+t.nodeRepulsion)/p)*h/v,u=l*d/v}e.isLocked||(e.offsetX-=s,e.offsetY-=u),t.isLocked||(t.offsetX+=s,t.offsetY+=u)}},pl=function(e,t,n,r){if(n>0)var o=e.maxX-t.minX;else o=t.maxX-e.minX;if(r>0)var i=e.maxY-t.minY;else i=t.maxY-e.minY;return o>=0&&i>=0?Math.sqrt(o*o+i*i):0},vl=function(e,t,n){var r=e.positionX,o=e.positionY,i=e.height||1,a=e.width||1,s=n/t,u=i/a,l={};return 0===t&&0n?(l.x=r,l.y=o+i/2,l):0t&&-1*u<=s&&s<=u?(l.x=r-a/2,l.y=o-a*n/2/t,l):0=u)?(l.x=r+i*t/2/n,l.y=o+i/2,l):0>n&&(s<=-1*u||s>=u)?(l.x=r-i*t/2/n,l.y=o-i/2,l):l},gl=function(e,t){for(var n=0;n1){var p=t.gravity*f/d,v=t.gravity*h/d;c.offsetX+=p,c.offsetY+=v}}}}},ml=function(e,t){var n=[],r=0,o=-1;for(n.push.apply(n,e.graphSet[0]),o+=e.graphSet[0].length;r<=o;){var i=n[r++],a=e.idToIndex[i],s=e.layoutNodes[a],u=s.children;if(0n)var o={x:n*e/r,y:n*t/r};else o={x:e,y:t};return o},wl=function(e,t){var n=e.parentId;if(null!=n){var r=t.layoutNodes[t.idToIndex[n]],o=!1;return(null==r.maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,o=!0),(null==r.minX||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,o=!0),(null==r.minY||e.minY-r.padTopp&&(f+=d+t.componentSpacing,c=0,h=0,d=0)}}},El={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Ol(e){this.options=be({},El,e)}Ol.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,o=r.nodes().not(":parent");t.sort&&(o=o.sort(t.sort));var i=Qt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.nodes().layoutPositions(this,t,function(e){return{x:i.x1,y:i.y1}});else{var a=o.size(),s=Math.sqrt(a*i.h/i.w),u=Math.round(s),l=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(u,l);Math.min(u,l)==u?u=e:l=e},f=function(e){if(null==e)return Math.max(u,l);Math.max(u,l)==u?u=e:l=e},h=t.rows,d=null!=t.cols?t.cols:t.columns;if(null!=h&&null!=d)u=h,l=d;else if(null!=h&&null==d)u=h,l=Math.ceil(a/u);else if(null==h&&null!=d)l=d,u=Math.ceil(a/l);else if(l*u>a){var p=c(),v=f();(p-1)*v>=a?c(p-1):(v-1)*p>=a&&f(v-1)}else for(;l*u=a?f(y+1):c(g+1)}var m=i.w/l,b=i.h/u;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var _=0;_=l&&(I=0,k++)},j={},M=0;M(r=pn(e,t,_[w],_[w+1],_[w+2],_[w+3])))return g(n,r),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(_=i.allpts,w=0;w+5(r=dn(e,t,_[w],_[w+1],_[w+2],_[w+3],_[w+4],_[w+5])))return g(n,r),!0;m=m||o.source,b=b||o.target;var x=a.getArrowWidth(u,c),E=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return ht(e,t,n)}function _(n,r){var o,i=n._private,a=p;o=r?r+"-":"",n.boundingBox();var s=i.labelBounds[r||"main"],u=n.pstyle(o+"label").value;if("yes"===n.pstyle("text-events").strValue&&u){var l=b(i.rscratch,"labelX",r),c=b(i.rscratch,"labelY",r),f=b(i.rscratch,"labelAngle",r),h=n.pstyle(o+"text-margin-x").pfValue,d=n.pstyle(o+"text-margin-y").pfValue,v=s.x1-a-h,y=s.x2+a-h,m=s.y1-a-d,_=s.y2+a-d;if(f){var w=Math.cos(f),x=Math.sin(f),E=function(e,t){return{x:(e-=l)*w-(t-=c)*x+l,y:e*x+t*w+c}},O=E(v,m),S=E(v,_),T=E(y,m),P=E(y,_),C=[O.x+h,O.y+d,T.x+h,T.y+d,P.x+h,P.y+d,S.x+h,S.y+d];if(vn(e,t,C))return g(n),!0}else if(an(s,e,t))return g(n),!0}}n&&(u=u.interactive);for(var w=u.length-1;w>=0;w--){var x=u[w];x.isNode()?y(x)||_(x):m(x)||_(x)||_(x,"source")||_(x,"target")}return l},getAllInBox:function(e,t,n,r){var o=this.getCachedZSortedEles().interactive,i=2/this.cy.zoom(),a=[],s=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),f=Math.max(t,r),h=Qt({x1:e=s,y1:t=c,x2:n=l,y2:r=f}),d=[{x:h.x1,y:h.y1},{x:h.x2,y:h.y1},{x:h.x2,y:h.y2},{x:h.x1,y:h.y2}],p=[[d[0],d[1]],[d[1],d[2]],[d[2],d[3]],[d[3],d[0]]];function v(e,t,n){return ht(e,t,n)}function g(e,t){var n=e._private,r=i;e.boundingBox();var o=n.labelBounds.main;if(!o)return null;var a=v(n.rscratch,"labelX",t),s=v(n.rscratch,"labelY",t),u=v(n.rscratch,"labelAngle",t),l=e.pstyle("text-margin-x").pfValue,c=e.pstyle("text-margin-y").pfValue,f=o.x1-r-l,h=o.x2+r-l,d=o.y1-r-c,p=o.y2+r-c;if(u){var g=Math.cos(u),y=Math.sin(u),m=function(e,t){return{x:(e-=a)*g-(t-=s)*y+a,y:e*y+t*g+s}};return[m(f,d),m(h,d),m(h,p),m(f,p)]}return[{x:f,y:d},{x:h,y:d},{x:h,y:p},{x:f,y:p}]}function y(e,t,n,r){function o(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}return o(e,n,r)!==o(t,n,r)&&o(e,t,n)!==o(e,t,r)}for(var m=0;m4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(function(e,t,n,r,o){var i,a;if(e!==ec?rc(t,e,tc):((a=tc).x=-1*(i=nc).x,a.y=-1*i.y,a.nx=-1*i.nx,a.ny=-1*i.ny,a.ang=i.ang>0?-(Math.PI-i.ang):Math.PI+i.ang),rc(t,n,nc),Ul=tc.nx*nc.ny-tc.ny*nc.nx,zl=tc.nx*nc.nx-tc.ny*-nc.ny,Gl=Math.asin(Math.max(-1,Math.min(1,Ul))),Math.abs(Gl)<1e-6)return Bl=t.x,Fl=t.y,void(Yl=Xl=0);Vl=1,Wl=!1,zl<0?Gl<0?Gl=Math.PI+Gl:(Gl=Math.PI-Gl,Vl=-1,Wl=!0):Gl>0&&(Vl=-1,Wl=!0),Xl=void 0!==t.radius?t.radius:r,Hl=Gl/2,Kl=Math.min(tc.len/2,nc.len/2),o?(ql=Math.abs(Math.cos(Hl)*Xl/Math.sin(Hl)))>Kl?(ql=Kl,Yl=Math.abs(ql*Math.sin(Hl)/Math.cos(Hl))):Yl=Xl:(ql=Math.min(Kl,Xl),Yl=Math.abs(ql*Math.sin(Hl)/Math.cos(Hl))),Ql=t.x+nc.nx*ql,Jl=t.y+nc.ny*ql,Bl=Ql-nc.ny*Yl*Vl,Fl=Jl+nc.nx*Yl*Vl,Zl=t.x+tc.nx*ql,$l=t.y+tc.ny*ql,ec=t}(e,t,n,r,o),{cx:Bl,cy:Fl,radius:Yl,startX:Zl,startY:$l,stopX:Ql,stopY:Jl,startAngle:tc.ang+Math.PI/2*Vl,endAngle:nc.ang-Math.PI/2*Vl,counterClockwise:Wl})}var ac=.01,sc=Math.sqrt(.02),uc={};function lc(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},P=T(O,x),C=T(S,E),A=!1;"auto"===g?v=Math.abs(P)>Math.abs(C)?o:r:g===u||g===s?(v=r,A=!0):g!==i&&g!==a||(v=o,A=!0);var k,I=v===r,R=I?C:P,j=I?S:O,M=Ht(j),N=!1;A&&(m||_)||!(g===s&&j<0||g===u&&j>0||g===i&&j>0||g===a&&j<0)||(R=(M*=-1)*Math.abs(R),N=!0);var D=function(e){return Math.abs(e)=Math.abs(R)},L=D(k=m?(b<0?1+b:b)*R:(b<0?R:0)+b*M),B=D(Math.abs(R)-Math.abs(k));if(!L&&!B||N)if(I){var F=l.y1+k+(p?f/2*M:0),U=l.x1,z=l.x2;n.segpts=[U,F,z,F]}else{var V=l.x1+k+(p?c/2*M:0),W=l.y1,G=l.y2;n.segpts=[V,W,V,G]}else if(I){var H=Math.abs(j)<=f/2,Y=Math.abs(O)<=h/2;if(H){var q=(l.x1+l.x2)/2,X=l.y1,K=l.y2;n.segpts=[q,X,q,K]}else if(Y){var Z=(l.y1+l.y2)/2,$=l.x1,Q=l.x2;n.segpts=[$,Z,Q,Z]}else n.segpts=[l.x1,l.y2]}else{var J=Math.abs(j)<=c/2,ee=Math.abs(S)<=d/2;if(J){var te=(l.y1+l.y2)/2,ne=l.x1,re=l.x2;n.segpts=[ne,te,re,te]}else if(ee){var oe=(l.x1+l.x2)/2,ie=l.y1,ae=l.y2;n.segpts=[oe,ie,oe,ae]}else n.segpts=[l.x2,l.y1]}if(n.isRound){var se=e.pstyle("taxi-radius").value,ue="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(ue)}},uc.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,o=t.tgtPos,i=t.srcW,a=t.srcH,s=t.tgtW,u=t.tgtH,l=t.srcShape,c=t.tgtShape,f=t.srcCornerRadius,h=t.tgtCornerRadius,d=t.srcRs,p=t.tgtRs,v=!Q(n.startX)||!Q(n.startY),g=!Q(n.arrowStartX)||!Q(n.arrowStartY),y=!Q(n.endX)||!Q(n.endY),m=!Q(n.arrowEndX)||!Q(n.arrowEndY),b=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,_=Yt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=_v.poolIndex()){var g=p;p=v,v=g}var y=f.srcPos=p.position(),m=f.tgtPos=v.position(),b=f.srcW=p.outerWidth(),_=f.srcH=p.outerHeight(),x=f.tgtW=v.outerWidth(),E=f.tgtH=v.outerHeight(),O=f.srcShape=n.nodeShapes[t.getNodeShape(p)],S=f.tgtShape=n.nodeShapes[t.getNodeShape(v)],T=f.srcCornerRadius="auto"===p.pstyle("corner-radius").value?"auto":p.pstyle("corner-radius").pfValue,P=f.tgtCornerRadius="auto"===v.pstyle("corner-radius").value?"auto":v.pstyle("corner-radius").pfValue,C=f.tgtRs=v._private.rscratch,A=f.srcRs=p._private.rscratch;f.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var k=0;k=sc||(G=Math.sqrt(Math.max(W*W,ac)+Math.max(V*V,ac)));var H=f.vector={x:W,y:V},Y=f.vectorNorm={x:H.x/G,y:H.y/G},q={x:-Y.y,y:Y.x};f.nodesOverlap=!Q(G)||S.checkPoint(D[0],D[1],0,x,E,m.x,m.y,P,C)||O.checkPoint(B[0],B[1],0,b,_,y.x,y.y,T,A),f.vectorNormInverse=q,e={nodesOverlap:f.nodesOverlap,dirCounts:f.dirCounts,calculatedIntersection:!0,hasBezier:f.hasBezier,hasUnbundled:f.hasUnbundled,eles:f.eles,srcPos:m,srcRs:C,tgtPos:y,tgtRs:A,srcW:x,srcH:E,tgtW:b,tgtH:_,srcIntn:F,tgtIntn:L,srcShape:S,tgtShape:O,posPts:{x1:z.x2,y1:z.y2,x2:z.x1,y2:z.y1},intersectionPts:{x1:U.x2,y1:U.y2,x2:U.x1,y2:U.y1},vector:{x:-H.x,y:-H.y},vectorNorm:{x:-Y.x,y:-Y.y},vectorNormInverse:{x:-q.x,y:-q.y}}}var X=N?e:f;R.nodesOverlap=X.nodesOverlap,R.srcIntn=X.srcIntn,R.tgtIntn=X.tgtIntn,R.isRound=j.startsWith("round"),r&&(p.isParent()||p.isChild()||v.isParent()||v.isChild())&&(p.parents().anySame(v)||v.parents().anySame(p)||p.same(v)&&p.isParent())?t.findCompoundLoopPoints(I,X,k,M):p===v?t.findLoopPoints(I,X,k,M):j.endsWith("segments")?t.findSegmentsPoints(I,X):j.endsWith("taxi")?t.findTaxiPoints(I,X):"straight"===j||!M&&f.eles.length%2==1&&k===Math.floor(f.eles.length/2)?t.findStraightEdgePoints(I):t.findBezierPoints(I,X,k,M,N),t.findEndpoints(I),t.tryToCorrectInvalidPoints(I,X),t.checkForInvalidEdgeWarning(I),t.storeAllpts(I),t.storeEdgeProjections(I),t.calculateArrowAngles(I),t.recalculateEdgeLabelProjections(I),t.calculateLabelAngles(I)}},w=0;w0){var J=d,ee=qt(J,Vt(i)),te=qt(J,Vt($)),ne=ee;te2&&qt(J,{x:$[2],y:$[3]})0){var ge=p,ye=qt(ge,Vt(i)),me=qt(ge,Vt(ve)),be=ye;me2&&qt(ge,{x:ve[2],y:ve[3]})=l||m){c={cp:v,segment:y};break}}if(c)break}var b=c.cp,_=c.segment,w=(l-h)/_.length,x=_.t1-_.t0,E=s?_.t0+x*w:_.t1-x*w;E=$t(0,E,1),t=Zt(b.p0,b.p1,b.p2,E),o=function(e,t,n,r){var o=$t(0,r-.001,1),i=$t(0,r+.001,1),a=Zt(e,t,n,o),s=Zt(e,t,n,i);return vc(a,s)}(b.p0,b.p1,b.p2,E);break;case"straight":case"segments":case"haystack":for(var O,S,T,P,C=0,A=r.allpts.length,k=0;k+3=l));k+=2);var I=(l-S)/O;I=$t(0,I,1),t=function(e,t,n,r){var o=t.x-e.x,i=t.y-e.y,a=Yt(e,t),s=o/a,u=i/a;return n=null==n?0:n,r=null!=r?r:n*a,{x:e.x+s*r,y:e.y+u*r}}(T,P,I),o=vc(T,P)}a("labelX",n,t.x),a("labelY",n,t.y),a("labelAutoAngle",n,o)}};l("source"),l("target"),this.applyLabelDimensions(e)}},dc.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},dc.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),o=He(r,e._private.labelDimsKey);if(ht(n.rscratch,"prefixedLabelDimsKey",t)!==o){dt(n.rscratch,"prefixedLabelDimsKey",t,o);var i=this.calculateLabelDimensions(e,r),a=e.pstyle("line-height").pfValue,s=e.pstyle("text-wrap").strValue,u=ht(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==s?1:Math.max(u.length,1),c=i.height/l,f=c*a,h=i.width,d=i.height+(l-1)*(a-1)*c;dt(n.rstyle,"labelWidth",t,h),dt(n.rscratch,"labelWidth",t,h),dt(n.rstyle,"labelHeight",t,d),dt(n.rscratch,"labelHeight",t,d),dt(n.rscratch,"labelLineHeight",t,f)}},dc.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,s=function(e,r){return r?(dt(n.rscratch,e,t,r),r):ht(n.rscratch,e,t)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var u=e.pstyle("text-wrap").value;if("wrap"===u){var l=s("labelKey");if(null!=l&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var c=i.split("\n"),f=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,d=[],p=/[\s\u200b]+|$/g,v=0;vf){var b,_="",w=0,x=o(g.matchAll(p));try{for(x.s();!(b=x.n()).done;){var E=b.value,O=E[0],S=g.substring(w,E.index);w=E.index+O.length;var T=0===_.length?S:_+S+O;this.calculateLabelDimensions(e,T).width<=f?_+=S+O:(_&&d.push(_),_=S+O)}}catch(e){x.e(e)}finally{x.f()}_.match(/^[\s\u200b]+$/)||d.push(_)}else d.push(g)}s("labelWrapCachedLines",d),i=s("labelWrapCachedText",d.join("\n")),s("labelWrapKey",l)}else if("ellipsis"===u){var P=e.pstyle("text-max-width").pfValue,C="",A=!1;if(this.calculateLabelDimensions(e,i).widthP);k++)C+=i[k],k===i.length-1&&(A=!0);return A||(C+="…"),C}return i},dc.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},dc.calculateLabelDimensions=function(e,t){var n=this.cy.window().document,r=e.pstyle("font-style").strValue,o=e.pstyle("font-size").pfValue,i=e.pstyle("font-family").strValue,a=e.pstyle("font-weight").strValue,s=this.labelCalcCanvas,u=this.labelCalcCanvasContext;if(!s){s=this.labelCalcCanvas=n.createElement("canvas"),u=this.labelCalcCanvasContext=s.getContext("2d");var l=s.style;l.position="absolute",l.left="-9999px",l.top="-9999px",l.zIndex="-1",l.visibility="hidden",l.pointerEvents="none"}u.font="".concat(r," ").concat(a," ").concat(o,"px ").concat(i);for(var c=0,f=0,h=t.split("\n"),d=0;d1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var T=o(t);g&&(e.hoverData.tapholdCancelled=!0),n=!0,r(v,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var P=function(e){return{originalEvent:t,type:e,position:{x:c[0],y:c[1]}}},C=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||a.emit(P("boxstart")),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(g){var A=P("cxtdrag");b?b.emit(A):a.emit(A),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(P("cxtdragout")),e.hoverData.cxtOver=v,v&&v.emit(P("cxtdragover")))}}else if(e.hoverData.dragging){if(n=!0,a.panningEnabled()&&a.userPanningEnabled()){var k;if(e.hoverData.justStartedPan){var I=e.hoverData.mdownPos;k={x:(c[0]-I[0])*s,y:(c[1]-I[1])*s},e.hoverData.justStartedPan=!1}else k={x:_[0]*s,y:_[1]*s};a.panBy(k),a.emit(P("dragpan")),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=p[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||v==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),v&&r(v,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=v),b)if(g){if(a.boxSelectionEnabled()&&T)b&&b.grabbed()&&(f(w),b.emit(P("freeon")),w.emit(P("free")),e.dragData.didDrag&&(b.emit(P("dragfreeon")),w.emit(P("dragfree")))),C();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var R=!e.dragData.didDrag;R&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||l(w,{inDragLayer:!0});var j={x:0,y:0};if(Q(_[0])&&Q(_[1])&&(j.x+=_[0],j.y+=_[1],R)){var M=e.hoverData.dragDelta;M&&Q(M[0])&&Q(M[1])&&(j.x+=M[0],j.y+=M[1])}e.hoverData.draggingEles=!0,w.silentShift(j).emit(P("position")).emit(P("drag")),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(_[0]),t.push(_[1])):(t[0]+=_[0],t[1]+=_[1])}();n=!0}else g&&(e.hoverData.dragging||!a.boxSelectionEnabled()||!T&&a.panningEnabled()&&a.userPanningEnabled()?!e.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&i(b,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=Vt(h),e.redrawHint("select",!0),e.redraw()):C(),b&&b.pannable()&&b.active()&&b.unactivate());return p[2]=c[0],p[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}},!1),e.registerBinding(t,"mouseup",function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,a=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,u=e.findNearestElement(a[0],a[1],!0,!1),l=e.dragData.possibleDragElements,c=e.hoverData.down,h=o(t);e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate();var d=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};if(3===e.hoverData.which){var p=d("cxttapend");if(c?c.emit(p):i.emit(p),!e.hoverData.cxtDragged){var v=d("cxttap");c?c.emit(v):i.emit(v)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(u,["mouseup","tapend","vmouseup"],t,{x:a[0],y:a[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:a[0],y:a[1]}),_=!1,t.timeStamp-w<=i.multiClickDebounceTime()?(b&&clearTimeout(b),_=!0,w=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:a[0],y:a[1]})):(b=setTimeout(function(){_||r(c,["oneclick","onetap","voneclick"],t,{x:a[0],y:a[1]})},i.multiClickDebounceTime()),w=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||o(t)||(i.$(n).unselect(["tapunselect"]),l.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=l=i.collection()),u!=c||e.dragData.didDrag||e.hoverData.selecting||null!=u&&u._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||h?u.selected()?u.unselect(["tapunselect"]):u.select(["tapselect"]):h||(i.$(n).unmerge(u).unselect(["tapunselect"]),u.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var g=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),g.length>0&&e.redrawHint("eles",!0),i.emit(d("boxend"));"additive"===i.selectionType()||h||i.$(n).unmerge(g).unselect(),g.emit(d("box")).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(d("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var y=c&&c.grabbed();f(l),y&&(c.emit(d("freeon")),l.emit(d("free")),e.dragData.didDrag&&(c.emit(d("dragfreeon")),l.emit(d("dragfree"))))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}},!1);var E,O,S,T,P,C,A,k,I,R,j,M,N,D,L=[],B=1e5,F=function(t){var n=!1,r=t.deltaY;if(null==r&&(null!=t.wheelDeltaY?r=t.wheelDeltaY/4:null!=t.wheelDelta&&(r=t.wheelDelta/4)),0!==r){if(null==E)if(L.length>=4){var o=L;if(E=function(e){for(var t=0;t5}if(E)for(var a=0;a5&&(r=5*Ht(r)),h=r/-250,E&&(h/=B,h*=3),h*=e.wheelSensitivity,1===t.deltaMode&&(h*=33);var d=s.zoom()*Math.pow(10,h);"gesturechange"===t.type&&(d=e.gestureStartZoom*t.scale),s.zoom({level:d,renderedPosition:{x:f[0],y:f[1]}}),s.emit({type:"gesturechange"===t.type?"pinchzoom":"scrollzoom",originalEvent:t,position:{x:c[0],y:c[1]}})}}}};e.registerBinding(e.container,"wheel",F,!0),e.registerBinding(t,"scroll",function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,"gesturestart",function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()},!0),e.registerBinding(e.container,"gesturechange",function(t){e.hasTouchStarted||F(t)},!0),e.registerBinding(e.container,"mouseout",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})},!1),e.registerBinding(e.container,"mouseover",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})},!1);var U,z,V,W,G,H,Y,q=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},X=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",U=function(t){if(e.hasTouchStarted=!0,m(t)){d(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,o=e.touchData.now,i=e.touchData.earlier;if(t.touches[0]){var a=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);o[0]=a[0],o[1]=a[1]}t.touches[1]&&(a=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),o[2]=a[0],o[3]=a[1]),t.touches[2]&&(a=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),o[4]=a[0],o[5]=a[1]);var u=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(t.touches[1]){e.touchData.singleTouchMoved=!0,f(e.dragData.touchDragEles);var h=e.findContainerClientCoords();R=h[0],j=h[1],M=h[2],N=h[3],O=t.touches[0].clientX-R,S=t.touches[0].clientY-j,T=t.touches[1].clientX-R,P=t.touches[1].clientY-j,D=0<=O&&O<=M&&0<=T&&T<=M&&0<=S&&S<=N&&0<=P&&P<=N;var p=n.pan(),v=n.zoom();if(C=q(O,S,T,P),A=X(O,S,T,P),I=[((k=[(O+T)/2,(S+P)/2])[0]-p.x)/v,(k[1]-p.y)/v],A<4e4&&!t.touches[2]){var g=e.findNearestElement(o[0],o[1],!0,!0),y=e.findNearestElement(o[2],o[3],!0,!0);return g&&g.isNode()?(g.activate().emit(u("cxttapstart")),e.touchData.start=g):y&&y.isNode()?(y.activate().emit(u("cxttapstart")),e.touchData.start=y):n.emit(u("cxttapstart")),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var b=e.findNearestElements(o[0],o[1],!0,!0),_=b[0];if(null!=_&&(_.activate(),e.touchData.start=_,e.touchData.starts=b,e.nodeIsGrabbable(_))){var w=e.dragData.touchDragEles=n.collection(),x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),_.selected()?(x=n.$(function(t){return t.selected()&&e.nodeIsGrabbable(t)}),l(x,{addToList:w})):c(_,{addToList:w}),s(_),_.emit(u("grabon")),x?x.forEach(function(e){e.emit(u("grab"))}):_.emit(u("grab"))}r(_,["touchstart","tapstart","vmousedown"],t,{x:o[0],y:o[1]}),null==_&&(e.data.bgActivePosistion={x:a[0],y:a[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout(function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:o[0],y:o[1]})},e.tapholdDuration)}if(t.touches.length>=1){for(var E=e.touchData.startPosition=[null,null,null,null,null,null],L=0;L=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var x=t.touches[0].clientX-R,E=t.touches[0].clientY-j,k=t.touches[1].clientX-R,M=t.touches[1].clientY-j,N=X(x,E,k,M);if(N/A>=2.25||N>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var L=p("cxttapend");e.touchData.start?(e.touchData.start.unactivate().emit(L),e.touchData.start=null):a.emit(L)}}if(n&&e.touchData.cxt){L=p("cxtdrag"),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(L):a.emit(L),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var B=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&B===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit(p("cxtdragout")),e.touchData.cxtOver=B,B&&B.emit(p("cxtdragover")))}else if(n&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit(p("boxstart")),e.touchData.selecting=!0,e.touchData.didSelect=!0,o[4]=1,o&&0!==o.length&&void 0!==o[0]?(o[2]=(s[0]+s[2]+s[4])/3,o[3]=(s[1]+s[3]+s[5])/3):(o[0]=(s[0]+s[2]+s[4])/3,o[1]=(s[1]+s[3]+s[5])/3,o[2]=(s[0]+s[2]+s[4])/3+1,o[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),te=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var F=0;F0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",V=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",W=function(t){var o=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var a=e.cy,s=a.zoom(),u=e.touchData.now,l=e.touchData.earlier;if(t.touches[0]){var c=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);u[0]=c[0],u[1]=c[1]}t.touches[1]&&(c=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),u[2]=c[0],u[3]=c[1]),t.touches[2]&&(c=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),u[4]=c[0],u[5]=c[1]);var h,d=function(e){return{originalEvent:t,type:e,position:{x:u[0],y:u[1]}}};if(o&&o.unactivate(),e.touchData.cxt){if(h=d("cxttapend"),o?o.emit(h):a.emit(h),!e.touchData.cxtDragged){var p=d("cxttap");o?o.emit(p):a.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&a.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var v=a.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),a.emit(d("boxend")),v.emit(d("box")).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(d("boxselect")),v.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=o&&o.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=o){var y=o._private.grabbed;f(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),y&&(o.emit(d("freeon")),g.emit(d("free")),e.dragData.didDrag&&(o.emit(d("dragfreeon")),g.emit(d("dragfree")))),r(o,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]}),o.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(u[0],u[1],!0,!0);r(m,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]})}var b=e.touchData.startPosition[0]-u[0],_=b*b,w=e.touchData.startPosition[1]-u[1],x=(_+w*w)*s*s;e.touchData.singleTouchMoved||(o||a.$(":selected").unselect(["tapunselect"]),r(o,["tap","vclick"],t,{x:u[0],y:u[1]}),G=!1,t.timeStamp-Y<=a.multiClickDebounceTime()?(H&&clearTimeout(H),G=!0,Y=null,r(o,["dbltap","vdblclick"],t,{x:u[0],y:u[1]})):(H=setTimeout(function(){G||r(o,["onetap","voneclick"],t,{x:u[0],y:u[1]})},a.multiClickDebounceTime()),Y=t.timeStamp)),null!=o&&!e.dragData.didDrag&&o._private.selectable&&x2){for(var d=[c[0],c[1]],p=Math.pow(d[0]-e,2)+Math.pow(d[1]-t,2),v=1;v0)return g[0]}return null},d=Object.keys(f),p=0;p0?l:cn(o,i,e,t,n,r,a,s)},checkPoint:function(e,t,n,r,o,i,a,s){var u=2*(s="auto"===s?An(r,o):s);if(gn(e,t,this.points,i,a,r,o-u,[0,-1],n))return!0;if(gn(e,t,this.points,i,a,r-u,o,[0,-1],n))return!0;var l=r/2+2*n,c=o/2+2*n;return!!vn(e,t,[i-l,a-c,i-l,a,i+l,a,i+l,a-c])||!!bn(e,t,u,u,i+r/2-s,a+o/2-s,n)||!!bn(e,t,u,u,i-r/2+s,a+o/2-s,n)}}},registerNodeShapes:function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",Tn(3,0)),this.generateRoundPolygon("round-triangle",Tn(3,0)),this.generatePolygon("rectangle",Tn(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",Tn(5,0)),this.generateRoundPolygon("round-pentagon",Tn(5,0)),this.generatePolygon("hexagon",Tn(6,0)),this.generateRoundPolygon("round-hexagon",Tn(6,0)),this.generatePolygon("heptagon",Tn(7,0)),this.generateRoundPolygon("round-heptagon",Tn(7,0)),this.generatePolygon("octagon",Tn(8,0)),this.generateRoundPolygon("round-octagon",Tn(8,0));var r=new Array(20),o=Cn(5,0),i=Cn(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s=e.deqFastCost*v)break}else if(o){if(d>=e.deqCost*u||d>=e.deqAvgCost*s)break}else if(p>=e.deqNoDrawCost*Pc)break;var g=e.deq(t,f,c);if(!(g.length>0))break;for(var y=0;y0&&(e.onDeqd(t,l),!o&&e.shouldRedraw(t,l,f,c)&&r())},o(t))}}},Ac=function(){return r(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Je;n(this,e),this.idsByKey=new pt,this.keyForId=new pt,this.cachesByLvl=new pt,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=r},[{key:"getIdsFor",value:function(e){null==e&&nt("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new gt,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new pt,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach(function(n){return t.deleteCache(e,n)})}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}])}(),kc={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Ic=lt({getKey:null,doesEleInvalidateKey:Je,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Qe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Rc=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Ic(t);be(n,r),n.lookup=new Ac(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},jc=Rc.prototype;jc.reasons=kc,jc.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},jc.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},jc.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new Tt(function(e,t){return t.reqs-e.reqs})},jc.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},jc.getElement=function(e,t,n,r,o){var i=this,a=this.renderer,s=a.cy.zoom(),u=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!i.allowEdgeTxrCaching&&e.isEdge()||!i.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Gt(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var l=Math.pow(2,r),c=t.h*l,f=t.w*l,h=a.eleTextBiggerThanMin(e,l);if(!this.isVisible(e,h))return null;var d,p=u.get(e,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(d=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||f>1024)return null;var v=i.getTextureQueue(d),g=v[v.length-2],y=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};g||(g=v[v.length-1]),g||(g=y()),g.width-g.usedWidthr;P--)S=i.getElement(e,t,n,P,kc.downscale);T()}else{var C;if(!_&&!w&&!x)for(var A=r-1;A>=-4;A--){var k=u.get(e,A);if(k){C=k;break}}if(b(C))return i.queueElement(e,r),C;g.context.translate(g.usedWidth,0),g.context.scale(l,l),this.drawElement(g.context,e,t,h,!1),g.context.scale(1/l,1/l),g.context.translate(-g.usedWidth,0)}return p={x:g.usedWidth,texture:g,level:r,scale:l,width:f,height:c,scaledLabelShown:h},g.usedWidth+=Math.ceil(f+8),g.eleCaches.push(p),u.set(e,r,p),i.checkTextureFullness(g),p},jc.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},jc.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?ct(t,e):e.fullnessChecks++},jc.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;ct(n,e),e.retired=!0;for(var o=e.eleCaches,i=0;i=t)return i.retired=!1,i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,ft(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),ct(r,i),n.push(i),i}},jc.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),o=this.getKey(e),i=r[o];if(i)i.level=Math.max(i.level,t),i.eles.merge(e),i.reqs++,n.updateItem(i);else{var a={eles:e.spawn().merge(e),level:t,reqs:1,key:o};n.push(a),r[o]=a}},jc.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),o=[],i=t.lookup,a=0;a<1&&n.size()>0;a++){var s=n.pop(),u=s.key,l=s.eles[0],c=i.hasCache(l,s.level);if(r[u]=null,!c){o.push(s);var f=t.getBoundingBox(l);t.getElement(l,f,e,s.level,kc.dequeue)}}return o},jc.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),o=n[r];null!=o&&(1===o.eles.length?(o.reqs=$e,t.updateItem(o),t.pop(),n[r]=null):o.eles.unmerge(e))},jc.onDequeue=function(e){this.onDequeues.push(e)},jc.offDequeue=function(e){ct(this.onDequeues,e)},jc.setupDequeueing=Cc({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var a,s,u=r.layersByLevel,l=Math.pow(2,n),c=u[n]=u[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=u[t],!0},o=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};o(1),o(-1);for(var i=c.length-1;i>=0;i--){var a=c[i];a.invalid&&ct(c,a)}}();var f=function(t){var o=(t=t||{}).after;!function(){if(!a){a=Qt();for(var t=0;t32767||s>32767)return null;if(i*s>16e6)return null;var u=r.makeLayer(a,n);if(null!=o){var f=c.indexOf(o)+1;c.splice(f,0,u)}else(void 0===t.insert||t.insert)&&c.unshift(u);return u};if(r.skipping&&!i)return null;for(var h=null,d=e.length/1,p=!i,v=0;v=d||!un(h.bb,g.boundingBox()))&&!(h=f({insert:!0,after:h})))return null;s||p?r.queueLayer(h,g):r.drawEleInLayer(h,g,n,t),h.eles.push(g),m[n]=h}}return s||(p?null:c)},Nc.getEleLevelForLayerLevel=function(e,t){return e},Nc.drawEleInLayer=function(e,t,n,r){var o=this.renderer,i=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),o.setImgSmoothing(i,!1),o.drawCachedElement(i,t,null,null,n,!0),o.setImgSmoothing(i,!0))},Nc.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,o=0;o0)return!1;if(i.invalid)return!1;r+=i.eles.length}return r===t.length},Nc.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},Nc.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=De(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)}))},Nc.invalidateLayer=function(e){if(this.lastInvalidationTime=De(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];ct(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var o=0;o3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this,s=t._private.rscratch;if((!i||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var u;n&&(u=n,e.translate(-u.x1,-u.y1));var l=i?t.pstyle("opacity").value:1,c=i?t.pstyle("line-opacity").value:1,f=t.pstyle("curve-style").value,h=t.pstyle("line-style").value,d=t.pstyle("width").pfValue,p=t.pstyle("line-cap").value,v=t.pstyle("line-outline-width").value,g=t.pstyle("line-outline-color").value,y=l*c,m=l*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===f?(a.eleStrokeStyle(e,t,n),a.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=d,e.lineCap=p,a.eleStrokeStyle(e,t,n),a.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")},_=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;a.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,x=t.pstyle("ghost-offset-y").pfValue,E=t.pstyle("ghost-opacity").value,O=y*E;e.translate(w,x),b(O),_(O),e.translate(-w,-x)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=d+v,e.lineCap=p,v>0?(a.colorStrokeStyle(e,g[0],g[1],g[2],n),"straight-triangle"===f?a.drawEdgeTrianglePath(t,e,s.allpts):(a.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")):e.lineCap="butt"}();o&&a.drawEdgeUnderlay(e,t),b(),_(),o&&a.drawEdgeOverlay(e,t),a.drawElementText(e,t,null,r),n&&e.translate(u.x1,u.y1)}}},Jc=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var o=this,i=o.usePaths(),a=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,u=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==a.edgeType||i?t.lineCap="round":t.lineCap="butt",o.colorStrokeStyle(t,u[0],u[1],u[2],r),o.drawEdgePath(n,t,a.allpts,"solid")}}}};Qc.drawEdgeOverlay=Jc("overlay"),Qc.drawEdgeUnderlay=Jc("underlay"),Qc.drawEdgePath=function(e,t,n,r){var i,a=e._private.rscratch,s=t,u=!1,l=this.usePaths(),c=e.pstyle("line-dash-pattern").pfValue,f=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");a.pathCacheKey&&a.pathCacheKey===h?(i=t=a.pathCache,u=!0):(i=t=new Path2D,a.pathCacheKey=h,a.pathCache=i)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(c),s.lineDashOffset=f;break;case"solid":s.setLineDash([])}if(!u&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+35&&void 0!==arguments[5]?arguments[5]:5,a=Math.min(i,r/2,o/2);e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+o-a),e.quadraticCurveTo(t+r,n+o,t+r-a,n+o),e.lineTo(t+a,n+o),e.quadraticCurveTo(t,n+o,t,n+o-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath()}tf.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),o=Math.ceil(Gt(n*r));t=Math.pow(2,o)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],a=this;if(null==r){if(i&&!a.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var u=a.getLabelJustification(t);e.textAlign=u,e.textBaseline="bottom"}else{var l=t.element()._private.rscratch.badLine,c=t.pstyle("label"),f=t.pstyle("source-label"),h=t.pstyle("target-label");if(l||(!c||!c.value)&&(!f||!f.value)&&(!h||!h.value))return;e.textAlign="center",e.textBaseline="bottom"}var d,p=!n;n&&(d=n,e.translate(-d.x1,-d.y1)),null==o?(a.drawText(e,t,null,p,i),t.isEdge()&&(a.drawText(e,t,"source",p,i),a.drawText(e,t,"target",p,i))):a.drawText(e,t,o,p,i),n&&e.translate(d.x1,d.y1)},tf.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue+"px",i=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,u=t.pstyle("text-outline-opacity").value*s,l=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+a+" "+o+" "+i,e.lineJoin="round",this.colorFillStyle(e,l[0],l[1],l[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],u)},tf.getTextAngle=function(e,t){var n,r=e._private.rscratch,o=t?t+"-":"",i=e.pstyle(o+"text-rotation");if("autorotate"===i.strValue){var a=ht(r,"labelAngle",t);n=e.isEdge()?a:0}else n="none"===i.strValue?0:i.pfValue;return n},tf.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=t._private.rscratch,a=o?t.effectiveOpacity():1;if(!o||0!==a&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,u,l=ht(i,"labelX",n),c=ht(i,"labelY",n),f=this.getLabelText(t,n);if(null!=f&&""!==f&&!isNaN(l)&&!isNaN(c)){this.setupTextStyle(e,t,o);var h,d=n?n+"-":"",p=ht(i,"labelWidth",n),v=ht(i,"labelHeight",n),g=t.pstyle(d+"text-margin-x").pfValue,y=t.pstyle(d+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,_=t.pstyle("text-valign").value;switch(m&&(b="center",_="center"),l+=g,c+=y,0!==(h=r?this.getTextAngle(t,n):0)&&(s=l,u=c,e.translate(s,u),e.rotate(h),l=0,c=0),_){case"top":break;case"center":c+=v/2;break;case"bottom":c+=v}var w=t.pstyle("text-background-opacity").value,x=t.pstyle("text-border-opacity").value,E=t.pstyle("text-border-width").pfValue,O=t.pstyle("text-background-padding").pfValue,S=t.pstyle("text-background-shape").strValue,T="round-rectangle"===S||"roundrectangle"===S,P="circle"===S;if(w>0||E>0&&x>0){var C=e.fillStyle,A=e.strokeStyle,k=e.lineWidth,I=t.pstyle("text-background-color").value,R=t.pstyle("text-border-color").value,j=t.pstyle("text-border-style").value,M=w>0,N=E>0&&x>0,D=l-O;switch(b){case"left":D-=p;break;case"center":D-=p/2}var L=c-v-O,B=p+2*O,F=v+2*O;if(M&&(e.fillStyle="rgba(".concat(I[0],",").concat(I[1],",").concat(I[2],",").concat(w*a,")")),N&&(e.strokeStyle="rgba(".concat(R[0],",").concat(R[1],",").concat(R[2],",").concat(x*a,")"),e.lineWidth=E,e.setLineDash))switch(j){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=E/4,e.setLineDash([]);break;default:e.setLineDash([])}if(T?(e.beginPath(),nf(e,D,L,B,F,2)):P?(e.beginPath(),function(e,t,n,r,o){var i=Math.min(r,o)/2,a=t+r/2,s=n+o/2;e.beginPath(),e.arc(a,s,i,0,2*Math.PI),e.closePath()}(e,D,L,B,F)):(e.beginPath(),e.rect(D,L,B,F)),M&&e.fill(),N&&e.stroke(),N&&"double"===j){var U=E/2;e.beginPath(),T?nf(e,D+U,L+U,B-2*U,F-2*U,2):e.rect(D+U,L+U,B-2*U,F-2*U),e.stroke()}e.fillStyle=C,e.strokeStyle=A,e.lineWidth=k,e.setLineDash&&e.setLineDash([])}var z=2*t.pstyle("text-outline-width").pfValue;if(z>0&&(e.lineWidth=z),"wrap"===t.pstyle("text-wrap").value){var V=ht(i,"labelWrapCachedLines",n),W=ht(i,"labelLineHeight",n),G=p/2,H=this.getLabelJustification(t);switch("auto"===H||("left"===b?"left"===H?l+=-p:"center"===H&&(l+=-G):"center"===b?"left"===H?l+=-G:"right"===H&&(l+=G):"right"===b&&("center"===H?l+=G:"right"===H&&(l+=p))),_){case"top":case"center":case"bottom":c-=(V.length-1)*W}for(var Y=0;Y0&&e.strokeText(V[Y],l,c),e.fillText(V[Y],l,c),c+=W}else z>0&&e.strokeText(f,l,c),e.fillText(f,l,c);0!==h&&(e.rotate(-h),e.translate(-s,-u))}}};var rf={drawNode:function(e,t,n){var r,o,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],u=this,l=t._private,c=l.rscratch,f=t.position();if(Q(f.x)&&Q(f.y)&&(!s||t.visible())){var h,d,p=s?t.effectiveOpacity():1,v=u.usePaths(),g=!1,y=t.padding();r=t.width()+2*y,o=t.height()+2*y,n&&(d=n,e.translate(-d.x1,-d.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),_=new Array(m.length),w=0,x=0;x0&&void 0!==arguments[0]?arguments[0]:P;u.eleFillStyle(e,t,n)},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N;u.colorStrokeStyle(e,C[0],C[1],C[2],t)},G=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;u.colorStrokeStyle(e,L[0],L[1],L[2],t)},H=function(e,t,n,r){var o,i=u.nodePathCache=u.nodePathCache||[],a=Ye("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+z),s=i[a],l=!1;return null!=s?(o=s,l=!0,c.pathCache=o):(o=new Path2D,i[a]=c.pathCache=o),{path:o,cacheHit:l}},Y=t.pstyle("shape").strValue,q=t.pstyle("shape-polygon-points").pfValue;if(v){e.translate(f.x,f.y);var X=H(r,o,Y,q);h=X.path,g=X.cacheHit}var K=function(){if(!g){var n=f;v&&(n={x:0,y:0}),u.nodeShapes[u.getNodeShape(t)].draw(h||e,n.x,n.y,r,o,z,c)}v?e.fill(h):e.fill()},Z=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=l.backgrounding,i=0,a=0;a<_.length;a++){var s=t.cy().style().getIndexedStyle(t,"background-image-containment","value",a);r&&"over"===s||!r&&"inside"===s?i++:b[a]&&_[a].complete&&!_[a].error&&(i++,u.drawInscribedImage(e,_[a],t,a,n))}l.backgrounding=!(i===w),o!==l.backgrounding&&t.updateStyle(!1)},$=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;u.hasPie(t)&&(u.drawPie(e,t,i),n&&(v||u.nodeShapes[u.getNodeShape(t)].draw(e,f.x,f.y,r,o,z,c)))},J=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;u.hasStripe(t)&&(e.save(),v?e.clip(c.pathCache):(u.nodeShapes[u.getNodeShape(t)].draw(e,f.x,f.y,r,o,z,c),e.clip()),u.drawStripe(e,t,i),e.restore(),n&&(v||u.nodeShapes[u.getNodeShape(t)].draw(e,f.x,f.y,r,o,z,c)))},ee=function(){var t=(S>0?S:-S)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:p),n=S>0?0:255;0!==S&&(u.colorFillStyle(e,n,n,n,t),v?e.fill(h):e.fill())},te=function(){if(T>0){if(e.lineWidth=T,e.lineCap=I,e.lineJoin=k,e.setLineDash)switch(A){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(j),e.lineDashOffset=M;break;case"solid":case"double":e.setLineDash([])}if("center"!==R){if(e.save(),e.lineWidth*=2,"inside"===R)v?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-T,-o/2-T,r+2*T,o+2*T),t.addPath(h),e.clip(t,"evenodd")}v?e.stroke(h):e.stroke(),e.restore()}else v?e.stroke(h):e.stroke();if("double"===A){e.lineWidth=T/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",v?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},ne=function(){if(D>0){if(e.lineWidth=D,e.lineCap="butt",e.setLineDash)switch(B){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=f;v&&(n={x:0,y:0});var i=u.getNodeShape(t),a=T;"inside"===R&&(a=0),"outside"===R&&(a*=2);var s,l=(r+a+(D+U))/r,c=(o+a+(D+U))/o,h=r*l,d=o*c,p=u.nodeShapes[i].points;if(v&&(s=H(h,d,i,p).path),"ellipse"===i)u.drawEllipsePath(s||e,n.x,n.y,h,d);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(i)){var g=0,y=0,m=0;"round-diamond"===i?g=1.4*(a+U+D):"round-heptagon"===i?(g=1.075*(a+U+D),m=-(a/2+U+D)/35):"round-hexagon"===i?g=1.12*(a+U+D):"round-pentagon"===i?(g=1.13*(a+U+D),m=-(a/2+U+D)/15):"round-tag"===i?(g=1.12*(a+U+D),y=.07*(a/2+D+U)):"round-triangle"===i&&(g=(a+U+D)*(Math.PI/2),m=-(a+U/2+D)/Math.PI),0!==g&&(h=r*(l=(r+g)/r),["round-hexagon","round-tag"].includes(i)||(d=o*(c=(o+g)/o)));for(var b=h/2,_=d/2,w=(z="auto"===z?kn(h,d):z)+(a+D+U)/2,x=new Array(p.length/2),E=new Array(p.length/2),O=0;O0){if(r=r||n.position(),null==o||null==i){var f=n.padding();o=n.width()+2*f,i=n.height()+2*f}this.colorFillStyle(t,u[0],u[1],u[2],s),this.nodeShapes[l].draw(t,r.x,r.y,o+2*a,i+2*a,c),t.fill()}}}};rf.drawNodeOverlay=of("overlay"),rf.drawNodeUnderlay=of("underlay"),rf.hasPie=function(e){return(e=e[0])._private.hasPie},rf.hasStripe=function(e){return(e=e[0])._private.hasStripe},rf.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var o,i=t.cy().style(),a=t.pstyle("pie-size"),s=t.pstyle("pie-hole"),u=t.pstyle("pie-start-angle").pfValue,l=r.x,c=r.y,f=t.width(),h=t.height(),d=Math.min(f,h)/2,p=0;if(this.usePaths()&&(l=0,c=0),"%"===a.units?d*=a.pfValue:void 0!==a.pfValue&&(d=a.pfValue/2),"%"===s.units?o=d*s.pfValue:void 0!==s.pfValue&&(o=s.pfValue/2),!(o>=d))for(var v=1;v<=i.pieBackgroundN;v++){var g=t.pstyle("pie-"+v+"-background-size").value,y=t.pstyle("pie-"+v+"-background-color").value,m=t.pstyle("pie-"+v+"-background-opacity").value*n,b=g/100;b+p>1&&(b=1-p);var _=1.5*Math.PI+2*Math.PI*p,w=(_+=u)+2*Math.PI*b;0===g||p>=1||p+b>1||(0===o?(e.beginPath(),e.moveTo(l,c),e.arc(l,c,d,_,w),e.closePath()):(e.beginPath(),e.arc(l,c,d,_,w),e.arc(l,c,o,w,_,!0),e.closePath()),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),p+=b)}},rf.drawStripe=function(e,t,n,r){t=t[0],r=r||t.position();var o=t.cy().style(),i=r.x,a=r.y,s=t.width(),u=t.height(),l=0,c=this.usePaths();e.save();var f=t.pstyle("stripe-direction").value,h=t.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":e.rotate(-Math.PI/2)}var d=s,p=u;"%"===h.units?(d*=h.pfValue,p*=h.pfValue):void 0!==h.pfValue&&(d=h.pfValue,p=h.pfValue),c&&(i=0,a=0),a-=d/2,i-=p/2;for(var v=1;v<=o.stripeBackgroundN;v++){var g=t.pstyle("stripe-"+v+"-background-size").value,y=t.pstyle("stripe-"+v+"-background-color").value,m=t.pstyle("stripe-"+v+"-background-opacity").value*n,b=g/100;b+l>1&&(b=1-l),0===g||l>=1||l+b>1||(e.beginPath(),e.rect(i,a+p*l,d,p*b),e.closePath(),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),l+=b)}e.restore()};var af,sf={};function uf(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(r));return r}function lf(e,t,n){void 0===n&&(n=t);var r=e.makeOffscreenCanvas(t,n),o=r.context=r.getContext("2d");return r.clear=function(){return o.clearRect(0,0,r.width,r.height)},r.clear(),r}function cf(e){var t=e.pixelRatio,n=e.cy.zoom(),r=e.cy.pan();return{zoom:n*t,pan:{x:r.x*t,y:r.y*t}}}function ff(e){return"solid"===e.pstyle("background-fill").value&&"none"===e.pstyle("background-image").strValue&&(0===e.pstyle("border-width").value||0===e.pstyle("border-opacity").value||"solid"===e.pstyle("border-style").value)}function hf(e,t){if(e.length!==t.length)return!1;for(var n=0;n>8&255)/255,n[2]=(e>>16&255)/255,n[3]=(e>>24&255)/255,n}function vf(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function gf(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function yf(e,t,n){switch(t){case e.FLOAT:return new Float32Array(n);case e.INT:return new Int32Array(n)}}function mf(e,t,n,r,o,i){switch(t){case e.FLOAT:return new Float32Array(n.buffer,i*r,o);case e.INT:return new Int32Array(n.buffer,i*r,o)}}function bf(e,t,n,r){var o=u(gf(e,n),3),i=o[0],a=o[1],s=o[2],l=yf(e,a,t*i),c=i*s,f=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,f),e.bufferData(e.ARRAY_BUFFER,t*c,e.DYNAMIC_DRAW),e.enableVertexAttribArray(r),a===e.FLOAT?e.vertexAttribPointer(r,i,a,!1,c,0):a===e.INT&&e.vertexAttribIPointer(r,i,a,c,0),e.vertexAttribDivisor(r,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var h=new Array(t),d=0;dt.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!f&&(c[t.NODE]=!0,c[t.SELECT_BOX]=!0);var m=n.style(),b=n.zoom(),_=void 0!==a?a:b,w=n.pan(),x={x:w.x,y:w.y},E={zoom:b,pan:{x:w.x,y:w.y}},O=t.prevViewport;void 0===O||E.zoom!==O.zoom||E.pan.x!==O.pan.x||E.pan.y!==O.pan.y||v&&!p||(t.motionBlurPxRatio=1),s&&(x=s),_*=u,x.x*=u,x.y*=u;var S=t.getCachedZSortedEles();function T(e,n,r,o,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",t.colorFillStyle(e,255,255,255,t.motionBlurTransparency),e.fillRect(n,r,o,i),e.globalCompositeOperation=a}function P(e,n){var i,u,c,f;t.clearingMotionBlur||e!==l.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]&&e!==l.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]?(i=x,u=_,c=t.canvasWidth,f=t.canvasHeight):(i={x:w.x*d,y:w.y*d},u=b*d,c=t.canvasWidth*d,f=t.canvasHeight*d),e.setTransform(1,0,0,1,0,0),"motionBlur"===n?T(e,0,0,c,f):r||void 0!==n&&!n||e.clearRect(0,0,c,f),o||(e.translate(i.x,i.y),e.scale(u,u)),s&&e.translate(s.x,s.y),a&&e.scale(a,a)}if(f||(t.textureDrawLastFrame=!1),f){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=n.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var C=t.data.bufferContexts[t.TEXTURE_BUFFER];C.setTransform(1,0,0,1,0,0),C.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:C,drawOnlyNodeLayer:!0,forcedPxRatio:u*t.textureMult}),(E=t.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:t.canvasWidth,height:t.canvasHeight}).mpan={x:(0-E.pan.x)/E.zoom,y:(0-E.pan.y)/E.zoom}}c[t.DRAG]=!1,c[t.NODE]=!1;var A=l.contexts[t.NODE],k=t.textureCache.texture;E=t.textureCache.viewport,A.setTransform(1,0,0,1,0,0),h?T(A,0,0,E.width,E.height):A.clearRect(0,0,E.width,E.height);var I=m.core("outside-texture-bg-color").value,R=m.core("outside-texture-bg-opacity").value;t.colorFillStyle(A,I[0],I[1],I[2],R),A.fillRect(0,0,E.width,E.height),b=n.zoom(),P(A,!1),A.clearRect(E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u),A.drawImage(k,E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u)}else t.textureOnViewport&&!r&&(t.textureCache=null);var j=n.extent(),M=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),N=t.hideEdgesOnViewport&&M,D=[];if(D[t.NODE]=!c[t.NODE]&&h&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,D[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),D[t.DRAG]=!c[t.DRAG]&&h&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,D[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),c[t.NODE]||o||i||D[t.NODE]){var L=h&&!D[t.NODE]&&1!==d;P(A=r||(L?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:l.contexts[t.NODE]),h&&!L?"motionBlur":void 0),N?t.drawCachedNodes(A,S.nondrag,u,j):t.drawLayeredElements(A,S.nondrag,u,j),t.debug&&t.drawDebugPoints(A,S.nondrag),o||h||(c[t.NODE]=!1)}if(!i&&(c[t.DRAG]||o||D[t.DRAG])&&(L=h&&!D[t.DRAG]&&1!==d,P(A=r||(L?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:l.contexts[t.DRAG]),h&&!L?"motionBlur":void 0),N?t.drawCachedNodes(A,S.drag,u,j):t.drawCachedElements(A,S.drag,u,j),t.debug&&t.drawDebugPoints(A,S.drag),o||h||(c[t.DRAG]=!1)),this.drawSelectionRectangle(e,P),h&&1!==d){var B=l.contexts[t.NODE],F=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],U=l.contexts[t.DRAG],z=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],V=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!y?e.clearRect(0,0,t.canvasWidth,t.canvasHeight):T(e,0,0,t.canvasWidth,t.canvasHeight);var o=d;e.drawImage(n,0,0,t.canvasWidth*o,t.canvasHeight*o,0,0,t.canvasWidth,t.canvasHeight)};(c[t.NODE]||D[t.NODE])&&(V(B,F,D[t.NODE]),c[t.NODE]=!1),(c[t.DRAG]||D[t.DRAG])&&(V(U,z,D[t.DRAG]),c[t.DRAG]=!1)}t.prevViewport=E,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),h&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!f,t.mbFrames=0,c[t.NODE]=!0,c[t.DRAG]=!0,t.redraw()},100)),r||n.emit("render")},sf.drawSelectionRectangle=function(e,t){var n=this,r=n.cy,o=n.data,i=r.style(),a=e.drawOnlyNodeLayer,s=e.drawAllLayers,u=o.canvasNeedsRedraw,l=e.forcedContext;if(n.showFps||!a&&u[n.SELECT_BOX]&&!s){var c=l||o.contexts[n.SELECT_BOX];if(t(c),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)){var f=n.cy.zoom(),h=i.core("selection-box-border-width").value/f;c.lineWidth=h,c.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",c.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),h>0&&(c.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",c.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(o.bgActivePosistion&&!n.hoverData.selecting){f=n.cy.zoom();var d=o.bgActivePosistion;c.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",c.beginPath(),c.arc(d.x,d.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),c.fill()}var p=n.lastRedrawTime;if(n.showFps&&p){p=Math.round(p);var v=Math.round(1e3/p),g="1 frame = "+p+" ms = "+v+" fps";if(c.setTransform(1,0,0,1,0,0),c.fillStyle="rgba(255, 0, 0, 0.75)",c.strokeStyle="rgba(255, 0, 0, 0.75)",c.font="30px Arial",!af){var y=c.measureText(g);af=y.actualBoundingBoxAscent}c.fillText(g,0,af),c.strokeRect(0,af+10,250,20),c.fillRect(0,af+10,250*Math.min(v/60,1),20)}s||(u[n.SELECT_BOX]=!1)}};var _f="undefined"!=typeof Float32Array?Float32Array:Array;function wf(){var e=new _f(9);return _f!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function xf(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ef(e,t,n){var r=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=n[0],d=n[1];return e[0]=r,e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=u,e[6]=h*r+d*a+l,e[7]=h*o+d*s+c,e[8]=h*i+d*u+f,e}function Of(e,t,n){var r=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=Math.sin(n),d=Math.cos(n);return e[0]=d*r+h*a,e[1]=d*o+h*s,e[2]=d*i+h*u,e[3]=d*a-h*r,e[4]=d*s-h*o,e[5]=d*u-h*i,e[6]=l,e[7]=c,e[8]=f,e}function Sf(e,t,n){var r=n[0],o=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Tf=function(){return r(function e(t,r,o,i){n(this,e),this.debugID=Math.floor(1e4*Math.random()),this.r=t,this.texSize=r,this.texRows=o,this.texHeight=Math.floor(r/o),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(t,r,r),this.scratch=i(t,r,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(e){var t=e.w,n=e.h,r=this.texHeight,o=this.texSize,i=r/n,a=t*i,s=n*i;return a>o&&(a=t*(i=o/t),s=n*i),{scale:i,texW:a,texH:s}}},{key:"draw",value:function(e,t,n){var r=this;if(this.locked)throw new Error("can't draw, atlas is locked");var o=this.texSize,i=this.texRows,a=this.texHeight,s=this.getScale(t),u=s.scale,l=s.texW,c=s.texH,f=function(e,r){if(n&&r){var o=r.context,i=e.x,s=e.row,l=i,c=a*s;o.save(),o.translate(l,c),o.scale(u,u),n(o,t),o.restore()}},h=[null,null],d=function(){f(r.freePointer,r.canvas),h[0]={x:r.freePointer.x,y:r.freePointer.row*a,w:l,h:c},h[1]={x:r.freePointer.x+l,y:r.freePointer.row*a,w:0,h:c},r.freePointer.x+=l,r.freePointer.x==o&&(r.freePointer.x=0,r.freePointer.row++)},p=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+l<=o)d();else{if(this.freePointer.row>=i-1)return!1;this.freePointer.x===o?(p(),d()):this.enableWrapping?function(){var e=r.scratch,t=r.canvas;e.clear(),f({x:0,row:0},e);var n=o-r.freePointer.x,i=l-n,s=a,u=r.freePointer.x,d=r.freePointer.row*a,p=n;t.context.drawImage(e,0,0,p,s,u,d,p,s),h[0]={x:u,y:d,w:p,h:c};var v=n,g=(r.freePointer.row+1)*a,y=i;t&&t.context.drawImage(e,v,0,y,s,0,g,y,s),h[1]={x:0,y:g,w:y,h:c},r.freePointer.x=i,r.freePointer.row++}():(p(),d())}return this.keyToLocation.set(e,h),this.needsBuffer=!0,h}},{key:"getOffsets",value:function(e){return this.keyToLocation.get(e)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(e){if(this.locked)return!1;var t=this.texSize,n=this.texRows,r=this.getScale(e).texW;return!(this.freePointer.x+r>t)||this.freePointer.row1&&void 0!==arguments[1]?arguments[1]:{},i=r.forceRedraw,a=void 0!==i&&i,s=r.filterEle,u=void 0===s?function(){return!0}:s,l=r.filterType,c=void 0===l?function(){return!0}:l,f=!1,h=!1,d=o(e);try{for(d.s();!(t=d.n()).done;){var p=t.value;if(u(p)){var v,g=o(this.renderTypes.values());try{var y=function(){var e=v.value,t=e.type;if(c(t)){var r=n.collections.get(e.collection),o=e.getKey(p),i=Array.isArray(o)?o:[o];if(a)i.forEach(function(e){return r.markKeyForGC(e)}),h=!0;else{var s=e.getID?e.getID(p):p.id(),u=n._key(t,s),l=n.typeAndIdToKey.get(u);void 0===l||hf(i,l)||(f=!0,n.typeAndIdToKey.delete(u),l.forEach(function(e){return r.markKeyForGC(e)}))}}};for(g.s();!(v=g.n()).done;)y()}catch(e){g.e(e)}finally{g.f()}}}}catch(e){d.e(e)}finally{d.f()}return h&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var e,t=o(this.collections.values());try{for(t.s();!(e=t.n()).done;)e.value.gc()}catch(e){t.e(e)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(e,t,n,r){var o=this.renderTypes.get(t),i=this.collections.get(o.collection),a=!1,s=i.draw(r,n,function(t){o.drawClipped?(t.save(),t.beginPath(),t.rect(0,0,n.w,n.h),t.clip(),o.drawElement(t,e,n,!0,!0),t.restore()):o.drawElement(t,e,n,!0,!0),a=!0});if(a){var u=o.getID?o.getID(e):e.id(),l=this._key(t,u);this.typeAndIdToKey.has(l)?this.typeAndIdToKey.get(l).push(r):this.typeAndIdToKey.set(l,[r])}return s}},{key:"getAtlasInfo",value:function(e,t){var n=this,r=this.renderTypes.get(t),o=r.getKey(e);return(Array.isArray(o)?o:[o]).map(function(o){var i=r.getBoundingBox(e,o),a=n.getOrCreateAtlas(e,t,i,o),s=u(a.getOffsets(o),2),l=s[0];return{atlas:a,tex:l,tex1:l,tex2:s[1],bb:i}})}},{key:"getDebugInfo",value:function(){var e,t=[],n=o(this.collections);try{for(n.s();!(e=n.n()).done;){var r=u(e.value,2),i=r[0],a=r[1].getCounts(),s=a.keyCount,l=a.atlasCount;t.push({type:i,keyCount:s,atlasCount:l})}}catch(e){n.e(e)}finally{n.f()}return t}}])}(),Af=function(){return r(function e(t){n(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)}},{key:"getAtlasIndexForBatch",value:function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t}}])}(),kf={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},If=function(){return r(function e(t,r,o){n(this,e),this.r=t,this.gl=r,this.maxInstances=o.webglBatchSize,this.atlasSize=o.webglTexSize,this.bgColor=o.bgColor,this.debug=o.webglDebug,this.batchDebugInfo=[],o.enableWrapping=!0,o.createTextureCanvas=lf,this.atlasManager=new Cf(t,o),this.batchManager=new Af(o),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(kf.SCREEN),this.pickingProgram=this._createShaderProgram(kf.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(e,t){this.atlasManager.addAtlasCollection(e,t)}},{key:"addTextureAtlasRenderType",value:function(e,t){this.atlasManager.addRenderType(e,t)}},{key:"addSimpleShapeRenderType",value:function(e,t){this.simpleShapeOptions.set(e,t)}},{key:"invalidate",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,n=this.atlasManager;return t?n.invalidate(e,{filterType:function(e){return e===t},forceRedraw:!0}):n.invalidate(e)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(e){var t=this.gl,n="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),r=this.batchManager.getIndexArray(),o="#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(r.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(r.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(e.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "),i=function(e,t,n){var r=uf(e,e.VERTEX_SHADER,t),o=uf(e,e.FRAGMENT_SHADER,n),i=e.createProgram();if(e.attachShader(i,r),e.attachShader(i,o),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))throw new Error("Could not initialize shaders");return i}(t,n,o);i.aPosition=t.getAttribLocation(i,"aPosition"),i.aIndex=t.getAttribLocation(i,"aIndex"),i.aVertType=t.getAttribLocation(i,"aVertType"),i.aTransform=t.getAttribLocation(i,"aTransform"),i.aAtlasId=t.getAttribLocation(i,"aAtlasId"),i.aTex=t.getAttribLocation(i,"aTex"),i.aPointAPointB=t.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=t.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=t.getAttribLocation(i,"aLineWidth"),i.aColor=t.getAttribLocation(i,"aColor"),i.aCornerRadius=t.getAttribLocation(i,"aCornerRadius"),i.aBorderColor=t.getAttribLocation(i,"aBorderColor"),i.uPanZoomMatrix=t.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=t.getUniformLocation(i,"uAtlasSize"),i.uBGColor=t.getUniformLocation(i,"uBGColor"),i.uZoom=t.getUniformLocation(i,"uZoom"),i.uTextures=[];for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:kf.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(e,t){return!!e.visible()&&(!t||!t.isVisible||t.isVisible(e))}},{key:"drawTexture",value:function(e,t,n){var r=this.atlasManager,i=this.batchManager,a=r.getRenderTypeOpts(n);if(this._isVisible(e,a)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var s=a.getTexPickingMode(e);if(1===s)return;if(2==s)return void this.drawPickingRectangle(e,t,n)}var l,c=o(r.getAtlasInfo(e,n));try{for(c.s();!(l=c.n()).done;){var f=l.value,h=f.atlas,d=f.tex1,p=f.tex2;i.canAddToCurrentBatch(h)||this.endBatch();for(var v=i.getAtlasIndexForBatch(h),g=0,y=[[d,!0],[p,!1]];g=this.maxInstances&&this.endBatch()}}}}catch(e){c.e(e)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=0;if(n.shapeProps&&n.shapeProps.padding&&(i=e.pstyle(n.shapeProps.padding).pfValue),r){var a=r.bb,s=r.tex1,u=r.tex2,l=s.w/(s.w+u.w);o||(l=1-l);var c=this._getAdjustedBB(a,i,o,l);this._applyTransformMatrix(t,c,n,e)}else{var f=n.getBoundingBox(e),h=this._getAdjustedBB(f,i,!0,1);this._applyTransformMatrix(t,h,n,e)}}},{key:"_applyTransformMatrix",value:function(e,t,n,r){var o,i;xf(e);var a=n.getRotation?n.getRotation(r):0;if(0!==a){var s=n.getRotationPoint(r);Ef(e,e,[s.x,s.y]),Of(e,e,a);var u=n.getRotationOffset(r);o=u.x+(t.xOffset||0),i=u.y+(t.yOffset||0)}else o=t.x1,i=t.y1;Ef(e,e,[o,i]),Sf(e,e,[t.w,t.h])}},{key:"_getAdjustedBB",value:function(e,t,n,r){var o=e.x1,i=e.y1,a=e.w,s=e.h;t&&(o-=t,i-=t,a+=2*t,s+=2*t);var u=0,l=a*r;return n&&r<1?a=l:!n&&r<1&&(o+=u=a-l,a=l),{x1:o,y1:i,w:a,h:s,xOffset:u,yOffset:e.yOffset}}},{key:"drawPickingRectangle",value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=4,pf(t,this.indexBuffer.getView(o)),df([0,0,0],1,this.colorBuffer.getView(o));var i=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,i,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var o=r.shapeProps,i=this._getVertTypeForShape(e,o.shape);if(void 0===i||r.isSimple&&!r.isSimple(e))this.drawTexture(e,t,n);else{var a=this.instanceCount;if(this.vertTypeBuffer.getView(a)[0]=i,5===i||6===i){var s=r.getBoundingBox(e),u=this._getCornerRadius(e,o.radius,s),l=this.cornerRadiusBuffer.getView(a);l[0]=u,l[1]=u,l[2]=u,l[3]=u,6===i&&(l[0]=0,l[2]=0)}pf(t,this.indexBuffer.getView(a)),df(e.pstyle(o.color).value,e.pstyle(o.opacity).value,this.colorBuffer.getView(a));var c=this.lineWidthBuffer.getView(a);if(c[0]=0,c[1]=0,o.border){var f=e.pstyle("border-width").value;if(f>0){df(e.pstyle("border-color").value,e.pstyle("border-opacity").value,this.borderColorBuffer.getView(a));var h=e.pstyle("border-position").value;if("inside"===h)c[0]=0,c[1]=-f;else if("outside"===h)c[0]=f,c[1]=0;else{var d=f/2;c[0]=d,c[1]=-d}}}var p=this.transformBuffer.getMatrixView(a);this.setTransformMatrix(e,p,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"_getVertTypeForShape",value:function(e,t){switch(e.pstyle(t).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(e,t,n){var r=n.w,o=n.h;if("auto"===e.pstyle(t).value)return An(r,o);var i=e.pstyle(t).pfValue,a=r/2,s=o/2;return Math.min(i,s,a)}},{key:"drawEdgeArrow",value:function(e,t,n){if(e.visible()){var r,o,i,a=e._private.rscratch;if(!("source"===n?(r=a.arrowStartX,o=a.arrowStartY,i=a.srcArrowAngle):(r=a.arrowEndX,o=a.arrowEndY,i=a.tgtArrowAngle),isNaN(r)||null==r||isNaN(o)||null==o||isNaN(i)||null==i||"none"===e.pstyle(n+"-arrow-shape").value)){var s=e.pstyle(n+"-arrow-color").value,u=e.pstyle("opacity").value*e.pstyle("line-opacity").value,l=e.pstyle("width").pfValue,c=e.pstyle("arrow-scale").value,f=this.r.getArrowWidth(l,c),h=this.instanceCount,d=this.transformBuffer.getMatrixView(h);xf(d),Ef(d,d,[r,o]),Sf(d,d,[f,f]),Of(d,d,i),this.vertTypeBuffer.getView(h)[0]=3,pf(t,this.indexBuffer.getView(h)),df(s,u,this.colorBuffer.getView(h)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle("opacity").value,o=e.pstyle("line-opacity").value,i=e.pstyle("width").pfValue,a=e.pstyle("line-color").value,s=r*o;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==n.length){var u=this.instanceCount;this.vertTypeBuffer.getView(u)[0]=1,pf(t,this.indexBuffer.getView(u)),df(a,s,this.colorBuffer.getView(u)),this.lineWidthBuffer.getView(u)[0]=i;var l=this.pointAPointBBuffer.getView(u);l[0]=n[0],l[1]=n[1],l[2]=n[2],l[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var c=0;c=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(e){var t=e._private.rscratch;return!t.badLine&&null!=t.allpts&&!isNaN(t.allpts[0])}},{key:"_getEdgePoints",value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(4==n.length)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:"_getNumSegments",value:function(e){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(e,t){if(4==e.length)return e;for(var n=Array(2*(t+1)),r=0;r<=t;r++)if(0==r)n[0]=e[0],n[1]=e[1];else if(r==t)n[2*r]=e[e.length-2],n[2*r+1]=e[e.length-1];else{var o=r/t;this._setCurvePoint(e,o,n,2*r)}return n}},{key:"_setCurvePoint",value:function(e,t,n,r){if(!(e.length<=2)){for(var o=Array(e.length-2),i=0;i0}},l=function(e){return"yes"===e.pstyle("text-events").strValue?2:1},c=function(e){var t=e.position(),n=t.x,r=t.y,o=e.outerWidth(),i=e.outerHeight();return{w:o,h:i,x1:n-o/2,y1:r-i/2}};n.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:c,isSimple:ff,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:c,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:c,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:l,getKey:Mf(t.getLabelKey,null),getBoundingBox:Nf(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:i(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:l,getKey:Mf(t.getSourceLabelKey,"source"),getBoundingBox:Nf(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:i("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:l,getKey:Mf(t.getTargetLabelKey,"target"),getBoundingBox:Nf(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:i("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a("target-label")});var f=Ie(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&f()}),function(e){var t=e.render;e.render=function(n){n=n||{};var r=e.cy;e.webgl&&(r.zoom()>7.99?(function(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}(e),t.call(e,n)):(function(e){var t=function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}(e),Bf(e,n,kf.SCREEN)))};var n=e.matchCanvasSize;e.matchCanvasSize=function(t){n.call(e,t),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0},e.findNearestElements=function(t,n,r,i){return function(e,t,n){var r,i,a,s=function(e,t,n){var r,o,i=cf(e),a=function(e,t,n,r,o){var i=r*n+t.x,a=o*n+t.y;return[i,a=Math.round(e.canvasHeight-a)]}(e,i.pan,i.zoom,t,n),s=u(a,2);if(r=s[0]-3,o=s[1]-3,0==6)return[];var l=e.data.contexts[e.WEBGL];l.bindFramebuffer(l.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(l.viewport(0,0,l.canvas.width,l.canvas.height),Bf(e,null,kf.PICKING),e.pickingFrameBuffer.needsDraw=!1);var c=new Uint8Array(144);l.readPixels(r,o,6,6,l.RGBA,l.UNSIGNED_BYTE,c),l.bindFramebuffer(l.FRAMEBUFFER,null);for(var f=new Set,h=0;h<36;h++){var d=vf(c.slice(4*h,4*h+4))-1;d>=0&&f.add(d)}return f}(e,t,n),l=e.getCachedZSortedEles(),c=o(s);try{for(c.s();!(a=c.n()).done;){var f=l[a.value];if(!r&&f.isNode()&&(r=f),!i&&f.isEdge()&&(i=f),r&&i)break}}catch(e){c.e(e)}finally{c.f()}return[r,i].filter(Boolean)}(e,t,n)};var r=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){r.call(e),e.pickingFrameBuffer.needsDraw=!0};var i=e.notify;e.notify=function(t,n){i.call(e,t,n),"viewport"===t||"bounds"===t?e.pickingFrameBuffer.needsDraw=!0:"background"===t&&e.drawing.invalidate(n,{type:"node-body"})}}(n)};var Mf=function(e,t){return function(n){var r=e(n),o=jf(n,t);return o.length>1?o.map(function(e,t){return"".concat(r,"_").concat(t)}):r}},Nf=function(e,t){return function(n,r){var o=e(n);if("string"==typeof r){var i=r.indexOf("_");if(i>0){var a=Number(r.substring(i+1)),s=jf(n,t),u=o.h/s.length,l=u*a,c=o.y1+l;return{x1:o.x1,w:o.w,y1:c,h:u,yOffset:l}}}return o}};function Df(e,t){var n=e.canvasWidth,r=e.canvasHeight,o=cf(e),i=o.pan,a=o.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,r),t.translate(i.x,i.y),t.scale(a,a)}function Lf(e,t,n){var r=e.drawing;t+=1,n.isNode()?(r.drawNode(n,t,"node-underlay"),r.drawNode(n,t,"node-body"),r.drawTexture(n,t,"label"),r.drawNode(n,t,"node-overlay")):(r.drawEdgeLine(n,t),r.drawEdgeArrow(n,t,"source"),r.drawEdgeArrow(n,t,"target"),r.drawTexture(n,t,"label"),r.drawTexture(n,t,"edge-source-label"),r.drawTexture(n,t,"edge-target-label"))}function Bf(e,t,n){var r;e.webglDebug&&(r=performance.now());var i=e.drawing,a=0;if(n.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&function(e,t){e.drawSelectionRectangle(t,function(t){return Df(e,t)})}(e,t),e.data.canvasNeedsRedraw[e.NODE]||n.picking){var s=e.data.contexts[e.WEBGL];n.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var u=function(e){var t=e.canvasWidth,n=e.canvasHeight,r=cf(e),o=r.pan,i=r.zoom,a=wf();Ef(a,a,[o.x,o.y]),Sf(a,a,[i,i]);var s=wf();!function(e,t,n){e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1}(s,t,n);var u,l,c,f,h,d,p,v,g,y,m,b,_,w,x,E,O,S,T,P,C,A=wf();return u=A,c=a,f=(l=s)[0],h=l[1],d=l[2],p=l[3],v=l[4],g=l[5],y=l[6],m=l[7],b=l[8],_=c[0],w=c[1],x=c[2],E=c[3],O=c[4],S=c[5],T=c[6],P=c[7],C=c[8],u[0]=_*f+w*p+x*y,u[1]=_*h+w*v+x*m,u[2]=_*d+w*g+x*b,u[3]=E*f+O*p+S*y,u[4]=E*h+O*v+S*m,u[5]=E*d+O*g+S*b,u[6]=T*f+P*p+C*y,u[7]=T*h+P*v+C*m,u[8]=T*d+P*g+C*b,A}(e),l=e.getCachedZSortedEles();if(a=l.length,i.startFrame(u,n),n.screen){for(var c=0;c0&&i>0){h.clearRect(0,0,o,i),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(e.full)h.translate(-n.x1*u,-n.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(n.x1*u,n.y1*u);else{var p=t.pan(),v={x:p.x*u,y:p.y*u};u*=t.zoom(),h.translate(v.x,v.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-v.x,-v.y)}e.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=e.bg,h.rect(0,0,o,i),h.fill())}return f},Yf.png=function(e){return Xf(e,this.bufferCanvasImage(e),"image/png")},Yf.jpg=function(e){return Xf(e,this.bufferCanvasImage(e),"image/jpeg")};var Kf=$f,Zf=$f.prototype;function $f(e){var t=this,n=t.cy.window().document;e.webgl&&(Zf.CANVAS_LAYERS=t.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),t.data={canvases:new Array(Zf.CANVAS_LAYERS),contexts:new Array(Zf.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Zf.CANVAS_LAYERS),bufferCanvases:new Array(Zf.BUFFER_COUNT),bufferContexts:new Array(Zf.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",o="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=o,i.position="relative",i.zIndex="0",i.overflow="hidden";var a=e.cy.container();a.appendChild(t.data.canvasContainer),a.style[r]=o;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};p&&p.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var u=0;u{const n=lh({headless:!0,styleEnabled:!1});n.add(e);const r={},o=n.layout({name:"cose-bilkent",animate:!1,spacingFactor:t,quality:"default",tile:!1,randomize:!0,stop:()=>{n.nodes().forEach(e=>{r[e.id()]={...e.position()}})}});return o.run(),{positions:r}})(t,n);this.onmessage({data:r})}onmessage(){}close(){}}},hh=()=>new SharedWorker(new URL(a.p+a.u(574),a.b),{type:void 0,name:"CoseBilkentLayout"});var dh=a(8353),ph=a(8812),vh=a(8362);const gh=100,yh="up",mh="down",bh="left",_h="right",wh={[yh]:"BT",[mh]:"TB",[bh]:"RL",[_h]:"LR"},xh=1/.38,Eh=e=>{let t=null,n=null,r=null,o=null,i=null,a=null,s=null,u=null;for(const l of e.nodes()){const c=e.node(l);(null===i||c.xs)&&(s=c.x),(null===u||c.y>u)&&(u=c.y);const f=Math.ceil(c.width/2);(null===t||c.x-fr)&&(r=c.x+f),(null===o||c.y+f>o)&&(o=c.y+f)}return{minX:t,minY:n,maxX:r,maxY:o,minCenterX:i,minCenterY:a,maxCenterX:s,maxCenterY:u,width:r-t,height:o-n,xOffset:i-t,yOffset:a-n}},Oh=e=>{const t=new dh.graphlib.Graph;return t.setGraph({}),t.setDefaultEdgeLabel(()=>({})),t.graph().nodesep=75*e,t.graph().ranksep=75*e,t},Sh=(e,t,n)=>{const{rank:r}=n.node(e);let o=null,i=null;for(const a of t){const{rank:t}=n.node(a);if(!(a===e||t>=r)){if(t===r-1){o=t,i=a;break}(null===o&&null===i||t>o)&&(o=t,i=a)}}return i},Th=(e,t)=>{let n=Sh(e,t.predecessors(e),t);return null===n&&(n=Sh(e,t.successors(e),t)),n},Ph=(e,t,n)=>{e.graph().ranker="tight-tree",e.graph().rankdir=wh[t];const r=dh.layout(e);for(const e of r.nodes()){const t=Th(e,r);null!==t&&(n[e]=t)}},Ch=(e,t)=>Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)),Ah=e=>{const t=[e[0]];let n={p1:e[0],p2:e[1]},r=Ch(n.p1,n.p2);for(let o=2;o{const s=Oh(a),u={},l={x:0,y:0},c=e.length;for(const t of e){const e=n[t.id];l.x+=e?.x||0,l.y+=e?.y||0;const r=(t.size||25)*xh*a;s.setNode(t.id,{width:r,height:r})}const f=c?[l.x/c,l.y/c]:[0,0],h={};for(const e of r)if(t[e.from]&&t[e.to]&&e.from!==e.to){const t=e.from{const n=[],r=vh.alg.components(e);if(r.length>1)for(const o of r){const r=Oh(t);for(const t of o){const n=e.node(t);r.setNode(t,{width:n.width,height:n.height});const o=e.outEdges(t);if(o)for(const e of o)r.setEdge(e.v,e.w)}n.push(r)}else n.push(e);return n})(s,a);if(d.length>1){d.forEach(e=>Ph(e,o,u));const e=(e=>"up"===e||e===mh)(o),t=(e=>e===mh||e===_h)(o),n=d.filter(e=>1===e.nodeCount()),r=d.filter(e=>1!==e.nodeCount());if("bin"===i){r.sort((e,t)=>t.nodeCount()-e.nodeCount());const o=e?({width:e,height:t,...n})=>({...n,width:e+gh,height:t+gh}):({width:e,height:t,...n})=>({...n,width:t+gh,height:e+gh}),i=r.map(Eh).map(o),a=n.map(Eh).map(o),u=i.concat(a);ph(u,{inPlace:!0});const l=Math.floor(50),c=e?"x":"y",f=e?"y":"x";if(!t){const t=e?"y":"x",n=e?"height":"width",r=u.reduce((e,r)=>null===e?r[t]:Math.min(r[t],e[n]||0),null),o=u.reduce((e,r)=>null===e?r[t]+r[n]:Math.max(r[t]+r[n],e[n]||0),null);u.forEach(e=>{e[t]=r+(o-(e[t]+e[n]))})}const h=(e,t)=>{for(const n of e.nodes()){const r=e.node(n),o=s.node(n);o.x=r.x-t.xOffset+t[c]+l,o.y=r.y-t.yOffset+t[f]+l}};for(let e=0;et.nodeCount()-e.nodeCount():(e,t)=>e.nodeCount()-t.nodeCount());const o=r.map(Eh),i=n.reduce((e,t)=>e+s.node(t.nodes()[0]).width,0),a=n.reduce((e,t)=>Math.max(e,s.node(t.nodes()[0]).width),0),u=n.length>0?i+(n.length-1)*gh:0,l=o.reduce((e,{width:t})=>Math.max(e,t),0),c=Math.max(l,u),f=o.reduce((e,{height:t})=>Math.max(e,t),0),h=Math.max(f,u);let d=0;const p=()=>{for(let t=0;t3&&(o.points=r.points.map(({x:t,y:n})=>({x:t-i.minX+(e?a:d),y:n-i.minY+(e?d:a)})))}d+=(e?i.height:i.width)+gh}},v=()=>{const t=Math.floor(((e?c:h)-u)/2);d+=Math.floor(a/2);let r=t;for(const t of n){const n=t.nodes()[0],o=s.node(n);e?(o.x=r+Math.floor(o.width/2),o.y=d):(o.x=d,o.y=r+Math.floor(o.width/2)),r+=gh+o.width}d=a+gh};t?(p(),v()):(v(),p())}}else Ph(s,o,u);l.x=0,l.y=0;const p={};for(const e of s.nodes()){const t=s.node(e);l.x+=t.x||0,l.y+=t.y||0,p[e]={x:t.x,y:t.y}}const v=c?[l.x/c,l.y/c]:[0,0],g=f[0]-v[0],y=f[1]-v[1];for(const e in p)p[e].x+=g,p[e].y+=y;const m={};for(const e of s.edges()){const t=s.edge(e);if(t.points&&t.points.length>3){const n=Ah(t.points);for(const e of n)e.x+=g,e.y+=y;m[`${e.v}-${e.w}`]={points:[...n],from:{x:p[e.v].x,y:p[e.v].y},to:{x:p[e.w].x,y:p[e.w].y}},m[`${e.w}-${e.v}`]={points:n.reverse(),from:{x:p[e.w].x,y:p[e.w].y},to:{x:p[e.v].x,y:p[e.v].y}}}}return{positions:p,parents:u,waypoints:m}})(t,n,r,o,i,a,s);u?setTimeout(()=>{this.onmessage({data:l})},u):this.onmessage({data:l})}onmessage(){}close(){}}},Ih=()=>new SharedWorker(new URL(a.p+a.u(654),a.b),{type:void 0,name:"HierarchicalLayout"});var Rh=a(1635);function jh(){return"undefined"!=typeof process&&process.env?process.env:{}}var Mh=a(9456),Nh=a(2321);function Dh(e,t,n,r){var o,i=[e,t,n,r],a=(0,Nh.Qd)(e)?e.event:e;if(!a||!(0,Nh.Kg)(a))throw new Error("Event missing");var s=(0,Nh.Qd)(e)?null!==(o=e.properties)&&void 0!==o?o:{}:(0,Nh.Qd)(t)?t:{},u={};return(0,Nh.Tn)(n)||(u=null!=n?n:{}),(0,Nh.Qd)(e)&&!(0,Nh.Tn)(t)&&(u=null!=t?t:{}),[a,s,u,i.find(Nh.Tn)]}function Lh(e,t,n,r,o){var i,a,s=null,u=null,l=[e,t,n,r,o],c=l.filter(Nh.Kg);1===c.length?(0,Nh.Kg)(l[1])?(u=l[1],s=null):(u=c[0],s=null):2===c.length&&("string"==typeof l[0]&&(s=l[0]),"string"==typeof l[1]&&(u=l[1]));var f=l.find(Nh.Tn),h=l.filter(Nh.Qd);return 1===h.length?(0,Nh.Qd)(l[2])?(a={},i=l[2]):(0,Nh.Qd)(l[3])?(i={},a=l[3]):(i=h[0],a={}):2===h.length&&(i=h[0],a=h[1]),[s,u,null!=i?i:i={},null!=a?a:a={},f]}var Bh=function(e){return function(){for(var t,n,r,o=[],i=0;i-1?e:e+t}(r,i):-1===(n=(t=a).indexOf("#"))?t:t.slice(0,n);return{path:l,referrer:s,search:i,title:u,url:c}},Kh=function(){var e=document.querySelector("link[rel='canonical']");return Yh(location.href,e&&e.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},Zh=function(e,t){void 0===t&&(t=Xh(Kh()));var n,r,o,i=e.context;"page"===e.type&&(n=e.properties&&(r=e.properties,o=Object.keys(t),Object.assign.apply(Object,(0,Rh.fX)([{}],o.map(function(e){var t;if(r&&Object.prototype.hasOwnProperty.call(r,e))return(t={})[e]=r[e],t}),!1))),e.properties=(0,Rh.Cl)((0,Rh.Cl)((0,Rh.Cl)({},t),e.properties),e.name?{name:e.name}:{})),i.page=(0,Rh.Cl)((0,Rh.Cl)((0,Rh.Cl)({},t),n),i.page)},$h=a(3172),Qh=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return(0,Rh.C6)(t,e),t}(Error),Jh="is not a string",ed="is not an object";var td=function(e){var t,n;this.settings=e,this.createMessageId=e.createMessageId,this.onEventMethodCall=null!==(t=e.onEventMethodCall)&&void 0!==t?t:function(){},this.onFinishedEvent=null!==(n=e.onFinishedEvent)&&void 0!==n?n:function(){}},nd=function(){function e(e){this.settings=new td(e)}return e.prototype.track=function(e,t,n,r){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize((0,Rh.Cl)((0,Rh.Cl)({},this.baseEvent()),{event:e,type:"track",properties:null!=t?t:{},options:(0,Rh.Cl)({},n),integrations:(0,Rh.Cl)({},r)}))},e.prototype.page=function(e,t,n,r,o){var i;this.settings.onEventMethodCall({type:"page",options:r});var a={type:"page",properties:(0,Rh.Cl)({},n),options:(0,Rh.Cl)({},r),integrations:(0,Rh.Cl)({},o)};return null!==e&&(a.category=e,a.properties=null!==(i=a.properties)&&void 0!==i?i:{},a.properties.category=e),null!==t&&(a.name=t),this.normalize((0,Rh.Cl)((0,Rh.Cl)({},this.baseEvent()),a))},e.prototype.screen=function(e,t,n,r,o){this.settings.onEventMethodCall({type:"screen",options:r});var i={type:"screen",properties:(0,Rh.Cl)({},n),options:(0,Rh.Cl)({},r),integrations:(0,Rh.Cl)({},o)};return null!==e&&(i.category=e),null!==t&&(i.name=t),this.normalize((0,Rh.Cl)((0,Rh.Cl)({},this.baseEvent()),i))},e.prototype.identify=function(e,t,n,r){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize((0,Rh.Cl)((0,Rh.Cl)({},this.baseEvent()),{type:"identify",userId:e,traits:null!=t?t:{},options:(0,Rh.Cl)({},n),integrations:r}))},e.prototype.group=function(e,t,n,r){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize((0,Rh.Cl)((0,Rh.Cl)({},this.baseEvent()),{type:"group",traits:null!=t?t:{},options:(0,Rh.Cl)({},n),integrations:(0,Rh.Cl)({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){this.settings.onEventMethodCall({type:"alias",options:n});var o={userId:e,type:"alias",options:(0,Rh.Cl)({},n),integrations:(0,Rh.Cl)({},r)};return null!==t&&(o.previousId=t),void 0===e?this.normalize((0,Rh.Cl)((0,Rh.Cl)({},o),this.baseEvent())):this.normalize((0,Rh.Cl)((0,Rh.Cl)({},this.baseEvent()),o))},e.prototype.baseEvent=function(){return{integrations:{},options:{}}},e.prototype.context=function(e){var t,n=["userId","anonymousId","timestamp","messageId"];delete e.integrations;var r=Object.keys(e),o=null!==(t=e.context)&&void 0!==t?t:{},i={};return r.forEach(function(t){"context"!==t&&(n.includes(t)?(0,$h.J)(i,t,e[t]):(0,$h.J)(o,t,e[t]))}),[o,i]},e.prototype.normalize=function(e){var t,n,r,o=Object.keys(null!==(t=e.integrations)&&void 0!==t?t:{}).reduce(function(t,n){var r,o;return(0,Rh.Cl)((0,Rh.Cl)({},t),((r={})[n]=Boolean(null===(o=e.integrations)||void 0===o?void 0:o[n]),r))},{});e.options=(r=e.options||{},Object.keys(r).filter(function(e){return void 0!==r[e]}).reduce(function(e,t){return e[t]=r[t],e},{}));var i=(0,Rh.Cl)((0,Rh.Cl)({},o),null===(n=e.options)||void 0===n?void 0:n.integrations),a=e.options?this.context(e.options):[],s=a[0],u=a[1],l=e.options,c=(0,Rh.Tt)(e,["options"]),f=(0,Rh.Cl)((0,Rh.Cl)((0,Rh.Cl)((0,Rh.Cl)({timestamp:new Date},c),{context:s,integrations:i}),u),{messageId:l.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(f),function(e){!function(e){if(!(0,Nh.t2)(e))throw new Qh("Event","is nil");if("object"!=typeof e)throw new Qh("Event",ed)}(e),function(e){if(!(0,Nh.Kg)(e.type))throw new Qh(".type",Jh)}(e),function(e){if(!(0,Nh.Kg)(e.messageId))throw new Qh(".messageId",Jh)}(e),"track"===e.type&&(function(e){if(!(0,Nh.Kg)(e.event))throw new Qh(".event",Jh)}(e),function(e){if(!(0,Nh.Qd)(e.properties))throw new Qh(".properties",ed)}(e)),["group","identify"].includes(e.type)&&function(e){if(!(0,Nh.Qd)(e.traits))throw new Qh(".traits",ed)}(e)}(f),f},e}(),rd=function(e){function t(t){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,Hh.v4)())},onEventMethodCall:function(e){var t=e.options;n.maybeUpdateAnonId(t)},onFinishedEvent:function(e){return n.addIdentity(e),e}})||this;return n.user=t,n}return(0,Rh.C6)(t,e),t.prototype.maybeUpdateAnonId=function(e){(null==e?void 0:e.anonymousId)&&this.user.anonymousId(e.anonymousId)},t.prototype.addIdentity=function(e){this.user.id()&&(e.userId=this.user.id()),this.user.anonymousId()&&(e.anonymousId=this.user.anonymousId())},t.prototype.track=function(t,n,r,o,i){var a=e.prototype.track.call(this,t,n,r,o);return Zh(a,i),a},t.prototype.page=function(t,n,r,o,i,a){var s=e.prototype.page.call(this,t,n,r,o,i);return Zh(s,a),s},t.prototype.screen=function(t,n,r,o,i,a){var s=e.prototype.screen.call(this,t,n,r,o,i);return Zh(s,a),s},t.prototype.identify=function(t,n,r,o,i){var a=e.prototype.identify.call(this,t,n,r,o);return Zh(a,i),a},t.prototype.group=function(t,n,r,o,i){var a=e.prototype.group.call(this,t,n,r,o);return Zh(a,i),a},t.prototype.alias=function(t,n,r,o,i){var a=e.prototype.alias.call(this,t,n,r,o);return Zh(a,i),a},t}(nd),od=function(e){return"addMiddleware"in e&&"destination"===e.type},id=a(5881),ad=a(6115),sd=a(9952),ud=a(4980),ld=function(e){function t(t){var n,r,o,i=e.call(this)||this;return i.criticalTasks=(o=0,{done:function(){return n},run:function(e){var t,i=e();return"object"==typeof(t=i)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1===++o&&(n=new Promise(function(e){return r=e})),i.finally(function(){return 0===--o&&r()})),i}}),i.plugins=[],i.failedInitializations=[],i.flushing=!1,i.queue=t,i.queue.on(ad.g,function(){i.scheduleFlush(0)}),i}return(0,Rh.C6)(t,e),t.prototype.register=function(e,t,n){return(0,Rh.sH)(this,void 0,void 0,function(){var r,o,i=this;return(0,Rh.YH)(this,function(a){switch(a.label){case 0:return this.plugins.push(t),r=function(n){i.failedInitializations.push(t.name),i.emit("initialization_failure",t),console.warn(t.name,n),e.log("warn","Failed to load destination",{plugin:t.name,error:n}),i.plugins=i.plugins.filter(function(e){return e!==t})},"destination"!==t.type||"Segment.io"===t.name?[3,1]:(t.load(e,n).catch(r),[3,4]);case 1:return a.trys.push([1,3,,4]),[4,t.load(e,n)];case 2:return a.sent(),[3,4];case 3:return o=a.sent(),r(o),[3,4];case 4:return[2]}})})},t.prototype.deregister=function(e,t,n){return(0,Rh.sH)(this,void 0,void 0,function(){var r;return(0,Rh.YH)(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:o.sent(),o.label=2;case 2:return this.plugins=this.plugins.filter(function(e){return e.name!==t.name}),[3,4];case 3:return r=o.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}})})},t.prototype.dispatch=function(e){return(0,Rh.sH)(this,void 0,void 0,function(){var t;return(0,Rh.YH)(this,function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]})})},t.prototype.subscribeToDelivery=function(e){return(0,Rh.sH)(this,void 0,void 0,function(){var t=this;return(0,Rh.YH)(this,function(n){return[2,new Promise(function(n){var r=function(o,i){o.isSame(e)&&(t.off("flush",r),n(o))};t.on("flush",r)})]})})},t.prototype.dispatchSingle=function(e){return(0,Rh.sH)(this,void 0,void 0,function(){var t=this;return(0,Rh.YH)(this,function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch(function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)})]})})},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout(function(){t.flush().then(function(){setTimeout(function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)},0)})},e))},t.prototype.deliver=function(e){return(0,Rh.sH)(this,void 0,void 0,function(){var t,n,r,o;return(0,Rh.YH)(this,function(i){switch(i.label){case 0:return[4,this.criticalTasks.done()];case 1:i.sent(),t=Date.now(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=i.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=i.sent(),o=r,e.log("error","Failed to deliver",o),this.emit("delivery_failure",e,o),e.stats.increment("delivery_failed"),r;case 5:return[2]}})})},t.prototype.enqueuRetry=function(e,t){return!(e instanceof sd.d&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return(0,Rh.sH)(this,void 0,void 0,function(){var e,t;return(0,Rh.YH)(this,function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}})})},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t=this.plugins.filter(function(t){var n,r,o;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var i=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach(function(t){void 0!==e[t]&&(i=e[t])}),null!==(o=null!==(r=e[t.name])&&void 0!==r?r:i)&&void 0!==o?o:!1!==("Segment.io"===t.name||e.All)}),n=function(e,t){var n={};return e.forEach(function(e){var r,o=void 0,i=e[t];void 0!==(o="string"!=typeof i?JSON.stringify(i):i)&&(n[o]=(0,Rh.fX)((0,Rh.fX)([],null!==(r=n[o])&&void 0!==r?r:[],!0),[e],!1))}),n}(t,"type"),r=n.before,o=void 0===r?[]:r,i=n.enrichment,a=void 0===i?[]:i,s=n.destination,u=void 0===s?[]:s,l=n.after;return{before:o,enrichment:a,destinations:u,after:void 0===l?[]:l}},t.prototype.flushOne=function(e){var t,n;return(0,Rh.sH)(this,void 0,void 0,function(){var r,o,i,a,s,u,l,c,f,h,d,p,v,g;return(0,Rh.YH)(this,function(y){switch(y.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),o=r.before,i=r.enrichment,a=0,s=o,y.label=1;case 1:return a0)return r;if(t.length<=1)return r;for(var o=t.length-2;o>=0;--o)r.push(t.slice(o).join("."));return r}(t),r=0;r0&&(t._metadata={failedInitializations:s}),null!=o&&(o.attempts>1&&(t._metadata=(0,Rh.Cl)((0,Rh.Cl)({},t._metadata),{retryCount:o.attempts})),o.attempts++);var u=[],l=[];for(var c in r){var f=r[c];"Segment.io"===c&&u.push(c),"bundled"===f.bundlingStatus&&u.push(c),"unbundled"===f.bundlingStatus&&l.push(c)}for(var h=0,d=(null==n?void 0:n.unbundledIntegrations)||[];h0&&!(0,Uh.a)()},function(){return(0,Rh.sH)(r,void 0,void 0,function(){var r;return(0,Rh.YH)(this,function(o){switch(o.label){case 0:return(r=t.pop())?[4,(0,ud.C)(r,e)]:[2];case 1:return o.sent()instanceof zh.o||n.push(r),[2]}})})})];case 1:return o.sent(),n.map(function(e){return t.pushWithBackoff(e)}),[2,t]}})})}function Qd(e,t,n,r){var o=this;e||setTimeout(function(){return(0,Rh.sH)(o,void 0,void 0,function(){var e,o;return(0,Rh.YH)(this,function(i){switch(i.label){case 0:return e=!0,[4,$d(n,t)];case 1:return o=i.sent(),e=!1,t.todo>0&&r(e,o,n,r),[2]}})})},5e3*Math.random())}var Jd=a(7947),ep=function(e){return"Segment.io"===e.name};function tp(e,t,n){var r,o,i;window.addEventListener("pagehide",function(){u.push.apply(u,Array.from(l)),l.clear()});var a,s=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new ad.M(e.queue.queue.maxAttempts,[]):new id.x(e.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),l=new Set,c=!1,f=null!==(o=null==t?void 0:t.apiHost)&&void 0!==o?o:Jd.a,h=null!==(i=null==t?void 0:t.protocol)&&void 0!==i?i:"https",d="".concat(h,"://").concat(f),p=null==t?void 0:t.deliveryStrategy,v=p&&"strategy"in p&&"batching"===p.strategy?function(e,t){var n,r,o,i,a,s=[],u=!1,l=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,c=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3,f=0;function h(n){var r;if(0!==n.length){var o=null===(r=n[0])||void 0===r?void 0:r.writeKey,i=n.map(function(e){var t=e;return t.sentAt,(0,Rh.Tt)(t,["sentAt"])});return(0,Hd.h)("https://".concat(e,"/b"),{credentials:null==t?void 0:t.credentials,keepalive:(null==t?void 0:t.keepalive)||u,headers:qd(null==t?void 0:t.headers),method:"post",body:JSON.stringify({writeKey:o,batch:i,sentAt:(new Date).toISOString()}),priority:null==t?void 0:t.priority}).then(function(e){var t;if(e.status>=500)throw new Error("Bad response from server: ".concat(e.status));if(429===e.status){var n=null===(t=e.headers)||void 0===t?void 0:t.get("x-ratelimit-reset"),r="string"==typeof n?1e3*parseInt(n):c;throw new Yd("Rate limit exceeded: ".concat(e.status),r)}})}}function d(e){var n;return void 0===e&&(e=1),(0,Rh.sH)(this,void 0,void 0,function(){var r;return(0,Rh.YH)(this,function(o){return s.length?(r=s,s=[],[2,null===(n=h(r))||void 0===n?void 0:n.catch(function(n){var o;zh.o.system().log("error","Error sending batch",n),e<=(null!==(o=null==t?void 0:t.maxRetries)&&void 0!==o?o:10)&&("RateLimitError"===n.name&&(f=n.retryTimeout),s.push.apply(s,r),s.map(function(t){if("_metadata"in t){var n=t;n._metadata=(0,Rh.Cl)((0,Rh.Cl)({},n._metadata),{retryCount:e})}}),p(e+1))})]):[2]})})}function p(e){void 0===e&&(e=1),o||(o=setTimeout(function(){o=void 0,d(e).catch(console.error)},f||c),f=0)}return i=function(e){if((u=e)&&s.length){var t=function(e){var t=[],n=0;return e.forEach(function(e){Xd(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]}),t}(s).map(h);Promise.all(t).catch(console.error)}},a=!1,window.addEventListener("pagehide",function(){a||i(a=!0)}),document.addEventListener("visibilitychange",function(){if("hidden"==document.visibilityState){if(a)return;a=!0}else a=!1;i(a)}),{dispatch:function(e,n){return(0,Rh.sH)(this,void 0,void 0,function(){var e;return(0,Rh.YH)(this,function(r){return s.push(n),e=s.length>=l||function(e){return Xd(e)>=450}(s)||(null==t?void 0:t.keepalive)&&function(e){return Xd(e)>=54}(s),[2,e||u?d():p()]})})}}}(f,p.config):(a=null==p?void 0:p.config,{dispatch:function(e,t){return(0,Hd.h)(e,{credentials:null==a?void 0:a.credentials,keepalive:null==a?void 0:a.keepalive,headers:qd(null==a?void 0:a.headers),method:"post",body:JSON.stringify(t),priority:null==a?void 0:a.priority}).then(function(e){var t;if(e.status>=500)throw new Error("Bad response from server: ".concat(e.status));if(429===e.status){var n=null===(t=e.headers)||void 0===t?void 0:t.get("x-ratelimit-reset"),r=n?1e3*parseInt(n):5e3;throw new Yd("Rate limit exceeded: ".concat(e.status),r)}})}});function g(r){return(0,Rh.sH)(this,void 0,void 0,function(){var o,i;return(0,Rh.YH)(this,function(a){return(0,Uh.a)()?(u.push(r),Qd(c,u,y,Qd),[2,r]):(l.add(r),o=r.event.type.charAt(0),i=(0,Gd.W)(r.event).json(),"track"===r.event.type&&delete i.traits,"alias"===r.event.type&&(i=function(e,t){var n,r,o,i,a=e.user();return t.previousId=null!==(o=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:a.id())&&void 0!==o?o:a.anonymousId(),t.userId=null!==(i=t.userId)&&void 0!==i?i:t.to,delete t.from,delete t.to,t}(e,i)),u.getAttempts(r)>=u.maxAttempts?(l.delete(r),[2,r]):[2,v.dispatch("".concat(d,"/").concat(o),Kd(e,i,t,n,r)).then(function(){return r}).catch(function(e){if(r.log("error","Error sending event",e),"RateLimitError"===e.name){var t=e.retryTimeout;u.pushWithBackoff(r,t)}else u.pushWithBackoff(r);return Qd(c,u,y,Qd),r}).finally(function(){l.delete(r)})])})})}var y={metadata:{writeKey:s,apiHost:f,protocol:h},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:g,identify:g,page:g,alias:g,group:g,screen:g};return u.todo&&Qd(c,u,y,Qd),y}var np="This is being deprecated and will be not be available in future releases of Analytics JS",rp=(0,kd.m)(),op=null==rp?void 0:rp.analytics,ip=function(){function e(e,t){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var e;return null===(e=t.plugins.find(ep))||void 0===e?void 0:e.metadata},this.writeKey=e.writeKey,this.cdnSettings=null!==(n=e.cdnSettings)&&void 0!==n?n:{integrations:{"Segment.io":{apiKey:""}}},this.cdnURL=e.cdnURL}return Object.defineProperty(e.prototype,"apiHost",{get:function(){var e,t;return null===(t=null===(e=this._getSegmentPluginMetadata)||void 0===e?void 0:e.call(this))||void 0===t?void 0:t.apiHost},enumerable:!1,configurable:!0}),e}();function ap(){console.warn(np)}var sp,up=function(e){function t(t,n,r,o,i){var a,s,u=this;(u=e.call(this)||this)._debug=!1,u.initialized=!1,u.user=function(){return u._user},u.init=u.initialize.bind(u),u.log=ap,u.addIntegrationMiddleware=ap,u.listeners=ap,u.addEventListener=ap,u.removeAllListeners=ap,u.removeListener=ap,u.removeEventListener=ap,u.hasListeners=ap,u.add=ap,u.addIntegration=ap;var l=null==n?void 0:n.cookie,c=null!==(a=null==n?void 0:n.disableClientPersistence)&&void 0!==a&&a;u.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?10:1,o=n?new ad.M(r,[]):new id.x(r,e);return new cd(o)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,c),u.settings=new ip(t,u.queue);var f=null==n?void 0:n.storage;return u._universalStorage=u.createStore(c,f,l),u._user=null!=o?o:new Td((0,Rh.Cl)({persist:!c,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),u._group=null!=i?i:new Cd((0,Rh.Cl)({persist:!c,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),u.eventFactory=new rd(u._user),u.integrations=null!==(s=null==n?void 0:n.integrations)&&void 0!==s?s:{},u.options=null!=n?n:{},fd(u),u}return(0,Rh.C6)(t,e),t.prototype.createStore=function(e,t,n){return e?new pd([new vd]):t&&gd(t)?new pd(Ed(Od(t.stores,n))):new pd(Ed([hd.LocalStorage,{name:hd.Cookie,settings:n},hd.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t4){var a=r.slice(4);"campaign"===a&&(a="name"),e[a]=(0,hp.p)(i)}return e},{})}(a));var u=function(){var e=bd.get("_ga");if(e&&e.startsWith("amp"))return e}();u&&(o.amp={id:u}),function(e,t,n){var r,o=new pd(n?[]:[new wd(pp())]),i=o.get("s:context.referrer"),a=null!==(r=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n0}(t)?[4,a.e(10).then(a.bind(a,6834)).then(function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)})]:[3,2];case 1:return p=T.sent(),[3,3];case 2:p=void 0,T.label=3;case 3:return d=p,P=t,"test"!==jh().NODE_ENV&&Object.keys(P.integrations).length>1||i.length>0?[4,a.e(50).then(a.bind(a,365)).then(function(o){return o.ajsDestinations(e,t,n.integrations,r,d,i)})]:[3,5];case 4:return g=T.sent(),[3,6];case 5:g=[],T.label=6;case 6:return v=g,t.legacyVideoPluginsEnabled?[4,a.e(694).then(a.bind(a,4503)).then(function(e){return e.loadLegacyVideoPlugins(n)})]:[3,8];case 7:T.sent(),T.label=8;case 8:return(null===(u=r.plan)||void 0===u?void 0:u.track)?[4,a.e(104).then(a.bind(a,681)).then(function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)})]:[3,10];case 9:return m=T.sent(),[3,11];case 10:m=void 0,T.label=11;case 11:return y=m,b=(0,cp.J)(t,r),[4,Ep(t,n.integrations,b,r,d,h).catch(function(){return[]})];case 12:return _=T.sent(),w=(0,Rh.fX)((0,Rh.fX)([yp],v,!0),_,!0),y&&w.push(y),!1===(null===(l=r.integrations)||void 0===l?void 0:l.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(E=(x=w).push,[4,tp(n,b["Segment.io"],t.integrations)]);case 13:E.apply(x,[T.sent()]),T.label=14;case 14:return[4,n.register.apply(n,(0,Rh.fX)((0,Rh.fX)([],w,!1),f,!1))];case 15:return O=T.sent(),[4,Nd(n,s)];case 16:return T.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some(function(e){return e[1]})?[4,a.e(521).then(a.bind(a,6904)).then(function(e){var o=e.remoteMiddlewares;return(0,Rh.sH)(S,void 0,void 0,function(){var e,i;return(0,Rh.YH)(this,function(a){switch(a.label){case 0:return[4,o(O,t,r.obfuscate)];case 1:return e=a.sent(),i=e.map(function(e){return n.addSourceMiddleware(e)}),[2,Promise.all(i)]}})})})]:[3,18];case 17:T.sent(),T.label=18;case 18:return[4,Md(n,s)];case 19:return T.sent(),[2,O]}var P})})}var Ap=function(e){function t(){var t=this,n=(0,fp.u)(),r=n.promise,o=n.resolve;return t=e.call(this,function(e){return r.then(function(t){return function(e,t,n){var r,o,i,a,s,u,l,c,f;return void 0===t&&(t={}),(0,Rh.sH)(this,void 0,void 0,function(){var h,d,p,v,g,y,m,b,_,w;return(0,Rh.YH)(this,function(x){switch(x.label){case 0:return!0===t.disable?[2,[new lp,zh.o.system()]]:(t.globalAnalyticsKey&&(0,Id.rY)(t.globalAnalyticsKey),e.cdnURL&&(0,Mh.qQ)(e.cdnURL),t.initialPageview&&n.add(new Ud("page",[])),h=function(){var e,t,n=null!==(e=window.location.hash)&&void 0!==e?e:"",r=null!==(t=window.location.search)&&void 0!==t?t:"";return r.length?r:n.replace(/(?=#).*(?=\?)/,"")}(),d=null!==(r=e.cdnURL)&&void 0!==r?r:(0,Mh.I2)(),null===(o=e.cdnSettings)||void 0===o?[3,1]:(v=o,[3,3]));case 1:return[4,(E=e.writeKey,O=d,(0,Hd.h)("".concat(O,"/v1/projects/").concat(E,"/settings")).then(function(e){return e.ok?e.json():e.text().then(function(e){throw new Error(e)})}).catch(function(e){throw console.error(e.message),e}))];case 2:v=x.sent(),x.label=3;case 3:return p=v,t.updateCDNSettings&&(p=t.updateCDNSettings(p)),"function"!=typeof t.disable?[3,5]:[4,t.disable(p)];case 4:if(x.sent())return[2,[new lp,zh.o.system()]];x.label=5;case 5:return g=null===(a=null===(i=p.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===a||a,t=(0,Rh.Cl)({retryQueue:g},t),function(e){var t;null===(t=Op.attach)||void 0===t||t.call(Op,e)}(y=new up((0,Rh.Cl)((0,Rh.Cl)({},e),{cdnSettings:p,cdnURL:d}),t)),m=null!==(s=e.plugins)&&void 0!==s?s:[],b=null!==(u=e.classicIntegrations)&&void 0!==u?u:[],_=null===(l=t.integrations)||void 0===l?void 0:l["Segment.io"],Sp.U.initRemoteMetrics((0,Rh.Cl)((0,Rh.Cl)({},p.metrics),{host:null!==(c=null==_?void 0:_.apiHost)&&void 0!==c?c:null===(f=p.metrics)||void 0===f?void 0:f.host,protocol:null==_?void 0:_.protocol})),[4,Cp(e.writeKey,p,y,t,m,b,n)];case 6:return w=x.sent(),y.initialized=!0,y.emit("initialize",e,t),[4,Tp(y,h,n)];case 7:return x.sent(),[2,[y,w]]}var E,O})})}(t[0],t[1],e)})})||this,t._resolveLoadStart=function(e,t){return o([e,t])},t}return(0,Rh.C6)(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then(function(e){return e[0]})},t}(Wd),kp={7991:(e,t)=>{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;return 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),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));return 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]+"=")),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},1048:(e,t,n)=>{const r=n(7991),o=n(9318),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(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 f(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|v(e,t);let r=s(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(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(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,n);const o=function(e){if(u.isBuffer(e)){const t=0|p(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.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 c(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 f(e){return c(e),s(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),n=s(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function v(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(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);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(o)return r?-1:Y(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){let 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 k(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function m(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),Z(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=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:b(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):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){let 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){let r=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){let n=!0;for(let r=0;ro&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(u=(31&t)<<6|63&n,u>127&&(i=u));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(u=(15&t)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(u=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},u.byteLength=v,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,o){if(K(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.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;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(i,a),l=this.slice(r,o),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const 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");let i=!1;for(;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function C(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;or)&&(n=r);let o="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,o,i){if(!u.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 M(e,t,n,r,o){V(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let 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 N(e,t,n,r,o){V(t,r,o,e,n,7);let 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;let 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 D(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 L(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){const 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||R(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Q(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||G(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||G(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Q(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||G(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||G(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||R(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(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},u.prototype.writeBigUInt64LE=Q(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Q(function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o>>=0,!r){const r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(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},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(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},u.prototype.writeBigInt64LE=Q(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Q(function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.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(o=t;o=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function V(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||G(t,e.length-(n+1))}(r,o,i)}function W(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,n){if(Math.floor(e)!==e)throw W(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),U("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=z(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=z(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r},RangeError);const H=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let 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 q(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function X(e,t,n,r){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},6931:e=>{e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},3269:(e,t,n)=>{var r=n(6931),o=n(9975),i=Object.hasOwnProperty,a=Object.create(null);for(var s in r)i.call(r,s)&&(a[r[s]]=s);var u=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function c(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}u.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=u.get.hsl(e),n="hsl";break;case"hwb":t=u.get.hwb(e),n="hwb";break;default:t=u.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},u.get.rgb=function(e){if(!e)return null;var t,n,o,a=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],n=0;n<3;n++){var s=2*n;a[n]=parseInt(t.slice(s,s+2),16)}o&&(a[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],n=0;n<3;n++)a[n]=parseInt(t[n]+t[n],16);o&&(a[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(t[n+1],0);t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:i.call(r,t[1])?((a=r[t[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}for(n=0;n<3;n++)a[n]=l(a[n],0,255);return a[3]=l(a[3],0,1),a},u.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},u.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},u.to.hex=function(){var e=o(arguments);return"#"+c(e[0])+c(e[1])+c(e[2])+(e[3]<1?c(Math.round(255*e[3])):"")},u.to.rgb=function(){var e=o(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},u.to.rgb.percent=function(){var e=o(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},u.to.hsl=function(){var e=o(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},u.to.hwb=function(){var e=o(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},u.to.keyword=function(e){return a[e.slice(0,3)]}},9792:(e,t,n)=>{var r=n(7045),o=n(4360),i=n(6804);e.exports=function(e,t){if(!t)return e;var n=Object.keys(t);if(0===n.length)return e;for(var a=r(e),s=n.length-1;s>=0;s--){var u=n[s],l=String(t[u]);l&&(l=" "+l),i(a,{type:"preprocessor",data:"#define "+u+l})}return o(a)}},6804:e=>{e.exports=function(e,o){Array.isArray(o)||(o=[o]);var i=function(e){for(var t=-1,n=0;n0?e[i-1]:null;a&&n.test(a.data)&&e.splice(i++,0,t),e.splice.apply(e,[i,0].concat(o));var s=i+o.length;return e[s]&&/[^\r\n]$/.test(e[s].data)&&e.splice(s,0,t),e};var t={data:"\n",type:"whitespace"},n=/[^\r\n]$/;function r(e,t){for(var n=t;n{e.exports=function(e){for(var t=[],n=0;n{e.exports=function(e){var t,n,E,O=0,S=0,T=u,P=[],C=[],A=1,k=0,I=0,R=!1,j=!1,M="",N=i,D=r;"300 es"===(e=e||{}).version&&(N=s,D=a);var L={},B={};for(O=0;O0)continue;n=e.slice(0,1).join("")}return F(n),I+=n.length,(P=P.slice(n.length)).length}}function Y(){return/[^a-fA-F0-9]/.test(t)?(F(P.join("")),T=u,O):(P.push(t),n=t,O+1)}function q(){return"."===t||/[eE]/.test(t)?(P.push(t),T=v,n=t,O+1):"x"===t&&1===P.length&&"0"===P[0]?(T=w,P.push(t),n=t,O+1):/[^\d]/.test(t)?(F(P.join("")),T=u,O):(P.push(t),n=t,O+1)}function X(){return"f"===t&&(P.push(t),n=t,O+=1),/[eE]/.test(t)?(P.push(t),n=t,O+1):("-"!==t&&"+"!==t||!/[eE]/.test(n))&&/[^\d]/.test(t)?(F(P.join("")),T=u,O):(P.push(t),n=t,O+1)}function K(){if(/[^\d\w_]/.test(t)){var e=P.join("");return T=B[e]?m:L[e]?y:g,F(P.join("")),T=u,O}return P.push(t),n=t,O+1}};var r=n(4704),o=n(2063),i=n(7192),a=n(8784),s=n(5592),u=999,l=9999,c=0,f=1,h=2,d=3,p=4,v=5,g=6,y=7,m=8,b=9,_=10,w=11,x=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},5592:(e,t,n)=>{var r=n(7192);r=r.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)}),e.exports=r.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},7192:e=>{e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},8784:(e,t,n)=>{var r=n(4704);e.exports=r.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},4704:e=>{e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},2063:e=>{e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7045:(e,t,n)=>{var r=n(3206);e.exports=function(e,t){var n=r(t),o=[];return(o=o.concat(n(e))).concat(n(null))}},9318:(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}},5250:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],v="[object Arguments]",g="[object Array]",y="[object Boolean]",m="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",x="[object Map]",E="[object Number]",O="[object Object]",S="[object Promise]",T="[object RegExp]",P="[object Set]",C="[object String]",A="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",j="[object Float32Array]",M="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",B="[object Uint8Array]",F="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,q=RegExp(H.source),X=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Oe="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="["+we+"]",Ae="["+Pe+"]",ke="["+xe+"]",Ie="\\d+",Re="["+Ee+"]",je="["+Oe+"]",Me="[^"+we+Pe+Ie+Ee+Oe+Se+"]",Ne="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Se+"]",Ue="\\u200d",ze="(?:"+je+"|"+Me+")",Ve="(?:"+Fe+"|"+Me+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ge="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+ke+"|"+Ne+")?",Ye="["+Te+"]?",qe=Ye+He+"(?:"+Ue+"(?:"+[De,Le,Be].join("|")+")"+Ye+He+")*",Xe="(?:"+[Re,Le,Be].join("|")+")"+qe,Ke="(?:"+[De+ke+"?",ke,Le,Be,Ce].join("|")+")",Ze=RegExp("['’]","g"),$e=RegExp(ke,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ke+qe,"g"),Je=RegExp([Fe+"?"+je+"+"+We+"(?="+[Ae,Fe,"$"].join("|")+")",Ve+"+"+Ge+"(?="+[Ae,Fe+ze,"$"].join("|")+")",Fe+"?"+ze+"+"+We,Fe+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Xe].join("|"),"g"),et=RegExp("["+Ue+we+xe+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[j]=ot[M]=ot[N]=ot[D]=ot[L]=ot[B]=ot[F]=ot[U]=ot[z]=!0,ot[v]=ot[g]=ot[I]=ot[y]=ot[R]=ot[m]=ot[b]=ot[_]=ot[x]=ot[E]=ot[O]=ot[T]=ot[P]=ot[C]=ot[k]=!1;var it={};it[v]=it[g]=it[I]=it[R]=it[y]=it[m]=it[j]=it[M]=it[N]=it[D]=it[L]=it[x]=it[E]=it[O]=it[T]=it[P]=it[C]=it[A]=it[B]=it[F]=it[U]=it[z]=!0,it[b]=it[_]=it[k]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ct||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,vt=pt&<.process,gt=function(){try{return dt&&dt.require&&dt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,mt=gt&>.isDate,bt=gt&>.isMap,_t=gt&>.isRegExp,wt=gt&>.isSet,xt=gt&>.isTypedArray;function Et(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ot(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function kt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function Jt(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var en=Gt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n",""":'"',"'":"'"}),dn=function e(t){var n,r=(t=null==t?ft:dn.defaults(ft.Object(),t,dn.pick(ft,nt))).Array,oe=t.Date,we=t.Error,xe=t.Function,Ee=t.Math,Oe=t.Object,Se=t.RegExp,Te=t.String,Pe=t.TypeError,Ce=r.prototype,Ae=xe.prototype,ke=Oe.prototype,Ie=t["__core-js_shared__"],Re=Ae.toString,je=ke.hasOwnProperty,Me=0,Ne=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=ke.toString,Le=Re.call(Oe),Be=ft._,Fe=Se("^"+Re.call(je).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=pt?t.Buffer:o,ze=t.Symbol,Ve=t.Uint8Array,We=Ue?Ue.allocUnsafe:o,Ge=an(Oe.getPrototypeOf,Oe),He=Oe.create,Ye=ke.propertyIsEnumerable,qe=Ce.splice,Xe=ze?ze.isConcatSpreadable:o,Ke=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=ui(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,lt=oe&&oe.now!==ft.Date.now&&oe.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Ee.ceil,dt=Ee.floor,vt=Oe.getOwnPropertySymbols,gt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Gt=Ce.join,pn=an(Oe.keys,Oe),vn=Ee.max,gn=Ee.min,yn=oe.now,mn=t.parseInt,bn=Ee.random,_n=Ce.reverse,wn=ui(t,"DataView"),xn=ui(t,"Map"),En=ui(t,"Promise"),On=ui(t,"Set"),Sn=ui(t,"WeakMap"),Tn=ui(Oe,"create"),Pn=Sn&&new Sn,Cn={},An=Di(wn),kn=Di(xn),In=Di(En),Rn=Di(On),jn=Di(Sn),Mn=ze?ze.prototype:o,Nn=Mn?Mn.valueOf:o,Dn=Mn?Mn.toString:o;function Ln(e){if(Ja(e)&&!Va(e)&&!(e instanceof zn)){if(e instanceof Un)return e;if(je.call(e,"__wrapped__"))return Li(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!Qa(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Fn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ir(e,t,n,r,i,a){var s,u=1&t,l=2&t,c=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!Qa(e))return e;var f=Va(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return To(e,s)}else{var h=fi(e),d=h==_||h==w;if(Ya(e))return _o(e,u);if(h==O||h==v||d&&!i){if(s=l||d?{}:di(e),!u)return l?function(e,t){return Po(e,ci(e),t)}(e,function(e,t){return e&&Po(t,ks(t),e)}(s,e)):function(e,t){return Po(e,li(e),t)}(e,tr(s,e))}else{if(!it[h])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case I:return wo(e);case y:case m:return new o(+e);case R:return function(e,t){var n=t?wo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case j:case M:case N:case D:case L:case B:case F:case U:case z:return xo(e,n);case x:return new o;case E:case C:return new o(e);case T:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new o;case A:return r=e,Nn?Oe(Nn.call(r)):{}}}(e,h,u)}}a||(a=new Yn);var p=a.get(e);if(p)return p;a.set(e,s),os(e)?e.forEach(function(r){s.add(ir(r,t,n,r,e,a))}):es(e)&&e.forEach(function(r,o){s.set(o,ir(r,t,n,o,e,a))});var g=f?o:(c?l?ti:ei:l?ks:As)(e);return St(g||e,function(r,o){g&&(r=e[o=r]),Qn(s,o,ir(r,t,n,o,e,a))}),s}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Oe(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function sr(e,t,n){if("function"!=typeof e)throw new Pe(i);return Pi(function(){e.apply(o,n)},t)}function ur(e,t,n,r){var o=-1,i=At,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=It(t,Kt(n))),r?(i=kt,a=!1):t.length>=200&&(i=$t,a=!1,t=new Hn(t));e:for(;++o-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=Jn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(xn||Wn),string:new Vn}},Gn.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return ai(this,e).get(e)},Gn.prototype.has=function(e){return ai(this,e).has(e)},Gn.prototype.set=function(e,t){var n=ai(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(e){return this.__data__.set(e,a),this},Hn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var lr=ko(yr),cr=ko(mr,!0);function fr(e,t){var n=!0;return lr(e,function(e,r,o){return n=!!t(e,r,o)}),n}function hr(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?pr(s,t-1,n,r,o):Rt(o,s):r||(o[o.length]=s)}return o}var vr=Io(),gr=Io(!0);function yr(e,t){return e&&vr(e,t,As)}function mr(e,t){return e&&gr(e,t,As)}function br(e,t){return Ct(t,function(t){return Ka(e[t])})}function _r(e,t){for(var n=0,r=(t=go(t,e)).length;null!=e&&nt}function Or(e,t){return null!=e&&je.call(e,t)}function Sr(e,t){return null!=e&&t in Oe(e)}function Tr(e,t,n){for(var i=n?kt:At,a=e[0].length,s=e.length,u=s,l=r(s),c=1/0,f=[];u--;){var h=e[u];u&&t&&(h=It(h,Kt(t))),c=gn(h.length,c),l[u]=!n&&(t||a>=120&&h.length>=120)?new Hn(u&&h):o}h=e[0];var d=-1,p=l[0];e:for(;++d=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(o)}function zr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&qe.call(s,u,1),qe.call(e,u,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;vi(o)?qe.call(e,o,1):so(e,o)}}return e}function Gr(e,t){return e+dt(bn()*(t-e+1))}function Hr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Ci(Ei(e,t,tu),e+"")}function qr(e){return Xn(Bs(e))}function Xr(e,t){var n=Bs(e);return Ii(n,or(t,0,n.length))}function Kr(e,t,n,r){if(!Qa(e))return e;for(var i=-1,a=(t=go(t,e)).length,s=a-1,u=e;null!=u&&++ii?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o>>1,a=e[i];null!==a&&!as(a)&&(n?a<=t:a=200){var l=t?null:Yo(e);if(l)return un(l);a=!1,o=$t,u=new Hn}else u=t?[]:s;e:for(;++r=r?e:Jr(e,t,n)}var bo=at||function(e){return ft.clearTimeout(e)};function _o(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function wo(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function xo(e,t){var n=t?wo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Eo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=as(e),s=t!==o,u=null===t,l=t==t,c=as(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&e1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&gi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Oe(t);++r-1?i[a?t[s]:s]:o}}function Do(e){return Jo(function(t){var n=t.length,r=n,a=Un.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Pe(i);if(a&&!u&&"wrapper"==ri(s))var u=new Un([],!0)}for(r=u?r:n;++r1&&_.reverse(),d&&fu))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var h=-1,d=!0,p=2&n?new Hn:o;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return St(p,function(n){var r="_."+n[0];t&n[1]&&!At(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function ki(e){var t=0,n=0;return function(){var r=yn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ii(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,ra(e,n)});function ca(e){var t=Ln(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var ha=Jo(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return rr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof zn&&vi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:fa,args:[i],thisArg:o}),new Un(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)}),da=Co(function(e,t,n){je.call(e,n)?++e[n]:nr(e,n,1)}),pa=No(zi),va=No(Vi);function ga(e,t){return(Va(e)?St:lr)(e,ii(t,3))}function ya(e,t){return(Va(e)?Tt:cr)(e,ii(t,3))}var ma=Co(function(e,t,n){je.call(e,n)?e[n].push(t):nr(e,n,[t])}),ba=Yr(function(e,t,n){var o=-1,i="function"==typeof t,a=Ga(e)?r(e.length):[];return lr(e,function(e){a[++o]=i?Et(t,e,n):Pr(e,t,n)}),a}),_a=Co(function(e,t,n){nr(e,n,t)});function wa(e,t){return(Va(e)?It:Nr)(e,ii(t,3))}var xa=Co(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ea=Yr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&gi(e,t[0],t[1])?t=[]:n>2&&gi(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,pr(t,1),[])}),Oa=lt||function(){return ft.Date.now()};function Sa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Xo(e,l,o,o,o,o,t)}function Ta(e,t){var n;if("function"!=typeof t)throw new Pe(i);return e=hs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Pa=Yr(function(e,t,n){var r=1;if(n.length){var o=sn(n,oi(Pa));r|=u}return Xo(e,r,t,n,o)}),Ca=Yr(function(e,t,n){var r=3;if(n.length){var o=sn(n,oi(Ca));r|=u}return Xo(t,r,e,n,o)});function Aa(e,t,n){var r,a,s,u,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Pe(i);function v(t){var n=r,i=a;return r=a=o,f=t,u=e.apply(i,n)}function g(e){var n=e-c;return c===o||n>=t||n<0||d&&e-f>=s}function y(){var e=Oa();if(g(e))return m(e);l=Pi(y,function(e){var n=t-(e-c);return d?gn(n,s-(e-f)):n}(e))}function m(e){return l=o,p&&r?v(e):(r=a=o,u)}function b(){var e=Oa(),n=g(e);if(r=arguments,a=this,c=e,n){if(l===o)return function(e){return f=e,l=Pi(y,t),h?v(e):u}(c);if(d)return bo(l),l=Pi(y,t),v(c)}return l===o&&(l=Pi(y,t)),u}return t=ps(t)||0,Qa(n)&&(h=!!n.leading,s=(d="maxWait"in n)?vn(ps(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==o&&bo(l),f=0,r=c=a=l=o},b.flush=function(){return l===o?u:m(Oa())},b}var ka=Yr(function(e,t){return sr(e,1,t)}),Ia=Yr(function(e,t,n){return sr(e,ps(t)||0,n)});function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ra.Cache||Gn),n}function ja(e){if("function"!=typeof e)throw new Pe(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Gn;var Ma=yo(function(e,t){var n=(t=1==t.length&&Va(t[0])?It(t[0],Kt(ii())):It(pr(t,1),Kt(ii()))).length;return Yr(function(r){for(var o=-1,i=gn(r.length,n);++o=t}),za=Cr(function(){return arguments}())?Cr:function(e){return Ja(e)&&je.call(e,"callee")&&!Ye.call(e,"callee")},Va=r.isArray,Wa=yt?Kt(yt):function(e){return Ja(e)&&xr(e)==I};function Ga(e){return null!=e&&$a(e.length)&&!Ka(e)}function Ha(e){return Ja(e)&&Ga(e)}var Ya=gt||pu,qa=mt?Kt(mt):function(e){return Ja(e)&&xr(e)==m};function Xa(e){if(!Ja(e))return!1;var t=xr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ns(e)}function Ka(e){if(!Qa(e))return!1;var t=xr(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==hs(e)}function $a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ja(e){return null!=e&&"object"==typeof e}var es=bt?Kt(bt):function(e){return Ja(e)&&fi(e)==x};function ts(e){return"number"==typeof e||Ja(e)&&xr(e)==E}function ns(e){if(!Ja(e)||xr(e)!=O)return!1;var t=Ge(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==Le}var rs=_t?Kt(_t):function(e){return Ja(e)&&xr(e)==T},os=wt?Kt(wt):function(e){return Ja(e)&&fi(e)==P};function is(e){return"string"==typeof e||!Va(e)&&Ja(e)&&xr(e)==C}function as(e){return"symbol"==typeof e||Ja(e)&&xr(e)==A}var ss=xt?Kt(xt):function(e){return Ja(e)&&$a(e.length)&&!!ot[xr(e)]},us=Wo(Mr),ls=Wo(function(e,t){return e<=t});function cs(e){if(!e)return[];if(Ga(e))return is(e)?cn(e):To(e);if(Ke&&e[Ke])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ke]());var t=fi(e);return(t==x?on:t==P?un:Bs)(e)}function fs(e){return e?(e=ps(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=fs(e),n=t%1;return t==t?n?t-n:t:0}function ds(e){return e?or(hs(e),0,d):0}function ps(e){if("number"==typeof e)return e;if(as(e))return h;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=pe.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function vs(e){return Po(e,ks(e))}function gs(e){return null==e?"":io(e)}var ys=Ao(function(e,t){if(_i(t)||Ga(t))Po(t,As(t),e);else for(var n in t)je.call(t,n)&&Qn(e,n,t[n])}),ms=Ao(function(e,t){Po(t,ks(t),e)}),bs=Ao(function(e,t,n,r){Po(t,ks(t),e,r)}),_s=Ao(function(e,t,n,r){Po(t,As(t),e,r)}),ws=Jo(rr),xs=Yr(function(e,t){e=Oe(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&gi(t[0],t[1],i)&&(r=1);++n1),t}),Po(e,ti(e),n),r&&(n=ir(n,7,$o));for(var o=t.length;o--;)so(n,t[o]);return n}),Ms=Jo(function(e,t){return null==e?{}:function(e,t){return zr(e,t,function(t,n){return Ss(e,n)})}(e,t)});function Ns(e,t){if(null==e)return{};var n=It(ti(e),function(e){return[e]});return t=ii(t),zr(e,n,function(e,n){return t(e,n[0])})}var Ds=qo(As),Ls=qo(ks);function Bs(e){return null==e?[]:Zt(e,As(e))}var Fs=jo(function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)});function Us(e){return Xs(gs(e).toLowerCase())}function zs(e){return(e=gs(e))&&e.replace(me,en).replace($e,"")}var Vs=jo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ws=jo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Gs=Ro("toLowerCase"),Hs=jo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Ys=jo(function(e,t,n){return e+(n?" ":"")+Xs(t)}),qs=jo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Xs=Ro("toUpperCase");function Ks(e,t,n){return e=gs(e),(t=n?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Zs=Yr(function(e,t){try{return Et(e,o,t)}catch(e){return Xa(e)?e:new we(e)}}),$s=Jo(function(e,t){return St(t,function(t){t=Ni(t),nr(e,t,Pa(e[t],e))}),e});function Qs(e){return function(){return e}}var Js=Do(),eu=Do(!0);function tu(e){return e}function nu(e){return Rr("function"==typeof e?e:ir(e,1))}var ru=Yr(function(e,t){return function(n){return Pr(n,e,t)}}),ou=Yr(function(e,t){return function(n){return Pr(e,n,t)}});function iu(e,t,n){var r=As(t),o=br(t,r);null!=n||Qa(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=br(t,As(t)));var i=!(Qa(n)&&"chain"in n&&!n.chain),a=Ka(e);return St(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=To(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Rt([this.value()],arguments))})}),e}function au(){}var su=Uo(It),uu=Uo(Pt),lu=Uo(Nt);function cu(e){return yi(e)?Wt(Ni(e)):function(e){return function(t){return _r(t,e)}}(e)}var fu=Vo(),hu=Vo(!0);function du(){return[]}function pu(){return!1}var vu,gu=Fo(function(e,t){return e+t},0),yu=Ho("ceil"),mu=Fo(function(e,t){return e/t},1),bu=Ho("floor"),_u=Fo(function(e,t){return e*t},1),wu=Ho("round"),xu=Fo(function(e,t){return e-t},0);return Ln.after=function(e,t){if("function"!=typeof t)throw new Pe(i);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Ln.ary=Sa,Ln.assign=ys,Ln.assignIn=ms,Ln.assignInWith=bs,Ln.assignWith=_s,Ln.at=ws,Ln.before=Ta,Ln.bind=Pa,Ln.bindAll=$s,Ln.bindKey=Ca,Ln.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},Ln.chain=ca,Ln.chunk=function(e,t,n){t=(n?gi(e,t,n):t===o)?1:vn(hs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(ht(i/t));ai?0:i+n),(r=r===o||r>i?i:hs(r))<0&&(r+=i),r=n>r?0:ds(r);n>>0)?(e=gs(e))&&("string"==typeof t||null!=t&&!rs(t))&&!(t=io(t))&&rn(e)?mo(cn(e),0,n):e.split(t,n):[]},Ln.spread=function(e,t){if("function"!=typeof e)throw new Pe(i);return t=null==t?0:vn(hs(t),0),Yr(function(n){var r=n[t],o=mo(n,0,t);return r&&Rt(o,r),Et(e,this,o)})},Ln.tail=function(e){var t=null==e?0:e.length;return t?Jr(e,1,t):[]},Ln.take=function(e,t,n){return e&&e.length?Jr(e,0,(t=n||t===o?1:hs(t))<0?0:t):[]},Ln.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Jr(e,(t=r-(t=n||t===o?1:hs(t)))<0?0:t,r):[]},Ln.takeRightWhile=function(e,t){return e&&e.length?lo(e,ii(t,3),!1,!0):[]},Ln.takeWhile=function(e,t){return e&&e.length?lo(e,ii(t,3)):[]},Ln.tap=function(e,t){return t(e),e},Ln.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Pe(i);return Qa(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Aa(e,t,{leading:r,maxWait:t,trailing:o})},Ln.thru=fa,Ln.toArray=cs,Ln.toPairs=Ds,Ln.toPairsIn=Ls,Ln.toPath=function(e){return Va(e)?It(e,Ni):as(e)?[e]:To(Mi(gs(e)))},Ln.toPlainObject=vs,Ln.transform=function(e,t,n){var r=Va(e),o=r||Ya(e)||ss(e);if(t=ii(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Qa(e)&&Ka(i)?Bn(Ge(e)):{}}return(o?St:yr)(e,function(e,r,o){return t(n,e,r,o)}),n},Ln.unary=function(e){return Sa(e,1)},Ln.union=Ji,Ln.unionBy=ea,Ln.unionWith=ta,Ln.uniq=function(e){return e&&e.length?ao(e):[]},Ln.uniqBy=function(e,t){return e&&e.length?ao(e,ii(t,2)):[]},Ln.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?ao(e,o,t):[]},Ln.unset=function(e,t){return null==e||so(e,t)},Ln.unzip=na,Ln.unzipWith=ra,Ln.update=function(e,t,n){return null==e?e:uo(e,t,vo(n))},Ln.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:uo(e,t,vo(n),r)},Ln.values=Bs,Ln.valuesIn=function(e){return null==e?[]:Zt(e,ks(e))},Ln.without=oa,Ln.words=Ks,Ln.wrap=function(e,t){return Na(vo(t),e)},Ln.xor=ia,Ln.xorBy=aa,Ln.xorWith=sa,Ln.zip=ua,Ln.zipObject=function(e,t){return ho(e||[],t||[],Qn)},Ln.zipObjectDeep=function(e,t){return ho(e||[],t||[],Kr)},Ln.zipWith=la,Ln.entries=Ds,Ln.entriesIn=Ls,Ln.extend=ms,Ln.extendWith=bs,iu(Ln,Ln),Ln.add=gu,Ln.attempt=Zs,Ln.camelCase=Fs,Ln.capitalize=Us,Ln.ceil=yu,Ln.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=ps(n))==n?n:0),t!==o&&(t=(t=ps(t))==t?t:0),or(ps(e),t,n)},Ln.clone=function(e){return ir(e,4)},Ln.cloneDeep=function(e){return ir(e,5)},Ln.cloneDeepWith=function(e,t){return ir(e,5,t="function"==typeof t?t:o)},Ln.cloneWith=function(e,t){return ir(e,4,t="function"==typeof t?t:o)},Ln.conformsTo=function(e,t){return null==t||ar(e,t,As(t))},Ln.deburr=zs,Ln.defaultTo=function(e,t){return null==e||e!=e?t:e},Ln.divide=mu,Ln.endsWith=function(e,t,n){e=gs(e),t=io(t);var r=e.length,i=n=n===o?r:or(hs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Ln.eq=Ba,Ln.escape=function(e){return(e=gs(e))&&X.test(e)?e.replace(Y,tn):e},Ln.escapeRegExp=function(e){return(e=gs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Ln.every=function(e,t,n){var r=Va(e)?Pt:fr;return n&&gi(e,t,n)&&(t=o),r(e,ii(t,3))},Ln.find=pa,Ln.findIndex=zi,Ln.findKey=function(e,t){return Lt(e,ii(t,3),yr)},Ln.findLast=va,Ln.findLastIndex=Vi,Ln.findLastKey=function(e,t){return Lt(e,ii(t,3),mr)},Ln.floor=bu,Ln.forEach=ga,Ln.forEachRight=ya,Ln.forIn=function(e,t){return null==e?e:vr(e,ii(t,3),ks)},Ln.forInRight=function(e,t){return null==e?e:gr(e,ii(t,3),ks)},Ln.forOwn=function(e,t){return e&&yr(e,ii(t,3))},Ln.forOwnRight=function(e,t){return e&&mr(e,ii(t,3))},Ln.get=Os,Ln.gt=Fa,Ln.gte=Ua,Ln.has=function(e,t){return null!=e&&hi(e,t,Or)},Ln.hasIn=Ss,Ln.head=Gi,Ln.identity=tu,Ln.includes=function(e,t,n,r){e=Ga(e)?e:Bs(e),n=n&&!r?hs(n):0;var o=e.length;return n<0&&(n=vn(o+n,0)),is(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ft(e,t,n)>-1},Ln.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=vn(r+o,0)),Ft(e,t,o)},Ln.inRange=function(e,t,n){return t=fs(t),n===o?(n=t,t=0):n=fs(n),function(e,t,n){return e>=gn(t,n)&&e=-9007199254740991&&e<=f},Ln.isSet=os,Ln.isString=is,Ln.isSymbol=as,Ln.isTypedArray=ss,Ln.isUndefined=function(e){return e===o},Ln.isWeakMap=function(e){return Ja(e)&&fi(e)==k},Ln.isWeakSet=function(e){return Ja(e)&&"[object WeakSet]"==xr(e)},Ln.join=function(e,t){return null==e?"":Gt.call(e,t)},Ln.kebabCase=Vs,Ln.last=Xi,Ln.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=hs(n))<0?vn(r+i,0):gn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Bt(e,zt,i,!0)},Ln.lowerCase=Ws,Ln.lowerFirst=Gs,Ln.lt=us,Ln.lte=ls,Ln.max=function(e){return e&&e.length?hr(e,tu,Er):o},Ln.maxBy=function(e,t){return e&&e.length?hr(e,ii(t,2),Er):o},Ln.mean=function(e){return Vt(e,tu)},Ln.meanBy=function(e,t){return Vt(e,ii(t,2))},Ln.min=function(e){return e&&e.length?hr(e,tu,Mr):o},Ln.minBy=function(e,t){return e&&e.length?hr(e,ii(t,2),Mr):o},Ln.stubArray=du,Ln.stubFalse=pu,Ln.stubObject=function(){return{}},Ln.stubString=function(){return""},Ln.stubTrue=function(){return!0},Ln.multiply=_u,Ln.nth=function(e,t){return e&&e.length?Fr(e,hs(t)):o},Ln.noConflict=function(){return ft._===this&&(ft._=Be),this},Ln.noop=au,Ln.now=Oa,Ln.pad=function(e,t,n){e=gs(e);var r=(t=hs(t))?ln(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return zo(dt(o),n)+e+zo(ht(o),n)},Ln.padEnd=function(e,t,n){e=gs(e);var r=(t=hs(t))?ln(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=bn();return gn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Gr(e,t)},Ln.reduce=function(e,t,n){var r=Va(e)?jt:Ht,o=arguments.length<3;return r(e,ii(t,4),n,o,lr)},Ln.reduceRight=function(e,t,n){var r=Va(e)?Mt:Ht,o=arguments.length<3;return r(e,ii(t,4),n,o,cr)},Ln.repeat=function(e,t,n){return t=(n?gi(e,t,n):t===o)?1:hs(t),Hr(gs(e),t)},Ln.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Ln.result=function(e,t,n){var r=-1,i=(t=go(t,e)).length;for(i||(i=1,e=o);++rf)return[];var n=d,r=gn(e,d);t=ii(t),e-=d;for(var o=qt(r,t);++n=a)return e;var u=n-ln(r);if(u<1)return r;var l=s?mo(s,0,u).join(""):e.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),rs(i)){if(e.slice(u).search(i)){var c,f=l;for(i.global||(i=Se(i.source,gs(he.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(e.indexOf(io(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Ln.unescape=function(e){return(e=gs(e))&&q.test(e)?e.replace(H,hn):e},Ln.uniqueId=function(e){var t=++Me;return gs(e)+t},Ln.upperCase=qs,Ln.upperFirst=Xs,Ln.each=ga,Ln.eachRight=ya,Ln.first=Gi,iu(Ln,(vu={},yr(Ln,function(e,t){je.call(Ln.prototype,t)||(vu[t]=e)}),vu),{chain:!1}),Ln.VERSION="4.17.21",St(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Ln[e].placeholder=Ln}),St(["drop","take"],function(e,t){zn.prototype[e]=function(n){n=n===o?1:vn(hs(n),0);var r=this.__filtered__&&!t?new zn(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),St(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ii(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),St(["head","last"],function(e,t){var n="take"+(t?"Right":"");zn.prototype[e]=function(){return this[n](1).value()[0]}}),St(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");zn.prototype[e]=function(){return this.__filtered__?new zn(this):this[n](1)}}),zn.prototype.compact=function(){return this.filter(tu)},zn.prototype.find=function(e){return this.filter(e).head()},zn.prototype.findLast=function(e){return this.reverse().find(e)},zn.prototype.invokeMap=Yr(function(e,t){return"function"==typeof e?new zn(this):this.map(function(n){return Pr(n,e,t)})}),zn.prototype.reject=function(e){return this.filter(ja(ii(e)))},zn.prototype.slice=function(e,t){e=hs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new zn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=hs(t))<0?n.dropRight(-t):n.take(t-e)),n)},zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zn.prototype.toArray=function(){return this.take(d)},yr(zn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Ln[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Ln.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof zn,l=s[0],c=u||Va(t),f=function(e){var t=i.apply(Ln,Rt([e],s));return r&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=u&&!d;if(!a&&c){t=v?t:new zn(this);var g=e.apply(t,s);return g.__actions__.push({func:fa,args:[f],thisArg:o}),new Un(g,h)}return p&&v?e.apply(this,s):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})}),St(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Ln.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Va(o)?o:[],e)}return this[n](function(n){return t.apply(Va(n)?n:[],e)})}}),yr(zn.prototype,function(e,t){var n=Ln[t];if(n){var r=n.name+"";je.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}}),Cn[Lo(o,2).name]=[{name:"wrapper",func:o}],zn.prototype.clone=function(){var e=new zn(this.__wrapped__);return e.__actions__=To(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=To(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=To(this.__views__),e},zn.prototype.reverse=function(){if(this.__filtered__){var e=new zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Va(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Ln.prototype.plant=function(e){for(var t,n=this;n instanceof Fn;){var r=Li(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Ln.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zn){var t=e;return this.__actions__.length&&(t=new zn(this)),(t=t.reverse()).__actions__.push({func:fa,args:[Qi],thisArg:o}),new Un(t,this.__chain__)}return this.thru(Qi)},Ln.prototype.toJSON=Ln.prototype.valueOf=Ln.prototype.value=function(){return co(this.__wrapped__,this.__actions__)},Ln.prototype.first=Ln.prototype.head,Ke&&(Ln.prototype[Ke]=function(){return this}),Ln}();ft._=dn,(r=function(){return dn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},5880:function(e,t,n){var r,o;r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],o={},i=null;function a(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var n=this.getLevel(),o=0;o=0&&t<=f.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),f.name=e,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=n||c,f.getLevel=function(){return null!=l?l:null!=s?s:a},f.setLevel=function(e,n){return l=p(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+n+";"}catch(e){}}}(l),u.call(f)},f.setDefaultLevel=function(e){s=p(e),d()||f.setLevel(e,!1)},f.resetLevel=function(){l=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),u.call(f)},f.enableAll=function(e){f.setLevel(f.levels.TRACE,e)},f.disableAll=function(e){f.setLevel(f.levels.SILENT,e)},f.rebuild=function(){if(i!==f&&(a=p(i.getLevel())),u.call(f),i===f)for(var e in o)o[e].rebuild()},a=p(i?i.getLevel():"WARN");var v=d();null!=v&&(l=p(v)),u.call(f)}(i=new f).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=o[e];return t||(t=o[e]=new f(e,i.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return i.noConflict=function(){return typeof window!==t&&window.log===i&&(window.log=h),i},i.getLoggers=function(){return o},i.default=i,i},void 0===(o=r.call(t,n,t,e))||(e.exports=o)},397:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assertNotificationFilterIsEmpty=t.assertImpersonatedUserIsEmpty=t.assertTxConfigIsEmpty=t.assertDatabaseIsEmpty=void 0;var r=n(9305);n(9014),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}}},8320:function(e,t,n){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(e){o={error:e}}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(9305),i=n(7168),a=n(3321),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)}})}}},2857:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(8320)),s=i(n(7168)),u=n(9305),l=i(n(3448)),c=i(n(3321)),f=u.internal.constants.BOLT_PROTOCOL_V2,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._createPacker=function(e){return new s.default.Packer(e)},t.prototype._createUnpacker=function(e,t){return new s.default.Unpacker(e,t)},Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new c.default(Object.values(l.default).map(function(t){return t(e._config,e._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),t}(a.default);t.default=h},3448:function(e,t,n){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(e){o={error:e}}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(9305),s=n(7168),u=n(3321),l=n(5973),c=i(n(6661)),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)}})}})},5642:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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(7168),s=n(9305),u=i(n(7518)),l=i(n(5045));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)}})}})},5045:function(e,t,n){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(e){o={error:e}}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(7168),a=n(9305),s=o(n(7518)),u=n(5973),l=n(6492),c=a.internal.temporalUtil.localDateTimeToEpochSecond,f=new Map;function h(e,t,n){var r=function(e){if(!f.has(e)){var t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"});f.set(e,t)}return f.get(e)}(e),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 d(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=h(l,s,u);return d(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=h(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=h(e,i,n);return c(a.year,a.month,a.day,a.hour,a.minute,a.second,n).subtract(i)}(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),h=(0,u.epochSecondAndNanoToLocalDateTime)(f,l);return d(new a.DateTime(h.year,h.month,h.day,h.hour,h.minute,h.second,h.nanosecond,c,null),t,n)}})}}},6345:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{Object.defineProperty(t,"__esModule",{value:!0});var r=n(7452),o=n(9305);function i(e,t){return{major:e,minor:t}}t.default=function(e,t){var n=this;return new Promise(function(a,s){var u=function(e){s(e)};e.onerror=u.bind(n),e._error&&u(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);a({protocolVersion:n,consumeRemainingBuffer:function(t){e.hasRemaining()&&t(e.readSlice(e.remaining()))}})}catch(e){s(e)}},e.write(function(e){if(e.length>4)throw(0,o.newError)("It should not have more than 4 versions of the protocol");var t=(0,r.alloc)(20);return t.writeInt32(1616949271),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}([[i(5,7),i(5,0)],[i(4,4),i(4,2)],i(4,1),i(3,0)]))})}},7666:function(e,t,n){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(8731)),s=i(n(6544)),u=i(n(9054)),l=i(n(7790));o(n(9014),t),t.BoltProtocol=u.default,t.RawRoutingTable=l.default,t.default={handshake:a.default,create:s.default}},7021:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIGNATURES=void 0;var r=n(9305),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 p},e.reset=function(){return v},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 h(i,n),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}),h(a,o),i&&(a.routing=i),new e(1,[a],function(){return"HELLO ".concat(r.json.stringify(a))})},e.hello5x5=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}),d(a,o),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.begin5x5=function(t){var n=void 0===t?{}:t,o=c(n.bookmarks,n.txConfig,n.database,n.mode,n.impersonatedUser,n.notificationFilter,{appendNotificationFilter:d});return new e(17,[o],function(){return"BEGIN ".concat(r.json.stringify(o))})},e.commit=function(){return g},e.rollback=function(){return y},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.runWithMetadata5x5=function(t,n,o){var i=void 0===o?{}:o,a=c(i.bookmarks,i.txConfig,i.database,i.mode,i.impersonatedUser,i.notificationFilter,{appendNotificationFilter:d});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?-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?-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,u){var l;void 0===u&&(u={});var c={};return e.isEmpty()||(c.bookmarks=e.values()),null!==t.timeout&&(c.tx_timeout=t.timeout),t.metadata&&(c.tx_metadata=t.metadata),n&&(c.db=s(n,"database")),o&&(c.imp_user=s(o,"impersonatedUser")),r===i&&(c.mode="r"),(null!==(l=u.appendNotificationFilter)&&void 0!==l?l:h)(c,a),c}function f(e,t){var n={n:(0,r.int)(t)};return-1!==e&&(n.qid=(0,r.int)(e)),n}function h(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_categories=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_categories=t.disabledClassifications))}function d(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_classifications=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_classifications=t.disabledClassifications))}t.default=l;var p=new l(63,[],function(){return"PULL_ALL"}),v=new l(15,[],function(){return"RESET"}),g=new l(18,[],function(){return"COMMIT"}),y=new l(19,[],function(){return"ROLLBACK"}),m=new l(2,[],function(){return"GOODBYE"})},2578:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(9305);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.enrichErrorMetadata,a=t.log,s=t.observer;this._pendingObservers=[],this._log=a,this._transformMetadata=n||i,this._enrichErrorMetadata=r||i,this._observer=Object.assign({onObserversCountChange:o,onError:o,onFailure:o,onErrorApplyTransformation:i},s)}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{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(t)),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.onObserversCountChange(this._observersCount)},Object.defineProperty(e.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),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.onObserversCountChange(this._observersCount),!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.prototype._handleErrorPayload=function(e){var t,n="Neo.TransientError.Transaction.Terminated"===(t=e.code)?"Neo.ClientError.Transaction.Terminated":"Neo.TransientError.Transaction.LockClientStopped"===t?"Neo.ClientError.Transaction.LockClientStopped":t,o=null!=e.cause?this._handleErrorCause(e.cause):void 0,i=(0,r.newError)(e.message,n,o,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(i)},e.prototype._handleErrorCause=function(e){var t=null!=e.cause?this._handleErrorCause(e.cause):void 0,n=(0,r.newGQLError)(e.message,t,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(n)},e}();t.default=s},7790:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),i(n(9305));var a=function(){function e(){}return e.ofRecord=function(t){return null===t?e.ofNull():new l(t)},e.ofMessageResponse=function(t){return null===t?e.ofNull():new s(t)},e.ofNull=function(){return new u},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=a;var s=function(e){function t(t){var n=e.call(this)||this;return n._response=t,n}return o(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}(a),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),t}(a),l=function(e){function t(t){var n=e.call(this)||this;return n._record=t,n}return o(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}(a)},9014:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=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 a=n(9305),s=i(n(7790)),u=n(6781),l=a.internal.constants.FETCH_ALL,c=a.error.PROTOCOL_ERROR,f=function(){function e(){}return e.prototype.onNext=function(e){},e.prototype.onError=function(e){},e.prototype.onCompleted=function(e){},e}();t.StreamObserver=f;var h=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,s=n.fetchSize,c=void 0===s?l:s,f=n.beforeError,h=n.afterError,d=n.beforeKeys,p=n.afterKeys,v=n.beforeComplete,g=n.afterComplete,y=n.server,m=n.highRecordWatermark,b=void 0===m?Number.MAX_VALUE:m,_=n.lowRecordWatermark,x=void 0===_?Number.MAX_VALUE:_,E=n.enrichMetadata,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=y,O._beforeError=f,O._afterError=h,O._beforeKeys=d,O._afterKeys=p,O._beforeComplete=v,O._afterComplete=g,O._enrichMetadata=E||u.functional.identity,O._queryId=null,O._moreFunction=i,O._discardFunction=a,O._discard=!1,O._fetchSize=c,O._lowRecordWatermark=x,O._highRecordWatermark=b,O._setState(o?w.READY:w.READY_STREAMING),O._setupAutoPull(),O._paused=!1,O._pulled=!o,O._haveRecordStreamed=!1,O}return o(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){this._haveRecordStreamed=!0;var t=new a.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(w.STREAMING)},t.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(w.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}},e));if([void 0,null,"r","w","rw","s"].includes(n.type)){this._setState(w.SUCCEEDED);var r=null;this._beforeComplete&&(r=this._beforeComplete(n));var o=function(){t._tail=n,t._observers.some(function(e){return e.onCompleted})&&t._observers.forEach(function(e){e.onCompleted&&e.onCompleted(n)}),t._afterComplete&&t._afterComplete(n)};r?Promise.resolve(r).then(function(){return o()}):o()}else this.onError((0,a.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),c))},t.prototype._handleRunSuccess=function(e,t){var n=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&e.fields.length>0){this._fieldKeys=e.fields;for(var r=0;r{Object.defineProperty(t,"__esModule",{value:!0}),t.epochSecondAndNanoToLocalDateTime=t.nanoOfDayToLocalTime=t.epochDayToDate=void 0;var r=n(9305),o=r.internal.temporalUtil,i=o.DAYS_0000_TO_1970,a=o.DAYS_PER_400_YEAR_CYCLE,s=o.NANOS_PER_HOUR,u=o.NANOS_PER_MINUTE,l=o.NANOS_PER_SECOND,c=o.SECONDS_PER_DAY,f=o.floorDiv,h=o.floorMod;function d(e){var t=(e=(0,r.int)(e)).add(i).subtract(60),n=(0,r.int)(0);if(t.lessThan(0)){var o=t.add(1).div(a).subtract(1);n=o.multiply(400),t=t.add(o.multiply(-a))}var s=t.multiply(400).add(591).div(a),u=t.subtract(s.multiply(365).add(s.div(4)).subtract(s.div(100)).add(s.div(400)));u.lessThan(0)&&(s=s.subtract(1),u=t.subtract(s.multiply(365).add(s.div(4)).subtract(s.div(100)).add(s.div(400)))),s=s.add(n);var l=u,c=l.multiply(5).add(2).div(153),f=c.add(2).modulo(12).add(1),h=l.subtract(c.multiply(306).add(5).div(10)).add(1);return s=s.add(c.div(10)),new r.Date(s,f,h)}function p(e){var t=(e=(0,r.int)(e)).div(s),n=(e=e.subtract(t.multiply(s))).div(u),o=(e=e.subtract(n.multiply(u))).div(l),i=e.subtract(o.multiply(l));return new r.LocalTime(t,n,o,i)}t.epochDayToDate=d,t.nanoOfDayToLocalTime=p,t.epochSecondAndNanoToLocalDateTime=function(e,t){var n=f(e,c),o=h(e,c).multiply(l).add(t),i=d(n),a=p(o);return new r.LocalDateTime(i.year,i.month,i.day,a.hour,a.minute,a.second,a.nanosecond)}},3321:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeTransformer=void 0;var r=n(7168),o=n(9305).internal.objectUtil,i=function(){function e(e){this._transformers=e,this._transformersPerSignature=new Map(e.map(function(e){return[e.signature,e]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}return e.prototype.fromStructure=function(e){try{return e instanceof r.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return o.createBrokenObject(e)}},e.prototype.toStructure=function(e){var t=this._transformers.find(function(t){return(0,t.isTypeInstance)(e)});return void 0!==t?t.toStructure(e):e},e}();t.default=i;var a=function(){function e(e){var t=e.signature,n=e.fromStructure,r=e.toStructure,o=e.isTypeInstance;this.signature=t,this.isTypeInstance=o,this.fromStructure=n,this.toStructure=r,Object.freeze(this)}return e.prototype.extendsWith=function(t){var n=t.signature,r=t.fromStructure,o=t.toStructure,i=t.isTypeInstance;return new e({signature:n||this.signature,fromStructure:r||this.fromStructure,toStructure:o||this.toStructure,isTypeInstance:i||this.isTypeInstance})},e}();t.TypeTransformer=a},45:function(e,t){var n,r=this&&this.__extends||(n=function(e,t){return n=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])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.position=0,this.length=e}return e.prototype.getUInt8=function(e){throw new Error("Not implemented")},e.prototype.getInt8=function(e){throw new Error("Not implemented")},e.prototype.getFloat64=function(e){throw new Error("Not implemented")},e.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},e.prototype.putInt8=function(e,t){throw new Error("Not implemented")},e.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},e.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},e.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},e.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},e.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},e.prototype.getInt64=function(e){return this.getInt8(e)<<56|this.getUInt8(e+1)<<48|this.getUInt8(e+2)<<40|this.getUInt8(e+3)<<32|this.getUInt8(e+4)<<24|this.getUInt8(e+5)<<16|this.getUInt8(e+6)<<8|this.getUInt8(e+7)},e.prototype.getSlice=function(e,t){return new i(e,t,this)},e.prototype.putInt16=function(e,t){this.putInt8(e,t>>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);return 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?{scheme:"ws",error:null}:a?{scheme:"wss",error:null}:n?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}:{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(r){if(function(e,t){return"SyntaxError"===e.name&&"["===(n=t.asHostPort()).charAt(0)&&-1!==n.indexOf("]");var n}(r,t)){var o=function(e,t){var n=t.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(n,":").concat(t.port())}(e,t);return n(o)}throw r}}(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&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0});var r=n(9305),o=r.internal.util,i=o.ENCRYPTION_OFF,a=o.ENCRYPTION_ON,s=r.error.SERVICE_UNAVAILABLE,u=[null,void 0,!0,!1,a,i],l=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];t.default=function(e,t,n,o){this.address=e,this.encrypted=function(e){var t=e.encrypted;if(-1===u.indexOf(t))throw(0,r.newError)("Illegal value of the encrypted setting ".concat(t,". Expected one of ").concat(u));return t}(t),this.trust=function(e){var t=e.trust;if(-1===l.indexOf(t))throw(0,r.newError)("Illegal value of the trust setting ".concat(t,". Expected one of ").concat(l));return t}(t),this.trustedCertificates=function(e){return e.trustedCertificates||[]}(t),this.knownHostsPath=function(e){return e.knownHosts||null}(t),this.connectionErrorCode=n||s,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=o}},373:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Dechunker=t.Chunker=void 0;var a=i(n(45)),s=n(5319),u=i(n(5553)),l=function(e){function t(t,n){var r=e.call(this,0)||this;return r._bufferSize=n||1400,r._ch=t,r._buffer=(0,s.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}return o(t,e),t.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},t.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},t.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},t.prototype.putBytes=function(e,t){for(;t.remaining()>0;)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,s.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 u.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=c},5553:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(7174),a=n(5319),s=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,a.alloc)(8),n=0;n<8;n++)t.putUInt8(n,this.getUInt8(e+n));return t.getFloat64(0)},t}(i.BaseBuffer);t.default=s},7452:function(e,t,n){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(3951),t),o(n(373),t);var a=n(2481);Object.defineProperty(t,"ChannelConfig",{enumerable:!0,get:function(){return i(a).default}});var s=n(5319);Object.defineProperty(t,"alloc",{enumerable:!0,get:function(){return s.alloc}});var u=n(3473);Object.defineProperty(t,"utf8",{enumerable:!0,get:function(){return i(u).default}})},3473:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(5319)),i=n(9305),a=r(n(1048)),s=new(n(8888).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){var n=t,r=e.position;return e._updatePos(Math.min(t,e.length-r)),e._buffers.reduce(function(e,t){if(n<=0)return e;if(r>=t.length)return r-=t.length,"";t._updatePos(r-t.position);var o=Math.min(t.length-r,n),i=t.readSlice(o);return t._updatePos(o),n=Math.max(n-i.length,0),r=0,e+function(e){return s.write(e._buffer)}(i)},"")+s.end()}(e,t)}(e,t);throw(0,i.newError)("Don't know how to decode strings from '".concat(e,"'"))}}},1839:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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]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]=d})];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 i(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e>=h})];case 1:return[2,e.sent()]}})})},t.prototype.supportsUserImpersonation=function(){return i(this,void 0,void 0,function(){return a(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.supportsSessionAuth=function(){return i(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e>=v})];case 1:return[2,e.sent()]}})})},t.prototype.verifyAuthentication=function(e){var t=e.auth;return i(this,void 0,void 0,function(){var e=this;return a(this,function(n){return[2,this._verifyAuthentication({auth:t,getAddress:function(){return e._address}})]})})},t.prototype.verifyConnectivityAndGetServerInfo=function(){return i(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},t}(u.default);t.default=y},8987:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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())})},a=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(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},u=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 i(this,void 0,void 0,function(){var e,n;return a(this,function(r){switch(r.label){case 0:return[4,this._connectionPool.acquire({},t)];case 1:e=r.sent(),n=new f.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 i(this,void 0,void 0,function(){var e,r,o,i,s,u;return a(this,function(a){switch(a.label){case 0:e=[],a.label=1;case 1:return a.trys.push([1,8,9,11]),[4,t()];case 2:return r=a.sent(),[4,this._connectionPool.acquire({auth:n,skipReAuth:!0},r)];case 3:if(o=a.sent(),e.push(o),i=!o.protocol().isLastMessageLogon(),!o.supportsReAuth)throw(0,f.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 a.sent(),[3,7];case 5:return!i||o.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:n},r,{requireNew:!0})];case 6:(s=a.sent())._sticky=!0,e.push(s),a.label=7;case 7:return[2,!0];case 8:if(u=a.sent(),y.includes(u.code))return[2,!1];throw u;case 9:return[4,Promise.all(e.map(function(e){return e.release()}))];case 10:return a.sent(),[7];case 11:return[2]}})})},t.prototype._verifyStickyConnection=function(e){var t=e.auth,n=e.connection;return e.address,i(this,void 0,void 0,function(){var e,r;return a(this,function(o){switch(o.label){case 0:return e=d.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,f.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},t.prototype.close=function(){return i(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.close()];case 1:return e.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(e){return e.close()}))];case 2:return e.sent(),[2]}})})},t._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},t._removeIdleObserverOnConnection=function(e){e._unsetIdle()},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}(f.ConnectionProvider);t.default=w},7428:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),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]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},h=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(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var p=n(9305),v=u(n(206)),g=n(7452),y=d(n(4132)),m=d(n(8987)),b=n(4455),_=n(7721),w=n(6781),x=p.error.SERVICE_UNAVAILABLE,E=p.error.SESSION_EXPIRED,O=p.internal.bookmarks.Bookmarks,S=p.internal.constants,T=S.ACCESS_MODE_READ,P=S.ACCESS_MODE_WRITE,C=S.BOLT_PROTOCOL_V3,A=S.BOLT_PROTOCOL_V4_0,k=S.BOLT_PROTOCOL_V4_4,I=S.BOLT_PROTOCOL_V5_1,R="Neo.ClientError.Database.DatabaseNotFound",j="Neo.ClientError.Transaction.InvalidBookmark",M="Neo.ClientError.Transaction.InvalidBookmarkMixture",N="Neo.ClientError.Security.AuthorizationExpired",D="Neo.ClientError.Statement.ArgumentError",L="Neo.ClientError.Request.Invalid",B="Neo.ClientError.Statement.TypeError",F="N/A",U=null,z=(0,p.int)(3e4),V=function(e){function t(t){var n=t.id,r=t.address,o=t.routingContext,a=t.hostNameResolver,s=t.config,u=t.log,f=t.userAgent,h=t.boltAgent,d=t.authTokenManager,y=t.routingTablePurgeDelay,m=t.newPool,x=e.call(this,{id:n,config:s,log:u,userAgent:f,boltAgent:h,authTokenManager:d,newPool:m},function(e){return l(x,void 0,void 0,function(){var t,n;return c(this,function(r){switch(r.label){case 0:return t=_.createChannelConnection,n=[e,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,n.concat([r.sent(),this._routingContext]))]}})})})||this;return x._routingContext=i(i({},o),{address:r.toString()}),x._seedRouter=r,x._rediscovery=new v.default(x._routingContext),x._loadBalancingStrategy=new b.LeastConnectedLoadBalancingStrategy(x._connectionPool),x._hostNameResolver=a,x._dnsResolver=new g.HostNameResolver,x._log=u,x._useSeedRouter=!0,x._routingTableRegistry=new W(y?(0,p.int)(y):z),x._refreshRoutingTable=w.functional.reuseOngoingRequest(x._refreshRoutingTable,x),x}return o(t,e),t.prototype._createConnectionErrorHandler=function(){return new _.ConnectionErrorHandler(E)},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||U),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||U),(0,p.newError)("No longer possible to write to server at "+t,E,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 l(this,void 0,void 0,function(){var e,t,u,l,f,h,d,v=this;return c(this,function(c){switch(c.label){case 0:return u={database:r||U},l=new _.ConnectionErrorHandler(E,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=c.sent(),n===T)t=this._loadBalancingStrategy.selectReader(f.readers),e="read";else{if(n!==P)throw(0,p.newError)("Illegal mode "+n);t=this._loadBalancingStrategy.selectWriter(f.writers),e="write"}if(!t)throw(0,p.newError)("Failed to obtain connection towards ".concat(e," server. Known routing table is: ").concat(f),E);c.label=2;case 2:return c.trys.push([2,6,,7]),[4,this._connectionPool.acquire({auth:s},t)];case 3:return h=c.sent(),s?[4,this._verifyStickyConnection({auth:s,connection:h,address:t})]:[3,5];case 4:return c.sent(),[2,h];case 5:return[2,new _.DelegateConnection(h,l)];case 6:throw d=c.sent(),l.handleAndTransformError(d,t);case 7:return[2]}})})},t.prototype._hasProtocolVersion=function(e){return l(this,void 0,void 0,function(){var t,n,r,o,i,a;return c(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=A})];case 1:return[2,e.sent()]}})})},t.prototype.supportsTransactionConfig=function(){return l(this,void 0,void 0,function(){return c(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.supportsUserImpersonation=function(){return l(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e>=k})];case 1:return[2,e.sent()]}})})},t.prototype.supportsSessionAuth=function(){return l(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e>=I})];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 l(this,void 0,void 0,function(){var e=this;return c(this,function(o){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return l(e,void 0,void 0,function(){var e,o,i;return c(this,function(a){switch(a.label){case 0:return e={database:t||U},[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,p.newError)("No servers available for database '".concat(e.database,"' with access mode '").concat(n,"'"),x);return[2,i[0]]}})})}})]})})},t.prototype.verifyConnectivityAndGetServerInfo=function(e){var t=e.database,n=e.accessMode;return l(this,void 0,void 0,function(){var e,r,o,i,a,s,u,l,h,d,v;return c(this,function(c){switch(c.label){case 0:return e={database:t||U},[4,this._freshRoutingTable({accessMode:n,database:e.database,onDatabaseNameResolved:function(t){e.database=e.database||t}})];case 1:r=c.sent(),o=n===P?r.writers:r.readers,i=(0,p.newError)("No servers available for database '".concat(e.database,"' with access mode '").concat(n,"'"),x),c.label=2;case 2:c.trys.push([2,9,10,11]),a=f(o),s=a.next(),c.label=3;case 3:if(s.done)return[3,8];u=s.value,c.label=4;case 4:return c.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:u})];case 5:return[2,c.sent()];case 6:return l=c.sent(),i=l,[3,7];case 7:return s=a.next(),[3,3];case 8:return[3,11];case 9:return h=c.sent(),d={error:h},[3,11];case 10:try{s&&!s.done&&(v=a.return)&&v.call(a)}finally{if(d)throw d.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 v.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 l(this,void 0,void 0,function(){var i,a,s,u,l,f,d;return c(this,function(c){switch(c.label){case 0:return i=[],[4,this._fetchRoutingTableUsingSeedRouter(i,this._seedRouter,t,n,r,o)];case 1:return a=h.apply(void 0,[c.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:l=h.apply(void 0,[c.sent(),2]),f=l[0],d=l[1],s=f,u=d||u,c.label=4;case 4:return[4,this._applyRoutingTableIfPossible(t,s,u)];case 5:return[2,c.sent()]}})})},t.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(e,t,n,r,o){return l(this,void 0,void 0,function(){var i,a,s,u;return c(this,function(l){switch(l.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(e,t,n,r,o)];case 1:return i=h.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=h.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 l(this,void 0,void 0,function(){var a,s,u,l;return c(this,function(c){switch(c.label){case 0:return[4,this._fetchRoutingTable(e,n,r,o,i)];case 1:return a=h.apply(void 0,[c.sent(),2]),s=a[0],u=a[1],s?[2,[s,null]]:(l=e.length-1,t._forgetRouter(n,e,l),[2,[null,u]])}})})},t.prototype._fetchRoutingTableUsingSeedRouter=function(e,t,n,r,o,i){return l(this,void 0,void 0,function(){var a,s;return c(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 l(this,void 0,void 0,function(){var t,n,r=this;return c(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 l(this,void 0,void 0,function(){var a=this;return c(this,function(s){return[2,e.reduce(function(s,u,f){return l(a,void 0,void 0,function(){var a,l,d,p,v,g,y;return c(this,function(c){switch(c.label){case 0:return[4,s];case 1:return a=h.apply(void 0,[c.sent(),1]),(l=a[0])?[2,[l,null]]:(d=f-1,t._forgetRouter(n,e,d),[4,this._createSessionForRediscovery(u,r,o,i)]);case 2:if(p=h.apply(void 0,[c.sent(),2]),v=p[0],g=p[1],!v)return[3,8];c.label=3;case 3:return c.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(v,n.database,u,o)];case 4:return[2,[c.sent(),null]];case 5:return y=c.sent(),[2,this._handleRediscoveryError(y,u)];case 6:return v.close(),[7];case 7:return[3,9];case 8:return[2,[null,g]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},t.prototype._createSessionForRediscovery=function(e,t,n,r){return l(this,void 0,void 0,function(){var o,i,a,s,u,l=this;return c(this,function(c){switch(c.label){case 0:return c.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:r},e)];case 1:return o=c.sent(),r?[4,this._verifyStickyConnection({auth:r,connection:o,address:e})]:[3,3];case 2:c.sent(),c.label=3;case 3:return i=_.ConnectionErrorHandler.create({errorCode:E,handleSecurityError:function(e,t,n){return l._handleSecurityError(e,t,n)}}),a=o._sticky?new _.DelegateConnection(o):new _.DelegateConnection(o,i),s=new y.default(a),o.protocol().version<4?[2,[new p.Session({mode:P,bookmarks:O.empty(),connectionProvider:s}),null]]:[2,[new p.Session({mode:T,database:"system",bookmarks:t,connectionProvider:s,impersonatedUser:n}),null]];case 4:return u=c.sent(),[2,this._handleRediscoveryError(u,e)];case 5:return[2]}})})},t.prototype._handleRediscoveryError=function(e,t){if(function(e){return[R,j,M,D,L,B,F].includes(e.code)}(e)||function(e){return e.code.startsWith("Neo.ClientError.Security.")&&![N].includes(e.code)}(e))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,p.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),x,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 l(this,void 0,void 0,function(){return c(this,function(r){switch(r.label){case 0:if(!t)throw(0,p.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(e),x,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 l(this,void 0,void 0,function(){return c(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}(m.default);t.default=V;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=f(this._tables),o=r.next();!o.done;o=r.next())e(h(o.value,2)[1])}catch(e){t={error:e}}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=f(this._tables),o=r.next();!o.done;o=r.next()){var i=h(o.value,2),a=i[0];e(i[1])&&this._remove(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e}()},4132:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this)||this;return n._connection=t,n}return o(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(9305).ConnectionProvider);t.default=i},9689:function(e,t,n){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(4132);Object.defineProperty(t,"SingleConnectionProvider",{enumerable:!0,get:function(){return r(o).default}});var i=n(8987);Object.defineProperty(t,"PooledConnectionProvider",{enumerable:!0,get:function(){return r(i).default}});var a=n(3545);Object.defineProperty(t,"DirectConnectionProvider",{enumerable:!0,get:function(){return r(a).default}});var s=n(7428);Object.defineProperty(t,"RoutingConnectionProvider",{enumerable:!0,get:function(){return r(s).default}})},4531:function(e,t){var n=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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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())})},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]this._connectionLivenessCheckTimeout?[4,e.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,n.sent()];case 2:return[2,!0]}})})},Object.defineProperty(e.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),e.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},e}();t.default=o},8031:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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())})},a=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(l.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},t.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},t.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},t.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},t.prototype.hasOngoingObservableRequests=function(){return!this._idle&&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: ".concat(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){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},t.prototype.close=function(){return i(this,void 0,void 0,function(){return a(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,l.newError)(e,h);return this._handleFatalError(t),t},t}(c.default);t.default=v},9857:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=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 o(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}),Object.defineProperty(t.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=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}(i(n(6385)).default);t.default=a},2363:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(9305),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){return!!e&&(e.code===i||e.code===o||"Neo.TransientError.General.DatabaseUnavailable"===e.code)}(e)?this._handleUnavailability(e,t,n):function(e){return!!e&&("Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code)}(e)?this._handleWriteFailure(e,t,n):e},e}();function s(e){return e}t.default=a},6385:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),n(7666);var i=function(e){function t(t){var n=e.call(this)||this;return n._errorHandler=t,n}return o(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}),Object.defineProperty(t.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){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(9305).Connection);t.default=i},7721:function(e,t,n){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(6385));t.Connection=s.default;var u=i(n(8031));t.ChannelConnection=u.default,Object.defineProperty(t,"createChannelConnection",{enumerable:!0,get:function(){return u.createChannelConnection}});var l=a(n(9857));t.DelegateConnection=l.default;var c=a(n(2363));t.ConnectionErrorHandler=c.default,t.default=s.default},6672:function(e,t,n){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.packstream=t.channel=t.buf=t.bolt=t.loadBalancing=void 0,t.loadBalancing=i(n(4455)),t.bolt=i(n(7666)),t.buf=i(n(7174)),t.channel=i(n(7452)),t.packstream=i(n(7168)),a(n(9689),t)},6492:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reuseOngoingRequest=t.identity=void 0;var r=n(9305);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(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return!0}return!1}},4455:function(e,t,n){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(4311));t.LoadBalancingStrategy=o.default;var i=r(n(2533));t.LeastConnectedLoadBalancingStrategy=i.default,t.default=i.default},2533:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(715)),s=function(e){function t(t){var n=e.call(this)||this;return n._readersIndex=new a.default,n._writersIndex=new a.default,n._connectionPool=t,n}return o(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{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.selectReader=function(e){throw new Error("Abstract function")},e.prototype.selectWriter=function(e){throw new Error("Abstract function")},e}();t.default=n},715:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._offset=e||0}return e.prototype.next=function(e){if(0===e)return-1;var t=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),t%e},e}();t.default=n},7168:function(e,t,n){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.structure=t.v2=t.v1=void 0;var a=i(n(5361));t.v1=a;var s=i(n(2072));t.v2=s;var u=i(n(7665));t.structure=u,t.default=s},5361:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Unpacker=t.Packer=void 0;var r=n(7452),o=n(6781),i=n(7665),a=n(9305),s=a.error.PROTOCOL_ERROR,u=function(){function e(e){this._ch=e,this._byteArraysSupported=!0}return e.prototype.packable=function(e,t){var n,r=this;void 0===t&&(t=o.functional.identity);try{e=t(e)}catch(e){return function(){throw e}}if(null===e)return function(){return r._ch.writeUInt8(192)};if(!0===e)return function(){return r._ch.writeUInt8(195)};if(!1===e)return function(){return r._ch.writeUInt8(194)};if("number"==typeof e)return function(){return r.packFloat(e)};if("string"==typeof e)return function(){return r.packString(e)};if("bigint"==typeof e)return function(){return r.packInteger((0,a.int)(e))};if((0,a.isInt)(e))return function(){return r.packInteger(e)};if(e instanceof Int8Array)return function(){return r.packBytes(e)};if(e instanceof Array)return function(){r.packListHeader(e.length);for(var n=0;n=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;o{Object.defineProperty(t,"__esModule",{value:!0}),t.verifyStructSize=t.Structure=void 0;var r=n(9305),o=r.error.PROTOCOL_ERROR,i=function(){function e(e,t){this.signature=e,this.fields=t}return Object.defineProperty(e.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),e.prototype.toString=function(){for(var e="",t=0;t0&&(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},206:function(e,t,n){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(4151));t.Rediscovery=o.default;var i=r(n(9018));t.RoutingTable=i.default,t.default=o.default},4151:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(9018)),i=(n(9305),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},9018:function(e,t,n){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(e){o={error:e}}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]{Object.defineProperty(t,"__esModule",{value:!0});var n={basic:function(e,t,n){return null!=n?{scheme:"basic",principal:e,credentials:t,realm:n}:{scheme:"basic",principal:e,credentials:t}},kerberos:function(e){return{scheme:"kerberos",principal:"",credentials:e}},bearer:function(e){return{scheme:"bearer",credentials:e}},none:function(){return{scheme:"none"}},custom:function(e,t,n,o,i){var a={scheme:o,principal:e};return r(t)&&(a.credentials=t),r(n)&&(a.realm=n),r(i)&&(a.parameters=i),a}};function r(e){return!(null==e||""===e||Object.getPrototypeOf(e)===Object.prototype&&0===Object.keys(e).length)}t.default=n},6755:function(e,t){var n=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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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())})},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(e){o={error:e}}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)&&e.filter(t).length===e.length}function g(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}t.clientCertificateProviders=h,Object.freeze(h),t.resolveCertificateProvider=function(e){if(null!=e){if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;if(d(e)){var t=i({},e);return{getClientCertificate:function(){return t},hasUpdate:function(){return!1}}}throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(l.stringify(e)))}};var y=function(){function e(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}return e.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},e.prototype.getClientCertificate=function(){return this._certificate},e.prototype.updateCertificate=function(e){if(!d(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(l.stringify(e)));this._certificate=i({},e),this._updated=!0},e}()},2007:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Releasable=void 0;var n=function(){function e(){}return e.prototype.release=function(){throw new Error("Not implemented")},e}();t.Releasable=n;var r=function(){function e(){}return e.prototype.acquireConnection=function(e){throw Error("Not implemented")},e.prototype.supportsMultiDb=function(){throw Error("Not implemented")},e.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},e.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},e.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},e.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},e.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},e.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},e.prototype.close=function(){throw Error("Not implemented")},e}();t.default=r},1409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.beginTransaction=function(e){throw new Error("Not implemented")},e.prototype.run=function(e,t,n){throw new Error("Not implemented")},e.prototype.commitTransaction=function(e){throw new Error("Not implemented")},e.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},e.prototype.resetAndFlush=function(){throw new Error("Not implemented")},e.prototype.isOpen=function(){throw new Error("Not implemented")},e.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},e.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},e}();t.default=n},7264:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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||0===n?n:n<0?Number.MAX_SAFE_INTEGER:t}function x(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=_,t.default=_},9691:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=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]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=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)&&i(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.GQLError=t.Neo4jError=t.isRetriableError=t.newGQLError=t.newError=void 0;var u=s(n(4027)),l=n(1053),c={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"};Object.freeze(c);var f=Object.values(c),h="ServiceUnavailable";t.SERVICE_UNAVAILABLE=h;var d="SessionExpired";t.SESSION_EXPIRED=d,t.PROTOCOL_ERROR="ProtocolError";var p=function(e){function t(n,r,o,i,a){var s,u=this;return(u=e.call(this,n,null!=a?{cause:a}:void 0)||this).constructor=t,u.__proto__=t.prototype,u.cause=null!=a?a:void 0,u.gqlStatus=r,u.gqlStatusDescription=o,u.diagnosticRecord=i,u.classification=function(e){return void 0===e||void 0===e._classification?"UNKNOWN":f.includes(e._classification)?null==e?void 0:e._classification:"UNKNOWN"}(u.diagnosticRecord),u.rawClassification=null!==(s=null==i?void 0:i._classification)&&void 0!==s?s:void 0,u.name="GQLError",u}return o(t,e),Object.defineProperty(t.prototype,"diagnosticRecordAsJsonString",{get:function(){return u.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),t}(Error);t.GQLError=p;var v=function(e){function t(n,r,o,i,a,s){var u=e.call(this,n,o,i,a,s)||this;return u.constructor=t,u.__proto__=t.prototype,u.code=r,u.name="Neo4jError",u.retriable=function(e){return e===h||e===d||function(e){return"Neo.ClientError.Security.AuthorizationExpired"===e}(e)||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(e)}(r),u}return o(t,e),t.isRetriable=function(e){return null!=e&&e instanceof t&&e.retriable},t}(p);t.Neo4jError=v,t.newError=function(e,t,n,r,o,i){return new v(e,null!=t?t:"N/A",null!=r?r:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:l.rawPolyfilledDiagnosticRecord,n)},t.newGQLError=function(e,t,n,r,o){return new p(e,null!=n?n:"50N42",null!=r?r:"error: general processing exception - unexpected error. "+e,null!=o?o:l.rawPolyfilledDiagnosticRecord,t)};var g=v.isRetriable;t.isRetriableError=g},1053:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.rawPolyfilledDiagnosticRecord=void 0,t.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(t.rawPolyfilledDiagnosticRecord)},1517:(e,t,n)=>{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(4027),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=g(r,function(){return e.toString()})}return e.prototype.toString=function(){for(var e="("+this.elementId,t=0;t0){for(e+=" {",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=g(i,function(){return e.toString()}),this.startNodeElementId=g(a,function(){return t.toString()}),this.endNodeElementId=g(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=g(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 g(e,t){return null==e?t():e}t.Path=v,Object.defineProperty(v.prototype,u,o),t.isPath=function(e){return c(e,u)}},9305:function(e,t,n){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.EagerResult=t.Result=t.Stats=t.QueryStatistics=t.ProfiledPlan=t.Plan=t.GqlStatusObject=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.GQLError=t.newGQLError=t.Neo4jError=t.newError=t.authTokenManagers=void 0,t.resolveCertificateProvider=t.clientCertificateProviders=t.notificationFilterMinimumSeverityLevel=t.notificationFilterDisabledClassification=t.notificationFilterDisabledCategory=t.notificationSeverityLevel=t.notificationClassification=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=t.Transaction=t.Connection=t.Releasable=t.ConnectionProvider=void 0;var s=n(9691);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,"newGQLError",{enumerable:!0,get:function(){return s.newGQLError}}),Object.defineProperty(t,"GQLError",{enumerable:!0,get:function(){return s.GQLError}}),Object.defineProperty(t,"isRetriableError",{enumerable:!0,get:function(){return s.isRetriableError}});var u=i(n(3371));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(5459);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(1517);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(4820));t.Record=f.default;var h=n(7093);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(6033));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,"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}});var p=i(n(1866));t.Notification=p.default,Object.defineProperty(t,"GqlStatusObject",{enumerable:!0,get:function(){return p.GqlStatusObject}}),Object.defineProperty(t,"notificationCategory",{enumerable:!0,get:function(){return p.notificationCategory}}),Object.defineProperty(t,"notificationClassification",{enumerable:!0,get:function(){return p.notificationClassification}}),Object.defineProperty(t,"notificationSeverityLevel",{enumerable:!0,get:function(){return p.notificationSeverityLevel}});var v=n(1985);Object.defineProperty(t,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return v.notificationFilterDisabledCategory}}),Object.defineProperty(t,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return v.notificationFilterDisabledClassification}}),Object.defineProperty(t,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return v.notificationFilterMinimumSeverityLevel}});var g=a(n(9512));t.Result=g.default;var y=a(n(8917));t.EagerResult=y.default;var m=i(n(2007));t.ConnectionProvider=m.default,Object.defineProperty(t,"Releasable",{enumerable:!0,get:function(){return m.Releasable}});var b=a(n(1409));t.Connection=b.default;var _=a(n(9473));t.Transaction=_.default;var w=a(n(5909));t.ManagedTransaction=w.default;var x=a(n(4569));t.TransactionPromise=x.default;var E=a(n(5481));t.Session=E.default;var O=i(n(7264)),S=O;t.Driver=O.default,t.driver=S;var T=a(n(1967));t.auth=T.default;var P=n(6755);Object.defineProperty(t,"bookmarkManager",{enumerable:!0,get:function(){return P.bookmarkManager}});var C=n(2069);Object.defineProperty(t,"authTokenManagers",{enumerable:!0,get:function(){return C.authTokenManagers}}),Object.defineProperty(t,"staticAuthTokenManager",{enumerable:!0,get:function(){return C.staticAuthTokenManager}});var A=n(7264);Object.defineProperty(t,"routing",{enumerable:!0,get:function(){return A.routing}});var k=i(n(6872));t.types=k;var I=i(n(4027));t.json=I;var R=a(n(1573));t.resultTransformers=R.default;var j=n(8264);Object.defineProperty(t,"clientCertificateProviders",{enumerable:!0,get:function(){return j.clientCertificateProviders}}),Object.defineProperty(t,"resolveCertificateProvider",{enumerable:!0,get:function(){return j.resolveCertificateProvider}});var M=i(n(6995));t.internal=M;var N={SERVICE_UNAVAILABLE:s.SERVICE_UNAVAILABLE,SESSION_EXPIRED:s.SESSION_EXPIRED,PROTOCOL_ERROR:s.PROTOCOL_ERROR};t.error=N;var D={authTokenManagers:C.authTokenManagers,newError:s.newError,Neo4jError:s.Neo4jError,newGQLError:s.newGQLError,GQLError:s.GQLError,isRetriableError:s.isRetriableError,error:N,Integer:u.default,int:u.int,isInt:u.isInt,inSafeRange:u.inSafeRange,toNumber:u.toNumber,toString:u.toString,internal:M,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:p.default,GqlStatusObject:p.GqlStatusObject,Plan:d.Plan,ProfiledPlan:d.ProfiledPlan,QueryStatistics:d.QueryStatistics,Stats:d.Stats,Result:g.default,EagerResult:y.default,Transaction:_.default,ManagedTransaction:w.default,TransactionPromise:x.default,Session:E.default,Driver:O.default,Connection:b.default,Releasable:m.Releasable,types:k,driver:S,json:I,auth:T.default,bookmarkManager:P.bookmarkManager,routing:A.routing,resultTransformers:R.default,notificationCategory:p.notificationCategory,notificationClassification:p.notificationClassification,notificationSeverityLevel:p.notificationSeverityLevel,notificationFilterDisabledCategory:v.notificationFilterDisabledCategory,notificationFilterDisabledClassification:v.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:v.notificationFilterMinimumSeverityLevel,clientCertificateProviders:j.clientCertificateProviders,resolveCertificateProvider:j.resolveCertificateProvider};t.default=D},3371:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toString=t.toNumber=t.inSafeRange=t.isInt=t.int=void 0;var r=n(9691),o=new Map,i=function(){function e(e,t){this.low=null!=e?e:0,this.high=null!=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?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&&!(t&1<=0},e.prototype.isOdd=function(){return!(1&~this.low)},e.prototype.isEven=function(){return!(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.__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?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;c{Object.defineProperty(t,"__esModule",{value:!0}),t.fromVersion=void 0,t.fromVersion=function(e,t){void 0===t&&(t=function(){return{get userAgent(){}}});var n=t(),r=null!=n.userAgent?n.userAgent.split("(")[1].split(")")[0]:void 0,o=n.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:o}}},3488:function(e,t,n){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)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(5837),t)},9730:function(e,t,n){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.__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(e){o={error:e}}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]{Object.defineProperty(t,"__esModule",{value:!0}),t.TELEMETRY_APIS=t.BOLT_PROTOCOL_V5_7=t.BOLT_PROTOCOL_V5_6=t.BOLT_PROTOCOL_V5_5=t.BOLT_PROTOCOL_V5_4=t.BOLT_PROTOCOL_V5_3=t.BOLT_PROTOCOL_V5_2=t.BOLT_PROTOCOL_V5_1=t.BOLT_PROTOCOL_V5_0=t.BOLT_PROTOCOL_V4_4=t.BOLT_PROTOCOL_V4_3=t.BOLT_PROTOCOL_V4_2=t.BOLT_PROTOCOL_V4_1=t.BOLT_PROTOCOL_V4_0=t.BOLT_PROTOCOL_V3=t.BOLT_PROTOCOL_V2=t.BOLT_PROTOCOL_V1=t.DEFAULT_POOL_MAX_SIZE=t.DEFAULT_POOL_ACQUISITION_TIMEOUT=t.DEFAULT_CONNECTION_TIMEOUT_MILLIS=t.ACCESS_MODE_WRITE=t.ACCESS_MODE_READ=t.FETCH_ALL=void 0,t.FETCH_ALL=-1,t.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,t.DEFAULT_POOL_MAX_SIZE=100,t.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,t.ACCESS_MODE_READ="READ",t.ACCESS_MODE_WRITE="WRITE",t.BOLT_PROTOCOL_V1=1,t.BOLT_PROTOCOL_V2=2,t.BOLT_PROTOCOL_V3=3,t.BOLT_PROTOCOL_V4_0=4,t.BOLT_PROTOCOL_V4_1=4.1,t.BOLT_PROTOCOL_V4_2=4.2,t.BOLT_PROTOCOL_V4_3=4.3,t.BOLT_PROTOCOL_V4_4=4.4,t.BOLT_PROTOCOL_V5_0=5,t.BOLT_PROTOCOL_V5_1=5.1,t.BOLT_PROTOCOL_V5_2=5.2,t.BOLT_PROTOCOL_V5_3=5.3,t.BOLT_PROTOCOL_V5_4=5.4,t.BOLT_PROTOCOL_V5_5=5.5,t.BOLT_PROTOCOL_V5_6=5.6,t.BOLT_PROTOCOL_V5_7=5.7,t.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3}},6995:function(e,t,n){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.pool=t.boltAgent=t.objectUtil=t.resolver=t.serverAddress=t.urlUtil=t.logger=t.transactionExecutor=t.txConfig=t.connectionHolder=t.constants=t.bookmarks=t.observer=t.temporalUtil=t.util=void 0;var a=i(n(6587));t.util=a;var s=i(n(5022));t.temporalUtil=s;var u=i(n(2696));t.observer=u;var l=i(n(9730));t.bookmarks=l;var c=i(n(326));t.constants=c;var f=i(n(3618));t.connectionHolder=f;var h=i(n(754));t.txConfig=h;var d=i(n(6189));t.transactionExecutor=d;var p=i(n(4883));t.logger=p;var v=i(n(407));t.urlUtil=v;var g=i(n(7509));t.serverAddress=g;var y=i(n(9470));t.resolver=y;var m=i(n(93));t.objectUtil=m;var b=i(n(3488));t.boltAgent=b;var _=i(n(2906));t.pool=_},4883:function(e,t,n){var r,o,i=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;var a=n(9691),s="error",u="warn",l="info",c="debug",f=l,h=((o={})[s]=0,o[u]=1,o[l]=2,o[c]=3,o),d=function(){function e(e,t){this._level=e,this._loggerFunction=t}return e.create=function(t){if(null!=(null==t?void 0:t.logging)){var n=t.logging,r=function(e){if(null!=(null==e?void 0:e.level)){var t=e.level,n=h[t];if(null==n&&0!==n)throw(0,a.newError)("Illegal logging level: ".concat(t,". Supported levels are: ").concat(Object.keys(h).toString()));return t}return f}(n),o=function(e){var t,n;if(null!=(null==e?void 0:e.logger)){var r=e.logger;if(null!=r&&"function"==typeof r)return r}throw(0,a.newError)("Illegal logger function: ".concat(null!==(n=null===(t=null==e?void 0:e.logger)||void 0===t?void 0:t.toString())&&void 0!==n?n:"undefined"))}(n);return new e(r,o)}return this.noOp()},e.noOp=function(){return p},e.prototype.isErrorEnabled=function(){return v(this._level,s)},e.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(s,e)},e.prototype.isWarnEnabled=function(){return v(this._level,u)},e.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(u,e)},e.prototype.isInfoEnabled=function(){return v(this._level,l)},e.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(l,e)},e.prototype.isDebugEnabled=function(){return v(this._level,c)},e.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(c,e)},e}();t.Logger=d;var p=new(function(e){function t(){return e.call(this,l,function(e,t){})||this}return i(t,e),t.prototype.isErrorEnabled=function(){return!1},t.prototype.error=function(e){},t.prototype.isWarnEnabled=function(){return!1},t.prototype.warn=function(e){},t.prototype.isInfoEnabled=function(){return!1},t.prototype.info=function(e){},t.prototype.isDebugEnabled=function(){return!1},t.prototype.debug=function(e){},t}(d));function v(e,t){return h[e]>=h[t]}},93:(e,t)=>{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]}},2696:(e,t)=>{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},2906:function(e,t,n){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(7589));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(6842));t.Pool=u.default,t.default=u.default},7589:(e,t)=>{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 a(e)?e:t}function a(e){return 0===e||null!=e}t.default=o},6842:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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))return[3,10];if(null==(u=a.pop()))return[3,1];c(i,this._activeResourceCounts),null!=this._removeIdleObserver&&this._removeIdleObserver(u),l=!1,g.label=2;case 2:return g.trys.push([2,4,,6]),[4,this._validateOnAcquire(e,u)];case 3:return l=g.sent(),[3,6];case 4:return h=g.sent(),f(i,this._activeResourceCounts),a.removeInUse(u),[4,this._destroy(u)];case 5:throw g.sent(),h;case 6:return l?(this._log.isDebugEnabled()&&this._log.debug("".concat(u," acquired from the pool ").concat(i)),[2,{resource:u,pool:a}]):[3,7];case 7:return f(i,this._activeResourceCounts),a.removeInUse(u),[4,this._destroy(u)];case 8:g.sent(),g.label=9;case 9:return[3,1];case 10:if(this._maxSize>0&&this.activeResourceCount(t)+this._pendingCreates[i]>=this._maxSize)return[2,{resource:null,pool:a}];this._pendingCreates[i]=this._pendingCreates[i]+1,g.label=11;case 11:return g.trys.push([11,,15,16]),this.activeResourceCount(t)+a.length>=this._maxSize&&n?null==(p=a.pop())?[3,13]:(null!=this._removeIdleObserver&&this._removeIdleObserver(p),a.removeInUse(p),[4,this._destroy(p)]):[3,13];case 12:g.sent(),g.label=13;case 13:return[4,this._create(e,t,function(e,t){return r(v,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,this._release(e,t,a)];case 1:return[2,n.sent()]}})})})];case 14:return d=g.sent(),a.pushInUse(d),c(i,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(d," created for the pool ").concat(i)),[3,16];case 15:return this._pendingCreates[i]=this._pendingCreates[i]-1,[7];case 16:return[2,{resource:d,pool:a}]}})})},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:null!=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];null!=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 f(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=[],null==t)return[3,2];for(;t.length>0;)null!=(r=t.pop())&&(null!=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(null!=r){var o=r.shift();null!=o?this._acquire(o.context,e,o.requireNew).catch(function(e){return o.reject(e),{resource:null,pool:null}}).then(function(r){var i=r.resource,a=r.pool;null!=i&&null!=a?o.isCompleted()?t._release(e,i,a).catch(function(e){t._log.isDebugEnabled()&&t._log.debug("".concat(i," could not be release back to the pool. Cause: ").concat(e))}):o.resolve(i):o.isCompleted()||(null==t._acquireRequests[n]&&(t._acquireRequests[n]=[]),t._acquireRequests[n].unshift(o))}).catch(function(e){return o.reject(e)}):delete this._acquireRequests[n]}},e}();function c(e,t){var n,r=null!==(n=t[e])&&void 0!==n?n:0;t[e]=r+1}function f(e,t){var n,r=(null!==(n=t[e])&&void 0!==n?n:0)-1;r>0?t[e]=r:delete t[e]}var h=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=null!=n?n:{}}return Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requireNew",{get:function(){var e;return null!==(e=this._config.requireNew)&&void 0!==e&&e},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}(),d=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 null!=e&&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},7041:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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]{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.resolve=function(){throw new Error("Abstract function")},e.prototype._resolveToItself=function(e){return Promise.resolve([e])},e}();t.default=n},8341:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(7509);function o(e){return Promise.resolve([e])}var i=function(){function e(e){this._resolverFunction=null!=e?e:o}return e.prototype.resolve=function(e){var t=this;return new Promise(function(n){return n(t._resolverFunction(e.asHostPort()))}).then(function(e){if(!Array.isArray(e))throw new TypeError("Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses."+"Each address is ':'. Got: ".concat(e));return e.map(function(e){return r.ServerAddress.fromUrl(e)})})},e}();t.default=i},9470:function(e,t,n){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(3389));t.BaseHostNameResolver=o.default;var i=r(n(8341));t.ConfiguredCustomResolver=i.default},7509:function(e,t,n){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(6587),s=i(n(407)),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},5022:function(e,t,n){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(3371)),s=n(9691),u=n(6587),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)).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)}t.YEAR_RANGE=new l(-999999999,999999999),t.MONTH_OF_YEAR_RANGE=new l(1,12),t.DAY_OF_MONTH_RANGE=new l(1,31),t.HOUR_OF_DAY_RANGE=new l(0,23),t.MINUTE_OF_HOUR_RANGE=new l(0,59),t.SECOND_OF_MINUTE_RANGE=new l(0,59),t.NANOSECOND_OF_SECOND_RANGE=new l(0,999999999),t.MINUTES_PER_HOUR=60,t.SECONDS_PER_MINUTE=60,t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE*t.MINUTES_PER_HOUR,t.NANOS_PER_SECOND=1e9,t.NANOS_PER_MILLISECOND=1e6,t.NANOS_PER_MINUTE=t.NANOS_PER_SECOND*t.SECONDS_PER_MINUTE,t.NANOS_PER_HOUR=t.NANOS_PER_MINUTE*t.MINUTES_PER_HOUR,t.DAYS_0000_TO_1970=719528,t.DAYS_PER_400_YEAR_CYCLE=146097,t.SECONDS_PER_DAY=86400,t.normalizeSecondsForDuration=function(e,n){return(0,a.int)(e).add(p(n,t.NANOS_PER_SECOND))},t.normalizeNanosecondsForDuration=function(e){return v(e,t.NANOS_PER_SECOND)},t.localTimeToNanoOfDay=function(e,n,r,o){e=(0,a.int)(e),n=(0,a.int)(n),r=(0,a.int)(r),o=(0,a.int)(o);var i=e.multiply(t.NANOS_PER_HOUR);return(i=(i=i.add(n.multiply(t.NANOS_PER_MINUTE))).add(r.multiply(t.NANOS_PER_SECOND))).add(o)},t.localDateTimeToEpochSecond=function(e,n,r,o,i,s,u){var l=c(e,n,r),f=function(e,n,r){e=(0,a.int)(e),n=(0,a.int)(n),r=(0,a.int)(r);var o=e.multiply(t.SECONDS_PER_HOUR);return(o=o.add(n.multiply(t.SECONDS_PER_MINUTE))).add(r)}(o,i,s);return l.multiply(t.SECONDS_PER_DAY).add(f)},t.dateToEpochDay=c,t.durationToIsoString=function(e,n,r,o){var i=y(e),s=y(n),u=function(e,n){var r,o;e=(0,a.int)(e),n=(0,a.int)(n);var i=e.isNegative(),s=n.greaterThan(0);return r=i&&s?e.equals(-1)?"-0":e.add(1).toString():e.toString(),s&&(o=g(i?n.negate().add(2*t.NANOS_PER_SECOND).modulo(t.NANOS_PER_SECOND):n.add(t.NANOS_PER_SECOND).modulo(t.NANOS_PER_SECOND))),null!=o?r+o:r}(r,o);return"P".concat(i,"M").concat(s,"DT").concat(u,"S")},t.timeToIsoString=function(e,t,n,r){var o=y(e,2),i=y(t,2),a=y(n,2),s=g(r);return"".concat(o,":").concat(i,":").concat(a).concat(s)},t.timeZoneOffsetToIsoString=function(e){if((e=(0,a.int)(e)).equals(0))return"Z";var n=e.isNegative();n&&(e=e.multiply(-1));var r=n?"-":"+",o=y(e.div(t.SECONDS_PER_HOUR),2),i=y(e.div(t.SECONDS_PER_MINUTE).modulo(t.MINUTES_PER_HOUR),2),s=e.modulo(t.SECONDS_PER_MINUTE),u=s.equals(0)?null:y(s,2);return null!=u?"".concat(r).concat(o,":").concat(i,":").concat(u):"".concat(r).concat(o,":").concat(i)},t.dateToIsoString=function(e,t,n){var r=function(e){var t=(0,a.int)(e);return t.isNegative()||t.greaterThan(9999)?y(t,6,{usePositiveSign:!0}):y(t,4)}(e),o=y(t,2),i=y(n,2);return"".concat(r,"-").concat(o,"-").concat(i)},t.isoStringToStandardDate=function(e){return new Date(e)},t.toStandardDate=function(e){return new Date(e)},t.newDate=function(e){return new Date(e)},t.totalNanoseconds=function(e,n){return r=n=null!=n?n:0,o=e.getMilliseconds()*t.NANOS_PER_MILLISECOND,r instanceof a.default?r.add(o):"bigint"==typeof r?r+BigInt(o):r+o;var r,o},t.timeZoneOffsetInSeconds=function(e){var n=e.getSeconds()>=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 d(e,t.YEAR_RANGE,"Year")},t.assertValidMonth=function(e){return d(e,t.MONTH_OF_YEAR_RANGE,"Month")},t.assertValidDay=function(e){return d(e,t.DAY_OF_MONTH_RANGE,"Day")},t.assertValidHour=function(e){return d(e,t.HOUR_OF_DAY_RANGE,"Hour")},t.assertValidMinute=function(e){return d(e,t.MINUTE_OF_HOUR_RANGE,"Minute")},t.assertValidSecond=function(e){return d(e,t.SECOND_OF_MINUTE_RANGE,"Second")},t.assertValidNanosecond=function(e){return d(e,t.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")};var f=new Map,h=function(e,t){return(0,s.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))};function d(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 p(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 v(e,t){return e=(0,a.int)(e),t=(0,a.int)(t),e.subtract(p(e,t).multiply(t))}function g(e){return(e=(0,a.int)(e)).equals(0)?"":"."+y(e,9)}function y(e,t,n){var r=(e=(0,a.int)(e)).isNegative();r&&(e=e.negate());var o=e.toString();if(null!=t)for(;o.length0&&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(e){o={error:e}}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.apiTransactionConfig)?r({},null==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?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(e){return Promise.reject(e)}},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},754:function(e,t,n){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(6587)),s=n(9691),u=n(3371),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.isInfoEnabled())&&(null==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({})},407:function(e,t,n){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(e){o={error:e}}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(6587),a=function(e,t,n,r,o){this.scheme=e,this.host=t,this.port=n,this.hostAndPort=r,this.query=o};function s(e,t,n){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(n,"'"));return e}function u(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 l(e){return"http"===e?7474:"https"===e?7473:7687}t.Url=a,t.parseDatabaseUrl=function(e){var t;(0,i.assertString)(e,"URL");var n,c=function(e){return(e=e.trim()).includes("://")?{schemeMissing:!1,url:e}:{schemeMissing:!0,url:"none://".concat(e)}}(e),f=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,"",""]}var n,i={};return":"===(n=t(e,":"))[1]&&(i.scheme=decodeURIComponent(n[0]),e=n[2]),"#"===(n=t(e,"#"))[1]&&(i.fragment=decodeURIComponent(n[2]),e=n[0]),"?"===(n=t(e,"?"))[1]&&(i.query=n[2],e=n[0]),e.startsWith("//")?(n=t(e.substr(2),"/"),(i=r(r({},i),function(e){var n,r,i,a={};"@"===(r=e,i=r.lastIndexOf("@"),n=i>=0?[r.substring(0,i),r[i],r.substring(i+1)]:["","",r])[1]&&(a.userInfo=decodeURIComponent(n[0]),e=n[2]);var s=o(function(e){var n=t(e,"["),r=t(n[2],"]");return[r[0],r[2]]}(e),2),u=s[0],l=s[1];return""!==u?(a.host=u,n=t(l,":")):(n=t(e,":"),a.host=n[0]),":"===n[1]&&(a.port=n[2]),a}(n[0]))).path=n[1]+n[2]):i.path=e,i}(c.url),h=c.schemeMissing?null:function(e){return null!=e?(":"===(e=e.trim()).charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e):null}(f.scheme),d=function(e){if(null==e)throw new Error("Unable to extract host from null or undefined URL");return e.trim()}(f.host),p=function(e){if(""===e||null==e)throw new Error("Illegal host ".concat(e));return e.includes(":")?u(e):e}(d),v=function(e,t){var n="string"==typeof e?parseInt(e,10):e;return null==n||isNaN(n)?l(t):n}(f.port,h),g="".concat(p,":").concat(v),y=function(e,t){var n=null!=e?function(e){return"?"===(null==(e=(null!=e?e:"").trim())?void 0:e.charAt(0))&&(e=e.substring(1,e.length)),e}(e):null,r={};return 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=s(n[0],"key",t),i=s(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}),r}(null!==(t=f.query)&&void 0!==t?t:"string"!=typeof(n=f.resourceName)?null:o(n.split("?"),2)[1],e);return new a(h,d,v,g,y)},t.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},t.formatIPv6Address=function(e,t){var n=u(e);return"".concat(n,":").concat(t)},t.defaultPortForScheme=l},6587:function(e,t,n){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.__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.toNumber=t.assertValidDate=t.assertNumberOrInteger=t.assertNumber=t.assertString=t.assertObject=t.isString=t.isObject=t.isEmptyObjectOrNull=void 0;var s=i(n(3371)),u=n(4027);function l(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function c(e,t){if(!f(e))throw new TypeError((0,u.stringify)(t)+" expected to be string but was: "+(0,u.stringify)(e));return e}function f(e){return"[object String]"===Object.prototype.toString.call(e)}t.ENCRYPTION_ON="ENCRYPTION_ON",t.ENCRYPTION_OFF="ENCRYPTION_OFF",t.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!l(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},t.isObject=l,t.validateQueryAndParameters=function(e,t,n){var r,o,i="",a=null!=t?t:{},s=null!==(r=null==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,a=null!==(o=e.parameters)&&void 0!==o?o:{}),s||(function(e){if(c(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")}(i),function(e){if(!l(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)))}}(a)),{validatedQuery:i,params:a}},t.assertObject=function(e,t){if(!l(e))throw new TypeError(t+" expected to be an object but was: "+(0,u.stringify)(e));return e},t.assertString=c,t.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,u.stringify)(e));return e},t.assertNumberOrInteger=function(e,t){if("number"!=typeof e&&"bigint"!=typeof e&&!(0,s.isInt)(e))throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,u.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,u.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,u.stringify)(e));return e},t.isString=f,t.equals=function e(t,n){var r,o;if(t===n)return!0;if(null===t||null===n)return!1;if("object"==typeof t&&"object"==typeof n){var i=Object.keys(t),s=Object.keys(n);if(i.length!==s.length)return!1;try{for(var u=a(i),l=u.next();!l.done;l=u.next()){var c=l.value;if(!e(t[c],n[c]))return!1}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return!0}return!1},t.toNumber=function(e){return e instanceof s.default?e.toNumber():"bigint"==typeof e?(0,s.int)(e).toNumber():e}},4027:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;var r=n(93);t.stringify=function(e,t){return JSON.stringify(e,function(e,n){return(0,r.isBrokenObject)(n)?{__isBrokenObject__:!0,__reason__:(0,r.getBrokenObjectReason)(n)}:"bigint"==typeof n?"".concat(n,"n"):!0!==(null==t?void 0:t.useCustomToString)||"object"!=typeof n||Array.isArray(n)||"function"!=typeof n.toString||n.toString===Object.prototype.toString?n:null==n?void 0:n.toString()})}},1985:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.notificationFilterDisabledClassification=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",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"};t.notificationFilterDisabledCategory=r,Object.freeze(r);var o=r;t.notificationFilterDisabledClassification=o,t.default=function(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}},1866:function(e,t,n){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(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},u=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]=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(e){o={error:e}}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(9691),s=function(){function e(e,t,n){this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=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(e){t={error:e}}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(e){t={error:e}}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&&e{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){this.keys=e,this.records=t,this.summary=n}},6033:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Stats=t.QueryStatistics=t.ProfiledPlan=t.Plan=t.ServerInfo=t.queryType=void 0;var r=n(6995),o=n(1866),i=function(){function e(e,t,n,r){var i,c,f;this.query={text:e,parameters:t},this.queryType=n.type,this.counters=new u(null!==(i=n.stats)&&void 0!==i?i:{}),this.updateStatistics=this.counters,this.plan=(null!=n.plan||null!=n.profile)&&new a(null!==(c=n.plan)&&void 0!==c?c:n.profile),this.profile=null!=n.profile&&new s(n.profile),this.notifications=(0,o.buildNotificationsFromMetadata)(n),this.gqlStatusObjects=(0,o.buildGqlStatusObjectFromMetadata)(n),this.server=new l(n.server,r),this.resultConsumedAfter=n.result_consumed_after,this.resultAvailableAfter=n.result_available_after,this.database={name:null!==(f=n.db)&&void 0!==f?f:null}}return e.prototype.hasPlan=function(){return this.plan instanceof a},e.prototype.hasProfile=function(){return this.profile instanceof s},e}(),a=function e(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.children=null!=t.children?t.children.map(function(t){return new e(t)}):[]};t.Plan=a;var s=function(){function e(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.dbHits=c("dbHits",t),this.rows=c("rows",t),this.pageCacheMisses=c("pageCacheMisses",t),this.pageCacheHits=c("pageCacheHits",t),this.pageCacheHitRatio=c("pageCacheHitRatio",t),this.time=c("time",t),this.children=null!=t.children?t.children.map(function(t){return new e(t)}):[]}return e.prototype.hasPageCacheStats=function(){return this.pageCacheMisses>0||this.pageCacheHits>0||this.pageCacheHitRatio>0},e}();t.ProfiledPlan=s,t.Stats=function(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0};var u=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 o=n.replace(/(-\w)/g,function(e){return e[1].toUpperCase()});o in t._stats?t._stats[o]=r.util.toNumber(e[n]):"systemUpdates"===o?t._systemUpdates=r.util.toNumber(e[n]):"containsSystemUpdates"===o?t._containsSystemUpdates=e[n]:"containsUpdates"===o&&(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=u;var l=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function c(e,t,n){if(void 0===n&&(n=0),!1!==t&&e in t){var o=t[e];return r.util.toNumber(o)}return n}t.ServerInfo=l,t.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},t.default=i},1573:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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 o(e,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return void 0!==n.queuedObserver?[3,2]:(n.queuedObserver=this._createQueuedResultObserver(r),e=n,[4,this._subscribe(n.queuedObserver,!0).catch(function(){})]);case 1:e.streaming=t.sent(),r(),t.label=2;case 2:return[2,n.queuedObserver]}})})},s=function(e){if(void 0===e)throw(0,l.newError)("InvalidState: Result stream finished without Summary",l.PROTOCOL_ERROR);return!0};return{next:function(){return o(e,void 0,void 0,function(){var e;return i(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 o(e,void 0,void 0,function(){var e,r;return i(this,function(o){switch(o.label){case 0:return n.finished&&s(n.summary)?[2,{done:!0,value:null!=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?t:e.value,n.summary=e.value,[2,e]}})})},peek:function(){return o(e,void 0,void 0,function(){return i(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:h,a=null!==(n=e.onError)&&void 0!==n?n:f,s=null!==(r=e.onKeys)&&void 0!==r?r:d;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=u.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.getProtocolVersion()})},function(e){}).then(function(t){return new s.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 r(e){return e instanceof Error}function a(){var t;return o(this,void 0,void 0,function(){var o;return i(this,function(i){switch(i.label){case 0:if(s.length>0){if(o=null!==(t=s.shift())&&void 0!==t?t:(0,l.newError)("Unexpected empty buffer",l.PROTOCOL_ERROR),e(),r(o))throw o;return[2,o]}return u.resolvable=n(),[4,u.resolvable.promise];case 1:return[2,i.sent()]}})})}var s=[],u={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!==u.resolvable){var n=u.resolvable;u.resolvable=null,r(t)?n.reject(t):n.resolve(t)}else s.push(t),e()},dequeue:a,dequeueUntilDone:function(){return o(t,void 0,void 0,function(){var e;return i(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 o(t,void 0,void 0,function(){var t,o;return i(this,function(i){switch(i.label){case 0:if(s.length>0){if(r(t=s[0]))throw t;return[2,t]}u.resolvable=n(),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,u.resolvable.promise];case 2:return t=i.sent(),s.unshift(t),[2,t];case 3:throw o=i.sent(),s.unshift(o),o;case 4:return e(),[7];case 5:return[2]}})})},get size(){return s.length}};return c},e}();r=Symbol.toStringTag,t.default=p},5481:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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(e){o={error:e}}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;o{Object.defineProperty(t,"__esModule",{value:!0}),t.isPoint=t.Point=void 0;var r=n(6587),o="__isPoint__",i=function(){function e(e,t,n,o){this.srid=(0,r.assertNumberOrInteger)(e,"SRID"),this.x=(0,r.assertNumber)(t,"X coordinate"),this.y=(0,r.assertNumber)(n,"Y coordinate"),this.z=null==o?o:(0,r.assertNumber)(o,"Z coordinate"),Object.freeze(this)}return e.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(a(this.srid),", x=").concat(a(this.x),", y=").concat(a(this.y),"}"):"Point{srid=".concat(a(this.srid),", x=").concat(a(this.x),", y=").concat(a(this.y),", z=").concat(a(this.z),"}")},e}();function a(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}t.Point=i,Object.defineProperty(i.prototype,o,{value:!0,enumerable:!1,configurable:!1,writable:!1}),t.isPoint=function(e){return null!=e&&!0===e[o]}},5459:function(e,t,n){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.__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(e){o={error:e}}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(5022)),u=n(6587),l=n(9691),c=i(n(3371)),f={value:!0,enumerable:!1,configurable:!1,writable:!1},h="__isDuration__",d="__isLocalTime__",p="__isTime__",v="__isDate__",g="__isLocalDateTime__",y="__isDateTime__",m=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=m,Object.defineProperty(m.prototype,h,f),t.isDuration=function(e){return O(e,h)};var b=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){T(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=b,Object.defineProperty(b.prototype,d,f),t.isLocalTime=function(e){return O(e,d)};var _=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 T(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=_,Object.defineProperty(_.prototype,p,f),t.isTime=function(e){return O(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 T(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 O(e,v)};var x=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 T(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 S(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},e}();t.LocalDateTime=x,Object.defineProperty(x.prototype,g,f),t.isLocalDateTime=function(e){return O(e,g)};var E=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,r=null!=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];return 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),o}(f,h),2),p=d[0],v=d[1];this.timeZoneOffsetSeconds=p,this.timeZoneId=null!=v?v:void 0,Object.freeze(this)}return e.fromStandardDate=function(t,n){return T(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 S(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 O(e,t){return null!=e&&!0===e[t]}function S(e,t,n,r,o,i,a){return s.dateToIsoString(e,t,n)+"T"+s.timeToIsoString(r,o,i,a)}function T(e,t){(0,u.assertValidDate)(e,"Standard date"),null!=t&&(0,u.assertNumberOrInteger)(t,"Nanosecond")}t.DateTime=E,Object.defineProperty(E.prototype,y,f),t.isDateTime=function(e){return O(e,y)}},5909:(e,t)=>{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},4569:function(e,t,n){var r,o,i=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=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===u)return n;if(0===n||n<0)throw new Error("The fetch size can only be a positive value or ".concat(u," for ALL. However fetchSize = ").concat(n));return t}t.Driver=f,t.default=f},1187:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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]{Object.defineProperty(t,"__esModule",{value:!0});var r=n(9305),o=n(8813),i=n(9419),a=(r.internal.logger.Logger,r.error.SERVICE_UNAVAILABLE),s=function(){function e(e){var t=void 0===e?{}:e,n=t.maxRetryTimeout,r=void 0===n?3e4:n,o=t.initialDelay,i=void 0===o?1e3:o,a=t.delayMultiplier,s=void 0===a?2:a,l=t.delayJitter,c=void 0===l?.2:l,f=t.logger,h=void 0===f?null:f;this._maxRetryTimeout=u(r,3e4),this._initialDelay=u(i,1e3),this._delayMultiplier=u(s,2),this._delayJitter=u(c,.2),this._logger=h}return e.prototype.retry=function(e){var t=this;return e.pipe((0,i.retryWhen)(function(e){var n=[],s=Date.now(),u=1,l=t._initialDelay;return e.pipe((0,i.mergeMap)(function(e){if(!(0,r.isRetriableError)(e))return(0,o.throwError)(function(){return e});if(n.push(e),u>=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},3057:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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]{Object.defineProperty(t,"__esModule",{value:!0}),t.default="5.26.0"},481:(e,t,n)=>{e.exports=n(137)},137:e=>{e.exports=class{constructor(e,t,n,r){let o;if("object"==typeof e){let i=e;e=i.k_p,t=i.k_i,n=i.k_d,r=i.dt,o=i.i_max}this.k_p="number"==typeof e?e:1,this.k_i=t||0,this.k_d=n||0,this.dt=r||0,this.i_max=o||0,this.sumError=0,this.lastError=0,this.lastTime=0,this.target=0}setTarget(e){this.target=e}update(e){this.currentValue=e;let t=this.dt;if(!t){let e=Date.now();t=0===this.lastTime?0:(e-this.lastTime)/1e3,this.lastTime=e}"number"==typeof t&&0!==t||(t=1);let n=this.target-this.currentValue;if(this.sumError=this.sumError+n*t,this.i_max>0&&Math.abs(this.sumError)>this.i_max){let e=this.sumError>0?1:-1;this.sumError=e*this.i_max}let r=(n-this.lastError)/t;return this.lastError=n,this.k_p*n+this.k_i*this.sumError+this.k_d*r}reset(){this.sumError=0,this.lastError=0,this.lastTime=0}}},1803:e=>{var t,n,r=document.attachEvent,o=!1;function i(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight}function a(e){var t=this;i(this),this.__resizeRAF__&&u(this.__resizeRAF__),this.__resizeRAF__=s(function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(n){n.call(t,e)}))})}if(!r){var s=(n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return n(e)}),u=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)}),l=!1,c="",f="animationstart",h="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),p=document.createElement("fakeelement");if(void 0!==p.style.animationName&&(l=!0),!1===l)for(var v=0;v div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),o=!0}}(),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=document.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='
',e.appendChild(e.__resizeTriggers__),i(e),e.addEventListener("scroll",a,!0),f&&e.__resizeTriggers__.addEventListener(f,function(t){t.animationName==g&&i(e)})),e.__resizeListeners__.push(t)),function(){r?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",a),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}},8813:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}: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)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.onErrorResumeNextWith=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=void 0;var i=n(4662);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return i.Observable}});var a=n(8918);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return a.ConnectableObservable}});var s=n(3327);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return s.observable}});var u=n(3110);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var l=n(2483);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return l.Subject}});var c=n(1637);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return c.BehaviorSubject}});var f=n(1242);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var h=n(95);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return h.AsyncSubject}});var d=n(3692);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var p=n(7961);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var v=n(2886);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return v.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return v.queueScheduler}});var g=n(3862);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return g.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return g.animationFrameScheduler}});var y=n(182);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return y.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return y.VirtualAction}});var m=n(8986);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return m.Scheduler}});var b=n(8014);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return b.Subscription}});var _=n(5);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return _.Subscriber}});var w=n(7800);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var x=n(2706);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return x.pipe}});var E=n(1342);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return E.noop}});var O=n(6640);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return O.identity}});var S=n(1751);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return S.isObservable}});var T=n(6894);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return T.lastValueFrom}});var P=n(9060);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return P.firstValueFrom}});var C=n(7057);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return C.ArgumentOutOfRangeError}});var A=n(2823);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return A.EmptyError}});var k=n(1759);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return k.NotFoundError}});var I=n(9686);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return I.ObjectUnsubscribedError}});var R=n(1505);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return R.SequenceError}});var j=n(1554);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return j.TimeoutError}});var M=n(5788);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return M.UnsubscriptionError}});var N=n(2713);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return N.bindCallback}});var D=n(8561);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return D.bindNodeCallback}});var L=n(3247);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return L.combineLatest}});var B=n(3865);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return B.concat}});var F=n(7579);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return F.connectable}});var U=n(9353);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return U.defer}});var z=n(8616);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return z.empty}});var V=n(9105);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return V.forkJoin}});var W=n(4917);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return W.from}});var G=n(5337);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return G.fromEvent}});var H=n(347);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return H.fromEventPattern}});var Y=n(7610);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Y.generate}});var q=n(4209);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return q.iif}});var X=n(6472);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return X.interval}});var K=n(2833);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return K.merge}});var Z=n(8655);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return Z.never}});var $=n(1004);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return $.of}});var Q=n(6102);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Q.onErrorResumeNext}});var J=n(7740);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return J.pairs}});var ee=n(1699);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=n(5584);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var ne=n(9376);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return ne.range}});var re=n(1103);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return re.throwError}});var oe=n(4092);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return oe.timer}});var ie=n(7853);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return ie.using}});var ae=n(7286);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ae.zip}});var se=n(1656);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return se.scheduled}});var ue=n(8616);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var le=n(8655);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return le.NEVER}}),o(n(6038),t);var ce=n(3413);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return ce.config}});var fe=n(3146);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var he=n(3231);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return he.auditTime}});var de=n(8015);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var pe=n(5572);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return pe.bufferCount}});var ve=n(7210);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ve.bufferTime}});var ge=n(8995);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ge.bufferToggle}});var ye=n(8831);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return ye.bufferWhen}});var me=n(8118);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return me.catchError}});var be=n(6625);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return be.combineAll}});var _e=n(6728);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return _e.combineLatestAll}});var we=n(8239);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var xe=n(8158);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return xe.concatAll}});var Ee=n(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Ee.concatMap}});var Oe=n(9938);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Oe.concatMapTo}});var Se=n(9669);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Se.concatWith}});var Te=n(1483);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Te.connect}});var Pe=n(1038);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return Pe.count}});var Ce=n(4461);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Ce.debounce}});var Ae=n(8079);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return Ae.debounceTime}});var ke=n(378);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return ke.defaultIfEmpty}});var Ie=n(914);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ie.delay}});var Re=n(8766);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Re.delayWhen}});var je=n(7441);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return je.dematerialize}});var Me=n(5365);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return Me.distinct}});var Ne=n(8937);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Ne.distinctUntilChanged}});var De=n(9612);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return De.distinctUntilKeyChanged}});var Le=n(4520);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Le.elementAt}});var Be=n(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Be.endWith}});var Fe=n(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Fe.every}});var Ue=n(1551);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Ue.exhaust}});var ze=n(2752);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return ze.exhaustAll}});var Ve=n(4753);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ve.exhaustMap}});var We=n(7661);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return We.expand}});var Ge=n(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return Ge.filter}});var He=n(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return He.finalize}});var Ye=n(7714);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ye.find}});var qe=n(9756);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return qe.findIndex}});var Xe=n(8275);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return Xe.first}});var Ke=n(7815);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ke.groupBy}});var Ze=n(490);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Ze.ignoreElements}});var $e=n(9356);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return $e.isEmpty}});var Qe=n(8669);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Qe.last}});var Je=n(5471);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Je.map}});var et=n(3218);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=n(2360);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var nt=n(1415);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return nt.max}});var rt=n(7302);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return rt.mergeAll}});var ot=n(6902);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return ot.flatMap}});var it=n(983);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return it.mergeMap}});var at=n(6586);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return at.mergeMapTo}});var st=n(4408);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return st.mergeScan}});var ut=n(8253);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var lt=n(2669);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return lt.min}});var ct=n(9247);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ct.multicast}});var ft=n(5184);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var ht=n(1226);Object.defineProperty(t,"onErrorResumeNextWith",{enumerable:!0,get:function(){return ht.onErrorResumeNextWith}});var dt=n(1518);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return dt.pairwise}});var pt=n(4912);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return pt.pluck}});var vt=n(766);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return vt.publish}});var gt=n(7220);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return gt.publishBehavior}});var yt=n(6106);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return yt.publishLast}});var mt=n(8157);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var bt=n(5600);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var _t=n(9139);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return _t.reduce}});var wt=n(8522);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return wt.repeat}});var xt=n(6566);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return xt.repeatWhen}});var Et=n(7835);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Et.retry}});var Ot=n(9843);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Ot.retryWhen}});var St=n(7561);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return St.refCount}});var Tt=n(1731);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Tt.sample}});var Pt=n(6086);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Pt.sampleTime}});var Ct=n(8624);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Ct.scan}});var At=n(582);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return At.sequenceEqual}});var kt=n(8977);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return kt.share}});var It=n(3133);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return It.shareReplay}});var Rt=n(3001);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Rt.single}});var jt=n(3982);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return jt.skip}});var Mt=n(9098);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Mt.skipLast}});var Nt=n(7372);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Nt.skipUntil}});var Dt=n(4721);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Dt.skipWhile}});var Lt=n(269);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Lt.startWith}});var Bt=n(8960);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Bt.subscribeOn}});var Ft=n(8774);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ft.switchAll}});var Ut=n(3879);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Ut.switchMap}});var zt=n(3274);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return zt.switchMapTo}});var Vt=n(8712);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Vt.switchScan}});var Wt=n(846);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Wt.take}});var Gt=n(8330);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Gt.takeLast}});var Ht=n(4780);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ht.takeUntil}});var Yt=n(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Yt.takeWhile}});var qt=n(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return qt.tap}});var Xt=n(8941);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Xt.throttle}});var Kt=n(7640);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Zt=n(4869);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Zt.throwIfEmpty}});var $t=n(489);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return $t.timeInterval}});var Qt=n(1554);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Qt.timeout}});var Jt=n(4862);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Jt.timeoutWith}});var en=n(6505);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return en.timestamp}});var tn=n(2343);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return tn.toArray}});var nn=n(5477);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return nn.window}});var rn=n(6746);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return rn.windowCount}});var on=n(8208);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return on.windowTime}});var an=n(6637);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return an.windowToggle}});var sn=n(1141);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return sn.windowWhen}});var un=n(5442);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return un.withLatestFrom}});var ln=n(187);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ln.zipAll}});var cn=n(8538);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return cn.zipWith}})},95:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return o(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,o=t._value,i=t.thrownError,a=t.isStopped,s=t._isComplete;n?e.error(i):(a||s)&&(r&&e.next(o),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},t}(n(2483).Subject);t.AsyncSubject=i},1637:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var i=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(n(2483).Subject);t.BehaviorSubject=i},7800:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var r,o=n(8616),i=n(1004),a=n(1103),s=n(1018);(r=t.NotificationKind||(t.NotificationKind={})).NEXT="N",r.ERROR="E",r.COMPLETE="C";var u=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){return l(this,e)},e.prototype.do=function(e,t,n){var r=this,o=r.kind,i=r.value,a=r.error;return"N"===o?null==e?void 0:e(i):"E"===o?null==t?void 0:t(a):null==n?void 0:n()},e.prototype.accept=function(e,t,n){var r;return s.isFunction(null===(r=e)||void 0===r?void 0:r.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,s="N"===t?i.of(n):"E"===t?a.throwError(function(){return r}):"C"===t?o.EMPTY:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function l(e,t){var n,r,o,i=e,a=i.kind,s=i.value,u=i.error;if("string"!=typeof a)throw new TypeError('Invalid notification, missing "kind"');"N"===a?null===(n=t.next)||void 0===n||n.call(t,s):"E"===a?null===(r=t.error)||void 0===r||r.call(t,u):null===(o=t.complete)||void 0===o||o.call(t)}t.Notification=u,t.observeNotification=l},9052:(e,t)=>{function n(e,t,n){return{kind:e,value:t,error:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=n("C",void 0,void 0),t.errorNotification=function(e){return n("E",void 0,e)},t.nextNotification=function(e){return n("N",e,void 0)},t.createNotification=n},4662:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var r=n(5),o=n(8014),i=n(3327),a=n(2706),s=n(3413),u=n(1018),l=n(9223),c=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var i,a=this,s=(i=e)&&i instanceof r.Subscriber||function(e){return e&&u.isFunction(e.next)&&u.isFunction(e.error)&&u.isFunction(e.complete)}(i)&&o.isSubscription(i)?e:new r.SafeSubscriber(e,t,n);return l.errorContext(function(){var e=a,t=e.operator,n=e.source;s.add(t?t.call(s,n):n?a._subscribe(s):a._trySubscribe(s))}),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=f(t))(function(t,o){var i=new r.SafeSubscriber({next:function(t){try{e(t)}catch(e){o(e),i.unsubscribe()}},error:o,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var r=n(9568),o=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=r.dateTimestampProvider.now,e}();t.Scheduler=o},2483:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=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.AnonymousSubject=t.Subject=void 0;var a=n(4662),s=n(8014),u=n(9686),l=n(7479),c=n(9223),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype.lift=function(e){var t=new h(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new u.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;c.errorContext(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=i(t.currentObservers),a=o.next();!a.done;a=o.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;c.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;c.errorContext(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,o=n.isStopped,i=n.observers;return r||o?s.EMPTY_SUBSCRIPTION:(this.currentObservers=null,i.push(e),new s.Subscription(function(){t.currentObservers=null,l.arrRemove(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,o=t.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new a.Observable;return e.source=this,e},t.create=function(e,t){return new h(e,t)},t}(a.Observable);t.Subject=f;var h=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return o(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:s.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=h},5:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var i=n(1018),a=n(8014),s=n(3413),u=n(7315),l=n(1342),c=n(9052),f=n(9155),h=n(9223),d=function(e){function n(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,a.isSubscription(n)&&n.add(r)):r.destination=t.EMPTY_OBSERVER,r}return o(n,e),n.create=function(e,t,n){return new y(e,t,n)},n.prototype.next=function(e){this.isStopped?b(c.nextNotification(e),this):this._next(e)},n.prototype.error=function(e){this.isStopped?b(c.errorNotification(e),this):(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped?b(c.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(a.Subscription);t.Subscriber=d;var p=Function.prototype.bind;function v(e,t){return p.call(e,t)}var g=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){m(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){m(e)}else m(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){m(e)}},e}(),y=function(e){function t(t,n,r){var o,a,u=e.call(this)||this;return i.isFunction(t)||!t?o={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:u&&s.config.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},o={next:t.next&&v(t.next,a),error:t.error&&v(t.error,a),complete:t.complete&&v(t.complete,a)}):o=t,u.destination=new g(o),u}return o(t,e),t}(d);function m(e){s.config.useDeprecatedSynchronousErrorHandling?h.captureError(e):u.reportUnhandledError(e)}function b(e,t){var n=s.config.onStoppedNotification;n&&f.timeoutProvider.setTimeout(function(){return n(e,t)})}t.SafeSubscriber=y,t.EMPTY_OBSERVER={closed:!0,next:l.noop,error:function(e){throw e},complete:l.noop}},8014:function(e,t,n){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.")},o=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(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},9060:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var r=n(2823),o=n(5);t.firstValueFrom=function(e,t){var n="object"==typeof t;return new Promise(function(i,a){var s=new o.SafeSubscriber({next:function(e){i(e),s.unsubscribe()},error:a,complete:function(){n?i(t.defaultValue):a(new r.EmptyError)}});e.subscribe(s)})}},6894:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var r=n(2823);t.lastValueFrom=function(e,t){var n="object"==typeof t;return new Promise(function(o,i){var a,s=!1;e.subscribe({next:function(e){a=e,s=!0},error:i,complete:function(){s?o(a):n?o(t.defaultValue):i(new r.EmptyError)}})})}},8918:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var i=n(4662),a=n(8014),s=n(7561),u=n(3111),l=n(7843),c=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,l.hasLift(t)&&(r.lift=t.lift),r}return o(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new a.Subscription;var n=this.getSubject();t.add(this.source.subscribe(u.createOperatorSubscriber(n,void 0,function(){e._teardown(),n.complete()},function(t){e._teardown(),n.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=a.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return s.refCount()(this)},t}(i.Observable);t.ConnectableObservable=c},2713:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var r=n(1439);t.bindCallback=function(e,t,n){return r.bindCallbackInternals(!1,e,t,n)}},1439:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var r=n(1439);t.bindNodeCallback=function(e,t,n){return r.bindCallbackInternals(!0,e,t,n)}},3247:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var r=n(4662),o=n(7360),i=n(4917),a=n(6640),s=n(1251),u=n(1107),l=n(6013),c=n(3111),f=n(7110);function h(e,t,n){return void 0===n&&(n=a.identity),function(r){d(t,function(){for(var o=e.length,a=new Array(o),s=o,u=o,l=function(o){d(t,function(){var l=i.from(e[o],t),f=!1;l.subscribe(c.createOperatorSubscriber(r,function(e){a[o]=e,f||(f=!0,u--),u||r.next(n(a.slice()))},function(){--s||r.complete()}))},r)},f=0;f{Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var r=n(8158),o=n(1107),i=n(4917);t.concat=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var r=n(2483),o=n(4662),i=n(9353),a={connector:function(){return new r.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=a);var n=null,r=t.connector,s=t.resetOnDisconnect,u=void 0===s||s,l=r(),c=new o.Observable(function(e){return l.subscribe(e)});return c.connect=function(){return n&&!n.closed||(n=i.defer(function(){return e}).subscribe(l),u&&n.add(function(){return l=r()})),n},c}},9353:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var r=n(4662),o=n(9445);t.defer=function(e){return new r.Observable(function(t){o.innerFrom(e()).subscribe(t)})}},3110:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var r=n(4662),o=n(4746),i=n(9507);function a(e){return new r.Observable(function(t){var n=e||o.performanceTimestampProvider,r=n.now(),a=0,s=function(){t.closed||(a=i.animationFrameProvider.requestAnimationFrame(function(o){a=0;var i=n.now();t.next({timestamp:e?i:o,elapsed:i-r}),s()}))};return s(),function(){a&&i.animationFrameProvider.cancelAnimationFrame(a)}})}t.animationFrames=function(e){return e?a(e):s};var s=a()},8616:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var r=n(4662);t.EMPTY=new r.Observable(function(e){return e.complete()}),t.empty=function(e){return e?function(e){return new r.Observable(function(t){return e.schedule(function(){return t.complete()})})}(e):t.EMPTY}},9105:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var r=n(4662),o=n(7360),i=n(9445),a=n(1107),s=n(3111),u=n(1251),l=n(6013);t.forkJoin=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var r=n(1656),o=n(9445);t.from=function(e,t){return t?r.scheduled(e,t):o.innerFrom(e)}},5337:function(e,t,n){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(e){o={error:e}}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.fromEvent=void 0;var o=n(9445),i=n(4662),a=n(983),s=n(8046),u=n(1018),l=n(1251),c=["addListener","removeListener"],f=["addEventListener","removeEventListener"],h=["on","off"];function d(e,t){return function(n){return function(r){return e[n](t,r)}}}t.fromEvent=function e(t,n,p,v){if(u.isFunction(p)&&(v=p,p=void 0),v)return e(t,n,p).pipe(l.mapOneOrManyArgs(v));var g=r(function(e){return u.isFunction(e.addEventListener)&&u.isFunction(e.removeEventListener)}(t)?f.map(function(e){return function(r){return t[e](n,r,p)}}):function(e){return u.isFunction(e.addListener)&&u.isFunction(e.removeListener)}(t)?c.map(d(t,n)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?h.map(d(t,n)):[],2),y=g[0],m=g[1];if(!y&&s.isArrayLike(t))return a.mergeMap(function(t){return e(t,n,p)})(o.innerFrom(t));if(!y)throw new TypeError("Invalid event target");return new i.Observable(function(e){var t=function(){for(var t=[],n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var r=n(4662),o=n(1018),i=n(1251);t.fromEventPattern=function e(t,n,a){return a?e(t,n).pipe(i.mapOneOrManyArgs(a)):new r.Observable(function(e){var r=function(){for(var t=[],n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var r=n(4662);t.fromSubscribable=function(e){return new r.Observable(function(t){return e.subscribe(t)})}},7610:function(e,t,n){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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var r=n(9353);t.iif=function(e,t,n){return r.defer(function(){return e()?t:n})}},9445:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var s=n(8046),u=n(7629),l=n(4662),c=n(1116),f=n(1358),h=n(7614),d=n(6368),p=n(9137),v=n(1018),g=n(7315),y=n(3327);function m(e){return new l.Observable(function(t){var n=e[y.observable]();if(v.isFunction(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function b(e){return new l.Observable(function(t){for(var n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var r=n(7961),o=n(4092);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=r.asyncScheduler),e<0&&(e=0),o.timer(e,e,t)}},2833:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var r=n(7302),o=n(9445),i=n(8616),a=n(1107),s=n(4917);t.merge=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var r=n(4662),o=n(1342);t.NEVER=new r.Observable(o.noop),t.never=function(){return t.NEVER}},1004:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var r=n(1107),o=n(4917);t.of=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var r=n(4662),o=n(8535),i=n(3111),a=n(1342),s=n(9445);t.onErrorResumeNext=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var r=n(4917);t.pairs=function(e,t){return r.from(Object.entries(e),t)}},1699:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var r=n(245),o=n(783),i=n(9445);t.partition=function(e,t,n){return[o.filter(t,n)(i.innerFrom(e)),o.filter(r.not(t,n))(i.innerFrom(e))]}},5584:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var r=n(4662),o=n(9445),i=n(8535),a=n(3111);function s(e){return function(t){for(var n=[],r=function(r){n.push(o.innerFrom(e[r]).subscribe(a.createOperatorSubscriber(t,function(e){if(n){for(var o=0;o{Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var r=n(4662),o=n(8616);t.range=function(e,t,n){if(null==t&&(t=e,e=0),t<=0)return o.EMPTY;var i=t+e;return new r.Observable(n?function(t){var r=e;return n.schedule(function(){r{Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var r=n(4662),o=n(1018);t.throwError=function(e,t){var n=o.isFunction(e)?e:function(){return e},i=function(e){return e.error(n())};return new r.Observable(t?function(e){return t.schedule(i,0,e)}:i)}},4092:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var r=n(4662),o=n(7961),i=n(8613),a=n(1074);t.timer=function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=o.async);var s=-1;return null!=t&&(i.isScheduler(t)?n=t:s=t),new r.Observable(function(t){var r=a.isValidDate(e)?+e-n.now():e;r<0&&(r=0);var o=0;return n.schedule(function(){t.closed||(t.next(o++),0<=s?this.schedule(void 0,s):t.complete())},r)})}},7853:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var r=n(4662),o=n(9445),i=n(8616);t.using=function(e,t){return new r.Observable(function(n){var r=e(),a=t(r);return(a?o.innerFrom(a):i.EMPTY).subscribe(n),function(){r&&r.unsubscribe()}})}},7286:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var r=n(7843),o=n(9445),i=n(3111);t.audit=function(e){return r.operate(function(t,n){var r=!1,a=null,s=null,u=!1,l=function(){if(null==s||s.unsubscribe(),s=null,r){r=!1;var e=a;a=null,n.next(e)}u&&n.complete()},c=function(){s=null,u&&n.complete()};t.subscribe(i.createOperatorSubscriber(n,function(t){r=!0,a=t,s||o.innerFrom(e(t)).subscribe(s=i.createOperatorSubscriber(n,l,c))},function(){u=!0,(!r||!s||s.closed)&&n.complete()}))})}},3231:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var r=n(7961),o=n(3146),i=n(4092);t.auditTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),o.audit(function(){return i.timer(e,t)})}},8015:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var r=n(7843),o=n(1342),i=n(3111),a=n(9445);t.buffer=function(e){return r.operate(function(t,n){var r=[];return t.subscribe(i.createOperatorSubscriber(n,function(e){return r.push(e)},function(){n.next(r),n.complete()})),a.innerFrom(e).subscribe(i.createOperatorSubscriber(n,function(){var e=r;r=[],n.next(e)},o.noop)),function(){r=null}})}},5572:function(e,t,n){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.bufferCount=void 0;var o=n(7843),i=n(3111),a=n(7479);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,o.operate(function(n,o){var s=[],u=0;n.subscribe(i.createOperatorSubscriber(o,function(n){var i,l,c,f,h=null;u++%t==0&&s.push([]);try{for(var d=r(s),p=d.next();!p.done;p=d.next())(y=p.value).push(n),e<=y.length&&(h=null!=h?h:[]).push(y)}catch(e){i={error:e}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(i)throw i.error}}if(h)try{for(var v=r(h),g=v.next();!g.done;g=v.next()){var y=g.value;a.arrRemove(s,y),o.next(y)}}catch(e){c={error:e}}finally{try{g&&!g.done&&(f=v.return)&&f.call(v)}finally{if(c)throw c.error}}},function(){var e,t;try{for(var n=r(s),i=n.next();!i.done;i=n.next()){var a=i.value;o.next(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}o.complete()},void 0,function(){s=null}))})}},7210:function(e,t,n){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.bufferTime=void 0;var o=n(8014),i=n(7843),a=n(3111),s=n(7479),u=n(7961),l=n(1107),c=n(7110);t.bufferTime=function(e){for(var t,n,f=[],h=1;h=0?c.executeSchedule(n,d,f,p,!0):u=!0,f();var h=a.createOperatorSubscriber(n,function(e){var t,n,o=i.slice();try{for(var a=r(o),s=a.next();!s.done;s=a.next()){var u=s.value,c=u.buffer;c.push(e),v<=c.length&&l(u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},function(){for(;null==i?void 0:i.length;)n.next(i.shift().buffer);null==h||h.unsubscribe(),n.complete(),n.unsubscribe()},void 0,function(){return i=null});t.subscribe(h)})}},8995:function(e,t,n){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.bufferToggle=void 0;var o=n(8014),i=n(7843),a=n(9445),s=n(3111),u=n(1342),l=n(7479);t.bufferToggle=function(e,t){return i.operate(function(n,i){var c=[];a.innerFrom(e).subscribe(s.createOperatorSubscriber(i,function(e){var n=[];c.push(n);var r=new o.Subscription;r.add(a.innerFrom(t(e)).subscribe(s.createOperatorSubscriber(i,function(){l.arrRemove(c,n),i.next(n),r.unsubscribe()},u.noop)))},u.noop)),n.subscribe(s.createOperatorSubscriber(i,function(e){var t,n;try{for(var o=r(c),i=o.next();!i.done;i=o.next())i.value.push(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},function(){for(;c.length>0;)i.next(c.shift());i.complete()}))})}},8831:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var r=n(7843),o=n(1342),i=n(3111),a=n(9445);t.bufferWhen=function(e){return r.operate(function(t,n){var r=null,s=null,u=function(){null==s||s.unsubscribe();var t=r;r=[],t&&n.next(t),a.innerFrom(e()).subscribe(s=i.createOperatorSubscriber(n,u,o.noop))};u(),t.subscribe(i.createOperatorSubscriber(n,function(e){return null==r?void 0:r.push(e)},function(){r&&n.next(r),n.complete()},void 0,function(){return r=s=null}))})}},8118:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var r=n(9445),o=n(3111),i=n(7843);t.catchError=function e(t){return i.operate(function(n,i){var a,s=null,u=!1;s=n.subscribe(o.createOperatorSubscriber(i,void 0,void 0,function(o){a=r.innerFrom(t(o,e(t)(n))),s?(s.unsubscribe(),s=null,a.subscribe(i)):u=!0})),u&&(s.unsubscribe(),s=null,a.subscribe(i))})}},6625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var r=n(6728);t.combineAll=r.combineLatestAll},2551:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var r=n(3247),o=n(3638);t.combineLatestAll=function(e){return o.joinAllInternals(r.combineLatest,e)}},8239:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var r=n(7302);t.concatAll=function(){return r.mergeAll(1)}},9135:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var r=n(983),o=n(1018);t.concatMap=function(e,t){return o.isFunction(t)?r.mergeMap(e,t,1):r.mergeMap(e,1)}},9938:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var r=n(9135),o=n(1018);t.concatMapTo=function(e,t){return o.isFunction(t)?r.concatMap(function(){return e},t):r.concatMap(function(){return e})}},9669:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var r=n(2483),o=n(9445),i=n(7843),a=n(6824),s={connector:function(){return new r.Subject}};t.connect=function(e,t){void 0===t&&(t=s);var n=t.connector;return i.operate(function(t,r){var i=n();o.innerFrom(e(a.fromSubscribable(i))).subscribe(r),r.add(t.subscribe(i))})}},1038:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var r=n(9139);t.count=function(e){return r.reduce(function(t,n,r){return!e||e(n,r)?t+1:t},0)}},4461:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var r=n(7843),o=n(1342),i=n(3111),a=n(9445);t.debounce=function(e){return r.operate(function(t,n){var r=!1,s=null,u=null,l=function(){if(null==u||u.unsubscribe(),u=null,r){r=!1;var e=s;s=null,n.next(e)}};t.subscribe(i.createOperatorSubscriber(n,function(t){null==u||u.unsubscribe(),r=!0,s=t,u=i.createOperatorSubscriber(n,l,o.noop),a.innerFrom(e(t)).subscribe(u)},function(){l(),n.complete()},void 0,function(){s=u=null}))})}},8079:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var r=n(7961),o=n(7843),i=n(3111);t.debounceTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),o.operate(function(n,r){var o=null,a=null,s=null,u=function(){if(o){o.unsubscribe(),o=null;var e=a;a=null,r.next(e)}};function l(){var n=s+e,i=t.now();if(i{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var r=n(7843),o=n(3111);t.defaultIfEmpty=function(e){return r.operate(function(t,n){var r=!1;t.subscribe(o.createOperatorSubscriber(n,function(e){r=!0,n.next(e)},function(){r||n.next(e),n.complete()}))})}},914:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var r=n(7961),o=n(8766),i=n(4092);t.delay=function(e,t){void 0===t&&(t=r.asyncScheduler);var n=i.timer(e,t);return o.delayWhen(function(){return n})}},8766:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var r=n(3865),o=n(846),i=n(490),a=n(3218),s=n(983),u=n(9445);t.delayWhen=function e(t,n){return n?function(a){return r.concat(n.pipe(o.take(1),i.ignoreElements()),a.pipe(e(t)))}:s.mergeMap(function(e,n){return u.innerFrom(t(e,n)).pipe(o.take(1),a.mapTo(e))})}},7441:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var r=n(7800),o=n(7843),i=n(3111);t.dematerialize=function(){return o.operate(function(e,t){e.subscribe(i.createOperatorSubscriber(t,function(e){return r.observeNotification(e,t)}))})}},5365:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var r=n(7843),o=n(3111),i=n(1342),a=n(9445);t.distinct=function(e,t){return r.operate(function(n,r){var s=new Set;n.subscribe(o.createOperatorSubscriber(r,function(t){var n=e?e(t):t;s.has(n)||(s.add(n),r.next(t))})),t&&a.innerFrom(t).subscribe(o.createOperatorSubscriber(r,function(){return s.clear()},i.noop))})}},8937:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var r=n(6640),o=n(7843),i=n(3111);function a(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=r.identity),e=null!=e?e:a,o.operate(function(n,r){var o,a=!0;n.subscribe(i.createOperatorSubscriber(r,function(n){var i=t(n);!a&&e(o,i)||(a=!1,o=i,r.next(n))}))})}},9612:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var r=n(8937);t.distinctUntilKeyChanged=function(e,t){return r.distinctUntilChanged(function(n,r){return t?t(n[e],r[e]):n[e]===r[e]})}},4520:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var r=n(7057),o=n(783),i=n(4869),a=n(378),s=n(846);t.elementAt=function(e,t){if(e<0)throw new r.ArgumentOutOfRangeError;var n=arguments.length>=2;return function(u){return u.pipe(o.filter(function(t,n){return n===e}),s.take(1),n?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new r.ArgumentOutOfRangeError}))}}},1776:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var r=n(7843),o=n(3111);t.every=function(e,t){return r.operate(function(n,r){var i=0;n.subscribe(o.createOperatorSubscriber(r,function(o){e.call(t,o,i++,n)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})}},1551:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var r=n(2752);t.exhaust=r.exhaustAll},2752:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var r=n(4753),o=n(6640);t.exhaustAll=function(){return r.exhaustMap(o.identity)}},4753:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var r=n(5471),o=n(9445),i=n(7843),a=n(3111);t.exhaustMap=function e(t,n){return n?function(i){return i.pipe(e(function(e,i){return o.innerFrom(t(e,i)).pipe(r.map(function(t,r){return n(e,t,i,r)}))}))}:i.operate(function(e,n){var r=0,i=null,s=!1;e.subscribe(a.createOperatorSubscriber(n,function(e){i||(i=a.createOperatorSubscriber(n,void 0,function(){i=null,s&&n.complete()}),o.innerFrom(t(e,r++)).subscribe(i))},function(){s=!0,!i&&n.complete()}))})}},7661:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var r=n(7843),o=n(1983);t.expand=function(e,t,n){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,r.operate(function(r,i){return o.mergeInternals(r,i,e,t,void 0,!0,n)})}},783:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var r=n(7843),o=n(3111);t.filter=function(e,t){return r.operate(function(n,r){var i=0;n.subscribe(o.createOperatorSubscriber(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}},3555:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var r=n(7843);t.finalize=function(e){return r.operate(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}},7714:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var r=n(7843),o=n(3111);function i(e,t,n){var r="index"===n;return function(n,i){var a=0;n.subscribe(o.createOperatorSubscriber(i,function(o){var s=a++;e.call(t,o,s,n)&&(i.next(r?s:o),i.complete())},function(){i.next(r?-1:void 0),i.complete()}))}}t.find=function(e,t){return r.operate(i(e,t,"value"))},t.createFind=i},9756:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var r=n(7843),o=n(7714);t.findIndex=function(e,t){return r.operate(o.createFind(e,t,"index"))}},8275:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var r=n(2823),o=n(783),i=n(846),a=n(378),s=n(4869),u=n(6640);t.first=function(e,t){var n=arguments.length>=2;return function(l){return l.pipe(e?o.filter(function(t,n){return e(t,n,l)}):u.identity,i.take(1),n?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new r.EmptyError}))}}},6902:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var r=n(983);t.flatMap=r.mergeMap},7815:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var r=n(4662),o=n(9445),i=n(2483),a=n(7843),s=n(3111);t.groupBy=function(e,t,n,u){return a.operate(function(a,l){var c;t&&"function"!=typeof t?(n=t.duration,c=t.element,u=t.connector):c=t;var f=new Map,h=function(e){f.forEach(e),e(l)},d=function(e){return h(function(t){return t.error(e)})},p=0,v=!1,g=new s.OperatorSubscriber(l,function(t){try{var a=e(t),h=f.get(a);if(!h){f.set(a,h=u?u():new i.Subject);var y=(b=a,_=h,(w=new r.Observable(function(e){p++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--p&&v&&g.unsubscribe()}})).key=b,w);if(l.next(y),n){var m=s.createOperatorSubscriber(h,function(){h.complete(),null==m||m.unsubscribe()},void 0,void 0,function(){return f.delete(a)});g.add(o.innerFrom(n(y)).subscribe(m))}}h.next(c?c(t):t)}catch(e){d(e)}var b,_,w},function(){return h(function(e){return e.complete()})},d,function(){return f.clear()},function(){return v=!0,0===p});a.subscribe(g)})}},490:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var r=n(7843),o=n(3111),i=n(1342);t.ignoreElements=function(){return r.operate(function(e,t){e.subscribe(o.createOperatorSubscriber(t,i.noop))})}},9356:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var r=n(7843),o=n(3111);t.isEmpty=function(){return r.operate(function(e,t){e.subscribe(o.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}},3638:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var r=n(6640),o=n(1251),i=n(2706),a=n(983),s=n(2343);t.joinAllInternals=function(e,t){return i.pipe(s.toArray(),a.mergeMap(function(t){return e(t)}),t?o.mapOneOrManyArgs(t):r.identity)}},8669:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var r=n(2823),o=n(783),i=n(8330),a=n(4869),s=n(378),u=n(6640);t.last=function(e,t){var n=arguments.length>=2;return function(l){return l.pipe(e?o.filter(function(t,n){return e(t,n,l)}):u.identity,i.takeLast(1),n?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new r.EmptyError}))}}},5471:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var r=n(7843),o=n(3111);t.map=function(e,t){return r.operate(function(n,r){var i=0;n.subscribe(o.createOperatorSubscriber(r,function(n){r.next(e.call(t,n,i++))}))})}},3218:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var r=n(5471);t.mapTo=function(e){return r.map(function(){return e})}},2360:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var r=n(7800),o=n(7843),i=n(3111);t.materialize=function(){return o.operate(function(e,t){e.subscribe(i.createOperatorSubscriber(t,function(e){t.next(r.Notification.createNext(e))},function(){t.next(r.Notification.createComplete()),t.complete()},function(e){t.next(r.Notification.createError(e)),t.complete()}))})}},1415:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var r=n(9139),o=n(1018);t.max=function(e){return r.reduce(o.isFunction(e)?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}},361:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var r=n(983),o=n(6640);t.mergeAll=function(e){return void 0===e&&(e=1/0),r.mergeMap(o.identity,e)}},1983:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var r=n(9445),o=n(7110),i=n(3111);t.mergeInternals=function(e,t,n,a,s,u,l,c){var f=[],h=0,d=0,p=!1,v=function(){!p||f.length||h||t.complete()},g=function(e){return h{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var r=n(5471),o=n(9445),i=n(7843),a=n(1983),s=n(1018);t.mergeMap=function e(t,n,u){return void 0===u&&(u=1/0),s.isFunction(n)?e(function(e,i){return r.map(function(t,r){return n(e,t,i,r)})(o.innerFrom(t(e,i)))},u):("number"==typeof n&&(u=n),i.operate(function(e,n){return a.mergeInternals(e,n,t,u)}))}},6586:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var r=n(983),o=n(1018);t.mergeMapTo=function(e,t,n){return void 0===n&&(n=1/0),o.isFunction(t)?r.mergeMap(function(){return e},t,n):("number"==typeof t&&(n=t),r.mergeMap(function(){return e},n))}},4408:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var r=n(7843),o=n(1983);t.mergeScan=function(e,t,n){return void 0===n&&(n=1/0),r.operate(function(r,i){var a=t;return o.mergeInternals(r,i,function(t,n){return e(a,t,n)},n,function(e){a=e},!1,void 0,function(){return a=null})})}},8253:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var r=n(9139),o=n(1018);t.min=function(e){return r.reduce(o.isFunction(e)?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e{Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var r=n(8918),o=n(1018),i=n(1483);t.multicast=function(e,t){var n=o.isFunction(e)?e:function(){return e};return o.isFunction(t)?i.connect(t,{connector:n}):function(e){return new r.ConnectableObservable(e,n)}}},5184:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var r=n(7110),o=n(7843),i=n(3111);t.observeOn=function(e,t){return void 0===t&&(t=0),o.operate(function(n,o){n.subscribe(i.createOperatorSubscriber(o,function(n){return r.executeSchedule(o,e,function(){return o.next(n)},t)},function(){return r.executeSchedule(o,e,function(){return o.complete()},t)},function(n){return r.executeSchedule(o,e,function(){return o.error(n)},t)}))})}},1226:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var r=n(7843),o=n(3111);t.pairwise=function(){return r.operate(function(e,t){var n,r=!1;e.subscribe(o.createOperatorSubscriber(t,function(e){var o=n;n=e,r&&t.next([o,e]),r=!0}))})}},2171:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var r=n(245),o=n(783);t.partition=function(e,t){return function(n){return[o.filter(e,t)(n),o.filter(r.not(e,t))(n)]}}},4912:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var r=n(5471);t.pluck=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var r=n(2483),o=n(9247),i=n(1483);t.publish=function(e){return e?function(t){return i.connect(e)(t)}:function(e){return o.multicast(new r.Subject)(e)}}},7220:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var r=n(1637),o=n(8918);t.publishBehavior=function(e){return function(t){var n=new r.BehaviorSubject(e);return new o.ConnectableObservable(t,function(){return n})}}},6106:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var r=n(95),o=n(8918);t.publishLast=function(){return function(e){var t=new r.AsyncSubject;return new o.ConnectableObservable(e,function(){return t})}}},8157:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var r=n(1242),o=n(9247),i=n(1018);t.publishReplay=function(e,t,n,a){n&&!i.isFunction(n)&&(a=n);var s=i.isFunction(n)?n:void 0;return function(n){return o.multicast(new r.ReplaySubject(e,t,a),s)(n)}}},4440:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var r=n(6384),o=n(7843);t.reduce=function(e,t){return o.operate(r.scanInternals(e,t,arguments.length>=2,!1,!0))}},7561:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var r=n(7843),o=n(3111);t.refCount=function(){return r.operate(function(e,t){var n=null;e._refCount++;var r=o.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount)n=null;else{var r=e._connection,o=n;n=null,!r||o&&r!==o||r.unsubscribe(),t.unsubscribe()}});e.subscribe(r),r.closed||(n=e.connect())})}},8522:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var r=n(8616),o=n(7843),i=n(3111),a=n(9445),s=n(4092);t.repeat=function(e){var t,n,u=1/0;return null!=e&&("object"==typeof e?(t=e.count,u=void 0===t?1/0:t,n=e.delay):u=e),u<=0?function(){return r.EMPTY}:o.operate(function(e,t){var r,o=0,l=function(){if(null==r||r.unsubscribe(),r=null,null!=n){var e="number"==typeof n?s.timer(n):a.innerFrom(n(o)),u=i.createOperatorSubscriber(t,function(){u.unsubscribe(),c()});e.subscribe(u)}else c()},c=function(){var n=!1;r=e.subscribe(i.createOperatorSubscriber(t,void 0,function(){++o{Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var r=n(9445),o=n(2483),i=n(7843),a=n(3111);t.repeatWhen=function(e){return i.operate(function(t,n){var i,s,u=!1,l=!1,c=!1,f=function(){return c&&l&&(n.complete(),!0)},h=function(){c=!1,i=t.subscribe(a.createOperatorSubscriber(n,void 0,function(){c=!0,!f()&&(s||(s=new o.Subject,r.innerFrom(e(s)).subscribe(a.createOperatorSubscriber(n,function(){i?h():u=!0},function(){l=!0,f()}))),s).next()})),u&&(i.unsubscribe(),i=null,u=!1,h())};h()})}},7835:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var r=n(7843),o=n(3111),i=n(6640),a=n(4092),s=n(9445);t.retry=function(e){var t;void 0===e&&(e=1/0);var n=(t=e&&"object"==typeof e?e:{count:e}).count,u=void 0===n?1/0:n,l=t.delay,c=t.resetOnSuccess,f=void 0!==c&&c;return u<=0?i.identity:r.operate(function(e,t){var n,r=0,i=function(){var c=!1;n=e.subscribe(o.createOperatorSubscriber(t,function(e){f&&(r=0),t.next(e)},void 0,function(e){if(r++{Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var r=n(9445),o=n(2483),i=n(7843),a=n(3111);t.retryWhen=function(e){return i.operate(function(t,n){var i,s,u=!1,l=function(){i=t.subscribe(a.createOperatorSubscriber(n,void 0,void 0,function(t){s||(s=new o.Subject,r.innerFrom(e(s)).subscribe(a.createOperatorSubscriber(n,function(){return i?l():u=!0}))),s&&s.next(t)})),u&&(i.unsubscribe(),i=null,u=!1,l())};l()})}},1731:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var r=n(9445),o=n(7843),i=n(1342),a=n(3111);t.sample=function(e){return o.operate(function(t,n){var o=!1,s=null;t.subscribe(a.createOperatorSubscriber(n,function(e){o=!0,s=e})),r.innerFrom(e).subscribe(a.createOperatorSubscriber(n,function(){if(o){o=!1;var e=s;s=null,n.next(e)}},i.noop))})}},6086:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var r=n(7961),o=n(1731),i=n(6472);t.sampleTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),o.sample(i.interval(e,t))}},8624:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var r=n(7843),o=n(6384);t.scan=function(e,t){return r.operate(o.scanInternals(e,t,arguments.length>=2,!0))}},6384:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var r=n(3111);t.scanInternals=function(e,t,n,o,i){return function(a,s){var u=n,l=t,c=0;a.subscribe(r.createOperatorSubscriber(s,function(t){var n=c++;l=u?e(l,t,n):(u=!0,t),o&&s.next(l)},i&&function(){u&&s.next(l),s.complete()}))}}},582:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var r=n(7843),o=n(3111),i=n(9445);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),r.operate(function(n,r){var a={buffer:[],complete:!1},s={buffer:[],complete:!1},u=function(e){r.next(e),r.complete()},l=function(e,n){var i=o.createOperatorSubscriber(r,function(r){var o=n.buffer,i=n.complete;0===o.length?i?u(!1):e.buffer.push(r):!t(r,o.shift())&&u(!1)},function(){e.complete=!0;var t=n.complete,r=n.buffer;t&&u(0===r.length),null==i||i.unsubscribe()});return i};n.subscribe(l(a,s)),i.innerFrom(e).subscribe(l(s,a))})}},8977:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0&&(t=new s.SafeSubscriber({next:function(e){return m.next(e)},error:function(e){p=!0,v(),r=l(g,o,e),m.error(e)},complete:function(){h=!0,v(),r=l(g,f),m.complete()}}),i.innerFrom(e).subscribe(t))})(e)}}},3133:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var r=n(1242),o=n(8977);t.shareReplay=function(e,t,n){var i,a,s,u,l=!1;return e&&"object"==typeof e?(i=e.bufferSize,u=void 0===i?1/0:i,a=e.windowTime,t=void 0===a?1/0:a,l=void 0!==(s=e.refCount)&&s,n=e.scheduler):u=null!=e?e:1/0,o.share({connector:function(){return new r.ReplaySubject(u,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})}},3001:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var r=n(2823),o=n(1505),i=n(1759),a=n(7843),s=n(3111);t.single=function(e){return a.operate(function(t,n){var a,u=!1,l=!1,c=0;t.subscribe(s.createOperatorSubscriber(n,function(r){l=!0,e&&!e(r,c++,t)||(u&&n.error(new o.SequenceError("Too many matching values")),u=!0,a=r)},function(){u?(n.next(a),n.complete()):n.error(l?new i.NotFoundError("No matching values"):new r.EmptyError)}))})}},3982:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var r=n(783);t.skip=function(e){return r.filter(function(t,n){return e<=n})}},9098:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var r=n(6640),o=n(7843),i=n(3111);t.skipLast=function(e){return e<=0?r.identity:o.operate(function(t,n){var r=new Array(e),o=0;return t.subscribe(i.createOperatorSubscriber(n,function(t){var i=o++;if(i{Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var r=n(7843),o=n(3111),i=n(9445),a=n(1342);t.skipUntil=function(e){return r.operate(function(t,n){var r=!1,s=o.createOperatorSubscriber(n,function(){null==s||s.unsubscribe(),r=!0},a.noop);i.innerFrom(e).subscribe(s),t.subscribe(o.createOperatorSubscriber(n,function(e){return r&&n.next(e)}))})}},4721:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var r=n(7843),o=n(3111);t.skipWhile=function(e){return r.operate(function(t,n){var r=!1,i=0;t.subscribe(o.createOperatorSubscriber(n,function(t){return(r||(r=!e(t,i++)))&&n.next(t)}))})}},269:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var r=n(3865),o=n(1107),i=n(7843);t.startWith=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var r=n(7843);t.subscribeOn=function(e,t){return void 0===t&&(t=0),r.operate(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}},8774:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var r=n(3879),o=n(6640);t.switchAll=function(){return r.switchMap(o.identity)}},3879:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var r=n(9445),o=n(7843),i=n(3111);t.switchMap=function(e,t){return o.operate(function(n,o){var a=null,s=0,u=!1,l=function(){return u&&!a&&o.complete()};n.subscribe(i.createOperatorSubscriber(o,function(n){null==a||a.unsubscribe();var u=0,c=s++;r.innerFrom(e(n,c)).subscribe(a=i.createOperatorSubscriber(o,function(e){return o.next(t?t(n,e,c,u++):e)},function(){a=null,l()}))},function(){u=!0,l()}))})}},3274:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var r=n(3879),o=n(1018);t.switchMapTo=function(e,t){return o.isFunction(t)?r.switchMap(function(){return e},t):r.switchMap(function(){return e})}},8712:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var r=n(3879),o=n(7843);t.switchScan=function(e,t){return o.operate(function(n,o){var i=t;return r.switchMap(function(t,n){return e(i,t,n)},function(e,t){return i=t,t})(n).subscribe(o),function(){i=null}})}},846:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var r=n(8616),o=n(7843),i=n(3111);t.take=function(e){return e<=0?function(){return r.EMPTY}:o.operate(function(t,n){var r=0;t.subscribe(i.createOperatorSubscriber(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}},8330:function(e,t,n){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.takeLast=void 0;var o=n(8616),i=n(7843),a=n(3111);t.takeLast=function(e){return e<=0?function(){return o.EMPTY}:i.operate(function(t,n){var o=[];t.subscribe(a.createOperatorSubscriber(n,function(t){o.push(t),e{Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var r=n(7843),o=n(3111),i=n(9445),a=n(1342);t.takeUntil=function(e){return r.operate(function(t,n){i.innerFrom(e).subscribe(o.createOperatorSubscriber(n,function(){return n.complete()},a.noop)),!n.closed&&t.subscribe(n)})}},2129:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var r=n(7843),o=n(3111);t.takeWhile=function(e,t){return void 0===t&&(t=!1),r.operate(function(n,r){var i=0;n.subscribe(o.createOperatorSubscriber(r,function(n){var o=e(n,i++);(o||t)&&r.next(n),!o&&r.complete()}))})}},3964:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var r=n(1018),o=n(7843),i=n(3111),a=n(6640);t.tap=function(e,t,n){var s=r.isFunction(e)||t||n?{next:e,error:t,complete:n}:e;return s?o.operate(function(e,t){var n;null===(n=s.subscribe)||void 0===n||n.call(s);var r=!0;e.subscribe(i.createOperatorSubscriber(t,function(e){var n;null===(n=s.next)||void 0===n||n.call(s,e),t.next(e)},function(){var e;r=!1,null===(e=s.complete)||void 0===e||e.call(s),t.complete()},function(e){var n;r=!1,null===(n=s.error)||void 0===n||n.call(s,e),t.error(e)},function(){var e,t;r&&(null===(e=s.unsubscribe)||void 0===e||e.call(s)),null===(t=s.finalize)||void 0===t||t.call(s)}))}):a.identity}},8941:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=void 0;var r=n(7843),o=n(3111),i=n(9445);t.throttle=function(e,t){return r.operate(function(n,r){var a=null!=t?t:{},s=a.leading,u=void 0===s||s,l=a.trailing,c=void 0!==l&&l,f=!1,h=null,d=null,p=!1,v=function(){null==d||d.unsubscribe(),d=null,c&&(m(),p&&r.complete())},g=function(){d=null,p&&r.complete()},y=function(t){return d=i.innerFrom(e(t)).subscribe(o.createOperatorSubscriber(r,v,g))},m=function(){if(f){f=!1;var e=h;h=null,r.next(e),!p&&y(e)}};n.subscribe(o.createOperatorSubscriber(r,function(e){f=!0,h=e,(!d||d.closed)&&(u?m():y(e))},function(){p=!0,(!(c&&f&&d)||d.closed)&&r.complete()}))})}},7640:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var r=n(7961),o=n(8941),i=n(4092);t.throttleTime=function(e,t,n){void 0===t&&(t=r.asyncScheduler);var a=i.timer(e,t);return o.throttle(function(){return a},n)}},4869:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var r=n(2823),o=n(7843),i=n(3111);function a(){return new r.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=a),o.operate(function(t,n){var r=!1;t.subscribe(i.createOperatorSubscriber(n,function(e){r=!0,n.next(e)},function(){return r?n.complete():n.error(e())}))})}},489:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var r=n(7961),o=n(7843),i=n(3111);t.timeInterval=function(e){return void 0===e&&(e=r.asyncScheduler),o.operate(function(t,n){var r=e.now();t.subscribe(i.createOperatorSubscriber(n,function(t){var o=e.now(),i=o-r;r=o,n.next(new a(t,i))}))})};var a=function(e,t){this.value=e,this.interval=t};t.TimeInterval=a},1554:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var r=n(7961),o=n(1074),i=n(7843),a=n(9445),s=n(5568),u=n(3111),l=n(7110);function c(e){throw new t.TimeoutError(e)}t.TimeoutError=s.createErrorClass(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}}),t.timeout=function(e,t){var n=o.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,s=n.first,f=n.each,h=n.with,d=void 0===h?c:h,p=n.scheduler,v=void 0===p?null!=t?t:r.asyncScheduler:p,g=n.meta,y=void 0===g?null:g;if(null==s&&null==f)throw new TypeError("No timeout provided.");return i.operate(function(e,t){var n,r,o=null,i=0,c=function(e){r=l.executeSchedule(t,v,function(){try{n.unsubscribe(),a.innerFrom(d({meta:y,lastValue:o,seen:i})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe(u.createOperatorSubscriber(t,function(e){null==r||r.unsubscribe(),i++,t.next(o=e),f>0&&c(f)},void 0,void 0,function(){(null==r?void 0:r.closed)||null==r||r.unsubscribe(),o=null})),!i&&c(null!=s?"number"==typeof s?s:+s-v.now():f)})}},4862:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var r=n(7961),o=n(1074),i=n(1554);t.timeoutWith=function(e,t,n){var a,s,u;if(n=null!=n?n:r.async,o.isValidDate(e)?a=e:"number"==typeof e&&(s=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==a&&null==s)throw new TypeError("No timeout provided.");return i.timeout({first:a,each:s,scheduler:n,with:u})}},6505:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var r=n(9568),o=n(5471);t.timestamp=function(e){return void 0===e&&(e=r.dateTimestampProvider),o.map(function(t){return{value:t,timestamp:e.now()}})}},2343:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var r=n(9139),o=n(7843),i=function(e,t){return e.push(t),e};t.toArray=function(){return o.operate(function(e,t){r.reduce(i,[])(e).subscribe(t)})}},5477:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var r=n(2483),o=n(7843),i=n(3111),a=n(1342),s=n(9445);t.window=function(e){return o.operate(function(t,n){var o=new r.Subject;n.next(o.asObservable());var u=function(e){o.error(e),n.error(e)};return t.subscribe(i.createOperatorSubscriber(n,function(e){return null==o?void 0:o.next(e)},function(){o.complete(),n.complete()},u)),s.innerFrom(e).subscribe(i.createOperatorSubscriber(n,function(){o.complete(),n.next(o=new r.Subject)},a.noop,u)),function(){null==o||o.unsubscribe(),o=null}})}},6746:function(e,t,n){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.windowCount=void 0;var o=n(2483),i=n(7843),a=n(3111);t.windowCount=function(e,t){void 0===t&&(t=0);var n=t>0?t:e;return i.operate(function(t,i){var s=[new o.Subject],u=0;i.next(s[0].asObservable()),t.subscribe(a.createOperatorSubscriber(i,function(t){var a,l;try{for(var c=r(s),f=c.next();!f.done;f=c.next())f.value.next(t)}catch(e){a={error:e}}finally{try{f&&!f.done&&(l=c.return)&&l.call(c)}finally{if(a)throw a.error}}var h=u-e+1;if(h>=0&&h%n==0&&s.shift().complete(),++u%n==0){var d=new o.Subject;s.push(d),i.next(d.asObservable())}},function(){for(;s.length>0;)s.shift().complete();i.complete()},function(e){for(;s.length>0;)s.shift().error(e);i.error(e)},function(){s=null}))})}},8208:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var r=n(2483),o=n(7961),i=n(8014),a=n(7843),s=n(3111),u=n(7479),l=n(1107),c=n(7110);t.windowTime=function(e){for(var t,n,f=[],h=1;h=0?c.executeSchedule(n,d,f,p,!0):a=!0,f();var h=function(e){return o.slice().forEach(e)},g=function(e){h(function(t){var n=t.window;return e(n)}),e(n),n.unsubscribe()};return t.subscribe(s.createOperatorSubscriber(n,function(e){h(function(t){t.window.next(e),v<=++t.seen&&l(t)})},function(){return g(function(e){return e.complete()})},function(e){return g(function(t){return t.error(e)})})),function(){o=null}})}},6637:function(e,t,n){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.windowToggle=void 0;var o=n(2483),i=n(8014),a=n(7843),s=n(9445),u=n(3111),l=n(1342),c=n(7479);t.windowToggle=function(e,t){return a.operate(function(n,a){var f=[],h=function(e){for(;0{Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var r=n(2483),o=n(7843),i=n(3111),a=n(9445);t.windowWhen=function(e){return o.operate(function(t,n){var o,s,u=function(e){o.error(e),n.error(e)},l=function(){var t;null==s||s.unsubscribe(),null==o||o.complete(),o=new r.Subject,n.next(o.asObservable());try{t=a.innerFrom(e())}catch(e){return void u(e)}t.subscribe(s=i.createOperatorSubscriber(n,l,l,u))};l(),t.subscribe(i.createOperatorSubscriber(n,function(e){return o.next(e)},function(){o.complete(),n.complete()},u,function(){null==s||s.unsubscribe(),o=null}))})}},5442:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var r=n(7286),o=n(3638);t.zipAll=function(e){return o.joinAllInternals(r.zip,e)}},8538:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var r=n(4662);t.scheduleArray=function(e,t){return new r.Observable(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}},854:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var r=n(4662),o=n(7110);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.Observable(function(n){o.executeSchedule(n,t,function(){var r=e[Symbol.asyncIterator]();o.executeSchedule(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}},8808:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var r=n(4662),o=n(1964),i=n(1018),a=n(7110);t.scheduleIterable=function(e,t){return new r.Observable(function(n){var r;return a.executeSchedule(n,t,function(){r=e[o.iterator](),a.executeSchedule(n,t,function(){var e,t,o;try{t=(e=r.next()).value,o=e.done}catch(e){return void n.error(e)}o?n.complete():n.next(t)},0,!0)}),function(){return i.isFunction(null==r?void 0:r.return)&&r.return()}})}},9567:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var r=n(9445),o=n(5184),i=n(8960);t.scheduleObservable=function(e,t){return r.innerFrom(e).pipe(i.subscribeOn(t),o.observeOn(t))}},9589:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var r=n(9445),o=n(5184),i=n(8960);t.schedulePromise=function(e,t){return r.innerFrom(e).pipe(i.subscribeOn(t),o.observeOn(t))}},4953:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var r=n(854),o=n(9137);t.scheduleReadableStreamLike=function(e,t){return r.scheduleAsyncIterable(o.readableStreamLikeToAsyncGenerator(e),t)}},1656:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var r=n(9567),o=n(9589),i=n(6985),a=n(8808),s=n(854),u=n(1116),l=n(7629),c=n(8046),f=n(6368),h=n(1358),d=n(7614),p=n(9137),v=n(4953);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return r.scheduleObservable(e,t);if(c.isArrayLike(e))return i.scheduleArray(e,t);if(l.isPromise(e))return o.schedulePromise(e,t);if(h.isAsyncIterable(e))return s.scheduleAsyncIterable(e,t);if(f.isIterable(e))return a.scheduleIterable(e,t);if(p.isReadableStreamLike(e))return v.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},4671:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var i=function(e){function t(t,n){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(8014).Subscription);t.Action=i},2628:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var i=n(5267),a=n(9507),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=a.animationFrameProvider.requestAnimationFrame(function(){return t.flush(void 0)})))},t.prototype.recycleAsyncId=function(t,n,r){var o;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;null!=n&&(null===(o=i[i.length-1])||void 0===o?void 0:o.id)!==n&&(a.animationFrameProvider.cancelAnimationFrame(n),t._scheduled=void 0)},t}(i.AsyncAction);t.AnimationFrameAction=s},3229:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(n(5648).AsyncScheduler);t.AnimationFrameScheduler=i},5006:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var i=n(5267),a=n(6293),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=a.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){var o;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;null!=n&&(null===(o=i[i.length-1])||void 0===o?void 0:o.id)!==n&&(a.immediateProvider.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(i.AsyncAction);t.AsapAction=s},827:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(n(5648).AsyncScheduler);t.AsapScheduler=i},5267:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var i=n(4671),a=n(5649),s=n(7479),u=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return o(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(o,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),a.intervalProvider.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&a.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,s.arrRemove(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(i.Action);t.AsyncAction=u},5648:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var i=n(8986),a=function(e){function t(t,n){void 0===n&&(n=i.Scheduler.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return o(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(i.Scheduler);t.AsyncScheduler=a},4212:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(n(5267).AsyncAction);t.QueueAction=i},1293:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(5648).AsyncScheduler);t.QueueScheduler=i},182:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var i=n(5267),a=n(8014),s=function(e){function t(t,n){void 0===t&&(t=u),void 0===n&&(n=1/0);var r=e.call(this,t,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return o(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,r=this.maxFrames;(t=n[0])&&t.delay<=r&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(n(5648).AsyncScheduler);t.VirtualTimeScheduler=s;var u=function(e){function t(t,n,r){void 0===r&&(r=t.index+=1);var o=e.call(this,t,n)||this;return o.scheduler=t,o.work=n,o.index=r,o.active=!0,o.index=t.index=r,o}return o(t,e),t.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var o=new t(this.scheduler,this.work);return this.add(o),o.schedule(n,r)}return a.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,n,r){void 0===r&&(r=0),this.delay=e.frame+r;var o=e.actions;return o.push(this),o.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,n){void 0===n&&(n=0)},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(i.AsyncAction);t.VirtualAction=u},3862:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var r=n(2628),o=n(3229);t.animationFrameScheduler=new o.AnimationFrameScheduler(r.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},9507:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var r=n(5006),o=n(827);t.asapScheduler=new o.AsapScheduler(r.AsapAction),t.asap=t.asapScheduler},7961:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var r=n(5267),o=n(5648);t.asyncScheduler=new o.AsyncScheduler(r.AsyncAction),t.async=t.asyncScheduler},9568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},6293:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},2886:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var r=n(4212),o=n(1293);t.queueScheduler=new o.QueueScheduler(r.QueueAction),t.queue=t.queueScheduler},9155:function(e,t){var n=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(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n{function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=n,t.iterator=n()},3327:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},6038:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7057:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var r=n(5568);t.ArgumentOutOfRangeError=r.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})},2823:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var r=n(5568);t.EmptyError=r.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})},7245:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var n,r=1,o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return o[t]=!0,n||(n=Promise.resolve()),n.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},1759:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var r=n(5568);t.NotFoundError=r.createErrorClass(function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}})},9686:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var r=n(5568);t.ObjectUnsubscribedError=r.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})},1505:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var r=n(5568);t.SequenceError=r.createErrorClass(function(e){return function(t){e(this),this.name="SequenceError",this.message=t}})},5788:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var r=n(5568);t.UnsubscriptionError=r.createErrorClass(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}})},1107:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var r=n(1018),o=n(8613);function i(e){return e[e.length-1]}t.popResultSelector=function(e){return r.isFunction(i(e))?e.pop():void 0},t.popScheduler=function(e){return o.isScheduler(i(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof i(e)?e.pop():t}},7360:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var n=Array.isArray,r=Object.getPrototypeOf,o=Object.prototype,i=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(n(t))return{args:t,keys:null};if((s=t)&&"object"==typeof s&&r(s)===o){var a=i(t);return{args:a.map(function(e){return t[e]}),keys:a}}}var s;return{args:e,keys:null}}},8535:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var n=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&n(e[0])?e[0]:e}},7479:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}},5568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},6013:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce(function(e,n,r){return e[n]=t[r],e},{})}},9223:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var r=n(3413),o=null;t.errorContext=function(e){if(r.config.useDeprecatedSynchronousErrorHandling){var t=!o;if(t&&(o={errorThrown:!1,error:null}),e(),t){var n=o,i=n.errorThrown,a=n.error;if(o=null,i)throw a}}else e()},t.captureError=function(e){r.config.useDeprecatedSynchronousErrorHandling&&o&&(o.errorThrown=!0,o.error=e)}},7110:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,n,r,o){void 0===r&&(r=0),void 0===o&&(o=!1);var i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}},6640:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},8046:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},1358:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var r=n(1018);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&r.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},1074:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},1018:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},1116:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var r=n(3327),o=n(1018);t.isInteropObservable=function(e){return o.isFunction(e[r.observable])}},6368:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var r=n(1964),o=n(1018);t.isIterable=function(e){return o.isFunction(null==e?void 0:e[r.iterator])}},1751:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var r=n(4662),o=n(1018);t.isObservable=function(e){return!!e&&(e instanceof r.Observable||o.isFunction(e.lift)&&o.isFunction(e.subscribe))}},7629:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var r=n(1018);t.isPromise=function(e){return r.isFunction(null==e?void 0:e.then)}},9137:function(e,t,n){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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||u(e,t)})})}function u(e,t){try{(n=i[e](t)).value instanceof o?Promise.resolve(n.value.v).then(l,c):f(a[0][2],n)}catch(e){f(a[0][3],e)}var n}function l(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var a=n(1018);t.readableStreamLikeToAsyncGenerator=function(e){return i(this,arguments,function(){var t,n,i;return r(this,function(r){switch(r.label){case 0:t=e.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,o(t.read())];case 3:return n=r.sent(),i=n.value,n.done?[4,o(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,o(i)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})},t.isReadableStreamLike=function(e){return a.isFunction(null==e?void 0:e.getReader)}},8613:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var r=n(1018);t.isScheduler=function(e){return e&&r.isFunction(e.schedule)}},7843:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var r=n(1018);function o(e){return r.isFunction(null==e?void 0:e.lift)}t.hasLift=o,t.operate=function(e){return function(t){if(o(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}}},1251:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},245:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(n,r){return!e.call(t,n,r)}}},2706:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var r=n(6640);function o(e){return 0===e.length?r.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var r=n(3413),o=n(9155);t.reportUnhandledError=function(e){o.timeoutProvider.setTimeout(function(){var t=r.config.onUnhandledError;if(!t)throw e;t(e)})}},7614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},9419:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var r=n(3146);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return r.audit}});var o=n(3231);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return o.auditTime}});var i=n(8015);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return i.buffer}});var a=n(5572);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return a.bufferCount}});var s=n(7210);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return s.bufferTime}});var u=n(8995);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var l=n(8831);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return l.bufferWhen}});var c=n(8118);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return c.catchError}});var f=n(6625);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var h=n(6728);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return h.combineLatestAll}});var d=n(2551);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var p=n(8239);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var v=n(7601);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return v.concat}});var g=n(8158);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return g.concatAll}});var y=n(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return y.concatMap}});var m=n(9938);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return m.concatMapTo}});var b=n(9669);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return b.concatWith}});var _=n(1483);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _.connect}});var w=n(1038);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var x=n(4461);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return x.debounce}});var E=n(8079);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return E.debounceTime}});var O=n(378);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return O.defaultIfEmpty}});var S=n(914);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return S.delay}});var T=n(8766);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return T.delayWhen}});var P=n(7441);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return P.dematerialize}});var C=n(5365);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return C.distinct}});var A=n(8937);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return A.distinctUntilChanged}});var k=n(9612);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return k.distinctUntilKeyChanged}});var I=n(4520);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return I.elementAt}});var R=n(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return R.endWith}});var j=n(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return j.every}});var M=n(1551);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return M.exhaust}});var N=n(2752);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return N.exhaustAll}});var D=n(4753);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return D.exhaustMap}});var L=n(7661);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return L.expand}});var B=n(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return B.filter}});var F=n(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return F.finalize}});var U=n(7714);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return U.find}});var z=n(9756);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return z.findIndex}});var V=n(8275);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return V.first}});var W=n(7815);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return W.groupBy}});var G=n(490);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return G.ignoreElements}});var H=n(9356);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return H.isEmpty}});var Y=n(8669);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Y.last}});var q=n(5471);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return q.map}});var X=n(3218);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return X.mapTo}});var K=n(2360);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return K.materialize}});var Z=n(1415);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return Z.max}});var $=n(361);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return $.merge}});var Q=n(7302);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Q.mergeAll}});var J=n(6902);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return J.flatMap}});var ee=n(983);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=n(6586);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var ne=n(4408);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return ne.mergeScan}});var re=n(8253);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return re.mergeWith}});var oe=n(2669);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return oe.min}});var ie=n(9247);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ie.multicast}});var ae=n(5184);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ae.observeOn}});var se=n(1226);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return se.onErrorResumeNext}});var ue=n(1518);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ue.pairwise}});var le=n(2171);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return le.partition}});var ce=n(4912);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return ce.pluck}});var fe=n(766);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var he=n(7220);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return he.publishBehavior}});var de=n(6106);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var pe=n(8157);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return pe.publishReplay}});var ve=n(4440);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ve.race}});var ge=n(5600);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ge.raceWith}});var ye=n(9139);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return ye.reduce}});var me=n(8522);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return me.repeat}});var be=n(6566);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return be.repeatWhen}});var _e=n(7835);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _e.retry}});var we=n(9843);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var xe=n(7561);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return xe.refCount}});var Ee=n(1731);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Ee.sample}});var Oe=n(6086);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Oe.sampleTime}});var Se=n(8624);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Se.scan}});var Te=n(582);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Te.sequenceEqual}});var Pe=n(8977);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Pe.share}});var Ce=n(3133);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Ce.shareReplay}});var Ae=n(3001);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Ae.single}});var ke=n(3982);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return ke.skip}});var Ie=n(9098);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ie.skipLast}});var Re=n(7372);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Re.skipUntil}});var je=n(4721);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return je.skipWhile}});var Me=n(269);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Me.startWith}});var Ne=n(8960);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Ne.subscribeOn}});var De=n(8774);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return De.switchAll}});var Le=n(3879);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Le.switchMap}});var Be=n(3274);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Be.switchMapTo}});var Fe=n(8712);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Fe.switchScan}});var Ue=n(846);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ue.take}});var ze=n(8330);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return ze.takeLast}});var Ve=n(4780);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ve.takeUntil}});var We=n(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return We.takeWhile}});var Ge=n(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Ge.tap}});var He=n(8941);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return He.throttle}});var Ye=n(7640);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ye.throttleTime}});var qe=n(4869);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return qe.throwIfEmpty}});var Xe=n(489);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Xe.timeInterval}});var Ke=n(1554);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ke.timeout}});var Ze=n(4862);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ze.timeoutWith}});var $e=n(6505);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return $e.timestamp}});var Qe=n(2343);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Qe.toArray}});var Je=n(5477);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Je.window}});var et=n(6746);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=n(8208);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var nt=n(6637);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return nt.windowToggle}});var rt=n(1141);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return rt.windowWhen}});var ot=n(5442);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return ot.withLatestFrom}});var it=n(5918);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return it.zip}});var at=n(187);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return at.zipAll}});var st=n(8538);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return st.zipWith}})},5636:(e,t,n)=>{var r=n(1048),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},9975:(e,t,n)=>{var r=n(7101),o=Array.prototype.concat,i=Array.prototype.slice,a=e.exports=function(e){for(var t=[],n=0,a=e.length;n{e.exports=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},8888:(e,t,n)=>{var r=n(5636).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(o>0&&(e.lastNeed=o-1),o):--r=0?(o>0&&(e.lastNeed=o-2),o):--r=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}},Ip={};function Rp(e){var t=Ip[e];if(void 0!==t)return t.exports;var n=Ip[e]={id:e,loaded:!1,exports:{}};return kp[e].call(n.exports,n,n.exports,Rp),n.loaded=!0,n.exports}Rp.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return Rp.d(t,{a:t}),t},Rp.d=(e,t)=>{for(var n in t)Rp.o(t,n)&&!Rp.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Rp.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),Rp.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Rp.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var jp={};(()=>{Rp.d(jp,{RL:()=>Lo,wK:()=>Ti,x_:()=>Ai,lv:()=>Ci,YQ:()=>Pi,BP:()=>xf,GZ:()=>Af,Vw:()=>ki,Ay:()=>kf,_G:()=>ss,Wy:()=>gl,h4:()=>Mc});var t=Rp(5250);function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:String(t)}var o=["onLayoutDone","onLayoutStep","onError","onLayoutComputing","onWebGLContextLost","onZoomTransitionDone","restart"],i=function(){function e(){var t,n,o,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,o=void 0,(n=r(n="callbacks"))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,this.callbacks=i}var t,n;return t=e,n=[{key:"onZoomTransitionDone",value:function(){this.isValidFunction(this.callbacks.onZoomTransitionDone)&&this.callbacks.onZoomTransitionDone()}},{key:"onLayoutDone",value:function(){this.isValidFunction(this.callbacks.onLayoutDone)&&this.callbacks.onLayoutDone()}},{key:"onLayoutStep",value:function(e){this.isValidFunction(this.callbacks.onLayoutStep)&&this.callbacks.onLayoutStep(e)}},{key:"onLayoutComputing",value:function(e){this.isValidFunction(this.callbacks.onLayoutComputing)&&this.callbacks.onLayoutComputing(e)}},{key:"onError",value:function(e){this.isValidFunction(this.callbacks.onError)&&this.callbacks.onError(e)}},{key:"onWebGLContextLost",value:function(e){this.isValidFunction(this.callbacks.onWebGLContextLost)&&this.callbacks.onWebGLContextLost(e)}},{key:"isValidFunction",value:function(e){return void 0!==e&&"function"==typeof e}}],n&&function(e,t){for(var n=0;n0}function h(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),at(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function d(e,t){var n=tn();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o0}function v(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),at(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function g(e,t){var n=tn(),r=e.changeListeners;if(r){for(var o=0,i=(r=r.slice()).length;o=this.length,value:tt){for(var n=new Array(e-t),r=0;r0&&e+t+1>I&&B(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;$t(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=[]),f(this)){var i=d(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return Je;t=i.removedCount,n=i.added}var a=(n=n.map(function(e){return r.enhancer(e,void 0)})).length-t;this.updateArrayLength(o,a);var s=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,n){if(n.length<1e4)return(r=this.values).splice.apply(r,[e,t].concat(n));var r,o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&y(),o=p(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&b(i),this.atom.reportChanged(),o&&g(this,i),r&&w()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&y(),o=p(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&b(i),this.atom.reportChanged(),o&&g(this,i),r&&w()},e}(),M=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+tt()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new j(r,n,i,o);return gt(i,"$mobx",a),t&&t.length&&i.spliceWithArray(0,0,t),k&&Object.defineProperty(a.array,"0",N),i}return s(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var r,o=this.$mobx.values;r=e0,"actions should have valid names, got: '"+e+"'");var n=function(){return q(e,t,this,arguments)};return n.originalFn=t,n.isMobxAction=!0,n}function q(e,t,n,r){var o=function(e,t,n,r){var o=y()&&!!e,i=0;if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u";vt(e,t,re(i,n))},function(e){return this[e]},function(){rt(!1,H("m001"))},!1,!0),ne=$(function(e,t,n){ae(e,t,n)},function(e){return this[e]},function(){rt(!1,H("m001"))},!1,!1),re=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?Y(e.name||"",e):2===arguments.length&&"function"==typeof t?Y(e,t):1===arguments.length&&"string"==typeof e?oe(e):oe(t).apply(null,arguments)};function oe(e){return function(t,n,r){if(r&&"function"==typeof r.value)return r.value=Y(e,r.value),r.enumerable=!1,r.configurable=!0,r;if(void 0!==r&&void 0!==r.get)throw new Error("[mobx] action is not expected to be used with getters");return te(e).apply(this,arguments)}}function ie(e){return"function"==typeof e&&!0===e.isMobxAction}function ae(e,t,n){var r=function(){return q(t,n,e,arguments)};r.isMobxAction=!0,vt(e,t,r)}re.bound=function(e,t,n){if("function"==typeof e){var r=Y("",e);return r.autoBind=!0,r}return ne.apply(null,arguments)};var se=Object.prototype.toString;function ue(e,t){return le(e,t)}function le(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function(e,t,n,r){e=ce(e),t=ce(t);var o=se.call(e);if(o!==se.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),i){if((u=e.length)!==t.length)return!1;for(;u--;)if(!le(e[u],t[u],n,r))return!1}else{var l,c=Object.keys(e);if(u=c.length,Object.keys(t).length!==u)return!1;for(;u--;)if(!fe(t,l=c[u])||!le(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,n,r)}function ce(e){return U(e)?e.peek():Qe(e)?e.entries():_t(e)?function(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}(e.entries()):e}function fe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function he(e,t){return e===t}var de={identity:he,structural:function(e,t){return ue(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||he(e,t)}};function pe(e,t,n){var r,o,i;"string"==typeof e?(r=e,o=t,i=n):(r=e.name||"Autorun@"+tt(),o=e,i=t),rt("function"==typeof o,H("m004")),rt(!1===ie(o),H("m005")),i&&(o=o.bind(i));var a=new sn(r,function(){this.track(s)});function s(){o(a)}return a.schedule(),a.getDisposer()}function ve(e,t,n){var r;arguments.length>3&&nt(H("m007")),Ve(e)&&nt(H("m008")),(r="object"==typeof n?n:{}).name=r.name||e.name||t.name||"Reaction@"+tt(),r.fireImmediately=!0===n||!0===r.fireImmediately,r.delay=r.delay||0,r.compareStructural=r.compareStructural||r.struct||!1,t=re(r.name,r.context?t.bind(r.context):t),r.context&&(e=e.bind(r.context));var o,i=!0,a=!1,s=r.equals?r.equals:r.compareStructural||r.struct?de.structural:de.default,u=new sn(r.name,function(){i||r.delay<1?l():a||(a=!0,setTimeout(function(){a=!1,l()},r.delay))});function l(){if(!u.isDisposed){var n=!1;u.track(function(){var t=e(u);n=i||!s(o,t),o=t}),i&&r.fireImmediately&&t(o,u),i||!0!==n||t(o,u),i&&(i=!1)}}return u.schedule(),u.getDisposer()}var ge=function(){function e(e,t,n,r,o){this.derivation=e,this.scope=t,this.equals=n,this.dependenciesState=Et.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Et.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+tt(),this.value=new qt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Ot.NONE,this.name=r||"ComputedValue@"+tt(),o&&(this.setter=Y(r+"-setter",o))}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState===Et.UP_TO_DATE){e.lowestObserverState=Et.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Et.UP_TO_DATE&&(r.dependenciesState=Et.POSSIBLY_STALE,r.isTracing!==Ot.NONE&&Ht(r,e),r.onBecomeStale())}}}(this)},e.prototype.onBecomeUnobserved=function(){Jt(this),this.value=void 0},e.prototype.get=function(){rt(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===Pt.inBatch?(Vt(),Kt(this)&&(this.isTracing!==Ot.NONE&&console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context and doing a full recompute"),this.value=this.computeValue(!1)),Wt()):(Gt(this),Kt(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState!==Et.STALE){e.lowestObserverState=Et.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Et.POSSIBLY_STALE?r.dependenciesState=Et.STALE:r.dependenciesState===Et.UP_TO_DATE&&(e.lowestObserverState=Et.UP_TO_DATE)}}}(this));var e=this.value;if(Xt(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(Xt(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){rt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else rt(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){y()&&m({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.dependenciesState===Et.NOT_TRACKING,n=this.value=this.computeValue(!0);return t||Xt(e)||Xt(n)||!this.equals(e,n)},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Pt.computationDepth++,e)t=Qt(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new qt(e)}return Pt.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return pe(function(){var i=n.get();if(!r||t){var a=tn();e({type:"update",object:n,newValue:i,oldValue:o}),nn(a)}r=!1,o=i})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return xt(this.get())},e.prototype.whyRun=function(){var e=Boolean(Pt.trackingDerivation),t=ut(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=ut(Bt(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Et.NOT_TRACKING?H("m032"):" * This computation will re-run if any of the following observables changes:\n "+lt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n "+H("m038")+"\n\n * If the outcome of this computation changes, the following observers will be re-run:\n "+lt(n)+"\n")},e}();ge.prototype[wt()]=ge.prototype.valueOf;var ye=bt("ComputedValue",ge),me=function(){function e(e,t){this.target=e,this.name=t,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return rt(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),v(this,e)},e.prototype.intercept=function(e){return h(this,e)},e}();function be(e,t){if(Ce(e)&&e.hasOwnProperty("$mobx"))return e.$mobx;rt(Object.isExtensible(e),H("m035")),ft(e)||(t=(e.constructor.name||"ObservableObject")+"@"+tt()),t||(t="ObservableObject@"+tt());var n=new me(e,t);return gt(e,"$mobx",n),n}function _e(e,t,n,r){if(e.values[t]&&!ye(e.values[t]))return rt("value"in n,"The property "+t+" in "+e.name+" is already observable, cannot redefine it as computed property"),void(e.target[t]=n.value);if("value"in n)if(Ve(n.value)){var o=n.value;we(e,t,o.initialValue,o.enhancer)}else ie(n.value)&&!0===n.value.autoBind?ae(e.target,t,n.value.originalFn):ye(n.value)?function(e,t,n){var r=e.name+"."+t;n.name=r,n.scope||(n.scope=e.target),e.values[t]=n,Object.defineProperty(e.target,t,Se(t))}(e,t,n.value):we(e,t,n.value,r);else xe(e,t,n.get,n.set,de.default,!0)}function we(e,t,n,r){if(mt(e.target,t),f(e)){var o=d(e,{object:e.target,name:t,type:"add",newValue:n});if(!o)return;n=o.newValue}n=(e.values[t]=new V(n,r,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,function(e){return Ee[e]||(Ee[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Te(this,e,t)}})}(t)),function(e,t,n,r){var o=p(e),i=y(),a=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&b(a),o&&g(e,a),i&&w()}(e,e.target,t,n)}function xe(e,t,n,r,o,i){i&&mt(e.target,t),e.values[t]=new ge(n,e.target,o,e.name+"."+t,r),i&&Object.defineProperty(e.target,t,Se(t))}var Ee={},Oe={};function Se(e){return Oe[e]||(Oe[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function Te(e,t,n){var r=e.$mobx,o=r.values[t];if(f(r)){if(!(s=d(r,{type:"update",object:e,name:t,newValue:n})))return;n=s.newValue}if((n=o.prepareNewValue(n))!==z){var i=p(r),a=y(),s=i||a?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;a&&b(s),o.setNewValue(n),i&&g(r,s),a&&w()}}var Pe=bt("ObservableObjectAdministration",me);function Ce(e){return!!ct(e)&&(J(e),Pe(e.$mobx))}function Ae(e,t){if(null==e)return!1;if(void 0!==t){if(U(e)||Qe(e))throw new Error(H("m019"));if(Ce(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return Ce(e)||!!e.$mobx||c(e)||dn(e)||ye(e)}function ke(e){return rt(!!e,":("),$(function(t,n,r,o,i){mt(t,n),rt(!i||!i.get,H("m022")),we(be(t,void 0),n,r,e)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){Te(this,e,t)},!0,!1)}function Ie(e){for(var t=[],n=1;n=2,H("m014")),rt("object"==typeof e,H("m015")),rt(!Qe(e),H("m016")),n.forEach(function(e){rt("object"==typeof e,H("m017")),rt(!Ae(e),H("m018"))});for(var r=be(e),o={},i=n.length-1;i>=0;i--){var a=n[i];for(var s in a)if(!0!==o[s]&&pt(a,s)){if(o[s]=!0,e===a&&!yt(e,s))continue;_e(r,s,Object.getOwnPropertyDescriptor(a,s),t)}}return e}var Me=ke(Ge),Ne=ke(He),De=ke(Ye),Le=ke(qe),Be=ke(Xe),Fe={box:function(e,t){return arguments.length>2&&ze("box"),new V(e,Ge,t)},shallowBox:function(e,t){return arguments.length>2&&ze("shallowBox"),new V(e,Ye,t)},array:function(e,t){return arguments.length>2&&ze("array"),new M(e,Ge,t)},shallowArray:function(e,t){return arguments.length>2&&ze("shallowArray"),new M(e,Ye,t)},map:function(e,t){return arguments.length>2&&ze("map"),new $e(e,Ge,t)},shallowMap:function(e,t){return arguments.length>2&&ze("shallowMap"),new $e(e,Ye,t)},object:function(e,t){arguments.length>2&&ze("object");var n={};return be(n,t),Ie(n,e),n},shallowObject:function(e,t){arguments.length>2&&ze("shallowObject");var n={};return be(n,t),Re(n,e),n},ref:function(){return arguments.length<2?We(Ye,arguments[0]):De.apply(null,arguments)},shallow:function(){return arguments.length<2?We(He,arguments[0]):Ne.apply(null,arguments)},deep:function(){return arguments.length<2?We(Ge,arguments[0]):Me.apply(null,arguments)},struct:function(){return arguments.length<2?We(qe,arguments[0]):Le.apply(null,arguments)}},Ue=function(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Me.apply(null,arguments);if(rt(arguments.length<=1,H("m021")),rt(!Ve(e),H("m020")),Ae(e))return e;var t=Ge(e,0,void 0);return t!==e?t:Ue.box(e)};function ze(e){nt("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function Ve(e){return"object"==typeof e&&null!==e&&!0===e.isMobxModifierDescriptor}function We(e,t){return rt(!Ve(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function Ge(e,t,n){return Ve(e)&&nt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),Ae(e)?e:Array.isArray(e)?Ue.array(e,n):ft(e)?Ue.object(e,n):_t(e)?Ue.map(e,n):e}function He(e,t,n){return Ve(e)&&nt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),null==e||Ce(e)||U(e)||Qe(e)?e:Array.isArray(e)?Ue.shallowArray(e,n):ft(e)?Ue.shallowObject(e,n):_t(e)?Ue.shallowMap(e,n):nt("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function Ye(e){return e}function qe(e,t,n){if(ue(e,t))return t;if(Ae(e))return e;if(Array.isArray(e))return new M(e,qe,n);if(_t(e))return new $e(e,qe,n);if(ft(e)){var r={};return be(r,n),je(r,qe,[e]),r}return e}function Xe(e,t,n){return ue(e,t)?t:e}function Ke(e,t){void 0===t&&(t=void 0),Vt();try{return e.apply(t)}finally{Wt()}}Object.keys(Fe).forEach(function(e){return Ue[e]=Fe[e]}),Ue.deep.struct=Ue.struct,Ue.ref.struct=function(){return arguments.length<2?We(Xe,arguments[0]):Be.apply(null,arguments)};var Ze={},$e=function(){function e(e,t,n){void 0===t&&(t=Ge),void 0===n&&(n="ObservableMap@"+tt()),this.enhancer=t,this.name=n,this.$mobx=Ze,this._data=Object.create(null),this._hasMap=Object.create(null),this._keys=new M(void 0,Ye,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this.dehancer=void 0,this.merge(e)}return e.prototype._has=function(e){return void 0!==this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(f(this)){var r=d(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,f(this)&&!(o=d(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=y(),r=p(this),o=r||n?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return n&&b(o),Ke(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0}),r&&g(this,o),n&&w(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new V(t,Ye,this.name+"."+e+"?",!1),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if((t=n.prepareNewValue(t))!==z){var r=y(),o=p(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&b(i),n.setNewValue(t),o&&g(this,i),r&&w()}},e.prototype._addValue=function(e,t){var n=this;Ke(function(){var r=n._data[e]=new V(t,n.enhancer,n.name+"."+e,!1);t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)});var r=y(),o=p(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&b(i),o&&g(this,i),r&&w()},e.prototype.get=function(e){return e=""+e,this.has(e)?this.dehanceValue(this._data[e].get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return O(this._keys.slice())},e.prototype.values=function(){return O(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return O(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r,n)})},e.prototype.merge=function(e){var t=this;return Qe(e)&&(e=e.toJS()),Ke(function(){ft(e)?Object.keys(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):_t(e)?e.forEach(function(e,n){return t.set(n,e)}):null!=e&&nt("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;Ke(function(){en(function(){e.keys().forEach(e.delete,e)})})},e.prototype.replace=function(e){var t=this;return Ke(function(){var n,r=ft(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return e[0]}):_t(n)?Array.from(n.keys()):Qe(n)?n.keys():nt("Cannot get keys from "+n);t.keys().filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!=e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"', only strings, numbers and booleans are accepted as key in observable maps.")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return rt(!0!==t,H("m033")),v(this,e)},e.prototype.intercept=function(e){return h(this,e)},e}();S($e.prototype,function(){return this.entries()});var Qe=bt("ObservableMap",$e),Je=[];function et(){return"undefined"!=typeof window?window:Rp.g}function tt(){return++Pt.mobxGuid}function nt(e,t){throw rt(!1,e,t),"X"}function rt(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}Object.freeze(Je);var ot=[];function it(e){return-1===ot.indexOf(e)&&(ot.push(e),console.error("[mobx] Deprecated: "+e),!0)}function at(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var st=function(){};function ut(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}function lt(e,t,n){return void 0===t&&(t=100),void 0===n&&(n=" - "),e?e.slice(0,t).join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":""):""}function ct(e){return null!==e&&"object"==typeof e}function ft(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function ht(){for(var e=arguments[0],t=1,n=arguments.length;t0&&(t.dependencies=ut(e.observing).map(Dt)),t}function Lt(e){var t={name:e.name};return function(e){return e.observers&&e.observers.length>0}(e)&&(t.observers=Bt(e).map(Lt)),t}function Bt(e){return e.observers}function Ft(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Ut(e,t){if(1===e.observers.length)e.observers.length=0,zt(e);else{var n=e.observers,r=e.observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function zt(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Pt.pendingUnobservations.push(e))}function Vt(){Pt.inBatch++}function Wt(){if(0==--Pt.inBatch){fn();for(var e=Pt.pendingUnobservations,t=0;t=1e3?t.push("(and many more)"):(t.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach(function(e){return Yt(e,t,n+1)}))}It.__mobxInstanceCount?(It.__mobxInstanceCount++,setTimeout(function(){Ct||At||kt||(kt=!0,console.warn("[mobx] Warning: there are multiple mobx instances active. This might lead to unexpected results. See https://github.com/mobxjs/mobx/issues/1082 for details."))},1)):It.__mobxInstanceCount=1,function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(Et||(Et={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Ot||(Ot={}));var qt=function(e){this.cause=e};function Xt(e){return e instanceof qt}function Kt(e){switch(e.dependenciesState){case Et.UP_TO_DATE:return!1;case Et.NOT_TRACKING:case Et.STALE:return!0;case Et.POSSIBLY_STALE:for(var t=tn(),n=e.observing,r=n.length,o=0;o0;Pt.computationDepth>0&&t&&nt(H("m031")+e.name),!Pt.allowStateChanges&&t&&nt(H(Pt.strictMode?"m030a":"m030b")+e.name)}function Qt(e,t,n){rn(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Pt.runId;var r,o=Pt.trackingDerivation;Pt.trackingDerivation=e;try{r=t.call(n)}catch(e){r=new qt(e)}return Pt.trackingDerivation=o,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=Et.UP_TO_DATE,o=0,i=e.unboundDepsCount,a=0;ar&&(r=s.dependenciesState);for(n.length=o,e.newObserving=null,i=t.length;i--;)0===(s=t[i]).diffValue&&Ut(s,e),s.diffValue=0;for(;o--;){var s;1===(s=n[o]).diffValue&&(s.diffValue=0,Ft(s,e))}r!==Et.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),r}function Jt(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Ut(t[n],e);e.dependenciesState=Et.NOT_TRACKING}function en(e){var t=tn(),n=e();return nn(t),n}function tn(){var e=Pt.trackingDerivation;return Pt.trackingDerivation=null,e}function nn(e){Pt.trackingDerivation=e}function rn(e){if(e.dependenciesState!==Et.UP_TO_DATE){e.dependenciesState=Et.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Et.UP_TO_DATE}}function on(e){return console.log(e),e}function an(e){switch(e.length){case 0:return Pt.trackingDerivation;case 1:return Rt(e[0]);case 2:return Rt(e[0],e[1])}}var sn=function(){function e(e,t){void 0===e&&(e="Reaction@"+tt()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Et.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+tt(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Ot.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Pt.pendingReactions.push(this),fn())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(Vt(),this._isScheduled=!1,Kt(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&y()&&m({object:this,type:"scheduled-reaction"})),Wt())},e.prototype.track=function(e){Vt();var t,n=y();n&&(t=Date.now(),b({object:this,type:"reaction",fn:e})),this._isRunning=!0;var r=Qt(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Jt(this),Xt(r)&&this.reportExceptionInDerivation(r.cause),n&&w({time:Date.now()-t}),Wt()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this,r=H("m037");console.error(n||r,e),y()&&m({type:"error",message:n,error:e,object:this}),Pt.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Vt(),Jt(this),Wt()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=un,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=ut(this._isRunning?this.newObserving:this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+lt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+H("m038")+"\n"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t0||Pt.isRunningReactions||cn(hn)}function hn(){Pt.isRunningReactions=!0;for(var e=Pt.pendingReactions,t=0;e.length>0;){++t===ln&&(console.error("Reaction doesn't converge to a stable state after "+ln+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r=0&&Pt.globalReactionErrorHandlers.splice(t,1)}},reserveArrayBuffer:B,resetGlobalState:function(){Pt.resetId++;var e=new Tt;for(var t in e)-1===St.indexOf(t)&&(Pt[t]=e[t]);Pt.allowStateChanges=!Pt.strictMode},isolateGlobalState:function(){At=!0,et().__mobxInstanceCount--},shareGlobalState:function(){it("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),Ct=!0;var e=et(),t=Pt;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");e.__mobxGlobal?Pt=e.__mobxGlobal:e.__mobxGlobal=t},spyReport:m,spyReportEnd:w,spyReportStart:b,setReactionScheduler:function(e){var t=cn;cn=function(n){return e(function(){return t(n)})}}},_n={Reaction:sn,untracked:en,Atom:l,BaseAtom:u,useStrict:X,isStrictModeEnabled:function(){return Pt.strictMode},spy:x,comparer:de,asReference:function(e){return it("asReference is deprecated, use observable.ref instead"),Ue.ref(e)},asFlat:function(e){return it("asFlat is deprecated, use observable.shallow instead"),Ue.shallow(e)},asStructure:function(e){return it("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),Ue.struct(e)},asMap:function(e){return it("asMap is deprecated, use observable.map or observable.shallowMap instead"),Ue.map(e||{})},isModifierDescriptor:Ve,isObservableObject:Ce,isBoxedObservable:W,isObservableArray:U,ObservableMap:$e,isObservableMap:Qe,map:function(e){return it("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),Ue.map(e)},transaction:Ke,observable:Ue,computed:yn,isObservable:Ae,isComputed:function(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Ce(e))return!1;if(!e.$mobx.values[t])return!1;var n=Rt(e,t);return ye(n)}return ye(e)},extendObservable:Ie,extendShallowObservable:Re,observe:function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return jt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return jt(e).observe(t,n)}(e,t,n)},intercept:function(e,t,n){return"function"==typeof n?function(e,t,n){return jt(e,t).intercept(n)}(e,t,n):function(e,t){return jt(e).intercept(t)}(e,t)},autorun:pe,autorunAsync:function(e,t,n,r){var o,i,a,s;"string"==typeof e?(o=e,i=t,a=n,s=r):(o=e.name||"AutorunAsync@"+tt(),i=e,a=t,s=n),rt(!1===ie(i),H("m006")),void 0===a&&(a=1),s&&(i=i.bind(s));var u=!1,l=new sn(o,function(){u||(u=!0,setTimeout(function(){u=!1,l.isDisposed||l.track(c)},a))});function c(){i(l)}return l.schedule(),l.getDisposer()},when:function(e,t,n,r){var o,i,a,s;return"string"==typeof e?(o=e,i=t,a=n,s=r):(o="When@"+tt(),i=e,a=t,s=n),pe(o,function(e){if(i.call(s)){e.dispose();var t=tn();a.call(s),nn(t)}})},reaction:ve,action:re,isAction:ie,runInAction:function(e,t,n){var r="string"==typeof e?e:e.name||"",o="function"==typeof e?e:t,i="function"==typeof e?t:n;return rt("function"==typeof o,H("m002")),rt(0===o.length,H("m003")),rt("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),q(r,o,i,void 0)},expr:function(e,t){return Zt()||console.warn(H("m013")),yn(e,{context:t}).get()},toJS:mn,createTransformer:function(e,t){rt("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var n={},r=Pt.resetId,o=function(r){function o(t,n){var o=r.call(this,function(){return e(n)},void 0,de.default,"Transformer-"+e.name+"-"+t,void 0)||this;return o.sourceIdentifier=t,o.sourceObject=n,o}return s(o,r),o.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},o}(ge);return function(e){r!==Pt.resetId&&(n={},r=Pt.resetId);var t=function(e){if("string"==typeof e||"number"==typeof e)return e;if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object or primitive value, got: "+e);var t=e.$transformId;return void 0===t&&vt(e,"$transformId",t=tt()),t}(e),i=n[t];return i?i.get():(i=n[t]=new o(t,e)).get()}},whyRun:function(e,t){return it("`whyRun` is deprecated in favor of `trace`"),(e=an(arguments))?ye(e)||dn(e)?on(e.whyRun()):nt(H("m025")):on(H("m024"))},isArrayLike:function(e){return Array.isArray(e)||U(e)},extras:bn},wn=!1,xn=function(e){var t=_n[e];Object.defineProperty(_n,e,{get:function(){return wn||(wn=!0,console.warn("Using default export (`import mobx from 'mobx'`) is deprecated and won’t work in mobx@4.0.0\nUse `import * as mobx from 'mobx'` instead")),t}})};for(var En in _n)xn(En);"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:x,extras:bn});var On=Rp(1803),Sn=Rp.n(On),Tn={value:()=>{}};function Pn(){for(var e,t=0,n=arguments.length,r={};t=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a0)for(var n,r,o=new Array(n),i=0;i=0&&t._call.call(void 0,e),t=t._next;--Mn}()}finally{Mn=0,function(){for(var e,t,n=Rn,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Rn=t);jn=e,Xn(r)}(),Bn=0}}function qn(){var e=Un.now(),t=e-Ln;t>1e3&&(Fn-=t,Ln=e)}function Xn(e){Mn||(Nn&&(Nn=clearTimeout(Nn)),e-Bn>24?(e<1/0&&(Nn=setTimeout(Yn,e-Un.now()-Fn)),Dn&&(Dn=clearInterval(Dn))):(Dn||(Ln=Un.now(),Dn=setInterval(qn,1e3)),Mn=1,zn(Yn)))}Gn.prototype=Hn.prototype={constructor:Gn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Vn():+n)+(null==t?0:+t),this._next||jn===this||(jn?jn._next=this:Rn=this,jn=this),this._call=e,this._time=n,Xn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xn())}};const Kn=4294967296;function Zn(e){return e.x}function $n(e){return e.y}var Qn=Math.PI*(3-Math.sqrt(5));function Jn(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,i,a,s,u,l,c,f,h,d=e._root,p={data:r},v=e._x0,g=e._y0,y=e._x1,m=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((l=t>=(i=(v+y)/2))?v=i:y=i,(c=n>=(a=(g+m)/2))?g=a:m=a,o=d,!(d=d[f=c<<1|l]))return o[f]=p,e;if(s=+e._x.call(null,d.data),u=+e._y.call(null,d.data),t===s&&n===u)return p.next=d,o?o[f]=p:e._root=p,e;do{o=o?o[f]=new Array(4):e._root=new Array(4),(l=t>=(i=(v+y)/2))?v=i:y=i,(c=n>=(a=(g+m)/2))?g=a:m=a}while((f=c<<1|l)==(h=(u>=a)<<1|s>=i));return o[h]=d,o[f]=p,e}function er(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function tr(e){return e[0]}function nr(e){return e[1]}function rr(e,t,n){var r=new or(null==t?tr:t,null==n?nr:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function or(e,t,n,r,o,i){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function ir(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var ar=rr.prototype=or.prototype;function sr(e){return function(){return e}}function ur(e){return 1e-6*(e()-.5)}function lr(){var e,t,n,r,o,i=sr(-30),a=1,s=1/0,u=.81;function l(n){var o,i=e.length,a=rr(e,Zn,$n).visitAfter(f);for(r=n,o=0;o=s)){(e.data!==t||e.next)&&(0===f&&(p+=(f=ur(n))*f),0===h&&(p+=(h=ur(n))*h),pc&&(c=r),of&&(f=o));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;ne||e>=o||r>t||t>=i;)switch(s=(th||(i=u.y0)>d||(a=u.x1)=y)<<1|e>=g)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=u)}else{var m=e-+this._x.call(null,v.data),b=t-+this._y.call(null,v.data),_=m*m+b*b;if(_=(s=(p+g)/2))?p=s:g=s,(c=a>=(u=(v+y)/2))?v=u:y=u,t=d,!(d=d[f=c<<1|l]))return this;if(!d.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,h=f)}for(;d.data!==e;)if(r=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,r?(o?r.next=o:delete r.next,this):t?(o?t[f]=o:delete t[f],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=o,this)},ar.removeAll=function(e){for(var t=0,n=e.length;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:br,r=new Map;return e.forEach(function(e){var t=e.id,n=e.from,o=e.to,i=e.color,a=e.width,s=e.disabled,u=[n,o].sort(),l="".concat(u[0],".").concat(u[1]),c=r.get(l);c?c.bundledRels.push({id:t,color:null!=i?i:void 0,disabled:null!=s&&s,width:null!=a?a:1}):r.set(l,{bundledRels:[{id:t,color:null!=i?i:void 0,disabled:null!=s&&s,width:null!=a?a:1}],key:l,from:n,to:o,color:null!=i?i:void 0,disabled:null!=s&&s,width:0})}),r.forEach(function(e){var r=(0,t.uniqBy)(e.bundledRels,"disabled"),o=1===r.length&&!0===r[0].disabled,i=1===r.length&&!0!==r[0].disabled;if(o)e.color=n,e.width=1;else{var a=e.bundledRels.filter(function(e){return!0!==e.disabled}),s=(0,t.uniqBy)(a,"color");i?(e.color=s.length>1?void 0:e.bundledRels[0].color,e.bundledRels.forEach(function(t){e.width+=t.width})):(e.color=1===s.length?s[0].color:void 0,e.disabled=!1,e.bundledRels.forEach(function(t){e.width+=!0!==t.disabled?t.width:0}))}}),Array.from(r.values())},kr=function(){return void 0!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find(function(e){return"size"in e})};function Ir(e){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ir(e)}var Rr=function(e){var t,n;return"number"==typeof e.source||"number"==typeof e.target||"string"==typeof e.source||"string"==typeof e.target?45*devicePixelRatio:(null!==(t=e.source.size)&&void 0!==t?t:gr)+(null!==(n=e.target.size)&&void 0!==n?n:gr)+90*devicePixelRatio};function jr(e){return"object"===Ir(e)}var Mr=function(e){var t;return(null!==(t=e.size)&&void 0!==t?t:gr)+25*devicePixelRatio},Nr=function(){return-400*Math.pow(devicePixelRatio,2)},Dr=function(){return 2*Nr()};function Lr(e){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lr(e)}function Br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n(e=(1664525*e+1013904223)%Kn)/Kn}();function f(){h(),l.call("tick",t),n1?(null==n?s.delete(e):s.set(e,p(n)),t):s.get(e)},find:function(t,n,r){var o,i,a,s,u,l=0,c=e.length;for(null==r?r=1/0:r*=r,l=0;l1?(l.on(e,n),t):l.on(e)}}}().velocityDecay(.4).force("charge",lr().strength(Nr)).force("centerX",function(e){var t,n,r,o=sr(.1);function i(e){for(var o,i=0,a=t.length;i0,r=Object.values(e.removes).length>0,o=Object.values(e.updates),s=kr(o);t||r||s?(n.shouldUpdate=!0,n.shouldReheatNodes=!0,n.shouldCountNodeRels=!0):n.shouldReheatNodes=!1}var u=a.channels[zr];if(void 0!==a.version&&u){var l=Object.values(u.adds).length>0,c=Object.values(u.removes).length>0;(l||c)&&(n.shouldUpdate=!0,n.shouldReheatNodes=!0,n.shouldCountNodeRels=!0)}}))}var n,r;return n=e,r=[{key:"setOptions",value:function(e){}},{key:"updateNodes",value:function(e){var t=this;e.forEach(function(e){void 0===t.d3Nodes[e.id]&&(t.d3Nodes[e.id]={id:e.id}),null!=e&&e.pinned?(t.d3Nodes[e.id].fx=e.x,t.d3Nodes[e.id].fy=e.y):(t.d3Nodes[e.id].x=e.x,t.d3Nodes[e.id].y=e.y),t.d3Nodes[e.id].vy=0,t.d3Nodes[e.id].vx=0}),this.shouldUpdate=!0,this.simulation.tick().alpha(.2)}},{key:"update",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||n){var r=this.state,o=r.nodes,i=r.rels,a=o.channels[zr],s=i.channels[zr],u=Object.values(a.adds).length>0,l=Object.values(s.adds).length>0,c=Object.values(a.removes).length>0,f=Object.values(s.removes).length>0,h=Object.values(a.updates).length>0;if(u||l||c||f||h){var d=u&&0===Object.keys(this.d3Nodes).length,p=Vr(a.removes);Object.keys(p).forEach(function(e){delete t.d3Nodes[e]});var v=Vr(a.adds);if(Object.keys(v).forEach(function(e){t.d3Nodes[e]=function(e){for(var t=1;tthis.simulation.alphaMin()&&(this.shouldUpdate=!0,this.simulationStopped&&(this.simulation.restart(),this.simulationStopped=!1))}}},{key:"layout",value:function(e,n,r){var o=this;if(!(0,t.isEmpty)(this.d3Nodes)){if(this.simulation.stop(),this.simulation.nodes(Object.values(this.d3Nodes)).force("collide",function(e){var t,n,r,o=1,i=1;function a(){for(var e,a,u,l,c,f,h,d=t.length,p=0;pl+p||ic+p||au.index){var v=l-s.x-s.vx,g=c-s.y-s.vy,y=v*v+g*g;ye.r&&(e.r=e[t].r)}function u(){if(t){var r,o,i=t.length;for(n=new Array(i),r=0;r[s(e,t,r),e]));for(a=0,o=new Array(l);a=this.simulation.alphaMin();)this.simulation.tick(1);return this.computing=!1,void this.simulation.restart()}this.shouldReheatNodes?this.simulation.alpha(1).restart():this.simulation.restart()}}},{key:"getNodePositions",value:function(e){var t,n=[],r=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return Br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Br(e,t):void 0}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,i=this.d3Nodes[o.id];if(void 0!==i){var a={id:i.id,x:i.x,y:i.y};n.push(a)}}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return this.computing}},{key:"terminateUpdate",value:function(){this.simulation.alpha(this.simulation.alphaMin()).stop(),this.simulationStopped=!0}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel(zr),this.state.rels.removeChannel(zr),this.simulation.stop()}},{key:"setAlpha",value:function(e){this.simulation.alpha(e),this.simulation.restart(),this.simulation.shouldUpdate=!0}},{key:"countNodeRels",value:function(){for(var e=new Map(Object.entries(this.d3Nodes)),t=Object.values(this.d3RelList),n=new Array(e.length),r=0;r1&&void 0!==arguments[1]&&arguments[1],r=Xr[e],o=r.standard,i=r.fallback;if(n)t=qr[i];else try{t=qr[o]()}catch(n){console.warn("Failed to initialise ".concat(e,' worker: "').concat(JSON.stringify(n),'". Falling back to syncronous code.')),t=qr[i]}if(void 0===t)throw"".concat(e," code could not be initialized.");return t.port.start(),t};function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}function $r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?[n.x/o,n.y/o]:[0,0]}(e,r),i={x:o[0],y:o[1]},a=[],s=Jr(e);try{for(s.s();!(t=s.n()).done;){var u=t.value,l=this.positions[u.id],c=r[u.id],f={id:u.id};if(void 0!==l){for(var h,d,p,v=u.id,g=null!==(h=this.oldPositions[u.id])&&void 0!==h?h:Qr({},i);void 0===g&&void 0!==n[v];)v=n[v],g=this.oldPositions[v];g.x=null!==(d=g.x)&&void 0!==d?d:i.x,g.y=null!==(p=g.y)&&void 0!==p?p:i.y,f.x=ro(g.x,l.x,this.t),f.y=ro(g.y,l.y,this.t)}else void 0!==c&&(f.x=c.x||i.x,f.y=c.y||i.y);a.push(f)}}catch(e){s.e(e)}finally{s.f()}return this.currentT=this.t,a}}],n&&function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(this.shouldUpdate||e){var o=_o(n),i=_o(r);(o.length>0||i.length>0)&&(this.updatePositionsFromState(),this.layout(o,i))}vo(go(t.prototype),"update",this).call(this),this.shouldUpdate=!1}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate||this.shouldUpdateAnimator}},{key:"getComputing",value:function(){return this.computing}},{key:"layout",value:function(e,t){var n=this;if(this.worker){if(e.length){var r=e.map(function(e){return{group:"nodes",data:{id:e.id}}}),o=t.map(function(e){return{group:"edges",data:{id:"rel".concat(e.id),source:e.from,target:e.to}}}),i={elements:[].concat(lo(r),lo(o)),spacingFactor:e.reduce(function(e,t){var n;return e+(null!==(n=t.size)&&void 0!==n?n:gr)},0)/e.length*4.5/50*Sr()};this.computing?this.pendingLayoutData=i:(this.computing=!0,this.worker.port.onmessage=function(e){var t=e.data.positions;if(n.computing){for(var r=0,o=Object.entries(t);r3&&void 0!==arguments[3]?arguments[3]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Co(this,"shaderProgram",void 0),Co(this,"gl",void 0),Co(this,"curTexture",void 0),Co(this,"attributeInfo",void 0),Co(this,"uniformInfo",void 0);var a=n.createShader(n.FRAGMENT_SHADER);if(!n.isShader(a))throw new Error("Could not create shader object");var s=To()(o,i);n.shaderSource(a,s),n.compileShader(a),(0,t.isNil)(n.getShaderParameter(a,n.COMPILE_STATUS))&&Yr.info(n.getShaderInfoLog(a));var u=n.createShader(n.VERTEX_SHADER);if(!n.isShader(u))throw new Error("Could not create shader object");var l=To()(r,i);if(n.shaderSource(u,l),n.compileShader(u),(0,t.isNil)(n.getShaderParameter(u,n.COMPILE_STATUS))&&Yr.info(n.getShaderInfoLog(u)),this.shaderProgram=n.createProgram(),n.attachShader(this.shaderProgram,a),n.attachShader(this.shaderProgram,u),n.linkProgram(this.shaderProgram),(0,t.isNil)(n.getProgramParameter(this.shaderProgram,n.LINK_STATUS)))throw new Error("Could not initialise shader");this.gl=n,this.curTexture=0,this.scanUniforms(),this.scanAttributes()}var n,r;return n=e,r=[{key:"setUniform",value:function(e,t){var n=this.gl,r=this.uniformInfo[e];if(void 0===r)throw new Error("Shader.setUniform - Uniform ".concat(e," not found in shader"));switch(r.type){case n.INT:n.uniform1i(r.location,t);break;case n.INT_VEC2:n.uniform2iv(r.location,t);break;case n.INT_VEC3:n.uniform3iv(r.location,t);break;case n.INT_VEC4:n.uniform4iv(r.location,t);break;case n.SAMPLER_2D:n.activeTexture(n.TEXTURE0+r.texture),n.bindTexture(n.TEXTURE_2D,t),n.uniform1i(r.location,r.texture);break;case n.SAMPLER_CUBE:case n.FLOAT:n.uniform1f(r.location,t);break;case n.FLOAT_VEC2:n.uniform2fv(r.location,t);break;case n.FLOAT_VEC3:n.uniform3fv(r.location,t);break;case n.FLOAT_VEC4:n.uniform4fv(r.location,t);break;case n.FLOAT_MAT2:n.uniformMatrix2fv(r.location,!1,t);break;case n.FLOAT_MAT3:n.uniformMatrix3fv(r.location,!1,t);break;case n.FLOAT_MAT4:n.uniformMatrix4fv(r.location,!1,t)}}},{key:"setAttributePointer",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e],a=n*Float32Array.BYTES_PER_ELEMENT,s=r*Float32Array.BYTES_PER_ELEMENT;o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.FLOAT,!1,s,a)}},{key:"setAttributePointerFloat",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.FLOAT,!1,r,n)}},{key:"setAttributePointerUShort",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.UNSIGNED_SHORT,!1,r,n)}},{key:"setAttributePointerByteNorm",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.UNSIGNED_BYTE,!0,r,n)}},{key:"setAttributePointerByte",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.UNSIGNED_BYTE,!1,r,n)}},{key:"use",value:function(){this.gl.useProgram(this.shaderProgram)}},{key:"remove",value:function(){this.gl.deleteProgram(this.shaderProgram)}},{key:"scanAttributes",value:function(){var e=this.gl;this.attributeInfo={};for(var t,n,r=e.getProgramParameter(this.shaderProgram,e.ACTIVE_ATTRIBUTES),o=0;oe&&t.relationships.some(function(e){return e.length>0});){var o=this.coarsen(t,0===r);if(0===r&&(this.nodeSortMap=o.nodeSortMap),this.subGraphs.push(o.sortedInput),0===(t=o.output).relationships.length||t.relationships.every(function(e){return 0===e.length})||n===t.nodes.length)break;n=t.nodes.length,r+=1}return this.subGraphs.push(t),t}},{key:"coarsenBy",value:function(e){for(var t=e,n=this.graph,r=n.nodes.length,o=t;t>0;){var i=this.coarsen(n,t===o);if(this.subGraphs.push(i.sortedInput),0===(n=i.output).relationships.length||n.relationships.every(function(e){return 0===e.length})||r===n.nodes.length)break;r=n.nodes.length,t-=1}return this.subGraphs.push(n),n}},{key:"coarsen",value:function(e,t){var n=this,r=e.nodes,o=e.relationships,i=r.map(function(e,t){return t}),a={},s={};r.forEach(function(e,t){a[t]=e,s[e.id]=t});for(var u=o.map(function(e){return e.slice()}),l={suns:{},planets:{},moons:{}},c=[],f=[],h=function(){var e=i[0];i.splice(i.indexOf(e),1),o[e].forEach(function(t){var n=i.indexOf(t);n>=0&&i.splice(n,1);var r=-1,o=u[t];o.forEach(function(t,n){var o=i.indexOf(t);o>=0?i.splice(o,1):t===e&&(r=n)}),o.splice(r,1)});var n={id:e};if(t)n.originalId=a[e].id;else{var r=a[e];n.finestIndex=r.finestIndex,n.originalId=r.originalId}c.push(n),l.suns[e]=n};i.length>0;)h();c.forEach(function(e,t){f[t]=[]}),c.forEach(function(e,n){var r={},i=[];o[e.id].forEach(function(o){if(o!==e.id&&!r[o]){var s={id:o,parent:e,sunId:n,moons:[]},u=a[o];s.size=function(){return s.moons.length+1},s.weight=u.weight||1,s.children=function(){return s.moons},t?s.originalId=u.id:(s.finestIndex=u.finestIndex,s.originalId=u.originalId),i.push(s),r[o]=!0}}),i.forEach(function(e){l.planets[e.id]=e}),e.planets=i,e.children=function(){return e.planets},e.weight=e.planets.reduce(function(e,t){return e+(t.weight||1)},0)+(a[e.id].weight||1),e.size=function(){return e.planets.reduce(function(e,t){return e+t.size()},0)+1}});var d=r.filter(function(e,t){return!c.find(function(e){return e.id===t})&&!l.planets[t]}),p=[];d.forEach(function(e){for(var n=s[e.id],r=u[n],o=null,i=-1,c=0;c0&&(this.relIdMap=b),{output:{nodes:c,relationships:f},sortedInput:{nodes:v,relationships:m},nodeSortMap:y}}}],n&&function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,r=Object.values(e.removes).length>0,o=Object.values(e.updates),i=kr(o);(t||r||i)&&(n.shouldUpdate=!0,n.checkForUpdates())}var a=l.channels[Xo];if(void 0!==l.version&&a){var s=Object.values(a.adds).length>0,c=Object.values(a.removes).length>0;(s||c)&&(n.shouldUpdate=!0,n.checkForUpdates())}})),this.setData({nodes:u.items,rels:l.items}),this.state=r,this.dpr=window.devicePixelRatio||1}var t,n;return t=e,n=[{key:"setOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var n=e.intelWorkaround,r=e.simulationStopVelocity,o=e.gravity,i=e.enableVerlet,a=void 0!==i&&i;t&&(this.intelWorkaround=n,this.enableVerlet=a);var s=this.enableVerlet?.25:null!=r?r:100;this.simulationStopVelocitySquared=s*s,this.gravity=null!=o?o:100,this.force=0}}},{key:"setData",value:function(e){var t=$o(e.nodes),n=t.nodeIdToIndex,r=t.nodeIndexToId;return this.nodeIdToIndex=n,this.nodeIndexToId=r,this.numNodes=e.nodes.length,this.solarMerger=new zo(e,n),this.solarMerger.coarsenTo(1),this.subGraphs=this.solarMerger.subGraphs,this.nodeSortMap=this.solarMerger.nodeSortMap,this.setupSprings(this.subGraphs[0]),this.setupSize(this.subGraphs[0]),this.setupPhysics(),this.firstUpdate=!0,this.curPhysData=0,this.shouldUpdate=!0,this.iterationCount=0,this.subGraphs[0]}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.gl;if(this.checkForUpdates(e),!this.shouldUpdate)return t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(0).frameBuffer),t.readPixels(0,0,pr,pr,t.RGBA,t.FLOAT,this.physPositions),!1;t.disable(t.BLEND);for(var n=this.nodeVariation/(this.numNodes||1)>.3,r=this.getScaleNumber(this.iterationCount),o=this.subGraphs?this.subGraphs.length:0,i=this.getPhysData(0).texture,a=o-1;a>0;a--){var s=this.subGraphs[a].nodes.length,u=a===o-1;this.apprxRepForceShader.use(),this.apprxRepForceShader.setUniform("u_physData",i),this.apprxRepForceShader.setUniform("u_clusterData",this.levelsClusterTexture[a]),this.apprxRepForceShader.setUniform("u_finestIndexes",this.levelsFinestIndexTexture[a]),this.apprxRepForceShader.setUniform("u_prevForce",u?this.initalLevelTexture:this.levelsData[a+1].texture),this.apprxRepForceShader.setUniform("u_numNodes",s),this.apprxRepForceShader.setUniform("u_iterationMultiplier",r),this.apprxRepForceShader.setUniform("u_baseLength",this.getBaseLength(s)),this.apprxRepForceShader.setUniform("u_isTopLevel",u?1:0),t.bindBuffer(t.ARRAY_BUFFER,this.physSmallVbo),this.apprxRepForceShader.setAttributePointer("a_position",2,0,2),t.bindFramebuffer(t.FRAMEBUFFER,this.levelsData[a].frameBuffer),t.viewport(0,0,Zo,Zo),t.drawArrays(t.TRIANGLE_STRIP,0,4)}if(this.collisionDetectionMultiplier=0,this.collisionDetectionMultiplier=n?Math.min(this.iterationCount/Math.min(this.numNodes,300),1):1,this.force=o<=1?this.initalLevelTexture:this.levelsData[1].texture,this.physShader.use(),this.physShader.setUniform("u_prevForce",o<=1?this.initalLevelTexture:this.levelsData[1].texture),this.physShader.setUniform("u_connections",this.springTexture),this.physShader.setUniform("u_sizeTexture",this.sizeTexture),this.physShader.setUniform("u_connectionOffsets",this.offsetTexture),this.physShader.setUniform("u_physData",i),this.physShader.setUniform("u_pinnedNodes",this.pinTexture),this.physShader.setUniform("u_iterationMultiplier",r),this.physShader.setUniform("u_curIteration",this.iterationCount),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_clusterData",this.levelsClusterTexture[0]),this.physShader.setUniform("u_collisionMultiplier",this.collisionDetectionMultiplier),this.physShader.setUniform("u_baseLength",this.getBaseLength()),this.firstUpdate=!1,t.bindBuffer(t.ARRAY_BUFFER,this.physVbo),this.physShader.setAttributePointer("a_position",2,0,2),t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(1).frameBuffer),t.viewport(0,0,pr,pr),t.drawArrays(t.TRIANGLE_STRIP,0,4),this.useReadpixelWorkaround?this.doReadpixelWorkaround():(t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(0).frameBuffer),t.readPixels(0,0,pr,pr,t.RGBA,t.FLOAT,this.physPositions)),this.curPhysData=(this.curPhysData+1)%this.physData.length,this.iterationCount+=1,this.numNodes<2)this.shouldUpdate=!1,this.iterationCount=0;else if(this.iterationCount%5==0){var l=this.iterationCount<300,c=l?this.getMaxSpeedSquared():this.getMedianSpeedSquared(this.addedNodes);this.lastSpeedValues.push(c),this.rollingAvgGraphSpeed=this.lastSpeedValues.reduce(function(e,t){return e+t},0)/this.lastSpeedValues.length;var f=l&&c>=this.rollingAvgGraphSpeed,h=this.simulationStopVelocitySquared&&this.rollingAvgGraphSpeed20&&this.lastSpeedValues.shift(),!f&&!0===h&&this.iterationCount>2&&this.terminateUpdate()}return this.shouldUpdate}},{key:"terminateUpdate",value:function(){Yr.info("Cooling down after ".concat(this.iterationCount," iterations at graph speed of ").concat(Math.sqrt(this.rollingAvgGraphSpeed))),this.shouldUpdate=!1,this.iterationCount=0,this.rollingAvgGraphSpeed=0,this.lastSpeedValues=[],this.addedNodes=null,this.nodeVariation=0}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return!1}},{key:"getNodePositions",value:function(e){var t=[];if(this.useReadpixelWorkaround){var n,r=Go(e);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=this.nodeIdToIndex[o.id],a=o.id,s=void 0,u=void 0;void 0!==i&&(s=this.workaroundData[0].dataFloat[i],u=this.workaroundData[1].dataFloat[i]),t.push({id:a,x:s,y:u})}}catch(e){r.e(e)}finally{r.f()}}else{var l,c=Go(e);try{for(c.s();!(l=c.n()).done;){var f=l.value,h=this.nodeIdToIndex[f.id],d=f.id,p=void 0,v=void 0;void 0!==h&&(p=this.physPositions[4*h+0],v=this.physPositions[4*h+1]),t.push({id:d,x:p,y:v})}}catch(e){c.e(e)}finally{c.f()}}return t}},{key:"reheat",value:function(e){this.setupSize(this.subGraphs[0]),this.shouldUpdate=!0,this.iterationCount=0,this.nodeVariation=e.nodes.length}},{key:"updateNodes",value:function(e){var t=this.gl,n=new Set;t.bindTexture(t.TEXTURE_2D,this.getPhysData().texture);var r,o=Go(e);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=this.nodeIdToIndex[i.id];if(void 0!==i.x&&void 0!==i.y){Ko[0]=i.x,Ko[1]=i.y,Ko[2]=0,Ko[3]=0;var s=a%pr,u=(a-s)/pr;t.texSubImage2D(t.TEXTURE_2D,0,s,u,1,1,t.RGBA,t.FLOAT,Ko),this.useReadpixelWorkaround?(this.workaroundData[0].dataFloat[a]=i.x,this.workaroundData[1].dataFloat[a]=i.y):(this.physPositions[4*a+0]=i.x,this.physPositions[4*a+1]=i.y)}void 0!==i.pinned&&(this.pinData[a]=i.pinned?255:0),Object.keys(i).forEach(function(e){return n.add(e)})}}catch(e){o.e(e)}finally{o.f()}n.has("pinned")&&(t.bindTexture(t.TEXTURE_2D,this.pinTexture),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,pr,pr,0,t.ALPHA,t.UNSIGNED_BYTE,this.pinData)),(n.has("x")||n.has("y")||n.has("size"))&&(this.shouldUpdate=!0,this.iterationCount=0)}},{key:"addRemoveData",value:function(e,t){var n=this.gl;this.numNodes=e.nodes.length,this.physShader.use(),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_baseLength",this.getBaseLength());var r=$o(e.nodes).nodeIdToIndex,o=new zo(e,r);o.coarsenTo(1);var i=o.subGraphs[0],a=this.subGraphs[0],s=function(e){return a.nodes.findIndex(function(t){return t.id===e})},u=Object.values(t.adds),l=Object.values(t.removes);this.addedNodes=u.length>0?{}:null,this.nodeVariation=u.length+l.length;for(var c,f=3*Math.sqrt(e.nodes.length),h={x:0,y:0},d=i.nodes.length,p=new Uint8Array(65536),v=0;v0||l.length>0)&&(n.bindTexture(n.TEXTURE_2D,this.pinTexture),n.texImage2D(n.TEXTURE_2D,0,n.ALPHA,pr,pr,0,n.ALPHA,n.UNSIGNED_BYTE,this.pinData)),this.shouldUpdate=!0,this.iterationCount=0,this.setupPhysicsForCoarse(),this.subGraphs[0]}},{key:"destroy",value:function(){var e=this;this.gl.deleteBuffer(this.physVbo),this.gl.deleteBuffer(this.physSmallVbo),this.physData.forEach(function(t){e.gl.deleteFramebuffer(t.frameBuffer),e.gl.deleteTexture(t.texture)}),this.levelsData.forEach(function(t){e.gl.deleteFramebuffer(t.frameBuffer),e.gl.deleteTexture(t.texture)}),this.levelsClusterTexture.forEach(function(t){e.gl.deleteTexture(t)}),this.levelsFinestIndexTexture.forEach(function(t){e.gl.deleteTexture(t)}),this.gl.deleteTexture(this.initalLevelTexture),this.gl.deleteTexture(this.sizeTexture),this.gl.deleteTexture(this.offsetTexture),this.gl.deleteTexture(this.springTexture),this.gl.deleteTexture(this.pinTexture),this.gl.deleteTexture(this.updateTexture),void 0!==this.apprxRepForceShader&&this.apprxRepForceShader.remove(),void 0!==this.updateShader&&this.updateShader.remove(),void 0!==this.physShader&&this.physShader.remove(),this.physPositions=null,this.gl=null,this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel(Xo),this.state.rels.removeChannel(Xo)}},{key:"dumpTexture",value:function(e,t,n){var r=this.gl;Yr.info("--- Dumping texture ",n),r.bindFramebuffer(r.FRAMEBUFFER,e),r.readPixels(0,0,pr,pr,r.RGBA,r.FLOAT,this.physPositions);for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:function(e,t,n){return n+Math.pow(10,6)*Math.pow(e-120,-1.7)};return 0===e?0:e<300?200+-1/Math.pow(10,5)*3*Math.pow(Math.abs(e-200+12),3):t(e,200,10)}},{key:"getBaseLength",value:function(e){if(void 0===e||e===this.numNodes)return 100*this.dpr;var t=Math.pow(this.averageNodeSize/2,2)*Math.PI,n=this.numNodes/e*t;return(100+Math.sqrt(n/Math.PI)/2/e)*this.dpr}},{key:"checkForUpdates",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.state,n=t.nodes,r=t.rels,o={nodes:n.items,rels:r.items},i=Object.values(n.channels[Xo].adds).length>0,a=Object.values(r.channels[Xo].adds).length>0,s=Object.values(n.channels[Xo].removes).length>0,u=Object.values(r.channels[Xo].removes).length>0,l=Object.values(n.channels[Xo].updates);(i||a||s||u)&&this.addRemoveData(o,{adds:n.channels[Xo].adds,removes:n.channels[Xo].removes}),e?(this.updateNodes(o.nodes),this.reheat(o)):l.length>0&&(this.updateNodes(l),kr(l)&&this.reheat(o)),n.clearChannel(Xo),r.clearChannel(Xo)}},{key:"getNodePosition",value:function(e){return this.useReadpixelWorkaround?{x:this.workaroundData[0].dataFloat[e],y:this.workaroundData[1].dataFloat[e]}:{x:this.physPositions[4*e+0],y:this.physPositions[4*e+1]}}},{key:"getMaxSpeedSquared",value:function(){var e=0;if(this.useReadpixelWorkaround)for(var t=0;te&&(e=o)}else for(var i=0;ie&&(e=u)}return e}},{key:"getMedianSpeedSquared",value:function(e){var t=[];if(this.useReadpixelWorkaround)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0;return this.physData[(this.curPhysData+e)%this.physData.length]}},{key:"newTexture",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.FLOAT,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.RGBA,i=e.createTexture();return e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,o,n,n,0,o,r,t),i}},{key:"newFramebuffer",value:function(e,t){var n=e.createFramebuffer();return e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),n}},{key:"checkCompatibility",value:function(e){function t(e){throw new Lo(e)}e||t("Could not initialize WebGL"),0===e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)&&t("Vertex shader texture access not available"),e.getExtension("OES_texture_float")||t("OES_texture_float extension not available"),e.getExtension("WEBGL_color_buffer_float")||(Yr.info("gl.readPixels doesnt work for float texture, activating workaround"),this.useReadpixelWorkaround=!0);var n=e.getParameter(e.MAX_TEXTURE_SIZE),r=Math.max(pr,vr);if(n0&&i.forEach(function(e){return Yr.trace(e)})}},{key:"adjustToGlSize",value:function(e){return e*this.dpr*2.5}},{key:"setupSize",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},t=new Float32Array(65536),n=e.nodes,r=n.length,o=0,i=0;i=0;u--){var l=u===t-1?[]:this.subGraphs[u+1].nodes;0===l.length?this.subGraphs[u].nodes.forEach(function(e,t){var n=e.placement?e.placement.x:r*(Math.random()-.5),i=e.placement?e.placement.y:r*(Math.random()-.5);s(void 0===e.finestIndex?t:e.finestIndex,n,i,o)}):l.forEach(function(e){var t=e.finestIndex,n=o[4*e.finestIndex],r=o[4*e.finestIndex+1],i=Vo({x:n,y:r},10,e.planets.length+1);t+=1,e.planets.forEach(function(e,n){var r=i[n];s(t+=1,r.x,r.y,o);var a=Vo({x:r.x,y:r.y},10,e.moons.length+1);e.moons.forEach(function(e,n){var r=a[n];s(t+=1,r.x,r.y,o)})})})}this.physData=[];for(var c=0;c<2;c++){var f=this.newTexture(e,0===c?o:i,pr),h=this.newFramebuffer(e,f);this.physData.push({texture:f,frameBuffer:h})}var d=this.enableVerlet?"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_connections;\nuniform sampler2D u_connectionOffsets;\nuniform sampler2D u_pinnedNodes;\nuniform sampler2D u_sizeTexture;\nuniform float u_baseLength;\nuniform float u_curIteration;\nuniform float u_iterationMultiplier;\nuniform vec2 u_gravityCenter;\nuniform float u_numNodes;\nuniform float u_gravity;\n\nuniform sampler2D u_clusterData;\nuniform sampler2D u_prevForce;\nuniform float u_collisionMultiplier;\n\n\nfloat DAMP = 0.6;\nfloat COOL = 0.99998;\nfloat TEMP = max(0.02, pow(COOL, u_curIteration));\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\nfloat accLimitLow = 500000.0;\nfloat accLimitHigh = 750000.0;\nfloat accLimitPosHigh = 10000000.0;\n\nconst float denseNodeThreshold = 1000.0;\nconst float MIN_DISTANCE = 0.00000001;\nconst float MAX_DISTANCE = 1000000000.0;\nconst float MAX_ACCELERATION = 50000.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nbool isNan(float val) {\n return (val < 0.0 || 0.0 < val || val == 0.0) ? false : true;\n}\n\nconst float BIG_NUMBER = 999999999999999999.0;\nbool isInf(float val) {\n return val > BIG_NUMBER || val < -BIG_NUMBER;\n}\n\nvec2 getDelta(vec2 v1, vec2 v2) {\n vec2 delta = v1 - v2;\n float dist = length(delta);\n if (dist < MIN_DISTANCE || isNan(dist)) {\n return vec2(MIN_DISTANCE, MIN_DISTANCE);\n }\n if (dist > MAX_DISTANCE) {\n vec2 normDelta = delta / dist;\n return normDelta * MAX_DISTANCE;\n }\n return delta;\n}\n\nvec4 getOtherNodePosition(float i) {\n return getTextureData(u_physData, i, 256.0);\n}\n\nfloat getCombinedNodeSize(float i, float nodeSize) {\n float otherNodeSize = getTextureData(u_sizeTexture, i, 256.0).a;\n return nodeSize + otherNodeSize;\n}\n\nvec2 getSpringForce(float curConnection, float numConnections, float springFScale, vec4 myPosition, float i) {\n float curSpring = getTextureData(u_connections, curConnection + i, 4096.0).a;\n\n vec4 otherPosition = getTextureData(u_physData, curSpring, 256.0);\n float otherDataPosition = getTextureData(u_connectionOffsets, curSpring, 256.0).a;\n float avgDegree;\n#if INTEL_WORKAROUND\n avgDegree = max(numConnections, 4.0);\n#else\n float otherNumConnections = getTextureData(u_connections, otherDataPosition, 4096.0).a;\n avgDegree = max((otherNumConnections + numConnections * 3.0) / 4.0, 4.0);\n#endif\n\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n\n float F = (dist * dist * springFScale) / (u_baseLength * avgDegree);\n if (u_collisionMultiplier > 0.0) {\n F *= u_collisionMultiplier;\n }\n return (-delta / dist) * F;\n}\n\nvec2 getCollisionForce(float combinedNodeSize, float dist, float fScale, vec2 delta) {\n float collisionForce = (combinedNodeSize - dist) / (dist);\n if (u_collisionMultiplier > 0.0) {\n collisionForce *= u_collisionMultiplier;\n }\n return (delta * collisionForce * fScale * combinedNodeSize) / (combinedNodeSize + 1.0);\n}\n\nvec2 getRepulsionForce(float dist, float fScale, vec2 delta) {\n float F = (u_baseLength * u_baseLength * fScale) / (dist);\n return (delta / dist) * F * 0.05;\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * textureSide;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterWeight = clusterData.w;\n\n vec4 myPosition = getTextureData(u_physData, index, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n\n vec2 acceleration = previousForce.xy;\n\n float isPinned = getTextureData(u_pinnedNodes, index, 256.0).a;\n float nodeSize = getTextureData(u_sizeTexture, index, 256.0).a;\n\n if (isPinned > 0.5) {\n gl_FragColor = vec4(myPosition.xy, 0.0, 0.0);\n return;\n }\n\n float curConnection = getTextureData(u_connectionOffsets, index, 256.0).a;\n float numConnections = getTextureData(u_connections, curConnection, 4096.0).a;\n\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n float springFScale = fScale;\n\n if (numConnections > denseNodeThreshold) {\n springFScale = sqrt(fScale);\n }\n\n float numOfRels = 0.0;\n\n // Springs\n for (float i = 1.0; i <= 256.0 * 256.0; i++) {\n if (numOfRels >= numConnections) {\n break;\n }\n acceleration += getSpringForce(curConnection, numConnections, springFScale, myPosition, i);\n numOfRels += 1.0;\n }\n\n // Repulsion && collision detection\n if (u_collisionMultiplier > 0.0) {\n float number_of_collisions = 0.0;\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= u_numNodes) {\n break;\n }\n\n if (i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize) * 2.0;\n\n if (dist < combinedNodeSize && number_of_collisions < 40.0) {\n number_of_collisions++;\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n if (i >= clusterStartIndex && i < clusterStartIndex + clusterSize) {\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n } else {\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize);\n\n if (dist < combinedNodeSize) {\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n\n // Gravity\n vec2 delta = getDelta(u_gravityCenter, myPosition.xy);\n float dist = length(delta);\n\n vec2 grav = (delta / dist) * u_gravity * fScale;\n acceleration += grav * smoothstep(0.0, 500.0, dist);\n\n float accMagnitude = length(acceleration);\n acceleration *= min(MAX_ACCELERATION, accMagnitude) / accMagnitude;\n\n float iterationFrictionThreshold = 1000.0;\n\n if (u_curIteration > iterationFrictionThreshold) {\n float friction = 1.0 + pow((u_curIteration - iterationFrictionThreshold), 2.0) / 100.0;\n acceleration *= 1.0 / friction;\n }\n\n if (u_curIteration == 0.0) {\n gl_FragColor = vec4(myPosition.xy, myPosition.zw);\n } else {\n vec2 prevVelocity = myPosition.zw;\n vec2 currentPos = myPosition.xy;\n vec2 prevPos = currentPos - prevVelocity;\n\n vec2 newPos = currentPos + TEMP * ( DAMP * (prevVelocity) + acceleration * TIMESTEP * TIMESTEP);\n vec2 newVelocity = newPos - currentPos;\n gl_FragColor = vec4(newPos, newVelocity);\n }\n}":"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_connections;\nuniform sampler2D u_connectionOffsets;\nuniform sampler2D u_pinnedNodes;\nuniform sampler2D u_sizeTexture;\nuniform float u_baseLength;\nuniform float u_curIteration;\nuniform float u_iterationMultiplier;\nuniform vec2 u_gravityCenter;\nuniform float u_numNodes;\nuniform float u_gravity;\n\nuniform sampler2D u_clusterData;\nuniform sampler2D u_prevForce;\nuniform float u_collisionMultiplier;\n\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\nfloat accLimitLow = 500000.0;\nfloat accLimitHigh = 750000.0;\nfloat accLimitPosHigh = 10000000.0;\n\nconst float denseNodeThreshold = 1000.0;\nconst float MIN_DISTANCE = 0.00000001;\nconst float MAX_DISTANCE = 1000000000.0;\nconst float MAX_ACCELERATION = 500000.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nbool isNan(float val) {\n return (val < 0.0 || 0.0 < val || val == 0.0) ? false : true;\n}\n\nconst float BIG_NUMBER = 999999999999999999.0;\nbool isInf(float val) {\n return val > BIG_NUMBER || val < -BIG_NUMBER;\n}\n\nvec2 getDelta(vec2 v1, vec2 v2) {\n vec2 delta = v1 - v2;\n float dist = length(delta);\n if (dist < MIN_DISTANCE || isNan(dist)) {\n return vec2(MIN_DISTANCE, MIN_DISTANCE);\n }\n if (dist > MAX_DISTANCE) {\n vec2 normDelta = delta / dist;\n return normDelta * MAX_DISTANCE;\n }\n return delta;\n}\n\nvec4 getOtherNodePosition(float i) {\n return getTextureData(u_physData, i, 256.0);\n}\n\nfloat getCombinedNodeSize(float i, float nodeSize) {\n float otherNodeSize = getTextureData(u_sizeTexture, i, 256.0).a;\n return nodeSize + otherNodeSize;\n}\n\nvec2 getSpringForce(float curConnection, float numConnections, float springFScale, vec4 myPosition, float i) {\n float curSpring = getTextureData(u_connections, curConnection + i, 4096.0).a;\n\n vec4 otherPosition = getTextureData(u_physData, curSpring, 256.0);\n float otherDataPosition = getTextureData(u_connectionOffsets, curSpring, 256.0).a;\n float avgDegree;\n#if INTEL_WORKAROUND\n avgDegree = max(numConnections, 4.0);\n#else\n float otherNumConnections = getTextureData(u_connections, otherDataPosition, 4096.0).a;\n avgDegree = max((otherNumConnections + numConnections * 3.0) / 4.0, 4.0);\n#endif\n\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n\n float F = (dist * dist * springFScale) / (u_baseLength * avgDegree);\n if (u_collisionMultiplier > 0.0) {\n F *= u_collisionMultiplier;\n }\n return (-delta / dist) * F;\n}\n\nvec2 getCollisionForce(float combinedNodeSize, float dist, float fScale, vec2 delta) {\n float collisionForce = ((combinedNodeSize - dist) / dist);\n if (u_collisionMultiplier > 0.0) {\n collisionForce *= u_collisionMultiplier;\n }\n return (delta * collisionForce * fScale * combinedNodeSize) / (combinedNodeSize + 1.0);\n}\n\nvec2 getRepulsionForce(float dist, float fScale, vec2 delta) {\n float F = (u_baseLength * u_baseLength * (fScale / 1.5)) / dist;\n return (delta / dist) * F * 0.05;\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * textureSide;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterWeight = clusterData.w;\n\n vec4 myPosition = getTextureData(u_physData, index, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n\n vec2 acceleration = previousForce.xy;\n\n float isPinned = getTextureData(u_pinnedNodes, index, 256.0).a;\n float nodeSize = getTextureData(u_sizeTexture, index, 256.0).a;\n\n if (isPinned > 0.5) {\n gl_FragColor = vec4(myPosition.xy, 0.0, 0.0);\n return;\n }\n\n float curConnection = getTextureData(u_connectionOffsets, index, 256.0).a;\n float numConnections = getTextureData(u_connections, curConnection, 4096.0).a;\n\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n float springFScale = fScale;\n\n if (numConnections > denseNodeThreshold) {\n springFScale = sqrt(fScale);\n }\n\n float numOfRels = 0.0;\n\n // Springs\n for (float i = 1.0; i <= 256.0 * 256.0; i++) {\n if (numOfRels >= numConnections) {\n break;\n }\n acceleration += getSpringForce(curConnection, numConnections, springFScale, myPosition, i);\n numOfRels += 1.0;\n }\n\n // Repulsion && collision detection\n if (u_collisionMultiplier > 0.0) {\n float number_of_collisions = 0.0;\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= u_numNodes) {\n break;\n }\n\n if (i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize) * 2.0;\n\n if (dist < combinedNodeSize && number_of_collisions < 40.0) {\n number_of_collisions++;\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n if (i >= clusterStartIndex && i < clusterStartIndex + clusterSize) {\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n } else {\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize);\n\n if (dist < combinedNodeSize) {\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n\n // Gravity\n vec2 delta = getDelta(u_gravityCenter, myPosition.xy);\n float dist = length(delta);\n\n vec2 grav = (delta / dist) * u_gravity * fScale;\n acceleration += grav * smoothstep(0.0, 500.0, dist);\n\n float accMagnitude = length(acceleration);\n acceleration *= min(MAX_ACCELERATION, accMagnitude) / accMagnitude;\n\n float iterationFrictionThreshold = 1000.0;\n\n if (u_curIteration > iterationFrictionThreshold) {\n float friction = 1.0 + pow((u_curIteration - iterationFrictionThreshold), 2.0) / 100.0;\n acceleration *= 1.0 / friction;\n }\n\n if (u_curIteration == 0.0) {\n gl_FragColor = vec4(myPosition.xy, acceleration * TIMESTEP * 0.5);\n } else {\n myPosition.zw = myPosition.zw * VELOCITYDECAY;\n gl_FragColor = vec4(myPosition.xy + myPosition.zw * TIMESTEP, myPosition.zw + acceleration * TIMESTEP);\n }\n}";this.physShader=new ko(e,Bo,d,{INTEL_WORKAROUND:this.intelWorkaround?1:0}),this.physShader.use(),this.physShader.setUniform("u_projection",this.physProjection),this.physShader.setUniform("u_baseLength",this.getBaseLength()),this.physShader.setUniform("u_connections",this.springTexture),this.physShader.setUniform("u_sizeTexture",this.sizeTexture),this.physShader.setUniform("u_connectionOffsets",this.offsetTexture),this.physShader.setUniform("u_pinnedNodes",this.pinTexture),this.physShader.setUniform("u_gravityCenter",this.nodeCenterPoint),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_gravity",this.gravity)}},{key:"setupPhysicsForCoarse",value:function(){var e=this,t=this.gl;this.levelsData=[],this.levelsClusterTexture=[],this.levelsFinestIndexTexture=[];var n,r,o=this.subGraphs.length,i=function(e,t,r,o,i){n[4*e+0]=t,n[4*e+1]=r,n[4*e+2]=i.size(),n[4*e+3]=o||1};if(1===o){n=new Float32Array(262144);var a=this.subGraphs[0].nodes;a.forEach(function(e,t){i(t,0,0,e.weight,{size:function(){return a.length}})}),this.levelsClusterTexture[0]=this.newTexture(t,n,Zo)}else for(var s=function(){var o=e.subGraphs[u].nodes,a=u===e.subGraphs.length-1?[]:e.subGraphs[u+1].nodes;n=new Float32Array(262144),r=new Float32Array(65536);var s=0;if(a.length>0){var l=a.slice();l.sort(function(e,t){return e.previousIndex-t.previousIndex}),l.forEach(function(e,t){var n=s,u=a.indexOf(e);i(s,u,n,o[e.id].weight,e),r[s]=o[s].finestIndex,s+=1,e.planets.forEach(function(t){i(s,u,n,t.weight,e),r[s]=o[s].finestIndex,s+=1,t.moons.forEach(function(t){i(s,u,n,t.weight,e),r[s]=o[s].finestIndex,s+=1})})})}else o.forEach(function(e,t){i(t,0,0,e.weight,{size:function(){return o.length}}),r[t]=o[t].finestIndex});var c=e.newTexture(t,null,Zo),f=e.newFramebuffer(t,c);e.levelsData[u]={texture:c,frameBuffer:f},e.levelsClusterTexture[u]=e.newTexture(t,n,Zo),e.levelsFinestIndexTexture[u]=e.newTexture(t,r,pr,t.FLOAT,t.ALPHA)},u=this.subGraphs.length-1;u>=0;u--)s();for(var l=new Float32Array(262144),c=0;c= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterArea = pow(clusterSize + u_baseLength * 2.0, 2.0);\n\n float finestIndex = getTextureData(u_finestIndexes, index, 256.0).a;\n vec4 myPosition = getTextureData(u_physData, finestIndex, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n\n vec2 acceleration = previousForce.xy;\n\n // Repulsion & Collision Detection\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherClusterData = getTextureData(u_clusterData, i, 256.0);\n float otherClusterWeight = getSquaredLogClusterWeight(otherClusterData.w);\n\n float otherFinestIndex = getTextureData(u_finestIndexes, i, 256.0).a;\n vec4 otherPosition = getTextureData(u_physData, otherFinestIndex, 256.0);\n\n vec2 delta = myPosition.xy - otherPosition.xy;\n float dist = max(length(delta), 0.0000001);\n float maxDist = 25.0;\n float repulsionForceScale = 0.1;\n\n float F = (clusterArea * fScale) / (dist * dist);\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.2;\n }\n\n acceleration += ((delta / sqrt(dist)) * F) * repulsionForceScale * otherClusterWeight;\n\n if (dist < maxDist) {\n float collide = (maxDist - dist) / (dist * dist);\n acceleration += delta * collide * fScale * maxDist / (maxDist + 1.0);\n }\n }\n\n gl_FragColor = vec4(acceleration, vec2(finestIndex, 0));\n}":"precision mediump float;\nuniform sampler2D u_physData;\nuniform sampler2D u_clusterData;\nuniform sampler2D u_finestIndexes;\nuniform sampler2D u_prevForce;\n\nuniform float u_baseLength;\nuniform float u_numNodes;\nuniform float u_iterationMultiplier;\nuniform float u_isTopLevel;\n\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nfloat getLogClusterWeight(float value) {\n return value / max(log(value), 1.0);\n}\n\nvoid main(void) {\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * 256.0;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n\n float finestIndex = getTextureData(u_finestIndexes, index, 256.0).a;\n vec4 myPosition = getTextureData(u_physData, finestIndex, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n\n vec2 acceleration = previousForce.xy;\n\n // Repulsion & Collision Detection\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherClusterData = getTextureData(u_clusterData, i, 256.0);\n float otherClusterWeight = getLogClusterWeight(otherClusterData.w);\n\n float otherFinestIndex = getTextureData(u_finestIndexes, i, 256.0).a;\n vec4 otherPosition = getTextureData(u_physData, otherFinestIndex, 256.0);\n\n vec2 delta = myPosition.xy - otherPosition.xy;\n float dist = max(length(delta), 0.0000001);\n float maxDist = 25.0;\n float repulsionForceScale = 0.1;\n\n float F = ((u_baseLength * u_baseLength) * (fScale / 1.5)) / dist;\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.3;\n }\n\n acceleration += ((delta / dist) * F) * repulsionForceScale * otherClusterWeight;\n\n if (dist < maxDist) {\n float collide = (maxDist - dist) / dist;\n acceleration += delta * collide * fScale * maxDist / (maxDist + 1.0);\n }\n }\n\n gl_FragColor = vec4(acceleration, vec2(finestIndex, 0));\n}";this.apprxRepForceShader=new ko(t,Bo,f),this.apprxRepForceShader.use(),this.apprxRepForceShader.setUniform("u_projection",this.physSmallProjection)}},{key:"setupPinData",value:function(){var e=this.gl;this.pinTexture=e.createTexture(),this.pinData=new Uint8Array(65536);for(var t=0;t<65536;t++)this.pinData[t]=0;e.bindTexture(e.TEXTURE_2D,this.pinTexture),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,pr,pr,0,e.ALPHA,e.UNSIGNED_BYTE,this.pinData),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}},{key:"setupUpdates",value:function(){var e=this.gl;this.updateData=new Float32Array(65536),this.updateTexture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.updateTexture),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,pr,pr,0,e.ALPHA,e.FLOAT,this.updateData),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),this.updateShader=new ko(e,Bo,"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_updateData;\nuniform float u_numNodesNew;\n\nconst float INDEX_FLAG = 999999.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5)*textureSide;\n\n if (index >= u_numNodesNew) {\n discard;\n }\n\n float firstValue = getTextureData(u_updateData, index * 2.0, 256.0).a;\n float secondValue = getTextureData(u_updateData, index * 2.0 + 1.0, 256.0).a;\n\n if (secondValue == INDEX_FLAG) {\n vec4 myPosition = getTextureData(u_physData, firstValue, 256.0);\n gl_FragColor = myPosition;\n } else {\n gl_FragColor = vec4(firstValue, secondValue, 0.0, 0.0);\n }\n}\n"),this.updateShader.use(),this.updateShader.setUniform("u_projection",this.physProjection)}},{key:"setupReadpixelWorkaround",value:function(){var e=this.gl;this.workaroundShader=new ko(e,Bo,"precision lowp float;\n\nuniform sampler2D u_physData;\nuniform float u_index;\n\nfloat shift_right (float v, float amt) { \n v = floor(v) + 0.5; \n return floor(v / exp2(amt)); \n}\n\nfloat shift_left (float v, float amt) { \n return floor(v * exp2(amt) + 0.5); \n}\n\nfloat mask_last (float v, float bits) { \n return mod(v, shift_left(1.0, bits)); \n}\n\nfloat extract_bits (float num, float from, float to) { \n from = floor(from + 0.5); to = floor(to + 0.5); \n return mask_last(shift_right(num, from), to - from); \n}\n\n// From https://stackoverflow.com/questions/17981163/webgl-read-pixels-from-floating-point-render-target\nvec4 encode_float (float val) { \n if (val == 0.0) return vec4(0, 0, 0, 0); \n float sign = val > 0.0 ? 0.0 : 1.0; \n val = abs(val); \n float exponent = floor(log2(val)); \n float biased_exponent = exponent + 127.0; \n float fraction = ((val / exp2(exponent)) - 1.0) * 8388608.0; \n float t = biased_exponent / 2.0; \n float last_bit_of_biased_exponent = fract(t) * 2.0; \n float remaining_bits_of_biased_exponent = floor(t); \n float byte4 = extract_bits(fraction, 0.0, 8.0) / 255.0; \n float byte3 = extract_bits(fraction, 8.0, 16.0) / 255.0; \n float byte2 = (last_bit_of_biased_exponent * 128.0 + extract_bits(fraction, 16.0, 23.0)) / 255.0; \n float byte1 = (sign * 128.0 + remaining_bits_of_biased_exponent) / 255.0; \n return vec4(byte4, byte3, byte2, byte1); \n}\n\nvoid main(void) {\n vec4 texData = texture2D(u_physData, gl_FragCoord.xy / 255.0);\n float data;\n if (u_index == 0.0) {\n data = texData.x;\n } else if (u_index == 1.0) {\n data = texData.y;\n } else if (u_index == 2.0) {\n data = texData.z;\n } else if (u_index == 3.0) {\n data = texData.w;\n }\n\n gl_FragColor = encode_float(data);\n}\n"),this.workaroundShader.use(),this.workaroundShader.setUniform("u_projection",this.physProjection),this.workaroundData=[];for(var t=0;t<4;t++){var n=new Uint8Array(262144),r=this.newTexture(e,null,pr,e.UNSIGNED_BYTE),o=this.newFramebuffer(e,r);this.workaroundData.push({dataByte:n,dataFloat:new Float32Array(n.buffer),texture:r,frameBuffer:o})}}},{key:"doReadpixelWorkaround",value:function(){for(var e=this.gl,t=0;t<4;t++){var n=this.workaroundData[t];e.bindFramebuffer(e.FRAMEBUFFER,n.frameBuffer),e.viewport(0,0,pr,pr),this.workaroundShader.use(),this.workaroundShader.setUniform("u_index",t),this.workaroundShader.setUniform("u_physData",this.getPhysData(0).texture),e.bindBuffer(e.ARRAY_BUFFER,this.physVbo),this.workaroundShader.setAttributePointer("a_position",2,0,2),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.readPixels(0,0,pr,pr,e.RGBA,e.UNSIGNED_BYTE,n.dataByte)}}},{key:"definePhysicsArrays",value:function(){this.physData=[],this.levelsData=[],this.levelsClusterTexture=[],this.levelsFinestIndexTexture=[]}}],n&&function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]&&arguments[0],t=this.state,n=t.nodes,r=t.rels,o=n.channels[oi],i=r.channels[oi],a=Object.values(o.adds).length,s=Object.values(i.adds).length,u=Object.values(o.adds).map(function(e){return e.id}),l=Object.values(i.adds).map(function(e){return e.id}),c=new Set(Object.keys(o.adds)),f=new Set(Object.keys(i.adds));if(n.clearChannel(oi),r.clearChannel(oi),this.currentLayoutType===ii&&this.enableCytoscape&&n.items.length<=100&&a<100&&a>0&&s>0){var h=n.items.map(function(e){return e.id}),d=new Set([].concat(ei(h),ei(u))),p=r.items.map(function(e){return e.id}),v=new Set([].concat(ei(p),ei(l)));if(d.size<=100&&v.size<=300){var g=function(e,t,n,r){var o,i=new Set(e),a=Pr(new Set(t));try{for(a.s();!(o=a.n()).done;){var s=o.value,u=r.idToItem[s];if(u){var l=u.from,c=u.to;i.add(l),i.add(c)}}}catch(e){a.e(e)}finally{a.f()}var f,h=function(e){var t,n={},r={},o=Pr(e);try{for(o.s();!(t=o.n()).done;){for(var i=t.value,a=i.from,s=i.to,u="".concat(a,"-").concat(s),l="".concat(s,"-").concat(a),c=0,f=[u,l];c0;){var r=t.shift();if(v[r]=n.idToItem[r],void 0!==d[r]){var o,i=Pr(d[r]);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(!v[a]){t.push(a);var s=p["".concat(r,"-").concat(a)];if(s){var u,l=Pr(s);try{for(l.s();!(u=l.n()).done;){var c=u.value;g[c.id]||(g[c.id]=c)}}catch(e){l.e(e)}finally{l.f()}}}}}catch(e){i.e(e)}finally{i.f()}}}},m=Pr(i);try{for(m.s();!(f=m.n()).done;)y(f.value)}catch(e){m.e(e)}finally{m.f()}return{connectedNodes:v,connectedRels:g}}(c,f,n,r),y=g.connectedNodes,m=g.connectedRels,b=Object.values(y),_=Object.values(m),w=b.length,x=_.length;w===c.size&&x===f.size&&(f.size>0||c.size>0)?(this.setLayout(ai),this.coseBilkentLayout.update(!0,n.items,r.items)):x>0&&f.size/x>.25&&(this.setLayout(ai),this.coseBilkentLayout.update(!0,b,_))}}this.physLayout.update(e),this.coseBilkentLayout.update(e)}},{key:"getShouldUpdate",value:function(){return this.currentLayout.getShouldUpdate()}},{key:"getComputing",value:function(){return this.currentLayout.getComputing()}},{key:"updateNodes",value:function(e){this.setLayout(ii),this.physLayout.updateNodes(e)}},{key:"getNodePositions",value:function(e){return this.currentLayout.getNodePositions(e)}},{key:"terminateUpdate",value:function(){this.physLayout.terminateUpdate(),this.coseBilkentLayout.terminateUpdate()}},{key:"destroy",value:function(){this.physLayout.destroy(),this.coseBilkentLayout.destroy()}}],n&&function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||e){var t=this.state,n=t.nodes,r=t.rels,o=Object.values(n.channels[vi].adds).length>0,i=Object.values(r.channels[vi].adds).length>0,a=Object.values(n.channels[vi].removes).length>0,s=Object.values(r.channels[vi].removes).length>0;(o||i||a||s)&&this.layout(n.items,n.idToItem,n.idToPosition),n.clearChannel(vi),r.clearChannel(vi)}this.shouldUpdate=!1}},{key:"layout",value:function(e,n,r){var o,i=void 0!==(o=e)?mn(o):o;if(!(0,t.isEmpty)(i)){for(var a={},s=0;s=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function wi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||e){var t=this.state,n=t.nodes,r=t.rels,o=Object.values(n.channels[Ei].adds).length>0,i=Object.values(r.channels[Ei].adds).length>0,a=Object.values(n.channels[Ei].removes).length>0,s=Object.values(r.channels[Ei].removes).length>0;(o||i||a||s)&&(this.layout(n.items,n.idToItem,n.idToPosition,r.items),n.idToPosition=this.positions),n.clearChannel(Ei),r.clearChannel(Ei)}this.shouldUpdate=!1}},{key:"layout",value:function(e,n,r,o){var i,a=(i=e)?mn(i):i;if(!(0,t.isEmpty)(a)){for(var s=a.length,u=Math.ceil(Math.sqrt(s)),l=new Array(s),c=0,f=0;f=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Gi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gi=function(){return!!e})()}function Hi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yi(){return Yi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qi(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Yi.apply(this,arguments)}function qi(e){return qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qi(e)}function Xi(e,t){return Xi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xi(e,t)}function Ki(e,t,n){return(t=Zi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zi(e){var t=function(e){if("object"!=Vi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vi(t)?t:String(t)}var $i="HierarchicalLayout",Qi=function(e){return void 0!==e?mn(e):e},Ji=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ki(Hi(n=function(e,t,n){return t=qi(t),function(e,t){if(t&&("object"===Vi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hi(e)}(e,Gi()?Reflect.construct(t,n||[],qi(e).constructor):t.apply(e,n))}(this,t,[e])),"direction",void 0),Ki(Hi(n),"packing",void 0),Ki(Hi(n),"stateDisposers",void 0),Ki(Hi(n),"oldComputing",void 0),Ki(Hi(n),"computing",void 0),Ki(Hi(n),"pendingLayoutData",void 0),Ki(Hi(n),"worker",void 0),Ki(Hi(n),"directionChanged",void 0),Ki(Hi(n),"packingChanged",void 0),Ki(Hi(n),"workersDisabled",void 0),n.direction=Ni,n.packing=Li;var r=n.state,o=r.nodes,i=r.rels;return o.addChannel($i),i.addChannel($i),n.stateDisposers=[n.state.reaction(function(){return n.state.graphUpdates},function(){if(void 0!==o.version){var e=o.channels[$i],t=Object.values(e.adds).length>0,r=Object.values(e.removes).length>0,a=Object.values(e.updates),s=kr(a);n.shouldUpdate=n.shouldUpdate||t||r||s}if(void 0!==i.version){var u=i.channels[$i],l=Object.values(u.adds).length>0,c=Object.values(u.removes).length>0;n.shouldUpdate=n.shouldUpdate||l||c}})],n.shouldUpdate=!0,n.oldComputing=!1,n.computing=!1,n.workersDisabled=e.state.disableWebWorkers,n.setOptions(e),n.worker=Kr("HierarchicalLayout",n.workersDisabled),n.pendingLayoutData=null,n.layout(o.items,o.idToItem,o.idToPosition,i.items),n}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xi(e,t)}(t,e),n=t,r=[{key:"setOptions",value:function(e){if(void 0!==e&&function(e){return Object.keys(e).every(function(e){return Si.has(e)})}(e)){var t=e.direction,n=void 0===t?Ni:t,r=e.packing,o=void 0===r?Li:r;Object.keys(Di).includes(n)&&(this.directionChanged=this.direction&&this.direction!==n,this.direction=n),Bi.includes(o)&&(this.packingChanged=this.packing&&this.packing!==o,this.packing=o),this.shouldUpdate=this.shouldUpdate||this.directionChanged||this.packingChanged}}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||e){var n=this.state,r=n.nodes,o=n.rels,i=this.directionChanged,a=this.packingChanged,s=Object.values(r.channels[$i].adds).length>0,u=Object.values(o.channels[$i].adds).length>0,l=Object.values(r.channels[$i].removes).length>0,c=Object.values(o.channels[$i].removes).length>0,f=Object.values(r.channels[$i].updates),h=kr(f);(e||s||u||l||c||i||a||h)&&this.layout(r.items,r.idToItem,r.idToPosition,o.items),r.clearChannel($i),o.clearChannel($i),this.directionChanged=!1,this.packingChanged=!1}Yi(qi(t.prototype),"update",this).call(this),this.shouldUpdate=!1,this.oldComputing=this.computing}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate||this.shouldUpdateAnimator}},{key:"getComputing",value:function(){return this.computing}},{key:"layout",value:function(e,t,n,r){var o=this;if(this.worker){var i=Qi(e).map(function(e){return e.html,Wi(e,Fi)}),a=Qi(t),s={};Object.keys(a).forEach(function(e){var t=a[e],n=(t.html,Wi(t,Ui));s[e]=n});var u=Qi(r).map(function(e){return e.captionHtml,Wi(e,zi)}),l=Qi(n),c=this.direction,f=this.packing,h=window.devicePixelRatio,d={nodes:i,nodeIds:s,idToPosition:l,rels:u,direction:c,packing:f,pixelRatio:h,forcedDelay:0};this.computing?this.pendingLayoutData=d:(this.worker.port.onmessage=function(e){var t=e.data,n=t.positions,r=t.parents,i=t.waypoints;o.computing&&(o.positions=n),o.parents=r,o.state.setWaypoints(i),null!==o.pendingLayoutData?(o.worker.port.postMessage(o.pendingLayoutData),o.pendingLayoutData=null):o.computing=!1,o.shouldUpdate=!0,o.startAnimation()},this.computing=!0,this.worker.port.postMessage(d))}else Yr.info("Hierarchical layout code not yet initialised.")}},{key:"terminateUpdate",value:function(){var e,t;this.computing=!1,this.shouldUpdate=!1,null===(e=this.state.nodes)||void 0===e||e.clearChannel($i),null===(t=this.state.rels)||void 0===t||t.clearChannel($i)}},{key:"destroy",value:function(){var e;this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel($i),this.state.rels.removeChannel($i),null===(e=this.worker)||void 0===e||e.port.close()}}],r&&function(e,t){for(var n=0;n0?(this.currentTime-this.startTime)/t:1)>=1?(this.currentValue=this.endValue,this.status=2):(this.currentValue=this.startValue+e*(this.endValue-this.startValue),this.hasNextAnimation=!0),this.hasNextAnimation}},{key:"setEndValue",value:function(e){this.endValue!==e&&(e-this.currentValue!=0?(this.currentTime=(new Date).getTime(),this.status=1,this.startValue=this.currentValue,this.endValue=e,this.startTime=this.currentTime,this.setEndTime(this.startTime+this.duration)):this.endValue=e)}},{key:"setEndTime",value:function(e){this.endTime=Math.max(e,this.startTime)}}])&&function(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:1;if(this.ignoreAnimationsFlag)return n;var a=null!==(r=this.getById(e))&&void 0!==r?r:{};if(void 0===a[t]){var s=1===i?this.createSizeAnimation(0,e,t):this.createFadeAnimation(0,e,t);s.setEndValue(n),o=s.currentValue}else{var u=a[t];if(u.currentValue===n)return n;u.setEndValue(n),o=u.currentValue}return this.hasNextAnimation=!0,o}},{key:"createAnimation",value:function(e,t,n){var r,o=new ra(t,e),i=null!==(r=this.animations.get(t))&&void 0!==r?r:{};return this.animations.set(t,aa(aa({},i),{},sa({},n,o))),o}},{key:"getById",value:function(e){return this.animations.get(e)}},{key:"createFadeAnimation",value:function(e,t,n){var r,o=this.createAnimation(e,t,n);return o.setDuration(null!==(r=this.durations[0])&&void 0!==r?r:this.defaultDuration),o}},{key:"createSizeAnimation",value:function(e,t,n){var r,o=this.createAnimation(e,t,n);return o.setDuration(null!==(r=this.durations[1])&&void 0!==r?r:this.defaultDuration),o}}],n&&function(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.getOrCreateEntry(e),r=t?"inverted":"image",o=n[r];return void 0===o&&(o=this.loadImage(e),n[r]=o),this.drawIfNeeded(o,t),o.canvas}},{key:"getOrCreateEntry",value:function(e){return void 0===this.cache[e]&&(this.cache[e]={}),this.cache[e]}},{key:"invertCanvas",value:function(e){for(var t=e.getImageData(0,0,ha,ha),n=t.data,r=0;r<4096;r++){var o=4*r;n[o]^=255,n[o+1]^=255,n[o+2]^=255}e.putImageData(t,0,0)}},{key:"loadImage",value:function(e){var t=document.createElement("canvas");t.width=ha,t.height=ha;var n=new Image;return n.src=e,n.crossOrigin="anonymous",{canvas:t,image:n,drawn:!1}}},{key:"drawIfNeeded",value:function(e,t){var n=e.image,r=e.canvas;if(!e.drawn&&n.complete){var o=r.getContext("2d");try{o.drawImage(n,0,0,ha,ha)}catch(e){Yr.error("Failed to draw image",n.src,e),o.beginPath(),o.strokeStyle="black",o.rect(0,0,ha,ha),o.moveTo(0,0),o.lineTo(ha,ha),o.moveTo(0,ha),o.lineTo(ha,0),o.stroke(),o.closePath()}t&&this.invertCanvas(o),e.drawn=!0}}}],n&&function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)){var o=n[0].rel,i=o.from,a=o.to;this.fromId=i,this.toId=a}}},{key:"size",value:function(){return this.rels.length}},{key:"maxFontSize",value:function(){return Math.max.apply(Math,function(e){if(Array.isArray(e))return ga(e)}(e=this.rels.map(function(e){var n=e.rel;return(0,t.isNumber)(n.captionSize)?n.captionSize:1}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ga(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ga(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var e}},{key:"relIsOppositeDirection",value:function(e){var t=e.from,n=e.to,r=this.fromId,o=this.toId;return t!==r&&n!==o||t===o&&n===r}},{key:"indexOf",value:function(e){var t=e.id;return this.rels.findIndex(function(e){return e.rel.id===t})}},{key:"getRel",value:function(e){var t=this.rels;return e<0||e>=t.length?null:t[e].rel}},{key:"setWaypoints",value:function(e){this.waypointPath=e}},{key:"setAngles",value:function(e){this.angles=e}}],r&&function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;n--){var r=void 0,o=void 0;0===n?(o=e[e.length-1],r=e[n]-e[e.length-1]+2*Math.PI):(o=e[n-1],r=e[n]-e[n-1]),t.push({size:r,start:o})}t.sort(function(e,t){return t.size-e.size})}return t},Aa=function(e,t){for(;t>e.length||e[0].size>2*e[t-1].size;)e.push({size:e[0].size/2,start:e[0].start}),e.push({size:e[0].size/2,start:e[0].start+e[0].size/2}),e.shift(),e.sort(function(e,t){return t.size-e.size});return e},ka=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ta(this,"bundles",void 0),Ta(this,"nodeToBundles",void 0),this.bundles={},this.nodeToBundles={};var r=t.reduce(function(e,t){return e[t.id]=t,e},{});this.updateData(r,{},n)}var t,n;return t=e,n=[{key:"getBundle",value:function(e){var t=this.bundles,n=this.nodeToBundles,r=this.generatePairId(e.from,e.to),o=t[r];return void 0===o&&(o=new ba(r,e.from,e.to),t[r]=o,void 0===n[e.from]&&(n[e.from]=[]),void 0===n[e.to]&&(n[e.to]=[]),n[e.from].push(o),n[e.to].push(o)),o}},{key:"updateData",value:function(e,t,n){for(var r=this.bundles,o=this.nodeToBundles,i=function(e,t){var n=o[t].findIndex(function(t){return t===e});-1!==n&&o[t].splice(n,1),0===o[t].length&&delete o[t]},a=Object.values(e),s=Object.values(t),u=0,l=a;u0&&(s=(o=Ba(u,l,r))e.length)&&(t=e.length);for(var n=0,r=new Array(t);n4&&void 0!==arguments[4]&&arguments[4],a=[],s=[],u=0,l=0,c=!1,f=!1,h=0;hp||(h=e[v-1],"\n\r\v".includes(h))){if(!(lp;){for(g-=1;n=e[g-1]," \t\n\r\v".includes(n);)g-=1;if(!(g-u>1)){o="",f=!0,c=!1;break}o=e.slice(u,g),d=t(o),f=!0,c=!1}return s[l]={text:o,hasEllipsisChar:f,hasHyphenChar:c},{v:s}}c=!1,f=!1;var y=function(e){var t=e.length,n=Math.min(t-1,3);if(1===t)return{hyphen:!1,cnt:0};for(var r=0;rp;){if(!(m-u>1)){o=e[u],m=u+1,d=t(o),c=!1;break}m-=1,o=e.slice(u,m),d=t(o),c=!0}else o=(o=e.slice(u,m)).trim();s[l]={text:o,hasEllipsisChar:f,hasHyphenChar:c},u=m,l+=1}},v=1;v<=e.length;v++)if(d=p())return d.v;return o=e.slice(u,e.length),s[l]={text:o,hasEllipsisChar:f,hasHyphenChar:!1},s},Ja=function(e,t,n,r,o,i,a,s){e.font="bold ".concat(r,"px ").concat(n).replace(/"/g,"");for(var u=function(t){var n;return null===(n=e.measureText(t))||void 0===n?void 0:n.width},l=i?(a<4?["",""]:[""]).length:0,c=function(e,t){return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"top",o=.98*n,i=.89*n,a=.95*n;return 1===t?o:2===t?a:3===t&&"top"===r?0===e||2===e?i:o:4===t&&"top"===r?0===e||3===e?.78*n:a:5===t&&"top"===r?0===e||4===e?.65*n:1===e||3===e?i:a:o}(e+l,t+l,o)},f=1,h=[],d=function(){if(0===(h=function(e,t,n,r){var o,i=e.split(/\s/g).filter(function(e){return e.length>0}),a=[],s=null,u=function(e){return t(e)>n(a.length,r)},l=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=qa(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(i);try{for(l.s();!(o=l.n()).done;){var c=o.value,f=s?"".concat(s," ").concat(c):c;if(t(f)r)return[]}}}catch(e){l.e(e)}finally{l.f()}if(s){var d=u(s);a.push({text:s,overflowed:d})}return a.length<=r?a:[]}(t,u,c,f)).length)h=Qa(t,u,c,f,a>f);else if(h.some(function(e){return e.overflowed})){var e=f;h=h.reduce(function(t,n){var r=a-t.length;if(0===r){var o=t[t.length-1];return o.text.endsWith(Ka)||(u(o.text)+u(Ka)>c(t.length,e)?(t[t.length-1].text=o.text.slice(0,-2),t[t.length-1].hasEllipsisChar=!0):(t[t.length-1].text=o.text,t[t.length-1].hasEllipsisChar=!0)),t}if(n.overflowed){var i=Qa(n.text,u,c,r);t=t.concat(i)}else t.push({text:n.text,hasEllipsisChar:!1,hasHyphenChar:!1});return t},[])}else h=h.map(function(e){return Ya(Ya({},e),{},{hasEllipsisChar:!1,hasHyphenChar:!1})});f+=1};0===h.length;)d();return Array.from(h)},es=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t,n){var r=t.value;if(r){var o="".concat(n>0&&e.length?", ":"").concat(r);return[].concat(Ga(e),[Ya(Ya({},t),{},{value:o,chars:o.split("").map(function(r,o){var i,a;return 0!==n&&e.length?o<2?null:Ga(null!==(i=t.styles)&&void 0!==i?i:[]):Ga(null!==(a=t.styles)&&void 0!==a?a:[])})})])}return[]},[]);return{stylesPerChar:e.reduce(function(e,t){return[].concat(Ga(e),Ga(t.chars))},[]),fullCaption:e.map(function(e){return e.value}).join("")}};function ts(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n4&&void 0!==arguments[4])||arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=r.headPosition,s=r.headAngle,u=r.headHeight,l=r.headChinHeight,c=r.headWidth,f=Math.cos(s),h=Math.sin(s),d=function(e,t){return{x:a.x+e*f-t*h,y:a.y+e*h+t*f}},p=[d(l-u,0),d(-u,c/2),d(0,0),d(-u,-c/2)],v={lineWidth:e.lineWidth,strokeStyle:e.strokeStyle,fillStyle:e.fillStyle};e.lineWidth=t,e.strokeStyle=n,e.fillStyle=n,function(e,t,n,r){if(e.beginPath(),t.length>0){var o=t[0];e.moveTo(o.x,o.y)}for(var i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function ms(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n5&&void 0!==arguments[5]&&arguments[5],u=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.norm.x,r=e.norm.y;return t?{x:-n,y:-r}:e.norm},l=Sr(),c=t.indexOf(e),f=(t.size()-1)/2,h=c>f,d=Math.abs(c-f),p=o?17*t.maxFontSize():8,v=(t.size()-1)*p*l,g=function(e,t,n,r,o,i,a){var s,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=Sr(),c=e.size(),f=c>1,h=e.relIsOppositeDirection(i),d=h?n:t,p=h?t:n,v=e.waypointPath,g=null==v?void 0:v.points,y=null==v?void 0:v.from,m=null==v?void 0:v.to,b=Da(d,y)&&Da(p,m)||Da(p,y)&&Da(d,m),_=b?g[1]:null,w=b?g[g.length-2]:null,x=xs(d),E=xs(p),O=function(e,t){return Math.atan2(e.y-t.y,e.x-t.x)},S=Math.max(Math.PI,bs/(c/2)),T=f?r*S*(a?1:-1)/(null!==(s=d.size)&&void 0!==s?s:gr):0,P=O(b?_:p,d),C=b?O(p,w):P,A=function(e,t,n,r){return{x:e.x+Math.cos(t)*n*(r?-1:1),y:e.y+Math.sin(t)*n*(r?-1:1)}},k=function(e,t){return A(d,P+e,t,!1)},I=function(e,t){return A(p,C-e,t,!0)},R=function(e,t){return{x:e.x+(t.x-e.x)/2,y:e.y+(t.y-e.y)/2}},j=function(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))*l},M=k(T,x),N=I(T,E),D=f?k(0,x):null,L=f?I(0,E):null,B=200*l,F=[];if(b){var U=j(M,_)2*(30*l+Math.min(x,E)))if(u){var Y=ws(d,p,x,E,i,e);F.push(new La(M,Y)),F.push(new La(Y,N))}else{var q=r*o,X=30+x,K=Math.sqrt(X*X+q*q),Z=30+E,$=Math.sqrt(Z*Z+q*q),Q=k(0,K),J=I(0,$);F.push(new La(M,Q)),F.push(new La(Q,J)),F.push(new La(J,N))}else if(H>(x+E)/2){var ee=ws(d,p,x,E,i,e);F.push(new La(M,ee)),F.push(new La(ee,N))}else F.push(new La(M,N))}return F}(t,n,r,d,p,e,h,s),y=[],m=g[0],b=u(m,h);y.push({x:m.p1.x+b.x,y:m.p1.y+b.y});for(var _=1;_8&&void 0!==arguments[8]&&arguments[8],c=Sr(),f=o.selected,h=o.captions,d=void 0===h?[]:h,p=o.caption,v=void 0===p?"":p,g=o.width,y=o.disabled,m=o.captionAlign,b=void 0===m?"top":m,_=o.captionSize,w=void 0===_?1:_,x=d.length>0?null===(u=es(d))||void 0===u?void 0:u.fullCaption:v;if(void 0!==x){var E=6*w*c,O=!0===f?"bold":"normal",S=x;e.fillStyle=!0===y?a.fontColor:s,e.font="".concat(O," ").concat(E,"px ").concat('"Open Sans", sans-serif');var T=function(t){return e.measureText(t).width},P=(null!=g?g:1)*(!0===f?1.5:1),C=T(S);if(C>r){var A=Qa(S,T,function(){return r},1,!1)[0];S=!0===A.hasEllipsisChar?"".concat(A.text,"..."):S,C=r}var k=Math.cos(n),I=Math.sin(n),R={x:t.x,y:t.y},j=R.x,M=R.y,N=n;l&&(N=n-_s,j+=2*E*k,M+=2*E*I,N-=_s);var D=(1+w)*c,L="bottom"===b?E/2+P+D:-(P+D);e.translate(j,M),e.rotate(N),e.fillText(S,-C/2,L),e.rotate(-N),e.translate(-j,-M);var B=2*L*Math.sin(n),F=2*L*Math.cos(n),U={position:{x:t.x-B,y:t.y+F},rotation:l?n-Math.PI:n,width:r/c,height:(E+D)/c};i.setLabelInfo(o.id,U)}},Ps=function(e,t,n,r,o){if(e.beginPath(),e.moveTo(t[0].x,t[0].y),o&&t.length>2){for(var i=1;i10&&void 0!==arguments[10])||arguments[10];Na(n,r)&&(n.id===r.id?function(e,t,n,r,o,i,a,s){var u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:_a,l=t.overlayIcon,c=t.selected,f=t.width,h=t.hovered,d=t.disabled,p=t.color,v=Is(t,n,r),g=v.startPoint,y=v.endPoint,m=v.apexPoint,b=v.control1Point,_=v.control2Point,w=a.rings,x=a.shadow,E=Sr(),O=w[0].color,S=w[1].color,T=w[0].width*E,P=w[1].width*E,C=40*E,A=(null!=f?f:1)*E,k=A>1?A/2:1,I=9*k,R=2*k,j=7*k,M=!0===c,N=!0===d,D=void 0!==l,L=Math.atan2(y.y-_.y,y.x-_.x),B=M?T*Math.sqrt(1+2*I/j*(2*I/j)):0,F={x:y.x-Math.cos(L)*(.5*I-R+B),y:y.y-Math.sin(L)*(.5*I-R+B)},U={headPosition:{x:y.x+Math.cos(L)*(.5*I-R-B),y:y.y+Math.sin(L)*(.5*I-R-B)},headAngle:L,headHeight:I,headChinHeight:R,headWidth:j};if(e.save(),e.lineCap="round",M&&(Es(e,x),e.lineWidth=A+P,e.strokeStyle=S,Rs(e,g,F,m,b,_),as(e,P,S,U,!1,!0),Os(e),e.lineWidth=A+T,e.strokeStyle=O,Rs(e,g,F,m,b,_),as(e,T,O,U,!1,!0)),e.lineWidth=A,!0===h&&!M&&!N){var z=x.color;Es(e,x),e.strokeStyle=z,e.fillStyle=z,Rs(e,g,F,m,b,_),as(e,A,z,U),Os(e)}var V=N?s.color:null!=p?p:u;if(e.fillStyle=V,e.strokeStyle=V,Rs(e,g,F,m,b,_),as(e,A,V,U),i||D){var W,G=r.indexOf(t),H=null!==(W=r.angles[G])&&void 0!==W?W:0,Y=m.x-Math.cos(L)*(B/4),q=m.y-Math.sin(L)*(B/4),X=(H+_s)%bs,K=(H+bs)%bs10&&void 0!==arguments[10]?arguments[10]:_a,f=t.overlayIcon,h=t.color,d=t.disabled,p=t.selected,v=t.width,g=t.hovered,y=t.captionAlign,m=!0===p,b=!0===d,_=void 0!==f,w=u.rings,x=u.shadow,E=Ss(t,o,n,r,a,s),O=Sr(),S=function(e){var t,n=!0===e.selected?1.5:1;return(null!==(t=e.width)&&void 0!==t?t:1)*n*Sr()}(t),T=b?l.color:null!=h?h:c,P=w[0].width*O,C=w[1].width*O,A=O*(v>1?v/2:1),k=9*A,I=2*A,R=7*A,j=vs(E[E.length-2],E[E.length-1]),M=2*k,N=m?P*Math.sqrt(1+M/R*(M/R)):0,D=2-N,L=Math.floor(E.length/2);E.length>2&&m&&jr.x,se=E[L];1&~E.length?(te=E[ae?L:L-1],ne=E[ae?L-1:L],re=(te.x+ne.x)/2,oe=(te.y+ne.y)/2,ie=Math.atan2(ne.y-te.y,ne.x-te.x)):(te=E[ae?L+1:L-1],ne=E[ae?L-1:L+1],s?(re=(se.x+(te.x+ne.x)/2)/2,oe=(se.y+(te.y+ne.y)/2)/2,ie=ae?Math.atan2(n.y-r.y,n.x-r.x):Math.atan2(r.y-n.y,r.x-n.x)):(vs(se,te)>vs(se,ne)?ne=se:te=se,re=(te.x+ne.x)/2,oe=(te.y+ne.y)/2,ie=Math.atan2(ne.y-te.y,ne.x-te.x)));var ue=m?gs(ie+_s,Cs(u)):{x:0,y:0},le=vs(te,ne);if(a){var ce="bottom"===y?1:-1,fe={x:re+ue.x*ce,y:oe+ue.y*ce};Ts(e,fe,ie,le,t,o,l,c)}if(_){var he=f.position,de=void 0===he?[0,0]:he,pe=f.url,ve=f.size,ge=As(void 0===ve?1:ve),ye=ks(de,le,ge),me=ye.widthAlign,be=ye.heightAlign,_e=de[1]<0?-1:1,we=ue.x*_e,xe=ue.y*_e,Ee=ge/2;e.translate(re,oe),e.rotate(ie);var Oe=-Ee+we+me,Se=-Ee+xe+be;e.drawImage(i.getImage(pe),Oe,Se,ge,ge),e.rotate(-ie),e.translate(-re,-oe)}}e.restore()}(e,t,n,r,o,i,a,c,s,u,l))},Ms=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return Na(n,r)?n.id===r.id?function(e,t,n){for(var r=Is(e,t,n),o={left:1/0,top:1/0,right:-1/0,bottom:-1/0},i=["startPoint","endPoint","apexPoint","control1Point","control2Point"],a=0;ao.right&&(o.right=u),lo.bottom&&(o.bottom=l)}return o}(e,n,t):function(e,t,n,r,o,i){var a,s={left:1/0,top:1/0,right:-1/0,bottom:-1/0},u=ys(Ss(e,t,n,r,o,i));try{for(u.s();!(a=u.n()).done;){var l=a.value,c=l.x,f=l.y;cs.right&&(s.right=c),fs.bottom&&(s.bottom=f)}}catch(e){u.e(e)}finally{u.f()}return s}(e,t,n,r,o,i):null};function Ns(e){return Ns="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ns(e)}var Ds=/^\s+/,Ls=/\s+$/;function Bs(e,t){if(t=t||{},(e=e||"")instanceof Bs)return e;if(!(this instanceof Bs))return new Bs(e,t);var n=function(e){var t,n,r,o={r:0,g:0,b:0},i=1,a=null,s=null,u=null,l=!1,c=!1;return"string"==typeof e&&(e=function(e){e=e.replace(Ds,"").replace(Ls,"").toLowerCase();var t,n=!1;if(tu[e])e=tu[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=pu.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=pu.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=pu.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=pu.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=pu.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=pu.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=pu.hex8.exec(e))?{r:au(t[1]),g:au(t[2]),b:au(t[3]),a:cu(t[4]),format:n?"name":"hex8"}:(t=pu.hex6.exec(e))?{r:au(t[1]),g:au(t[2]),b:au(t[3]),format:n?"name":"hex"}:(t=pu.hex4.exec(e))?{r:au(t[1]+""+t[1]),g:au(t[2]+""+t[2]),b:au(t[3]+""+t[3]),a:cu(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=pu.hex3.exec(e))&&{r:au(t[1]+""+t[1]),g:au(t[2]+""+t[2]),b:au(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==Ns(e)&&(vu(e.r)&&vu(e.g)&&vu(e.b)?(t=e.r,n=e.g,r=e.b,o={r:255*ou(t,255),g:255*ou(n,255),b:255*ou(r,255)},l=!0,c="%"===String(e.r).substr(-1)?"prgb":"rgb"):vu(e.h)&&vu(e.s)&&vu(e.v)?(a=uu(e.s),s=uu(e.v),o=function(e,t,n){e=6*ou(e,360),t=ou(t,100),n=ou(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),u=r%6;return{r:255*[n,a,i,i,s,n][u],g:255*[s,n,n,a,i,i][u],b:255*[i,i,s,n,n,a][u]}}(e.h,a,s),l=!0,c="hsv"):vu(e.h)&&vu(e.s)&&vu(e.l)&&(a=uu(e.s),u=uu(e.l),o=function(e,t,n){var r,o,i;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=ou(e,360),t=ou(t,100),n=ou(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=a(u,s,e+1/3),o=a(u,s,e),i=a(u,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,a,u),l=!0,c="hsl"),e.hasOwnProperty("a")&&(i=e.a)),i=ru(i),{ok:l,format:e.format||c,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:i}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function Fs(e,t,n){e=ou(e,255),t=ou(t,255),n=ou(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var u=i-a;switch(o=s>.5?u/(2-i-a):u/(i+a),i){case e:r=(t-n)/u+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(Bs(r));return i}function eu(e,t){t=t||6;for(var n=Bs(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(Bs({h:r,s:o,v:i})),i=(i+s)%1;return a}Bs.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=ru(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Us(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Us(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Fs(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Fs(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return zs(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[su(Math.round(e).toString(16)),su(Math.round(t).toString(16)),su(Math.round(n).toString(16)),su(lu(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*ou(this._r,255))+"%",g:Math.round(100*ou(this._g,255))+"%",b:Math.round(100*ou(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*ou(this._r,255))+"%, "+Math.round(100*ou(this._g,255))+"%, "+Math.round(100*ou(this._b,255))+"%)":"rgba("+Math.round(100*ou(this._r,255))+"%, "+Math.round(100*ou(this._g,255))+"%, "+Math.round(100*ou(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(nu[zs(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+Vs(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=Bs(e);n="#"+Vs(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Bs(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Ys,arguments)},brighten:function(){return this._applyModification(qs,arguments)},darken:function(){return this._applyModification(Xs,arguments)},desaturate:function(){return this._applyModification(Ws,arguments)},saturate:function(){return this._applyModification(Gs,arguments)},greyscale:function(){return this._applyModification(Hs,arguments)},spin:function(){return this._applyModification(Ks,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Js,arguments)},complement:function(){return this._applyCombination(Zs,arguments)},monochromatic:function(){return this._applyCombination(eu,arguments)},splitcomplement:function(){return this._applyCombination(Qs,arguments)},triad:function(){return this._applyCombination($s,[3])},tetrad:function(){return this._applyCombination($s,[4])}},Bs.fromRatio=function(e,t){if("object"==Ns(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:uu(e[r]));e=n}return Bs(e,t)},Bs.equals=function(e,t){return!(!e||!t)&&Bs(e).toRgbString()==Bs(t).toRgbString()},Bs.random=function(){return Bs.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Bs.mix=function(e,t,n){n=0===n?0:n||50;var r=Bs(e).toRgb(),o=Bs(t).toRgb(),i=n/100;return Bs({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},Bs.readability=function(e,t){var n=Bs(e),r=Bs(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Bs.isReadable=function(e,t,n){var r,o,i,a,s,u=Bs.readability(e,t);switch(o=!1,"AA"!==(a=((i=(i=n)||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(i.size||"small").toLowerCase())&&"large"!==s&&(s="small"),(r={level:a,size:s}).level+r.size){case"AAsmall":case"AAAlarge":o=u>=4.5;break;case"AAlarge":o=u>=3;break;case"AAAsmall":o=u>=7}return o},Bs.mostReadable=function(e,t,n){var r,o,i,a,s=null,u=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var l=0;lu&&(u=r,s=Bs(t[l]));return Bs.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,Bs.mostReadable(e,["#fff","#000"],n))};var tu=Bs.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},nu=Bs.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(tu);function ru(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ou(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function iu(e){return Math.min(1,Math.max(0,e))}function au(e){return parseInt(e,16)}function su(e){return 1==e.length?"0"+e:""+e}function uu(e){return e<=1&&(e=100*e+"%"),e}function lu(e){return Math.round(255*parseFloat(e)).toString(16)}function cu(e){return au(e)/255}var fu,hu,du,pu=(hu="[\\s|\\(]+("+(fu="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+fu+")[,|\\s]+("+fu+")\\s*\\)?",du="[\\s|\\(]+("+fu+")[,|\\s]+("+fu+")[,|\\s]+("+fu+")[,|\\s]+("+fu+")\\s*\\)?",{CSS_UNIT:new RegExp(fu),rgb:new RegExp("rgb"+hu),rgba:new RegExp("rgba"+du),hsl:new RegExp("hsl"+hu),hsla:new RegExp("hsla"+du),hsv:new RegExp("hsv"+hu),hsva:new RegExp("hsva"+du),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function vu(e){return!!pu.CSS_UNIT.exec(e)}var gu=function(e){return Bs.mostReadable(e,[Er,"#FFFFFF"]).toString()},yu=function(e){return Va().get.rgb(e)},mu=function(e){var t=new ArrayBuffer(4),n=new Uint32Array(t),r=new Uint8Array(t),o=yu(e);return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=255*o[3],n[0]},bu=function(e){return[(t=yu(e))[0]/255,t[1]/255,t[2]/255];var t};function _u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n6&&void 0!==arguments[6]?arguments[6]:yr,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,l=t.x,c=void 0===l?0:l,f=t.y,h=void 0===f?0:f,d=t.size,p=void 0===d?gr:d,v=t.caption,g=void 0===v?"":v,y=t.captions,m=void 0===y?[]:y,b=t.captionAlign,_=void 0===b?"center":b,w=t.captionSize,x=void 0===w?1:w,E=t.disabled,O=t.activated,S=t.selected,T=t.hovered,P=t.id,C=t.icon,A=t.overlayIcon,k=Sr(),I=function(e,t,n){var r=e.selected?n.selected.rings:n.default.rings;if(!r.length){var o=t.getById(e.id);return void 0!==o&&Object.entries(o).forEach(function(e){var t=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,u=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){u=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return _u(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_u(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e),n=t[0],r=t[1];n.startsWith("ring-")&&r.setEndValue(0)}),[{width:0,color:""}]}return r.map(function(n,r){var o=n.widthFactor,i=n.color,a=(e.size||gr)*o*Sr();return{width:t.getValueForAnimationName(e.id,"ring-".concat(r),a),color:i}})}(t,r,o),R=I.reduce(function(e,t){return e+t.width},0),j=p*k,M=2*j,N=function(e,t){if(!e||!t)return{nodeInfoLevel:0,fontInfoLevel:1.25,iconInfoLevel:1};var n=Sr(),r=1600*n*(1200*n),o=Math.pow(e,2)*Math.PI*Math.pow(t,2)/(r/100);return{nodeInfoLevel:cs(o,ns),fontInfoLevel:cs(o,rs),iconInfoLevel:cs(o,os)}}(j,u),D=N.nodeInfoLevel,L=N.fontInfoLevel,B=N.iconInfoLevel,F=t.color||a,U=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:gr)/({1:3.5,2:2.75,3:2}[arguments.length>2&&void 0!==arguments[2]?arguments[2]:1]+(arguments.length>3&&void 0!==arguments[3]&&arguments[3]?1:0))/e}(L,j,x,Boolean(C)),z=gu(F),V=j;if(R>0&&(V=j+R),E)F=i.color,z=i.fontColor;else{var W;if(O){var G=Date.now()%1e3/1e3,H=G<.7?G/.7:0,Y=is(F,.4-.4*H);ls(e,c,h,Y,j+.88*j*H)}var q=null!==(W=o.selected.shadow)&&void 0!==W?W:{width:0,opacity:0,color:""},X=q.width*k,K=q.opacity,Z=q.color,$=S||T?X:0,Q=r.getValueForAnimationName(P,"shadowWidth",$);Q>0&&function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=o+i,u=e.createRadialGradient(t,n,o,t,n,s);u.addColorStop(0,"transparent"),u.addColorStop(.01,is(r,.5*a)),u.addColorStop(.05,is(r,.5*a)),u.addColorStop(.5,is(r,.12*a)),u.addColorStop(.75,is(r,.03*a)),u.addColorStop(1,is(r,0)),e.fillStyle=u,us(e,t,n,s),e.fill()}(e,c,h,Z,V,Q,K)}ls(e,c,h,F,j),R>0&&ss(e,c,h,j,I);var J=Boolean(g.length),ee=Boolean(m.length),te=Boolean(C);if(C){var ne=D<2||!(J||ee),re=D>0?1:0,oe=ne?1*j:.75*j;oe/=B;var ie=ne?.5*oe:oe*(1===B?"center"===_?1.3:"bottom"===_||ne?1.1:0:"center"===_?1.35:"bottom"===_||ne?1.1:0),ae=oe/2;oe=r.getValueForAnimationName(P,"iconSize",oe),ae=r.getValueForAnimationName(P,"iconXPos",ae),ie=r.getValueForAnimationName(P,"iconYPos",ie);var se=e.globalAlpha,ue=E?.1:re;e.globalAlpha=r.getValueForAnimationName(P,"iconOpacity",ue);var le="#ffffff"===z,ce=n.getImage(C,le);e.drawImage(ce,c-ae,h-ie,Math.floor(oe),Math.floor(oe)),e.globalAlpha=se}if(void 0!==A){var fe,he,de,pe,ve,ge=M*(null!==(fe=A.size)&&void 0!==fe?fe:1),ye=ge/2-j*(null!==(he=null===(de=A.position)||void 0===de?void 0:de[1])&&void 0!==he?he:0),me=ge/2-j*(null!==(pe=null===(ve=A.position)||void 0===ve?void 0:ve[0])&&void 0!==pe?pe:0),be=e.globalAlpha,_e=E?.1:1;e.globalAlpha=r.getValueForAnimationName(P,"iconOpacity",_e);var we=n.getImage(A.url);e.drawImage(we,c-me,h-ye,ge,ge),e.globalAlpha=be}if(J||ee){var xe=D<2?0:1,Ee=r.getValueForAnimationName(P,"textOpacity",xe,0);if(Ee>0){var Oe,Se,Te='"Open Sans", sans-serif',Pe=2;L===(null===(Oe=rs[1])||void 0===Oe?void 0:Oe[1])?Pe=3:L===(null===(Se=rs[2])||void 0===Se?void 0:Se[1])&&(Pe=4);var Ce="center"===_?.7*M:2*Math.sqrt(Math.pow(M/2,2)-Math.pow(M/3,2));if(e.fillStyle=is(z,Ee),ee){var Ae,ke=es(m),Ie=ke.stylesPerChar,Re=ke.fullCaption,je=Ja(e,Re,Te,U,Ce,te,Pe,null==t||t.captionAlign),Me=-(je.length-2)*U/2;Ae=_&&"center"!==_?"bottom"===_?Me+j/Math.PI:Me-j/Math.PI:Me,fs(e,je,Ie,Ae,U,Te,U,c,h,s)}else if(J){var Ne=Ja(e,g,Te,U,Ce,te,Pe,null==t||t.captionAlign),De=-(Ne.length-2)*U/2,Le=g.split("").map(function(e){return[]});fs(e,Ne,Le,De,U,Te,U,c,h,s)}}}};function Eu(e){return Eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eu(e)}function Ou(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Su(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Pu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n3&&void 0!==arguments[3]?arguments[3]:{}).relationshipThreshold,a=void 0===i?0:i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Cu(this,"arrowBundler",void 0),Cu(this,"activeNodes",void 0),Cu(this,"canvas",void 0),Cu(this,"context",void 0),Cu(this,"state",void 0),Cu(this,"stateDisposers",void 0),Cu(this,"relationshipThreshold",void 0),Cu(this,"animationHandler",void 0),Cu(this,"imageCache",void 0),Cu(this,"needsRun",void 0),Cu(this,"nodeVersion",void 0),Cu(this,"relVersion",void 0),Cu(this,"waypointVersion",void 0),Cu(this,"ellipsisWidth",void 0),null!==n&&(this.activeNodes=new Set,this.canvas=t,this.context=n,this.state=r,this.stateDisposers=[],this.stateDisposers.push(r.autorun(function(){void 0!==r.zoom&&(o.needsRun=!0),void 0!==r.panX&&(o.needsRun=!0),void 0!==r.panY&&(o.needsRun=!0),void 0!==r.nodes.version&&(o.needsRun=!0),void 0!==r.rels.version&&(o.needsRun=!0),r.waypoints.counter>0&&(o.needsRun=!0),void 0!==r.layout&&(o.needsRun=!0)})),r.nodes.addChannel(ku),r.rels.addChannel(ku),this.relationshipThreshold=a,this.nodeVersion=r.nodes.version,this.relVersion=r.rels.version,this.waypointVersion=r.waypoints.counter,this.animationHandler=new la,this.animationHandler.setOptions({fadeDuration:150,sizeDuration:150}),this.arrowBundler=new ka(r.rels.items,r.waypoints.data),this.imageCache=new pa,this.needsRun=!0,this.ellipsisWidth=n.measureText(Ka).width)}var t,n;return t=e,n=[{key:"needsToRun",value:function(){return this.needsRun||this.animationHandler.needsToRun()||this.activeNodes.size>0}},{key:"processUpdates",value:function(){var e=this.state,t=!1,n=e.nodes.channels[ku],r=e.rels.channels[ku],o=n.adds,i=n.removes,a=r.adds,s=r.removes;this.nodeVersion0||Object.keys(i).length,this.handleChannelUpdate(n,e.nodes,!0),this.nodeVersion=e.nodes.version,e.nodes.clearChannel(ku)),this.relVersion0||Object.keys(s).length>0,e.rels.clearChannel(ku),this.relVersion=e.rels.version),(t||this.waypointVersion1&&void 0!==arguments[1]?arguments[1]:{},o=this.state,i=this.animationHandler,a=this.arrowBundler,s=o.zoom,u=o.layout,l=o.nodes.idToPosition,c=null!==(t=r.canvas)&&void 0!==t?t:this.canvas,f=null!==(n=r.context)&&void 0!==n?n:this.context,h=Sr(),d=c.clientWidth*h,p=c.clientHeight*h;f.save(),void 0!==r.backgroundColor?(f.fillStyle=r.backgroundColor,f.fillRect(0,0,d,p)):f.clearRect(0,0,d,p),this.zoomAndPan(f,c),i.ignoreAnimations(Boolean(r.ignoreAnimations)),!0!==r.ignoreAnimations&&i.advance(),a.updatePositions(l);var v=this.getRelationshipsToRender(r.showCaptions,d,p);this.renderRelationships(v,f,u!==Pi);var g=this.getNodesToRender(e,d,p);this.renderNodes(g,f,s),f.restore(),this.needsRun=!1}},{key:"getRelationshipsToRender",value:function(e,t,n){var r,o=[],i=[],a=[],s=this.arrowBundler,u=this.state,l=this.relationshipThreshold,c=u.layout,f=u.zoom,h=u.rels,d=u.nodes,p=d.idToItem,v=d.idToPosition,g=Tu(h.items);try{for(g.s();!(r=g.n()).done;){var y=r.value,m=s.getBundle(y),b=Su(Su({},p[y.from]),v[y.from]),_=Su(Su({},p[y.to]),v[y.to]),w=e||f>l||void 0!==y.captionHtml,x=Ms(y,m,b,_,w,c!==Pi);if(null!==x){var E,O,S,T,P,C,A=this.isBoundingBoxOffScreen(x,t,n),k=vs({x:null!==(E=b.x)&&void 0!==E?E:0,y:null!==(O=b.y)&&void 0!==O?O:0},{x:null!==(S=_.x)&&void 0!==S?S:0,y:null!==(T=_.y)&&void 0!==T?T:0}),I=((null!==(P=b.size)&&void 0!==P?P:gr)+(null!==(C=_.size)&&void 0!==C?C:gr))*devicePixelRatio,R=b.id!==_.id&&I>k;A||R||(!0===y.disabled?i.push(Su(Su({},y),{},{fromNode:b,toNode:_,showLabel:w})):!0===y.selected?o.push(Su(Su({},y),{},{fromNode:b,toNode:_,showLabel:w})):a.push(Su(Su({},y),{},{fromNode:b,toNode:_,showLabel:w})))}}}catch(e){g.e(e)}finally{g.f()}return[].concat(i,a,o)}},{key:"getNodesToRender",value:function(e,t,n){var r,o=[],i=[],a=[],s=this.state.nodes.idToItem,u=Tu(e);try{for(u.s();!(r=u.n()).done;){var l,c,f=r.value,h=wu(f);this.isBoundingBoxOffScreen(h,t,n)||(!0===(null===(l=s[f.id])||void 0===l?void 0:l.disabled)?o.push(Su({},f)):!0===(null===(c=s[f.id])||void 0===c?void 0:c.selected)?i.push(Su({},f)):a.push(Su({},f)))}}catch(e){u.e(e)}finally{u.f()}return[].concat(o,a,i)}},{key:"renderNodes",value:function(e,t,n){var r,o=this.imageCache,i=this.animationHandler,a=this.state,s=this.ellipsisWidth,u=a.nodes.idToItem,l=a.nodeBorderStyles,c=a.disabledItemStyles,f=a.defaultNodeColor,h=Tu(e);try{for(h.s();!(r=h.n()).done;){var d=r.value;xu(t,Su(Su({},u[d.id]),d),o,i,l,c,f,s,n)}}catch(e){h.e(e)}finally{h.f()}}},{key:"renderRelationships",value:function(e,t,n){var r,o=this.state.relationshipBorderStyles.selected,i=this.arrowBundler,a=this.imageCache,s=this.state,u=s.disabledItemStyles,l=s.defaultRelationshipColor,c=Tu(e);try{for(c.s();!(r=c.n()).done;){var f=r.value,h=i.getBundle(f),d=f.fromNode,p=f.toNode,v=f.showLabel;js(t,f,d,p,h,a,v,o,u,l,n)}}catch(e){c.e(e)}finally{c.f()}}},{key:"getNodesAt",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],o=this.state.nodes,i=o.items,a=o.idToPosition,s=Sr(),u=Tu(i);try{var l=function(){var o=t.value,i=o.id,u=o.size,l=void 0===u?gr:u,c=a[i],f=c.x,h=c.y,d=Math.sqrt(Math.pow(e.x-f,2)+Math.pow(e.y-h,2));if(d<=(l+n)*s){var p=r.findIndex(function(e){return e.distance>d});r.splice(-1!==p?p:r.length,0,{data:o,targetCoordinates:{x:f,y:h},pointerCoordinates:e,distanceVector:{x:e.x-f,y:e.y-h},insideNode:d<=l*s,distance:d})}};for(u.s();!(t=u.n()).done;)l()}catch(e){u.e(e)}finally{u.f()}return r}},{key:"getRelsAt",value:function(e){var t,n=[],r=this.state,o=this.arrowBundler,i=this.relationshipThreshold,a=r.zoom,s=r.rels.items,u=r.nodes.idToPosition,l=r.layout,c=a>i,f=Tu(s);try{var h=function(){var r=t.value,i=o.getBundle(r),a=u[r.from],s=u[r.to];if(void 0!==a&&void 0!==s&&-1!==i.indexOf(r)){var f=function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(!Na(n,r))return 1/0;var s=n===r?function(e,t,n,r){var o=Is(t,n,r),i=o.startPoint,a=o.endPoint,s=o.apexPoint,u=o.control1Point,l=o.control2Point,c=Ua(i,s,u,e),f=Ua(s,a,l,e);return Math.min(c,f)}(e,t,n,o):function(e,t,n,r,o,i,a){var s=Ss(t,n,r,o,i,a),u=1/0;if(a&&3===s.length)u=Ua(s[0],s[2],s[1],e);else for(var l=1;lf});n.splice(-1!==h?h:n.length,0,{data:r,fromTargetCoordinates:a,toTargetCoordinates:s,pointerCoordinates:e,distance:f})}}};for(f.s();!(t=f.n()).done;)h()}catch(e){f.e(e)}finally{f.f()}return n}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel(ku),this.state.rels.removeChannel(ku)}},{key:"isBoundingBoxOffScreen",value:function(e,t,n){var r=this.state,o=r.zoom,i=t/o,a=n/o,s=r.panX-i/2,u=r.panY-a/2,l=e.rights+i,h=e.top>u+a;return l||f||c||h}},{key:"handleChannelUpdate",value:function(e,t,n){for(var r=Object.keys(e.adds),o=0;o2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=function(e,n){if((0,t.isNil)(e)||(0,t.isNil)(n))return{offsetX:0,offsetY:0};var r=n.getBoundingClientRect(),o=window.devicePixelRatio||1;return{offsetX:o*(e.clientX-r.left-.5*r.width),offsetY:o*(e.clientY-r.top-.5*r.height)}}(e,n);return{x:o+a.offsetX/r,y:i+a.offsetY/r}};function ju(e){return ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ju(e)}function Mu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nu(e,t){for(var n=0;n0}},{key:"renderMainScene",value:function(e){var t=this.state,n=t.nodes,r=t.rels;this.checkForUpdates(n,r),this.mainSceneRenderer.render(e,n,r),this.needsRun=!1}},{key:"renderMinimap",value:function(e){var t=this.state,n=t.nodes,r=t.rels;this.checkForUpdates(n,r),this.minimapRenderer.render(e,n,r),this.minimapRenderer.renderViewbox(),this.needsRun=!1}},{key:"checkForUpdates",value:function(e,t){var n=Object.values(e.channels[Fu].adds).length>0,r=Object.values(t.channels[Fu].adds).length>0,o=Object.values(e.channels[Fu].removes).length>0,i=Object.values(t.channels[Fu].removes).length>0,a=Object.values(e.channels[Fu].updates),s=Object.values(t.channels[Fu].updates);n||r||o||i?(this.mainSceneRenderer.setData({nodes:e.items,rels:t.items}),this.minimapRenderer.setData({nodes:e.items,rels:t.items})):(a.length>0&&(this.mainSceneRenderer.updateNodes(a),this.minimapRenderer.updateNodes(a)),s.length>0&&(this.mainSceneRenderer.updateRelationships(t.items),this.minimapRenderer.updateRelationships(t.items))),e.clearChannel(Fu),t.clearChannel(Fu)}},{key:"onResize",value:function(){var e=this.state,t=e.zoom,n=e.panX,r=e.panY,o=e.minimapZoom,i=e.minimapPanX,a=e.minimapPanY;this.updateMainViewport(t,n,r),this.updateMinimapViewport(o,i,a)}},{key:"updateMainViewport",value:function(e,t,n){this.mainSceneRenderer.updateViewport(e,t,n);var r=this.mainSceneRenderer.canvas.clientWidth,o=this.mainSceneRenderer.canvas.clientHeight;this.minimapRenderer.updateViewportBox(e,t,n,r,o),this.needsRun=!0}},{key:"updateMinimapViewport",value:function(e,t,n){this.minimapRenderer.updateViewport(e,t,n),this.needsRun=!0}},{key:"handleMinimapDrag",value:function(e){var t=this.state,n=this.minimapRenderer,r=Ru(e,n.canvas,t.minimapZoom,t.minimapPanX,t.minimapPanY),o=r.x,i=r.y;t.setPan(o,i)}},{key:"handleMinimapWheel",value:function(e){var n=this.state,r=this.mainSceneRenderer;n.setZoom(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,t.isNil)(e)||isNaN(e.deltaY)?n:n-e.deltaY/500*Math.min(1,n)}(e,n.zoom),r.canvas),e.preventDefault()}},{key:"setupMinimapInteractions",value:function(){var e=this,t=this.minimapRenderer.canvas;t.addEventListener("mousedown",function(t){e.handleMinimapDrag(t),e.minimapMouseDown=!0}),t.addEventListener("mousemove",function(t){e.minimapMouseDown&&e.handleMinimapDrag(t)}),t.addEventListener("mouseup",function(){e.minimapMouseDown=!1}),t.addEventListener("mouseleave",function(){e.minimapMouseDown=!1}),t.addEventListener("wheel",function(t){e.handleMinimapWheel(t)})}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel(Fu),this.state.rels.removeChannel(Fu),this.mainSceneRenderer.destroy(),this.minimapRenderer.destroy()}}]),e}(),zu=function(){function e(){Mu(this,e),Lu(this,"mainSceneRenderer",void 0),Lu(this,"minimapRenderer",void 0),Lu(this,"needsRun",void 0),Lu(this,"minimapMouseDown",void 0),Lu(this,"stateDisposers",void 0),Lu(this,"state",void 0)}return Du(e,[{key:"renderMainScene",value:function(e){}},{key:"renderMinimap",value:function(e){}},{key:"checkForUpdates",value:function(e,t){}},{key:"onResize",value:function(){}},{key:"updateMainViewport",value:function(e,t,n){}},{key:"updateMinimapViewport",value:function(e,t,n){}},{key:"handleMinimapDrag",value:function(e){}},{key:"handleMinimapWheel",value:function(e){}},{key:"setupMinimapInteractions",value:function(){}},{key:"destroy",value:function(){}},{key:"needsToRun",value:function(){return!1}}]),e}();function Vu(e){return Vu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vu(e)}function Wu(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Gu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gu(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Gu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n 0.51) {\n discard;\n }\n else {\n lowp float nodeSize = 1.0 / varNodeSize;\n lowp float nodeAlpha = getCircleAlpha(circleSize, nodeSize, dist);\n lowp float borderAlpha = getCircleAlpha(defaultBoderSize, nodeSize, dist);\n lowp float ringAlpha = getCircleAlpha(innerSelectedRingSize, nodeSize, dist);\n lowp vec3 finalColor = color.xyz;\n lowp float finalAlpha = nodeAlpha;\n\n if (selected > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(outerSelectedRingSize, dist);\n lowp float ringAlpha2 = getCircleAlpha(outerSelectedRingSize, nodeSize, dist);\n\n if (drawDefaultBorder > 0.0) {\n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalColor = mix(selectedInnerBorderColor, finalColor, borderAlpha);\n finalColor = mix(selectedBorderColor, finalColor, ringAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha2);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, max(borderAlpha, ringAlpha2)));\n } else {\n finalColor = mix(selectedInnerBorderColor, finalColor, nodeAlpha);\n finalColor = mix(selectedBorderColor, finalColor, ringAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha2);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, max(ringAlpha, ringAlpha2)));\n }\n } else if (hovered > 0.0) {\n if (drawDefaultBorder > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(defaultBoderSize, dist);\n \n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalColor = mix(shadowColor, finalColor, borderAlpha);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, ringAlpha));\n } else {\n lowp float shadowAlpha = getShadowAlpha(circleSize, dist);\n\n finalColor = mix(shadowColor, finalColor, nodeAlpha);\n finalAlpha = max(shadowAlpha, nodeAlpha);\n }\n } else {\n if (drawDefaultBorder > 0.0) {\n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalAlpha = borderAlpha;\n }\n }\n gl_FragColor = vec4(finalColor, 1.0) * finalAlpha;\n }\n}\n"),this.nodeAnimShader=new ko(t,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform lowp float u_animPos;\nuniform mediump float u_zoom;\nuniform mediump float u_glAdjust;\n\nattribute float a_size;\nattribute lowp vec2 a_index;\nattribute lowp vec4 a_color;\nattribute lowp float a_active;\n\nvarying lowp float varNodeSize;\nvarying lowp vec4 color;\n\nvoid main(void) {\n vec4 data = texture2D(u_positions, a_index);\n\n gl_Position = u_projection * vec4(data.xy, 0.0, 1.0);\n\n float nodeSize = a_size * u_zoom * u_glAdjust;\n nodeSize = nodeSize * (0.4 / 0.5); // Remove extra space added for shadow and selection ring\n\n gl_PointSize = a_active > 0.5\n ? nodeSize + 0.88 * nodeSize * u_animPos\n : 0.0;\n\n color = a_color;\n varNodeSize = a_size;\n}","uniform mediump float u_zoom;\nuniform lowp float u_animPos;\nuniform mediump float u_glAdjust;\n\nvarying lowp vec4 color;\nvarying lowp float varNodeSize;\nmediump float circleSize = 0.50;\n\nvoid main(void) {\n\n lowp float dist = distance(gl_PointCoord, vec2(0.5));\n\n if (dist > 0.51) {\n discard;\n }\n else {\n lowp float alpha = 1.0 - smoothstep(circleSize - (1.0 / (varNodeSize * 2.0 * u_zoom * u_glAdjust)), circleSize, dist);\n lowp float pulseAlpha = 0.9 - 0.9 * u_animPos;\n gl_FragColor = vec4(color.xyz, 1.0) * alpha * pulseAlpha;\n }\n}\n"),this.relShader=new ko(t,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform mediump float u_glAdjust;\n\nattribute vec2 a_from;\nattribute vec2 a_to;\nattribute lowp vec4 a_color;\nattribute lowp float a_triside;\nattribute float a_width;\n\nvarying lowp vec4 color;\n\nvoid main(void) {\n vec4 from = texture2D(u_positions, a_from);\n vec4 to = texture2D(u_positions, a_to);\n vec2 direction = normalize(to.xy - from.xy);\n direction = vec2(-direction.y, direction.x);\n\n float width = a_width * u_glAdjust * 0.5;\n\n if (a_triside == 0.0) {\n from.y += (width / 2.0) * direction.y;\n from.x += (width / 2.0) * direction.x;\n } else {\n from.y -= (width / 2.0) * direction.y;\n from.x -= (width / 2.0) * direction.x;\n }\n\n color = a_color;\n gl_Position = u_projection * vec4(from.xy, 0.0, 1.0);\n}\n","varying lowp vec4 color;\n\nvoid main(void) {\n gl_FragColor = vec4(color.xyz, 1.0) * color.w;\n}\n"),this.viewportBoxShader=new ko(t,"\nattribute vec2 coordinates;\nuniform mat4 u_projection;\nuniform lowp vec4 u_minimapViewportBoxColor;\n\nvarying lowp vec4 minimapViewportBoxColor;\n\nvoid main(void) {\n gl_Position = u_projection * vec4(coordinates, 0.0, 1.0);\n minimapViewportBoxColor = u_minimapViewportBoxColor;\n}\n","\nvarying lowp vec4 minimapViewportBoxColor;\n\nvoid main(void) {\n gl_FragColor = minimapViewportBoxColor;\n}\n"),this.setShaderUniforms(o),t.clearColor(0,0,0,0),t.disable(t.DEPTH_TEST),this.defaultRelColor=o.defaultRelationshipColor,this.defaultNodeColor=o.defaultNodeColor,this.disableRelColor=o.disabledItemStyles.color,this.disableNodeColor=o.disabledItemStyles.color,t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.gl=t,this.activeNodes={},this.canvas=t.canvas,this.projection=Eo(),this.setData({nodes:n.items,rels:r.items}),this.createPositionTexture(),this.setupViewportRendering(o.minimapViewportBoxColor)}var n,r;return n=e,r=[{key:"setShaderUniforms",value:function(e){var n,r,o,i,a,s=e.nodeBorderStyles,u=null;(null===(n=s.default)||void 0===n?void 0:n.rings.length)>0&&(u=null===(a=s.default.rings[0])||void 0===a?void 0:a.color);var l,c,f=null,h=null,d=null!==(r=null===(o=s.selected)||void 0===o?void 0:o.rings)&&void 0!==r?r:[],p=d.length;p>1&&(h=null===(l=d[p-2])||void 0===l?void 0:l.color,f=null===(c=d[p-1])||void 0===c?void 0:c.color);var v=null;null!==(i=s.selected)&&void 0!==i&&i.shadow&&(v=s.selected.shadow.color),this.nodeShader.use(),(0,t.isNil)(u)?this.nodeShader.setUniform("u_drawDefaultBorder",0):(this.nodeShader.setUniform("u_nodeBorderColor",bu(u)),this.nodeShader.setUniform("u_drawDefaultBorder",1));var g=bu(f),y=bu(h),m=bu(v);this.nodeShader.setUniform("u_selectedBorderColor",g),this.nodeShader.setUniform("u_selectedInnerBorderColor",y),this.nodeShader.setUniform("u_shadowColor",m)}},{key:"setData",value:function(e){var t=Ar(e.rels,this.disableRelColor);this.setupNodeRendering(e.nodes),this.setupRelationshipRendering(t)}},{key:"render",value:function(e,t,n){var r,o=this.gl,i=this.idToIndex,a=Wu(e);try{for(a.s();!(r=a.n()).done;){var s=r.value,u=i[s.id];this.posBuffer[4*u+0]=s.x,this.posBuffer[4*u+1]=s.y}}catch(e){a.e(e)}finally{a.f()}o.bindTexture(o.TEXTURE_2D,this.posTexture),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,pr,pr,0,o.RGBA,o.FLOAT,this.posBuffer),o.enable(o.BLEND),o.bindFramebuffer(o.FRAMEBUFFER,null),o.clear(o.COLOR_BUFFER_BIT),o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),this.renderAnimations(this.posTexture),this.numRels>0&&(this.relShader.use(),this.relShader.setUniform("u_positions",this.posTexture),o.bindBuffer(o.ARRAY_BUFFER,this.relBuffer),this.relShader.setAttributePointerByteNorm("a_color",4,0,16),this.relShader.setAttributePointerByteNorm("a_from",2,4,16),this.relShader.setAttributePointerByteNorm("a_to",2,6,16),this.relShader.setAttributePointerByteNorm("a_triside",1,8,16),this.relShader.setAttributePointerFloat("a_width",1,12,16),o.drawArrays(o.TRIANGLES,0,6*this.numRels)),this.numNodes>0&&(this.nodeShader.use(),this.nodeShader.setUniform("u_positions",this.posTexture),o.bindBuffer(o.ARRAY_BUFFER,this.nodeBuffer),this.nodeShader.setAttributePointerByteNorm("a_color",4,0,12),this.nodeShader.setAttributePointerByteNorm("a_selected",1,4,12),this.nodeShader.setAttributePointerByteNorm("a_index",2,5,12),this.nodeShader.setAttributePointerByte("a_size",4,8,12),this.nodeShader.setAttributePointerByteNorm("a_hovered",1,9,12),o.drawArrays(o.POINTS,0,this.numNodes))}},{key:"renderViewbox",value:function(){var e=this.gl,t=this.projection,n=this.viewportBoxBuffer;this.viewportBoxShader.use(),this.viewportBoxShader.setUniform("u_projection",t),e.bindBuffer(e.ARRAY_BUFFER,n),this.viewportBoxShader.setAttributePointerFloat("coordinates",2,0,0),e.drawArrays(e.LINES,0,8)}},{key:"updateNodes",value:function(e){var n,r=this.gl,o=this.idToIndex,i=this.disableNodeColor,a=this.nodeBuffer,s=this.nodeDataByte,u=!1,l=Wu(e);try{for(l.s();!(n=l.n()).done;){var c=n.value,f=o[c.id];if(!(0,t.isNil)(c.color)||!0===c.disabled){var h=yu(!0===c.disabled?i:c.color);this.nodeDataByte[3*f*4+0]=h[0],this.nodeDataByte[3*f*4+1]=h[1],this.nodeDataByte[3*f*4+2]=h[2],this.nodeDataByte[3*f*4+3]=255*h[3],u=!0}if(void 0!==c.selected){var d=c.selected;this.nodeDataByte[3*f*4+4]=d?255:0,u=!0}if(void 0!==c.activated&&(this.nodeDataByte[3*f*4+7]=c.activated?255:0,u=!0,c.activated?this.activeNodes[c.id]=!0:delete this.activeNodes[c.id]),void 0!==c.hovered){var p=!0!==c.disabled&&c.hovered;this.nodeDataByte[3*f*4+9]=p?255:0,u=!0}if(void 0!==c.size){var v=c.size;this.nodeDataByte[3*f*4+8]=v||gr,u=!0}}}catch(e){l.e(e)}finally{l.f()}u&&(r.bindBuffer(r.ARRAY_BUFFER,a),r.bufferData(r.ARRAY_BUFFER,s,r.DYNAMIC_DRAW))}},{key:"updateRelationships",value:function(e){var n,r=Ar(e,this.disableRelColor),o=this.gl,i=!1,a=Wu(r);try{for(a.s();!(n=a.n()).done;){var s=n.value,u=s.key,l=s.width,c=s.color,f=s.disabled,h=this.relIdToIndex[u],d=(0,t.isNil)(c)?this.defaultRelColor:c,p=mu(f?this.disableRelColor:d);this.relData.positionsAndColors[h*Xu+0]=p,this.relData.positionsAndColors[h*Xu+4]=p,this.relData.positionsAndColors[h*Xu+8]=p,this.relData.positionsAndColors[h*Xu+12]=p,this.relData.positionsAndColors[h*Xu+16]=p,this.relData.positionsAndColors[h*Xu+20]=p,i=!0,void 0!==l&&(this.relData.widths[h*Xu+3]=l,this.relData.widths[h*Xu+7]=l,this.relData.widths[h*Xu+11]=l,this.relData.widths[h*Xu+15]=l,this.relData.widths[h*Xu+19]=l,this.relData.widths[h*Xu+23]=l,i=!0)}}catch(e){a.e(e)}finally{a.f()}i&&(o.bindBuffer(o.ARRAY_BUFFER,this.relBuffer),o.bufferData(o.ARRAY_BUFFER,this.relDataBuffer,o.DYNAMIC_DRAW))}},{key:"createPositionTexture",value:function(){var e=this.gl,t=e.createTexture(),n=new Float32Array(262144);e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,pr,pr,0,e.RGBA,e.FLOAT,n),this.posTexture=t,this.posBuffer=n}},{key:"updateViewportBox",value:function(e,t,n,r,o){var i=this.gl,a=Sr(),s=r*a,u=o*a,l=(.5*s+t*e)/e,c=(.5*u+n*e)/e,f=(.5*-s+t*e)/e,h=(.5*-u+n*e)/e,d=[l,c,f,c,f,c,f,h,f,h,l,h,l,h,l,c];i.bindBuffer(i.ARRAY_BUFFER,this.viewportBoxBuffer),i.bufferData(i.ARRAY_BUFFER,new Float32Array(d),i.DYNAMIC_DRAW)}},{key:"updateViewport",value:function(e,t,n){var r=this.gl,o=1/e,i=t-r.drawingBufferWidth*o*.5,a=n-r.drawingBufferHeight*o*.5,s=r.drawingBufferWidth*o,u=r.drawingBufferHeight*o,l=Eo(),c=2.6315789473684212*Sr();Oo(l,i,i+s,a+u,a,0,1e6),this.nodeShader.use(),this.nodeShader.setUniform("u_zoom",e),this.nodeShader.setUniform("u_glAdjust",c),this.nodeShader.setUniform("u_projection",l),this.nodeAnimShader.use(),this.nodeAnimShader.setUniform("u_zoom",e),this.nodeAnimShader.setUniform("u_glAdjust",c),this.nodeAnimShader.setUniform("u_projection",l),this.relShader.use(),this.relShader.setUniform("u_glAdjust",c),this.relShader.setUniform("u_projection",l),this.projection=l}},{key:"setupViewportRendering",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Er;this.viewportBoxBuffer=this.gl.createBuffer(),this.viewportBoxShader.use(),this.viewportBoxShader.setUniform("u_minimapViewportBoxColor",[(e=yu(t))[0]/255,e[1]/255,e[2]/255,e[3]])}},{key:"setupNodeRendering",value:function(e){var n=this.gl,r=new ArrayBuffer(8),o=new Uint32Array(r),i=new Uint8Array(r);void 0===this.nodeBuffer&&(this.nodeBuffer=n.createBuffer()),this.numNodes=e.length;var a=new ArrayBuffer(3*e.length*8),s=new Uint32Array(a),u={};this.activeNodes={};for(var l=0;l=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function sl(e,t){if(e){if("string"==typeof e)return ul(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ul(e,t):void 0}}function ul(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},r=0;re[r].x&&(n.minX=e[r].x),n.minY>e[r].y&&(n.minY=e[r].y),n.maxX1&&(o=n/e),t>1&&(i=r/t),{zoomX:o,zoomY:i}},vl=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,o=Math.min(e,t);return Math.min(r,Math.max(n,o))},gl=function(e,t,n){var r=dl(e,arguments.length>3&&void 0!==arguments[3]?arguments[3]:50),o=r.nodesWidth,i=r.nodesHeight,a=t*Sr(),s=n*Sr(),u=pl(o,i,a,s),l=u.zoomX,c=u.zoomY;return vl(l,c)},yl=function(e,t,n,r){return Math.max(Math.min(t,n),Math.min(e,r))},ml=function(e,t,n,r,o,i){var a=t;return function(e,t,n){return e1?(a=function(e,t){var n=function(e){var t=new Array(4).fill(e[0]);return e.forEach(function(e){t[0]=e.x0&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0,r=0;ri?.9*i/r:.9*r/i}(e,r),yl(o,i,Math.min(t,a),n)):yl(o,i,t,n)};function bl(e){return bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bl(e)}function _l(e){var t=function(e){if("object"!=bl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bl(t)?t:String(t)}var wl=function(){function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,r=void 0,(n=_l(n="callbacks"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.callbacks={}}var t,n;return t=e,n=[{key:"register",value:function(e,t){this.isCallbackRegistered(e)||(this.callbacks[e]=[]),this.callbacks[e].push(t)}},{key:"isCallbackRegistered",value:function(e){return void 0!==this.callbacks[e]}},{key:"callIfRegistered",value:function(){var e,t=arguments,n=Array.prototype.slice.call(arguments)[0];e=n,o.includes(e)&&this.isCallbackRegistered(n)&&this.callbacks[n].slice(0).forEach(function(e){return e.apply(null,Array.prototype.slice.call(t,1))})}}],n&&function(e,t){for(var n=0;n0||n}},{key:"update",value:function(e,t){var n=this.state,r=n.fitNodeIds,o=n.resetZoom;r.length>0?this.fitNodes(r,e,t):o&&this.reset(e,t)}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(e){return e()})}},{key:"recalculateTarget",value:function(e,t,n,r){for(var o=this.xCtrl,i=this.yCtrl,a=this.zoomCtrl,s=this.state,u=[],l=0;l=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Il(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Rl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"default"])&&void 0!==e?e:Object.values(Vl).pop()},Gl=function(){function e(t,n){var r,o,i,a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Nl(this,"destroyed",void 0),Nl(this,"state",void 0),Nl(this,"callbacks",void 0),Nl(this,"instanceId",void 0),Nl(this,"glController",void 0),Nl(this,"webGLContext",void 0),Nl(this,"webGLMinimapContext",void 0),Nl(this,"htmlOverlay",void 0),Nl(this,"hasResized",void 0),Nl(this,"hierarchicalLayout",void 0),Nl(this,"gridLayout",void 0),Nl(this,"freeLayout",void 0),Nl(this,"d3ForceLayout",void 0),Nl(this,"forceLayout",void 0),Nl(this,"canvasRenderer",void 0),Nl(this,"glCanvas",void 0),Nl(this,"canvasRect",void 0),Nl(this,"glMinimapCanvas",void 0),Nl(this,"c2dCanvas",void 0),Nl(this,"isInRenderSwitchAnimation",void 0),Nl(this,"justSwitchedRenderer",void 0),Nl(this,"justSwitchedLayout",void 0),Nl(this,"layoutUpdating",void 0),Nl(this,"layoutComputing",void 0),Nl(this,"isRenderingDisabled",void 0),Nl(this,"setRenderSwitchAnimation",void 0),Nl(this,"stateDisposers",void 0),Nl(this,"zoomTransitionHandler",void 0),Nl(this,"currentLayout",void 0),Nl(this,"layoutTimeLimit",void 0),Nl(this,"pixelRatio",void 0),Nl(this,"removeResizeListener",void 0),Nl(this,"removeMinimapResizeListener",void 0),Nl(this,"pendingZoomOperation",void 0),Nl(this,"layoutRunner",void 0),Nl(this,"animationRequestId",void 0),Nl(this,"layoutDoneCallback",void 0),Nl(this,"layoutComputingCallback",void 0),Nl(this,"currentLayoutType",void 0),Nl(this,"descriptionElement",void 0),this.destroyed=!1;var s=n.frame,u=n.minimapContainer,l=void 0===u?document.createElement("span"):u,c=n.layoutOptions,f=n.layout,h=n.instanceId,d=void 0===h?"default":h,p=n.disableAria,v=void 0!==p&&p,g=t.nodes,y=t.rels,m=t.webGLVisible,b=t.disableWebGL;this.state=t,this.callbacks=new wl,this.instanceId=d;var _=s;_.setAttribute("instanceId",d),_.setAttribute("data-testid","nvl-parent"),null!==(r=_.style.height)&&void 0!==r&&r.length||Object.assign(_.style,{height:"100%"}),null!==(o=_.style.outline)&&void 0!==o&&o.length||Object.assign(_.style,{outline:"none"}),this.descriptionElement=v?document.createElement("div"):function(e,t){var n;e.setAttribute("role","img"),e.setAttribute("aria-label","Graph visualization");var r="nvl-".concat(t,"-description"),o=null!==(n=document.getElementById(r))&&void 0!==n?n:document.createElement("div");return o.innerHTML="",o.id="nvl-".concat(t,"-description"),o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),o.setAttribute("aria-atomic","false"),o.style.display="none",e.appendChild(o),e.setAttribute("aria-describedby",o.id),o}(_,d);var w=el(_,this.onWebGLContextLost.bind(this)),x=el(l,this.onWebGLContextLost.bind(this));if(w.setAttribute("data-testid","nvl-gl-canvas"),b)this.glController=new zu;else{var E=rl(w),O=rl(x);this.glController=new Uu({mainSceneRenderer:new Ku(E,g,y,this.state),minimapRenderer:new Ku(O,g,y,this.state),state:t}),this.webGLContext=E,this.webGLMinimapContext=O}var S=el(_,this.onWebGLContextLost.bind(this));S.setAttribute("data-testid","nvl-c2d-canvas");var T=S.getContext("2d"),P=document.createElement("div");Object.assign(P.style,Ml(Ml({},Or),{},{overflow:"hidden"})),_.appendChild(P),this.htmlOverlay=P,this.hasResized=!0,this.hierarchicalLayout=new Ji(Ml(Ml({},c),{},{state:this.state})),this.gridLayout=new Oi({state:this.state}),this.freeLayout=new gi({state:this.state}),this.d3ForceLayout=new Wr({state:this.state}),this.forceLayout=b?this.d3ForceLayout:new si(Ml(Ml({},c),{},{webGLContext:this.webGLContext,state:this.state})),this.state.setLayout(f),this.state.setLayoutOptions(c);var C=new Iu(S,T,t,n);this.canvasRenderer=C,this.glCanvas=w,this.canvasRect=w.getBoundingClientRect(),this.glMinimapCanvas=x,this.c2dCanvas=S,this.glCanvas.style.opacity=m?"1":"0",this.c2dCanvas.style.opacity=m?"0":"1",this.isInRenderSwitchAnimation=!1,this.justSwitchedRenderer=!1,this.justSwitchedLayout=!1,this.hasResized=!1,this.layoutUpdating=!1,this.layoutComputing=!1,this.isRenderingDisabled=!1,g.addChannel(Ll),y.addChannel(Ll),this.setRenderSwitchAnimation=function(){a.isInRenderSwitchAnimation=!1},this.stateDisposers=[],this.stateDisposers.push(t.autorun(function(){a.callIfRegistered("zoom",t.zoom)})),this.stateDisposers.push(t.autorun(function(){a.callIfRegistered("pan",{panX:t.panX,panY:t.panY})})),this.stateDisposers.push(t.autorun(function(){a.setLayout(t.layout)})),this.stateDisposers.push(t.autorun(function(){a.setLayoutOptions(t.layoutOptions)})),v||this.stateDisposers.push(t.autorun(function(){!function(e,t){var n=e.nodes,r=e.rels,o=e.layout,i=n.items.length,a=r.items.length;if(0!==i||0!==a){var s="".concat(i," node").concat(1!==i?"s":""),u="".concat(a," relationship").concat(1!==a?"s":""),l="displayed using a ".concat(null!=o?o:"forceDirected"," layout");t.innerHTML="A graph visualization with ".concat(s," and ").concat(u,", ").concat(l,".")}else t.innerHTML="An empty graph visualization."}(t,a.descriptionElement)})),this.stateDisposers.push(t.autorun(function(){var e=t.webGLVisible?"1":"0";e!==a.glCanvas.style.opacity&&(a.justSwitchedRenderer=!0,a.glCanvas.style.opacity=e,a.c2dCanvas.style.opacity=t.webGLVisible?"0":"1")})),this.startMainLoop(),this.zoomTransitionHandler=new Cl({state:t,getNodePositions:function(e){return a.currentLayout.getNodePositions(e)},canvas:w}),this.layoutTimeLimit=null!==(i=n.layoutTimeLimit)&&void 0!==i?i:16,this.pixelRatio=Sr(),this.removeResizeListener=Sn()(_,function(){Qu(w),Qu(S),a.canvasRect=w.getBoundingClientRect(),a.hasResized=!0}),this.removeMinimapResizeListener=Sn()(l,function(){Qu(x)}),Vl[d]=this,window.__Nvl_dumpNodes=function(e){var t;return null===(t=Wl(e))||void 0===t?void 0:t.dumpNodes()},window.__Nvl_dumpRelationships=function(e){var t;return null===(t=Wl(e))||void 0===t?void 0:t.dumpRelationships()},window.__Nvl_registerDoneCallback=function(e,t){var n;return null===(n=Wl(t))||void 0===n?void 0:n.on(Ul,e)},window.__Nvl_getNodesOnScreen=function(e){var t;return null===(t=Wl(e))||void 0===t?void 0:t.getNodesOnScreen()},window.__Nvl_getZoomLevel=function(e){var t;return null===(t=Wl(e))||void 0===t?void 0:t.getScale()},this.pendingZoomOperation=null}var t,n,r,o;return t=e,n=[{key:"onWebGLContextLost",value:function(e){this.callIfRegistered("onWebGLContextLost",e)}},{key:"updateMinimapZoom",value:function(){var e=this.state,t=e.nodes,n=e.maxNodeRadius,r=e.maxMinimapZoom,o=e.minMinimapZoom,i=dl(Object.values(t.idToPosition),n),a=i.centerX,s=i.centerY,u=i.nodesWidth,l=i.nodesHeight,c=pl(u,l,this.glMinimapCanvas.width,this.glMinimapCanvas.height),f=c.zoomX,h=c.zoomY,d=vl(f,h,o,r);this.state.updateMinimapZoomToFit(d,a,s)}},{key:"startMainLoop",value:function(){var e=this,t=this.state,n=t.nodes,r=t.rels;this.currentLayout.update();var o=this.currentLayout.getNodePositions(n.items);n.updatePositions(o),this.isRenderingDisabled||(this.glController.renderMainScene(o),this.glController.renderMinimap(o),this.canvasRenderer.processUpdates(),this.canvasRenderer.render(o)),this.layoutRunner=setInterval(function(){try{!function(){var t=e.currentLayout.getShouldUpdate(),n=t||e.justSwitchedLayout,r=n&&!e.layoutUpdating&&!e.justSwitchedLayout;if(n)for(var o=window.performance.now(),i=r?0:50,a=0;ae.layoutTimeLimit)break}}()}catch(t){if(!e.callbacks.isCallbackRegistered(Fl))throw t;e.callIfRegistered(Fl,t)}},13),this.animationRequestId=window.requestAnimationFrame(function t(){try{!function(t){if(e.destroyed)Yr.info("STEP IN A DESTROYED STRIP");else{var o=Sr();if(o!==e.pixelRatio)return e.pixelRatio=o,void e.callIfRegistered("restart");var i=e.currentLayout.getShouldUpdate(),a=i||e.justSwitchedLayout,s=e.currentLayout.getComputing(),u=e.zoomTransitionHandler.needsToRun(),l=a&&!e.layoutUpdating&&!e.justSwitchedLayout,c=e.layoutComputing&&!s,f=e.state.webGLVisible&&e.glController.needsToRun(),h=!e.state.webGLVisible&&e.canvasRenderer.needsToRun(),d=e.isInRenderSwitchAnimation||e.justSwitchedRenderer,p=e.hasResized,v=null!==e.pendingZoomOperation,g=e.glController.minimapMouseDown;if(n.clearChannel(Ll),r.clearChannel(Ll),u||a||c||d||f||h||g||p||v){!v||l||e.currentLayout.getComputing()||(e.pendingZoomOperation(),e.pendingZoomOperation=null);var y=i||s||c;e.zoomTransitionHandler.update(y,function(){return e.callIfRegistered("onZoomTransitionDone")}),p&&e.glController.onResize();var m=e.currentLayout.getNodePositions(n.items);if(n.updatePositions(m),e.callbacks.isCallbackRegistered(zl)&&e.callIfRegistered(zl,e.dumpNodes()),e.updateMinimapZoom(),e.glController.renderMinimap(m),!e.isRenderingDisabled){if((e.state.webGLVisible||d)&&e.glController.renderMainScene(m),!e.state.webGLVisible||d){e.canvasRenderer.processUpdates(),e.canvasRenderer.render(m);for(var b=0;b5&&!e.state.webGLVisible;Object.assign(x.style,{top:"".concat(k,"px"),left:"".concat(A,"px"),width:"".concat(T,"px"),height:"".concat(P,"px"),display:I?"block":"none",transform:"translate(-50%, -50%) scale(".concat(Number(e.state.zoom),") rotate(").concat(O,"rad")})}}}for(var R=0;R=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(t);try{for(o.s();!(e=o.n()).done;){var i=e.value,a=n[i.id],s=this.mapCanvasSpaceToRelativePosition(a.x,a.y);r.push(Ml(Ml({},i),{},{x:s.x,y:s.y}))}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"dumpRelationships",value:function(){return mn(this.state.rels.items)}},{key:"mapCanvasSpaceToRelativePosition",value:function(e,t){var n=this.canvasRect,r=window.devicePixelRatio||1,o=(e-this.state.panX)*this.state.zoom/r,i=(t-this.state.panY)*this.state.zoom/r;return{x:o+.5*n.width,y:i+.5*n.height}}},{key:"mapRelativePositionToCanvasSpace",value:function(e,t){var n=this.glCanvas.getBoundingClientRect(),r=window.devicePixelRatio||1,o=r*(e-.5*n.width),i=r*(t-.5*n.height);return{x:this.state.panX+o/this.state.zoom,y:this.state.panY+i/this.state.zoom}}},{key:"getNodePositions",value:function(){return Object.values(mn(this.state.nodes.idToPosition))}},{key:"setNodePositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.state.nodes.updatePositions(e),this.currentLayout.updateNodes(e),t||this.currentLayout.terminateUpdate(),this.hasResized=!0,0===this.getNodesOnScreen().nodes.length&&this.state.setPan(0,0),this.state.clearFit()}},{key:"isLayoutMoving",value:function(){return this.layoutUpdating}},{key:"getNodesOnScreen",value:function(){var e=this.glCanvas.getBoundingClientRect(),t=this.mapRelativePositionToCanvasSpace(0,0),n=t.x,r=t.y,o=this.mapRelativePositionToCanvasSpace(e.width,e.height);return function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:["node"],a=o.nodes,s=o.rels,u=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),f=Math.max(t,r),h=[],d=[];if(i.includes("node"))for(var p=0,v=Object.values(a.idToPosition);pu&&yc&&mu&&O.xc&&O.yu&&S.xc&&S.y1&&void 0!==arguments[1]?arguments[1]:0;return this.canvasRenderer.getNodesAt(e,t)}},{key:"getLayout",value:function(e){return e===Pi?this.hierarchicalLayout:e===Ti?this.forceLayout:e===Ci?this.gridLayout:e===Ai?this.freeLayout:e===ki?this.d3ForceLayout:this.forceLayout}},{key:"setLayout",value:function(e){Yr.info("Switching to layout: ".concat(e));var t=this.currentLayoutType,n=this.getLayout(e);"free"===e&&n.setNodePositions(this.state.nodes.idToPosition),this.currentLayout=n,this.currentLayoutType=e,t&&t!==this.currentLayoutType&&(this.justSwitchedLayout=!0)}},{key:"setLayoutOptions",value:function(e){this.getLayout(this.state.layout).setOptions(e)}},{key:"createDownloadLink",value:function(e,t){var n=document.createElement("a");n.style.display="none",n.setAttribute("download",e);var r=t.toDataURL("image/png").replace(/^data:image\/png/,"data:application/octet-stream");return n.setAttribute("href",r),n}},{key:"saveToFile",value:function(e){var t=Ml(Ml({},Bl),e),n=t.filename,r=t.backgroundColor,o=this.state.nodes.items;this.currentLayout.update(this.justSwitchedLayout),this.justSwitchedLayout=!1;var i=this.currentLayout.getNodePositions(o);this.state.nodes.updatePositions(i);var a=Ju(this.c2dCanvas.width,this.c2dCanvas.height),s=nl(a);this.canvasRenderer.processUpdates(),this.canvasRenderer.render(i,{canvas:a,context:s,backgroundColor:r,ignoreAnimations:!0}),this.createDownloadLink(n,a).click(),tl(a),a=null,s=null}},{key:"prepareLargeFileForDownload",value:function(e){var t=this,n=Ml(Ml({},Bl),e),r=this.state.nodes.items,o=n.filename,i=n.backgroundColor,a=this.currentLayout.getNodePositions(r),s=dl(a,100),u=s.nodesWidth,l=s.nodesHeight,c=s.centerX,f=s.centerY,h=Math.max(Math.min(u+100,15e3),5e3),d=Math.max(Math.min(l+100,15e3),5e3);return this.isRenderingDisabled=!0,new Promise(function(e,n){try{t.setPanCoordinates(c,f);var r=Math.max(h/u-.02,t.state.minZoom),s=Math.max(d/l-.02,t.state.minZoom);t.setZoomLevel(Math.min(r,s))}catch(e){return Yr.error("An error occurred while downloading the file"),void n(e)}setTimeout(function(){try{t.currentLayout.update(t.justSwitchedLayout),t.justSwitchedLayout=!1,t.state.nodes.updatePositions(a);var r=Ju(h,d),s=nl(r);t.canvasRenderer.processUpdates(),t.canvasRenderer.render(a,{canvas:r,context:s,backgroundColor:i,ignoreAnimations:!0,showCaptions:!0}),t.createDownloadLink(o,r).click(),tl(r),r=null,s=null,e(!0)}catch(e){n(e)}},500)})}},{key:"saveFullGraphToLargeFile",value:(r=kl().mark(function e(t){var n,r,o,i;return kl().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ml(Ml({},Bl),t),r=this.state.zoom,o=this.state.panX,i=this.state.panY,e.prev=4,e.next=7,this.prepareLargeFileForDownload(n);case 7:e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(4),Yr.error("An error occurred while downloading the image"),!this.callbacks.isCallbackRegistered(Fl)){e.next=16;break}this.callIfRegistered(Fl,e.t0),e.next=17;break;case 16:throw e.t0;case 17:return e.prev=17,this.isRenderingDisabled=!1,this.setZoomLevel(r),this.setPanCoordinates(o,i),e.finish(17);case 22:case"end":return e.stop()}},e,this,[[4,9,17,22]])}),o=function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){Il(i,n,o,a,s,"next",e)}function s(e){Il(i,n,o,a,s,"throw",e)}a(void 0)})},function(e){return o.apply(this,arguments)})}],n&&function(e,t){for(var n=0;n0;for(var n in t?(e="".concat(e,"\t Children: ").concat(this.noOfChildren()),console.groupCollapsed(e)):console.log(e),this.children)this.children[n].print();t&&console.groupEnd()}},{key:"noOfChildren",value:function(){return this.children.length}},{key:"_percentageOfParentSpent",value:function(){return Math.round(this.data._timeSpent()/this.parent.data._timeSpent()*100)}}]),e}(),$l=function(){function e(t){Yl(this,e),this.name=t,this.startTime=performance.now(),this.endTime=null}return Xl(e,[{key:"close",value:function(){this.endTime=performance.now()}},{key:"_timeSpent",value:function(){if(null===this.startTime||null===this.endTime)throw new Error("You have an error in your performance measurements that makes the whole tree unreliable. You probably forgot to call performanceTestEnd on ".concat(this.name));return this.endTime-this.startTime}}]),e}(),Ql=function(){function e(){Yl(this,e),this.root=new Zl(new $l("Performance Tree"),null),this.current=this.root}return Xl(e,[{key:"clear",value:function(){this.root.children=[],this.current=this.root}},{key:"add",value:function(e){if(this.current){var t=new Zl(e,this.current);this.current.addChild(t),this.current=t}else{if(this.root)throw new Error("Performance tree is screwed up");this.root=new Zl(e,null),this.current=this.root}}},{key:"close",value:function(){if(this.current.isRoot())throw new Error("Tried to close performance tree root. You probably have one too many Performance.endTest() in your code.");this.current.data.close(),this.current=this.current.parent}},{key:"getCurrentData",value:function(){return this.current.data}},{key:"print",value:function(){this.root.noOfChildren()>0&&this.root.print()}}]),e}(),Jl=function(){function e(){Yl(this,e),window.performance?(this.disabled=!1,this.tree=new Ql):(this.disabled=!0,this.tree=null)}return Xl(e,[{key:"startTest",value:function(e){if(!this.disabled){var t,n=e||(t="at"===(t=(new Error).stack.split("\n")[3].trim()).split(" ")[0]?t.split(" ")[1]:t.split("@")[0]),r=new $l(n);this.tree.add(r)}}},{key:"endTest",value:function(){this.disabled||this.tree.close()}},{key:"reset",value:function(){this.disabled||this.tree.clear()}},{key:"print",value:function(){this.disabled||this.tree.print()}}]),e}();function ec(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return tc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function tc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n50;return this.renderer===Ii||e},nodes:fc(),rels:fc(),graphUpdates:0,waypoints:{data:Ue.shallow({}),counter:0},setGraphUpdated:re(function(){this.graphUpdates+=1}),setRenderer:re(function(e){re(function(){this.graphUpdates+=1}),this.renderer=e}),setWaypoints:re(function(e){this.waypoints.data=e,this.waypoints.counter+=1}),setZoomPan:re(function(e,t,n,r){if(i){var o=Object.values(this.nodes.idToPosition),a=ml(o,E,O,r,e,this.zoom);a!==this.zoom&&(this.zoom=a,e===a&&(this.panX=t,this.panY=n))}else{var s=yl(e,this.zoom,E,O);s!==this.zoom&&(this.zoom=s,this.panX=t,this.panY=n)}this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1}),setZoom:re(function(e,t){if(i){var n=Object.values(this.nodes.idToPosition);this.zoom=ml(n,E,O,t,e,this.zoom)}else this.zoom=yl(e,this.zoom,E,O);this.fitNodeIds=[],this.fitMovement=0,this.resetZoom=!1,this.forceWebGL=!1}),setPan:re(function(e,t){this.panX=e,this.panY=t,this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1}),setLayout:re(function(e){this.layout=e}),setLayoutOptions:re(function(e){this.layoutOptions=e}),fitNodes:re(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.fitNodeIds=(0,t.intersection)(e,(0,t.map)(this.nodes.items,"id")),this.zoomOptions=Ec(Ec({},vc),n)}),setZoomReset:re(function(){this.resetZoom=!0}),clearFit:re(function(){this.fitNodeIds=[],this.forceWebGL=!1,this.fitMovement=0,this.zoomOptions=vc}),clearReset:re(function(){this.resetZoom=!1,this.fitMovement=0}),updateZoomToFit:re(function(e,t,n,r){var o;if(this.fitMovement=Math.abs(e-this.zoom)+Math.abs(t-this.panX)+Math.abs(n-this.panY),i){var a=Object.values(this.nodes.idToPosition);o=ml(a,E,O,r,e,this.zoom)}else o=yl(e,this.zoom,E,O);this.zoom=o,this.panX=t,this.panY=n}),updateMinimapZoomToFit:re(function(e,t,n){this.minimapZoom=e,this.minimapPanX=t,this.minimapPanY=n}),autorun:pe,reaction:ve});return R},Sc=function(e){return Boolean(e)&&"string"==typeof e.id&&e.id.length>0},Tc=Rp(1187);function Pc(e){return Pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pc(e)}function Cc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ac(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n{var t={};return Rp.d(t,e),t})({AnalyticsBrowser:()=>Ap});var Dc,Lc=new Uint8Array(16);function Bc(){if(!Dc&&!(Dc="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dc(Lc)}const Fc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Uc=[],zc=0;zc<256;++zc)Uc.push((zc+256).toString(16).substr(1));var Vc,Wc,Gc=0,Hc=0;const Yc=function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||Vc,a=void 0!==e.clockseq?e.clockseq:Wc;if(null==i||null==a){var s=e.random||(e.rng||Bc)();null==i&&(i=Vc=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=Wc=16383&(s[6]<<8|s[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:Hc+1,c=u-Gc+(l-Hc)/1e4;if(c<0&&void 0===e.clockseq&&(a=a+1&16383),(c<0||u>Gc)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Gc=u,Hc=l,Wc=a;var f=(1e4*(268435455&(u+=122192928e5))+l)%4294967296;o[r++]=f>>>24&255,o[r++]=f>>>16&255,o[r++]=f>>>8&255,o[r++]=255&f;var h=u/4294967296*1e4&268435455;o[r++]=h>>>8&255,o[r++]=255&h,o[r++]=h>>>24&15|16,o[r++]=h>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var d=0;d<6;++d)o[r+d]=i[d];return t||function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Uc[e[t+0]]+Uc[e[t+1]]+Uc[e[t+2]]+Uc[e[t+3]]+"-"+Uc[e[t+4]]+Uc[e[t+5]]+"-"+Uc[e[t+6]]+Uc[e[t+7]]+"-"+Uc[e[t+8]]+Uc[e[t+9]]+"-"+Uc[e[t+10]]+Uc[e[t+11]]+Uc[e[t+12]]+Uc[e[t+13]]+Uc[e[t+14]]+Uc[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&Fc.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n}(o)};function qc(e){return qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qc(e)}function Xc(){Xc=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),s=new k(r||[]);return o(a,"_invoke",{value:T(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function y(){}function m(){}function b(){}var _={};l(_,a,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(I([])));x&&x!==n&&r.call(x,a)&&(_=x);var E=b.prototype=y.prototype=Object.create(_);function O(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){function n(o,i,a,s){var u=f(e[o],e,i);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==qc(c)&&r.call(c,"__await")?t.resolve(c.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(c).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,s)})}s(u.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function T(t,n,r){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=P(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?v:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function P(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Kc(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Zc(e){var t=function(e){if("object"!=qc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qc(t)?t:String(t)}var $c=window.localStorage,Qc="neo4j.nvl.sTid",Jc=!1,ef=function(){function e(){var t,n,r;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),t=this,r=void 0,(n=Zc(n="analytics"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;var o=new Nc.AnalyticsBrowser;this.analytics=o}var t,n,r,o;return r=e,o=[{key:"init",value:function(e){this.analytics.load({writeKey:e}),this.analytics.addSourceMiddleware(function(e){var t=e.payload,n=e.next,r=t.obj.context.page;void 0!==r&&(r.url="",r.title="",r.search="",r.referrer="",r.path=""),n(t)})}},{key:"trackEvent",value:(t=Xc().mark(function e(t){var n;return Xc().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ready();case 2:n="".concat(t.eventPrefix?t.eventPrefix:"NVL_core","-").concat(t.event),this.analytics.track(n,t.properties).catch(function(e){Yr.warn("TRACKING: Event tracking is failed. err: ".concat(e))});case 4:case"end":return e.stop()}},e,this)}),n=function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){Kc(i,r,o,a,s,"next",e)}function s(e){Kc(i,r,o,a,s,"throw",e)}a(void 0)})},function(e){return n.apply(this,arguments)})},{key:"identify",value:function(){if(!Jc){var e=this.getSegmentTrackingId();this.analytics.identify(e).catch(function(e){Yr.debug("TRACKING: Identifying user for Segment tracking failed. err: ".concat(e))}),Jc=!0}}},{key:"loadSavedSegmentId",value:function(){try{var e=$c.getItem(Qc);return"string"==typeof e?e:null}catch(e){return Yr.debug("TRACKING: Retrieving tracking Id failed. err: ".concat(e)),null}}},{key:"getSegmentTrackingId",value:function(){var e=this.loadSavedSegmentId(),t=null!=e?e:Yc();return this.saveTrackingId(t),t}},{key:"saveTrackingId",value:function(e){$c.setItem(Qc,e)}},{key:"ready",value:function(){return this.analytics.ready().catch(function(e){Yr.debug("TRACKING: segment track instance not ready. err: ".concat(e))})}}],o&&function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function of(e,t){if(e){if("string"==typeof e)return af(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?af(e,t):void 0}}function af(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ff(this,n=wf),n.add(this),cf(this,vf,void 0),cf(this,gf,void 0),cf(this,yf,void 0),cf(this,mf,void 0),cf(this,bf,void 0),cf(this,_f,void 0),!0!==a.disableTelemetry&&(df(_f,this,new ef),hf(_f,this).init("4SGwdwzuDm5WkFvQtz7D6ATQlo14yjmW"),hf(_f,this).identify()),pf(wf,this,Of).call(this,a),df(vf,this,new i(s)),df(gf,this,new Jl),df(bf,this,a),hf(bf,this).frame=t,this.checkWebGLCompatibility(),pf(wf,this,Ef).call(this,r,o,a)}var n,r;return n=e,r=[{key:"restart",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getNodePositions(),r=hf(yf,this),o=r.zoom,i=r.layout,a=r.layoutOptions,s=r.nodes,u=r.rels;hf(mf,this).destroy(),Object.assign(hf(bf,this),e),pf(wf,this,Ef).call(this,s.items,u.items,hf(bf,this)),this.setZoom(o),this.setLayout(i),this.setLayoutOptions(a),this.addAndUpdateElementsInGraph(s.items,u.items),t&&this.setNodePositions(n)}},{key:"addAndUpdateElementsInGraph",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];pf(wf,this,Pf).call(this,e),pf(wf,this,Cf).call(this,t,e);var n={added:!1,updated:!1};hf(yf,this).nodes.update(e,uf({},n)),hf(yf,this).rels.update(t,uf({},n)),hf(yf,this).nodes.add(e,uf({},n)),hf(yf,this).rels.add(t,uf({},n)),hf(yf,this).setGraphUpdated(),hf(mf,this).updateHtmlOverlay()}},{key:"getSelectedNodes",value:function(){var e=this;return hf(yf,this).nodes.items.filter(function(e){return e.selected}).map(function(t){return uf(uf({},t),hf(yf,e).nodes.idToPosition[t.id])})}},{key:"getSelectedRelationships",value:function(){return hf(yf,this).rels.items.filter(function(e){return e.selected})}},{key:"updateElementsInGraph",value:function(e,t){var n={added:!1,updated:!1};pf(wf,this,Pf).call(this,e),pf(wf,this,Cf).call(this,t,e),hf(yf,this).nodes.update(e,uf({},n)),hf(yf,this).rels.update(t,uf({},n)),hf(mf,this).updateHtmlOverlay()}},{key:"addElementsToGraph",value:function(e,t){pf(wf,this,Pf).call(this,e),pf(wf,this,Cf).call(this,t,e);var n={added:!1,updated:!1};hf(yf,this).nodes.add(e,uf({},n)),hf(yf,this).rels.add(t,uf({},n)),hf(mf,this).updateHtmlOverlay()}},{key:"removeNodesWithIds",value:function(e){if(Array.isArray(e)&&!(0,t.isEmpty)(e)){var n,r={},o=rf(e);try{for(o.s();!(n=o.n()).done;)r[n.value]=!0}catch(e){o.e(e)}finally{o.f()}var i,a=[],s=rf(hf(yf,this).rels.items);try{for(s.s();!(i=s.n()).done;){var u=i.value;!0!==r[u.from]&&!0!==r[u.to]||a.push(u.id)}}catch(e){s.e(e)}finally{s.f()}a.length>0&&pf(wf,this,Tf).call(this,a),pf(wf,this,Sf).call(this,e),hf(yf,this).setGraphUpdated(),hf(mf,this).updateHtmlOverlay()}}},{key:"removeRelationshipsWithIds",value:function(e){Array.isArray(e)&&!(0,t.isEmpty)(e)&&(pf(wf,this,Tf).call(this,e),hf(yf,this).setGraphUpdated(),hf(mf,this).updateHtmlOverlay())}},{key:"getNodes",value:function(){return hf(mf,this).dumpNodes()}},{key:"getRelationships",value:function(){return hf(mf,this).dumpRelationships()}},{key:"getNodeById",value:function(e){return hf(yf,this).nodes.idToItem[e]}},{key:"getRelationshipById",value:function(e){return hf(yf,this).rels.idToItem[e]}},{key:"getPositionById",value:function(e){return hf(yf,this).nodes.idToPosition[e]}},{key:"getCurrentOptions",value:function(){return hf(bf,this)}},{key:"destroy",value:function(){hf(mf,this).destroy()}},{key:"deselectAll",value:function(){this.updateElementsInGraph(hf(yf,this).nodes.items.map(function(e){return uf(uf({},e),{},{selected:!1})}),hf(yf,this).rels.items.map(function(e){return uf(uf({},e),{},{selected:!1})}))}},{key:"fit",value:function(e,t){hf(mf,this).fit(e,t)}},{key:"resetZoom",value:function(){hf(mf,this).resetZoom()}},{key:"setUseWebGLRenderer",value:function(e){hf(mf,this).setRenderer(e?Ii:Ri)}},{key:"setRenderer",value:function(e){hf(mf,this).setRenderer(e)}},{key:"setDisableWebGL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];hf(bf,this).disableWebGL!==e&&(hf(bf,this).disableWebGL=e,this.restart())}},{key:"pinNode",value:function(e){hf(yf,this).nodes.update([{id:e,pinned:!0}],{})}},{key:"unPinNode",value:function(e){hf(yf,this).nodes.update(e.map(function(e){return{id:e,pinned:!1}}),{})}},{key:"setLayout",value:function(e){hf(yf,this).setLayout(e)}},{key:"setLayoutOptions",value:function(e){hf(yf,this).setLayoutOptions(e)}},{key:"getNodesOnScreen",value:function(){return hf(mf,this).getNodesOnScreen()}},{key:"getNodePositions",value:function(){return hf(mf,this).getNodePositions()}},{key:"setNodePositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];hf(mf,this).setNodePositions(e,t)}},{key:"isLayoutMoving",value:function(){return hf(mf,this).isLayoutMoving()}},{key:"saveToFile",value:function(e){hf(mf,this).saveToFile(e)}},{key:"saveFullGraphToLargeFile",value:function(e){hf(mf,this).saveFullGraphToLargeFile(e)}},{key:"setZoom",value:function(e){hf(mf,this).setZoomLevel(e)}},{key:"setPan",value:function(e,t){hf(mf,this).setPanCoordinates(e,t)}},{key:"setZoomAndPan",value:function(e,t,n){hf(mf,this).setZoomAndPan(e,t,n)}},{key:"getScale",value:function(){return hf(mf,this).getScale()}},{key:"getPan",value:function(){return hf(mf,this).getPan()}},{key:"getHits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["node","relationship"],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{hitNodeMarginWidth:0},r=hf(yf,this),o=r.zoom,i=r.panX,a=r.panY,s=r.webGLVisible,u=Ru(e,hf(bf,this).frame,o,i,a),l=u.x,c=u.y,f=s?function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["node","relationship"],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=[],a=[],s=n.nodes,u=n.rels;return r.includes("node")&&i.push.apply(i,il(function(e,t){var n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=[],a=al(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]);try{var s=function(){var a,s=n.value,u=r[s.id];if(void 0===(null==u?void 0:u.x)||void 0===u.y)return 1;var l=(null!==(a=s.size)&&void 0!==a?a:gr)*Sr(),c={x:u.x-e,y:u.y-t},f=Math.pow(l,2),h=Math.pow(l+o,2),d=Math.pow(c.x,2)+Math.pow(c.y,2),p=Math.sqrt(d);if(dp});i.splice(-1!==v?v:i.length,0,{data:s,targetCoordinates:{x:u.x,y:u.y},pointerCoordinates:{x:e,y:t},distanceVector:c,distance:p,insideNode:d3&&void 0!==arguments[3]?arguments[3]:{},o=[],i={},a=al(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]);try{var s=function(){var a=n.value,s=a.from,u=a.to;if(void 0===i["".concat(s,".").concat(u)]){var l=r[s],c=r[u];if(void 0===(null==l?void 0:l.x)||void 0===l.y)return 0;if(void 0===(null==c?void 0:c.x)||void 0===c.y)return 0;var f=Ba({x:l.x,y:l.y},{x:c.x,y:c.y},{x:e,y:t});if(f<=ll){var h=o.findIndex(function(e){return e.distance>f});o.splice(-1!==h?h:o.length,0,{data:a,fromTargetCoordinates:{x:l.x,y:l.y},toTargetCoordinates:{x:c.x,y:c.y},pointerCoordinates:{x:e,y:t},distance:f})}i["".concat(s,".").concat(u)]=1,i["".concat(u,".").concat(s)]=1}};for(a.s();!(n=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return o}(e,t,u.items,s.idToPosition))),{nodes:i,relationships:a}}(l,c,hf(yf,this),t,n):function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["node","relationship"],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=[],a=[];return r.includes("node")&&i.push.apply(i,il(n.getCanvasNodesAt({x:e,y:t},o.hitNodeMarginWidth))),r.includes("relationship")&&a.push.apply(a,il(n.getCanvasRelsAt({x:e,y:t}))),{nodes:i,relationships:a}}(l,c,hf(mf,this),t,n);return uf(uf({},e),{},{nvlTargets:f})}},{key:"getContainer",value:function(){return hf(bf,this).frame}},{key:"checkWebGLCompatibility",value:function(){var e=hf(bf,this).disableWebGL;if(void 0===e||!e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.createElement("canvas");try{return Boolean(void 0!==window.WebGLRenderingContext&&(null!==e.getContext("webgl")||null!==e.getContext("experimental-webgl")))}catch(e){return!1}}();if(!t){if(void 0!==e)throw new Lo("Could not initialize WebGL");hf(bf,this).renderer=Ri,console.warn("GPU acceleration is not available on your browser. Falling back to CPU layout and rendering. You can disable this warning by setting the disableWebGL option to true.")}void 0===e&&(hf(bf,this).disableWebGL=!t)}}}],r&&function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};df(yf,this,Oc(o)),o.minimapContainer instanceof HTMLElement||delete o.minimapContainer,df(mf,this,new Gl(hf(yf,this),o)),this.addAndUpdateElementsInGraph(n,r),hf(mf,this).on("restart",this.restart.bind(this));var i,a,s=rf((i=hf(vf,this).callbacks,Object.entries(i)));try{for(s.s();!(a=s.n()).done;){var u=nf(a.value,2),l=u[0];void 0!==u[1]&&hf(mf,this).on(l,hf(vf,this)[l].bind(hf(vf,this)))}}catch(e){s.e(e)}finally{s.f()}var c=null===(e=hf(bf,this).frame)||void 0===e?void 0:e.getAttribute("id");!0!==hf(bf,this).disableTelemetry&&setTimeout(function(){hf(mf,t).isDestroyed()||hf(_f,t).trackEvent({eventPrefix:Tr.includes(c)?c:null,event:"instantiated",properties:{}})},200)}function Of(e){var t,n=e.logging;void 0!==(null==n?void 0:n.level)&&(t=n.level,Yr.setLevel(t),function(e,t){var n=e.methodFactory;e.methodFactory=function(e,r,o){var i=n(e,r,o);return function(){for(var n=arguments.length,r=new Array(n),o=0;o0}(e)});if(t){var n="";throw/^\d+$/.test(t.id)||(n=" Node ids need to be numeric strings. Strings that contain anything other than numbers are not yet supported."),new TypeError("Invalid node provided: ".concat(JSON.stringify(t),".").concat(n))}}function Cf(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n="",r=null,o=hf(yf,this),i=o.nodes,a=o.rels,s={},u=0;u{this.container?.addEventListener(e,t,n)};removeEventListener=(e,t,n)=>{this.container?.removeEventListener(e,t,n)};callCallbackIfRegistered=(e,...t)=>{const n=this.callbackMap.get(e);"function"==typeof n&&n(...t)};updateCallback=(e,t)=>{this.callbackMap.set(e,t)};removeCallback=e=>{this.callbackMap.delete(e)}}class Lp extends Dp{mousePosition;mouseDownNode;isDragging;isDrawing;selectedNodes;moveSelectedNodes;constructor(e,t={}){super(e,t),this.mousePosition={x:0,y:0},this.isDragging=!1,this.isDrawing=!1,this.selectedNodes=[],this.moveSelectedNodes=!1,this.addEventListener("mousedown",this.handleMouseDown),this.addEventListener("mousemove",this.handleMouseMove),this.addEventListener("mouseup",this.handleMouseUp)}handleMouseDown=e=>{this.mousePosition={x:e.clientX,y:e.clientY};const t=this.nvlInstance.getHits(e,["node"],{hitNodeMarginWidth:10}),n=t.nvlTargets.nodes.filter(e=>e.insideNode);t.nvlTargets.nodes.filter(e=>!e.insideNode).length>0?(this.isDrawing=!0,this.mouseDownNode=null):n.length>0?this.mouseDownNode=t.nvlTargets.nodes[0]??null:this.mouseDownNode=null,this.selectedNodes=this.nvlInstance.getSelectedNodes(),null!==this.mouseDownNode&&this.selectedNodes.map(e=>e.id).includes(this.mouseDownNode.data.id)?this.moveSelectedNodes=!0:this.moveSelectedNodes=!1};handleMouseMove=e=>{if(null===this.mouseDownNode||1!==e.buttons||this.isDrawing)return;if(!((e,t)=>{const n=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y);return n>10||r>10||Math.pow(n,2)+Math.pow(r,2)>10})(e,this.mousePosition))return;this.isDragging||(this.moveSelectedNodes?this.callCallbackIfRegistered("onDragStart",this.selectedNodes,e):this.callCallbackIfRegistered("onDragStart",[this.mouseDownNode.data],e),this.isDragging=!0);const t=this.nvlInstance.getScale(),n=(e.clientX-this.mousePosition.x)/t*window.devicePixelRatio,r=(e.clientY-this.mousePosition.y)/t*window.devicePixelRatio;this.moveSelectedNodes?(this.nvlInstance.setNodePositions(this.selectedNodes.map(e=>({id:e.id,x:e.x+n,y:e.y+r,pinned:!0})),!0),this.callCallbackIfRegistered("onDrag",this.selectedNodes,e)):(this.nvlInstance.setNodePositions([{id:this.mouseDownNode.data.id,x:this.mouseDownNode.targetCoordinates.x+n,y:this.mouseDownNode.targetCoordinates.y+r,pinned:!0}],!0),this.callCallbackIfRegistered("onDrag",[this.mouseDownNode.data],e))};handleMouseUp=e=>{this.isDragging&&(this.moveSelectedNodes?this.callCallbackIfRegistered("onDragEnd",this.selectedNodes,e):this.callCallbackIfRegistered("onDragEnd",[this.mouseDownNode?.data],e)),this.isDragging=!1,this.mouseDownNode=null,this.isDrawing=!1,this.selectedNodes=[],this.moveSelectedNodes=!1};destroy=()=>{this.removeEventListener("mousedown",this.handleMouseDown),this.removeEventListener("mousemove",this.handleMouseMove),this.removeEventListener("mouseup",this.handleMouseUp)}}class Bp extends Dp{currentHoveredElement;currentHoveredElementIsNode;updates;constructor(e,t={drawShadowOnHover:!1}){super(e,t),this.updates={nodes:[],relationships:[]},this.addEventListener("mousemove",this.handleHover,!0)}handleHover=e=>{const{nvlTargets:t}=this.nvlInstance.getHits(e),{nodes:n=[],relationships:r=[]}=t,o=n[0]??r[0],i=o?.data;if(this.currentElementNeedsUnHover(i?.id)&&this.unHoverCurrentElement(),void 0!==i&&void 0!==n[0])this.updates.nodes.push({id:i.id,hovered:!0}),this.currentHoveredElement=i,this.currentHoveredElementIsNode=!0;else if(void 0!==o){const{id:e,from:t,to:n}=i;this.updates.relationships.push({id:e,from:t,to:n,hovered:!0}),this.currentHoveredElement=i,this.currentHoveredElementIsNode=!1}else this.currentHoveredElement=void 0,this.currentHoveredElementIsNode=void 0;this.callCallbackIfRegistered("onHover",this.currentHoveredElement,t,e),!0===this.currentOptions.drawShadowOnHover&&this.nvlInstance.getNodes().length>0&&this.nvlInstance.updateElementsInGraph(this.updates.nodes,this.updates.relationships),this.clearUpdates()};clearUpdates(){this.updates.nodes=[],this.updates.relationships=[]}currentElementNeedsUnHover(e){return void 0!==this.currentHoveredElement&&this.currentHoveredElement.id!==e}unHoverCurrentElement(){if(void 0===this.currentHoveredElement)return;const e={id:this.currentHoveredElement.id,hovered:!1};if(!0===this.currentHoveredElementIsNode)this.updates.nodes.push(e);else{const{from:t,to:n}=this.currentHoveredElement;this.updates.relationships.push({...e,from:t,to:n})}}destroy(){this.removeEventListener("mousemove",this.handleHover,!0)}}a(1582);var Fp=a(2543);class Up extends Dp{mousePosition;targets;shouldPan;constructor(e,t={excludeNodeMargin:!1}){super(e,t),this.mousePosition={x:0,y:0},this.targets=[],this.shouldPan=!1,this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mousemove",this.handleMouseMove,!0),this.addEventListener("mouseup",this.handleMouseUp,!0)}updateTargets=(e,t)=>{this.targets=e,this.currentOptions.excludeNodeMargin=t};handleMouseDown=e=>{const t=this.nvlInstance.getHits(e,(0,Fp.difference)(["node","relationship"],this.targets),{hitNodeMarginWidth:!0===this.currentOptions.excludeNodeMargin?10:0});t.nvlTargets.nodes.length>0||t.nvlTargets.relationships.length>0?this.shouldPan=!1:(this.mousePosition={x:e.clientX,y:e.clientY},this.shouldPan=!0)};handleMouseMove=e=>{if(!this.shouldPan||1!==e.buttons)return;const t=this.nvlInstance.getScale(),{x:n,y:r}=this.nvlInstance.getPan(),o=(e.clientX-this.mousePosition.x)/t*window.devicePixelRatio,i=(e.clientY-this.mousePosition.y)/t*window.devicePixelRatio;this.nvlInstance.setPan(n-o,r-i),this.callCallbackIfRegistered("onPan",{x:n-o,y:r-i},e),this.mousePosition={x:e.clientX,y:e.clientY}};handleMouseUp=()=>{this.shouldPan=!1};destroy(){this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mousemove",this.handleMouseMove,!0),this.removeEventListener("mouseup",this.handleMouseUp,!0)}}class zp extends Dp{constructor(e,t={}){super(e,t),this.addEventListener("wheel",this.handleWheel)}throttledZoom=(0,Fp.throttle)(e=>{const t=this.nvlInstance.getScale(),{x:n,y:r}=this.nvlInstance.getPan(),o=t-e.deltaY/500*Math.min(1,t),i=((e,t)=>{const n=e.getBoundingClientRect(),r=window.devicePixelRatio||1;return{x:(t.clientX-n.left-.5*n.width)*r,y:(t.clientY-n.top-.5*n.height)*r}})(this.containerInstance,e),a=n+(i.x/t-i.x/o),s=r+(i.y/t-i.y/o);this.nvlInstance.setZoomAndPan(o,a,s),this.callCallbackIfRegistered("onZoom",o,e)},25,{leading:!0});handleWheel=e=>{e.preventDefault(),this.throttledZoom(e)};destroy=()=>{this.removeEventListener("wheel",this.handleWheel)}}class Vp{nvl;zoomInteraction;panInteraction;dragNodeInteraction;hoverInteraction;constructor(e,t=null,n=[],r=[],o={},i={}){this.nvl=new Np(e,n,r,{...o,disableTelemetry:!0,disableWebWorkers:!0,disableAria:!0},i),this.zoomInteraction=new zp(this.nvl),this.panInteraction=new Up(this.nvl),this.dragNodeInteraction=new Lp(this.nvl),null!==t&&(this.hoverInteraction=new Bp(this.nvl),this.hoverInteraction.updateCallback("onHover",e=>{if(void 0===e)t.textContent="","block"===t.style.display&&(t.style.display="none");else if("from"in e){const n=e;let r=`Source ID: ${n.from}
Target ID: ${n.to}`;for(const[t,n]of Object.entries(e.properties))r+=`
${t}: ${n}`;t.setHTMLUnsafe(r),"none"===t.style.display&&(t.style.display="block")}else if("id"in e){let n=`ID: ${e.id}`;for(const[t,r]of Object.entries(e.properties))n+=`
${t}: ${r}`;t.setHTMLUnsafe(n),"none"===t.style.display&&(t.style.display="block")}})),o.layout===Mp&&this.nvl.setNodePositions(n,!1)}}})(),NVLBase=s})(); \ No newline at end of file +var NVLBase;(()=>{var e,t,n,r,o={2:(e,t,n)=>{var r=n(2199),o=n(4664),i=n(5950);e.exports=function(e){return r(e,i,o)}},79:(e,t,n)=>{var r=n(3702),o=n(80),i=n(4739),a=n(8655),s=n(1175);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},104:(e,t,n)=>{var r=n(3661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},117:(e,t,n)=>{var r;try{r={clone:n(2629),constant:n(7334),each:n(6135),filter:n(7612),has:n(1448),isArray:n(6449),isEmpty:n(2193),isFunction:n(1882),isUndefined:n(2216),keys:n(5950),map:n(5378),reduce:n(860),size:n(7091),transform:n(9752),union:n(299),values:n(5880)}}catch(e){}r||(r=window._),e.exports=r},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},270:(e,t,n)=>{var r=n(7068),o=n(346);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},289:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},299:(e,t,n)=>{var r=n(3120),o=n(9302),i=n(5765),a=n(3693),s=o(function(e){return i(r(e,1,a,!0))});e.exports=s},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},356:(e,t)=>{"use strict";var n=/\d{13}/;t.is=function(e){return n.test(e)},t.parse=function(e){return e=parseInt(e,10),new Date(e)}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{e.exports=function(e,t){return null==e?void 0:e[t]}},426:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},472:(e,t,n)=>{"use strict";n.d(t,{Ud:()=>a,kJ:()=>o,rY:()=>i});var r="analytics";function o(){return window[r]}function i(e){r=e}function a(e){window[r]=e}},498:(e,t,n)=>{var r=n(9888);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},514:(e,t,n)=>{var r=n(4932);e.exports=function(e,t){return r(t,function(t){return e[t]})}},524:(e,t,n)=>{"use strict";function r(e,t){return t=t||{},new Promise(function(n,r){var o=new XMLHttpRequest,i=[],a=[],s={},u=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:u,headers:{keys:function(){return i},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in o.open(t.method||"get",e,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,n){i.push(t=t.toLowerCase()),a.push([t,n]),s[t]=s[t]?s[t]+","+n:n}),n(u())},o.onerror=r,o.withCredentials="include"==t.credentials,t.headers)o.setRequestHeader(l,t.headers[l]);o.send(t.body||null)})}n.d(t,{h:()=>i});var o=n(2453),i=function(){for(var e=[],t=0;t{var r=n(7237),o=n(7255),i=n(8586),a=n(7797);e.exports=function(e){return i(e)?r(a(e)):o(e)}},631:(e,t,n)=>{var r=n(8077),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},641:(e,t,n)=>{var r=n(6649),o=n(5950);e.exports=function(e,t){return e&&r(e,t,o)}},659:(e,t,n)=>{var r=n(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},689:(e,t,n)=>{var r=n(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var u=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!u)return!1;for(var f=c;f--;){var h=l[f];if(!(u?h in t:o.call(t,h)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=u;++f{var r=n(8096),o=n(2428),i=n(6449),a=n(3656),s=n(361),u=n(7167),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&o(e),f=!n&&!c&&a(e),h=!n&&!c&&!f&&u(e),d=n||c||f||h,p=d?r(e.length,String):[],v=p.length;for(var g in e)!t&&!l.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||p.push(g);return p}},756:(e,t,n)=>{var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},776:(e,t,n)=>{var r=n(756),o=n(5950);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},860:(e,t,n)=>{var r=n(882),o=n(909),i=n(5389),a=n(5558),s=n(6449);e.exports=function(e,t,n){var u=s(e)?r:a,l=arguments.length<3;return u(e,i(t,4),n,l,o)}},882:e=>{e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o{var r=n(641),o=n(8329)(r);e.exports=o},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945:(e,t,n)=>{var r=n(79),o=n(8223),i=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},1033:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},1042:(e,t,n)=>{var r=n(6110)(Object,"create");e.exports=r},1045:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"post")}},1094:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var r=n(1635);function o(e,t){var n,o=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce(function(e,t){var n,o,i=t[0],a=t[1];return"object"==typeof a?(0,r.Cl)((0,r.Cl)({},e),((n={})[i]=a,n)):(0,r.Cl)((0,r.Cl)({},e),((o={})[i]={},o))},{});return Object.entries(e.integrations).reduce(function(e,t){var n,i=t[0],a=t[1];return(0,r.Cl)((0,r.Cl)({},e),((n={})[i]=(0,r.Cl)((0,r.Cl)({},a),o[i]),n))},{})}},1137:e=>{e.exports=function(e,t,n,r){var o=e[0],i=e[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=t.length);for(var s=r-n,u=0,l=s-1;ui!=d>i&&o<(h-c)*(i-f)/(d-f)+c&&(a=!a)}return a}},1166:(e,t,n)=>{e.exports={Graph:n(6454),version:n(4458)}},1175:(e,t,n)=>{var r=n(6025);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},1298:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var r="npm";function o(){return r}},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1418:(e,t,n)=>{"use strict";var r=n(2543),o=n(6718);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),function(t){!function(e,t){var n,r,i,a=t.v,s=e.node(a).rank,u=t.w,l=e.node(u).rank,c=t.name,f=e.edge(t),h=f.labelRank;if(l!==s+1){for(e.removeEdge(t),i=0,++s;s{var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},1448:(e,t,n)=>{var r=n(426),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},1476: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;n{var r=n(2032),o=n(3862),i=n(6721),a=n(2749),s=n(5749);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{"use strict";var r=n(2543),o=n(2856),i=n(3382).slack,a=n(3382).longestPath,s=n(8362).alg.preorder,u=n(8362).alg.postorder,l=n(6718).simplify;function c(e){e=l(e),a(e);var t,n=o(e);for(d(n),f(n,e);t=v(n);)y(n,e,t,g(n,e,t))}function f(e,t){var n=u(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=h(e,t,n)}(e,t,n)})}function h(e,t,n){var o=e.node(n).parent,i=!0,a=t.edge(n,o),s=0;return a||(i=!1,a=t.edge(o,n)),s=a.weight,r.forEach(t.nodeEdges(n),function(r){var a,u,l=r.v===n,c=l?r.w:r.v;if(c!==o){var f=l===i,h=t.edge(r).weight;if(s+=f?h:-h,a=n,u=c,e.hasEdge(a,u)){var d=e.edge(n,c).cutvalue;s+=f?-d:d}}}),s}function d(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,o,i){var a=n,s=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),function(i){r.has(t,i)||(n=p(e,t,n,i,o))}),s.low=a,s.lim=n++,i?s.parent=i:delete s.parent,n}function v(e){return r.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function g(e,t,n){var o=n.v,a=n.w;t.hasEdge(o,a)||(o=n.w,a=n.v);var s=e.node(o),u=e.node(a),l=s,c=!1;s.lim>u.lim&&(l=u,c=!0);var f=r.filter(t.edges(),function(t){return c===m(0,e.node(t.v),l)&&c!==m(0,e.node(t.w),l)});return r.minBy(f,function(e){return i(t,e)})}function y(e,t,n,o){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),d(e),f(e,t),function(e,t){var n=r.find(e.nodes(),function(e){return!t.node(e).parent}),o=s(e,n);o=o.slice(1),r.forEach(o,function(n){var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)})}(e,t)}function m(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=d,c.initCutValues=f,c.calcCutValue=h,c.leaveEdge=v,c.enterEdge=g,c.exchangeEdges=y},1582:(e,t,n)=>{"use strict";var r=n(5341),o=n(4262),i=n(9095),a=n(3467).orient2d;function s(e,t,n){t=Math.max(0,void 0===t?2:t),n=n||0;var o=function(e){for(var t=e[0],n=e[0],r=e[0],o=e[0],a=0;ar[0]&&(r=s),s[1]o[1]&&(o=s)}var u=[t,n,r,o],l=u.slice();for(a=0;a=2&&d(t[t.length-2],t[t.length-1],e[n])<=0;)t.pop();t.push(e[n])}for(var r=[],o=e.length-1;o>=0;o--){for(;r.length>=2&&d(r[r.length-2],r[r.length-1],e[o])<=0;)r.pop();r.push(e[o])}return r.pop(),t.pop(),t.concat(r)}(l)}(e),a=new r(16);a.toBBox=function(e){return{minX:e[0],minY:e[1],maxX:e[0],maxY:e[1]}},a.compareMinX=function(e,t){return e[0]-t[0]},a.compareMinY=function(e,t){return e[1]-t[1]},a.load(e);for(var s,l=[],c=0;ca||u.push({node:p,dist:v})}for(;u.length&&!u.peek().node.children;){var g=u.pop(),y=g.node,b=m(y,t,n),_=m(y,r,i);if(g.dist=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function h(e,t,n){for(var r=Math.min(e[0],t[0]),o=Math.min(e[1],t[1]),i=Math.max(e[0],t[0]),a=Math.max(e[1],t[1]),s=n.search({minX:r,minY:o,maxX:i,maxY:a}),u=0;u0!=d(e,t,r)>0&&d(n,r,e)>0!=d(n,r,t)>0}function v(e){var t=e.p,n=e.next.p;return e.minX=Math.min(t[0],n[0]),e.minY=Math.min(t[1],n[1]),e.maxX=Math.max(t[0],n[0]),e.maxY=Math.max(t[1],n[1]),e}function g(e,t){var n={p:e,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(n.next=t.next,n.prev=t,t.next.prev=n,t.next=n):(n.prev=n,n.next=n),n}function y(e,t){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function m(e,t,n){var r=t[0],o=t[1],i=n[0]-r,a=n[1]-o;if(0!==i||0!==a){var s=((e[0]-r)*i+(e[1]-o)*a)/(i*i+a*a);s>1?(r=n[0],o=n[1]):s>0&&(r+=i*s,o+=a*s)}return(i=e[0]-r)*i+(a=e[1]-o)*a}function b(e,t,n,r,o,i,a,s){var u,l,c,f,h=n-e,d=r-t,p=a-o,v=s-i,g=e-o,y=t-i,m=h*h+d*d,b=h*p+d*v,_=p*p+v*v,w=h*g+d*y,x=p*g+v*y,E=m*_-b*b,O=E,S=E;0===E?(l=0,O=1,f=x,S=_):(f=m*x-b*w,(l=b*x-_*w)<0?(l=0,f=x,S=_):l>O&&(l=O,f=x+b,S=_)),f<0?(f=0,-w<0?l=0:-w>m?l=O:(l=-w,O=m)):f>S&&(f=S,-w+b<0?l=0:-w+b>m?l=O:(l=-w+b,O=m));var T=(1-(c=0===f?0:f/S))*o+c*a-((1-(u=0===l?0:l/O))*e+u*n),P=(1-c)*i+c*s-((1-u)*t+u*r);return T*T+P*P}function _(e,t){return e[0]===t[0]?e[1]-t[1]:e[0]-t[0]}o.default&&(o=o.default),e.exports=s,e.exports.default=s},1635:(e,t,n)=>{"use strict";n.d(t,{C6:()=>o,Cl:()=>i,Tt:()=>a,YH:()=>u,fX:()=>l,sH:()=>s});var r=function(e,t){return r=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])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=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])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{e.exports={components:n(3619),dijkstra:n(8905),dijkstraAll:n(4919),findCycles:n(6678),floydWarshall:n(3590),isAcyclic:n(498),postorder:n(1045),preorder:n(6016),prim:n(4423),tarjan:n(6291),topsort:n(9888)}},1737:(e,t,n)=>{var r=n(117);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(e){return e.key})},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n>1].priority{var r=n(6449),o=n(8586),i=n(1802),a=n(3222);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},1791:(e,t,n)=>{var r=n(6547),o=n(3360);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s{var r=n(7217),o=n(270);e.exports=function(e,t,n,i){var a=n.length,s=a,u=!i;if(null==e)return!s;for(e=Object(e);a--;){var l=n[a];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a{var r=n(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)}),t});e.exports=a},1811:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},1873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},1882:(e,t,n)=>{var r=n(2552),o=n(3805);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,n)=>{var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},1986:(e,t,n)=>{var r=n(1873),o=n(7828),i=n(5288),a=n(5911),s=n(317),u=n(4247),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,f,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=u),e.size!=t.size&&!p)return!1;var v=h.get(e);if(v)return v==t;r|=2,h.set(e,t);var g=a(d(e),d(t),r,l,f,h);return h.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},1993:(e,t,n)=>{var r=n(9811),o=n(9698),i=n(7927);e.exports=function(e){return o(e)?i(e):r(e)}},2032:(e,t,n)=>{var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2079:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var r=function(){function e(e){var t;this.callbacks={},this.warned=!1,this.maxListeners=null!==(t=null==e?void 0:e.maxListeners)&&void 0!==t?t:10}return e.prototype.warnIfPossibleMemoryLeak=function(e){this.warned||this.maxListeners&&this.callbacks[e].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(e)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},e.prototype.on=function(e,t){return this.callbacks[e]?(this.callbacks[e].push(t),this.warnIfPossibleMemoryLeak(e)):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var o=[],i=0;i{var r=n(8984),o=n(5861),i=n(2428),a=n(6449),s=n(4894),u=n(3656),l=n(5527),c=n(7167),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(l(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},2199:(e,t,n)=>{var r=n(4528),o=n(6449);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},2216:e=>{e.exports=function(e){return void 0===e}},2224:(e,t,n)=>{var r=n(104);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},2271:(e,t,n)=>{var r=n(1791),o=n(4664);e.exports=function(e,t){return r(e,o(e),t)}},2321:(e,t,n)=>{"use strict";function r(e){return"string"==typeof e}function o(e){return"number"==typeof e}function i(e){return"function"==typeof e}function a(e){return null!=e}function s(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}n.d(t,{Et:()=>o,Kg:()=>r,Qd:()=>s,Tn:()=>i,t2:()=>a})},2360: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.Alias=void 0;var o=r(n(6698)),i=n(4500);function a(e,t){i.Facade.call(this,e,t)}t.Alias=a,o.default(a,i.Facade),a.prototype.action=function(){return"alias"},a.prototype.type=a.prototype.action,a.prototype.previousId=function(){return this.field("previousId")||this.field("from")},a.prototype.from=a.prototype.previousId,a.prototype.userId=function(){return this.field("userId")||this.field("to")},a.prototype.to=a.prototype.userId},2404:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},2428:(e,t,n)=>{var r=n(7534),o=n(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},2453:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var r=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:null}},2523:e=>{e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i"']/g,q=RegExp(H.source),X=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Oe="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="["+we+"]",Ae="["+Pe+"]",ke="["+xe+"]",Ie="\\d+",Re="["+Ee+"]",je="["+Oe+"]",Me="[^"+we+Pe+Ie+Ee+Oe+Se+"]",Ne="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Se+"]",Ue="\\u200d",ze="(?:"+je+"|"+Me+")",Ve="(?:"+Fe+"|"+Me+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ge="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+ke+"|"+Ne+")?",Ye="["+Te+"]?",qe=Ye+He+"(?:"+Ue+"(?:"+[De,Le,Be].join("|")+")"+Ye+He+")*",Xe="(?:"+[Re,Le,Be].join("|")+")"+qe,Ke="(?:"+[De+ke+"?",ke,Le,Be,Ce].join("|")+")",Ze=RegExp("['’]","g"),$e=RegExp(ke,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ke+qe,"g"),Je=RegExp([Fe+"?"+je+"+"+We+"(?="+[Ae,Fe,"$"].join("|")+")",Ve+"+"+Ge+"(?="+[Ae,Fe+ze,"$"].join("|")+")",Fe+"?"+ze+"+"+We,Fe+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Xe].join("|"),"g"),et=RegExp("["+Ue+we+xe+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[j]=ot[M]=ot[N]=ot[D]=ot[L]=ot[B]=ot[F]=ot[U]=ot[z]=!0,ot[v]=ot[g]=ot[I]=ot[y]=ot[R]=ot[m]=ot[b]=ot[_]=ot[x]=ot[E]=ot[O]=ot[T]=ot[P]=ot[C]=ot[k]=!1;var it={};it[v]=it[g]=it[I]=it[R]=it[y]=it[m]=it[j]=it[M]=it[N]=it[D]=it[L]=it[x]=it[E]=it[O]=it[T]=it[P]=it[C]=it[A]=it[B]=it[F]=it[U]=it[z]=!0,it[b]=it[_]=it[k]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ct||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,vt=pt&<.process,gt=function(){try{return dt&&dt.require&&dt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,mt=gt&>.isDate,bt=gt&>.isMap,_t=gt&>.isRegExp,wt=gt&>.isSet,xt=gt&>.isTypedArray;function Et(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ot(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function kt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function Jt(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var en=Gt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n",""":'"',"'":"'"}),pn=function e(t){var n,r=(t=null==t?ft:pn.defaults(ft.Object(),t,pn.pick(ft,nt))).Array,oe=t.Date,we=t.Error,xe=t.Function,Ee=t.Math,Oe=t.Object,Se=t.RegExp,Te=t.String,Pe=t.TypeError,Ce=r.prototype,Ae=xe.prototype,ke=Oe.prototype,Ie=t["__core-js_shared__"],Re=Ae.toString,je=ke.hasOwnProperty,Me=0,Ne=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=ke.toString,Le=Re.call(Oe),Be=ft._,Fe=Se("^"+Re.call(je).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=pt?t.Buffer:o,ze=t.Symbol,Ve=t.Uint8Array,We=Ue?Ue.allocUnsafe:o,Ge=an(Oe.getPrototypeOf,Oe),He=Oe.create,Ye=ke.propertyIsEnumerable,qe=Ce.splice,Xe=ze?ze.isConcatSpreadable:o,Ke=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=li(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,lt=oe&&oe.now!==ft.Date.now&&oe.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Ee.ceil,dt=Ee.floor,vt=Oe.getOwnPropertySymbols,gt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Gt=Ce.join,vn=an(Oe.keys,Oe),gn=Ee.max,yn=Ee.min,mn=oe.now,bn=t.parseInt,_n=Ee.random,wn=Ce.reverse,xn=li(t,"DataView"),En=li(t,"Map"),On=li(t,"Promise"),Sn=li(t,"Set"),Tn=li(t,"WeakMap"),Pn=li(Oe,"create"),Cn=Tn&&new Tn,An={},kn=Li(xn),In=Li(En),Rn=Li(On),jn=Li(Sn),Mn=Li(Tn),Nn=ze?ze.prototype:o,Dn=Nn?Nn.valueOf:o,Ln=Nn?Nn.toString:o;function Bn(e){if(es(e)&&!Wa(e)&&!(e instanceof Vn)){if(e instanceof zn)return e;if(je.call(e,"__wrapped__"))return Bi(e)}return new zn(e)}var Fn=function(){function e(){}return function(t){if(!Ja(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Un(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ar(e,t,n,r,i,a){var s,u=1&t,l=2&t,c=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!Ja(e))return e;var f=Wa(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Po(e,s)}else{var h=hi(e),d=h==_||h==w;if(qa(e))return wo(e,u);if(h==O||h==v||d&&!i){if(s=l||d?{}:pi(e),!u)return l?function(e,t){return Co(e,fi(e),t)}(e,function(e,t){return e&&Co(t,Is(t),e)}(s,e)):function(e,t){return Co(e,ci(e),t)}(e,nr(s,e))}else{if(!it[h])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case I:return xo(e);case y:case m:return new o(+e);case R:return function(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case j:case M:case N:case D:case L:case B:case F:case U:case z:return Eo(e,n);case x:return new o;case E:case C:return new o(e);case T:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new o;case A:return r=e,Dn?Oe(Dn.call(r)):{}}}(e,h,u)}}a||(a=new qn);var p=a.get(e);if(p)return p;a.set(e,s),is(e)?e.forEach(function(r){s.add(ar(r,t,n,r,e,a))}):ts(e)&&e.forEach(function(r,o){s.set(o,ar(r,t,n,o,e,a))});var g=f?o:(c?l?ni:ti:l?Is:ks)(e);return St(g||e,function(r,o){g&&(r=e[o=r]),Jn(s,o,ar(r,t,n,o,e,a))}),s}function sr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Oe(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Pe(i);return Ci(function(){e.apply(o,n)},t)}function lr(e,t,n,r){var o=-1,i=At,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=It(t,Kt(n))),r?(i=kt,a=!1):t.length>=200&&(i=$t,a=!1,t=new Yn(t));e:for(;++o-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(En||Gn),string:new Wn}},Hn.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return si(this,e).get(e)},Hn.prototype.has=function(e){return si(this,e).has(e)},Hn.prototype.set=function(e,t){var n=si(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,a),this},Yn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.clear=function(){this.__data__=new Gn,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var cr=Io(mr),fr=Io(br,!0);function hr(e,t){var n=!0;return cr(e,function(e,r,o){return n=!!t(e,r,o)}),n}function dr(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?vr(s,t-1,n,r,o):Rt(o,s):r||(o[o.length]=s)}return o}var gr=Ro(),yr=Ro(!0);function mr(e,t){return e&&gr(e,t,ks)}function br(e,t){return e&&yr(e,t,ks)}function _r(e,t){return Ct(t,function(t){return Za(e[t])})}function wr(e,t){for(var n=0,r=(t=yo(t,e)).length;null!=e&&nt}function Sr(e,t){return null!=e&&je.call(e,t)}function Tr(e,t){return null!=e&&t in Oe(e)}function Pr(e,t,n){for(var i=n?kt:At,a=e[0].length,s=e.length,u=s,l=r(s),c=1/0,f=[];u--;){var h=e[u];u&&t&&(h=It(h,Kt(t))),c=yn(h.length,c),l[u]=!n&&(t||a>=120&&h.length>=120)?new Yn(u&&h):o}h=e[0];var d=-1,p=l[0];e:for(;++d=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(o)}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&qe.call(s,u,1),qe.call(e,u,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;gi(o)?qe.call(e,o,1):uo(e,o)}}return e}function Hr(e,t){return e+dt(_n()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function qr(e,t){return Ai(Oi(e,t,nu),e+"")}function Xr(e){return Kn(Fs(e))}function Kr(e,t){var n=Fs(e);return Ri(n,ir(t,0,n.length))}function Zr(e,t,n,r){if(!Ja(e))return e;for(var i=-1,a=(t=yo(t,e)).length,s=a-1,u=e;null!=u&&++ii?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o>>1,a=e[i];null!==a&&!ss(a)&&(n?a<=t:a=200){var l=t?null:qo(e);if(l)return un(l);a=!1,o=$t,u=new Yn}else u=t?[]:s;e:for(;++r=r?e:eo(e,t,n)}var _o=at||function(e){return ft.clearTimeout(e)};function wo(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function xo(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Eo(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=ss(e),s=t!==o,u=null===t,l=t==t,c=ss(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&e1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&yi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Oe(t);++r-1?i[a?t[s]:s]:o}}function Lo(e){return ei(function(t){var n=t.length,r=n,a=zn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Pe(i);if(a&&!u&&"wrapper"==oi(s))var u=new zn([],!0)}for(r=u?r:n;++r1&&_.reverse(),d&&fu))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var h=-1,d=!0,p=2&n?new Yn:o;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return St(p,function(n){var r="_."+n[0];t&n[1]&&!At(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ii(e){var t=0,n=0;return function(){var r=mn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,oa(e,n)});function fa(e){var t=Bn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var da=ei(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&gi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new zn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)}),pa=Ao(function(e,t,n){je.call(e,n)?++e[n]:rr(e,n,1)}),va=Do(Vi),ga=Do(Wi);function ya(e,t){return(Wa(e)?St:cr)(e,ai(t,3))}function ma(e,t){return(Wa(e)?Tt:fr)(e,ai(t,3))}var ba=Ao(function(e,t,n){je.call(e,n)?e[n].push(t):rr(e,n,[t])}),_a=qr(function(e,t,n){var o=-1,i="function"==typeof t,a=Ha(e)?r(e.length):[];return cr(e,function(e){a[++o]=i?Et(t,e,n):Cr(e,t,n)}),a}),wa=Ao(function(e,t,n){rr(e,n,t)});function xa(e,t){return(Wa(e)?It:Dr)(e,ai(t,3))}var Ea=Ao(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Oa=qr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yi(e,t[0],t[1])?t=[]:n>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,vr(t,1),[])}),Sa=lt||function(){return ft.Date.now()};function Ta(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Ko(e,l,o,o,o,o,t)}function Pa(e,t){var n;if("function"!=typeof t)throw new Pe(i);return e=ds(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ca=qr(function(e,t,n){var r=1;if(n.length){var o=sn(n,ii(Ca));r|=u}return Ko(e,r,t,n,o)}),Aa=qr(function(e,t,n){var r=3;if(n.length){var o=sn(n,ii(Aa));r|=u}return Ko(t,r,e,n,o)});function ka(e,t,n){var r,a,s,u,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Pe(i);function v(t){var n=r,i=a;return r=a=o,f=t,u=e.apply(i,n)}function g(e){var n=e-c;return c===o||n>=t||n<0||d&&e-f>=s}function y(){var e=Sa();if(g(e))return m(e);l=Ci(y,function(e){var n=t-(e-c);return d?yn(n,s-(e-f)):n}(e))}function m(e){return l=o,p&&r?v(e):(r=a=o,u)}function b(){var e=Sa(),n=g(e);if(r=arguments,a=this,c=e,n){if(l===o)return function(e){return f=e,l=Ci(y,t),h?v(e):u}(c);if(d)return _o(l),l=Ci(y,t),v(c)}return l===o&&(l=Ci(y,t)),u}return t=vs(t)||0,Ja(n)&&(h=!!n.leading,s=(d="maxWait"in n)?gn(vs(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==o&&_o(l),f=0,r=c=a=l=o},b.flush=function(){return l===o?u:m(Sa())},b}var Ia=qr(function(e,t){return ur(e,1,t)}),Ra=qr(function(e,t,n){return ur(e,vs(t)||0,n)});function ja(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ja.Cache||Hn),n}function Ma(e){if("function"!=typeof e)throw new Pe(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ja.Cache=Hn;var Na=mo(function(e,t){var n=(t=1==t.length&&Wa(t[0])?It(t[0],Kt(ai())):It(vr(t,1),Kt(ai()))).length;return qr(function(r){for(var o=-1,i=yn(r.length,n);++o=t}),Va=Ar(function(){return arguments}())?Ar:function(e){return es(e)&&je.call(e,"callee")&&!Ye.call(e,"callee")},Wa=r.isArray,Ga=yt?Kt(yt):function(e){return es(e)&&Er(e)==I};function Ha(e){return null!=e&&Qa(e.length)&&!Za(e)}function Ya(e){return es(e)&&Ha(e)}var qa=gt||vu,Xa=mt?Kt(mt):function(e){return es(e)&&Er(e)==m};function Ka(e){if(!es(e))return!1;var t=Er(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Za(e){if(!Ja(e))return!1;var t=Er(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $a(e){return"number"==typeof e&&e==ds(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Ja(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Kt(bt):function(e){return es(e)&&hi(e)==x};function ns(e){return"number"==typeof e||es(e)&&Er(e)==E}function rs(e){if(!es(e)||Er(e)!=O)return!1;var t=Ge(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==Le}var os=_t?Kt(_t):function(e){return es(e)&&Er(e)==T},is=wt?Kt(wt):function(e){return es(e)&&hi(e)==P};function as(e){return"string"==typeof e||!Wa(e)&&es(e)&&Er(e)==C}function ss(e){return"symbol"==typeof e||es(e)&&Er(e)==A}var us=xt?Kt(xt):function(e){return es(e)&&Qa(e.length)&&!!ot[Er(e)]},ls=Go(Nr),cs=Go(function(e,t){return e<=t});function fs(e){if(!e)return[];if(Ha(e))return as(e)?fn(e):Po(e);if(Ke&&e[Ke])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ke]());var t=hi(e);return(t==x?on:t==P?un:Fs)(e)}function hs(e){return e?(e=vs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ds(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?ir(ds(e),0,d):0}function vs(e){if("number"==typeof e)return e;if(ss(e))return h;if(Ja(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ja(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=pe.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function gs(e){return Co(e,Is(e))}function ys(e){return null==e?"":ao(e)}var ms=ko(function(e,t){if(wi(t)||Ha(t))Co(t,ks(t),e);else for(var n in t)je.call(t,n)&&Jn(e,n,t[n])}),bs=ko(function(e,t){Co(t,Is(t),e)}),_s=ko(function(e,t,n,r){Co(t,Is(t),e,r)}),ws=ko(function(e,t,n,r){Co(t,ks(t),e,r)}),xs=ei(or),Es=qr(function(e,t){e=Oe(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(r=1);++n1),t}),Co(e,ni(e),n),r&&(n=ar(n,7,Qo));for(var o=t.length;o--;)uo(n,t[o]);return n}),Ns=ei(function(e,t){return null==e?{}:function(e,t){return Vr(e,t,function(t,n){return Ts(e,n)})}(e,t)});function Ds(e,t){if(null==e)return{};var n=It(ni(e),function(e){return[e]});return t=ai(t),Vr(e,n,function(e,n){return t(e,n[0])})}var Ls=Xo(ks),Bs=Xo(Is);function Fs(e){return null==e?[]:Zt(e,ks(e))}var Us=Mo(function(e,t,n){return t=t.toLowerCase(),e+(n?zs(t):t)});function zs(e){return Ks(ys(e).toLowerCase())}function Vs(e){return(e=ys(e))&&e.replace(me,en).replace($e,"")}var Ws=Mo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Gs=Mo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Hs=jo("toLowerCase"),Ys=Mo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),qs=Mo(function(e,t,n){return e+(n?" ":"")+Ks(t)}),Xs=Mo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=jo("toUpperCase");function Zs(e,t,n){return e=ys(e),(t=n?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var $s=qr(function(e,t){try{return Et(e,o,t)}catch(e){return Ka(e)?e:new we(e)}}),Qs=ei(function(e,t){return St(t,function(t){t=Di(t),rr(e,t,Ca(e[t],e))}),e});function Js(e){return function(){return e}}var eu=Lo(),tu=Lo(!0);function nu(e){return e}function ru(e){return jr("function"==typeof e?e:ar(e,1))}var ou=qr(function(e,t){return function(n){return Cr(n,e,t)}}),iu=qr(function(e,t){return function(n){return Cr(e,n,t)}});function au(e,t,n){var r=ks(t),o=_r(t,r);null!=n||Ja(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=_r(t,ks(t)));var i=!(Ja(n)&&"chain"in n&&!n.chain),a=Za(e);return St(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Po(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Rt([this.value()],arguments))})}),e}function su(){}var uu=zo(It),lu=zo(Pt),cu=zo(Nt);function fu(e){return mi(e)?Wt(Di(e)):function(e){return function(t){return wr(t,e)}}(e)}var hu=Wo(),du=Wo(!0);function pu(){return[]}function vu(){return!1}var gu,yu=Uo(function(e,t){return e+t},0),mu=Yo("ceil"),bu=Uo(function(e,t){return e/t},1),_u=Yo("floor"),wu=Uo(function(e,t){return e*t},1),xu=Yo("round"),Eu=Uo(function(e,t){return e-t},0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Pe(i);return e=ds(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Ta,Bn.assign=ms,Bn.assignIn=bs,Bn.assignInWith=_s,Bn.assignWith=ws,Bn.at=xs,Bn.before=Pa,Bn.bind=Ca,Bn.bindAll=Qs,Bn.bindKey=Aa,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Bn.chain=fa,Bn.chunk=function(e,t,n){t=(n?yi(e,t,n):t===o)?1:gn(ds(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(ht(i/t));ai?0:i+n),(r=r===o||r>i?i:ds(r))<0&&(r+=i),r=n>r?0:ps(r);n>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&rn(e)?bo(fn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Pe(i);return t=null==t?0:gn(ds(t),0),qr(function(n){var r=n[t],o=bo(n,0,t);return r&&Rt(o,r),Et(e,this,o)})},Bn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:ds(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=r-(t=n||t===o?1:ds(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?co(e,ai(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?co(e,ai(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Pe(i);return Ja(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ka(e,t,{leading:r,maxWait:t,trailing:o})},Bn.thru=ha,Bn.toArray=fs,Bn.toPairs=Ls,Bn.toPairsIn=Bs,Bn.toPath=function(e){return Wa(e)?It(e,Di):ss(e)?[e]:Po(Ni(ys(e)))},Bn.toPlainObject=gs,Bn.transform=function(e,t,n){var r=Wa(e),o=r||qa(e)||us(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ja(e)&&Za(i)?Fn(Ge(e)):{}}return(o?St:mr)(e,function(e,r,o){return t(n,e,r,o)}),n},Bn.unary=function(e){return Ta(e,1)},Bn.union=ea,Bn.unionBy=ta,Bn.unionWith=na,Bn.uniq=function(e){return e&&e.length?so(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?so(e,ai(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},Bn.unset=function(e,t){return null==e||uo(e,t)},Bn.unzip=ra,Bn.unzipWith=oa,Bn.update=function(e,t,n){return null==e?e:lo(e,t,go(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:lo(e,t,go(n),r)},Bn.values=Fs,Bn.valuesIn=function(e){return null==e?[]:Zt(e,Is(e))},Bn.without=ia,Bn.words=Zs,Bn.wrap=function(e,t){return Da(go(t),e)},Bn.xor=aa,Bn.xorBy=sa,Bn.xorWith=ua,Bn.zip=la,Bn.zipObject=function(e,t){return po(e||[],t||[],Jn)},Bn.zipObjectDeep=function(e,t){return po(e||[],t||[],Zr)},Bn.zipWith=ca,Bn.entries=Ls,Bn.entriesIn=Bs,Bn.extend=bs,Bn.extendWith=_s,au(Bn,Bn),Bn.add=yu,Bn.attempt=$s,Bn.camelCase=Us,Bn.capitalize=zs,Bn.ceil=mu,Bn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=vs(n))==n?n:0),t!==o&&(t=(t=vs(t))==t?t:0),ir(vs(e),t,n)},Bn.clone=function(e){return ar(e,4)},Bn.cloneDeep=function(e){return ar(e,5)},Bn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},Bn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},Bn.conformsTo=function(e,t){return null==t||sr(e,t,ks(t))},Bn.deburr=Vs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=bu,Bn.endsWith=function(e,t,n){e=ys(e),t=ao(t);var r=e.length,i=n=n===o?r:ir(ds(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Bn.eq=Fa,Bn.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(Y,tn):e},Bn.escapeRegExp=function(e){return(e=ys(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Bn.every=function(e,t,n){var r=Wa(e)?Pt:hr;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},Bn.find=va,Bn.findIndex=Vi,Bn.findKey=function(e,t){return Lt(e,ai(t,3),mr)},Bn.findLast=ga,Bn.findLastIndex=Wi,Bn.findLastKey=function(e,t){return Lt(e,ai(t,3),br)},Bn.floor=_u,Bn.forEach=ya,Bn.forEachRight=ma,Bn.forIn=function(e,t){return null==e?e:gr(e,ai(t,3),Is)},Bn.forInRight=function(e,t){return null==e?e:yr(e,ai(t,3),Is)},Bn.forOwn=function(e,t){return e&&mr(e,ai(t,3))},Bn.forOwnRight=function(e,t){return e&&br(e,ai(t,3))},Bn.get=Ss,Bn.gt=Ua,Bn.gte=za,Bn.has=function(e,t){return null!=e&&di(e,t,Sr)},Bn.hasIn=Ts,Bn.head=Hi,Bn.identity=nu,Bn.includes=function(e,t,n,r){e=Ha(e)?e:Fs(e),n=n&&!r?ds(n):0;var o=e.length;return n<0&&(n=gn(o+n,0)),as(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ft(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ds(n);return o<0&&(o=gn(r+o,0)),Ft(e,t,o)},Bn.inRange=function(e,t,n){return t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n){return e>=yn(t,n)&&e=-9007199254740991&&e<=f},Bn.isSet=is,Bn.isString=as,Bn.isSymbol=ss,Bn.isTypedArray=us,Bn.isUndefined=function(e){return e===o},Bn.isWeakMap=function(e){return es(e)&&hi(e)==k},Bn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Er(e)},Bn.join=function(e,t){return null==e?"":Gt.call(e,t)},Bn.kebabCase=Ws,Bn.last=Ki,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ds(n))<0?gn(r+i,0):yn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Bt(e,zt,i,!0)},Bn.lowerCase=Gs,Bn.lowerFirst=Hs,Bn.lt=ls,Bn.lte=cs,Bn.max=function(e){return e&&e.length?dr(e,nu,Or):o},Bn.maxBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Or):o},Bn.mean=function(e){return Vt(e,nu)},Bn.meanBy=function(e,t){return Vt(e,ai(t,2))},Bn.min=function(e){return e&&e.length?dr(e,nu,Nr):o},Bn.minBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Nr):o},Bn.stubArray=pu,Bn.stubFalse=vu,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=wu,Bn.nth=function(e,t){return e&&e.length?Ur(e,ds(t)):o},Bn.noConflict=function(){return ft._===this&&(ft._=Be),this},Bn.noop=su,Bn.now=Sa,Bn.pad=function(e,t,n){e=ys(e);var r=(t=ds(t))?cn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(dt(o),n)+e+Vo(ht(o),n)},Bn.padEnd=function(e,t,n){e=ys(e);var r=(t=ds(t))?cn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=_n();return yn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Hr(e,t)},Bn.reduce=function(e,t,n){var r=Wa(e)?jt:Ht,o=arguments.length<3;return r(e,ai(t,4),n,o,cr)},Bn.reduceRight=function(e,t,n){var r=Wa(e)?Mt:Ht,o=arguments.length<3;return r(e,ai(t,4),n,o,fr)},Bn.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:ds(t),Yr(ys(e),t)},Bn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++rf)return[];var n=d,r=yn(e,d);t=ai(t),e-=d;for(var o=qt(r,t);++n=a)return e;var u=n-cn(r);if(u<1)return r;var l=s?bo(s,0,u).join(""):e.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),os(i)){if(e.slice(u).search(i)){var c,f=l;for(i.global||(i=Se(i.source,ys(he.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(e.indexOf(ao(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Bn.unescape=function(e){return(e=ys(e))&&q.test(e)?e.replace(H,dn):e},Bn.uniqueId=function(e){var t=++Me;return ys(e)+t},Bn.upperCase=Xs,Bn.upperFirst=Ks,Bn.each=ya,Bn.eachRight=ma,Bn.first=Hi,au(Bn,(gu={},mr(Bn,function(e,t){je.call(Bn.prototype,t)||(gu[t]=e)}),gu),{chain:!1}),Bn.VERSION="4.17.21",St(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bn[e].placeholder=Bn}),St(["drop","take"],function(e,t){Vn.prototype[e]=function(n){n=n===o?1:gn(ds(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),St(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),St(["head","last"],function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}}),St(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}}),Vn.prototype.compact=function(){return this.filter(nu)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=qr(function(e,t){return"function"==typeof e?new Vn(this):this.map(function(n){return Cr(n,e,t)})}),Vn.prototype.reject=function(e){return this.filter(Ma(ai(e)))},Vn.prototype.slice=function(e,t){e=ds(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=ds(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(d)},mr(Vn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Bn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Vn,l=s[0],c=u||Wa(t),f=function(e){var t=i.apply(Bn,Rt([e],s));return r&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=u&&!d;if(!a&&c){t=v?t:new Vn(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[f],thisArg:o}),new zn(g,h)}return p&&v?e.apply(this,s):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})}),St(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Wa(o)?o:[],e)}return this[n](function(n){return t.apply(Wa(n)?n:[],e)})}}),mr(Vn.prototype,function(e,t){var n=Bn[t];if(n){var r=n.name+"";je.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}}),An[Bo(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Un;){var r=Bi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Ji],thisArg:o}),new zn(t,this.__chain__)}return this.thru(Ji)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Ke&&(Bn.prototype[Ke]=function(){return this}),Bn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},2552:(e,t,n)=>{var r=n(1873),o=n(659),i=n(9350),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},2572: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(6041));function i(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return o.default(n,"address."+e)||o.default(n,e)||(t?o.default(n,"address."+t):null)||(t?o.default(n,t):null)||o.default(r,"address."+e)||o.default(r,e)||(t?o.default(r,"address."+t):null)||(t?o.default(r,t):null)}}t.default=function(e){e.zip=i("postalCode","zip"),e.country=i("country"),e.street=i("street"),e.state=i("state"),e.city=i("city"),e.region=i("region")}},2613:(e,t,n)=>{"use strict";n.d(t,{_:()=>o});var r=n(1635),o=function(e,t){return(0,r.sH)(void 0,void 0,void 0,function(){var n;return(0,r.YH)(this,function(o){return n=function(o){return(0,r.sH)(void 0,void 0,void 0,function(){var i;return(0,r.YH)(this,function(r){switch(r.label){case 0:return e(o)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[r.sent()])];case 2:return[2]}})})},[2,n(void 0)]})})}},2629:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,4)}},2651:(e,t,n)=>{var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},2749:(e,t,n)=>{var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},2804:(e,t,n)=>{var r=n(6110)(n(9325),"Promise");e.exports=r},2856:(e,t,n)=>{"use strict";var r=n(2543),o=n(8362).Graph,i=n(3382).slack;function a(e,t){return r.forEach(e.nodes(),function n(o){r.forEach(t.nodeEdges(o),function(r){var a=r.v,s=o===a?r.w:a;e.hasNode(s)||i(t,r)||(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))})}),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)})}function u(e,t,n){r.forEach(e.nodes(),function(e){t.node(e).rank+=n})}e.exports=function(e){var t,n,r=new o({directed:!1}),l=e.nodes()[0],c=e.nodeCount();for(r.setNode(l,{});a(r,e){var r=n(9570),o=n(1811)(r);e.exports=o},2903:(e,t,n)=>{var r=n(3805),o=n(5527),i=n(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},2949:(e,t,n)=>{var r=n(2651);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},3007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(1549),o=n(79),i=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},3120:(e,t,n)=>{var r=n(4528),o=n(5891);e.exports=function e(t,n,i,a,s){var u=-1,l=t.length;for(i||(i=o),s||(s=[]);++u0&&i(c)?n>1?e(c,n-1,i,a,s):r(s,c):a||(s[s.length]=c)}return s}},3143:function(e){var t;t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r},function(e,t,n){"use strict";var r=n(2),o=n(8),i=n(9);function a(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[s];a.prototype.getSource=function(){return this.source},a.prototype.getTarget=function(){return this.target},a.prototype.isInterGraph=function(){return this.isInterGraph},a.prototype.getLength=function(){return this.length},a.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},a.prototype.getBendpoints=function(){return this.bendpoints},a.prototype.getLca=function(){return this.lca},a.prototype.getSourceInLca=function(){return this.sourceInLca},a.prototype.getTargetInLca=function(){return this.targetInLca},a.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},a.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},a.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},a.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=a},function(e,t,n){"use strict";e.exports=function(e){this.vGraphObject=e}},function(e,t,n){"use strict";var r=n(2),o=n(10),i=n(13),a=n(0),s=n(16),u=n(4);function l(e,t,n,a){null==n&&null==a&&(a=t),r.call(this,a),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=a,this.edges=[],this.graphManager=e,this.rect=null!=n&&null!=t?new i(t.x,t.y,n.width,n.height):new i}for(var c in l.prototype=Object.create(r.prototype),r)l[c]=r[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw"Incorrect edge source!";t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=e&&r.source!=e||t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw"Incorrect incidency!";e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),n=0;nt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>a.WORLD_BOUNDARY?t=a.WORLD_BOUNDARY:t<-a.WORLD_BOUNDARY&&(t=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var r=new u(t,n),o=e.inverseTransformPoint(r);this.setLocation(o.x,o.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=l},function(e,t,n){"use strict";function r(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r},function(e,t,n){"use strict";var r=n(2),o=n(10),i=n(0),a=n(6),s=n(3),u=n(1),l=n(13),c=n(12),f=n(11);function h(e,t,n){r.call(this,n),this.estimatedSize=o.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof a?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var d in h.prototype=Object.create(r.prototype),r)h[d]=r[d];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(e,t,n){if(null==t&&null==n){var r=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var o=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(t.owner!=n.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=n.owner?null:(o.source=t,o.target=n,o.isInterGraph=!1,this.getEdges().push(o),t.edges.push(o),n!=t&&n.edges.push(o),o)},h.prototype.remove=function(e){var t=e;if(e instanceof s){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=t.edges.slice(),r=n.length,o=0;o-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(i.source.edges.splice(l,1),i.target!=i.source&&i.target.edges.splice(c,1),-1==(a=i.source.owner.getEdges().indexOf(i)))throw"Not in owner's edge list!";i.source.owner.getEdges().splice(a,1)}},h.prototype.updateLeftTop=function(){for(var e,t,n,r=o.MAX_VALUE,i=o.MAX_VALUE,a=this.getNodes(),s=a.length,u=0;u(e=l.getTop())&&(r=e),i>(t=l.getLeft())&&(i=t)}return r==o.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=i-n,this.top=r-n,new c(this.left,this.top))},h.prototype.updateBounds=function(e){for(var t,n,r,i,a,s=o.MAX_VALUE,u=-o.MAX_VALUE,c=o.MAX_VALUE,f=-o.MAX_VALUE,h=this.nodes,d=h.length,p=0;p(t=v.getLeft())&&(s=t),u<(n=v.getRight())&&(u=n),c>(r=v.getTop())&&(c=r),f<(i=v.getBottom())&&(f=i)}var g=new l(s,c,u-s,f-c);s==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=h[0].getParent().paddingLeft?h[0].getParent().paddingLeft:this.margin,this.left=g.x-a,this.right=g.x+g.width+a,this.top=g.y-a,this.bottom=g.y+g.height+a},h.calculateBounds=function(e){for(var t,n,r,i,a=o.MAX_VALUE,s=-o.MAX_VALUE,u=o.MAX_VALUE,c=-o.MAX_VALUE,f=e.length,h=0;h(t=d.getLeft())&&(a=t),s<(n=d.getRight())&&(s=n),u>(r=d.getTop())&&(u=r),c<(i=d.getBottom())&&(c=i)}return new l(a,u,s-a,c-u)},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r=this.nodes.length){var u=0;o.forEach(function(t){t.owner==e&&u++}),u==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},e.exports=h},function(e,t,n){"use strict";var r,o=n(1);function i(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},i.prototype.add=function(e,t,n,r,o){if(null==n&&null==r&&null==o){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return e.parent=t,t.child=e,e}o=n,n=e;var i=(r=t).getOwner(),a=o.getOwner();if(null==i||i.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(i==a)return n.isInterGraph=!1,i.add(n,r,o);if(n.isInterGraph=!0,n.source=r,n.target=o,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},i.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var n,i=[],a=(i=i.concat(t.getEdges())).length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var i=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(i=1);var a=i*n[0],s=n[1]/i;n[0]a)return n[0]=r,n[1]=u,n[2]=i,n[3]=b,!1;if(oi)return n[0]=s,n[1]=o,n[2]=y,n[3]=a,!1;if(ri?(n[0]=c,n[1]=f,E=!0):(n[0]=l,n[1]=u,E=!0):S===P&&(r>i?(n[0]=s,n[1]=u,E=!0):(n[0]=h,n[1]=f,E=!0)),-T===P?i>r?(n[2]=m,n[3]=b,O=!0):(n[2]=y,n[3]=g,O=!0):T===P&&(i>r?(n[2]=v,n[3]=g,O=!0):(n[2]=_,n[3]=b,O=!0)),E&&O)return!1;if(r>i?o>a?(C=this.getCardinalDirection(S,P,4),A=this.getCardinalDirection(T,P,2)):(C=this.getCardinalDirection(-S,P,3),A=this.getCardinalDirection(-T,P,1)):o>a?(C=this.getCardinalDirection(-S,P,1),A=this.getCardinalDirection(-T,P,3)):(C=this.getCardinalDirection(S,P,2),A=this.getCardinalDirection(T,P,4)),!E)switch(C){case 1:I=u,k=r+-p/P,n[0]=k,n[1]=I;break;case 2:k=h,I=o+d*P,n[0]=k,n[1]=I;break;case 3:I=f,k=r+p/P,n[0]=k,n[1]=I;break;case 4:k=c,I=o+-d*P,n[0]=k,n[1]=I}if(!O)switch(A){case 1:j=g,R=i+-x/P,n[2]=R,n[3]=j;break;case 2:R=_,j=a+w*P,n[2]=R,n[3]=j;break;case 3:j=b,R=i+x/P,n[2]=R,n[3]=j;break;case 4:R=m,j=a+-w*P,n[2]=R,n[3]=j}}return!1},o.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},o.getIntersection=function(e,t,n,o){if(null==o)return this.getIntersection2(e,t,n);var i,a,s,u,l,c,f,h=e.x,d=e.y,p=t.x,v=t.y,g=n.x,y=n.y,m=o.x,b=o.y;return 0===(f=(i=v-d)*(u=g-m)-(a=b-y)*(s=h-p))?null:new r((s*(c=m*y-g*b)-u*(l=p*d-h*v))/f,(a*l-i*c)/f)},o.angleOfVector=function(e,t,n,r){var o=void 0;return e!==n?(o=Math.atan((r-t)/(n-e)),n0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r},function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var c=s[0];s.splice(0,1),a.add(c);var f=c.getEdges();for(i=0;i-1&&l.splice(v,1)}a=new Set,u=new Map}else e=[]}return e},h.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),o=0;o0){for(var o=this.edgeToDummyNodes.get(n),i=0;i=0&&t.splice(f,1),c.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;1==t&&u.push(e),r.set(e,t)}})}n=n.concat(u),1!=t.length&&2!=t.length||(o=!0,i=t[0])}return i},h.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=h},function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},e.exports=r},function(e,t,n){"use strict";var r=n(4);function o(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(e){this.lworldExtX=e},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(e){this.lworldExtY=e},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},o.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return 0!=n&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},o.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return 0!=n&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},o.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return 0!=n&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},o.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return 0!=n&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},o.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=o},function(e,t,n){"use strict";var r=n(15),o=n(7),i=n(0),a=n(8),s=n(9);function u(){r.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.springConstant=o.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=o.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}for(var l in u.prototype=Object.create(r.prototype),r)u[l]=r[l];u.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,a,s,u=this.getGraphManager().getAllEdges(),l=0;lo.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(e-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),i=new Set,e=0;e(u=t.getEstimatedSize()*this.gravityRangeFactor)||s>u)&&(e.gravitationForceX=-this.gravityConstant*o,e.gravitationForceY=-this.gravityConstant*i):(a>(u=t.getEstimatedSize()*this.compoundGravityRangeFactor)||s>u)&&(e.gravitationForceX=-this.gravityConstant*o*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*i*this.compoundGravityConstant)},u.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=s.length||l>=s[0].length))for(var c=0;ce}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=o,this.gap_penalty=i,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var a=0;a=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},o.emit=function(e,t){for(var n=0;n{"use strict";function r(e,t,n){t.split&&(t=t.split("."));for(var r,o,i=0,a=t.length,s=e;ir})},3201:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},3221:e=>{e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}},3222:(e,t,n)=>{var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},3243:(e,t,n)=>{var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3290:(e,t,n)=>{e=n.nmd(e);var r=n(9325),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},3335: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.Group=void 0;var o=r(n(6698)),i=r(n(6659)),a=r(n(5316)),s=n(4500);function u(e,t){s.Facade.call(this,e,t)}t.Group=u,o.default(u,s.Facade);var l=u.prototype;l.action=function(){return"group"},l.type=l.action,l.groupId=s.Facade.field("groupId"),l.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return a.default(e)},l.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return i.default(t)?t:void 0},l.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=null==this[r]?this.proxy("traits."+r):this[r]();if(null==o)continue;t[e[r]]=o,delete t[r]}return t},l.name=s.Facade.proxy("traits.name"),l.industry=s.Facade.proxy("traits.industry"),l.employees=s.Facade.proxy("traits.employees"),l.properties=function(){return this.field("traits")||this.field("properties")||{}}},3345:e=>{e.exports=function(){return[]}},3349:(e,t,n)=>{var r=n(2199),o=n(6375),i=n(7241);e.exports=function(e){return r(e,i,o)}},3353:e=>{e.exports="0.8.14"},3357:(e,t,n)=>{"use strict";function r(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find(function(t){return t.src===e})}function o(e,t){var n=r(e);if(void 0!==n){var o=null==n?void 0:n.getAttribute("status");if("loaded"===o)return Promise.resolve(n);if("loading"===o)return new Promise(function(e,t){n.addEventListener("load",function(){return e(n)}),n.addEventListener("error",function(e){return t(e)})})}return new Promise(function(n,r){var o,i=window.document.createElement("script");i.type="text/javascript",i.src=e,i.async=!0,i.setAttribute("status","loading");for(var a=0,s=Object.entries(null!=t?t:{});ai,k:()=>o})},3360:(e,t,n)=>{var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3382:(e,t,n)=>{"use strict";var r=n(2543);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),function n(o){var i=e.node(o);if(r.has(t,o))return i.rank;t[o]=!0;var a=r.min(r.map(e.outEdges(o),function(t){return n(t.w)-e.edge(t).minlen}));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},3457:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).layoutBase.LayoutConstants,o=n(0).layoutBase.FDLayoutConstants,i=n(0).CoSEConstants,a=n(0).CoSELayout,s=n(0).CoSENode,u=n(0).layoutBase.PointD,l=n(0).layoutBase.DimensionD,c={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function f(e){this.options=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}(c,e),h(this.options)}var h=function(e){null!=e.nodeRepulsion&&(i.DEFAULT_REPULSION_STRENGTH=o.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),null!=e.idealEdgeLength&&(i.DEFAULT_EDGE_LENGTH=o.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),null!=e.edgeElasticity&&(i.DEFAULT_SPRING_STRENGTH=o.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),null!=e.nestingFactor&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(i.DEFAULT_GRAVITY_STRENGTH=o.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(i.MAX_ITERATIONS=o.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=o.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),"draft"==e.quality?r.QUALITY=0:"proof"==e.quality?r.QUALITY=2:r.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,i.ANIMATE=o.ANIMATE=r.ANIMATE=e.animate,i.TILE=e.tile,i.TILING_PADDING_VERTICAL="function"==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL="function"==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};f.prototype.run=function(){var e,t,n=this.options,r=(this.idToLNode={},this.layout=new a),o=this;o.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var i=r.newGraphManager();this.gm=i;var s=this.options.eles.nodes(),u=this.options.eles.edges();this.root=i.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var l=0;l0&&(a=n.getGraphManager().add(n.newGraph(),i),this.processChildrenList(a,f,n))}},f.prototype.stop=function(){return this.stopped=!0,this};var d=function(e){e("layout","cose-bilkent",f)};"undefined"!=typeof cytoscape&&d(cytoscape),e.exports=d}])},e.exports=r(n(7799))},3467:function(e,t){!function(e){"use strict";const t=134217729;function n(e,t,n,r,o){let i,a,s,u,l=t[0],c=r[0],f=0,h=0;c>l==c>-l?(i=l,l=t[++f]):(i=c,c=r[++h]);let d=0;if(fl==c>-l?(s=i-((a=l+i)-l),l=t[++f]):(s=i-((a=c+i)-c),c=r[++h]),i=a,0!==s&&(o[d++]=s);fl==c>-l?(s=i-((a=i+l)-(u=a-i))+(l-u),l=t[++f]):(s=i-((a=i+c)-(u=a-i))+(c-u),c=r[++h]),i=a,0!==s&&(o[d++]=s);for(;f0!=p>0)return v;const g=Math.abs(d+p);return Math.abs(v)>=33306690738754716e-32*g?v:-function(e,r,l,c,f,h,d){let p,v,g,y,m,b,_,w,x,E,O,S,T,P,C,A,k,I;const R=e-f,j=l-f,M=r-h,N=c-h;m=(C=(w=R-(_=(b=t*R)-(b-R)))*(E=N-(x=(b=t*N)-(b-N)))-((P=R*N)-_*x-w*x-_*E))-(O=C-(k=(w=M-(_=(b=t*M)-(b-M)))*(E=j-(x=(b=t*j)-(b-j)))-((A=M*j)-_*x-w*x-_*E))),o[0]=C-(O+m)+(m-k),m=(T=P-((S=P+O)-(m=S-P))+(O-m))-(O=T-A),o[1]=T-(O+m)+(m-A),m=(I=S+O)-S,o[2]=S-(I-m)+(O-m),o[3]=I;let D=function(e,t){let n=t[0];for(let e=1;e<4;e++)n+=t[e];return n}(0,o),L=22204460492503146e-32*d;if(D>=L||-D>=L)return D;if(p=e-(R+(m=e-R))+(m-f),g=l-(j+(m=l-j))+(m-f),v=r-(M+(m=r-M))+(m-h),y=c-(N+(m=c-N))+(m-h),0===p&&0===v&&0===g&&0===y)return D;if(L=11093356479670487e-47*d+33306690738754706e-32*Math.abs(D),(D+=R*y+N*p-(M*g+j*v))>=L||-D>=L)return D;m=(C=(w=p-(_=(b=t*p)-(b-p)))*(E=N-(x=(b=t*N)-(b-N)))-((P=p*N)-_*x-w*x-_*E))-(O=C-(k=(w=v-(_=(b=t*v)-(b-v)))*(E=j-(x=(b=t*j)-(b-j)))-((A=v*j)-_*x-w*x-_*E))),u[0]=C-(O+m)+(m-k),m=(T=P-((S=P+O)-(m=S-P))+(O-m))-(O=T-A),u[1]=T-(O+m)+(m-A),m=(I=S+O)-S,u[2]=S-(I-m)+(O-m),u[3]=I;const B=n(4,o,4,u,i);m=(C=(w=R-(_=(b=t*R)-(b-R)))*(E=y-(x=(b=t*y)-(b-y)))-((P=R*y)-_*x-w*x-_*E))-(O=C-(k=(w=M-(_=(b=t*M)-(b-M)))*(E=g-(x=(b=t*g)-(b-g)))-((A=M*g)-_*x-w*x-_*E))),u[0]=C-(O+m)+(m-k),m=(T=P-((S=P+O)-(m=S-P))+(O-m))-(O=T-A),u[1]=T-(O+m)+(m-A),m=(I=S+O)-S,u[2]=S-(I-m)+(O-m),u[3]=I;const F=n(B,i,4,u,a);m=(C=(w=p-(_=(b=t*p)-(b-p)))*(E=y-(x=(b=t*y)-(b-y)))-((P=p*y)-_*x-w*x-_*E))-(O=C-(k=(w=v-(_=(b=t*v)-(b-v)))*(E=g-(x=(b=t*g)-(b-g)))-((A=v*g)-_*x-w*x-_*E))),u[0]=C-(O+m)+(m-k),m=(T=P-((S=P+O)-(m=S-P))+(O-m))-(O=T-A),u[1]=T-(O+m)+(m-A),m=(I=S+O)-S,u[2]=S-(I-m)+(O-m),u[3]=I;const U=n(F,a,4,u,s);return s[U-1]}(e,r,l,c,f,h,g)},e.orient2dfast=function(e,t,n,r,o,i){return(t-i)*(n-o)-(e-o)*(r-i)},Object.defineProperty(e,"__esModule",{value:!0})}(t)},3488:e=>{e.exports=function(e){return e}},3508:(e,t,n)=>{"use strict";var r=n(3382).longestPath,o=n(2856),i=n(1581);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){i(e)}(e);break;case"tight-tree":!function(e){r(e),o(e)}(e);break;case"longest-path":a(e)}};var a=r},3585:(e,t,n)=>{var r=n(2543);e.exports=function(e,t){return r.map(t,function(t){var n=e.inEdges(t);if(n.length){var o=r.reduce(n,function(t,n){var r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}})}},3590:(e,t,n)=>{var r=n(117);e.exports=function(e,t,n){return function(e,t,n){var r={},o=e.nodes();return o.forEach(function(e){r[e]={},r[e][e]={distance:0},o.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}})}),o.forEach(function(e){var t=r[e];o.forEach(function(n){var i=r[n];o.forEach(function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s{e.exports=function(e){return this.__data__.get(e)}},3619:(e,t,n)=>{var r=n(117);e.exports=function(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),function(e){t=[],i(e),t.length&&o.push(t)}),o}},3650:(e,t,n)=>{var r=n(4335)(Object.keys,Object);e.exports=r},3656:(e,t,n)=>{e=n.nmd(e);var r=n(9325),o=n(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;e.exports=u},3661:(e,t,n)=>{var r=n(3040),o=n(7670),i=n(289),a=n(4509),s=n(2949);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(1799),o=n(776),i=n(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},3693:(e,t,n)=>{var r=n(4894),o=n(346);e.exports=function(e){return o(e)&&r(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3729:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(1873),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3838:(e,t,n)=>{var r=n(1791),o=n(7241);e.exports=function(e,t){return e&&r(t,o(t),e)}},3841:e=>{e.exports=function(e,t,n,r){var o=e[0],i=e[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=t.length);for(var s=(r-n)/2,u=0,l=s-1;ui!=d>i&&o<(h-c)*(i-f)/(d-f)+c&&(a=!a)}return a}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},3863: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.Track=void 0;var o=r(n(6698)),i=n(4500),a=n(7538),s=r(n(6659)),u=r(n(6041));function l(e,t){i.Facade.call(this,e,t)}t.Track=l,o.default(l,i.Facade);var c=l.prototype;c.action=function(){return"track"},c.type=c.action,c.event=i.Facade.field("event"),c.value=i.Facade.proxy("properties.value"),c.category=i.Facade.proxy("properties.category"),c.id=i.Facade.proxy("properties.id"),c.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},c.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},c.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},c.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},c.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},c.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},c.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},c.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},c.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},c.sku=i.Facade.proxy("properties.sku"),c.tax=i.Facade.proxy("properties.tax"),c.name=i.Facade.proxy("properties.name"),c.price=i.Facade.proxy("properties.price"),c.total=i.Facade.proxy("properties.total"),c.repeat=i.Facade.proxy("properties.repeat"),c.coupon=i.Facade.proxy("properties.coupon"),c.shipping=i.Facade.proxy("properties.shipping"),c.discount=i.Facade.proxy("properties.discount"),c.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},c.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},c.description=i.Facade.proxy("properties.description"),c.plan=i.Facade.proxy("properties.plan"),c.subtotal=function(){var e=u.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},c.products=function(){var e=this.properties(),t=u.default(e,"products");return Array.isArray(t)?t.filter(function(e){return null!==e}):[]},c.quantity=function(){return(this.obj.properties||{}).quantity||1},c.currency=function(){return(this.obj.properties||{}).currency||"USD"},c.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},c.query=i.Facade.proxy("options.query"),c.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},c.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},c.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return s.default(t)?t:void 0},c.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(e){if("number"==typeof e)return e;if("string"==typeof e)return e=e.replace(/\$/g,""),e=parseFloat(e),isNaN(e)?void 0:e}}(e)},c.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},c.identify=function(){var e=this.json();return e.traits=this.traits(),new a.Identify(e,this.opts)}},3950:e=>{e.exports=function(){}},4066:(e,t,n)=>{var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},4190:(e,t,n)=>{"use strict";var r=n(2543),o=n(8362).Graph,i=n(6718);function a(e,t){var n={};return r.reduce(t,function(t,o){var i=0,a=0,s=t.length,l=r.last(o);return r.forEach(o,function(t,c){var f=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),function(t){return e.node(t).dummy})}(e,t),h=f?e.node(f).order:s;(f||t===l)&&(r.forEach(o.slice(a,c+1),function(t){r.forEach(e.predecessors(t),function(r){var o=e.node(r),a=o.order;!(a1e3)return n;function o(t,o,i,a,s){var l;r.forEach(r.range(o,i),function(o){l=t[o],e.node(l).dummy&&r.forEach(e.predecessors(l),function(t){var r=e.node(t);r.dummy&&(r.orders)&&u(n,t,l)})})}return r.reduce(t,function(t,n){var i,a=-1,s=0;return r.forEach(n,function(r,u){if("border"===e.node(r).dummy){var l=e.predecessors(r);l.length&&(i=e.node(l[0]).order,o(n,s,u,a,i),s=u,a=i)}o(n,s,n.length,i,t.length)}),n}),n}function u(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function l(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function c(e,t,n,o){var i={},a={},s={};return r.forEach(t,function(e){r.forEach(e,function(e,t){i[e]=e,a[e]=e,s[e]=t})}),r.forEach(t,function(e){var t=-1;r.forEach(e,function(e){var u=o(e);if(u.length){u=r.sortBy(u,function(e){return s[e]});for(var c=(u.length-1)/2,f=Math.floor(c),h=Math.ceil(c);f<=h;++f){var d=u[f];a[e]===e&&t{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},4248:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{"use strict";n.r(t),n.d(t,{default:()=>r});class r{constructor(e=[],t=o){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:n}=this,r=t[e];for(;e>0;){const o=e-1>>1,i=t[o];if(n(r,i)>=0)break;t[e]=i,e=o}t[e]=r}_down(e){const{data:t,compare:n}=this,r=this.length>>1,o=t[e];for(;e=0)break;t[e]=i,e=r}t[e]=o}}function o(e,t){return et?1:0}},4267:(e,t,n)=>{"use strict";var r=n(2543),o=n(8785),i=n(1418),a=n(3508),s=n(6718).normalizeRanks,u=n(4619),l=n(6718).removeEmptyRanks,c=n(9074),f=n(9564),h=n(9637),d=n(5454),p=n(5125),v=n(6718),g=n(8362).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?v.time:v.notime,P=n("layout",function(){return P=n(" buildLayoutGraph",function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=T(e.graph());return t.setGraph(r.merge({},m,S(n,y),r.pick(n,b))),r.forEach(e.nodes(),function(n){var o=T(e.node(n));t.setNode(n,r.defaults(S(o,_),w)),t.setParent(n,e.parent(n))}),r.forEach(e.edges(),function(n){var o=T(e.edge(n));t.setEdge(n,r.merge({},E,S(o,x),r.pick(o,O)))}),t}(e)}),n(" runLayout",function(){!function(e,t){t(" makeSpaceForEdgeLabels",function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(e)}),t(" removeSelfEdges",function(){!function(e){r.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}(e)}),t(" acyclic",function(){o.run(e)}),t(" nestingGraph.run",function(){c.run(e)}),t(" rank",function(){a(v.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",o,"_ep")}})}(e)}),t(" removeEmptyRanks",function(){l(e)}),t(" nestingGraph.cleanup",function(){c.cleanup(e)}),t(" normalizeRanks",function(){s(e)}),t(" assignRankMinMax",function(){!function(e){var t=0;r.forEach(e.nodes(),function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))}),e.graph().maxRank=t}(e)}),t(" removeEdgeLabelProxies",function(){!function(e){r.forEach(e.nodes(),function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}(e)}),t(" normalize.run",function(){i.run(e)}),t(" parentDummyChains",function(){u(e)}),t(" addBorderSegments",function(){f(e)}),t(" order",function(){d(e)}),t(" insertSelfEdges",function(){!function(e){var t=v.buildLayerMatrix(e);r.forEach(t,function(t){var n=0;r.forEach(t,function(t,o){var i=e.node(t);i.order=o+n,r.forEach(i.selfEdges,function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:o+ ++n,e:t.e,label:t.label},"_se")}),delete i.selfEdges})})}(e)}),t(" adjustCoordinateSystem",function(){h.adjust(e)}),t(" position",function(){p(e)}),t(" positionSelfEdges",function(){!function(e){r.forEach(e.nodes(),function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}})}(e)}),t(" removeBorderNodes",function(){!function(e){r.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-o.y),n.x=a.x+n.width/2,n.y=o.y+n.height/2}}),r.forEach(e.nodes(),function(t){"border"===e.node(t).dummy&&e.removeNode(t)})}(e)}),t(" normalize.undo",function(){i.undo(e)}),t(" fixupEdgeLabelCoords",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(e)}),t(" undoCoordinateSystem",function(){h.undo(e)}),t(" translateGraph",function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,u=a.marginy||0;function l(e){var r=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),o=Math.min(o,a-u/2),i=Math.max(i,a+u/2)}r.forEach(e.nodes(),function(t){l(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.has(n,"x")&&l(n)}),t-=s,o-=u,r.forEach(e.nodes(),function(n){var r=e.node(n);r.x-=t,r.y-=o}),r.forEach(e.edges(),function(n){var i=e.edge(n);r.forEach(i.points,function(e){e.x-=t,e.y-=o}),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=o)}),a.width=n-t+s,a.height=i-o+u}(e)}),t(" assignNodeIntersects",function(){!function(e){r.forEach(e.edges(),function(t){var n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(v.intersectRect(i,n)),o.points.push(v.intersectRect(a,r))})}(e)}),t(" reversePoints",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}(e)}),t(" acyclic.undo",function(){o.undo(e)})}(P,n)}),n(" updateInputGraph",function(){!function(e,t){r.forEach(e.nodes(),function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))}),r.forEach(e.edges(),function(n){var o=e.edge(n),i=t.edge(n);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,P)}),P});return P};var y=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],_=["width","height"],w={width:0,height:0},x=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function S(e,t){return r.mapValues(r.pick(e,t),Number)}function T(e){var t={};return r.forEach(e,function(e,n){t[n.toLowerCase()]=e}),t}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},4385:(e,t)=>{"use strict";var n=/\d{10}/;t.is=function(e){return n.test(e)},t.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)}},4394:(e,t,n)=>{var r=n(2552),o=n(346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},4423:(e,t,n)=>{var r=n(117),o=n(6454),i=n(1737);e.exports=function(e,t){var n,a=new o,s={},u=new i;function l(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(n).forEach(l)}return a}},4458:e=>{e.exports="2.1.8"},4500: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.Facade=void 0;var o=r(n(2572)),i=n(4857),a=r(n(8822)),s=r(n(5316)),u=r(n(6041)),l=r(n(7631));function c(e,t){t=t||{},this.raw=i.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=i.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?s.default(e.timestamp):new Date,t.traverse&&l.default(e),this.opts=t,this.obj=e}t.Facade=c;var f=c.prototype;function h(e){return i.clone(e)}f.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=u.default(n,t.join("."))),this.opts.clone?h(n):n):n},f.field=function(e){var t=this.obj[e];return this.opts.clone?h(t):t},c.proxy=function(e){return function(){return this.proxy(e)}},c.field=function(e){return function(){return this.field(e)}},c.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?i.clone(n):n]),n||[]}},c.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},f.json=function(){var e=this.opts.clone?i.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},f.rawEvent=function(){return this.raw},f.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?i.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),o=r[e]||u.default(r,e);return"object"!=typeof o&&(o=u.default(this.options(),e)),"object"==typeof o?o:{}}},f.context=f.options,f.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&a.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var o=r[e];n="boolean"!=typeof o||o}return!!n},f.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},f.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},f.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},f.sessionId=f.anonymousId,f.groupId=c.proxy("options.groupId"),f.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==o)continue;t[e[r]]=o,delete t[r]}return t},f.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},f.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},f.userAgent=c.proxy("context.userAgent"),f.timezone=c.proxy("context.timezone"),f.timestamp=c.field("timestamp"),f.channel=c.field("channel"),f.ip=c.proxy("context.ip"),f.userId=c.field("userId"),o.default(f)},4509:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},4517:(e,t,n)=>{var r=n(6545),o=n(3950),i=n(4247),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},4528:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n{"use strict";n.d(t,{U:()=>h});var r=n(1635),o=n(6490),i=n(524),a=n(8167),s=n(1298),u=n(7947);function l(e){console.error("Error sending segment performance metrics",e)}var c,f=function(){function e(e){var t,n,r,o,i,a=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:u.a,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(o=null==e?void 0:e.maxQueueSize)&&void 0!==o?o:20,this.protocol=null!==(i=null==e?void 0:e.protocol)&&void 0!==i?i:"https",this.queue=[],this.sampleRate>0){var s=!1,c=function(){s||(s=!0,a.flush().catch(l),s=!1,setTimeout(c,a.flushTimer))};c()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var o=t.reduce(function(e,t){var n=t.split(":"),r=n[0],o=n[1];return e[r]=o,e},{});return{type:"Counter",metric:e,value:1,tags:(0,r.Cl)((0,r.Cl)({},o),{library:"analytics.js",library_version:"web"===n?"next-".concat(a.r):"npm:next-".concat(a.r)})}}(e,t,(0,s.X)());this.queue.push(n),e.includes("error")&&this.flush().catch(l)}},e.prototype.flush=function(){return(0,r.sH)(this,void 0,void 0,function(){var e=this;return(0,r.YH)(this,function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(t){l(t),e.sampleRate=0})];case 1:return t.sent(),[2]}})})},e.prototype.send=function(){return(0,r.sH)(this,void 0,void 0,function(){var e,t,n;return(0,r.YH)(this,function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,(0,i.h)(n,{headers:t,body:JSON.stringify(e),method:"POST"})]})})},e}(),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),t.initRemoteMetrics=function(e){c=new f(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==c||c.increment(t,null!=r?r:[])},t}(o.p)},4619:(e,t,n)=>{var r=n(2543);e.exports=function(e){var t=function(e){var t={},n=0;return r.forEach(e.children(),function o(i){var a=n;r.forEach(e.children(i),o),t[i]={low:a,lim:n++}}),t}(e);r.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),o=r.edgeObj,i=function(e,t,n,r){var o,i,a=[],s=[],u=Math.min(t[n].low,t[r].low),l=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||l>t[o].lim));for(i=o,o=r;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,s=i.lca,u=0,l=a[u],c=!0;n!==o.w;){if(r=e.node(n),c){for(;(l=a[u])!==s&&e.node(l).maxRank{var r=n(9770),o=n(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=s},4733:(e,t,n)=>{var r=n(1791),o=n(5950);e.exports=function(e,t){return e&&r(t,o(t),e)}},4739:(e,t,n)=>{var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4757:(e,t,n)=>{"use strict";function r(e,t){var n=t.methodName,r=t.integrationName,o=t.type,i=t.didError,a=void 0!==i&&i;e.stats.increment("analytics_js.integration.invoke".concat(a?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(o)])}n.d(t,{y:()=>r})},4840:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t}},4894:(e,t,n)=>{var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4901:(e,t,n)=>{var r=n(2552),o=n(294),i=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},4919:(e,t,n)=>{var r=n(8905),o=n(117);e.exports=function(e,t,n){return o.transform(e.nodes(),function(o,i){o[i]=r(e,i,t,n)},{})}},4932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n{"use strict";n.d(t,{C:()=>i,D:()=>a});var r=n(1635),o=n(9952);function i(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),i=t[e.event.type];return void 0===i?Promise.resolve(e):function(){return(0,r.sH)(this,void 0,void 0,function(){var n;return(0,r.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.apply(t,[e])];case 1:return[2,r.sent()];case 2:return n=r.sent(),[2,Promise.reject(n)];case 3:return[2]}})})}().then(function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e}).catch(function(n){if(n instanceof o.d&&"middleware_cancellation"===n.type)throw n;return n instanceof o.d?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)})}function a(e,t){return i(e,t).then(function(t){if(t instanceof o.j)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)})}},5015:(e,t,n)=>{var r=n(2552),o=n(6449),i=n(346);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},5083:(e,t,n)=>{var r=n(1882),o=n(7296),i=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,h=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?h:s).test(a(e))}},5125:(e,t,n)=>{"use strict";var r=n(2543),o=n(6718),i=n(4190).positionX;e.exports=function(e){(function(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,i=0;r.forEach(t,function(t){var o=r.max(r.map(t,function(t){return e.node(t).height}));r.forEach(t,function(t){e.node(t).y=i+o/2}),i+=o+n})})(e=o.asNonCompoundGraph(e)),r.forEach(i(e),function(t,n){e.node(n).x=t})}},5128:(e,t,n)=>{var r=n(909),o=n(4894);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,function(e,r,o){i[++n]=t(e,r,o)}),i}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5316:(e,t,n)=>{"use strict";var r=n(8661),o=n(356),i=n(4385),a=Object.prototype.toString;e.exports=function(e){return t=e,"[object Date]"===a.call(t)?e:function(e){return"[object Number]"===a.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):r.is(e)?r.parse(e):o.is(e)?o.parse(e):i.is(e)?i.parse(e):new Date(e);var t,n}},5325:(e,t,n)=>{var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},5341:function(e){e.exports=function(){"use strict";function e(e,r,o,i,a){!function e(n,r,o,i,a){for(;i>o;){if(i-o>600){var s=i-o+1,u=r-o+1,l=Math.log(s),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);e(n,r,Math.max(o,Math.floor(r-u*c/s+f)),Math.min(i,Math.floor(r+(s-u)*c/s+f)),a)}var h=n[r],d=o,p=i;for(t(n,o,r),a(n[i],h)>0&&t(n,o,i);d0;)p--}0===a(n[o],h)?t(n,o,p):t(n,++p,i),p<=r&&(o=p+1),r<=p&&(i=p-1)}}(e,r,o||0,i||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return et?1:0}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r=e.minX&&t.maxY>=e.minY}function p(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,n,r,o,i){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=o)){var s=n+Math.ceil((r-n)/o/2)*o;e(t,s,n,r,i),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!d(e,t))return n;for(var r=this.toBBox,o=[];t;){for(var i=0;i=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);var a=this._chooseSplitIndex(n,o,r),s=p(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,i(n,this.toBBox),i(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(e,t){this.data=p([e,t]),this.data.height=e.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,o,i,s,u,l,f,h=1/0,d=1/0,p=t;p<=n-t;p++){var v=a(e,0,p,this.toBBox),g=a(e,p,n,this.toBBox),y=(o=v,i=g,void 0,void 0,void 0,void 0,s=Math.max(o.minX,i.minX),u=Math.max(o.minY,i.minY),l=Math.min(o.maxX,i.maxX),f=Math.min(o.maxY,i.maxY),Math.max(0,l-s)*Math.max(0,f-u)),m=c(v)+c(g);y=t;d--){var p=e.children[d];s(u,e.leaf?o(p):p),l+=f(u)}return l},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)s(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():i(e[t],this.toBBox)},r}()},5378:(e,t,n)=>{var r=n(4932),o=n(5389),i=n(5128),a=n(6449);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},5389:(e,t,n)=>{var r=n(3663),o=n(7978),i=n(3488),a=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}},5454:(e,t,n)=>{"use strict";var r=n(2543),o=n(7603),i=n(8300),a=n(6487),s=n(6027),u=n(8261),l=n(8362).Graph,c=n(6718);function f(e,t,n){return r.map(t,function(t){return s(e,t,n)})}function h(e,t){var n=new l;r.forEach(e,function(e){var o=e.graph().root,i=a(e,o,n,t);r.forEach(i.vs,function(t,n){e.node(t).order=n}),u(e,n,i.vs)})}function d(e,t){r.forEach(t,function(t){r.forEach(t,function(t,n){e.node(t).order=n})})}e.exports=function(e){var t=c.maxRank(e),n=f(e,r.range(1,t+1),"inEdges"),a=f(e,r.range(t-1,-1,-1),"outEdges"),s=o(e);d(e,s);for(var u,l=Number.POSITIVE_INFINITY,p=0,v=0;v<4;++p,++v){h(p%2?n:a,p%4>=2),s=c.buildLayerMatrix(e);var g=i(e,s);g{e.exports=function(e){return e!=e}},5481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];e.exports=r},5525: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.Page=void 0;var o=r(n(6698)),i=n(4500),a=n(3863),s=r(n(6659));function u(e,t){i.Facade.call(this,e,t)}t.Page=u,o.default(u,i.Facade);var l=u.prototype;l.action=function(){return"page"},l.type=l.action,l.category=i.Facade.field("category"),l.name=i.Facade.field("name"),l.title=i.Facade.proxy("properties.title"),l.path=i.Facade.proxy("properties.path"),l.url=i.Facade.proxy("properties.url"),l.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},l.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var o in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=null==this[o]?this.proxy("properties."+o):this[o]();if(null==i)continue;t[e[o]]=i,o!==e[o]&&delete t[o]}return t},l.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return s.default(t)?t:void 0},l.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},l.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},l.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new a.Track(t,this.opts)}},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5529:(e,t,n)=>{var r=n(9344),o=n(8879),i=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},5558:e=>{e.exports=function(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}},5580:(e,t,n)=>{var r=n(6110)(n(9325),"DataView");e.exports=r},5749:(e,t,n)=>{var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5765:(e,t,n)=>{var r=n(8859),o=n(5325),i=n(9905),a=n(9219),s=n(4517),u=n(4247);e.exports=function(e,t,n){var l=-1,c=o,f=e.length,h=!0,d=[],p=d;if(n)h=!1,c=i;else if(f>=200){var v=t?null:s(e);if(v)return u(v);h=!1,c=a,p=new r}else p=t?[]:d;e:for(;++l{"use strict";function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}n.d(t,{p:()=>r})},5791:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(1476);function o(e,t){var n=new r.Facade(e,t);return"track"===e.type&&(n=new r.Track(e,t)),"identify"===e.type&&(n=new r.Identify(e,t)),"page"===e.type&&(n=new r.Page(e,t)),"alias"===e.type&&(n=new r.Alias(e,t)),"group"===e.type&&(n=new r.Group(e,t)),"screen"===e.type&&(n=new r.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}},5861:(e,t,n)=>{var r=n(5580),o=n(8223),i=n(2804),a=n(6545),s=n(8303),u=n(2552),l=n(7473),c="[object Map]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",p="[object DataView]",v=l(r),g=l(o),y=l(i),m=l(a),b=l(s),_=u;(r&&_(new r(new ArrayBuffer(1)))!=p||o&&_(new o)!=c||i&&_(i.resolve())!=f||a&&_(new a)!=h||s&&_(new s)!=d)&&(_=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case v:return p;case g:return c;case y:return f;case m:return h;case b:return d}return t}),e.exports=_},5880:(e,t,n)=>{var r=n(514),o=n(5950);e.exports=function(e){return null==e?[]:r(e,o(e))}},5881:(e,t,n)=>{"use strict";n.d(t,{x:()=>h});var r=n(1635),o=n(6115),i=n(7977),a=n(9839),s={getItem:function(){},setItem:function(){},removeItem:function(){}};try{s=(0,a.B)()&&window.localStorage?window.localStorage:s}catch(e){console.warn("Unable to access localStorage",e)}function u(e){var t=s.getItem(e);return(t?JSON.parse(t):[]).map(function(e){return new i.o(e.event,e.id)})}function l(e){var t=s.getItem(e);return t?JSON.parse(t):{}}function c(e){s.removeItem(e)}function f(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),o=s.getItem(r),i=o?JSON.parse(o):null,a=null===i||function(e){return(new Date).getTime()>e}(i);if(a)return s.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void s.removeItem(r);!a&&n<3?setTimeout(function(){f(e,t,n+1)},50):console.error("Unable to retrieve lock")}var h=function(e){function t(t,n){var o=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),h=[],d={};return f(n,function(){try{h=u(i),d=l(a),c(i),c(a),o.queue=(0,r.fX)((0,r.fX)([],h,!0),o.queue,!0),o.seen=(0,r.Cl)((0,r.Cl)({},d),o.seen)}catch(e){console.error(e)}}),window.addEventListener("pagehide",function(){if(o.todo>0){var e=(0,r.fX)((0,r.fX)([],o.queue,!0),o.future,!0);try{f(n,function(){!function(e,t){var n=u(e),o=(0,r.fX)((0,r.fX)([],t,!0),n,!0).reduce(function(e,t){var n;return(0,r.Cl)((0,r.Cl)({},e),((n={})[t.id]=t,n))},{});s.setItem(e,JSON.stringify(Object.values(o)))}(i,e),function(e,t){var n=l(e);s.setItem(e,JSON.stringify((0,r.Cl)((0,r.Cl)({},n),t)))}(a,o.seen)})}catch(e){console.error(e)}}}),o}return(0,r.C6)(t,e),t}(o.M)},5891:(e,t,n)=>{var r=n(1873),o=n(2428),i=n(6449),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},5911:(e,t,n)=>{var r=n(8859),o=n(4248),i=n(9219);e.exports=function(e,t,n,a,s,u){var l=1&n,c=e.length,f=t.length;if(c!=f&&!(l&&f>c))return!1;var h=u.get(e),d=u.get(t);if(h&&d)return h==t&&d==e;var p=-1,v=!0,g=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p{"use strict";n.r(t),n.d(t,{applyDestinationMiddleware:()=>a,sourceMiddlewarePlugin:()=>s});var r=n(1635),o=n(9952),i=n(5791);function a(e,t,n){return(0,r.sH)(this,void 0,void 0,function(){function o(t,n){return(0,r.sH)(this,void 0,void 0,function(){var o,a,s;return(0,r.YH)(this,function(u){switch(u.label){case 0:return o=!1,a=null,[4,n({payload:(0,i.W)(t,{clone:!0,traverse:!1}),integration:e,next:function(e){o=!0,null===e&&(a=null),e&&(a=e.obj)}})];case 1:return u.sent(),o||null===a||(a.integrations=(0,r.Cl)((0,r.Cl)({},t.integrations),((s={})[e]=!1,s))),[2,a]}})})}var a,s,u,l,c;return(0,r.YH)(this,function(e){switch(e.label){case 0:a=(0,i.W)(t,{clone:!0,traverse:!1}).rawEvent(),s=0,u=n,e.label=1;case 1:return s{var r=n(695),o=n(8984),i=n(4894);e.exports=function(e){return i(e)?r(e):o(e)}},6e3:(e,t,n)=>{"use strict";n.d(t,{v4:()=>a});for(var r,o=256,i=[];o--;)i[o]=(o+256).toString(16).substring(1);function a(){var e,t=0,n="";if(!r||o+16>256){for(r=Array(t=256);t--;)r[t]=256*Math.random()|0;t=o=0}for(;t<16;t++)e=r[o+t],n+=6==t?i[15&e|64]:8==t?i[63&e|128]:i[e],1&t&&t>1&&t<11&&(n+="-");return o++,n}},6009:(e,t,n)=>{e=n.nmd(e);var r=n(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},6016:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"pre")}},6025:(e,t,n)=>{var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},6027:(e,t,n)=>{var r=n(2543),o=n(8362).Graph;e.exports=function(e,t,n){var i=function(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}(e),a=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return r.forEach(e.nodes(),function(o){var s=e.node(o),u=e.parent(o);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(a.setNode(o),a.setParent(o,u||i),r.forEach(e[n](o),function(t){var n=t.v===o?t.w:t.v,i=a.edge(n,o),s=r.isUndefined(i)?0:i.weight;a.setEdge(n,o,{weight:e.edge(t).weight+s})}),r.has(s,"minRank")&&a.setNode(o,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),a}},6038:(e,t,n)=>{var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},6041:e=>{function t(e){return function(t,n,r,i){var a,s=i&&function(e){return"function"==typeof e}(i.normalizer)?i.normalizer:o;n=s(n);for(var u=!1;!u;)l();function l(){for(a in t){var e=s(a);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var o=t[a];return null==o?void(u=!0):n.length?void(t=o):void(u=!0)}}}a=void 0,u=!0}if(a)return null==t?t:e(t,a,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function o(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t(function(e,t){if(e.hasOwnProperty(t))return e[t]}),e.exports.find=e.exports,e.exports.replace=function(e,n,o,i){return t(r).call(this,e,n,o,i),e},e.exports.del=function(e,r,o){return t(n).call(this,e,r,null,o),e}},6110:(e,t,n)=>{var r=n(5083),o=n(392);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},6115:(e,t,n)=>{"use strict";n.d(t,{g:()=>i,M:()=>a});var r=n(1635),o=n(2079),i="onRemoveFromFuture",a=function(e){function t(t,n,r){var o=e.call(this)||this;return o.future=[],o.maxAttempts=t,o.queue=n,o.seen=null!=r?r:{},o}return(0,r.C6)(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;ne.maxAttempts||e.includes(t)||(e.queue.push(t),0))});return this.queue=this.queue.sort(function(t,n){return e.getAttempts(t)-e.getAttempts(n)}),r},t.prototype.pushWithBackoff=function(e,t){var n=this;if(void 0===t&&(t=0),0==t&&0===this.getAttempts(e))return this.push(e)[0];var r=this.updateAttempts(e);if(r>this.maxAttempts||this.includes(e))return!1;var o=function(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,o=e.factor,i=void 0===o?2:o,a=e.attempt,s=e.maxTimeout,u=void 0===s?1/0:s;return Math.min(t*r*Math.pow(i,a),u)}({attempt:r-1});return t>0&&o{var r=n(2523),o=n(5463),i=n(6959);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},6135:(e,t,n)=>{e.exports=n(9754)},6169:(e,t,n)=>{var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},6189:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},6251:(e,t,n)=>{"use strict";n.d(t,{u:()=>r});var r=function(){var e,t,n=!1,r=new Promise(function(r,o){e=function(){for(var e=[],t=0;t{var r=n(117);e.exports=function(e){var t=0,n=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach(function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))}),u.lowlink===u.index){var l,c=[];do{l=n.pop(),o[l].onStack=!1,c.push(l)}while(s!==l);i.push(c)}}return e.nodes().forEach(function(e){r.has(o,e)||a(e)}),i}},6375:(e,t,n)=>{var r=n(4528),o=n(8879),i=n(4664),a=n(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},6449:e=>{var t=Array.isArray;e.exports=t},6454:(e,t,n)=>{"use strict";var r=n(117);e.exports=i;var o="\0";function i(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[o]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function u(e,t,n,o){var i=""+t,a=""+n;if(!e&&i>a){var s=i;i=a,a=s}return i+""+a+""+(r.isUndefined(o)?"\0":o)}function l(e,t){return u(e,t.v,t.w,t.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._in[t])})},i.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._out[t])})},i.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,function(e){n.length>1?o.setNode(e,t):o.setNode(e)}),this},i.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=o,this._children[e]={},this._children[o][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return r.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=o;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==o)return t}},i.prototype.children=function(e){if(r.isUndefined(e)&&(e=o),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===o)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),r.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var o={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:i(r)}return this._isCompound&&r.each(t.nodes(),function(e){t.setParent(e,i(e))}),t},i.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r}),this},i.prototype.setEdge=function(){var e,t,n,o,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var l=u(this._isDirected,e,t,n);if(r.has(this._edgeLabels,l))return i&&(this._edgeLabels[l]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=i?o:this._defaultEdgeLabelFn(e,t,n);var c=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[l]=c,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][l]=c,this._out[e][l]=c,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.v===t}):o}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.w===t}):o}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},6487:(e,t,n)=>{var r=n(2543),o=n(3585),i=n(8644),a=n(9708);e.exports=function e(t,n,s,u){var l=t.children(n),c=t.node(n),f=c?c.borderLeft:void 0,h=c?c.borderRight:void 0,d={};f&&(l=r.filter(l,function(e){return e!==f&&e!==h}));var p=o(t,l);r.forEach(p,function(n){if(t.children(n.v).length){var o=e(t,n.v,s,u);d[n.v]=o,r.has(o,"barycenter")&&(i=n,a=o,r.isUndefined(i.barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}var i,a});var v=i(p,s);!function(e,t){r.forEach(e,function(e){e.vs=r.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}(v,d);var g=a(v,u);if(f&&(g.vs=r.flatten([f,g.vs,h],!0),t.predecessors(f).length)){var y=t.node(t.predecessors(f)[0]),m=t.node(t.predecessors(h)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+y.order+m.order)/(g.weight+2),g.weight+=2}return g}},6490:(e,t,n)=>{"use strict";n.d(t,{p:()=>o,r:()=>i});var r=n(1635),o=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map(function(e){return(0,r.Cl)((0,r.Cl)({},e),{tags:e.tags.join(",")})});console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map(function(e){return{m:e.metric,v:e.value,t:e.tags,k:(t=e.type,{gauge:"g",counter:"c"}[t]),e:e.timestamp};var t})},e}(),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),t.prototype.gauge=function(){for(var e=[],t=0;t{var r=n(6110)(n(9325),"Set");e.exports=r},6547:(e,t,n)=>{var r=n(3360),o=n(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},6556:(e,t,n)=>{"use strict";function r(e,t){return new Promise(function(n,r){var o=setTimeout(function(){r(Error("Promise timed out"))},t);e.then(function(e){return clearTimeout(o),n(e)}).catch(r)})}function o(e,t,n){var o;return(o=n,new Promise(function(e){return setTimeout(e,o)})).then(function(){return r(function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}(),1e3)}).catch(function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")}).then(function(){return e})}n.d(t,{s2:()=>r,w_:()=>o})},6574:(e,t,n)=>{var r=n(909);e.exports=function(e,t){var n=[];return r(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}},6649:(e,t,n)=>{var r=n(3221)();e.exports=r},6659:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/.+\@.+\..+/;t.default=function(e){return n.test(e)}},6678:(e,t,n)=>{var r=n(117),o=n(6291);e.exports=function(e){return r.filter(o(e),function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6718:(e,t,n)=>{"use strict";var r=n(2543),o=n(8362).Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function a(e){return r.max(r.map(e.nodes(),function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n}))}e.exports={addDummyNode:i,simplify:function(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t},asNonCompoundGraph:function(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t},successorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.outEdges(t),function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.inEdges(t),function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,l=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*l?(s<0&&(l=-l),n=l*a/s,r=l):(a<0&&(u=-u),n=u,r=u*s/a),{x:o+n,y:i+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),function(){return[]});return r.forEach(e.nodes(),function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)}),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank}));r.forEach(e.nodes(),function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)})},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank})),n=[];r.forEach(e.nodes(),function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)});var o=0,i=e.graph().nodeRankFactor;r.forEach(n,function(t,n){r.isUndefined(t)&&n%i!==0?--o:o&&r.forEach(t,function(t){e.node(t).rank+=o})})},addBorderNode:function(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(e,"border",o,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},6721:(e,t,n)=>{var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},6757:(e,t,n)=>{var r=n(1033),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a{e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r{var r=n(7217),o=n(5911),i=n(1986),a=n(689),s=n(5861),u=n(6449),l=n(3656),c=n(7167),f="[object Arguments]",h="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,g,y){var m=u(e),b=u(t),_=m?h:s(e),w=b?h:s(t),x=(_=_==f?d:_)==d,E=(w=w==f?d:w)==d,O=_==w;if(O&&l(e)){if(!l(t))return!1;m=!0,x=!1}if(O&&!x)return y||(y=new r),m||c(e)?o(e,t,n,v,g,y):i(e,t,_,n,v,g,y);if(!(1&n)){var S=x&&p.call(e,"__wrapped__"),T=E&&p.call(t,"__wrapped__");if(S||T){var P=S?e.value():e,C=T?t.value():t;return y||(y=new r),g(P,C,n,v,y)}}return!!O&&(y||(y=new r),a(e,t,n,v,g,y))}},7091:(e,t,n)=>{var r=n(8984),o=n(5861),i=n(4894),a=n(5015),s=n(1993);e.exports=function(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},7167:(e,t,n)=>{var r=n(4901),o=n(7301),i=n(6009),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},7199:(e,t,n)=>{var r=n(9653),o=n(6169),i=n(3201),a=n(3736),s=n(1961);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},7217:(e,t,n)=>{var r=n(79),o=n(1420),i=n(938),a=n(3605),s=n(9817),u=n(945);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=s,l.prototype.set=u,e.exports=l},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7241:(e,t,n)=>{var r=n(695),o=n(2903),i=n(4894);e.exports=function(e){return i(e)?r(e,!0):o(e)}},7255:(e,t,n)=>{var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},7296:(e,t,n)=>{var r,o=n(5481),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},7334:e=>{e.exports=function(e){return function(){return e}}},7422:(e,t,n)=>{var r=n(1769),o=n(7797);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7494:(e,t,n)=>{var r=n(117),o=n(6454);function i(e){return r.map(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i})}function a(e){return r.map(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o})}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),r.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}},7534:(e,t,n)=>{var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},7538: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.Identify=void 0;var o=n(4500),i=r(n(6041)),a=r(n(6698)),s=r(n(6659)),u=r(n(5316)),l=function(e){return e.trim()};function c(e,t){o.Facade.call(this,e,t)}t.Identify=c,a.default(c,o.Facade);var f=c.prototype;f.action=function(){return"identify"},f.type=f.action,f.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var o=null==this[r]?this.proxy("traits."+r):this[r]();null!=o&&(t[e[r]]=o,r!==e[r]&&delete t[r])}return t},f.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return s.default(t)?t:void 0},f.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return u.default(e)},f.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return u.default(e)},f.companyName=function(){return this.proxy("traits.company.name")},f.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return l(e);var t=this.firstName(),n=this.lastName();return t&&n?l(t+" "+n):void 0},f.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return l(e);var t=this.proxy("traits.name");return"string"==typeof t?l(t).split(" ")[0]:void 0},f.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return l(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=l(t).indexOf(" ");if(-1!==n)return l(t.substr(n+1))}},f.uid=function(){return this.userId()||this.username()||this.email()},f.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},f.age=function(){var e=this.birthday(),t=i.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},f.avatar=function(){var e=this.traits();return i.default(e,"avatar")||i.default(e,"photoUrl")||i.default(e,"avatarUrl")},f.position=function(){var e=this.traits();return i.default(e,"position")||i.default(e,"jobTitle")},f.username=o.Facade.proxy("traits.username"),f.website=o.Facade.one("traits.website"),f.websites=o.Facade.multi("traits.website"),f.phone=o.Facade.one("traits.phone"),f.phones=o.Facade.multi("traits.phone"),f.address=o.Facade.proxy("traits.address"),f.gender=o.Facade.proxy("traits.gender"),f.birthday=o.Facade.proxy("traits.birthday")},7556:(e,t,n)=>{var r=n(1873),o=n(4932),i=n(6449),a=n(4394),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7571:e=>{var t=function(){};t.prototype={fit:function(e){var t,n,r,o,i=e.length,a=i>0?e[0].width:0,s=i>0?e[0].height:0;for(this.root={x:0,y:0,width:a,height:s},t=0;t=this.root.width+e,i=n&&this.root.width>=this.root.height+t;return o?this.growRight(e,t):i?this.growDown(e,t):r?this.growRight(e,t):n?this.growDown(e,t):null},growRight:function(e,t){var n;return this.root={used:!0,x:0,y:0,width:this.root.width+e,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:e,height:this.root.height}},(n=this.findNode(this.root,e,t))?this.splitNode(n,e,t):null},growDown:function(e,t){var n;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+t,down:{x:0,y:this.root.height,width:this.root.width,height:t},right:this.root},(n=this.findNode(this.root,e,t))?this.splitNode(n,e,t):null}},e.exports=t},7603:(e,t,n)=>{"use strict";var r=n(2543);e.exports=function(e){var t={},n=r.filter(e.nodes(),function(t){return!e.children(t).length}),o=r.max(r.map(n,function(t){return e.node(t).rank})),i=r.map(r.range(o+1),function(){return[]}),a=r.sortBy(n,function(t){return e.node(t).rank});return r.forEach(a,function n(o){if(!r.has(t,o)){t[o]=!0;var a=e.node(o);i[a.rank].push(o),r.forEach(e.successors(o),n)}}),i}},7612:(e,t,n)=>{var r=n(9770),o=n(6574),i=n(5389),a=n(6449);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},7631:(e,t,n)=>{"use strict";var r=n(8661);e.exports=function e(t,n){return void 0===n&&(n=!0),t&&"object"==typeof t?function(t,n){return Object.keys(t).forEach(function(r){t[r]=e(t[r],n)}),t}(t,n):Array.isArray(t)?function(t,n){return t.forEach(function(r,o){t[o]=e(r,n)}),t}(t,n):r.is(t,n)?r.parse(t):t}},7670:(e,t,n)=>{var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},7697: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.Delete=void 0;var o=r(n(6698)),i=n(4500);function a(e,t){i.Facade.call(this,e,t)}t.Delete=a,o.default(a,i.Facade),a.prototype.type=function(){return"delete"}},7718:(e,t,n)=>{"use strict";n.d(t,{a:()=>i,s:()=>o});var r=n(9839);function o(){return!(0,r.B)()||window.navigator.onLine}function i(){return!o()}},7730:(e,t,n)=>{var r=n(9172),o=n(7301),i=n(6009),a=i&&i.isMap,s=a?o(a):r;e.exports=s},7797:(e,t,n)=>{var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7799:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function o(){}for(var i in r)o[i]=r[i];o.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,o.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,o.DEFAULT_COMPONENT_SEPERATION=60,o.TILE=!0,o.TILING_PADDING_VERTICAL=10,o.TILING_PADDING_HORIZONTAL=10,o.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=o},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function o(e,t,n){r.call(this,e,t,n)}for(var i in o.prototype=Object.create(r.prototype),r)o[i]=r[i];e.exports=o},function(e,t,n){"use strict";var r=n(0).LGraph;function o(e,t,n){r.call(this,e,t,n)}for(var i in o.prototype=Object.create(r.prototype),r)o[i]=r[i];e.exports=o},function(e,t,n){"use strict";var r=n(0).LGraphManager;function o(e){r.call(this,e)}for(var i in o.prototype=Object.create(r.prototype),r)o[i]=r[i];e.exports=o},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,o=n(0).IMath;function i(e,t,n,o){r.call(this,e,t,n,o)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*o.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*o.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),o=0;o0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},m.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},m.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)for(s=0;sr&&(r=Math.floor(a.y)),i=Math.floor(a.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new h(c.WORLD_CENTER_X-a.x/2,c.WORLD_CENTER_Y-a.y/2))},m.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),u.DEFAULT_RADIAL_SEPARATION);m.branchRadialLayout(t,null,0,359,0,r);var o=g.calculateBounds(e),i=new y;i.setDeviceOrgX(o.getMinX()),i.setDeviceOrgY(o.getMinY()),i.setWorldOrgX(n.x),i.setWorldOrgY(n.y);for(var a=0;a1;){var y=g[0];g.splice(0,1);var b=c.indexOf(y);b>=0&&c.splice(b,1),p--,f--}h=null!=t?(c.indexOf(g[0])+1)%p:0;for(var _=Math.abs(r-n)/f,w=h;d!=f;w=++w%p){var x=c[w].getOtherEnd(e);if(x!=t){var E=(n+d*_)%360,O=(E+_)%360;m.branchRadialLayout(x,e,E,O,o+i,i),d++}}},m.maxDiagonalInTree=function(e){for(var t=p.MIN_VALUE,n=0;nt&&(t=r)}return t},m.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},m.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),o=0;o1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var o=t[n][0].getParent(),i=new a(e.graphManager);i.id=r,i.paddingLeft=o.paddingLeft||0,i.paddingRight=o.paddingRight||0,i.paddingBottom=o.paddingBottom||0,i.paddingTop=o.paddingTop||0,e.idToDummyNode[r]=i;var s=e.getGraphManager().add(e.newGraph(),i),u=o.getChild();u.add(i);for(var l=0;l=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,o=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,o)}},m.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],o=r.paddingLeft,i=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,o,i)})},m.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),o=0;o0)return this.toBeTiled[t]=!1,!1;if(null!=i.getChild()){if(!this.getToBeTiled(i))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[i.id]=!1}return this.toBeTiled[t]=!0,!0},m.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=c.rect.height)}n+=u+e.verticalPadding}},m.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var o=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],o.paddingLeft+o.paddingRight),o.rect.width=n.tiledMemberPack[r].width,o.rect.height=n.tiledMemberPack[r].height})},m.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height0&&(i+=e.horizontalPadding),e.rowWidth[n]=i,e.width0&&(a+=e.verticalPadding);var s=0;a>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=a,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},m.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},m.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var o=e.rowWidth[r];if(o+e.horizontalPadding+t<=e.width)return!0;var i,a,s=0;return e.rowHeight[r]0&&(s=n+e.verticalPadding-e.rowHeight[r]),i=e.width-o>=t+e.horizontalPadding?(e.height+s)/(o+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(a=e.widthi&&t!=n){r.splice(-1,1),e.rows[n].push(o),e.rowWidth[t]=e.rowWidth[t]-i,e.rowWidth[n]=e.rowWidth[n]+i,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=r[s].height);t>0&&(a+=e.verticalPadding);var u=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=a,e.rowHeight[n]0)for(var c=o;c<=i;c++)u[0]+=this.grid[c][a-1].length+this.grid[c][a].length-1;if(i0)for(c=a;c<=s;c++)u[3]+=this.grid[o-1][c].length+this.grid[o][c].length-1;for(var f,h,d=p.MAX_VALUE,v=0;v{var r=n(9325).Uint8Array;e.exports=r},7927:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+o+")?",l="[\\ufe0e\\ufe0f]?",c=l+u+"(?:\\u200d(?:"+[i,a,s].join("|")+")"+l+u+")*",f="(?:"+[i+r+"?",r,a,s,n].join("|")+")",h=RegExp(o+"(?="+o+")|"+f+c,"g");e.exports=function(e){for(var t=h.lastIndex=0;h.test(e);)++t;return t}},7947:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});var r="api.segment.io/v1"},7977:(e,t,n)=>{"use strict";n.d(t,{o:()=>a});var r=n(1635),o=n(9952),i=n(4568),a=function(e){function t(t,n){return e.call(this,t,n,new i.U)||this}return(0,r.C6)(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(o.j)},7978:(e,t,n)=>{var r=n(270),o=n(8156),i=n(631),a=n(8586),s=n(756),u=n(7197),l=n(7797);e.exports=function(e,t){return a(e)&&s(t)?u(l(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},8002:(e,t,n)=>{var r=n(2543),o=n(8362).Graph,i=n(2404);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new o,a=0,s=0;r.forEach(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),r.forEach(e.edges(),function(e){var r=n.edge(e.v,e.w)||0,o=t(e),i=r+o;n.setEdge(e.v,e.w,i),s=Math.max(s,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)});var l=r.range(s+a+3).map(function(){return new i}),c=a+1;return r.forEach(n.nodes(),function(e){u(l,c,n.node(e))}),{graph:n,buckets:l,zeroIdx:c}}(e,t||a),l=function(e,t,n){for(var r,o=[],i=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)s(e,t,n,r);for(;r=i.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var u=t.length-2;u>0;--u)if(r=t[u].dequeue()){o=o.concat(s(e,t,n,r,!0));break}}return o}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(l,function(t){return e.outEdges(t.v,t.w)}),!0)};var a=r.constant(1);function s(e,t,n,o,i){var a=i?[]:void 0;return r.forEach(e.inEdges(o.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,u(t,n,s)}),r.forEach(e.outEdges(o.v),function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,u(t,n,a)}),e.removeNode(o.v),a}function u(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},8096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(7422);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},8167:(e,t,n)=>{"use strict";n.d(t,{r:()=>r});var r="1.81.1"},8223:(e,t,n)=>{var r=n(6110)(n(9325),"Map");e.exports=r},8261:(e,t,n)=>{var r=n(2543);e.exports=function(e,t,n){var o,i={};r.forEach(n,function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=i[r],i[r]=s):(a=o,o=s),a&&a!==s)return void t.setEdge(a,s);s=r}})}},8294:(e,t,n)=>{var r=n(2543),o=n(6718),i=n(8362).Graph;e.exports={debugOrdering:function(e){var t=o.buildLayerMatrix(e),n=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)}),r.forEach(e.edges(),function(e){n.setEdge(e.v,e.w,{},e.name)}),r.forEach(t,function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),r.reduce(e,function(e,t){return n.setEdge(e,t,{style:"invis"}),t})}),n}}},8300:(e,t,n)=>{"use strict";var r=n(2543);function o(e,t,n){for(var o=r.zipObject(n,r.map(n,function(e,t){return t})),i=r.flatten(r.map(t,function(t){return r.sortBy(r.map(e.outEdges(t),function(t){return{pos:o[t.w],weight:e.edge(t).weight}}),"pos")}),!0),a=1;a0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;l+=e.weight*n})),l}e.exports=function(e,t){for(var n=0,r=1;r{var r=n(6110)(n(9325),"WeakMap");e.exports=r},8329:(e,t,n)=>{var r=n(4894);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a{e.exports={graphlib:n(8362),layout:n(4267),debug:n(8294),util:{time:n(6718).time,notime:n(6718).notime},version:n(3353)}},8362:(e,t,n)=>{var r=n(1166);e.exports={Graph:r.Graph,json:n(7494),alg:n(1667),version:r.version}},8440:(e,t,n)=>{var r=n(6038),o=n(7301),i=n(6009),a=i&&i.isSet,s=a?o(a):r;e.exports=s},8586:(e,t,n)=>{var r=n(6449),o=n(4394),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},8644:(e,t,n)=>{"use strict";var r=n(2543);e.exports=function(e,t){var n={};return r.forEach(e,function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)}),r.forEach(t.edges(),function(e){var t=n[e.v],o=n[e.w];r.isUndefined(t)||r.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))}),function(e){var t=[];function n(e){return function(t){var n,o,i,a;t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&(o=t,i=0,a=0,(n=e).weight&&(i+=n.barycenter*n.weight,a+=n.weight),o.weight&&(i+=o.barycenter*o.weight,a+=o.weight),n.vs=o.vs.concat(n.vs),n.barycenter=i/a,n.weight=a,n.i=Math.min(o.i,n.i),o.merged=!0)}}function o(t){return function(n){n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,o(i))}return r.map(r.filter(t,function(e){return!e.merged}),function(e){return r.pick(e,["vs","i","barycenter","weight"])})}(r.filter(n,function(e){return!e.indegree}))}},8655:(e,t,n)=>{var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},8661:(e,t)=>{"use strict";var n=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;t.parse=function(e){var t=[1,5,6,7,11,12],r=n.exec(e),o=0;if(!r)return new Date(e);for(var i,a=0;i=t[a];a++)r[i]=parseInt(r[i],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0," "===r[4]?o=(new Date).getTimezoneOffset():"Z"!==r[9]&&r[10]&&(o=60*r[11]+r[12],"+"===r[10]&&(o=0-o));var s=Date.UTC(r[1],r[2],r[3],r[5],r[6]+o,r[7],r[8]);return new Date(s)},t.is=function(e,t){return"string"==typeof e&&(!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&n.test(e)}},8785:(e,t,n)=>{"use strict";var r=n(2543),o=n(8002);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?o(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},o={};return r.forEach(e.nodes(),function i(a){r.has(o,a)||(o[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),function(e){r.has(n,e.w)?t.push(e):i(e.w)}),delete n[a])}),t}(e);r.forEach(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))})},undo:function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}},8812:(e,t,n)=>{"use strict";var r=n(7571);e.exports=function(e,t){t=t||{};var n=new r,o=t.inPlace||!1,i=e.map(function(e){return o?e:{width:e.width,height:e.height,item:e}});i=i.sort(function(e,t){return t.width*t.height-e.width*e.height}),n.fit(i);var a={width:i.reduce(function(e,t){return Math.max(e,t.x+t.width)},0),height:i.reduce(function(e,t){return Math.max(e,t.y+t.height)},0)};return o||(a.items=i),a}},8822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Salesforce:!0};t.default=function(e){return!n[e]}},8859:(e,t,n)=>{var r=n(3661),o=n(1380),i=n(1459);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},8905:(e,t,n)=>{var r=n(117),o=n(1737);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,a,s={},u=new o,l=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),l=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);l0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(l);return s}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},8948:(e,t,n)=>{var r=n(1791),o=n(6375);e.exports=function(e,t){return r(e,o(e),t)}},8984:(e,t,n)=>{var r=n(5527),o=n(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9074:(e,t,n)=>{var r=n(2543),o=n(6718);function i(e,t,n,a,s,u,l){var c=e.children(l);if(c.length){var f=o.addBorderNode(e,"_bt"),h=o.addBorderNode(e,"_bb"),d=e.node(l);e.setParent(f,l),d.borderTop=f,e.setParent(h,l),d.borderBottom=h,r.forEach(c,function(r){i(e,t,n,a,s,u,r);var o=e.node(r),c=o.borderTop?o.borderTop:r,d=o.borderBottom?o.borderBottom:r,p=o.borderTop?a:2*a,v=c!==d?1:s-u[l]+1;e.setEdge(f,c,{weight:p,minlen:v,nestingEdge:!0}),e.setEdge(d,h,{weight:p,minlen:v,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,f,{weight:0,minlen:s+u[l]})}else l!==t&&e.setEdge(t,l,{weight:0,minlen:n})}e.exports={run:function(e){var t=o.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(o,i){var a=e.children(o);a&&a.length&&r.forEach(a,function(e){n(e,i+1)}),t[o]=i}return r.forEach(e.children(),function(e){n(e,1)}),t}(e),a=r.max(r.values(n))-1,s=2*a+1;e.graph().nestingRoot=t,r.forEach(e.edges(),function(t){e.edge(t).minlen*=s});var u=function(e){return r.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}(e)+1;r.forEach(e.children(),function(r){i(e,t,s,u,a,n,r)}),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}}},9095:(e,t,n)=>{var r=n(3841),o=n(1137);e.exports=function(e,t,n,i){return t.length>0&&Array.isArray(t[0])?o(e,t,n,i):r(e,t,n,i)},e.exports.nested=o,e.exports.flat=r},9172:(e,t,n)=>{var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},9219:e=>{e.exports=function(e,t){return e.has(t)}},9276:(e,t,n)=>{var r=n(117);function o(e,t,n,i,a,s){r.has(i,t)||(i[t]=!0,n||s.push(t),r.each(a(t),function(t){o(e,t,n,i,a,s)}),n&&s.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);o(e,t,"post"===n,s,i,a)}),a}},9302:(e,t,n)=>{var r=n(3488),o=n(6757),i=n(2865);e.exports=function(e,t){return i(o(e,t,r),e+"")}},9325:(e,t,n)=>{var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},9326:(e,t,n)=>{var r=n(1769),o=n(2428),i=n(6449),a=n(361),s=n(294),u=n(7797);e.exports=function(e,t,n){for(var l=-1,c=(t=r(t,e)).length,f=!1;++l{var r=n(3805),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9456:(e,t,n)=>{"use strict";n.d(t,{I2:()=>s,YM:()=>u,qQ:()=>a});var r,o=n(472),i=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,a=function(e){var t=(0,o.kJ)();t&&(t._cdn=e),r=e},s=function(){var e,t=null!=r?r:null===(e=(0,o.kJ)())||void 0===e?void 0:e._cdn;if(t)return t;var n,a=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach(function(e){var t,r=null!==(t=e.getAttribute("src"))&&void 0!==t?t:"",o=i.exec(r);o&&o[1]&&(n=o[1])}),n);return a||"https://cdn.segment.com"},u=function(){var e=s();return"".concat(e,"/next-integrations")}},9564:(e,t,n)=>{var r=n(2543),o=n(6718);function i(e,t,n,r,i,a){var s={width:0,height:0,rank:a,borderType:t},u=i[t][a-1],l=o.addDummyNode(e,"border",s,n);i[t][a]=l,e.setParent(l,r),u&&e.setEdge(u,l,{weight:1})}e.exports=function(e){r.forEach(e.children(),function t(n){var o=e.children(n),a=e.node(n);if(o.length&&r.forEach(o,t),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,u=a.maxRank+1;s{var r=n(7334),o=n(3243),i=n(3488),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},9637:(e,t,n)=>{"use strict";var r=n(2543);function o(e){r.forEach(e.nodes(),function(t){i(e.node(t))}),r.forEach(e.edges(),function(t){i(e.edge(t))})}function i(e){var t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||o(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),function(t){a(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"y")&&a(n)})}(e),"lr"!==t&&"rl"!==t||(function(e){r.forEach(e.nodes(),function(t){s(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)})}(e),o(e))}}},9653:(e,t,n)=>{var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},9698:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},9708:(e,t,n)=>{var r=n(2543),o=n(6718);function i(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}e.exports=function(e,t){var n,a=o.partition(e,function(e){return r.has(e,"barycenter")}),s=a.lhs,u=r.sortBy(a.rhs,function(e){return-e.i}),l=[],c=0,f=0,h=0;s.sort((n=!!t,function(e,t){return e.barycentert.barycenter?1:n?t.i-e.i:e.i-t.i})),h=i(l,u,h),r.forEach(s,function(e){h+=e.vs.length,l.push(e.vs),c+=e.barycenter*e.weight,f+=e.weight,h=i(l,u,h)});var d={vs:r.flatten(l,!0)};return f&&(d.barycenter=c/f,d.weight=f),d}},9752:(e,t,n)=>{var r=n(3729),o=n(9344),i=n(641),a=n(5389),s=n(8879),u=n(6449),l=n(3656),c=n(1882),f=n(3805),h=n(7167);e.exports=function(e,t,n){var d=u(e),p=d||l(e)||h(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=p?d?new v:[]:f(e)&&c(v)?o(s(e)):{}}return(p?r:i)(e,function(e,r,o){return t(n,e,r,o)}),n}},9754:(e,t,n)=>{var r=n(3729),o=n(909),i=n(4066),a=n(6449);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},9770:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n{var r=n(7237)("length");e.exports=r},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},9839:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof window}function o(){return!r()}n.d(t,{B:()=>r,S:()=>o})},9888:(e,t,n)=>{var r=n(117);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))}),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},9905:e=>{e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r{e.exports=function(){return!1}},9952:(e,t,n)=>{"use strict";n.d(t,{d:()=>u,j:()=>l});var r=n(6e3),o=n(3172),i=n(1635),a=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce(function(e,t){var n,r,o,a=(0,i.Cl)((0,i.Cl)({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete a.time;var s=null!==(o=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==o?o:"";return e[s]&&(s="".concat(s,"-").concat(Math.random())),(0,i.Cl)((0,i.Cl)({},e),((n={})[s]=a,n))},{});console.table?console.table(e):console.log(e)}else this.logs.forEach(function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")});this._logs=[]},e}(),s=n(6490),u=function(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""},l=function(){function e(e,t,n,o){void 0===t&&(t=(0,r.v4)()),void 0===n&&(n=new s.r),void 0===o&&(o=new a),this.attempts=0,this.event=e,this._id=t,this.logger=o,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new u({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return(0,o.J)(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}()},9999:(e,t,n)=>{var r=n(7217),o=n(3729),i=n(6547),a=n(4733),s=n(3838),u=n(3290),l=n(3007),c=n(2271),f=n(8948),h=n(2),d=n(3349),p=n(5861),v=n(6189),g=n(7199),y=n(5529),m=n(6449),b=n(3656),_=n(7730),w=n(3805),x=n(8440),E=n(5950),O=n(7241),S="[object Arguments]",T="[object Function]",P="[object Object]",C={};C[S]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C[P]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C[T]=C["[object WeakMap]"]=!1,e.exports=function e(t,n,A,k,I,R){var j,M=1&n,N=2&n,D=4&n;if(A&&(j=I?A(t,k,I,R):A(t)),void 0!==j)return j;if(!w(t))return t;var L=m(t);if(L){if(j=v(t),!M)return l(t,j)}else{var B=p(t),F=B==T||"[object GeneratorFunction]"==B;if(b(t))return u(t,M);if(B==P||B==S||F&&!I){if(j=N||F?{}:y(t),!M)return N?f(t,s(j,t)):c(t,a(j,t))}else{if(!C[B])return I?t:{};j=g(t,B,M)}}R||(R=new r);var U=R.get(t);if(U)return U;R.set(t,j),x(t)?t.forEach(function(r){j.add(e(r,n,A,r,t,R))}):_(t)&&t.forEach(function(r,o){j.set(o,e(r,n,A,o,t,R))});var z=L?void 0:(D?N?d:h:N?O:E)(t);return o(z||t,function(r,o){z&&(r=t[o=r]),i(j,o,e(r,n,A,o,t,R))}),j}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,n)=>(a.f[n](e,t),t),[])),a.u=e=>(({10:"tsub-middleware",50:"ajs-destination",104:"schemaFilter",248:"auto-track",521:"remoteMiddleware",538:"queryString",574:"CoseBilkentLayout",654:"HierarchicalLayout",694:"legacyVideos"}[e]||e)+".js"),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="NVLBase:",a.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var s,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c{s.onerror=s.onload=null,clearTimeout(d);var o=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(e=>e(r)),t)return t(r)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),u&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.p="",(()=>{a.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={152:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((n,o)=>r=e[t]=[n,o]);n.push(r[2]=o);var i=a.p+a.u(t),s=new Error;a.l(i,n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,r[1](s)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,s,u]=n,l=0;if(i.some(t=>0!==e[t])){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);u&&u(a)}for(t&&t(n);l{"use strict";a.r(s),a.d(s,{NVL:()=>vP});var e={};function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function i(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}a.r(e),a.d(e,{coseBilkentLayoutFallbackWorker:()=>hh,createCoseBilkentLayoutWorker:()=>dh,createHierarchicalLayoutWorker:()=>Rh,hierarchicalLayoutFallbackWorker:()=>Ih});var d="undefined"==typeof window?null:window,p=d?d.navigator:null;d&&d.document;var v,g,y,m,b,_,w,x,E,O,S,T,P,C,A,k,I,R,j,M,N,D,L,B,F,U,z,V,W=f(""),G=f({}),H=f(function(){}),Y="undefined"==typeof HTMLElement?"undefined":f(HTMLElement),q=function(e){return e&&e.instanceString&&K(e.instanceString)?e.instanceString():null},X=function(e){return null!=e&&f(e)==W},K=function(e){return null!=e&&f(e)===H},Z=function(e){return!ee(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},$=function(e){return null!=e&&f(e)===G&&!Z(e)&&e.constructor===Object},Q=function(e){return null!=e&&f(e)===f(1)&&!isNaN(e)},J=function(e){return"undefined"===Y?void 0:null!=e&&e instanceof HTMLElement},ee=function(e){return te(e)||ne(e)},te=function(e){return"collection"===q(e)&&e._private.single},ne=function(e){return"collection"===q(e)&&!e._private.single},re=function(e){return"core"===q(e)},oe=function(e){return"stylesheet"===q(e)},ie=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},ae=function(e){return function(e){return null!=e&&f(e)===G}(e)&&K(e.then)},se=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},be=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n255)return;t.push(Math.floor(i))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var u=n[4];if(void 0!==u){if((u=parseFloat(u))<0||u>1)return;t.push(u)}}return t}(e)||function(e){var t,n,r,o,i,a,s,u;function l(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+ge+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(o=parseFloat(c[3]))<0||o>100)return;if(o/=100,void 0!==(i=c[4])&&((i=parseFloat(i))<0||i>1))return;if(0===r)a=s=u=Math.round(255*o);else{var f=o<.5?o*(1+r):o+r-o*r,h=2*o-f;a=Math.round(255*l(h,f,n+1/3)),s=Math.round(255*l(h,f,n)),u=Math.round(255*l(h,f,n-1/3))}t=[a,s,u,i]}return t}(e)},we={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},xe=function(e){for(var t=e.map,n=e.keys,r=n.length,o=0;o=a||t<0||g&&e-p>=c}function _(){var e=t();if(b(e))return w(e);h=setTimeout(_,function(e){var t=a-(e-d);return g?o(t,c-(e-p)):t}(e))}function w(e){return h=void 0,y&&u?m(e):(u=l=void 0,f)}function x(){var e=t(),n=b(e);if(u=arguments,l=this,d=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(_,a),v?m(e):f}(d);if(g)return clearTimeout(h),h=setTimeout(_,a),m(d)}return void 0===h&&(h=setTimeout(_,a)),f}return a=n(a)||0,e(s)&&(v=!!s.leading,c=(g="maxWait"in s)?r(n(s.maxWait)||0,a):c,y="trailing"in s?!!s.trailing:y),x.cancel=function(){void 0!==h&&clearTimeout(h),p=0,u=d=l=h=void 0},x.flush=function(){return void 0===h?f:w(t())},x}}()),Re=d?d.performance:null,je=Re&&Re.now?function(){return Re.now()}:function(){return Date.now()},Me=function(){if(d){if(d.requestAnimationFrame)return function(e){d.requestAnimationFrame(e)};if(d.mozRequestAnimationFrame)return function(e){d.mozRequestAnimationFrame(e)};if(d.webkitRequestAnimationFrame)return function(e){d.webkitRequestAnimationFrame(e)};if(d.msRequestAnimationFrame)return function(e){d.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(je())},1e3/60)}}(),Ne=function(e){return Me(e)},De=je,Le=9261,Be=5381,Fe=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le;!(t=e.next()).done;)n=65599*n+t.value|0;return n},Ue=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le)+e|0},ze=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Be;return(t<<5)+t+e|0},Ve=function(e){return 2097152*e[0]+e[1]},We=function(e,t){return[Ue(e[0],t[0]),ze(e[1],t[1])]},Ge=function(e,t){var n={value:0,done:!1},r=0,o=e.length;return Fe({next:function(){return r=0;r--)e[r]===t&&e.splice(r,1)},ft=function(e){e.splice(0,e.length)},ht=function(e,t,n){return n&&(t=ce(n,t)),e[t]},dt=function(e,t,n,r){n&&(t=ce(n,t)),e[t]=r},pt="undefined"!=typeof Map?Map:function(){return r(function e(){n(this,e),this._obj={}},[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}])}(),vt=function(){return r(function e(t){if(n(this,e),this._obj=Object.create(null),this.size=0,null!=t){var r;r=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var o=0;o2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&re(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var o=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new gt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==o.position.x&&(o.position.x=0),null==o.position.y&&(o.position.y=0),t.renderedPosition){var i=t.renderedPosition,a=e.pan(),s=e.zoom();o.position={x:(i.x-a.x)/s,y:(i.y-a.y)/s}}var u=[];Z(t.classes)?u=t.classes:X(t.classes)&&(u=t.classes.split(/\s+/));for(var l=0,c=u.length;lt?1:0},u=function(e,r,o,i,a){var s;if(null==o&&(o=0),null==a&&(a=t),o<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);or;0<=r?t++:t--)l.push(t);return l}.apply(this).reverse()).length;iv;0<=v?++h:--h)g.push(o(e,i));return g},d=function(e,n,r,o){var i,a,s;for(null==o&&(o=t),i=e[r];r>n&&o(i,a=e[s=r-1>>1])<0;)e[r]=a,r=s;return e[r]=i},p=function(e,n,r){var o,i,a,s,u;for(null==r&&(r=t),i=e.length,u=n,a=e[n],o=2*n+1;o0;){var w=y.pop(),x=v(w),E=w.id();if(f[E]=x,x!==1/0)for(var O=w.neighborhood().intersect(d),S=0;S0)for(n.unshift(t);c[o];){var i=c[o];n.unshift(i.edge),n.unshift(i.node),o=(r=i.node).id()}return a.spawn(n)}}}},At={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,o=n.length,i=new Array(o),a=n,s=function(e){for(var t=0;t0;){if(_(),x++,l===f){for(var E=[],O=o,S=f,T=m[S];E.unshift(O),null!=T&&E.unshift(T),null!=(O=y[S]);)T=m[S=O.id()];return{found:!0,distance:h[l],path:this.spawn(E),steps:x}}p[l]=!0;for(var P=u._private.edges,C=0;CT&&(d[S]=T,y[S]=O,m[S]=_),!o){var P=O*l+E;!o&&d[P]>T&&(d[P]=T,y[P]=E,m[P]=_)}}}for(var C=0;C1&&void 0!==arguments[1]?arguments[1]:i,r=[],o=m(e);;){if(null==o)return t.spawn();var a=y(o),u=a.edge,l=a.pred;if(r.unshift(o[0]),o.same(n)&&r.length>0)break;null!=u&&r.unshift(u),o=l}return s.spawn(r)},hasNegativeWeightCycle:p,negativeWeightCycles:v}}},Dt=Math.sqrt(2),Lt=function(e,t,n){0===n.length&&nt("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],o=r[1],i=r[2],a=t[o],s=t[i],u=n,l=u.length-1;l>=0;l--){var c=u[l],f=c[1],h=c[2];(t[f]===a&&t[h]===s||t[f]===s&&t[h]===a)&&u.splice(l,1)}for(var d=0;dr;){var o=Math.floor(Math.random()*t.length);t=Lt(o,e,t),n--}return t},Ft={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy(function(e){return e.isLoop()});var o=n.length,i=r.length,a=Math.ceil(Math.pow(Math.log(o)/Math.LN2,2)),s=Math.floor(o/Dt);if(!(o<2)){for(var u=[],l=0;l0?1:e<0?-1:0},Yt=function(e,t){return Math.sqrt(qt(e,t))},qt=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Xt=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Jt=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},en=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},tn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},nn=function(e){var t,n,r,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===i.length)t=n=r=o=i[0];else if(2===i.length)t=r=i[0],o=n=i[1];else if(4===i.length){var a=u(i,4);t=a[0],n=a[1],r=a[2],o=a[3]}return e.x1-=o,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},rn=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},on=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},an=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},sn=function(e,t){return an(e,t.x,t.y)},un=function(e,t){return an(e,t.x1,t.y1)&&an(e,t.x2,t.y2)},ln=null!==(Ot=Math.hypot)&&void 0!==Ot?Ot:function(e,t){return Math.sqrt(e*e+t*t)};var cn=function(e,t,n,r,o,i,a){var s,u,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===l?An(o,i):l,f=o/2,h=i/2,d=(c=Math.min(c,f,h))!==f,p=c!==h;if(d){var v=r-h-a;if((s=xn(e,t,n,r,n-f+c-a,v,n+f-c+a,v,!1)).length>0)return s}if(p){var g=n+f+a;if((s=xn(e,t,n,r,g,r-h+c-a,g,r+h-c+a,!1)).length>0)return s}if(d){var y=r+h+a;if((s=xn(e,t,n,r,n-f+c-a,y,n+f-c+a,y,!1)).length>0)return s}if(p){var m=n-f-a;if((s=xn(e,t,n,r,m,r-h+c-a,m,r+h-c+a,!1)).length>0)return s}var b=n-f+c,_=r-h+c;if((u=_n(e,t,n,r,b,_,c+a)).length>0&&u[0]<=b&&u[1]<=_)return[u[0],u[1]];var w=n+f-c,x=r-h+c;if((u=_n(e,t,n,r,w,x,c+a)).length>0&&u[0]>=w&&u[1]<=x)return[u[0],u[1]];var E=n+f-c,O=r+h-c;if((u=_n(e,t,n,r,E,O,c+a)).length>0&&u[0]>=E&&u[1]>=O)return[u[0],u[1]];var S=n-f+c,T=r+h-c;return(u=_n(e,t,n,r,S,T,c+a)).length>0&&u[0]<=S&&u[1]>=T?[u[0],u[1]]:[]},fn=function(e,t,n,r,o,i,a){var s=a,u=Math.min(n,o),l=Math.max(n,o),c=Math.min(r,i),f=Math.max(r,i);return u-s<=e&&e<=l+s&&c-s<=t&&t<=f+s},hn=function(e,t,n,r,o,i,a,s,u){var l=Math.min(n,a,o)-u,c=Math.max(n,a,o)+u,f=Math.min(r,s,i)-u,h=Math.max(r,s,i)+u;return!(ec||th)},dn=function(e,t,n,r,o,i,a,s){var u=[];!function(e,t,n,r,o){var i,a,s,u,l,c,f,h;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),i=(a=(3*n-t*t)/9)*a*a+(s/=54)*s,o[1]=0,f=t/3,i>0?(l=(l=s+Math.sqrt(i))<0?-Math.pow(-l,1/3):Math.pow(l,1/3),c=(c=s-Math.sqrt(i))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),o[0]=-f+l+c,f+=(l+c)/2,o[4]=o[2]=-f,f=Math.sqrt(3)*(-c+l)/2,o[3]=f,o[5]=-f):(o[5]=o[3]=0,0===i?(h=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),o[0]=2*h-f,o[4]=o[2]=-(h+f)):(u=(a=-a)*a*a,u=Math.acos(s/Math.sqrt(u)),h=2*Math.sqrt(a),o[0]=-f+h*Math.cos(u/3),o[2]=-f+h*Math.cos((u+2*Math.PI)/3),o[4]=-f+h*Math.cos((u+4*Math.PI)/3)))}(1*n*n-4*n*o+2*n*a+4*o*o-4*o*a+a*a+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s,9*n*o-3*n*n-3*n*a-6*o*o+3*o*a+9*r*i-3*r*r-3*r*s-6*i*i+3*i*s,3*n*n-6*n*o+n*a-n*e+2*o*o+2*o*e-a*e+3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t,1*n*o-n*n+n*e-o*e+r*i-r*r+r*t-i*t,u);for(var l=[],c=0;c<6;c+=2)Math.abs(u[c+1])<1e-7&&u[c]>=0&&u[c]<=1&&l.push(u[c]);l.push(1),l.push(0);for(var f,h,d,p=-1,v=0;v=0?du?(e-o)*(e-o)+(t-i)*(t-i):l-f},vn=function(e,t,n){for(var r,o,i,a,s=0,u=0;u=e&&e>=i||r<=e&&e<=i))continue;(e-r)/(i-r)*(a-o)+o>t&&s++}return s%2!=0},gn=function(e,t,n,r,o,i,a,s,u){var l,c=new Array(n.length);null!=s[0]?(l=Math.atan(s[1]/s[0]),s[0]<0?l+=Math.PI/2:l=-l-Math.PI/2):l=s;for(var f,h=Math.cos(-l),d=Math.sin(-l),p=0;p0){var v=mn(c,-u);f=yn(v)}else f=c;return vn(e,t,f)},yn=function(e){for(var t,n,r,o,i,a,s,u,l=new Array(e.length/2),c=0;c=0&&p<=1&&g.push(p),v>=0&&v<=1&&g.push(v),0===g.length)return[];var y=g[0]*s[0]+e,m=g[0]*s[1]+t;return g.length>1?g[0]==g[1]?[y,m]:[y,m,g[1]*s[0]+e,g[1]*s[1]+t]:[y,m]},wn=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},xn=function(e,t,n,r,o,i,a,s,u){var l=e-o,c=n-e,f=a-o,h=t-i,d=r-t,p=s-i,v=f*h-p*l,g=c*h-d*l,y=p*c-f*d;if(0!==y){var m=v/y,b=g/y,_=-.001;return _<=m&&m<=1.001&&_<=b&&b<=1.001||u?[e+m*c,t+m*d]:[]}return 0===v||0===g?wn(e,n,a)===a?[a,s]:wn(e,n,o)===o?[o,i]:wn(o,a,n)===n?[n,r]:[]:[]},En=function(e,t,n,r,o){var i=[],a=r/2,s=o/2,u=t,l=n;i.push({x:u+a*e[0],y:l+s*e[1]});for(var c=1;c0){var m=mn(v,-s);l=yn(m)}else l=v}else l=n;for(var b=0;bl&&(l=t)},f=function(e){return u[e]},h=0;h0?_.edgesTo(b)[0]:b.edgesTo(_)[0];var w=r(m);b=b.id(),l[b]>l[v]+w&&(l[b]=l[v]+w,h.nodes.indexOf(b)<0?h.push(b):h.updateItem(b),u[b]=0,n[b]=[]),l[b]==l[v]+w&&(u[b]=u[b]+u[v],n[b].push(v))}else for(var x=0;x0;){for(var T=t.pop(),P=0;P0&&a.push(n[s]);0!==a.length&&o.push(r.collection(a))}return o}(c,u,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:$n,a=r,s=0;s=2?rr(e,t,n,0,er,tr):rr(e,t,n,0,Jn)},squaredEuclidean:function(e,t,n){return rr(e,t,n,0,er)},manhattan:function(e,t,n){return rr(e,t,n,0,Jn)},max:function(e,t,n){return rr(e,t,n,-1/0,nr)}};function ir(e,t,n,r,o,i){var a;return a=K(e)?e:or[e]||or.euclidean,0===t&&K(e)?a(o,i):a(t,n,r,o,i)}or["squared-euclidean"]=or.squaredEuclidean,or.squaredeuclidean=or.squaredEuclidean;var ar=lt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),sr=function(e){return ar(e)},ur=function(e,t,n,r,o){var i="kMedoids"!==o?function(e){return n[e]}:function(e){return r[e](n)},a=n,s=t;return ir(e,r.length,i,function(e){return r[e](t)},a,s)},lr=function(e,t,n){for(var r=n.length,o=new Array(r),i=new Array(r),a=new Array(t),s=null,u=0;un)return!1;return!0},pr=function(e,t,n){for(var r=0;ro&&(o=t[u][l],i=l);a[i].push(e[u])}for(var c=0;c=o.threshold||"dendrogram"===o.mode&&1===e.length)return!1;var d,p=t[a],v=t[r[a]];d="dendrogram"===o.mode?{left:p,right:v,key:p.key}:{value:p.value.concat(v.value),key:p.key},e[p.index]=d,e.splice(v.index,1),t[p.key]=d;for(var g=0;gn[v.key][y.key]&&(i=n[v.key][y.key])):"max"===o.linkage?(i=n[p.key][y.key],n[p.key][y.key]a&&(i=u,a=t[o*e+u])}i>0&&r.push(i)}for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var i=0,a=e.length-1;a>=0;a--){var s=e[a];o?isFinite(s)||(e[a]=-1/0,i++):e.splice(a,1)}r&&e.sort(function(e,t){return e-t});var u=e.length,l=Math.floor(u/2);return u%2!=0?e[l+1+i]:(e[l-1+i]+e[l+i])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,o=0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,o=t;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,o=t;o=T?(P=T,T=A,C=k):A>P&&(P=A);for(var I=0;I0?1:0;E[x%l.minIterations*t+L]=B,D+=B}if(D>0&&(x>=l.minIterations-1||x==l.maxIterations-1)){for(var F=0,U=0;U0&&r.push(o);return r}(t,i,a),W=function(e,t,n){for(var r=Ir(e,t,n),o=0;ou&&(s=l,u=c)}n[o]=i[s]}return Ir(e,t,n)}(t,r,V),G={},H=0;H1||a>1)&&(l=!0),c[t]=[],e.outgoers().forEach(function(e){e.isEdge()&&c[t].push(e.id())})}else f[t]=[void 0,e.target().id()]}):u.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?l=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach(function(e){return c[t].push(e.id())})):f[t]=[e.source().id(),e.target().id()]});var h={found:!1,trail:void 0};if(l)return h;if(r&&n)if(s){if(o&&r!=o)return h;o=r}else{if(o&&r!=o&&n!=o)return h;o||(o=r)}else o||(o=u[0].id());var d=function(e){for(var t,n,r,o=e,i=[e];c[o].length;)t=c[o].shift(),n=f[t][0],o!=(r=f[t][1])?(c[r]=c[r].filter(function(e){return e!=t}),o=r):s||o==n||(c[n]=c[n].filter(function(e){return e!=t}),o=n),i.unshift(t),i.unshift(o);return i},p=[],v=[];for(v=d(o);1!=v.length;)0==c[v[0]].length?(p.unshift(u.getElementById(v.shift())),p.unshift(u.getElementById(v.shift()))):v=d(v.shift()).concat(v);for(var g in p.unshift(u.getElementById(v.shift())),c)if(c[g].length)return h;return h.found=!0,h.trail=this.spawn(p,!0),h}},Dr=function(){var e=this,t={},n=0,r=0,o=[],i=[],a={},s=function(u,l,c){u===c&&(r+=1),t[l]={id:n,low:n++,cutVertex:!1};var f,h,d,p,v=e.getElementById(l).connectedEdges().intersection(e);0===v.size()?o.push(e.spawn(e.getElementById(l))):v.forEach(function(n){f=n.source().id(),h=n.target().id(),(d=f===l?h:f)!==c&&(p=n.id(),a[p]||(a[p]=!0,i.push({x:l,y:d,edge:n})),d in t?t[l].low=Math.min(t[l].low,t[d].id):(s(u,d,l),t[l].low=Math.min(t[l].low,t[d].low),t[l].id<=t[d].low&&(t[l].cutVertex=!0,function(n,r){for(var a=i.length-1,s=[],u=e.spawn();i[a].x!=n||i[a].y!=r;)s.push(i.pop().edge),a--;s.push(i.pop().edge),s.forEach(function(n){var r=n.connectedNodes().intersection(e);u.merge(n),r.forEach(function(n){var r=n.id(),o=n.connectedEdges().intersection(e);u.merge(n),t[r].cutVertex?u.merge(o.filter(function(e){return e.isLoop()})):u.merge(o)})}),o.push(u)}(l,d))))})};e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}});var u=Object.keys(t).filter(function(e){return t[e].cutVertex}).map(function(t){return e.getElementById(t)});return{cut:e.spawn(u),components:o}},Lr=function(){var e=this,t={},n=0,r=[],o=[],i=e.spawn(e),a=function(s){if(o.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach(function(e){var n=e.target().id();n!==s&&(n in t||a(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))}),t[s].index===t[s].low){for(var u=e.spawn();;){var l=o.pop();if(u.merge(e.getElementById(l)),t[l].low=t[s].index,t[l].explored=!0,l===s)break}var c=u.edgesWith(u),f=u.merge(c);r.push(f),i=i.difference(f)}};return e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||a(n)}}),{cut:i,components:r}},Br={};[bt,Ct,At,It,jt,Nt,Ft,Mn,Dn,Bn,Un,Zn,_r,Cr,jr,Nr,{hopcroftTarjanBiconnected:Dr,htbc:Dr,htb:Dr,hopcroftTarjanBiconnectedComponents:Dr},{tarjanStronglyConnected:Lr,tsc:Lr,tscc:Lr,tarjanStronglyConnectedComponents:Lr}].forEach(function(e){be(Br,e)});var Fr=function(e){if(!(this instanceof Fr))return new Fr(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Fr.prototype={fulfill:function(e){return Ur(this,1,"fulfillValue",e)},reject:function(e){return Ur(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new Fr;return n.onFulfilled.push(Wr(e,r,"fulfill")),n.onRejected.push(Wr(t,r,"reject")),zr(n),r.proxy}};var Ur=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,zr(e)),e},zr=function(e){1===e.state?Vr(e,"onFulfilled",e.fulfillValue):2===e.state&&Vr(e,"onRejected",e.rejectReason)},Vr=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var o=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}}(),o=function(){if(Uo)return Fo;Uo=1;var e=ji();return Fo=function(t,n){var r=this.__data__,o=e(r,t);return o<0?(++this.size,r.push([t,n])):r[o][1]=n,this},Fo}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&t%1==0&&t0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){Z(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,o=[],i=0,a=n.length;i0&&this.spawn(o).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}};da.className=da.classNames=da.classes;var pa={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:de,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};pa.variable="(?:[\\w-.]|(?:\\\\"+pa.metaChar+"))+",pa.className="(?:[\\w-]|(?:\\\\"+pa.metaChar+"))+",pa.value=pa.string+"|"+pa.number,pa.id=pa.variable,function(){var e,t,n;for(e=pa.comparatorOp.split("|"),n=0;n=0||"="!==t&&(pa.comparatorOp+="|\\!"+t)}();var va=20,ga=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(e,t){return function(e,t){return-1*me(e,t)}(e.selector,t.selector)}),ya=function(){for(var e,t={},n=0;n0&&l.edgeCount>0)return ot("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(l.edgeCount>1)return ot("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&ot("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return X(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(o,i){return o.checks.reduce(function(a,s,u){return a+(i===o&&0===u?"$":"")+function(o,i){var a=o.type,s=o.value;switch(a){case 0:var u=e(s);return u.substring(0,u.length-1);case 3:var l=o.field,c=o.operator;return"["+l+n(e(c))+t(s)+"]";case 5:var f=o.operator,h=o.field;return"["+e(f)+h+"]";case 4:return"["+o.field+"]";case 6:var d=o.operator;return"[["+o.field+n(e(d))+t(s)+"]]";case 7:return s;case 8:return"#"+s;case 9:return"."+s;case 17:case 15:return r(o.parent,i)+n(">")+r(o.child,i);case 18:case 16:return r(o.ancestor,i)+" "+r(o.descendant,i);case 19:var p=r(o.left,i),v=r(o.subject,i),g=r(o.right,i);return p+(p.length>0?" ":"")+v+g;case va:return""}}(s,i)},"")},o="",i=0;i1&&i=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),l=!0),(a||u||l)&&(o=a||s?""+e:"",i=""+n),l&&(e=o=o.toLowerCase(),n=i=i.toLowerCase()),t){case"*=":r=o.indexOf(i)>=0;break;case"$=":r=o.indexOf(i,o.length-i.length)>=0;break;case"^=":r=0===o.indexOf(i);break;case"=":r=e===n;break;case">":f=!0,r=e>n;break;case">=":f=!0,r=e>=n;break;case"<":f=!0,r=e0;){var l=o.shift();t(l),i.add(l.id()),a&&r(o,i,l)}return e}function La(e,t,n){if(n.isParent())for(var r=n._private.children,o=0;o1&&void 0!==arguments[1])||arguments[1],La)},Na.forEachUp=function(e){return Da(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Ba)},Na.forEachUpAndDown=function(e){return Da(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Fa)},Na.ancestors=Na.parents,(Ra=ja={data:fa.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:fa.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:fa.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:fa.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:fa.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:fa.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Ra.data,Ra.removeAttr=Ra.removeData;var Ua,za,Va=ja,Wa={};function Ga(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,o=n[0],i=o._private.edges,a=0;at}),minIndegree:Ha("indegree",function(e,t){return et}),minOutdegree:Ha("outdegree",function(e,t){return et})}),be(Wa,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=l;l&&(u=u[0]);var f=c?u.position():{x:0,y:0};return o={x:s.x-f.x,y:s.y-f.y},void 0===e?o:o[e]}for(var h=0;h0,g=v;v&&(p=p[0]);var y=g?p.position():{x:0,y:0};void 0!==t?d.position(e,t+y[e]):void 0!==o&&d.position({x:o.x+y.x,y:o.y+y.y})}}else if(!i)return;return this}},Ua.modelPosition=Ua.point=Ua.position,Ua.modelPositions=Ua.points=Ua.positions,Ua.renderedPoint=Ua.renderedPosition,Ua.relativePoint=Ua.relativePosition;var Xa,Ka,Za=za;Xa=Ka={},Ka.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),o=n.pan(),i=t.x1*r+o.x,a=t.x2*r+o.x,s=t.y1*r+o.y,u=t.y2*r+o.y;return{x1:i,x2:a,y1:s,y2:u,w:a-i,h:u-s}},Ka.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}}),this):this},Ka.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,o={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),a=t.position;0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=a.x-i.w/2,i.x2=a.x+i.w/2,i.y1=a.y-i.h/2,i.y2=a.y+i.h/2);var s=o.width.left.value;"px"===o.width.left.units&&o.width.val>0&&(s=100*s/o.width.val);var u=o.width.right.value;"px"===o.width.right.units&&o.width.val>0&&(u=100*u/o.width.val);var l=o.height.top.value;"px"===o.height.top.units&&o.height.val>0&&(l=100*l/o.height.val);var c=o.height.bottom.value;"px"===o.height.bottom.units&&o.height.val>0&&(c=100*c/o.height.val);var f=y(o.width.val-i.w,s,u),h=f.biasDiff,d=f.biasComplementDiff,p=y(o.height.val-i.h,l,c),v=p.biasDiff,g=p.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,o.width.val),a.x=(-h+i.x1+i.x2+d)/2,t.autoHeight=Math.max(i.h,o.height.val),a.y=(-v+i.y1+i.y2+g)/2}function y(e,t,n){var r=0,o=0,i=t+n;return e>0&&i>0&&(r=t/i*e,o=n/i*e),{biasDiff:r,biasComplementDiff:o}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?o:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},Ja=function(e,t){return null==t?e:Qa(e,t.x1,t.y1,t.x2,t.y2)},es=function(e,t,n){return ht(e,t,n)},ts=function(e,t,n){if(!t.cy().headless()){var r,o,i=t._private,a=i.rstyle,s=a.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=a.srcX,o=a.srcY):"target"===n?(r=a.tgtX,o=a.tgtY):(r=a.midX,o=a.midY);var u=i.arrowBounds=i.arrowBounds||{},l=u[n]=u[n]||{};l.x1=r-s,l.y1=o-s,l.x2=r+s,l.y2=o+s,l.w=l.x2-l.x1,l.h=l.y2-l.y1,tn(l,1),Qa(e,l.x1,l.y1,l.x2,l.y2)}}},ns=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var o=t._private,i=o.rstyle;if(t.pstyle(r+"label").strValue){var a,s,u,l,c=t.pstyle("text-halign"),f=t.pstyle("text-valign"),h=es(i,"labelWidth",n),d=es(i,"labelHeight",n),p=es(i,"labelX",n),v=es(i,"labelY",n),g=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),_=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,x=t.pstyle("text-background-padding").pfValue,E=d,O=h,S=O/2,T=E/2;if(m)a=p-S,s=p+S,u=v-T,l=v+T;else{switch(c.value){case"left":a=p-O,s=p;break;case"center":a=p-S,s=p+S;break;case"right":a=p,s=p+O}switch(f.value){case"top":u=v-E,l=v;break;case"center":u=v-T,l=v+T;break;case"bottom":u=v,l=v+E}}var P=g-Math.max(_,w)-x-2,C=g+Math.max(_,w)+x+2,A=y-Math.max(_,w)-x-2,k=y+Math.max(_,w)+x+2;a+=P,s+=C,u+=A,l+=k;var I=n||"main",R=o.labelBounds,j=R[I]=R[I]||{};j.x1=a,j.y1=u,j.x2=s,j.y2=l,j.w=s-a,j.h=l-u,j.leftPad=P,j.rightPad=C,j.topPad=A,j.botPad=k;var M=m&&"autorotate"===b.strValue,N=null!=b.pfValue&&0!==b.pfValue;if(M||N){var D=M?es(o.rstyle,"labelAngle",n):b.pfValue,L=Math.cos(D),B=Math.sin(D),F=(a+s)/2,U=(u+l)/2;if(!m){switch(c.value){case"left":F=s;break;case"right":F=a}switch(f.value){case"top":U=l;break;case"bottom":U=u}}var z=function(e,t){return{x:(e-=F)*L-(t-=U)*B+F,y:e*B+t*L+U}},V=z(a,u),W=z(a,l),G=z(s,u),H=z(s,l);a=Math.min(V.x,W.x,G.x,H.x),s=Math.max(V.x,W.x,G.x,H.x),u=Math.min(V.y,W.y,G.y,H.y),l=Math.max(V.y,W.y,G.y,H.y)}var Y=I+"Rot",q=R[Y]=R[Y]||{};q.x1=a,q.y1=u,q.x2=s,q.y2=l,q.w=s-a,q.h=l-u,Qa(e,a,u,s,l),Qa(o.labelBounds.all,a,u,s,l)}return e}},rs=function(e,t){if(!t.cy().headless()){var n=t.pstyle("outline-opacity").value,r=t.pstyle("outline-width").value+t.pstyle("outline-offset").value;os(e,t,n,r,"outside",r/2)}},os=function(e,t,n,r,o,i){if(!(0===n||r<=0||"inside"===o)){var a=t.cy(),s=t.pstyle("shape").value,u=a.renderer().nodeShapes[s],l=t.position(),c=l.x,f=l.y,h=t.width(),d=t.height();if(u.hasMiterBounds){"center"===o&&(r/=2);var p=u.miterBounds(c,f,h,d,r);Ja(e,p)}else null!=i&&i>0&&nn(e,[i,i,i,i])}},is=function(e){var t=0,n=function(e){return(e?1:0)<(r=C[1].x)){var A=n;n=r,r=A}if(o>(i=C[1].y)){var k=o;o=i,i=k}Qa(h,n-E,o-E,r+E,i+E)}}else if("bezier"===P||"unbundled-bezier"===P||he(P,"segments")||he(P,"taxi")){var I;switch(P){case"bezier":case"unbundled-bezier":I=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":I=g.linePts}if(null!=I)for(var R=0;R(r=N.x)){var D=n;n=r,r=D}if((o=M.y)>(i=N.y)){var L=o;o=i,i=L}Qa(h,n-=E,o-=E,r+=E,i+=E)}if(c&&t.includeEdges&&v&&(ts(h,e,"mid-source"),ts(h,e,"mid-target"),ts(h,e,"source"),ts(h,e,"target")),c&&"yes"===e.pstyle("ghost").value){var B=e.pstyle("ghost-offset-x").pfValue,F=e.pstyle("ghost-offset-y").pfValue;Qa(h,h.x1+B,h.y1+F,h.x2+B,h.y2+F)}var U=d.bodyBounds=d.bodyBounds||{};rn(U,h),nn(U,y),tn(U,1),c&&(n=h.x1,r=h.x2,o=h.y1,i=h.y2,Qa(h,n-x,o-x,r+x,i+x));var z=d.overlayBounds=d.overlayBounds||{};rn(z,h),nn(z,y),tn(z,1);var V=d.labelBounds=d.labelBounds||{};null!=V.all?((u=V.all).x1=1/0,u.y1=1/0,u.x2=-1/0,u.y2=-1/0,u.w=0,u.h=0):V.all=Qt(),c&&t.includeLabels&&(t.includeMainLabels&&ns(h,e,null),v&&(t.includeSourceLabels&&ns(h,e,"source"),t.includeTargetLabels&&ns(h,e,"target")))}return h.x1=$a(h.x1),h.y1=$a(h.y1),h.x2=$a(h.x2),h.y2=$a(h.y2),h.w=$a(h.x2-h.x1),h.h=$a(h.y2-h.y1),h.w>0&&h.h>0&&b&&(nn(h,y),tn(h,1)),h}(e,us),r.bbCache=n,r.bbCachePosKey=as(e)):n=r.bbCache,!i){var a=e.isNode();n=Qt(),(t.includeNodes&&a||t.includeEdges&&!a)&&(t.includeOverlays?Ja(n,r.overlayBounds):Ja(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!o||t.includeSourceLabels&&t.includeTargetLabels)?Ja(n,r.labelBounds.all):(t.includeMainLabels&&Ja(n,r.labelBounds.mainRot),t.includeSourceLabels&&Ja(n,r.labelBounds.sourceRot),t.includeTargetLabels&&Ja(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},us={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},ls=is(us),cs=lt(us);Ka.boundingBox=function(e){var t,n=void 0===e||void 0===e.useCache||!0===e.useCache,r=se(function(e){var t=e._private;return null==t.bbCache||t.styleDirty||t.bbCachePosKey!==as(e)},function(e){return e.id()});if(n&&1===this.length&&!r(this[0]))e=void 0===e?us:cs(e),t=ss(this[0],e);else{t=Qt();var o=cs(e=e||us),i=this,a=i.cy().styleEnabled();this.edges().forEach(r),this.nodes().forEach(r),a&&this.recalculateRenderedStyle(n),this.updateCompoundBounds(!n);for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:Ss,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)a(s);return this},Ps.removeAllListeners=function(){return this.removeListener("*")},Ps.emit=Ps.trigger=function(e,t,n){var r=this.listeners,o=r.length;return this.emitting++,Z(t)||(t=[t]),function(e,t,n){if("event"!==q(n))if($(n))t(e,As(e,n));else for(var r=Z(n)?n:n.split(/\s+/),o=0;o1&&!r){var o=this.length-1,i=this[o],a=i._private.data.id;this[o]=void 0,this[e]=i,n.set(a,{ele:i,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var o=r.index;return this.unmergeAt(o),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&X(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],r=this,o=0;or&&(r=s,n=a)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,o=this,i=0;i=0&&o1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n));var o=n._private.style[e];return null!=o?o:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,o=n.style();if($(e)){var i=e;o.applyBypass(this,i,r),this.emitAndNotify("style")}else if(X(e)){if(void 0===t){var a=this[0];return a?o.getStylePropertyValue(a,e):void 0}o.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?o.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),o=this;if(void 0===e)for(var i=0;i0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),eu.neighbourhood=eu.neighborhood,eu.closedNeighbourhood=eu.closedNeighborhood,eu.openNeighbourhood=eu.openNeighborhood,be(eu,{source:Ma(function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t},"source"),target:Ma(function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t},"target"),sources:ou({attr:"source"}),targets:ou({attr:"target"})}),be(eu,{edgesWith:Ma(iu(),"edgesWith"),edgesTo:Ma(iu({thisIsSrc:!0}),"edgesTo")}),be(eu,{connectedEdges:Ma(function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),eu.componentsOf=eu.components;var su=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var o=new pt,i=!1;if(t){if(t.length>0&&$(t[0])&&!te(t[0])){i=!0;for(var a=[],s=new gt,u=0,l=t.length;u0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this,i=o.cy(),a=i._private,s=[],u=[],l=0,c=o.length;l0){for(var M=e.length===o.length?o:new su(i,e),N=0;N0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],o={},i=n._private.cy;function a(e){var n=o[e.id()];t&&e.removed()||n||(o[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?E.emitAndNotify("remove"):t&&E.emit("remove"));for(var O=0;O=.001?function(t,r){for(var o=0;o<4;++o){var i=h(r,e,n);if(0===i)return r;r-=(f(r,e,n)-t)/i}return r}(t,a):0===u?a:function(t,r,o){var i,a,s=0;do{(i=f(a=r+(o-r)/2,e,n)-t)>0?o=a:r=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+o)}(i),t,r)};p.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var v="generateBezier("+[e,t,n,r]+")";return p.toString=function(){return v},p}var fu=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var o={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:o.v,dv:e(o)}}function n(n,r){var o={dx:n.v,dv:e(n)},i=t(n,.5*r,o),a=t(n,.5*r,i),s=t(n,r,a),u=1/6*(o.dx+2*(i.dx+a.dx)+s.dx),l=1/6*(o.dv+2*(i.dv+a.dv)+s.dv);return n.x=n.x+u*r,n.v=n.v+l*r,n}return function e(t,r,o){var i,a,s,u={x:-1,v:0,tension:null,friction:null},l=[0],c=0,f=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,o=o||null,u.tension=t,u.friction=r,a=(i=null!==o)?(c=e(t,r))/o*.016:.016;s=n(s||u,a),l.push(1+s.x),c+=16,Math.abs(s.x)>f&&Math.abs(s.v)>f;);return i?function(e){return l[e*(l.length-1)|0]}:c}}(),hu=function(e,t,n,r){var o=cu(e,t,n,r);return function(e,t,n){return e+(t-e)*o(n)}},du={linear:function(e,t,n){return e+(t-e)*n},ease:hu(.25,.1,.25,1),"ease-in":hu(.42,0,1,1),"ease-out":hu(0,0,.58,1),"ease-in-out":hu(.42,0,.58,1),"ease-in-sine":hu(.47,0,.745,.715),"ease-out-sine":hu(.39,.575,.565,1),"ease-in-out-sine":hu(.445,.05,.55,.95),"ease-in-quad":hu(.55,.085,.68,.53),"ease-out-quad":hu(.25,.46,.45,.94),"ease-in-out-quad":hu(.455,.03,.515,.955),"ease-in-cubic":hu(.55,.055,.675,.19),"ease-out-cubic":hu(.215,.61,.355,1),"ease-in-out-cubic":hu(.645,.045,.355,1),"ease-in-quart":hu(.895,.03,.685,.22),"ease-out-quart":hu(.165,.84,.44,1),"ease-in-out-quart":hu(.77,0,.175,1),"ease-in-quint":hu(.755,.05,.855,.06),"ease-out-quint":hu(.23,1,.32,1),"ease-in-out-quint":hu(.86,0,.07,1),"ease-in-expo":hu(.95,.05,.795,.035),"ease-out-expo":hu(.19,1,.22,1),"ease-in-out-expo":hu(1,0,0,1),"ease-in-circ":hu(.6,.04,.98,.335),"ease-out-circ":hu(.075,.82,.165,1),"ease-in-out-circ":hu(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return du.linear;var r=fu(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":hu};function pu(e,t,n,r,o){if(1===r)return n;if(t===n)return n;var i=o(t,n,r);return null==e||((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max&&(i=Math.min(i,e.max))),i}function vu(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function gu(e,t,n,r,o){var i=null!=o?o.type:null;n<0?n=0:n>1&&(n=1);var a=vu(e,o),s=vu(t,o);if(Q(a)&&Q(s))return pu(i,a,s,n,r);if(Z(a)&&Z(s)){for(var u=[],l=0;l0?("spring"===f&&h.push(a.duration),a.easingImpl=du[f].apply(null,h)):a.easingImpl=du[f]}var d,p=a.easingImpl;if(d=0===a.duration?1:(n-u)/a.duration,a.applying&&(d=a.progress),d<0?d=0:d>1&&(d=1),null==a.delay){var v=a.startPosition,g=a.position;if(g&&o&&!e.locked()){var y={};mu(v.x,g.x)&&(y.x=gu(v.x,g.x,d,p)),mu(v.y,g.y)&&(y.y=gu(v.y,g.y,d,p)),e.position(y)}var m=a.startPan,b=a.pan,_=i.pan,w=null!=b&&r;w&&(mu(m.x,b.x)&&(_.x=gu(m.x,b.x,d,p)),mu(m.y,b.y)&&(_.y=gu(m.y,b.y,d,p)),e.emit("pan"));var x=a.startZoom,E=a.zoom,O=null!=E&&r;O&&(mu(x,E)&&(i.zoom=$t(i.minZoom,gu(x,E,d,p),i.maxZoom)),e.emit("zoom")),(w||O)&&e.emit("viewport");var S=a.style;if(S&&S.length>0&&o){for(var T=0;T=0;t--)(0,e[t])();e.splice(0,e.length)},c=i.length-1;c>=0;c--){var f=i[c],h=f._private;h.stopped?(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,l(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||bu(0,f,e),yu(t,f,e,n),h.applying&&(h.applying=!1),l(h.frames),null!=h.step&&h.step(e),f.completed()&&(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,l(h.completes)),s=!0)}return n||0!==i.length||0!==a.length||r.push(t),s}for(var i=!1,a=0;a0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var wu={animate:fa.animate(),animation:fa.animation(),animated:fa.animated(),clearQueue:fa.clearQueue(),delay:fa.delay(),delayAnimation:fa.delayAnimation(),stop:fa.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender(function(t,n){_u(n,e)},t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&Ne(function(n){_u(n,e),t()})}()}}},xu={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&te(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Eu=function(e){return X(e)?new Aa(e):e},Ou={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Ts(xu,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Eu(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Eu(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Eu(t),n),this},once:function(e,t,n){return this.emitter().one(e,Eu(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};fa.eventAliasesOn(Ou);var Su={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Su.jpeg=Su.jpg;var Tu={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,r=e.name,o=t.extension("layout",r);if(null!=o)return n=X(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new o(be({},e,{cy:t,eles:n}));nt("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else nt("A `name` must be specified to make a layout");else nt("Layout options must be specified to make a layout")}};Tu.createLayout=Tu.makeLayout=Tu.layout;var Pu={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var o=this.renderer();!this.destroyed()&&o&&o.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Au.invalidateDimensions=Au.resize;var ku={collection:function(e,t){return X(e)?this.$(e):ee(e)?e.collection():Z(e)?(t||(t={}),new su(this,e,t.unique,t.removed)):new su(this)},nodes:function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};ku.elements=ku.filter=ku.$;var Iu={},Ru="t";Iu.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(h||f&&d){var p=void 0;h&&d||h?p=l.properties:d&&(p=l.mappedProperties);for(var v=0;v1&&(g=1),s.color){var w=o.valueMin[0],x=o.valueMax[0],E=o.valueMin[1],O=o.valueMax[1],S=o.valueMin[2],T=o.valueMax[2],P=null==o.valueMin[3]?1:o.valueMin[3],C=null==o.valueMax[3]?1:o.valueMax[3],A=[Math.round(w+(x-w)*g),Math.round(E+(O-E)*g),Math.round(S+(T-S)*g),Math.round(P+(C-P)*g)];n={bypass:o.bypass,name:o.name,value:A,strValue:"rgb("+A[0]+", "+A[1]+", "+A[2]+")"}}else{if(!s.number)return!1;var k=o.valueMin+(o.valueMax-o.valueMin)*g;n=this.parse(o.name,k,o.bypass,h)}if(!n)return v(),!1;n.mapping=o,o=n;break;case a.data:for(var I=o.field.split("."),R=f.data,j=0;j0&&i>0){for(var s={},u=!1,l=0;l0?e.delayAnimation(a).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:i,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(e,o),e.emitAndNotify("style"),r.transitioning=!1})}else r.transitioning&&(this.removeBypasses(e,o),e.emitAndNotify("style"),r.transitioning=!1)},Iu.checkTrigger=function(e,t,n,r,o,i){var a=this.properties[t],s=o(a);e.removed()||null!=s&&s(n,r,e)&&i(a)},Iu.checkZOrderTrigger=function(e,t,n,r){var o=this;this.checkTrigger(e,t,n,r,function(e){return e.triggersZOrder},function(){o._private.cy.notify("zorder",e)})},Iu.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})},Iu.checkConnectedEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfConnectedEdges},function(t){e.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},Iu.checkParallelEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfParallelEdges},function(t){e.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},Iu.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r),this.checkConnectedEdgesBoundsTrigger(e,t,n,r),this.checkParallelEdgesBoundsTrigger(e,t,n,r)};var ju={applyBypass:function(e,t,n,r){var o=[];if("*"===t||"**"===t){if(void 0!==n)for(var i=0;it.length?i.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");!i.match(/^\s*$/);){var u=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!u){ot("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=u[0];var l=u[1];if("core"!==l&&new Aa(l).invalid)ot("Skipping parsing of block: Invalid selector found in string stylesheet: "+l),a();else{var c=u[2],f=!1;n=c;for(var h=[];!n.match(/^\s*$/);){var d=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!d){ot("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),f=!0;break}r=d[0];var p=d[1],v=d[2];this.properties[p]?o.parse(p,v)?(h.push({name:p,val:v}),s()):(ot("Skipping property: Invalid property definition in: "+r),s()):(ot("Skipping property: Invalid property name in: "+r),s())}if(f){a();break}o.selector(l);for(var g=0;g=7&&"d"===t[0]&&(l=new RegExp(s.data.regex).exec(t))){if(n)return!1;var h=s.data;return{name:e,value:l,strValue:""+t,mapped:h,field:l[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(f.multiple)return!1;var d=s.mapData;if(!f.color&&!f.number)return!1;var p=this.parse(e,c[4]);if(!p||p.mapped)return!1;var v=this.parse(e,c[5]);if(!v||v.mapped)return!1;if(p.pfValue===v.pfValue||p.strValue===v.strValue)return ot("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+p.strValue+"`"),this.parse(e,p.strValue);if(f.color){var g=p.value,y=v.value;if(!(g[0]!==y[0]||g[1]!==y[1]||g[2]!==y[2]||g[3]!==y[3]&&(null!=g[3]&&1!==g[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:d,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:p.value,valueMax:v.value,bypass:n}}}if(f.multiple&&"multiple"!==r){var m;if(m=u?t.split(/\s+/):Z(t)?t:[t],f.evenMultiple&&m.length%2!=0)return null;for(var b=[],_=[],w=[],x="",E=!1,O=0;O0?" ":"")+S.strValue}return f.validate&&!f.validate(b,_)?null:f.singleEnum&&E?1===b.length&&X(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:w,strValue:x,bypass:n,units:_}}var T,P,C=function(){for(var r=0;rf.max||f.strictMax&&t===f.max))return null;var j={name:e,value:t,strValue:""+t+(A||""),units:A,bypass:n};return f.unitless||"px"!==A&&"em"!==A?j.pfValue=t:j.pfValue="px"!==A&&A?this.getEmSizeInPixels()*t:t,"ms"!==A&&"s"!==A||(j.pfValue="ms"===A?t:1e3*t),"deg"!==A&&"rad"!==A||(j.pfValue="rad"===A?t:(T=t,Math.PI*T/180)),"%"===A&&(j.pfValue=t/100),j}if(f.propList){var M=[],N=""+t;if("none"===N);else{for(var D=N.split(/\s*,\s*|\s+/),L=0;L0&&u>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*t)/n.w,(u-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,o=r.pan,i=r.zoom,a=!1;if(r.zoomingEnabled||(a=!0),Q(e)?n=e:$(e)&&(n=e.level,null!=e.position?t=Ut(e.position,i,o):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(a=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?i=!0:(t.zoom=s,o.push("zoom"))}if(r&&(!i||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;Q(u.x)&&(t.pan.x=u.x,a=!1),Q(u.y)&&(t.pan.y=u.y,a=!1),a||o.push("pan")}return o.length>0&&(o.push("viewport"),this.emit(o.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(X(e)){var n=e;e=this.mutableElements().filter(n)}else ee(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),o=this.width(),i=this.height();return{x:(o-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=this.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};Wu.centre=Wu.center,Wu.autolockNodes=Wu.autolock,Wu.autoungrabifyNodes=Wu.autoungrabify;var Gu={data:fa.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:fa.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:fa.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:fa.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Gu.attr=Gu.data,Gu.removeAttr=Gu.removeData;var Hu=function(e){var t=this,n=(e=be({},e)).container;n&&!J(n)&&J(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var o=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var i=void 0!==d&&void 0!==n&&!e.headless,a=e;a.layout=be({name:i?"grid":"null"},a.layout),a.renderer=be({name:i?"canvas":"null"},a.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},u=this._private={container:n,ready:!1,options:a,elements:new su(this),listeners:[],aniEles:new su(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,a.zoomingEnabled),userZoomingEnabled:s(!0,a.userZoomingEnabled),panningEnabled:s(!0,a.panningEnabled),userPanningEnabled:s(!0,a.userPanningEnabled),boxSelectionEnabled:s(!0,a.boxSelectionEnabled),autolock:s(!1,a.autolock,a.autolockNodes),autoungrabify:s(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:s(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?i:a.styleEnabled,zoom:Q(a.zoom)?a.zoom:1,pan:{x:$(a.pan)&&Q(a.pan.x)?a.pan.x:0,y:$(a.pan)&&Q(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,a.multiClickDebounceTime)};this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),u.styleEnabled&&t.setStyle([]);var l=be({},a,a.renderer);t.initRenderer(l),function(e,t){if(e.some(ae))return Hr.all(e).then(t);t(e)}([a.style,a.elements],function(e){var n=e[0],i=e[1];u.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var o=t.mutableElements();o.length>0&&o.remove(),null!=e&&($(e)||Z(e))&&t.add(e),t.one("layoutready",function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",r),t.emit("done")});var i=be({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,function(){t.startAnimationLoop(),u.ready=!0,K(a.ready)&&t.on("ready",a.ready);for(var e=0;e0,u=!!t.boundingBox,l=Qt(u?t.boundingBox:structuredClone(n.extent()));if(ee(t.roots))e=t.roots;else if(Z(t.roots)){for(var c=[],f=0;f0;){var A=C(),k=O(A,T);if(k)A.outgoers().filter(function(e){return e.isNode()&&r.has(e)}).forEach(P);else if(null===k){ot("Detected double maximal shift for node `"+A.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var I=0;if(t.avoidOverlap)for(var R=0;R0&&y[0].length<=3?i/2:0),s=2*Math.PI/y[r].length*o;return 0===r&&1===y[0].length&&(a=1),{x:H+a*Math.cos(s),y:Y+a*Math.sin(s)}}var c=y[r].length,f=Math.max(1===c?0:u?(l.w-2*t.padding-q.w)/((t.grid?$:c)-1):(l.w-2*t.padding-q.w)/((t.grid?$:c)+1),I);return{x:H+(o+1-(c+1)/2)*f,y:Y+(r+1-(F+1)/2)*K}}(e),l,Q[t.direction])}),this};var Qu={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Ju(e){this.options=be({},Qu,e)}Ju.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,o=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));for(var a,s=Qt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),u=s.x1+s.w/2,l=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/i.length:t.sweep)/Math.max(1,i.length-1),f=0,h=0;h1&&t.avoidOverlap){f*=1.75;var g=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(f*f/(g*g+y*y));a=Math.max(m,a)}return r.nodes().layoutPositions(this,t,function(e,n){var r=t.startAngle+n*c*(o?1:-1),i=a*Math.cos(r),s=a*Math.sin(r);return{x:u+i,y:l+s}}),this};var el,tl={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function nl(e){this.options=be({},tl,e)}nl.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,o=t.eles,i=o.nodes().not(":parent"),a=Qt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=a.x1+a.w/2,u=a.y1+a.h/2,l=[],c=0,f=0;f0&&Math.abs(m[0].value-_.value)>=g&&(m=[],y.push(m)),m.push(_)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var x=y.length>0&&y[0].length>1,E=(Math.min(a.w,a.h)/2-w)/(y.length+x?1:0);w=Math.min(w,E)}for(var O=0,S=0;S1&&t.avoidOverlap){var A=Math.cos(C)-Math.cos(0),k=Math.sin(C)-Math.sin(0),I=Math.sqrt(w*w/(A*A+k*k));O=Math.max(I,O)}T.r=O,O+=w}if(t.equidistant){for(var R=0,j=0,M=0;M=e.numIter||(fl(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&i(),Ne(c)):(El(r,e),s())};c()}else{for(;l;)l=a(u),u++;El(r,e),s()}return this},ol.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},ol.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var il=function(e,t,n){for(var r=n.eles.edges(),o=n.eles.nodes(),i=Qt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),a={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:o.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:i.w,clientHeight:i.h,boundingBox:i},s=n.eles.components(),u={},l=0;l0)for(a.graphSet.push(w),l=0;lr.count?0:r.graph},sl=function(e,t,n,r){var o=r.graphSet[n];if(-10)var s=(l=r.nodeOverlap*a)*o/(v=Math.sqrt(o*o+i*i)),u=l*i/v;else{var l,c=gl(e,o,i),f=gl(t,-1*o,-1*i),h=f.x-c.x,d=f.y-c.y,p=h*h+d*d,v=Math.sqrt(p);s=(l=(e.nodeRepulsion+t.nodeRepulsion)/p)*h/v,u=l*d/v}e.isLocked||(e.offsetX-=s,e.offsetY-=u),t.isLocked||(t.offsetX+=s,t.offsetY+=u)}},vl=function(e,t,n,r){if(n>0)var o=e.maxX-t.minX;else o=t.maxX-e.minX;if(r>0)var i=e.maxY-t.minY;else i=t.maxY-e.minY;return o>=0&&i>=0?Math.sqrt(o*o+i*i):0},gl=function(e,t,n){var r=e.positionX,o=e.positionY,i=e.height||1,a=e.width||1,s=n/t,u=i/a,l={};return 0===t&&0n?(l.x=r,l.y=o+i/2,l):0t&&-1*u<=s&&s<=u?(l.x=r-a/2,l.y=o-a*n/2/t,l):0=u)?(l.x=r+i*t/2/n,l.y=o+i/2,l):0>n&&(s<=-1*u||s>=u)?(l.x=r-i*t/2/n,l.y=o-i/2,l):l},yl=function(e,t){for(var n=0;n1){var p=t.gravity*f/d,v=t.gravity*h/d;c.offsetX+=p,c.offsetY+=v}}}}},bl=function(e,t){var n=[],r=0,o=-1;for(n.push.apply(n,e.graphSet[0]),o+=e.graphSet[0].length;r<=o;){var i=n[r++],a=e.idToIndex[i],s=e.layoutNodes[a],u=s.children;if(0n)var o={x:n*e/r,y:n*t/r};else o={x:e,y:t};return o},xl=function(e,t){var n=e.parentId;if(null!=n){var r=t.layoutNodes[t.idToIndex[n]],o=!1;return(null==r.maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,o=!0),(null==r.minX||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,o=!0),(null==r.minY||e.minY-r.padTopp&&(f+=d+t.componentSpacing,c=0,h=0,d=0)}}},Ol={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Sl(e){this.options=be({},Ol,e)}Sl.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,o=r.nodes().not(":parent");t.sort&&(o=o.sort(t.sort));var i=Qt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.nodes().layoutPositions(this,t,function(e){return{x:i.x1,y:i.y1}});else{var a=o.size(),s=Math.sqrt(a*i.h/i.w),u=Math.round(s),l=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(u,l);Math.min(u,l)==u?u=e:l=e},f=function(e){if(null==e)return Math.max(u,l);Math.max(u,l)==u?u=e:l=e},h=t.rows,d=null!=t.cols?t.cols:t.columns;if(null!=h&&null!=d)u=h,l=d;else if(null!=h&&null==d)u=h,l=Math.ceil(a/u);else if(null==h&&null!=d)l=d,u=Math.ceil(a/l);else if(l*u>a){var p=c(),v=f();(p-1)*v>=a?c(p-1):(v-1)*p>=a&&f(v-1)}else for(;l*u=a?f(y+1):c(g+1)}var m=i.w/l,b=i.h/u;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var _=0;_=l&&(I=0,k++)},j={},M=0;M(r=pn(e,t,_[w],_[w+1],_[w+2],_[w+3])))return g(n,r),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(_=i.allpts,w=0;w+5(r=dn(e,t,_[w],_[w+1],_[w+2],_[w+3],_[w+4],_[w+5])))return g(n,r),!0;m=m||o.source,b=b||o.target;var x=a.getArrowWidth(u,c),E=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return ht(e,t,n)}function _(n,r){var o,i=n._private,a=p;o=r?r+"-":"",n.boundingBox();var s=i.labelBounds[r||"main"],u=n.pstyle(o+"label").value;if("yes"===n.pstyle("text-events").strValue&&u){var l=b(i.rscratch,"labelX",r),c=b(i.rscratch,"labelY",r),f=b(i.rscratch,"labelAngle",r),h=n.pstyle(o+"text-margin-x").pfValue,d=n.pstyle(o+"text-margin-y").pfValue,v=s.x1-a-h,y=s.x2+a-h,m=s.y1-a-d,_=s.y2+a-d;if(f){var w=Math.cos(f),x=Math.sin(f),E=function(e,t){return{x:(e-=l)*w-(t-=c)*x+l,y:e*x+t*w+c}},O=E(v,m),S=E(v,_),T=E(y,m),P=E(y,_),C=[O.x+h,O.y+d,T.x+h,T.y+d,P.x+h,P.y+d,S.x+h,S.y+d];if(vn(e,t,C))return g(n),!0}else if(an(s,e,t))return g(n),!0}}n&&(u=u.interactive);for(var w=u.length-1;w>=0;w--){var x=u[w];x.isNode()?y(x)||_(x):m(x)||_(x)||_(x,"source")||_(x,"target")}return l},getAllInBox:function(e,t,n,r){var o=this.getCachedZSortedEles().interactive,i=2/this.cy.zoom(),a=[],s=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),f=Math.max(t,r),h=Qt({x1:e=s,y1:t=c,x2:n=l,y2:r=f}),d=[{x:h.x1,y:h.y1},{x:h.x2,y:h.y1},{x:h.x2,y:h.y2},{x:h.x1,y:h.y2}],p=[[d[0],d[1]],[d[1],d[2]],[d[2],d[3]],[d[3],d[0]]];function v(e,t,n){return ht(e,t,n)}function g(e,t){var n=e._private,r=i;e.boundingBox();var o=n.labelBounds.main;if(!o)return null;var a=v(n.rscratch,"labelX",t),s=v(n.rscratch,"labelY",t),u=v(n.rscratch,"labelAngle",t),l=e.pstyle("text-margin-x").pfValue,c=e.pstyle("text-margin-y").pfValue,f=o.x1-r-l,h=o.x2+r-l,d=o.y1-r-c,p=o.y2+r-c;if(u){var g=Math.cos(u),y=Math.sin(u),m=function(e,t){return{x:(e-=a)*g-(t-=s)*y+a,y:e*y+t*g+s}};return[m(f,d),m(h,d),m(h,p),m(f,p)]}return[{x:f,y:d},{x:h,y:d},{x:h,y:p},{x:f,y:p}]}function y(e,t,n,r){function o(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}return o(e,n,r)!==o(t,n,r)&&o(e,t,n)!==o(e,t,r)}for(var m=0;m4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(function(e,t,n,r,o){var i,a;if(e!==tc?oc(t,e,nc):((a=nc).x=-1*(i=rc).x,a.y=-1*i.y,a.nx=-1*i.nx,a.ny=-1*i.ny,a.ang=i.ang>0?-(Math.PI-i.ang):Math.PI+i.ang),oc(t,n,rc),zl=nc.nx*rc.ny-nc.ny*rc.nx,Vl=nc.nx*rc.nx-nc.ny*-rc.ny,Hl=Math.asin(Math.max(-1,Math.min(1,zl))),Math.abs(Hl)<1e-6)return Fl=t.x,Ul=t.y,void(ql=Kl=0);Wl=1,Gl=!1,Vl<0?Hl<0?Hl=Math.PI+Hl:(Hl=Math.PI-Hl,Wl=-1,Gl=!0):Hl>0&&(Wl=-1,Gl=!0),Kl=void 0!==t.radius?t.radius:r,Yl=Hl/2,Zl=Math.min(nc.len/2,rc.len/2),o?(Xl=Math.abs(Math.cos(Yl)*Kl/Math.sin(Yl)))>Zl?(Xl=Zl,ql=Math.abs(Xl*Math.sin(Yl)/Math.cos(Yl))):ql=Kl:(Xl=Math.min(Zl,Kl),ql=Math.abs(Xl*Math.sin(Yl)/Math.cos(Yl))),Jl=t.x+rc.nx*Xl,ec=t.y+rc.ny*Xl,Fl=Jl-rc.ny*ql*Wl,Ul=ec+rc.nx*ql*Wl,$l=t.x+nc.nx*Xl,Ql=t.y+nc.ny*Xl,tc=t}(e,t,n,r,o),{cx:Fl,cy:Ul,radius:ql,startX:$l,startY:Ql,stopX:Jl,stopY:ec,startAngle:nc.ang+Math.PI/2*Wl,endAngle:rc.ang-Math.PI/2*Wl,counterClockwise:Gl})}var sc=.01,uc=Math.sqrt(.02),lc={};function cc(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},P=T(O,x),C=T(S,E),A=!1;"auto"===g?v=Math.abs(P)>Math.abs(C)?o:r:g===u||g===s?(v=r,A=!0):g!==i&&g!==a||(v=o,A=!0);var k,I=v===r,R=I?C:P,j=I?S:O,M=Ht(j),N=!1;A&&(m||_)||!(g===s&&j<0||g===u&&j>0||g===i&&j>0||g===a&&j<0)||(R=(M*=-1)*Math.abs(R),N=!0);var D=function(e){return Math.abs(e)=Math.abs(R)},L=D(k=m?(b<0?1+b:b)*R:(b<0?R:0)+b*M),B=D(Math.abs(R)-Math.abs(k));if(!L&&!B||N)if(I){var F=l.y1+k+(p?f/2*M:0),U=l.x1,z=l.x2;n.segpts=[U,F,z,F]}else{var V=l.x1+k+(p?c/2*M:0),W=l.y1,G=l.y2;n.segpts=[V,W,V,G]}else if(I){var H=Math.abs(j)<=f/2,Y=Math.abs(O)<=h/2;if(H){var q=(l.x1+l.x2)/2,X=l.y1,K=l.y2;n.segpts=[q,X,q,K]}else if(Y){var Z=(l.y1+l.y2)/2,$=l.x1,Q=l.x2;n.segpts=[$,Z,Q,Z]}else n.segpts=[l.x1,l.y2]}else{var J=Math.abs(j)<=c/2,ee=Math.abs(S)<=d/2;if(J){var te=(l.y1+l.y2)/2,ne=l.x1,re=l.x2;n.segpts=[ne,te,re,te]}else if(ee){var oe=(l.x1+l.x2)/2,ie=l.y1,ae=l.y2;n.segpts=[oe,ie,oe,ae]}else n.segpts=[l.x2,l.y1]}if(n.isRound){var se=e.pstyle("taxi-radius").value,ue="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(ue)}},lc.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,o=t.tgtPos,i=t.srcW,a=t.srcH,s=t.tgtW,u=t.tgtH,l=t.srcShape,c=t.tgtShape,f=t.srcCornerRadius,h=t.tgtCornerRadius,d=t.srcRs,p=t.tgtRs,v=!Q(n.startX)||!Q(n.startY),g=!Q(n.arrowStartX)||!Q(n.arrowStartY),y=!Q(n.endX)||!Q(n.endY),m=!Q(n.arrowEndX)||!Q(n.arrowEndY),b=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,_=Yt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=_v.poolIndex()){var g=p;p=v,v=g}var y=f.srcPos=p.position(),m=f.tgtPos=v.position(),b=f.srcW=p.outerWidth(),_=f.srcH=p.outerHeight(),x=f.tgtW=v.outerWidth(),E=f.tgtH=v.outerHeight(),O=f.srcShape=n.nodeShapes[t.getNodeShape(p)],S=f.tgtShape=n.nodeShapes[t.getNodeShape(v)],T=f.srcCornerRadius="auto"===p.pstyle("corner-radius").value?"auto":p.pstyle("corner-radius").pfValue,P=f.tgtCornerRadius="auto"===v.pstyle("corner-radius").value?"auto":v.pstyle("corner-radius").pfValue,C=f.tgtRs=v._private.rscratch,A=f.srcRs=p._private.rscratch;f.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var k=0;k=uc||(G=Math.sqrt(Math.max(W*W,sc)+Math.max(V*V,sc)));var H=f.vector={x:W,y:V},Y=f.vectorNorm={x:H.x/G,y:H.y/G},q={x:-Y.y,y:Y.x};f.nodesOverlap=!Q(G)||S.checkPoint(D[0],D[1],0,x,E,m.x,m.y,P,C)||O.checkPoint(B[0],B[1],0,b,_,y.x,y.y,T,A),f.vectorNormInverse=q,e={nodesOverlap:f.nodesOverlap,dirCounts:f.dirCounts,calculatedIntersection:!0,hasBezier:f.hasBezier,hasUnbundled:f.hasUnbundled,eles:f.eles,srcPos:m,srcRs:C,tgtPos:y,tgtRs:A,srcW:x,srcH:E,tgtW:b,tgtH:_,srcIntn:F,tgtIntn:L,srcShape:S,tgtShape:O,posPts:{x1:z.x2,y1:z.y2,x2:z.x1,y2:z.y1},intersectionPts:{x1:U.x2,y1:U.y2,x2:U.x1,y2:U.y1},vector:{x:-H.x,y:-H.y},vectorNorm:{x:-Y.x,y:-Y.y},vectorNormInverse:{x:-q.x,y:-q.y}}}var X=N?e:f;R.nodesOverlap=X.nodesOverlap,R.srcIntn=X.srcIntn,R.tgtIntn=X.tgtIntn,R.isRound=j.startsWith("round"),r&&(p.isParent()||p.isChild()||v.isParent()||v.isChild())&&(p.parents().anySame(v)||v.parents().anySame(p)||p.same(v)&&p.isParent())?t.findCompoundLoopPoints(I,X,k,M):p===v?t.findLoopPoints(I,X,k,M):j.endsWith("segments")?t.findSegmentsPoints(I,X):j.endsWith("taxi")?t.findTaxiPoints(I,X):"straight"===j||!M&&f.eles.length%2==1&&k===Math.floor(f.eles.length/2)?t.findStraightEdgePoints(I):t.findBezierPoints(I,X,k,M,N),t.findEndpoints(I),t.tryToCorrectInvalidPoints(I,X),t.checkForInvalidEdgeWarning(I),t.storeAllpts(I),t.storeEdgeProjections(I),t.calculateArrowAngles(I),t.recalculateEdgeLabelProjections(I),t.calculateLabelAngles(I)}},w=0;w0){var J=d,ee=qt(J,Vt(i)),te=qt(J,Vt($)),ne=ee;te2&&qt(J,{x:$[2],y:$[3]})0){var ge=p,ye=qt(ge,Vt(i)),me=qt(ge,Vt(ve)),be=ye;me2&&qt(ge,{x:ve[2],y:ve[3]})=l||m){c={cp:v,segment:y};break}}if(c)break}var b=c.cp,_=c.segment,w=(l-h)/_.length,x=_.t1-_.t0,E=s?_.t0+x*w:_.t1-x*w;E=$t(0,E,1),t=Zt(b.p0,b.p1,b.p2,E),o=function(e,t,n,r){var o=$t(0,r-.001,1),i=$t(0,r+.001,1),a=Zt(e,t,n,o),s=Zt(e,t,n,i);return gc(a,s)}(b.p0,b.p1,b.p2,E);break;case"straight":case"segments":case"haystack":for(var O,S,T,P,C=0,A=r.allpts.length,k=0;k+3=l));k+=2);var I=(l-S)/O;I=$t(0,I,1),t=function(e,t,n,r){var o=t.x-e.x,i=t.y-e.y,a=Yt(e,t),s=o/a,u=i/a;return n=null==n?0:n,r=null!=r?r:n*a,{x:e.x+s*r,y:e.y+u*r}}(T,P,I),o=gc(T,P)}a("labelX",n,t.x),a("labelY",n,t.y),a("labelAutoAngle",n,o)}};l("source"),l("target"),this.applyLabelDimensions(e)}},pc.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},pc.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),o=He(r,e._private.labelDimsKey);if(ht(n.rscratch,"prefixedLabelDimsKey",t)!==o){dt(n.rscratch,"prefixedLabelDimsKey",t,o);var i=this.calculateLabelDimensions(e,r),a=e.pstyle("line-height").pfValue,s=e.pstyle("text-wrap").strValue,u=ht(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==s?1:Math.max(u.length,1),c=i.height/l,f=c*a,h=i.width,d=i.height+(l-1)*(a-1)*c;dt(n.rstyle,"labelWidth",t,h),dt(n.rscratch,"labelWidth",t,h),dt(n.rstyle,"labelHeight",t,d),dt(n.rscratch,"labelHeight",t,d),dt(n.rscratch,"labelLineHeight",t,f)}},pc.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,s=function(e,r){return r?(dt(n.rscratch,e,t,r),r):ht(n.rscratch,e,t)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var u=e.pstyle("text-wrap").value;if("wrap"===u){var l=s("labelKey");if(null!=l&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var c=i.split("\n"),f=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,d=[],p=/[\s\u200b]+|$/g,v=0;vf){var b,_="",w=0,x=o(g.matchAll(p));try{for(x.s();!(b=x.n()).done;){var E=b.value,O=E[0],S=g.substring(w,E.index);w=E.index+O.length;var T=0===_.length?S:_+S+O;this.calculateLabelDimensions(e,T).width<=f?_+=S+O:(_&&d.push(_),_=S+O)}}catch(e){x.e(e)}finally{x.f()}_.match(/^[\s\u200b]+$/)||d.push(_)}else d.push(g)}s("labelWrapCachedLines",d),i=s("labelWrapCachedText",d.join("\n")),s("labelWrapKey",l)}else if("ellipsis"===u){var P=e.pstyle("text-max-width").pfValue,C="",A=!1;if(this.calculateLabelDimensions(e,i).widthP);k++)C+=i[k],k===i.length-1&&(A=!0);return A||(C+="…"),C}return i},pc.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},pc.calculateLabelDimensions=function(e,t){var n=this.cy.window().document,r=e.pstyle("font-style").strValue,o=e.pstyle("font-size").pfValue,i=e.pstyle("font-family").strValue,a=e.pstyle("font-weight").strValue,s=this.labelCalcCanvas,u=this.labelCalcCanvasContext;if(!s){s=this.labelCalcCanvas=n.createElement("canvas"),u=this.labelCalcCanvasContext=s.getContext("2d");var l=s.style;l.position="absolute",l.left="-9999px",l.top="-9999px",l.zIndex="-1",l.visibility="hidden",l.pointerEvents="none"}u.font="".concat(r," ").concat(a," ").concat(o,"px ").concat(i);for(var c=0,f=0,h=t.split("\n"),d=0;d1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var T=o(t);g&&(e.hoverData.tapholdCancelled=!0),n=!0,r(v,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var P=function(e){return{originalEvent:t,type:e,position:{x:c[0],y:c[1]}}},C=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||a.emit(P("boxstart")),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(g){var A=P("cxtdrag");b?b.emit(A):a.emit(A),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(P("cxtdragout")),e.hoverData.cxtOver=v,v&&v.emit(P("cxtdragover")))}}else if(e.hoverData.dragging){if(n=!0,a.panningEnabled()&&a.userPanningEnabled()){var k;if(e.hoverData.justStartedPan){var I=e.hoverData.mdownPos;k={x:(c[0]-I[0])*s,y:(c[1]-I[1])*s},e.hoverData.justStartedPan=!1}else k={x:_[0]*s,y:_[1]*s};a.panBy(k),a.emit(P("dragpan")),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=p[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||v==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),v&&r(v,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=v),b)if(g){if(a.boxSelectionEnabled()&&T)b&&b.grabbed()&&(f(w),b.emit(P("freeon")),w.emit(P("free")),e.dragData.didDrag&&(b.emit(P("dragfreeon")),w.emit(P("dragfree")))),C();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var R=!e.dragData.didDrag;R&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||l(w,{inDragLayer:!0});var j={x:0,y:0};if(Q(_[0])&&Q(_[1])&&(j.x+=_[0],j.y+=_[1],R)){var M=e.hoverData.dragDelta;M&&Q(M[0])&&Q(M[1])&&(j.x+=M[0],j.y+=M[1])}e.hoverData.draggingEles=!0,w.silentShift(j).emit(P("position")).emit(P("drag")),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(_[0]),t.push(_[1])):(t[0]+=_[0],t[1]+=_[1])}();n=!0}else g&&(e.hoverData.dragging||!a.boxSelectionEnabled()||!T&&a.panningEnabled()&&a.userPanningEnabled()?!e.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&i(b,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=Vt(h),e.redrawHint("select",!0),e.redraw()):C(),b&&b.pannable()&&b.active()&&b.unactivate());return p[2]=c[0],p[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}},!1),e.registerBinding(t,"mouseup",function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,a=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,u=e.findNearestElement(a[0],a[1],!0,!1),l=e.dragData.possibleDragElements,c=e.hoverData.down,h=o(t);e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate();var d=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};if(3===e.hoverData.which){var p=d("cxttapend");if(c?c.emit(p):i.emit(p),!e.hoverData.cxtDragged){var v=d("cxttap");c?c.emit(v):i.emit(v)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(u,["mouseup","tapend","vmouseup"],t,{x:a[0],y:a[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:a[0],y:a[1]}),_=!1,t.timeStamp-w<=i.multiClickDebounceTime()?(b&&clearTimeout(b),_=!0,w=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:a[0],y:a[1]})):(b=setTimeout(function(){_||r(c,["oneclick","onetap","voneclick"],t,{x:a[0],y:a[1]})},i.multiClickDebounceTime()),w=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||o(t)||(i.$(n).unselect(["tapunselect"]),l.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=l=i.collection()),u!=c||e.dragData.didDrag||e.hoverData.selecting||null!=u&&u._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||h?u.selected()?u.unselect(["tapunselect"]):u.select(["tapselect"]):h||(i.$(n).unmerge(u).unselect(["tapunselect"]),u.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var g=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),g.length>0&&e.redrawHint("eles",!0),i.emit(d("boxend"));"additive"===i.selectionType()||h||i.$(n).unmerge(g).unselect(),g.emit(d("box")).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(d("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var y=c&&c.grabbed();f(l),y&&(c.emit(d("freeon")),l.emit(d("free")),e.dragData.didDrag&&(c.emit(d("dragfreeon")),l.emit(d("dragfree"))))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}},!1);var E,O,S,T,P,C,A,k,I,R,j,M,N,D,L=[],B=1e5,F=function(t){var n=!1,r=t.deltaY;if(null==r&&(null!=t.wheelDeltaY?r=t.wheelDeltaY/4:null!=t.wheelDelta&&(r=t.wheelDelta/4)),0!==r){if(null==E)if(L.length>=4){var o=L;if(E=function(e){for(var t=0;t5}if(E)for(var a=0;a5&&(r=5*Ht(r)),h=r/-250,E&&(h/=B,h*=3),h*=e.wheelSensitivity,1===t.deltaMode&&(h*=33);var d=s.zoom()*Math.pow(10,h);"gesturechange"===t.type&&(d=e.gestureStartZoom*t.scale),s.zoom({level:d,renderedPosition:{x:f[0],y:f[1]}}),s.emit({type:"gesturechange"===t.type?"pinchzoom":"scrollzoom",originalEvent:t,position:{x:c[0],y:c[1]}})}}}};e.registerBinding(e.container,"wheel",F,!0),e.registerBinding(t,"scroll",function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,"gesturestart",function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()},!0),e.registerBinding(e.container,"gesturechange",function(t){e.hasTouchStarted||F(t)},!0),e.registerBinding(e.container,"mouseout",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})},!1),e.registerBinding(e.container,"mouseover",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})},!1);var U,z,V,W,G,H,Y,q=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},X=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",U=function(t){if(e.hasTouchStarted=!0,m(t)){d(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,o=e.touchData.now,i=e.touchData.earlier;if(t.touches[0]){var a=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);o[0]=a[0],o[1]=a[1]}t.touches[1]&&(a=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),o[2]=a[0],o[3]=a[1]),t.touches[2]&&(a=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),o[4]=a[0],o[5]=a[1]);var u=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(t.touches[1]){e.touchData.singleTouchMoved=!0,f(e.dragData.touchDragEles);var h=e.findContainerClientCoords();R=h[0],j=h[1],M=h[2],N=h[3],O=t.touches[0].clientX-R,S=t.touches[0].clientY-j,T=t.touches[1].clientX-R,P=t.touches[1].clientY-j,D=0<=O&&O<=M&&0<=T&&T<=M&&0<=S&&S<=N&&0<=P&&P<=N;var p=n.pan(),v=n.zoom();if(C=q(O,S,T,P),A=X(O,S,T,P),I=[((k=[(O+T)/2,(S+P)/2])[0]-p.x)/v,(k[1]-p.y)/v],A<4e4&&!t.touches[2]){var g=e.findNearestElement(o[0],o[1],!0,!0),y=e.findNearestElement(o[2],o[3],!0,!0);return g&&g.isNode()?(g.activate().emit(u("cxttapstart")),e.touchData.start=g):y&&y.isNode()?(y.activate().emit(u("cxttapstart")),e.touchData.start=y):n.emit(u("cxttapstart")),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var b=e.findNearestElements(o[0],o[1],!0,!0),_=b[0];if(null!=_&&(_.activate(),e.touchData.start=_,e.touchData.starts=b,e.nodeIsGrabbable(_))){var w=e.dragData.touchDragEles=n.collection(),x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),_.selected()?(x=n.$(function(t){return t.selected()&&e.nodeIsGrabbable(t)}),l(x,{addToList:w})):c(_,{addToList:w}),s(_),_.emit(u("grabon")),x?x.forEach(function(e){e.emit(u("grab"))}):_.emit(u("grab"))}r(_,["touchstart","tapstart","vmousedown"],t,{x:o[0],y:o[1]}),null==_&&(e.data.bgActivePosistion={x:a[0],y:a[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout(function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:o[0],y:o[1]})},e.tapholdDuration)}if(t.touches.length>=1){for(var E=e.touchData.startPosition=[null,null,null,null,null,null],L=0;L=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var x=t.touches[0].clientX-R,E=t.touches[0].clientY-j,k=t.touches[1].clientX-R,M=t.touches[1].clientY-j,N=X(x,E,k,M);if(N/A>=2.25||N>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var L=p("cxttapend");e.touchData.start?(e.touchData.start.unactivate().emit(L),e.touchData.start=null):a.emit(L)}}if(n&&e.touchData.cxt){L=p("cxtdrag"),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(L):a.emit(L),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var B=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&B===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit(p("cxtdragout")),e.touchData.cxtOver=B,B&&B.emit(p("cxtdragover")))}else if(n&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit(p("boxstart")),e.touchData.selecting=!0,e.touchData.didSelect=!0,o[4]=1,o&&0!==o.length&&void 0!==o[0]?(o[2]=(s[0]+s[2]+s[4])/3,o[3]=(s[1]+s[3]+s[5])/3):(o[0]=(s[0]+s[2]+s[4])/3,o[1]=(s[1]+s[3]+s[5])/3,o[2]=(s[0]+s[2]+s[4])/3+1,o[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),te=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var F=0;F0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",V=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",W=function(t){var o=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var a=e.cy,s=a.zoom(),u=e.touchData.now,l=e.touchData.earlier;if(t.touches[0]){var c=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);u[0]=c[0],u[1]=c[1]}t.touches[1]&&(c=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),u[2]=c[0],u[3]=c[1]),t.touches[2]&&(c=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),u[4]=c[0],u[5]=c[1]);var h,d=function(e){return{originalEvent:t,type:e,position:{x:u[0],y:u[1]}}};if(o&&o.unactivate(),e.touchData.cxt){if(h=d("cxttapend"),o?o.emit(h):a.emit(h),!e.touchData.cxtDragged){var p=d("cxttap");o?o.emit(p):a.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&a.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var v=a.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),a.emit(d("boxend")),v.emit(d("box")).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(d("boxselect")),v.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=o&&o.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=o){var y=o._private.grabbed;f(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),y&&(o.emit(d("freeon")),g.emit(d("free")),e.dragData.didDrag&&(o.emit(d("dragfreeon")),g.emit(d("dragfree")))),r(o,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]}),o.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(u[0],u[1],!0,!0);r(m,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]})}var b=e.touchData.startPosition[0]-u[0],_=b*b,w=e.touchData.startPosition[1]-u[1],x=(_+w*w)*s*s;e.touchData.singleTouchMoved||(o||a.$(":selected").unselect(["tapunselect"]),r(o,["tap","vclick"],t,{x:u[0],y:u[1]}),G=!1,t.timeStamp-Y<=a.multiClickDebounceTime()?(H&&clearTimeout(H),G=!0,Y=null,r(o,["dbltap","vdblclick"],t,{x:u[0],y:u[1]})):(H=setTimeout(function(){G||r(o,["onetap","voneclick"],t,{x:u[0],y:u[1]})},a.multiClickDebounceTime()),Y=t.timeStamp)),null!=o&&!e.dragData.didDrag&&o._private.selectable&&x2){for(var d=[c[0],c[1]],p=Math.pow(d[0]-e,2)+Math.pow(d[1]-t,2),v=1;v0)return g[0]}return null},d=Object.keys(f),p=0;p0?l:cn(o,i,e,t,n,r,a,s)},checkPoint:function(e,t,n,r,o,i,a,s){var u=2*(s="auto"===s?An(r,o):s);if(gn(e,t,this.points,i,a,r,o-u,[0,-1],n))return!0;if(gn(e,t,this.points,i,a,r-u,o,[0,-1],n))return!0;var l=r/2+2*n,c=o/2+2*n;return!!vn(e,t,[i-l,a-c,i-l,a,i+l,a,i+l,a-c])||!!bn(e,t,u,u,i+r/2-s,a+o/2-s,n)||!!bn(e,t,u,u,i-r/2+s,a+o/2-s,n)}}},registerNodeShapes:function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",Tn(3,0)),this.generateRoundPolygon("round-triangle",Tn(3,0)),this.generatePolygon("rectangle",Tn(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",Tn(5,0)),this.generateRoundPolygon("round-pentagon",Tn(5,0)),this.generatePolygon("hexagon",Tn(6,0)),this.generateRoundPolygon("round-hexagon",Tn(6,0)),this.generatePolygon("heptagon",Tn(7,0)),this.generateRoundPolygon("round-heptagon",Tn(7,0)),this.generatePolygon("octagon",Tn(8,0)),this.generateRoundPolygon("round-octagon",Tn(8,0));var r=new Array(20),o=Cn(5,0),i=Cn(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s=e.deqFastCost*v)break}else if(o){if(d>=e.deqCost*u||d>=e.deqAvgCost*s)break}else if(p>=e.deqNoDrawCost*Cc)break;var g=e.deq(t,f,c);if(!(g.length>0))break;for(var y=0;y0&&(e.onDeqd(t,l),!o&&e.shouldRedraw(t,l,f,c)&&r())},o(t))}}},kc=function(){return r(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Je;n(this,e),this.idsByKey=new pt,this.keyForId=new pt,this.cachesByLvl=new pt,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=r},[{key:"getIdsFor",value:function(e){null==e&&nt("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new gt,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new pt,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach(function(n){return t.deleteCache(e,n)})}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}])}(),Ic={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Rc=lt({getKey:null,doesEleInvalidateKey:Je,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Qe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),jc=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Rc(t);be(n,r),n.lookup=new kc(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Mc=jc.prototype;Mc.reasons=Ic,Mc.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},Mc.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},Mc.getElementQueue=function(){var e=this.eleCacheQueue=this.eleCacheQueue||new Tt(function(e,t){return t.reqs-e.reqs});return e},Mc.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},Mc.getElement=function(e,t,n,r,o){var i=this,a=this.renderer,s=a.cy.zoom(),u=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!i.allowEdgeTxrCaching&&e.isEdge()||!i.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Gt(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var l=Math.pow(2,r),c=t.h*l,f=t.w*l,h=a.eleTextBiggerThanMin(e,l);if(!this.isVisible(e,h))return null;var d,p=u.get(e,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(d=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||f>1024)return null;var v=i.getTextureQueue(d),g=v[v.length-2],y=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};g||(g=v[v.length-1]),g||(g=y()),g.width-g.usedWidthr;P--)S=i.getElement(e,t,n,P,Ic.downscale);T()}else{var C;if(!_&&!w&&!x)for(var A=r-1;A>=-4;A--){var k=u.get(e,A);if(k){C=k;break}}if(b(C))return i.queueElement(e,r),C;g.context.translate(g.usedWidth,0),g.context.scale(l,l),this.drawElement(g.context,e,t,h,!1),g.context.scale(1/l,1/l),g.context.translate(-g.usedWidth,0)}return p={x:g.usedWidth,texture:g,level:r,scale:l,width:f,height:c,scaledLabelShown:h},g.usedWidth+=Math.ceil(f+8),g.eleCaches.push(p),u.set(e,r,p),i.checkTextureFullness(g),p},Mc.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},Mc.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?ct(t,e):e.fullnessChecks++},Mc.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;ct(n,e),e.retired=!0;for(var o=e.eleCaches,i=0;i=t)return i.retired=!1,i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,ft(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),ct(r,i),n.push(i),i}},Mc.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),o=this.getKey(e),i=r[o];if(i)i.level=Math.max(i.level,t),i.eles.merge(e),i.reqs++,n.updateItem(i);else{var a={eles:e.spawn().merge(e),level:t,reqs:1,key:o};n.push(a),r[o]=a}},Mc.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),o=[],i=t.lookup,a=0;a<1&&n.size()>0;a++){var s=n.pop(),u=s.key,l=s.eles[0],c=i.hasCache(l,s.level);if(r[u]=null,!c){o.push(s);var f=t.getBoundingBox(l);t.getElement(l,f,e,s.level,Ic.dequeue)}}return o},Mc.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),o=n[r];null!=o&&(1===o.eles.length?(o.reqs=$e,t.updateItem(o),t.pop(),n[r]=null):o.eles.unmerge(e))},Mc.onDequeue=function(e){this.onDequeues.push(e)},Mc.offDequeue=function(e){ct(this.onDequeues,e)},Mc.setupDequeueing=Ac({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var a,s,u=r.layersByLevel,l=Math.pow(2,n),c=u[n]=u[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=u[t],!0},o=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};o(1),o(-1);for(var i=c.length-1;i>=0;i--){var a=c[i];a.invalid&&ct(c,a)}}();var f=function(t){var o=(t=t||{}).after;!function(){if(!a){a=Qt();for(var t=0;t32767||s>32767)return null;if(i*s>16e6)return null;var u=r.makeLayer(a,n);if(null!=o){var f=c.indexOf(o)+1;c.splice(f,0,u)}else(void 0===t.insert||t.insert)&&c.unshift(u);return u};if(r.skipping&&!i)return null;for(var h=null,d=e.length/1,p=!i,v=0;v=d||!un(h.bb,g.boundingBox()))&&!(h=f({insert:!0,after:h})))return null;s||p?r.queueLayer(h,g):r.drawEleInLayer(h,g,n,t),h.eles.push(g),m[n]=h}}return s||(p?null:c)},Dc.getEleLevelForLayerLevel=function(e,t){return e},Dc.drawEleInLayer=function(e,t,n,r){var o=this.renderer,i=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),o.setImgSmoothing(i,!1),o.drawCachedElement(i,t,null,null,n,!0),o.setImgSmoothing(i,!0))},Dc.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,o=0;o0)return!1;if(i.invalid)return!1;r+=i.eles.length}return r===t.length},Dc.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},Dc.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=De(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)}))},Dc.invalidateLayer=function(e){if(this.lastInvalidationTime=De(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];ct(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var o=0;o3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this,s=t._private.rscratch;if((!i||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var u;n&&(u=n,e.translate(-u.x1,-u.y1));var l=i?t.pstyle("opacity").value:1,c=i?t.pstyle("line-opacity").value:1,f=t.pstyle("curve-style").value,h=t.pstyle("line-style").value,d=t.pstyle("width").pfValue,p=t.pstyle("line-cap").value,v=t.pstyle("line-outline-width").value,g=t.pstyle("line-outline-color").value,y=l*c,m=l*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===f?(a.eleStrokeStyle(e,t,n),a.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=d,e.lineCap=p,a.eleStrokeStyle(e,t,n),a.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")},_=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;a.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,x=t.pstyle("ghost-offset-y").pfValue,E=t.pstyle("ghost-opacity").value,O=y*E;e.translate(w,x),b(O),_(O),e.translate(-w,-x)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=d+v,e.lineCap=p,v>0?(a.colorStrokeStyle(e,g[0],g[1],g[2],n),"straight-triangle"===f?a.drawEdgeTrianglePath(t,e,s.allpts):(a.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")):e.lineCap="butt"}();o&&a.drawEdgeUnderlay(e,t),b(),_(),o&&a.drawEdgeOverlay(e,t),a.drawElementText(e,t,null,r),n&&e.translate(u.x1,u.y1)}}},ef=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var o=this,i=o.usePaths(),a=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,u=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==a.edgeType||i?t.lineCap="round":t.lineCap="butt",o.colorStrokeStyle(t,u[0],u[1],u[2],r),o.drawEdgePath(n,t,a.allpts,"solid")}}}};Jc.drawEdgeOverlay=ef("overlay"),Jc.drawEdgeUnderlay=ef("underlay"),Jc.drawEdgePath=function(e,t,n,r){var i,a=e._private.rscratch,s=t,u=!1,l=this.usePaths(),c=e.pstyle("line-dash-pattern").pfValue,f=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");a.pathCacheKey&&a.pathCacheKey===h?(i=t=a.pathCache,u=!0):(i=t=new Path2D,a.pathCacheKey=h,a.pathCache=i)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(c),s.lineDashOffset=f;break;case"solid":s.setLineDash([])}if(!u&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+35&&void 0!==arguments[5]?arguments[5]:5,a=Math.min(i,r/2,o/2);e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+o-a),e.quadraticCurveTo(t+r,n+o,t+r-a,n+o),e.lineTo(t+a,n+o),e.quadraticCurveTo(t,n+o,t,n+o-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath()}nf.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),o=Math.ceil(Gt(n*r));t=Math.pow(2,o)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],a=this;if(null==r){if(i&&!a.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var u=a.getLabelJustification(t);e.textAlign=u,e.textBaseline="bottom"}else{var l=t.element()._private.rscratch.badLine,c=t.pstyle("label"),f=t.pstyle("source-label"),h=t.pstyle("target-label");if(l||(!c||!c.value)&&(!f||!f.value)&&(!h||!h.value))return;e.textAlign="center",e.textBaseline="bottom"}var d,p=!n;n&&(d=n,e.translate(-d.x1,-d.y1)),null==o?(a.drawText(e,t,null,p,i),t.isEdge()&&(a.drawText(e,t,"source",p,i),a.drawText(e,t,"target",p,i))):a.drawText(e,t,o,p,i),n&&e.translate(d.x1,d.y1)},nf.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue+"px",i=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,u=t.pstyle("text-outline-opacity").value*s,l=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+a+" "+o+" "+i,e.lineJoin="round",this.colorFillStyle(e,l[0],l[1],l[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],u)},nf.getTextAngle=function(e,t){var n,r=e._private.rscratch,o=t?t+"-":"",i=e.pstyle(o+"text-rotation");if("autorotate"===i.strValue){var a=ht(r,"labelAngle",t);n=e.isEdge()?a:0}else n="none"===i.strValue?0:i.pfValue;return n},nf.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=t._private.rscratch,a=o?t.effectiveOpacity():1;if(!o||0!==a&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,u,l=ht(i,"labelX",n),c=ht(i,"labelY",n),f=this.getLabelText(t,n);if(null!=f&&""!==f&&!isNaN(l)&&!isNaN(c)){this.setupTextStyle(e,t,o);var h,d=n?n+"-":"",p=ht(i,"labelWidth",n),v=ht(i,"labelHeight",n),g=t.pstyle(d+"text-margin-x").pfValue,y=t.pstyle(d+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,_=t.pstyle("text-valign").value;switch(m&&(b="center",_="center"),l+=g,c+=y,0!==(h=r?this.getTextAngle(t,n):0)&&(s=l,u=c,e.translate(s,u),e.rotate(h),l=0,c=0),_){case"top":break;case"center":c+=v/2;break;case"bottom":c+=v}var w=t.pstyle("text-background-opacity").value,x=t.pstyle("text-border-opacity").value,E=t.pstyle("text-border-width").pfValue,O=t.pstyle("text-background-padding").pfValue,S=t.pstyle("text-background-shape").strValue,T="round-rectangle"===S||"roundrectangle"===S,P="circle"===S;if(w>0||E>0&&x>0){var C=e.fillStyle,A=e.strokeStyle,k=e.lineWidth,I=t.pstyle("text-background-color").value,R=t.pstyle("text-border-color").value,j=t.pstyle("text-border-style").value,M=w>0,N=E>0&&x>0,D=l-O;switch(b){case"left":D-=p;break;case"center":D-=p/2}var L=c-v-O,B=p+2*O,F=v+2*O;if(M&&(e.fillStyle="rgba(".concat(I[0],",").concat(I[1],",").concat(I[2],",").concat(w*a,")")),N&&(e.strokeStyle="rgba(".concat(R[0],",").concat(R[1],",").concat(R[2],",").concat(x*a,")"),e.lineWidth=E,e.setLineDash))switch(j){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=E/4,e.setLineDash([]);break;default:e.setLineDash([])}if(T?(e.beginPath(),rf(e,D,L,B,F,2)):P?(e.beginPath(),function(e,t,n,r,o){var i=Math.min(r,o)/2,a=t+r/2,s=n+o/2;e.beginPath(),e.arc(a,s,i,0,2*Math.PI),e.closePath()}(e,D,L,B,F)):(e.beginPath(),e.rect(D,L,B,F)),M&&e.fill(),N&&e.stroke(),N&&"double"===j){var U=E/2;e.beginPath(),T?rf(e,D+U,L+U,B-2*U,F-2*U,2):e.rect(D+U,L+U,B-2*U,F-2*U),e.stroke()}e.fillStyle=C,e.strokeStyle=A,e.lineWidth=k,e.setLineDash&&e.setLineDash([])}var z=2*t.pstyle("text-outline-width").pfValue;if(z>0&&(e.lineWidth=z),"wrap"===t.pstyle("text-wrap").value){var V=ht(i,"labelWrapCachedLines",n),W=ht(i,"labelLineHeight",n),G=p/2,H=this.getLabelJustification(t);switch("auto"===H||("left"===b?"left"===H?l+=-p:"center"===H&&(l+=-G):"center"===b?"left"===H?l+=-G:"right"===H&&(l+=G):"right"===b&&("center"===H?l+=G:"right"===H&&(l+=p))),_){case"top":case"center":case"bottom":c-=(V.length-1)*W}for(var Y=0;Y0&&e.strokeText(V[Y],l,c),e.fillText(V[Y],l,c),c+=W}else z>0&&e.strokeText(f,l,c),e.fillText(f,l,c);0!==h&&(e.rotate(-h),e.translate(-s,-u))}}};var of={drawNode:function(e,t,n){var r,o,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],u=this,l=t._private,c=l.rscratch,f=t.position();if(Q(f.x)&&Q(f.y)&&(!s||t.visible())){var h,d,p=s?t.effectiveOpacity():1,v=u.usePaths(),g=!1,y=t.padding();r=t.width()+2*y,o=t.height()+2*y,n&&(d=n,e.translate(-d.x1,-d.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),_=new Array(m.length),w=0,x=0;x0&&void 0!==arguments[0]?arguments[0]:P;u.eleFillStyle(e,t,n)},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N;u.colorStrokeStyle(e,C[0],C[1],C[2],t)},G=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;u.colorStrokeStyle(e,L[0],L[1],L[2],t)},H=function(e,t,n,r){var o,i=u.nodePathCache=u.nodePathCache||[],a=Ye("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+z),s=i[a],l=!1;return null!=s?(o=s,l=!0,c.pathCache=o):(o=new Path2D,i[a]=c.pathCache=o),{path:o,cacheHit:l}},Y=t.pstyle("shape").strValue,q=t.pstyle("shape-polygon-points").pfValue;if(v){e.translate(f.x,f.y);var X=H(r,o,Y,q);h=X.path,g=X.cacheHit}var K=function(){if(!g){var n=f;v&&(n={x:0,y:0}),u.nodeShapes[u.getNodeShape(t)].draw(h||e,n.x,n.y,r,o,z,c)}v?e.fill(h):e.fill()},Z=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=l.backgrounding,i=0,a=0;a<_.length;a++){var s=t.cy().style().getIndexedStyle(t,"background-image-containment","value",a);r&&"over"===s||!r&&"inside"===s?i++:b[a]&&_[a].complete&&!_[a].error&&(i++,u.drawInscribedImage(e,_[a],t,a,n))}l.backgrounding=!(i===w),o!==l.backgrounding&&t.updateStyle(!1)},$=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;u.hasPie(t)&&(u.drawPie(e,t,i),n&&(v||u.nodeShapes[u.getNodeShape(t)].draw(e,f.x,f.y,r,o,z,c)))},J=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;u.hasStripe(t)&&(e.save(),v?e.clip(c.pathCache):(u.nodeShapes[u.getNodeShape(t)].draw(e,f.x,f.y,r,o,z,c),e.clip()),u.drawStripe(e,t,i),e.restore(),n&&(v||u.nodeShapes[u.getNodeShape(t)].draw(e,f.x,f.y,r,o,z,c)))},ee=function(){var t=(S>0?S:-S)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:p),n=S>0?0:255;0!==S&&(u.colorFillStyle(e,n,n,n,t),v?e.fill(h):e.fill())},te=function(){if(T>0){if(e.lineWidth=T,e.lineCap=I,e.lineJoin=k,e.setLineDash)switch(A){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(j),e.lineDashOffset=M;break;case"solid":case"double":e.setLineDash([])}if("center"!==R){if(e.save(),e.lineWidth*=2,"inside"===R)v?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-T,-o/2-T,r+2*T,o+2*T),t.addPath(h),e.clip(t,"evenodd")}v?e.stroke(h):e.stroke(),e.restore()}else v?e.stroke(h):e.stroke();if("double"===A){e.lineWidth=T/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",v?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},ne=function(){if(D>0){if(e.lineWidth=D,e.lineCap="butt",e.setLineDash)switch(B){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=f;v&&(n={x:0,y:0});var i=u.getNodeShape(t),a=T;"inside"===R&&(a=0),"outside"===R&&(a*=2);var s,l=(r+a+(D+U))/r,c=(o+a+(D+U))/o,h=r*l,d=o*c,p=u.nodeShapes[i].points;if(v&&(s=H(h,d,i,p).path),"ellipse"===i)u.drawEllipsePath(s||e,n.x,n.y,h,d);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(i)){var g=0,y=0,m=0;"round-diamond"===i?g=1.4*(a+U+D):"round-heptagon"===i?(g=1.075*(a+U+D),m=-(a/2+U+D)/35):"round-hexagon"===i?g=1.12*(a+U+D):"round-pentagon"===i?(g=1.13*(a+U+D),m=-(a/2+U+D)/15):"round-tag"===i?(g=1.12*(a+U+D),y=.07*(a/2+D+U)):"round-triangle"===i&&(g=(a+U+D)*(Math.PI/2),m=-(a+U/2+D)/Math.PI),0!==g&&(h=r*(l=(r+g)/r),["round-hexagon","round-tag"].includes(i)||(d=o*(c=(o+g)/o)));for(var b=h/2,_=d/2,w=(z="auto"===z?kn(h,d):z)+(a+D+U)/2,x=new Array(p.length/2),E=new Array(p.length/2),O=0;O0){if(r=r||n.position(),null==o||null==i){var f=n.padding();o=n.width()+2*f,i=n.height()+2*f}this.colorFillStyle(t,u[0],u[1],u[2],s),this.nodeShapes[l].draw(t,r.x,r.y,o+2*a,i+2*a,c),t.fill()}}}};of.drawNodeOverlay=af("overlay"),of.drawNodeUnderlay=af("underlay"),of.hasPie=function(e){return(e=e[0])._private.hasPie},of.hasStripe=function(e){return(e=e[0])._private.hasStripe},of.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var o,i=t.cy().style(),a=t.pstyle("pie-size"),s=t.pstyle("pie-hole"),u=t.pstyle("pie-start-angle").pfValue,l=r.x,c=r.y,f=t.width(),h=t.height(),d=Math.min(f,h)/2,p=0;if(this.usePaths()&&(l=0,c=0),"%"===a.units?d*=a.pfValue:void 0!==a.pfValue&&(d=a.pfValue/2),"%"===s.units?o=d*s.pfValue:void 0!==s.pfValue&&(o=s.pfValue/2),!(o>=d))for(var v=1;v<=i.pieBackgroundN;v++){var g=t.pstyle("pie-"+v+"-background-size").value,y=t.pstyle("pie-"+v+"-background-color").value,m=t.pstyle("pie-"+v+"-background-opacity").value*n,b=g/100;b+p>1&&(b=1-p);var _=1.5*Math.PI+2*Math.PI*p,w=(_+=u)+2*Math.PI*b;0===g||p>=1||p+b>1||(0===o?(e.beginPath(),e.moveTo(l,c),e.arc(l,c,d,_,w),e.closePath()):(e.beginPath(),e.arc(l,c,d,_,w),e.arc(l,c,o,w,_,!0),e.closePath()),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),p+=b)}},of.drawStripe=function(e,t,n,r){t=t[0],r=r||t.position();var o=t.cy().style(),i=r.x,a=r.y,s=t.width(),u=t.height(),l=0,c=this.usePaths();e.save();var f=t.pstyle("stripe-direction").value,h=t.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":e.rotate(-Math.PI/2)}var d=s,p=u;"%"===h.units?(d*=h.pfValue,p*=h.pfValue):void 0!==h.pfValue&&(d=h.pfValue,p=h.pfValue),c&&(i=0,a=0),a-=d/2,i-=p/2;for(var v=1;v<=o.stripeBackgroundN;v++){var g=t.pstyle("stripe-"+v+"-background-size").value,y=t.pstyle("stripe-"+v+"-background-color").value,m=t.pstyle("stripe-"+v+"-background-opacity").value*n,b=g/100;b+l>1&&(b=1-l),0===g||l>=1||l+b>1||(e.beginPath(),e.rect(i,a+p*l,d,p*b),e.closePath(),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),l+=b)}e.restore()};var sf,uf={};function lf(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(r));return r}function cf(e,t,n){void 0===n&&(n=t);var r=e.makeOffscreenCanvas(t,n),o=r.context=r.getContext("2d");return r.clear=function(){return o.clearRect(0,0,r.width,r.height)},r.clear(),r}function ff(e){var t=e.pixelRatio,n=e.cy.zoom(),r=e.cy.pan();return{zoom:n*t,pan:{x:r.x*t,y:r.y*t}}}function hf(e){return"solid"===e.pstyle("background-fill").value&&"none"===e.pstyle("background-image").strValue&&(0===e.pstyle("border-width").value||0===e.pstyle("border-opacity").value||"solid"===e.pstyle("border-style").value)}function df(e,t){if(e.length!==t.length)return!1;for(var n=0;n>8&255)/255,n[2]=(e>>16&255)/255,n[3]=(e>>24&255)/255,n}function gf(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function yf(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function mf(e,t,n){switch(t){case e.FLOAT:return new Float32Array(n);case e.INT:return new Int32Array(n)}}function bf(e,t,n,r,o,i){switch(t){case e.FLOAT:return new Float32Array(n.buffer,i*r,o);case e.INT:return new Int32Array(n.buffer,i*r,o)}}function _f(e,t,n,r){var o=u(yf(e,n),3),i=o[0],a=o[1],s=o[2],l=mf(e,a,t*i),c=i*s,f=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,f),e.bufferData(e.ARRAY_BUFFER,t*c,e.DYNAMIC_DRAW),e.enableVertexAttribArray(r),a===e.FLOAT?e.vertexAttribPointer(r,i,a,!1,c,0):a===e.INT&&e.vertexAttribIPointer(r,i,a,c,0),e.vertexAttribDivisor(r,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var h=new Array(t),d=0;dt.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!f&&(c[t.NODE]=!0,c[t.SELECT_BOX]=!0);var m=n.style(),b=n.zoom(),_=void 0!==a?a:b,w=n.pan(),x={x:w.x,y:w.y},E={zoom:b,pan:{x:w.x,y:w.y}},O=t.prevViewport;void 0===O||E.zoom!==O.zoom||E.pan.x!==O.pan.x||E.pan.y!==O.pan.y||v&&!p||(t.motionBlurPxRatio=1),s&&(x=s),_*=u,x.x*=u,x.y*=u;var S=t.getCachedZSortedEles();function T(e,n,r,o,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",t.colorFillStyle(e,255,255,255,t.motionBlurTransparency),e.fillRect(n,r,o,i),e.globalCompositeOperation=a}function P(e,n){var i,u,c,f;t.clearingMotionBlur||e!==l.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]&&e!==l.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]?(i=x,u=_,c=t.canvasWidth,f=t.canvasHeight):(i={x:w.x*d,y:w.y*d},u=b*d,c=t.canvasWidth*d,f=t.canvasHeight*d),e.setTransform(1,0,0,1,0,0),"motionBlur"===n?T(e,0,0,c,f):r||void 0!==n&&!n||e.clearRect(0,0,c,f),o||(e.translate(i.x,i.y),e.scale(u,u)),s&&e.translate(s.x,s.y),a&&e.scale(a,a)}if(f||(t.textureDrawLastFrame=!1),f){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=n.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var C=t.data.bufferContexts[t.TEXTURE_BUFFER];C.setTransform(1,0,0,1,0,0),C.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:C,drawOnlyNodeLayer:!0,forcedPxRatio:u*t.textureMult}),(E=t.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:t.canvasWidth,height:t.canvasHeight}).mpan={x:(0-E.pan.x)/E.zoom,y:(0-E.pan.y)/E.zoom}}c[t.DRAG]=!1,c[t.NODE]=!1;var A=l.contexts[t.NODE],k=t.textureCache.texture;E=t.textureCache.viewport,A.setTransform(1,0,0,1,0,0),h?T(A,0,0,E.width,E.height):A.clearRect(0,0,E.width,E.height);var I=m.core("outside-texture-bg-color").value,R=m.core("outside-texture-bg-opacity").value;t.colorFillStyle(A,I[0],I[1],I[2],R),A.fillRect(0,0,E.width,E.height),b=n.zoom(),P(A,!1),A.clearRect(E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u),A.drawImage(k,E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u)}else t.textureOnViewport&&!r&&(t.textureCache=null);var j=n.extent(),M=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),N=t.hideEdgesOnViewport&&M,D=[];if(D[t.NODE]=!c[t.NODE]&&h&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,D[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),D[t.DRAG]=!c[t.DRAG]&&h&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,D[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),c[t.NODE]||o||i||D[t.NODE]){var L=h&&!D[t.NODE]&&1!==d;P(A=r||(L?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:l.contexts[t.NODE]),h&&!L?"motionBlur":void 0),N?t.drawCachedNodes(A,S.nondrag,u,j):t.drawLayeredElements(A,S.nondrag,u,j),t.debug&&t.drawDebugPoints(A,S.nondrag),o||h||(c[t.NODE]=!1)}if(!i&&(c[t.DRAG]||o||D[t.DRAG])&&(L=h&&!D[t.DRAG]&&1!==d,P(A=r||(L?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:l.contexts[t.DRAG]),h&&!L?"motionBlur":void 0),N?t.drawCachedNodes(A,S.drag,u,j):t.drawCachedElements(A,S.drag,u,j),t.debug&&t.drawDebugPoints(A,S.drag),o||h||(c[t.DRAG]=!1)),this.drawSelectionRectangle(e,P),h&&1!==d){var B=l.contexts[t.NODE],F=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],U=l.contexts[t.DRAG],z=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],V=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!y?e.clearRect(0,0,t.canvasWidth,t.canvasHeight):T(e,0,0,t.canvasWidth,t.canvasHeight);var o=d;e.drawImage(n,0,0,t.canvasWidth*o,t.canvasHeight*o,0,0,t.canvasWidth,t.canvasHeight)};(c[t.NODE]||D[t.NODE])&&(V(B,F,D[t.NODE]),c[t.NODE]=!1),(c[t.DRAG]||D[t.DRAG])&&(V(U,z,D[t.DRAG]),c[t.DRAG]=!1)}t.prevViewport=E,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),h&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!f,t.mbFrames=0,c[t.NODE]=!0,c[t.DRAG]=!0,t.redraw()},100)),r||n.emit("render")},uf.drawSelectionRectangle=function(e,t){var n=this,r=n.cy,o=n.data,i=r.style(),a=e.drawOnlyNodeLayer,s=e.drawAllLayers,u=o.canvasNeedsRedraw,l=e.forcedContext;if(n.showFps||!a&&u[n.SELECT_BOX]&&!s){var c=l||o.contexts[n.SELECT_BOX];if(t(c),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)){var f=n.cy.zoom(),h=i.core("selection-box-border-width").value/f;c.lineWidth=h,c.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",c.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),h>0&&(c.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",c.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(o.bgActivePosistion&&!n.hoverData.selecting){f=n.cy.zoom();var d=o.bgActivePosistion;c.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",c.beginPath(),c.arc(d.x,d.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),c.fill()}var p=n.lastRedrawTime;if(n.showFps&&p){p=Math.round(p);var v=Math.round(1e3/p),g="1 frame = "+p+" ms = "+v+" fps";if(c.setTransform(1,0,0,1,0,0),c.fillStyle="rgba(255, 0, 0, 0.75)",c.strokeStyle="rgba(255, 0, 0, 0.75)",c.font="30px Arial",!sf){var y=c.measureText(g);sf=y.actualBoundingBoxAscent}c.fillText(g,0,sf),c.strokeRect(0,sf+10,250,20),c.fillRect(0,sf+10,250*Math.min(v/60,1),20)}s||(u[n.SELECT_BOX]=!1)}};var wf="undefined"!=typeof Float32Array?Float32Array:Array;function xf(){var e=new wf(9);return wf!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function Ef(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Of(e,t,n){var r=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=n[0],d=n[1];return e[0]=r,e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=u,e[6]=h*r+d*a+l,e[7]=h*o+d*s+c,e[8]=h*i+d*u+f,e}function Sf(e,t,n){var r=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=Math.sin(n),d=Math.cos(n);return e[0]=d*r+h*a,e[1]=d*o+h*s,e[2]=d*i+h*u,e[3]=d*a-h*r,e[4]=d*s-h*o,e[5]=d*u-h*i,e[6]=l,e[7]=c,e[8]=f,e}function Tf(e,t,n){var r=n[0],o=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Pf=function(){return r(function e(t,r,o,i){n(this,e),this.debugID=Math.floor(1e4*Math.random()),this.r=t,this.texSize=r,this.texRows=o,this.texHeight=Math.floor(r/o),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(t,r,r),this.scratch=i(t,r,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(e){var t=e.w,n=e.h,r=this.texHeight,o=this.texSize,i=r/n,a=t*i,s=n*i;return a>o&&(a=t*(i=o/t),s=n*i),{scale:i,texW:a,texH:s}}},{key:"draw",value:function(e,t,n){var r=this;if(this.locked)throw new Error("can't draw, atlas is locked");var o=this.texSize,i=this.texRows,a=this.texHeight,s=this.getScale(t),u=s.scale,l=s.texW,c=s.texH,f=function(e,r){if(n&&r){var o=r.context,i=e.x,s=e.row,l=i,c=a*s;o.save(),o.translate(l,c),o.scale(u,u),n(o,t),o.restore()}},h=[null,null],d=function(){f(r.freePointer,r.canvas),h[0]={x:r.freePointer.x,y:r.freePointer.row*a,w:l,h:c},h[1]={x:r.freePointer.x+l,y:r.freePointer.row*a,w:0,h:c},r.freePointer.x+=l,r.freePointer.x==o&&(r.freePointer.x=0,r.freePointer.row++)},p=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+l<=o)d();else{if(this.freePointer.row>=i-1)return!1;this.freePointer.x===o?(p(),d()):this.enableWrapping?function(){var e=r.scratch,t=r.canvas;e.clear(),f({x:0,row:0},e);var n=o-r.freePointer.x,i=l-n,s=a,u=r.freePointer.x,d=r.freePointer.row*a,p=n;t.context.drawImage(e,0,0,p,s,u,d,p,s),h[0]={x:u,y:d,w:p,h:c};var v=n,g=(r.freePointer.row+1)*a,y=i;t&&t.context.drawImage(e,v,0,y,s,0,g,y,s),h[1]={x:0,y:g,w:y,h:c},r.freePointer.x=i,r.freePointer.row++}():(p(),d())}return this.keyToLocation.set(e,h),this.needsBuffer=!0,h}},{key:"getOffsets",value:function(e){return this.keyToLocation.get(e)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(e){if(this.locked)return!1;var t=this.texSize,n=this.texRows,r=this.getScale(e).texW;return!(this.freePointer.x+r>t)||this.freePointer.row1&&void 0!==arguments[1]?arguments[1]:{},i=r.forceRedraw,a=void 0!==i&&i,s=r.filterEle,u=void 0===s?function(){return!0}:s,l=r.filterType,c=void 0===l?function(){return!0}:l,f=!1,h=!1,d=o(e);try{for(d.s();!(t=d.n()).done;){var p=t.value;if(u(p)){var v,g=o(this.renderTypes.values());try{var y=function(){var e=v.value,t=e.type;if(c(t)){var r=n.collections.get(e.collection),o=e.getKey(p),i=Array.isArray(o)?o:[o];if(a)i.forEach(function(e){return r.markKeyForGC(e)}),h=!0;else{var s=e.getID?e.getID(p):p.id(),u=n._key(t,s),l=n.typeAndIdToKey.get(u);void 0===l||df(i,l)||(f=!0,n.typeAndIdToKey.delete(u),l.forEach(function(e){return r.markKeyForGC(e)}))}}};for(g.s();!(v=g.n()).done;)y()}catch(e){g.e(e)}finally{g.f()}}}}catch(e){d.e(e)}finally{d.f()}return h&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var e,t=o(this.collections.values());try{for(t.s();!(e=t.n()).done;)e.value.gc()}catch(e){t.e(e)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(e,t,n,r){var o=this.renderTypes.get(t),i=this.collections.get(o.collection),a=!1,s=i.draw(r,n,function(t){o.drawClipped?(t.save(),t.beginPath(),t.rect(0,0,n.w,n.h),t.clip(),o.drawElement(t,e,n,!0,!0),t.restore()):o.drawElement(t,e,n,!0,!0),a=!0});if(a){var u=o.getID?o.getID(e):e.id(),l=this._key(t,u);this.typeAndIdToKey.has(l)?this.typeAndIdToKey.get(l).push(r):this.typeAndIdToKey.set(l,[r])}return s}},{key:"getAtlasInfo",value:function(e,t){var n=this,r=this.renderTypes.get(t),o=r.getKey(e);return(Array.isArray(o)?o:[o]).map(function(o){var i=r.getBoundingBox(e,o),a=n.getOrCreateAtlas(e,t,i,o),s=u(a.getOffsets(o),2),l=s[0];return{atlas:a,tex:l,tex1:l,tex2:s[1],bb:i}})}},{key:"getDebugInfo",value:function(){var e,t=[],n=o(this.collections);try{for(n.s();!(e=n.n()).done;){var r=u(e.value,2),i=r[0],a=r[1].getCounts(),s=a.keyCount,l=a.atlasCount;t.push({type:i,keyCount:s,atlasCount:l})}}catch(e){n.e(e)}finally{n.f()}return t}}])}(),kf=function(){return r(function e(t){n(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)}},{key:"getAtlasIndexForBatch",value:function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t}}])}(),If={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Rf=function(){return r(function e(t,r,o){n(this,e),this.r=t,this.gl=r,this.maxInstances=o.webglBatchSize,this.atlasSize=o.webglTexSize,this.bgColor=o.bgColor,this.debug=o.webglDebug,this.batchDebugInfo=[],o.enableWrapping=!0,o.createTextureCanvas=cf,this.atlasManager=new Af(t,o),this.batchManager=new kf(o),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(If.SCREEN),this.pickingProgram=this._createShaderProgram(If.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(e,t){this.atlasManager.addAtlasCollection(e,t)}},{key:"addTextureAtlasRenderType",value:function(e,t){this.atlasManager.addRenderType(e,t)}},{key:"addSimpleShapeRenderType",value:function(e,t){this.simpleShapeOptions.set(e,t)}},{key:"invalidate",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,n=this.atlasManager;return t?n.invalidate(e,{filterType:function(e){return e===t},forceRedraw:!0}):n.invalidate(e)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(e){var t=this.gl,n="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),r=this.batchManager.getIndexArray(),o="#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(r.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(r.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(e.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "),i=function(e,t,n){var r=lf(e,e.VERTEX_SHADER,t),o=lf(e,e.FRAGMENT_SHADER,n),i=e.createProgram();if(e.attachShader(i,r),e.attachShader(i,o),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))throw new Error("Could not initialize shaders");return i}(t,n,o);i.aPosition=t.getAttribLocation(i,"aPosition"),i.aIndex=t.getAttribLocation(i,"aIndex"),i.aVertType=t.getAttribLocation(i,"aVertType"),i.aTransform=t.getAttribLocation(i,"aTransform"),i.aAtlasId=t.getAttribLocation(i,"aAtlasId"),i.aTex=t.getAttribLocation(i,"aTex"),i.aPointAPointB=t.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=t.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=t.getAttribLocation(i,"aLineWidth"),i.aColor=t.getAttribLocation(i,"aColor"),i.aCornerRadius=t.getAttribLocation(i,"aCornerRadius"),i.aBorderColor=t.getAttribLocation(i,"aBorderColor"),i.uPanZoomMatrix=t.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=t.getUniformLocation(i,"uAtlasSize"),i.uBGColor=t.getUniformLocation(i,"uBGColor"),i.uZoom=t.getUniformLocation(i,"uZoom"),i.uTextures=[];for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:If.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(e,t){return!!e.visible()&&(!t||!t.isVisible||t.isVisible(e))}},{key:"drawTexture",value:function(e,t,n){var r=this.atlasManager,i=this.batchManager,a=r.getRenderTypeOpts(n);if(this._isVisible(e,a)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var s=a.getTexPickingMode(e);if(1===s)return;if(2==s)return void this.drawPickingRectangle(e,t,n)}var l,c=o(r.getAtlasInfo(e,n));try{for(c.s();!(l=c.n()).done;){var f=l.value,h=f.atlas,d=f.tex1,p=f.tex2;i.canAddToCurrentBatch(h)||this.endBatch();for(var v=i.getAtlasIndexForBatch(h),g=0,y=[[d,!0],[p,!1]];g=this.maxInstances&&this.endBatch()}}}}catch(e){c.e(e)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=0;if(n.shapeProps&&n.shapeProps.padding&&(i=e.pstyle(n.shapeProps.padding).pfValue),r){var a=r.bb,s=r.tex1,u=r.tex2,l=s.w/(s.w+u.w);o||(l=1-l);var c=this._getAdjustedBB(a,i,o,l);this._applyTransformMatrix(t,c,n,e)}else{var f=n.getBoundingBox(e),h=this._getAdjustedBB(f,i,!0,1);this._applyTransformMatrix(t,h,n,e)}}},{key:"_applyTransformMatrix",value:function(e,t,n,r){var o,i;Ef(e);var a=n.getRotation?n.getRotation(r):0;if(0!==a){var s=n.getRotationPoint(r);Of(e,e,[s.x,s.y]),Sf(e,e,a);var u=n.getRotationOffset(r);o=u.x+(t.xOffset||0),i=u.y+(t.yOffset||0)}else o=t.x1,i=t.y1;Of(e,e,[o,i]),Tf(e,e,[t.w,t.h])}},{key:"_getAdjustedBB",value:function(e,t,n,r){var o=e.x1,i=e.y1,a=e.w,s=e.h;t&&(o-=t,i-=t,a+=2*t,s+=2*t);var u=0,l=a*r;return n&&r<1?a=l:!n&&r<1&&(o+=u=a-l,a=l),{x1:o,y1:i,w:a,h:s,xOffset:u,yOffset:e.yOffset}}},{key:"drawPickingRectangle",value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=4,vf(t,this.indexBuffer.getView(o)),pf([0,0,0],1,this.colorBuffer.getView(o));var i=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,i,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var o=r.shapeProps,i=this._getVertTypeForShape(e,o.shape);if(void 0===i||r.isSimple&&!r.isSimple(e))this.drawTexture(e,t,n);else{var a=this.instanceCount;if(this.vertTypeBuffer.getView(a)[0]=i,5===i||6===i){var s=r.getBoundingBox(e),u=this._getCornerRadius(e,o.radius,s),l=this.cornerRadiusBuffer.getView(a);l[0]=u,l[1]=u,l[2]=u,l[3]=u,6===i&&(l[0]=0,l[2]=0)}vf(t,this.indexBuffer.getView(a)),pf(e.pstyle(o.color).value,e.pstyle(o.opacity).value,this.colorBuffer.getView(a));var c=this.lineWidthBuffer.getView(a);if(c[0]=0,c[1]=0,o.border){var f=e.pstyle("border-width").value;if(f>0){pf(e.pstyle("border-color").value,e.pstyle("border-opacity").value,this.borderColorBuffer.getView(a));var h=e.pstyle("border-position").value;if("inside"===h)c[0]=0,c[1]=-f;else if("outside"===h)c[0]=f,c[1]=0;else{var d=f/2;c[0]=d,c[1]=-d}}}var p=this.transformBuffer.getMatrixView(a);this.setTransformMatrix(e,p,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"_getVertTypeForShape",value:function(e,t){switch(e.pstyle(t).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(e,t,n){var r=n.w,o=n.h;if("auto"===e.pstyle(t).value)return An(r,o);var i=e.pstyle(t).pfValue,a=r/2,s=o/2;return Math.min(i,s,a)}},{key:"drawEdgeArrow",value:function(e,t,n){if(e.visible()){var r,o,i,a=e._private.rscratch;if(!("source"===n?(r=a.arrowStartX,o=a.arrowStartY,i=a.srcArrowAngle):(r=a.arrowEndX,o=a.arrowEndY,i=a.tgtArrowAngle),isNaN(r)||null==r||isNaN(o)||null==o||isNaN(i)||null==i||"none"===e.pstyle(n+"-arrow-shape").value)){var s=e.pstyle(n+"-arrow-color").value,u=e.pstyle("opacity").value*e.pstyle("line-opacity").value,l=e.pstyle("width").pfValue,c=e.pstyle("arrow-scale").value,f=this.r.getArrowWidth(l,c),h=this.instanceCount,d=this.transformBuffer.getMatrixView(h);Ef(d),Of(d,d,[r,o]),Tf(d,d,[f,f]),Sf(d,d,i),this.vertTypeBuffer.getView(h)[0]=3,vf(t,this.indexBuffer.getView(h)),pf(s,u,this.colorBuffer.getView(h)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle("opacity").value,o=e.pstyle("line-opacity").value,i=e.pstyle("width").pfValue,a=e.pstyle("line-color").value,s=r*o;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==n.length){var u=this.instanceCount;this.vertTypeBuffer.getView(u)[0]=1,vf(t,this.indexBuffer.getView(u)),pf(a,s,this.colorBuffer.getView(u)),this.lineWidthBuffer.getView(u)[0]=i;var l=this.pointAPointBBuffer.getView(u);l[0]=n[0],l[1]=n[1],l[2]=n[2],l[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var c=0;c=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(e){var t=e._private.rscratch;return!t.badLine&&null!=t.allpts&&!isNaN(t.allpts[0])}},{key:"_getEdgePoints",value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(4==n.length)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:"_getNumSegments",value:function(e){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(e,t){if(4==e.length)return e;for(var n=Array(2*(t+1)),r=0;r<=t;r++)if(0==r)n[0]=e[0],n[1]=e[1];else if(r==t)n[2*r]=e[e.length-2],n[2*r+1]=e[e.length-1];else{var o=r/t;this._setCurvePoint(e,o,n,2*r)}return n}},{key:"_setCurvePoint",value:function(e,t,n,r){if(!(e.length<=2)){for(var o=Array(e.length-2),i=0;i0}},l=function(e){return"yes"===e.pstyle("text-events").strValue?2:1},c=function(e){var t=e.position(),n=t.x,r=t.y,o=e.outerWidth(),i=e.outerHeight();return{w:o,h:i,x1:n-o/2,y1:r-i/2}};n.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:c,isSimple:hf,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:c,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:c,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:l,getKey:Nf(t.getLabelKey,null),getBoundingBox:Df(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:i(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:l,getKey:Nf(t.getSourceLabelKey,"source"),getBoundingBox:Df(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:i("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:l,getKey:Nf(t.getTargetLabelKey,"target"),getBoundingBox:Df(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:i("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a("target-label")});var f=Ie(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&f()}),function(e){var t=e.render;e.render=function(n){n=n||{};var r=e.cy;e.webgl&&(r.zoom()>7.99?(function(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}(e),t.call(e,n)):(function(e){var t=function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}(e),Ff(e,n,If.SCREEN)))};var n=e.matchCanvasSize;e.matchCanvasSize=function(t){n.call(e,t),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0},e.findNearestElements=function(t,n,r,i){return function(e,t,n){var r,i,a,s=function(e,t,n){var r,o,i=ff(e),a=function(e,t,n,r,o){var i=r*n+t.x,a=o*n+t.y;return[i,a=Math.round(e.canvasHeight-a)]}(e,i.pan,i.zoom,t,n),s=u(a,2);r=s[0]-3,o=s[1]-3;var l=e.data.contexts[e.WEBGL];l.bindFramebuffer(l.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(l.viewport(0,0,l.canvas.width,l.canvas.height),Ff(e,null,If.PICKING),e.pickingFrameBuffer.needsDraw=!1);var c=new Uint8Array(144);l.readPixels(r,o,6,6,l.RGBA,l.UNSIGNED_BYTE,c),l.bindFramebuffer(l.FRAMEBUFFER,null);for(var f=new Set,h=0;h<36;h++){var d=gf(c.slice(4*h,4*h+4))-1;d>=0&&f.add(d)}return f}(e,t,n),l=e.getCachedZSortedEles(),c=o(s);try{for(c.s();!(a=c.n()).done;){var f=l[a.value];if(!r&&f.isNode()&&(r=f),!i&&f.isEdge()&&(i=f),r&&i)break}}catch(e){c.e(e)}finally{c.f()}return[r,i].filter(Boolean)}(e,t,n)};var r=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){r.call(e),e.pickingFrameBuffer.needsDraw=!0};var i=e.notify;e.notify=function(t,n){i.call(e,t,n),"viewport"===t||"bounds"===t?e.pickingFrameBuffer.needsDraw=!0:"background"===t&&e.drawing.invalidate(n,{type:"node-body"})}}(n)};var Nf=function(e,t){return function(n){var r=e(n),o=Mf(n,t);return o.length>1?o.map(function(e,t){return"".concat(r,"_").concat(t)}):r}},Df=function(e,t){return function(n,r){var o=e(n);if("string"==typeof r){var i=r.indexOf("_");if(i>0){var a=Number(r.substring(i+1)),s=Mf(n,t),u=o.h/s.length,l=u*a,c=o.y1+l;return{x1:o.x1,w:o.w,y1:c,h:u,yOffset:l}}}return o}};function Lf(e,t){var n=e.canvasWidth,r=e.canvasHeight,o=ff(e),i=o.pan,a=o.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,r),t.translate(i.x,i.y),t.scale(a,a)}function Bf(e,t,n){var r=e.drawing;t+=1,n.isNode()?(r.drawNode(n,t,"node-underlay"),r.drawNode(n,t,"node-body"),r.drawTexture(n,t,"label"),r.drawNode(n,t,"node-overlay")):(r.drawEdgeLine(n,t),r.drawEdgeArrow(n,t,"source"),r.drawEdgeArrow(n,t,"target"),r.drawTexture(n,t,"label"),r.drawTexture(n,t,"edge-source-label"),r.drawTexture(n,t,"edge-target-label"))}function Ff(e,t,n){var r;e.webglDebug&&(r=performance.now());var i=e.drawing,a=0;if(n.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&function(e,t){e.drawSelectionRectangle(t,function(t){return Lf(e,t)})}(e,t),e.data.canvasNeedsRedraw[e.NODE]||n.picking){var s=e.data.contexts[e.WEBGL];n.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var u=function(e){var t=e.canvasWidth,n=e.canvasHeight,r=ff(e),o=r.pan,i=r.zoom,a=xf();Of(a,a,[o.x,o.y]),Tf(a,a,[i,i]);var s=xf();!function(e,t,n){e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1}(s,t,n);var u=xf();return function(e,t,n){var r=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=n[0],d=n[1],p=n[2],v=n[3],g=n[4],y=n[5],m=n[6],b=n[7],_=n[8];e[0]=h*r+d*a+p*l,e[1]=h*o+d*s+p*c,e[2]=h*i+d*u+p*f,e[3]=v*r+g*a+y*l,e[4]=v*o+g*s+y*c,e[5]=v*i+g*u+y*f,e[6]=m*r+b*a+_*l,e[7]=m*o+b*s+_*c,e[8]=m*i+b*u+_*f}(u,s,a),u}(e),l=e.getCachedZSortedEles();if(a=l.length,i.startFrame(u,n),n.screen){for(var c=0;c0&&i>0){h.clearRect(0,0,o,i),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(e.full)h.translate(-n.x1*u,-n.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(n.x1*u,n.y1*u);else{var p=t.pan(),v={x:p.x*u,y:p.y*u};u*=t.zoom(),h.translate(v.x,v.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-v.x,-v.y)}e.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=e.bg,h.rect(0,0,o,i),h.fill())}return f},qf.png=function(e){return Kf(e,this.bufferCanvasImage(e),"image/png")},qf.jpg=function(e){return Kf(e,this.bufferCanvasImage(e),"image/jpeg")};var Zf=Qf,$f=Qf.prototype;function Qf(e){var t=this,n=t.cy.window().document;e.webgl&&($f.CANVAS_LAYERS=t.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),t.data={canvases:new Array($f.CANVAS_LAYERS),contexts:new Array($f.CANVAS_LAYERS),canvasNeedsRedraw:new Array($f.CANVAS_LAYERS),bufferCanvases:new Array($f.BUFFER_COUNT),bufferContexts:new Array($f.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",o="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=o,i.position="relative",i.zIndex="0",i.overflow="hidden";var a=e.cy.container();a.appendChild(t.data.canvasContainer),a.style[r]=o;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};p&&p.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var u=0;u<$f.CANVAS_LAYERS;u++){var l=t.data.canvases[u]=n.createElement("canvas"),c=$f.CANVAS_TYPES[u];t.data.contexts[u]=l.getContext(c),t.data.contexts[u]||nt("Could not create canvas of type "+c),Object.keys(s).forEach(function(e){l.style[e]=s[e]}),l.style.position="absolute",l.setAttribute("data-id","layer"+u),l.style.zIndex=String($f.CANVAS_LAYERS-u),t.data.canvasContainer.appendChild(l),t.data.canvasNeedsRedraw[u]=!1}for(t.data.topCanvas=t.data.canvases[0],t.data.canvases[$f.NODE].setAttribute("data-id","layer"+$f.NODE+"-node"),t.data.canvases[$f.SELECT_BOX].setAttribute("data-id","layer"+$f.SELECT_BOX+"-selectbox"),t.data.canvases[$f.DRAG].setAttribute("data-id","layer"+$f.DRAG+"-drag"),t.data.canvases[$f.WEBGL]&&t.data.canvases[$f.WEBGL].setAttribute("data-id","layer"+$f.WEBGL+"-webgl"),u=0;u<$f.BUFFER_COUNT;u++)t.data.bufferCanvases[u]=n.createElement("canvas"),t.data.bufferContexts[u]=t.data.bufferCanvases[u].getContext("2d"),t.data.bufferCanvases[u].style.position="absolute",t.data.bufferCanvases[u].setAttribute("data-id","buffer"+u),t.data.bufferCanvases[u].style.zIndex=String(-u-1),t.data.bufferCanvases[u].style.visibility="hidden";t.pathsEnabled=!0;var f=Qt(),h=function(e){return{x:-e.w/2,y:-e.h/2}},d=function(e){return e[0]._private.nodeKey},v=function(e){return e[0]._private.labelStyleKey},g=function(e){return e[0]._private.sourceLabelStyleKey},y=function(e){return e[0]._private.targetLabelStyleKey},m=function(e,n,r,o,i){return t.drawElement(e,n,r,!1,!1,i)},b=function(e,n,r,o,i){return t.drawElementText(e,n,r,o,"main",i)},_=function(e,n,r,o,i){return t.drawElementText(e,n,r,o,"source",i)},w=function(e,n,r,o,i){return t.drawElementText(e,n,r,o,"target",i)},x=function(e){return e.boundingBox(),e[0]._private.bodyBounds},E=function(e){return e.boundingBox(),e[0]._private.labelBounds.main||f},O=function(e){return e.boundingBox(),e[0]._private.labelBounds.source||f},S=function(e){return e.boundingBox(),e[0]._private.labelBounds.target||f},T=function(e,t){return t},P=function(e){return{x:((t=x(e)).x1+t.x2)/2,y:(t.y1+t.y2)/2};var t},C=function(e,t,n){var r=e?e+"-":"";return{x:t.x+n.pstyle(r+"text-margin-x").pfValue,y:t.y+n.pstyle(r+"text-margin-y").pfValue}},A=function(e,t,n){var r=e[0]._private.rscratch;return{x:r[t],y:r[n]}},k=function(e){return C("",A(e,"labelX","labelY"),e)},I=function(e){return C("source",A(e,"sourceLabelX","sourceLabelY"),e)},R=function(e){return C("target",A(e,"targetLabelX","targetLabelY"),e)},j=function(e){return h(x(e))},M=function(e){return h(O(e))},N=function(e){return h(S(e))},D=function(e){var t=E(e),n=h(E(e));if(e.isNode()){switch(e.pstyle("text-halign").value){case"left":n.x=-t.w-(t.leftPad||0);break;case"right":n.x=-(t.rightPad||0)}switch(e.pstyle("text-valign").value){case"top":n.y=-t.h-(t.topPad||0);break;case"bottom":n.y=-(t.botPad||0)}}return n},L=t.data.eleTxrCache=new jc(t,{getKey:d,doesEleInvalidateKey:function(e){var t=e[0]._private;return!(t.oldBackgroundTimestamp===t.backgroundTimestamp)},drawElement:m,getBoundingBox:x,getRotationPoint:P,getRotationOffset:j,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),B=t.data.lblTxrCache=new jc(t,{getKey:v,drawElement:b,getBoundingBox:E,getRotationPoint:k,getRotationOffset:D,isVisible:T}),F=t.data.slbTxrCache=new jc(t,{getKey:g,drawElement:_,getBoundingBox:O,getRotationPoint:I,getRotationOffset:M,isVisible:T}),U=t.data.tlbTxrCache=new jc(t,{getKey:y,drawElement:w,getBoundingBox:S,getRotationPoint:R,getRotationOffset:N,isVisible:T}),z=t.data.lyrTxrCache=new Nc(t);t.onUpdateEleCalcs(function(e,t){L.invalidateElements(t),B.invalidateElements(t),F.invalidateElements(t),U.invalidateElements(t),z.invalidateElements(t);for(var n=0;n{const n=ch({headless:!0,styleEnabled:!1});n.add(e);const r={},o=n.layout({name:"cose-bilkent",animate:!1,spacingFactor:t,quality:"default",tile:!1,randomize:!0,stop:()=>{n.nodes().forEach(e=>{r[e.id()]={...e.position()}})}});return o.run(),{positions:r}})(t,n);this.onmessage({data:r})}onmessage(){}close(){}}},dh=()=>new SharedWorker(new URL(a.p+a.u(574),a.b),{type:void 0,name:"CoseBilkentLayout"});var ph=a(8353),vh=a(8812),gh=a(8362);const yh=100,mh="up",bh="down",_h="left",wh="right",xh={[mh]:"BT",[bh]:"TB",[_h]:"RL",[wh]:"LR"},Eh=1/.38,Oh=e=>{let t=null,n=null,r=null,o=null,i=null,a=null,s=null,u=null;for(const l of e.nodes()){const c=e.node(l);(null===i||c.xs)&&(s=c.x),(null===u||c.y>u)&&(u=c.y);const f=Math.ceil(c.width/2);(null===t||c.x-fr)&&(r=c.x+f),(null===o||c.y+f>o)&&(o=c.y+f)}return{minX:t,minY:n,maxX:r,maxY:o,minCenterX:i,minCenterY:a,maxCenterX:s,maxCenterY:u,width:r-t,height:o-n,xOffset:i-t,yOffset:a-n}},Sh=e=>{const t=new ph.graphlib.Graph;return t.setGraph({}),t.setDefaultEdgeLabel(()=>({})),t.graph().nodesep=75*e,t.graph().ranksep=75*e,t},Th=(e,t,n)=>{const{rank:r}=n.node(e);let o=null,i=null;for(const a of t){const{rank:t}=n.node(a);if(!(a===e||t>=r)){if(t===r-1){o=t,i=a;break}(null===o&&null===i||t>o)&&(o=t,i=a)}}return i},Ph=(e,t)=>{let n=Th(e,t.predecessors(e),t);return null===n&&(n=Th(e,t.successors(e),t)),n},Ch=(e,t,n)=>{e.graph().ranker="tight-tree",e.graph().rankdir=xh[t];const r=ph.layout(e);for(const e of r.nodes()){const t=Ph(e,r);null!==t&&(n[e]=t)}},Ah=(e,t)=>Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)),kh=e=>{const t=[e[0]];let n={p1:e[0],p2:e[1]},r=Ah(n.p1,n.p2);for(let o=2;o{const s=Sh(a),u={},l={x:0,y:0},c=e.length;for(const t of e){const e=n[t.id];l.x+=e?.x||0,l.y+=e?.y||0;const r=(t.size||25)*Eh*a;s.setNode(t.id,{width:r,height:r})}const f=c?[l.x/c,l.y/c]:[0,0],h={};for(const e of r)if(t[e.from]&&t[e.to]&&e.from!==e.to){const t=e.from{const n=[],r=gh.alg.components(e);if(r.length>1)for(const o of r){const r=Sh(t);for(const t of o){const n=e.node(t);r.setNode(t,{width:n.width,height:n.height});const o=e.outEdges(t);if(o)for(const e of o)r.setEdge(e.v,e.w)}n.push(r)}else n.push(e);return n})(s,a);if(d.length>1){d.forEach(e=>Ch(e,o,u));const e=(e=>"up"===e||e===bh)(o),t=(e=>e===bh||e===wh)(o),n=d.filter(e=>1===e.nodeCount()),r=d.filter(e=>1!==e.nodeCount());if("bin"===i){r.sort((e,t)=>t.nodeCount()-e.nodeCount());const o=e?({width:e,height:t,...n})=>({...n,width:e+yh,height:t+yh}):({width:e,height:t,...n})=>({...n,width:t+yh,height:e+yh}),i=r.map(Oh).map(o),a=n.map(Oh).map(o),u=i.concat(a);vh(u,{inPlace:!0});const l=Math.floor(50),c=e?"x":"y",f=e?"y":"x";if(!t){const t=e?"y":"x",n=e?"height":"width",r=u.reduce((e,r)=>null===e?r[t]:Math.min(r[t],e[n]||0),null),o=u.reduce((e,r)=>null===e?r[t]+r[n]:Math.max(r[t]+r[n],e[n]||0),null);u.forEach(e=>{e[t]=r+(o-(e[t]+e[n]))})}const h=(e,t)=>{for(const n of e.nodes()){const r=e.node(n),o=s.node(n);o.x=r.x-t.xOffset+t[c]+l,o.y=r.y-t.yOffset+t[f]+l}};for(let e=0;et.nodeCount()-e.nodeCount():(e,t)=>e.nodeCount()-t.nodeCount());const o=r.map(Oh),i=n.reduce((e,t)=>e+s.node(t.nodes()[0]).width,0),a=n.reduce((e,t)=>Math.max(e,s.node(t.nodes()[0]).width),0),u=n.length>0?i+(n.length-1)*yh:0,l=o.reduce((e,{width:t})=>Math.max(e,t),0),c=Math.max(l,u),f=o.reduce((e,{height:t})=>Math.max(e,t),0),h=Math.max(f,u);let d=0;const p=()=>{for(let t=0;t3&&(o.points=r.points.map(({x:t,y:n})=>({x:t-i.minX+(e?a:d),y:n-i.minY+(e?d:a)})))}d+=(e?i.height:i.width)+yh}},v=()=>{const t=Math.floor(((e?c:h)-u)/2);d+=Math.floor(a/2);let r=t;for(const t of n){const n=t.nodes()[0],o=s.node(n);e?(o.x=r+Math.floor(o.width/2),o.y=d):(o.x=d,o.y=r+Math.floor(o.width/2)),r+=yh+o.width}d=a+yh};t?(p(),v()):(v(),p())}}else Ch(s,o,u);l.x=0,l.y=0;const p={};for(const e of s.nodes()){const t=s.node(e);l.x+=t.x||0,l.y+=t.y||0,p[e]={x:t.x,y:t.y}}const v=c?[l.x/c,l.y/c]:[0,0],g=f[0]-v[0],y=f[1]-v[1];for(const e in p)p[e].x+=g,p[e].y+=y;const m={};for(const e of s.edges()){const t=s.edge(e);if(t.points&&t.points.length>3){const n=kh(t.points);for(const e of n)e.x+=g,e.y+=y;m[`${e.v}-${e.w}`]={points:[...n],from:{x:p[e.v].x,y:p[e.v].y},to:{x:p[e.w].x,y:p[e.w].y}},m[`${e.w}-${e.v}`]={points:n.reverse(),from:{x:p[e.w].x,y:p[e.w].y},to:{x:p[e.v].x,y:p[e.v].y}}}}return{positions:p,parents:u,waypoints:m}})(t,n,r,o,i,a,s);u?setTimeout(()=>{this.onmessage({data:l})},u):this.onmessage({data:l})}onmessage(){}close(){}}},Rh=()=>new SharedWorker(new URL(a.p+a.u(654),a.b),{type:void 0,name:"HierarchicalLayout"});var jh=a(1635);function Mh(){return"undefined"!=typeof process&&process.env?process.env:{}}var Nh=a(9456),Dh=a(2321);function Lh(e,t,n,r){var o,i=[e,t,n,r],a=(0,Dh.Qd)(e)?e.event:e;if(!a||!(0,Dh.Kg)(a))throw new Error("Event missing");var s=(0,Dh.Qd)(e)?null!==(o=e.properties)&&void 0!==o?o:{}:(0,Dh.Qd)(t)?t:{},u={};return(0,Dh.Tn)(n)||(u=null!=n?n:{}),(0,Dh.Qd)(e)&&!(0,Dh.Tn)(t)&&(u=null!=t?t:{}),[a,s,u,i.find(Dh.Tn)]}function Bh(e,t,n,r,o){var i,a,s=null,u=null,l=[e,t,n,r,o],c=l.filter(Dh.Kg);1===c.length?(0,Dh.Kg)(l[1])?(u=l[1],s=null):(u=c[0],s=null):2===c.length&&("string"==typeof l[0]&&(s=l[0]),"string"==typeof l[1]&&(u=l[1]));var f=l.find(Dh.Tn),h=l.filter(Dh.Qd);return 1===h.length?(0,Dh.Qd)(l[2])?(a={},i=l[2]):(0,Dh.Qd)(l[3])?(i={},a=l[3]):(i=h[0],a={}):2===h.length&&(i=h[0],a=h[1]),[s,u,null!=i?i:i={},null!=a?a:a={},f]}var Fh=function(e){return function(){for(var t,n,r,o=[],i=0;i-1?e:e+t}(r,i):-1===(n=(t=a).indexOf("#"))?t:t.slice(0,n);return{path:l,referrer:s,search:i,title:u,url:c}},Zh=function(){var e=document.querySelector("link[rel='canonical']");return qh(location.href,e&&e.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},$h=function(e,t){void 0===t&&(t=Kh(Zh()));var n,r,o,i=e.context;"page"===e.type&&(n=e.properties&&(r=e.properties,o=Object.keys(t),Object.assign.apply(Object,(0,jh.fX)([{}],o.map(function(e){var t;if(r&&Object.prototype.hasOwnProperty.call(r,e))return(t={})[e]=r[e],t}),!1))),e.properties=(0,jh.Cl)((0,jh.Cl)((0,jh.Cl)({},t),e.properties),e.name?{name:e.name}:{})),i.page=(0,jh.Cl)((0,jh.Cl)((0,jh.Cl)({},t),n),i.page)},Qh=a(3172),Jh=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return(0,jh.C6)(t,e),t}(Error),ed="is not a string",td="is not an object";var nd=function(e){var t,n;this.settings=e,this.createMessageId=e.createMessageId,this.onEventMethodCall=null!==(t=e.onEventMethodCall)&&void 0!==t?t:function(){},this.onFinishedEvent=null!==(n=e.onFinishedEvent)&&void 0!==n?n:function(){}},rd=function(){function e(e){this.settings=new nd(e)}return e.prototype.track=function(e,t,n,r){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize((0,jh.Cl)((0,jh.Cl)({},this.baseEvent()),{event:e,type:"track",properties:null!=t?t:{},options:(0,jh.Cl)({},n),integrations:(0,jh.Cl)({},r)}))},e.prototype.page=function(e,t,n,r,o){var i;this.settings.onEventMethodCall({type:"page",options:r});var a={type:"page",properties:(0,jh.Cl)({},n),options:(0,jh.Cl)({},r),integrations:(0,jh.Cl)({},o)};return null!==e&&(a.category=e,a.properties=null!==(i=a.properties)&&void 0!==i?i:{},a.properties.category=e),null!==t&&(a.name=t),this.normalize((0,jh.Cl)((0,jh.Cl)({},this.baseEvent()),a))},e.prototype.screen=function(e,t,n,r,o){this.settings.onEventMethodCall({type:"screen",options:r});var i={type:"screen",properties:(0,jh.Cl)({},n),options:(0,jh.Cl)({},r),integrations:(0,jh.Cl)({},o)};return null!==e&&(i.category=e),null!==t&&(i.name=t),this.normalize((0,jh.Cl)((0,jh.Cl)({},this.baseEvent()),i))},e.prototype.identify=function(e,t,n,r){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize((0,jh.Cl)((0,jh.Cl)({},this.baseEvent()),{type:"identify",userId:e,traits:null!=t?t:{},options:(0,jh.Cl)({},n),integrations:r}))},e.prototype.group=function(e,t,n,r){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize((0,jh.Cl)((0,jh.Cl)({},this.baseEvent()),{type:"group",traits:null!=t?t:{},options:(0,jh.Cl)({},n),integrations:(0,jh.Cl)({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){this.settings.onEventMethodCall({type:"alias",options:n});var o={userId:e,type:"alias",options:(0,jh.Cl)({},n),integrations:(0,jh.Cl)({},r)};return null!==t&&(o.previousId=t),void 0===e?this.normalize((0,jh.Cl)((0,jh.Cl)({},o),this.baseEvent())):this.normalize((0,jh.Cl)((0,jh.Cl)({},this.baseEvent()),o))},e.prototype.baseEvent=function(){return{integrations:{},options:{}}},e.prototype.context=function(e){var t,n=["userId","anonymousId","timestamp","messageId"];delete e.integrations;var r=Object.keys(e),o=null!==(t=e.context)&&void 0!==t?t:{},i={};return r.forEach(function(t){"context"!==t&&(n.includes(t)?(0,Qh.J)(i,t,e[t]):(0,Qh.J)(o,t,e[t]))}),[o,i]},e.prototype.normalize=function(e){var t,n,r,o=Object.keys(null!==(t=e.integrations)&&void 0!==t?t:{}).reduce(function(t,n){var r,o;return(0,jh.Cl)((0,jh.Cl)({},t),((r={})[n]=Boolean(null===(o=e.integrations)||void 0===o?void 0:o[n]),r))},{});e.options=(r=e.options||{},Object.keys(r).filter(function(e){return void 0!==r[e]}).reduce(function(e,t){return e[t]=r[t],e},{}));var i=(0,jh.Cl)((0,jh.Cl)({},o),null===(n=e.options)||void 0===n?void 0:n.integrations),a=e.options?this.context(e.options):[],s=a[0],u=a[1],l=e.options,c=(0,jh.Tt)(e,["options"]),f=(0,jh.Cl)((0,jh.Cl)((0,jh.Cl)((0,jh.Cl)({timestamp:new Date},c),{context:s,integrations:i}),u),{messageId:l.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(f),function(e){!function(e){if(!(0,Dh.t2)(e))throw new Jh("Event","is nil");if("object"!=typeof e)throw new Jh("Event",td)}(e),function(e){if(!(0,Dh.Kg)(e.type))throw new Jh(".type",ed)}(e),function(e){if(!(0,Dh.Kg)(e.messageId))throw new Jh(".messageId",ed)}(e),"track"===e.type&&(function(e){if(!(0,Dh.Kg)(e.event))throw new Jh(".event",ed)}(e),function(e){if(!(0,Dh.Qd)(e.properties))throw new Jh(".properties",td)}(e)),["group","identify"].includes(e.type)&&function(e){if(!(0,Dh.Qd)(e.traits))throw new Jh(".traits",td)}(e)}(f),f},e}(),od=function(e){function t(t){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,Yh.v4)())},onEventMethodCall:function(e){var t=e.options;n.maybeUpdateAnonId(t)},onFinishedEvent:function(e){return n.addIdentity(e),e}})||this;return n.user=t,n}return(0,jh.C6)(t,e),t.prototype.maybeUpdateAnonId=function(e){(null==e?void 0:e.anonymousId)&&this.user.anonymousId(e.anonymousId)},t.prototype.addIdentity=function(e){this.user.id()&&(e.userId=this.user.id()),this.user.anonymousId()&&(e.anonymousId=this.user.anonymousId())},t.prototype.track=function(t,n,r,o,i){var a=e.prototype.track.call(this,t,n,r,o);return $h(a,i),a},t.prototype.page=function(t,n,r,o,i,a){var s=e.prototype.page.call(this,t,n,r,o,i);return $h(s,a),s},t.prototype.screen=function(t,n,r,o,i,a){var s=e.prototype.screen.call(this,t,n,r,o,i);return $h(s,a),s},t.prototype.identify=function(t,n,r,o,i){var a=e.prototype.identify.call(this,t,n,r,o);return $h(a,i),a},t.prototype.group=function(t,n,r,o,i){var a=e.prototype.group.call(this,t,n,r,o);return $h(a,i),a},t.prototype.alias=function(t,n,r,o,i){var a=e.prototype.alias.call(this,t,n,r,o);return $h(a,i),a},t}(rd),id=function(e){return"addMiddleware"in e&&"destination"===e.type},ad=a(5881),sd=a(6115),ud=a(9952),ld=a(4980),cd=function(e){function t(t){var n,r,o,i=e.call(this)||this;return i.criticalTasks=(o=0,{done:function(){return n},run:function(e){var t,i=e();return"object"==typeof(t=i)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1===++o&&(n=new Promise(function(e){return r=e})),i.finally(function(){return 0===--o&&r()})),i}}),i.plugins=[],i.failedInitializations=[],i.flushing=!1,i.queue=t,i.queue.on(sd.g,function(){i.scheduleFlush(0)}),i}return(0,jh.C6)(t,e),t.prototype.register=function(e,t,n){return(0,jh.sH)(this,void 0,void 0,function(){var r,o,i=this;return(0,jh.YH)(this,function(a){switch(a.label){case 0:return this.plugins.push(t),r=function(n){i.failedInitializations.push(t.name),i.emit("initialization_failure",t),console.warn(t.name,n),e.log("warn","Failed to load destination",{plugin:t.name,error:n}),i.plugins=i.plugins.filter(function(e){return e!==t})},"destination"!==t.type||"Segment.io"===t.name?[3,1]:(t.load(e,n).catch(r),[3,4]);case 1:return a.trys.push([1,3,,4]),[4,t.load(e,n)];case 2:return a.sent(),[3,4];case 3:return o=a.sent(),r(o),[3,4];case 4:return[2]}})})},t.prototype.deregister=function(e,t,n){return(0,jh.sH)(this,void 0,void 0,function(){var r;return(0,jh.YH)(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:o.sent(),o.label=2;case 2:return this.plugins=this.plugins.filter(function(e){return e.name!==t.name}),[3,4];case 3:return r=o.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}})})},t.prototype.dispatch=function(e){return(0,jh.sH)(this,void 0,void 0,function(){var t;return(0,jh.YH)(this,function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]})})},t.prototype.subscribeToDelivery=function(e){return(0,jh.sH)(this,void 0,void 0,function(){var t=this;return(0,jh.YH)(this,function(n){return[2,new Promise(function(n){var r=function(o,i){o.isSame(e)&&(t.off("flush",r),n(o))};t.on("flush",r)})]})})},t.prototype.dispatchSingle=function(e){return(0,jh.sH)(this,void 0,void 0,function(){var t=this;return(0,jh.YH)(this,function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch(function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)})]})})},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout(function(){t.flush().then(function(){setTimeout(function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)},0)})},e))},t.prototype.deliver=function(e){return(0,jh.sH)(this,void 0,void 0,function(){var t,n,r,o;return(0,jh.YH)(this,function(i){switch(i.label){case 0:return[4,this.criticalTasks.done()];case 1:i.sent(),t=Date.now(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=i.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=i.sent(),o=r,e.log("error","Failed to deliver",o),this.emit("delivery_failure",e,o),e.stats.increment("delivery_failed"),r;case 5:return[2]}})})},t.prototype.enqueuRetry=function(e,t){return!(e instanceof ud.d&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return(0,jh.sH)(this,void 0,void 0,function(){var e,t;return(0,jh.YH)(this,function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}})})},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t=this.plugins.filter(function(t){var n,r,o;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var i=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach(function(t){void 0!==e[t]&&(i=e[t])}),null!==(o=null!==(r=e[t.name])&&void 0!==r?r:i)&&void 0!==o?o:!1!==("Segment.io"===t.name||e.All)}),n=function(e,t){var n={};return e.forEach(function(e){var r,o=void 0,i=e[t];void 0!==(o="string"!=typeof i?JSON.stringify(i):i)&&(n[o]=(0,jh.fX)((0,jh.fX)([],null!==(r=n[o])&&void 0!==r?r:[],!0),[e],!1))}),n}(t,"type"),r=n.before,o=void 0===r?[]:r,i=n.enrichment,a=void 0===i?[]:i,s=n.destination,u=void 0===s?[]:s,l=n.after;return{before:o,enrichment:a,destinations:u,after:void 0===l?[]:l}},t.prototype.flushOne=function(e){var t,n;return(0,jh.sH)(this,void 0,void 0,function(){var r,o,i,a,s,u,l,c,f,h,d,p,v,g;return(0,jh.YH)(this,function(y){switch(y.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),o=r.before,i=r.enrichment,a=0,s=o,y.label=1;case 1:return a0)return r;if(t.length<=1)return r;for(var o=t.length-2;o>=0;--o)r.push(t.slice(o).join("."));return r}(t),r=0;r0&&(t._metadata={failedInitializations:s}),null!=o&&(o.attempts>1&&(t._metadata=(0,jh.Cl)((0,jh.Cl)({},t._metadata),{retryCount:o.attempts})),o.attempts++);var u=[],l=[];for(var c in r){var f=r[c];"Segment.io"===c&&u.push(c),"bundled"===f.bundlingStatus&&u.push(c),"unbundled"===f.bundlingStatus&&l.push(c)}for(var h=0,d=(null==n?void 0:n.unbundledIntegrations)||[];h0&&!(0,zh.a)()},function(){return(0,jh.sH)(r,void 0,void 0,function(){var r;return(0,jh.YH)(this,function(o){switch(o.label){case 0:return(r=t.pop())?[4,(0,ld.C)(r,e)]:[2];case 1:return o.sent()instanceof Vh.o||n.push(r),[2]}})})})];case 1:return o.sent(),n.map(function(e){return t.pushWithBackoff(e)}),[2,t]}})})}function Jd(e,t,n,r){var o=this;e||setTimeout(function(){return(0,jh.sH)(o,void 0,void 0,function(){var e,o;return(0,jh.YH)(this,function(i){switch(i.label){case 0:return e=!0,[4,Qd(n,t)];case 1:return o=i.sent(),e=!1,t.todo>0&&r(e,o,n,r),[2]}})})},5e3*Math.random())}var ep=a(7947),tp=function(e){return"Segment.io"===e.name};function np(e,t,n){var r,o,i;window.addEventListener("pagehide",function(){u.push.apply(u,Array.from(l)),l.clear()});var a,s=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new sd.M(e.queue.queue.maxAttempts,[]):new ad.x(e.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),l=new Set,c=!1,f=null!==(o=null==t?void 0:t.apiHost)&&void 0!==o?o:ep.a,h=null!==(i=null==t?void 0:t.protocol)&&void 0!==i?i:"https",d="".concat(h,"://").concat(f),p=null==t?void 0:t.deliveryStrategy,v=p&&"strategy"in p&&"batching"===p.strategy?function(e,t){var n,r,o,i,a,s=[],u=!1,l=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,c=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3,f=0;function h(n){var r;if(0!==n.length){var o=null===(r=n[0])||void 0===r?void 0:r.writeKey,i=n.map(function(e){var t=e;return t.sentAt,(0,jh.Tt)(t,["sentAt"])});return(0,Yd.h)("https://".concat(e,"/b"),{credentials:null==t?void 0:t.credentials,keepalive:(null==t?void 0:t.keepalive)||u,headers:Xd(null==t?void 0:t.headers),method:"post",body:JSON.stringify({writeKey:o,batch:i,sentAt:(new Date).toISOString()}),priority:null==t?void 0:t.priority}).then(function(e){var t;if(e.status>=500)throw new Error("Bad response from server: ".concat(e.status));if(429===e.status){var n=null===(t=e.headers)||void 0===t?void 0:t.get("x-ratelimit-reset"),r="string"==typeof n?1e3*parseInt(n):c;throw new qd("Rate limit exceeded: ".concat(e.status),r)}})}}function d(e){var n;return void 0===e&&(e=1),(0,jh.sH)(this,void 0,void 0,function(){var r;return(0,jh.YH)(this,function(o){return s.length?(r=s,s=[],[2,null===(n=h(r))||void 0===n?void 0:n.catch(function(n){var o;Vh.o.system().log("error","Error sending batch",n),e<=(null!==(o=null==t?void 0:t.maxRetries)&&void 0!==o?o:10)&&("RateLimitError"===n.name&&(f=n.retryTimeout),s.push.apply(s,r),s.map(function(t){if("_metadata"in t){var n=t;n._metadata=(0,jh.Cl)((0,jh.Cl)({},n._metadata),{retryCount:e})}}),p(e+1))})]):[2]})})}function p(e){void 0===e&&(e=1),o||(o=setTimeout(function(){o=void 0,d(e).catch(console.error)},f||c),f=0)}return i=function(e){if((u=e)&&s.length){var t=function(e){var t=[],n=0;return e.forEach(function(e){Kd(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]}),t}(s).map(h);Promise.all(t).catch(console.error)}},a=!1,window.addEventListener("pagehide",function(){a||i(a=!0)}),document.addEventListener("visibilitychange",function(){if("hidden"==document.visibilityState){if(a)return;a=!0}else a=!1;i(a)}),{dispatch:function(e,n){return(0,jh.sH)(this,void 0,void 0,function(){var e;return(0,jh.YH)(this,function(r){return s.push(n),e=s.length>=l||function(e){return Kd(e)>=450}(s)||(null==t?void 0:t.keepalive)&&function(e){return Kd(e)>=54}(s),[2,e||u?d():p()]})})}}}(f,p.config):(a=null==p?void 0:p.config,{dispatch:function(e,t){return(0,Yd.h)(e,{credentials:null==a?void 0:a.credentials,keepalive:null==a?void 0:a.keepalive,headers:Xd(null==a?void 0:a.headers),method:"post",body:JSON.stringify(t),priority:null==a?void 0:a.priority}).then(function(e){var t;if(e.status>=500)throw new Error("Bad response from server: ".concat(e.status));if(429===e.status){var n=null===(t=e.headers)||void 0===t?void 0:t.get("x-ratelimit-reset"),r=n?1e3*parseInt(n):5e3;throw new qd("Rate limit exceeded: ".concat(e.status),r)}})}});function g(r){return(0,jh.sH)(this,void 0,void 0,function(){var o,i;return(0,jh.YH)(this,function(a){return(0,zh.a)()?(u.push(r),Jd(c,u,y,Jd),[2,r]):(l.add(r),o=r.event.type.charAt(0),i=(0,Hd.W)(r.event).json(),"track"===r.event.type&&delete i.traits,"alias"===r.event.type&&(i=function(e,t){var n,r,o,i,a=e.user();return t.previousId=null!==(o=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:a.id())&&void 0!==o?o:a.anonymousId(),t.userId=null!==(i=t.userId)&&void 0!==i?i:t.to,delete t.from,delete t.to,t}(e,i)),u.getAttempts(r)>=u.maxAttempts?(l.delete(r),[2,r]):[2,v.dispatch("".concat(d,"/").concat(o),Zd(e,i,t,n,r)).then(function(){return r}).catch(function(e){if(r.log("error","Error sending event",e),"RateLimitError"===e.name){var t=e.retryTimeout;u.pushWithBackoff(r,t)}else u.pushWithBackoff(r);return Jd(c,u,y,Jd),r}).finally(function(){l.delete(r)})])})})}var y={metadata:{writeKey:s,apiHost:f,protocol:h},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:g,identify:g,page:g,alias:g,group:g,screen:g};return u.todo&&Jd(c,u,y,Jd),y}var rp="This is being deprecated and will be not be available in future releases of Analytics JS",op=(0,Id.m)(),ip=null==op?void 0:op.analytics,ap=function(){function e(e,t){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var e;return null===(e=t.plugins.find(tp))||void 0===e?void 0:e.metadata},this.writeKey=e.writeKey,this.cdnSettings=null!==(n=e.cdnSettings)&&void 0!==n?n:{integrations:{"Segment.io":{apiKey:""}}},this.cdnURL=e.cdnURL}return Object.defineProperty(e.prototype,"apiHost",{get:function(){var e,t;return null===(t=null===(e=this._getSegmentPluginMetadata)||void 0===e?void 0:e.call(this))||void 0===t?void 0:t.apiHost},enumerable:!1,configurable:!0}),e}();function sp(){console.warn(rp)}var up,lp=function(e){function t(t,n,r,o,i){var a,s,u=this;(u=e.call(this)||this)._debug=!1,u.initialized=!1,u.user=function(){return u._user},u.init=u.initialize.bind(u),u.log=sp,u.addIntegrationMiddleware=sp,u.listeners=sp,u.addEventListener=sp,u.removeAllListeners=sp,u.removeListener=sp,u.removeEventListener=sp,u.hasListeners=sp,u.add=sp,u.addIntegration=sp;var l=null==n?void 0:n.cookie,c=null!==(a=null==n?void 0:n.disableClientPersistence)&&void 0!==a&&a;u.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?10:1,o=n?new sd.M(r,[]):new ad.x(r,e);return new fd(o)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,c),u.settings=new ap(t,u.queue);var f=null==n?void 0:n.storage;return u._universalStorage=u.createStore(c,f,l),u._user=null!=o?o:new Pd((0,jh.Cl)({persist:!c,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),u._group=null!=i?i:new Ad((0,jh.Cl)({persist:!c,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),u.eventFactory=new od(u._user),u.integrations=null!==(s=null==n?void 0:n.integrations)&&void 0!==s?s:{},u.options=null!=n?n:{},hd(u),u}return(0,jh.C6)(t,e),t.prototype.createStore=function(e,t,n){return e?new vd([new gd]):t&&yd(t)?new vd(Od(Sd(t.stores,n))):new vd(Od([dd.LocalStorage,{name:dd.Cookie,settings:n},dd.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t4){var a=r.slice(4);"campaign"===a&&(a="name"),e[a]=(0,dp.p)(i)}return e},{})}(a));var u=function(){var e=_d.get("_ga");if(e&&e.startsWith("amp"))return e}();u&&(o.amp={id:u}),function(e,t,n){var r,o=new vd(n?[]:[new xd(vp())]),i=o.get("s:context.referrer"),a=null!==(r=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n0}(t)?[4,a.e(10).then(a.bind(a,6834)).then(function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)})]:[3,2];case 1:return p=T.sent(),[3,3];case 2:p=void 0,T.label=3;case 3:return d=p,P=t,"test"!==Mh().NODE_ENV&&Object.keys(P.integrations).length>1||i.length>0?[4,a.e(50).then(a.bind(a,365)).then(function(o){return o.ajsDestinations(e,t,n.integrations,r,d,i)})]:[3,5];case 4:return g=T.sent(),[3,6];case 5:g=[],T.label=6;case 6:return v=g,t.legacyVideoPluginsEnabled?[4,a.e(694).then(a.bind(a,4503)).then(function(e){return e.loadLegacyVideoPlugins(n)})]:[3,8];case 7:T.sent(),T.label=8;case 8:return(null===(u=r.plan)||void 0===u?void 0:u.track)?[4,a.e(104).then(a.bind(a,681)).then(function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)})]:[3,10];case 9:return m=T.sent(),[3,11];case 10:m=void 0,T.label=11;case 11:return y=m,b=(0,fp.J)(t,r),[4,Op(t,n.integrations,b,r,d,h).catch(function(){return[]})];case 12:return _=T.sent(),w=(0,jh.fX)((0,jh.fX)([mp],v,!0),_,!0),y&&w.push(y),!1===(null===(l=r.integrations)||void 0===l?void 0:l.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(E=(x=w).push,[4,np(n,b["Segment.io"],t.integrations)]);case 13:E.apply(x,[T.sent()]),T.label=14;case 14:return[4,n.register.apply(n,(0,jh.fX)((0,jh.fX)([],w,!1),f,!1))];case 15:return O=T.sent(),[4,Dd(n,s)];case 16:return T.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some(function(e){return e[1]})?[4,a.e(521).then(a.bind(a,6904)).then(function(e){var o=e.remoteMiddlewares;return(0,jh.sH)(S,void 0,void 0,function(){var e,i;return(0,jh.YH)(this,function(a){switch(a.label){case 0:return[4,o(O,t,r.obfuscate)];case 1:return e=a.sent(),i=e.map(function(e){return n.addSourceMiddleware(e)}),[2,Promise.all(i)]}})})})]:[3,18];case 17:T.sent(),T.label=18;case 18:return[4,Nd(n,s)];case 19:return T.sent(),[2,O]}var P})})}var kp=function(e){function t(){var t=this,n=(0,hp.u)(),r=n.promise,o=n.resolve;return t=e.call(this,function(e){return r.then(function(t){return function(e,t,n){var r,o,i,a,s,u,l,c,f;return void 0===t&&(t={}),(0,jh.sH)(this,void 0,void 0,function(){var h,d,p,v,g,y,m,b,_,w;return(0,jh.YH)(this,function(x){switch(x.label){case 0:return!0===t.disable?[2,[new cp,Vh.o.system()]]:(t.globalAnalyticsKey&&(0,Rd.rY)(t.globalAnalyticsKey),e.cdnURL&&(0,Nh.qQ)(e.cdnURL),t.initialPageview&&n.add(new zd("page",[])),h=function(){var e,t,n=null!==(e=window.location.hash)&&void 0!==e?e:"",r=null!==(t=window.location.search)&&void 0!==t?t:"";return r.length?r:n.replace(/(?=#).*(?=\?)/,"")}(),d=null!==(r=e.cdnURL)&&void 0!==r?r:(0,Nh.I2)(),null===(o=e.cdnSettings)||void 0===o?[3,1]:(v=o,[3,3]));case 1:return[4,(E=e.writeKey,O=d,(0,Yd.h)("".concat(O,"/v1/projects/").concat(E,"/settings")).then(function(e){return e.ok?e.json():e.text().then(function(e){throw new Error(e)})}).catch(function(e){throw console.error(e.message),e}))];case 2:v=x.sent(),x.label=3;case 3:return p=v,t.updateCDNSettings&&(p=t.updateCDNSettings(p)),"function"!=typeof t.disable?[3,5]:[4,t.disable(p)];case 4:if(x.sent())return[2,[new cp,Vh.o.system()]];x.label=5;case 5:return g=null===(a=null===(i=p.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===a||a,t=(0,jh.Cl)({retryQueue:g},t),function(e){var t;null===(t=Sp.attach)||void 0===t||t.call(Sp,e)}(y=new lp((0,jh.Cl)((0,jh.Cl)({},e),{cdnSettings:p,cdnURL:d}),t)),m=null!==(s=e.plugins)&&void 0!==s?s:[],b=null!==(u=e.classicIntegrations)&&void 0!==u?u:[],_=null===(l=t.integrations)||void 0===l?void 0:l["Segment.io"],Tp.U.initRemoteMetrics((0,jh.Cl)((0,jh.Cl)({},p.metrics),{host:null!==(c=null==_?void 0:_.apiHost)&&void 0!==c?c:null===(f=p.metrics)||void 0===f?void 0:f.host,protocol:null==_?void 0:_.protocol})),[4,Ap(e.writeKey,p,y,t,m,b,n)];case 6:return w=x.sent(),y.initialized=!0,y.emit("initialize",e,t),[4,Pp(y,h,n)];case 7:return x.sent(),[2,[y,w]]}var E,O})})}(t[0],t[1],e)})})||this,t._resolveLoadStart=function(e,t){return o([e,t])},t}return(0,jh.C6)(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then(function(e){return e[0]})},t}(Gd),Ip={5:function(e,t,n){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}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=n(1018),i=n(8014),a=n(3413),s=n(7315),u=n(1342),l=n(9052),c=n(9155),f=n(9223),h=function(e){function n(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,i.isSubscription(n)&&n.add(r)):r.destination=t.EMPTY_OBSERVER,r}return r(n,e),n.create=function(e,t,n){return new g(e,t,n)},n.prototype.next=function(e){this.isStopped?m(l.nextNotification(e),this):this._next(e)},n.prototype.error=function(e){this.isStopped?m(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped?m(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(i.Subscription);t.Subscriber=h;var d=Function.prototype.bind;function p(e,t){return d.call(e,t)}var v=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){y(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){y(e)}else y(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){y(e)}},e}(),g=function(e){function t(t,n,r){var i,s,u=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:u&&a.config.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&p(t.next,s),error:t.error&&p(t.error,s),complete:t.complete&&p(t.complete,s)}):i=t,u.destination=new v(i),u}return r(t,e),t}(h);function y(e){a.config.useDeprecatedSynchronousErrorHandling?f.captureError(e):s.reportUnhandledError(e)}function m(e,t){var n=a.config.onStoppedNotification;n&&c.timeoutProvider.setTimeout(function(){return n(e,t)})}t.SafeSubscriber=g,t.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop}},45:function(e,t){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});var r=function(){function e(e){this.position=0,this.length=e}return e.prototype.getUInt8=function(e){throw new Error("Not implemented")},e.prototype.getInt8=function(e){throw new Error("Not implemented")},e.prototype.getFloat64=function(e){throw new Error("Not implemented")},e.prototype.getVarInt=function(e){throw new Error("Not implemented")},e.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},e.prototype.putInt8=function(e,t){throw new Error("Not implemented")},e.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},e.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},e.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},e.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},e.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},e.prototype.getInt64=function(e){return this.getInt8(e)<<56|this.getUInt8(e+1)<<48|this.getUInt8(e+2)<<40|this.getUInt8(e+3)<<32|this.getUInt8(e+4)<<24|this.getUInt8(e+5)<<16|this.getUInt8(e+6)<<8|this.getUInt8(e+7)},e.prototype.getSlice=function(e,t){return new o(e,t,this)},e.prototype.putInt16=function(e,t){this.putInt8(e,t>>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.putVarInt=function(e,t){for(var n=0;t>1;){var r=t%128;t>=128&&(r+=128),t/=128,this.putUInt8(e+n,r),n+=1}return n},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{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]}},95:function(e,t,n){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}),t.AsyncSubject=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return r(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,o=t._value,i=t.thrownError,a=t.isStopped,s=t._isComplete;n?e.error(i):(a||s)&&(r&&e.next(o),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},t}(n(2483).Subject);t.AsyncSubject=o},137:e=>{e.exports=class{constructor(e,t,n,r){let o;if("object"==typeof e){let i=e;e=i.k_p,t=i.k_i,n=i.k_d,r=i.dt,o=i.i_max}this.k_p="number"==typeof e?e:1,this.k_i=t||0,this.k_d=n||0,this.dt=r||0,this.i_max=o||0,this.sumError=0,this.lastError=0,this.lastTime=0,this.target=0}setTarget(e){this.target=e}update(e){this.currentValue=e;let t=this.dt;if(!t){let e=Date.now();t=0===this.lastTime?0:(e-this.lastTime)/1e3,this.lastTime=e}"number"==typeof t&&0!==t||(t=1);let n=this.target-this.currentValue;if(this.sumError=this.sumError+n*t,this.i_max>0&&Math.abs(this.sumError)>this.i_max){let e=this.sumError>0?1:-1;this.sumError=e*this.i_max}let r=(n-this.lastError)/t;return this.lastError=n,this.k_p*n+this.k_i*this.sumError+this.k_d*r}reset(){this.sumError=0,this.lastError=0,this.lastTime=0}}},182:function(e,t,n){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}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=n(5267),i=n(8014),a=function(e){function t(t,n){void 0===t&&(t=s),void 0===n&&(n=1/0);var r=e.call(this,t,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return r(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,r=this.maxFrames;(t=n[0])&&t.delay<=r&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(n(5648).AsyncScheduler);t.VirtualTimeScheduler=a;var s=function(e){function t(t,n,r){void 0===r&&(r=t.index+=1);var o=e.call(this,t,n)||this;return o.scheduler=t,o.work=n,o.index=r,o.active=!0,o.index=t.index=r,o}return r(t,e),t.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var o=new t(this.scheduler,this.work);return this.add(o),o.schedule(n,r)}return i.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,n,r){void 0===r&&(r=0),this.delay=e.frame+r;var o=e.actions;return o.push(this),o.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,n){void 0===n&&(n=0)},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(o.AsyncAction);t.VirtualAction=s},187:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var r=n(7286),o=n(3638);t.zipAll=function(e){return o.joinAllInternals(r.zip,e)}},206:function(e,t,n){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(4151));t.Rediscovery=o.default;var i=r(n(9018));t.RoutingTable=i.default,t.default=o.default},245:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(n,r){return!e.call(t,n,r)}}},269:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var r=n(3865),o=n(1107),i=n(7843);t.startWith=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.TELEMETRY_APIS=t.BOLT_PROTOCOL_V5_8=t.BOLT_PROTOCOL_V5_7=t.BOLT_PROTOCOL_V5_6=t.BOLT_PROTOCOL_V5_5=t.BOLT_PROTOCOL_V5_4=t.BOLT_PROTOCOL_V5_3=t.BOLT_PROTOCOL_V5_2=t.BOLT_PROTOCOL_V5_1=t.BOLT_PROTOCOL_V5_0=t.BOLT_PROTOCOL_V4_4=t.BOLT_PROTOCOL_V4_3=t.BOLT_PROTOCOL_V4_2=t.BOLT_PROTOCOL_V4_1=t.BOLT_PROTOCOL_V4_0=t.BOLT_PROTOCOL_V3=t.BOLT_PROTOCOL_V2=t.BOLT_PROTOCOL_V1=t.DEFAULT_POOL_MAX_SIZE=t.DEFAULT_POOL_ACQUISITION_TIMEOUT=t.DEFAULT_CONNECTION_TIMEOUT_MILLIS=t.ACCESS_MODE_WRITE=t.ACCESS_MODE_READ=t.FETCH_ALL=void 0,t.FETCH_ALL=-1,t.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,t.DEFAULT_POOL_MAX_SIZE=100,t.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,t.ACCESS_MODE_READ="READ",t.ACCESS_MODE_WRITE="WRITE",t.BOLT_PROTOCOL_V1=1,t.BOLT_PROTOCOL_V2=2,t.BOLT_PROTOCOL_V3=3,t.BOLT_PROTOCOL_V4_0=4,t.BOLT_PROTOCOL_V4_1=4.1,t.BOLT_PROTOCOL_V4_2=4.2,t.BOLT_PROTOCOL_V4_3=4.3,t.BOLT_PROTOCOL_V4_4=4.4,t.BOLT_PROTOCOL_V5_0=5,t.BOLT_PROTOCOL_V5_1=5.1,t.BOLT_PROTOCOL_V5_2=5.2,t.BOLT_PROTOCOL_V5_3=5.3,t.BOLT_PROTOCOL_V5_4=5.4,t.BOLT_PROTOCOL_V5_5=5.5,t.BOLT_PROTOCOL_V5_6=5.6,t.BOLT_PROTOCOL_V5_7=5.7,t.BOLT_PROTOCOL_V5_8=5.8,t.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3}},347:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var r=n(4662),o=n(1018),i=n(1251);t.fromEventPattern=function e(t,n,a){return a?e(t,n).pipe(i.mapOneOrManyArgs(a)):new r.Observable(function(e){var r=function(){for(var t=[],n=0;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0;)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},378:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var r=n(7843),o=n(3111);t.defaultIfEmpty=function(e){return r.operate(function(t,n){var r=!1;t.subscribe(o.createOperatorSubscriber(n,function(e){r=!0,n.next(e)},function(){r||n.next(e),n.complete()}))})}},397:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assertNotificationFilterIsEmpty=t.assertImpersonatedUserIsEmpty=t.assertTxConfigIsEmpty=t.assertDatabaseIsEmpty=void 0;var r=n(9305);n(9014),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}}},407:function(e,t,n){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(e){o={error:e}}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(6587),a=function(e,t,n,r,o){this.scheme=e,this.host=t,this.port=n,this.hostAndPort=r,this.query=o};function s(e,t,n){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(n,"'"));return e}function u(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 l(e){return"http"===e?7474:"https"===e?7473:7687}t.Url=a,t.parseDatabaseUrl=function(e){var t;(0,i.assertString)(e,"URL");var n,c=function(e){return(e=e.trim()).includes("://")?{schemeMissing:!1,url:e}:{schemeMissing:!0,url:"none://".concat(e)}}(e),f=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,"",""]}var n,i={};return":"===(n=t(e,":"))[1]&&(i.scheme=decodeURIComponent(n[0]),e=n[2]),"#"===(n=t(e,"#"))[1]&&(i.fragment=decodeURIComponent(n[2]),e=n[0]),"?"===(n=t(e,"?"))[1]&&(i.query=n[2],e=n[0]),e.startsWith("//")?(n=t(e.substr(2),"/"),(i=r(r({},i),function(e){var n,r={};"@"===(n=function(e){var t=e.lastIndexOf("@");return t>=0?[e.substring(0,t),e[t],e.substring(t+1)]:["","",e]}(e))[1]&&(r.userInfo=decodeURIComponent(n[0]),e=n[2]);var i=o(function(e){var n=t(e,"["),r=t(n[2],"]");return[r[0],r[2]]}(e),2),a=i[0],s=i[1];return""!==a?(r.host=a,n=t(s,":")):(n=t(e,":"),r.host=n[0]),":"===n[1]&&(r.port=n[2]),r}(n[0]))).path=n[1]+n[2]):i.path=e,i}(c.url),h=c.schemeMissing?null:function(e){return null!=e?(":"===(e=e.trim()).charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e):null}(f.scheme),d=function(e){if(null==e)throw new Error("Unable to extract host from null or undefined URL");return e.trim()}(f.host),p=function(e){if(""===e||null==e)throw new Error("Illegal host ".concat(e));return e.includes(":")?u(e):e}(d),v=function(e,t){var n="string"==typeof e?parseInt(e,10):e;return null==n||isNaN(n)?l(t):n}(f.port,h),g="".concat(p,":").concat(v),y=function(e,t){var n=null!=e?function(e){return"?"===(null==(e=(null!=e?e:"").trim())?void 0:e.charAt(0))&&(e=e.substring(1,e.length)),e}(e):null,r={};return 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=s(n[0],"key",t),i=s(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}),r}(null!==(t=f.query)&&void 0!==t?t:"string"!=typeof(n=f.resourceName)?null:o(n.split("?"),2)[1],e);return new a(h,d,v,g,y)},t.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},t.formatIPv6Address=function(e,t){var n=u(e);return"".concat(n,":").concat(t)},t.defaultPortForScheme=l},481:(e,t,n)=>{e.exports=n(137)},489:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var r=n(7961),o=n(7843),i=n(3111);t.timeInterval=function(e){return void 0===e&&(e=r.asyncScheduler),o.operate(function(t,n){var r=e.now();t.subscribe(i.createOperatorSubscriber(n,function(t){var o=e.now(),i=o-r;r=o,n.next(new a(t,i))}))})};var a=function(e,t){this.value=e,this.interval=t};t.TimeInterval=a},490:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var r=n(7843),o=n(3111),i=n(1342);t.ignoreElements=function(){return r.operate(function(e,t){e.subscribe(o.createOperatorSubscriber(t,i.noop))})}},582:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var r=n(7843),o=n(3111),i=n(9445);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),r.operate(function(n,r){var a={buffer:[],complete:!1},s={buffer:[],complete:!1},u=function(e){r.next(e),r.complete()},l=function(e,n){var i=o.createOperatorSubscriber(r,function(r){var o=n.buffer,i=n.complete;0===o.length?i?u(!1):e.buffer.push(r):!t(r,o.shift())&&u(!1)},function(){e.complete=!0;var t=n.complete,r=n.buffer;t&&u(0===r.length),null==i||i.unsubscribe()});return i};n.subscribe(l(a,s)),i.innerFrom(e).subscribe(l(s,a))})}},614:function(e,t){var n=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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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())})},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]{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._offset=e||0}return e.prototype.next=function(e){if(0===e)return-1;var t=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),t%e},e}();t.default=n},754:function(e,t,n){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(6587)),s=n(9691),u=n(3371),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.isInfoEnabled())&&(null==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({})},766:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var r=n(2483),o=n(9247),i=n(1483);t.publish=function(e){return e?function(t){return i.connect(e)(t)}:function(e){return o.multicast(new r.Subject)(e)}}},783:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var r=n(7843),o=n(3111);t.filter=function(e,t){return r.operate(function(n,r){var i=0;n.subscribe(o.createOperatorSubscriber(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}},827:function(e,t,n){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}),t.AsapScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(n(5648).AsyncScheduler);t.AsapScheduler=o},844:function(e,t,n){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(1711)),a=n(397),s=o(n(7449)),u=o(n(3321)),l=o(n(7021)),c=n(9014),f=n(9305).internal.constants.BOLT_PROTOCOL_V5_0,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new u.default(Object.values(s.default).map(function(t){return t(e._config,e._log)}))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this,n=void 0===e?{}:e,r=n.userAgent,o=(n.boltAgent,n.authToken),i=n.notificationFilter,s=n.onError,u=n.onComplete,f=new c.LoginObserver({onError:function(e){return t._onLoginError(e,s)},onCompleted:function(e){return t._onLoginCompleted(e,o,u)}});return(0,a.assertNotificationFilterIsEmpty)(i,this._onProtocolError,f),this.write(l.default.hello(r,o,this._serversideRouting),f,!0),f},t}(i.default);t.default=h},846:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var r=n(8616),o=n(7843),i=n(3111);t.take=function(e){return e<=0?function(){return r.EMPTY}:o.operate(function(t,n){var r=0;t.subscribe(i.createOperatorSubscriber(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}},854:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var r=n(4662),o=n(7110);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.Observable(function(n){o.executeSchedule(n,t,function(){var r=e[Symbol.asyncIterator]();o.executeSchedule(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}},914:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var r=n(7961),o=n(8766),i=n(4092);t.delay=function(e,t){void 0===t&&(t=r.asyncScheduler);var n=i.timer(e,t);return o.delayWhen(function(){return n})}},934:function(e,t,n){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;n{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var r=n(5471),o=n(9445),i=n(7843),a=n(1983),s=n(1018);t.mergeMap=function e(t,n,u){return void 0===u&&(u=1/0),s.isFunction(n)?e(function(e,i){return r.map(function(t,r){return n(e,t,i,r)})(o.innerFrom(t(e,i)))},u):("number"==typeof n&&(u=n),i.operate(function(e,n){return a.mergeInternals(e,n,t,u)}))}},1004:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var r=n(1107),o=n(4917);t.of=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},1038:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var r=n(9139);t.count=function(e){return r.reduce(function(t,n,r){return!e||e(n,r)?t+1:t},0)}},1048:(e,t,n)=>{const r=n(7991),o=n(9318),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(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 f(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|v(e,t);let r=s(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(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(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,n);const o=function(e){if(u.isBuffer(e)){const t=0|p(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.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 c(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 f(e){return c(e),s(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),n=s(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function v(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(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);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(o)return r?-1:Y(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){let 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 k(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function m(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),Z(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=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:b(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):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){let 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){let r=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){let n=!0;for(let r=0;ro&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(u=(31&t)<<6|63&n,u>127&&(i=u));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(u=(15&t)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(u=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},u.byteLength=v,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,o){if(K(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.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;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(i,a),l=this.slice(r,o),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const 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");let i=!1;for(;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function C(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;or)&&(n=r);let o="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,o,i){if(!u.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 M(e,t,n,r,o){V(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let 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 N(e,t,n,r,o){V(t,r,o,e,n,7);let 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;let 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 D(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 L(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){const 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||R(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Q(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||G(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||G(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Q(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||G(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||G(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||R(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(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},u.prototype.writeBigUInt64LE=Q(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Q(function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o>>=0,!r){const r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(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},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(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},u.prototype.writeBigInt64LE=Q(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Q(function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.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(o=t;o=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function V(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||G(t,e.length-(n+1))}(r,o,i)}function W(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,n){if(Math.floor(e)!==e)throw W(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),U("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=z(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=z(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r},RangeError);const H=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let 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 q(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function X(e,t,n,r){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},1053:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.rawPolyfilledDiagnosticRecord=void 0,t.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(t.rawPolyfilledDiagnosticRecord)},1074:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},1092:function(e,t,n){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(6377)),a=o(n(6161)),s=o(n(3321)),u=o(n(7021)),l=n(9014),c=n(9305).internal.constants,f=c.BOLT_PROTOCOL_V5_8,h=c.FETCH_ALL,d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new s.default(Object.values(a.default).map(function(t){return t(e._config,e._log)}))),this._transformer},enumerable:!1,configurable:!0}),t.prototype.run=function(e,t,n){var r=void 0===n?{}:n,o=r.bookmarks,i=r.txConfig,a=r.database,s=r.mode,c=r.impersonatedUser,f=r.notificationFilter,d=r.beforeKeys,p=r.afterKeys,v=r.beforeError,g=r.afterError,y=r.beforeComplete,m=r.afterComplete,b=r.flush,_=void 0===b||b,w=r.reactive,x=void 0!==w&&w,E=r.fetchSize,O=void 0===E?h:E,S=r.highRecordWatermark,T=void 0===S?Number.MAX_VALUE:S,P=r.lowRecordWatermark,C=void 0===P?Number.MAX_VALUE:P,A=r.onDb,k=new l.ResultStreamObserver({server:this._server,reactive:x,fetchSize:O,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:d,afterKeys:p,beforeError:v,afterError:g,beforeComplete:y,afterComplete:m,highRecordWatermark:T,lowRecordWatermark:C,enrichMetadata:this._enrichMetadata,onDb:A}),I=x;return this.write(u.default.runWithMetadata5x5(e,t,{bookmarks:o,txConfig:i,database:a,mode:s,impersonatedUser:c,notificationFilter:f}),k,I&&_),x||this.write(u.default.pull({n:O}),k,_),k},t}(i.default);t.default=d},1103:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var r=n(4662),o=n(1018);t.throwError=function(e,t){var n=o.isFunction(e)?e:function(){return e},i=function(e){return e.error(n())};return new r.Observable(t?function(e){return t.schedule(i,0,e)}:i)}},1107:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var r=n(1018),o=n(8613);function i(e){return e[e.length-1]}t.popResultSelector=function(e){return r.isFunction(i(e))?e.pop():void 0},t.popScheduler=function(e){return o.isScheduler(i(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof i(e)?e.pop():t}},1116:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var r=n(3327),o=n(1018);t.isInteropObservable=function(e){return o.isFunction(e[r.observable])}},1141:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var r=n(2483),o=n(7843),i=n(3111),a=n(9445);t.windowWhen=function(e){return o.operate(function(t,n){var o,s,u=function(e){o.error(e),n.error(e)},l=function(){var t;null==s||s.unsubscribe(),null==o||o.complete(),o=new r.Subject,n.next(o.asObservable());try{t=a.innerFrom(e())}catch(e){return void u(e)}t.subscribe(s=i.createOperatorSubscriber(n,l,l,u))};l(),t.subscribe(i.createOperatorSubscriber(n,function(e){return o.next(e)},function(){o.complete(),n.complete()},u,function(){null==s||s.unsubscribe(),o=null}))})}},1175:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},1358:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var r=n(1018);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&r.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},1409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.beginTransaction=function(e){throw new Error("Not implemented")},e.prototype.run=function(e,t,n){throw new Error("Not implemented")},e.prototype.commitTransaction=function(e){throw new Error("Not implemented")},e.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},e.prototype.resetAndFlush=function(){throw new Error("Not implemented")},e.prototype.isOpen=function(){throw new Error("Not implemented")},e.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},e.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},e}();t.default=n},1415:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var r=n(9139),o=n(1018);t.max=function(e){return r.reduce(o.isFunction(e)?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}},1439:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var r=n(2483),o=n(9445),i=n(7843),a=n(6824),s={connector:function(){return new r.Subject}};t.connect=function(e,t){void 0===t&&(t=s);var n=t.connector;return i.operate(function(t,r){var i=n();o.innerFrom(e(a.fromSubscribable(i))).subscribe(r),r.add(t.subscribe(i))})}},1505:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var r=n(5568);t.SequenceError=r.createErrorClass(function(e){return function(t){e(this),this.name="SequenceError",this.message=t}})},1517:(e,t,n)=>{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(4027),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=g(r,function(){return e.toString()})}return e.prototype.toString=function(){for(var e="("+this.elementId,t=0;t0){for(e+=" {",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=g(i,function(){return e.toString()}),this.startNodeElementId=g(a,function(){return t.toString()}),this.endNodeElementId=g(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=g(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 g(e,t){return null==e?t():e}t.Path=v,Object.defineProperty(v.prototype,u,o),t.isPath=function(e){return c(e,u)}},1518:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var r=n(7843),o=n(3111);t.pairwise=function(){return r.operate(function(e,t){var n,r=!1;e.subscribe(o.createOperatorSubscriber(t,function(e){var o=n;n=e,r&&t.next([o,e]),r=!0}))})}},1530:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),r(n(3057)),r(n(5742));var o=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=o},1551:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var r=n(2752);t.exhaust=r.exhaustAll},1554:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var r=n(7961),o=n(1074),i=n(7843),a=n(9445),s=n(5568),u=n(3111),l=n(7110);function c(e){throw new t.TimeoutError(e)}t.TimeoutError=s.createErrorClass(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}}),t.timeout=function(e,t){var n=o.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,s=n.first,f=n.each,h=n.with,d=void 0===h?c:h,p=n.scheduler,v=void 0===p?null!=t?t:r.asyncScheduler:p,g=n.meta,y=void 0===g?null:g;if(null==s&&null==f)throw new TypeError("No timeout provided.");return i.operate(function(e,t){var n,r,o=null,i=0,c=function(e){r=l.executeSchedule(t,v,function(){try{n.unsubscribe(),a.innerFrom(d({meta:y,lastValue:o,seen:i})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe(u.createOperatorSubscriber(t,function(e){null==r||r.unsubscribe(),i++,t.next(o=e),f>0&&c(f)},void 0,void 0,function(){(null==r?void 0:r.closed)||null==r||r.unsubscribe(),o=null})),!i&&c(null!=s?"number"==typeof s?s:+s-v.now():f)})}},1573:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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]{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var r=n(9567),o=n(9589),i=n(6985),a=n(8808),s=n(854),u=n(1116),l=n(7629),c=n(8046),f=n(6368),h=n(1358),d=n(7614),p=n(9137),v=n(4953);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return r.scheduleObservable(e,t);if(c.isArrayLike(e))return i.scheduleArray(e,t);if(l.isPromise(e))return o.schedulePromise(e,t);if(h.isAsyncIterable(e))return s.scheduleAsyncIterable(e,t);if(f.isIterable(e))return a.scheduleIterable(e,t);if(p.isReadableStreamLike(e))return v.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},1699:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var r=n(245),o=n(783),i=n(9445);t.partition=function(e,t,n){return[o.filter(t,n)(i.innerFrom(e)),o.filter(r.not(t,n))(i.innerFrom(e))]}},1711:function(e,t,n){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;n{Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var r=n(9445),o=n(7843),i=n(1342),a=n(3111);t.sample=function(e){return o.operate(function(t,n){var o=!1,s=null;t.subscribe(a.createOperatorSubscriber(n,function(e){o=!0,s=e})),r.innerFrom(e).subscribe(a.createOperatorSubscriber(n,function(){if(o){o=!1;var e=s;s=null,n.next(e)}},i.noop))})}},1751:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var r=n(4662),o=n(1018);t.isObservable=function(e){return!!e&&(e instanceof r.Observable||o.isFunction(e.lift)&&o.isFunction(e.subscribe))}},1759:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var r=n(5568);t.NotFoundError=r.createErrorClass(function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}})},1776:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{var t,n,r=document.attachEvent,o=!1;function i(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight}function a(e){var t=this;i(this),this.__resizeRAF__&&u(this.__resizeRAF__),this.__resizeRAF__=s(function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(n){n.call(t,e)}))})}if(!r){var s=(n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return n(e)}),u=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)}),l=!1,c="",f="animationstart",h="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),p=document.createElement("fakeelement");if(void 0!==p.style.animationName&&(l=!0),!1===l)for(var v=0;v div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),o=!0}}(),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=document.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='
',e.appendChild(e.__resizeTriggers__),i(e),e.addEventListener("scroll",a,!0),f&&e.__resizeTriggers__.addEventListener(f,function(t){t.animationName==g&&i(e)})),e.__resizeListeners__.push(t)),function(){r?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",a),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}},1839:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},u=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o{function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=n,t.iterator=n()},1967:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(9691),o=n(4027),i={basic:function(e,t,n){return null!=n?{scheme:"basic",principal:e,credentials:t,realm:n}:{scheme:"basic",principal:e,credentials:t}},kerberos:function(e){return{scheme:"kerberos",principal:"",credentials:e}},bearer:function(e){return{scheme:"bearer",credentials:e}},none:function(){return{scheme:"none"}},custom:function(e,t,n,i,s){var u={scheme:i,principal:e};if(a(t)&&(u.credentials=t),a(n)&&(u.realm=n),a(s)){try{(0,o.stringify)(s)}catch(e){throw(0,r.newError)("Circular references in custom auth token parameters",void 0,e)}u.parameters=s}return u}};function a(e){return!(null==e||""===e||Object.getPrototypeOf(e)===Object.prototype&&0===Object.keys(e).length)}t.default=i},1983:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var r=n(9445),o=n(7110),i=n(3111);t.mergeInternals=function(e,t,n,a,s,u,l,c){var f=[],h=0,d=0,p=!1,v=function(){!p||f.length||h||t.complete()},g=function(e){return h{Object.defineProperty(t,"__esModule",{value:!0}),t.notificationFilterDisabledClassification=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",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"};t.notificationFilterDisabledCategory=r,Object.freeze(r);var o=r;t.notificationFilterDisabledClassification=o,t.default=function(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}},2007:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Releasable=void 0;var n=function(){function e(){}return e.prototype.release=function(){throw new Error("Not implemented")},e}();t.Releasable=n;var r=function(){function e(){}return e.prototype.acquireConnection=function(e){throw Error("Not implemented")},e.prototype.supportsMultiDb=function(){throw Error("Not implemented")},e.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},e.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},e.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},e.prototype.SSREnabled=function(){return!1},e.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},e.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},e.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},e.prototype.close=function(){throw Error("Not implemented")},e}();t.default=r},2063:e=>{e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},2066:function(e,t,n){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]{Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var r=n(7843),o=n(3111);t.takeWhile=function(e,t){return void 0===t&&(t=!1),r.operate(function(n,r){var i=0;n.subscribe(o.createOperatorSubscriber(r,function(n){var o=e(n,i++);(o||t)&&r.next(n),!o&&r.complete()}))})}},2171:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var r=n(245),o=n(783);t.partition=function(e,t){return function(n){return[o.filter(e,t)(n),o.filter(r.not(e,t))(n)]}}},2199:function(e,t,n){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(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.resolve=function(e){return this._resolveToItself(e)},t}(n(9305).internal.resolver.BaseHostNameResolver);t.default=o},2204:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var r=n(9139),o=n(7843),i=function(e,t){return e.push(t),e};t.toArray=function(){return o.operate(function(e,t){r.reduce(i,[])(e).subscribe(t)})}},2360:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var r=n(7800),o=n(7843),i=n(3111);t.materialize=function(){return o.operate(function(e,t){e.subscribe(i.createOperatorSubscriber(t,function(e){t.next(r.Notification.createNext(e))},function(){t.next(r.Notification.createComplete()),t.complete()},function(e){t.next(r.Notification.createError(e)),t.complete()}))})}},2363:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(9305),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){return!!e&&(e.code===i||e.code===o||"Neo.TransientError.General.DatabaseUnavailable"===e.code)}(e)?this._handleUnavailability(e,t,n):function(e){return!!e&&("Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code)}(e)?this._handleWriteFailure(e,t,n):e},e}();function s(e){return e}t.default=a},2481:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(9305),o=r.internal.util,i=o.ENCRYPTION_OFF,a=o.ENCRYPTION_ON,s=r.error.SERVICE_UNAVAILABLE,u=[null,void 0,!0,!1,a,i],l=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];t.default=function(e,t,n,o){this.address=e,this.encrypted=function(e){var t=e.encrypted;if(-1===u.indexOf(t))throw(0,r.newError)("Illegal value of the encrypted setting ".concat(t,". Expected one of ").concat(u));return t}(t),this.trust=function(e){var t=e.trust;if(-1===l.indexOf(t))throw(0,r.newError)("Illegal value of the trust setting ".concat(t,". Expected one of ").concat(l));return t}(t),this.trustedCertificates=function(e){return e.trustedCertificates||[]}(t),this.knownHostsPath=function(e){return e.knownHosts||null}(t),this.connectionErrorCode=n||s,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=o}},2483:function(e,t,n){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.__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.AnonymousSubject=t.Subject=void 0;var i=n(4662),a=n(8014),s=n(9686),u=n(7479),l=n(9223),c=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r(t,e),t.prototype.lift=function(e){var t=new f(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new s.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;l.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;l.errorContext(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,o=n.isStopped,i=n.observers;return r||o?a.EMPTY_SUBSCRIPTION:(this.currentObservers=null,i.push(e),new a.Subscription(function(){t.currentObservers=null,u.arrRemove(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,o=t.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new f(e,t)},t}(i.Observable);t.Subject=c;var f=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return r(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:a.EMPTY_SUBSCRIPTION},t}(c);t.AnonymousSubject=f},2533:function(e,t,n){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(715)),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);u0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0});var r=n(9305);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.enrichErrorMetadata,a=t.log,s=t.observer;this._pendingObservers=[],this._log=a,this._transformMetadata=n||i,this._enrichErrorMetadata=r||i,this._observer=Object.assign({onObserversCountChange:o,onError:o,onFailure:o,onErrorApplyTransformation:i},s)}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{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(t)),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.onObserversCountChange(this._observersCount)},Object.defineProperty(e.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),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.onObserversCountChange(this._observersCount),!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.prototype._handleErrorPayload=function(e){var t,n="Neo.TransientError.Transaction.Terminated"===(t=e.code)?"Neo.ClientError.Transaction.Terminated":"Neo.TransientError.Transaction.LockClientStopped"===t?"Neo.ClientError.Transaction.LockClientStopped":t,o=null!=e.cause?this._handleErrorCause(e.cause):void 0,i=(0,r.newError)(e.message,n,o,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(i)},e.prototype._handleErrorCause=function(e){var t=null!=e.cause?this._handleErrorCause(e.cause):void 0,n=(0,r.newGQLError)(e.message,t,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(n)},e}();t.default=s},2628:function(e,t,n){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}),t.AnimationFrameAction=void 0;var o=n(5267),i=n(9507),a=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=i.animationFrameProvider.requestAnimationFrame(function(){return t.flush(void 0)})))},t.prototype.recycleAsyncId=function(t,n,r){var o;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var a=t.actions;null!=n&&n===t._scheduled&&(null===(o=a[a.length-1])||void 0===o?void 0:o.id)!==n&&(i.animationFrameProvider.cancelAnimationFrame(n),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=a},2669:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var r=n(9139),o=n(1018);t.min=function(e){return r.reduce(o.isFunction(e)?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e{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},2706:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var r=n(6640);function o(e){return 0===e.length?r.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var r=n(1439);t.bindCallback=function(e,t,n){return r.bindCallbackInternals(!1,e,t,n)}},2752:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var r=n(4753),o=n(6640);t.exhaustAll=function(){return r.exhaustMap(o.identity)}},2823:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var r=n(5568);t.EmptyError=r.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})},2833:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var r=n(7302),o=n(9445),i=n(8616),a=n(1107),s=n(4917);t.merge=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var r=n(4212),o=n(1293);t.queueScheduler=new o.QueueScheduler(r.QueueAction),t.queue=t.queueScheduler},2906:function(e,t,n){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(7589));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(6842));t.Pool=u.default,t.default=u.default},3001:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.maxSize=e,this.pruneCount=Math.max(Math.round(.01*e*Math.log(e)),1),this.map=new Map}return e.prototype.set=function(e,t){this.map.set(e,{database:t,lastUsed:Date.now()}),this._pruneCache()},e.prototype.get=function(e){var t=this.map.get(e);if(void 0!==t)return t.lastUsed=Date.now(),t.database},e.prototype.delete=function(e){this.map.delete(e)},e.prototype._pruneCache=function(){if(this.map.size>this.maxSize)for(var e=Array.from(this.map.entries()).sort(function(e,t){return e[1].lastUsed-t[1].lastUsed}),t=0;t0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var r=n(4662),o=n(4746),i=n(9507);function a(e){return new r.Observable(function(t){var n=e||o.performanceTimestampProvider,r=n.now(),a=0,s=function(){t.closed||(a=i.animationFrameProvider.requestAnimationFrame(function(o){a=0;var i=n.now();t.next({timestamp:e?i:o,elapsed:i-r}),s()}))};return s(),function(){a&&i.animationFrameProvider.cancelAnimationFrame(a)}})}t.animationFrames=function(e){return e?a(e):s};var s=a()},3111:function(e,t,n){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}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=n(5);t.createOperatorSubscriber=function(e,t,n,r,o){return new i(e,t,n,r,o)};var i=function(e){function t(t,n,r,o,i,a){var s=e.call(this,t)||this;return s.onFinalize=i,s.shouldUnsubscribe=a,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return r(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=i},3133:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var r=n(1242),o=n(8977);t.shareReplay=function(e,t,n){var i,a,s,u,l=!1;return e&&"object"==typeof e?(i=e.bufferSize,u=void 0===i?1/0:i,a=e.windowTime,t=void 0===a?1/0:a,l=void 0!==(s=e.refCount)&&s,n=e.scheduler):u=null!=e?e:1/0,o.share({connector:function(){return new r.ReplaySubject(u,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})}},3146:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var r=n(7843),o=n(9445),i=n(3111);t.audit=function(e){return r.operate(function(t,n){var r=!1,a=null,s=null,u=!1,l=function(){if(null==s||s.unsubscribe(),s=null,r){r=!1;var e=a;a=null,n.next(e)}u&&n.complete()},c=function(){s=null,u&&n.complete()};t.subscribe(i.createOperatorSubscriber(n,function(t){r=!0,a=t,s||o.innerFrom(e(t)).subscribe(s=i.createOperatorSubscriber(n,l,c))},function(){u=!0,(!r||!s||s.closed)&&n.complete()}))})}},3206:(e,t,n)=>{e.exports=function(e){var t,n,E,O=0,S=0,T=u,P=[],C=[],A=1,k=0,I=0,R=!1,j=!1,M="",N=i,D=r;"300 es"===(e=e||{}).version&&(N=s,D=a);var L={},B={};for(O=0;O0)continue;n=e.slice(0,1).join("")}return F(n),I+=n.length,(P=P.slice(n.length)).length}}function q(){return/[^a-fA-F0-9]/.test(t)?(F(P.join("")),T=u,O):(P.push(t),n=t,O+1)}function X(){return"."===t||/[eE]/.test(t)?(P.push(t),T=v,n=t,O+1):"x"===t&&1===P.length&&"0"===P[0]?(T=w,P.push(t),n=t,O+1):/[^\d]/.test(t)?(F(P.join("")),T=u,O):(P.push(t),n=t,O+1)}function K(){return"f"===t&&(P.push(t),n=t,O+=1),/[eE]/.test(t)?(P.push(t),n=t,O+1):("-"!==t&&"+"!==t||!/[eE]/.test(n))&&/[^\d]/.test(t)?(F(P.join("")),T=u,O):(P.push(t),n=t,O+1)}function Z(){if(/[^\d\w_]/.test(t)){var e=P.join("");return T=B[e]?m:L[e]?y:g,F(P.join("")),T=u,O}return P.push(t),n=t,O+1}};var r=n(4704),o=n(2063),i=n(7192),a=n(8784),s=n(5592),u=999,l=9999,c=0,f=1,h=2,d=3,p=4,v=5,g=6,y=7,m=8,b=9,_=10,w=11,x=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3218:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var r=n(5471);t.mapTo=function(e){return r.map(function(){return e})}},3229:function(e,t,n){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}),t.AnimationFrameScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.flush=function(e){var t;this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(n(5648).AsyncScheduler);t.AnimationFrameScheduler=o},3231:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var r=n(7961),o=n(3146),i=n(4092);t.auditTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),o.audit(function(){return i.timer(e,t)})}},3247:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var r=n(4662),o=n(7360),i=n(4917),a=n(6640),s=n(1251),u=n(1107),l=n(6013),c=n(3111),f=n(7110);function h(e,t,n){return void 0===n&&(n=a.identity),function(r){d(t,function(){for(var o=e.length,a=new Array(o),s=o,u=o,l=function(o){d(t,function(){var l=i.from(e[o],t),f=!1;l.subscribe(c.createOperatorSubscriber(r,function(e){a[o]=e,f||(f=!0,u--),u||r.next(n(a.slice()))},function(){--s||r.complete()}))},r)},f=0;f{var r=n(6931),o=n(9975),i=Object.hasOwnProperty,a=Object.create(null);for(var s in r)i.call(r,s)&&(a[r[s]]=s);var u=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function c(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}u.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=u.get.hsl(e),n="hsl";break;case"hwb":t=u.get.hwb(e),n="hwb";break;default:t=u.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},u.get.rgb=function(e){if(!e)return null;var t,n,o,a=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],n=0;n<3;n++){var s=2*n;a[n]=parseInt(t.slice(s,s+2),16)}o&&(a[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],n=0;n<3;n++)a[n]=parseInt(t[n]+t[n],16);o&&(a[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(t[n+1],0);t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:i.call(r,t[1])?((a=r[t[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}for(n=0;n<3;n++)a[n]=l(a[n],0,255);return a[3]=l(a[3],0,1),a},u.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},u.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},u.to.hex=function(){var e=o(arguments);return"#"+c(e[0])+c(e[1])+c(e[2])+(e[3]<1?c(Math.round(255*e[3])):"")},u.to.rgb=function(){var e=o(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},u.to.rgb.percent=function(){var e=o(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},u.to.hsl=function(){var e=o(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},u.to.hwb=function(){var e=o(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},u.to.keyword=function(e){return a[e.slice(0,3)]}},3274:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var r=n(3879),o=n(1018);t.switchMapTo=function(e,t){return o.isFunction(t)?r.switchMap(function(){return e},t):r.switchMap(function(){return e})}},3321:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeTransformer=void 0;var r=n(7168),o=n(9305).internal.objectUtil,i=function(){function e(e){this._transformers=e,this._transformersPerSignature=new Map(e.map(function(e){return[e.signature,e]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}return e.prototype.fromStructure=function(e){try{return e instanceof r.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return o.createBrokenObject(e)}},e.prototype.toStructure=function(e){var t=this._transformers.find(function(t){return(0,t.isTypeInstance)(e)});return void 0!==t?t.toStructure(e):e},e}();t.default=i;var a=function(){function e(e){var t=e.signature,n=e.fromStructure,r=e.toStructure,o=e.isTypeInstance;this.signature=t,this.isTypeInstance=o,this.fromStructure=n,this.toStructure=r,Object.freeze(this)}return e.prototype.extendsWith=function(t){var n=t.signature,r=t.fromStructure,o=t.toStructure,i=t.isTypeInstance;return new e({signature:n||this.signature,fromStructure:r||this.fromStructure,toStructure:o||this.toStructure,isTypeInstance:i||this.isTypeInstance})},e}();t.TypeTransformer=a},3327:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},3371:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toString=t.toNumber=t.inSafeRange=t.isInt=t.int=void 0;var r=n(9691),o=new Map,i=function(){function e(e,t){this.low=null!=e?e:0,this.high=null!=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?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&&!(t&1<=0},e.prototype.isOdd=function(){return!(1&~this.low)},e.prototype.isEven=function(){return!(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.__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?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;c{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.resolve=function(){throw new Error("Abstract function")},e.prototype._resolveToItself=function(e){return Promise.resolve([e])},e}();t.default=n},3399:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},3448:function(e,t,n){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(e){o={error:e}}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(9305),s=n(7168),u=n(3321),l=n(5973),c=i(n(6661)),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)}})}})},3466:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(8813),i=n(9419),a=r(n(3057)),s=n(9305),u=r(n(5742)),l=r(n(1530)),c=r(n(9823)),f=s.internal.constants,h=f.ACCESS_MODE_READ,d=f.ACCESS_MODE_WRITE,p=f.TELEMETRY_APIS,v=s.internal.txConfig.TxConfig,g=function(){function e(e){var t=void 0===e?{}:e,n=t.session,r=t.config,o=t.log;this._session=n,this._retryLogic=function(e){var t=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new c.default({maxRetryTimeout:t})}(r),this._log=o}return e.prototype.run=function(e,t,n){var r=this;return new a.default(new o.Observable(function(o){try{o.next(r._session.run(e,t,n)),o.complete()}catch(e){o.error(e)}return function(){}}))},e.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:p.UNMANAGED_TRANSACTION})},e.prototype.readTransaction=function(e,t){return this._runTransaction(h,e,t)},e.prototype.writeTransaction=function(e,t){return this._runTransaction(d,e,t)},e.prototype.executeRead=function(e,t){return this._executeInTransaction(h,e,t)},e.prototype.executeWrite=function(e,t){return this._executeInTransaction(d,e,t)},e.prototype._executeInTransaction=function(e,t,n){return this._runTransaction(e,t,n,function(e){return new l.default({run:e.run.bind(e)})})},e.prototype.close=function(){var e=this;return new o.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},e.prototype[Symbol.asyncDispose]=function(){return this.close()},e.prototype.lastBookmark=function(){return this.lastBookmarks()},e.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},e.prototype._beginTransaction=function(e,t,n){var r=this,i=v.empty();return t&&(i=new v(t,this._log)),new o.Observable(function(t){try{r._session._beginTransaction(e,i,n).then(function(e){t.next(new u.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},e.prototype._runTransaction=function(e,t,n,r){var a=this;void 0===r&&(r=function(e){return e});var s=v.empty();n&&(s=new v(n));var u={apiTelemetryConfig:{api:p.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}};return this._retryLogic.retry((0,o.of)(1).pipe((0,i.mergeMap)(function(){return a._beginTransaction(e,s,u.apiTelemetryConfig)}),(0,i.mergeMap)(function(e){return(0,o.defer)(function(){try{return t(r(e))}catch(e){return(0,o.throwError)(function(){return e})}}).pipe((0,i.catchError)(function(t){return e.rollback().pipe((0,i.concatWith)((0,o.throwError)(function(){return t})))}),(0,i.concatWith)(e.commit()))})))},e}();t.default=g},3473:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(5319)),i=n(9305),a=r(n(1048)),s=new(n(8888).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){var n=t,r=e.position;return e._updatePos(Math.min(t,e.length-r)),e._buffers.reduce(function(e,t){if(n<=0)return e;if(r>=t.length)return r-=t.length,"";t._updatePos(r-t.position);var o=Math.min(t.length-r,n),i=t.readSlice(o);return t._updatePos(o),n=Math.max(n-i.length,0),r=0,e+function(e){return s.write(e._buffer)}(i)},"")+s.end()}(e,t)}(e,t);throw(0,i.newError)("Don't know how to decode strings from '".concat(e,"'"))}}},3488:function(e,t,n){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)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(5837),t)},3545:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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]=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=g},3555:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var r=n(7843);t.finalize=function(e){return r.operate(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}},3618:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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]{Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var r=n(6640),o=n(1251),i=n(2706),a=n(983),s=n(2343);t.joinAllInternals=function(e,t){return i.pipe(s.toArray(),a.mergeMap(function(t){return e(t)}),t?o.mapOneOrManyArgs(t):r.identity)}},3659:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default="5.28.1"},3692:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var r=n(5006),o=n(827);t.asapScheduler=new o.AsapScheduler(r.AsapAction),t.asap=t.asapScheduler},3862:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var r=n(2628),o=n(3229);t.animationFrameScheduler=new o.AnimationFrameScheduler(r.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},3865:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var r=n(8158),o=n(1107),i=n(4917);t.concat=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var r=n(9445),o=n(7843),i=n(3111);t.switchMap=function(e,t){return o.operate(function(n,o){var a=null,s=0,u=!1,l=function(){return u&&!a&&o.complete()};n.subscribe(i.createOperatorSubscriber(o,function(n){null==a||a.unsubscribe();var u=0,c=s++;r.innerFrom(e(n,c)).subscribe(a=i.createOperatorSubscriber(o,function(e){return o.next(t?t(n,e,c,u++):e)},function(){a=null,l()}))},function(){u=!0,l()}))})}},3951:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCertificatesLoader=t.HostNameResolver=t.Channel=void 0;var o=r(n(6245)),i=r(n(2199)),a=r(n(614));t.Channel=o.default,t.HostNameResolver=i.default,t.ClientCertificatesLoader=a.default},3964:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var r=n(1018),o=n(7843),i=n(3111),a=n(6640);t.tap=function(e,t,n){var s=r.isFunction(e)||t||n?{next:e,error:t,complete:n}:e;return s?o.operate(function(e,t){var n;null===(n=s.subscribe)||void 0===n||n.call(s);var r=!0;e.subscribe(i.createOperatorSubscriber(t,function(e){var n;null===(n=s.next)||void 0===n||n.call(s,e),t.next(e)},function(){var e;r=!1,null===(e=s.complete)||void 0===e||e.call(s),t.complete()},function(e){var n;r=!1,null===(n=s.error)||void 0===n||n.call(s,e),t.error(e)},function(){var e,t;r&&(null===(e=s.unsubscribe)||void 0===e||e.call(s)),null===(t=s.finalize)||void 0===t||t.call(s)}))}):a.identity}},3982:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var r=n(783);t.skip=function(e){return r.filter(function(t,n){return e<=n})}},4027:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;var r=n(93);t.stringify=function(e,t){return JSON.stringify(e,function(e,n){return(0,r.isBrokenObject)(n)?{__isBrokenObject__:!0,__reason__:(0,r.getBrokenObjectReason)(n)}:"bigint"==typeof n?"".concat(n,"n"):!0!==(null==t?void 0:t.sortedElements)||"object"!=typeof n||Array.isArray(n)?!0!==(null==t?void 0:t.useCustomToString)||"object"!=typeof n||Array.isArray(n)||"function"!=typeof n.toString||n.toString===Object.prototype.toString?n:null==n?void 0:n.toString():Object.keys(n).sort().reduce(function(e,t){return e[t]=n[t],e},{})})}},4092:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var r=n(4662),o=n(7961),i=n(8613),a=n(1074);t.timer=function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=o.async);var s=-1;return null!=t&&(i.isScheduler(t)?n=t:s=t),new r.Observable(function(t){var r=a.isValidDate(e)?+e-n.now():e;r<0&&(r=0);var o=0;return n.schedule(function(){t.closed||(t.next(o++),0<=s?this.schedule(void 0,s):t.complete())},r)})}},4132:function(e,t,n){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(9305).ConnectionProvider);t.default=o},4151:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(9018)),i=(n(9305),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},4209:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var r=n(9353);t.iif=function(e,t,n){return r.defer(function(){return e()?t:n})}},4212:function(e,t,n){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}),t.QueueAction=void 0;var o=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(n(5267).AsyncAction);t.QueueAction=o},4271:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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]{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.selectReader=function(e){throw new Error("Abstract function")},e.prototype.selectWriter=function(e){throw new Error("Abstract function")},e}();t.default=n},4325:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{e.exports=function(e){for(var t=[],n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var r=n(7843),o=n(1983);t.mergeScan=function(e,t,n){return void 0===n&&(n=1/0),r.operate(function(r,i){var a=t;return o.mergeInternals(r,i,function(t,n){return e(a,t,n)},n,function(e){a=e},!1,void 0,function(){return a=null})})}},4440:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var r=n(7843),o=n(1342),i=n(3111),a=n(9445);t.debounce=function(e){return r.operate(function(t,n){var r=!1,s=null,u=null,l=function(){if(null==u||u.unsubscribe(),u=null,r){r=!1;var e=s;s=null,n.next(e)}};t.subscribe(i.createOperatorSubscriber(n,function(t){null==u||u.unsubscribe(),r=!0,s=t,u=i.createOperatorSubscriber(n,l,o.noop),a.innerFrom(e(t)).subscribe(u)},function(){l(),n.complete()},void 0,function(){s=u=null}))})}},4520:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var r=n(7057),o=n(783),i=n(4869),a=n(378),s=n(846);t.elementAt=function(e,t){if(e<0)throw new r.ArgumentOutOfRangeError;var n=arguments.length>=2;return function(u){return u.pipe(o.filter(function(t,n){return n===e}),s.take(1),n?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new r.ArgumentOutOfRangeError}))}}},4531:function(e,t){var n=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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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())})},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]this._connectionLivenessCheckTimeout?[4,e.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,n.sent()];case 2:return[2,!0]}})})},Object.defineProperty(e.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),e.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},e}();t.default=o},4569:function(e,t,n){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;n{Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var r=n(5),o=n(8014),i=n(3327),a=n(2706),s=n(3413),u=n(1018),l=n(9223),c=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var i,a=this,s=(i=e)&&i instanceof r.Subscriber||function(e){return e&&u.isFunction(e.next)&&u.isFunction(e.error)&&u.isFunction(e.complete)}(i)&&o.isSubscription(i)?e:new r.SafeSubscriber(e,t,n);return l.errorContext(function(){var e=a,t=e.operator,n=e.source;s.add(t?t.call(s,n):n?a._subscribe(s):a._trySubscribe(s))}),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=f(t))(function(t,o){var i=new r.SafeSubscriber({next:function(t){try{e(t)}catch(e){o(e),i.unsubscribe()}},error:o,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t{e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},4721:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var r=n(7843),o=n(3111);t.skipWhile=function(e){return r.operate(function(t,n){var r=!1,i=0;t.subscribe(o.createOperatorSubscriber(n,function(t){return(r||(r=!e(t,i++)))&&n.next(t)}))})}},4746:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},4753:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var r=n(5471),o=n(9445),i=n(7843),a=n(3111);t.exhaustMap=function e(t,n){return n?function(i){return i.pipe(e(function(e,i){return o.innerFrom(t(e,i)).pipe(r.map(function(t,r){return n(e,t,i,r)}))}))}:i.operate(function(e,n){var r=0,i=null,s=!1;e.subscribe(a.createOperatorSubscriber(n,function(e){i||(i=a.createOperatorSubscriber(n,void 0,function(){i=null,s&&n.complete()}),o.innerFrom(t(e,r++)).subscribe(i))},function(){s=!0,!i&&n.complete()}))})}},4780:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var r=n(7843),o=n(3111),i=n(9445),a=n(1342);t.takeUntil=function(e){return r.operate(function(t,n){i.innerFrom(e).subscribe(o.createOperatorSubscriber(n,function(){return n.complete()},a.noop)),!n.closed&&t.subscribe(n)})}},4820:function(e,t,n){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(e){o={error:e}}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(9691),s=function(){function e(e,t,n){this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=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(e){t={error:e}}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(e){t={error:e}}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&&e{Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var r=n(7961),o=n(1074),i=n(1554);t.timeoutWith=function(e,t,n){var a,s,u;if(n=null!=n?n:r.async,o.isValidDate(e)?a=e:"number"==typeof e&&(s=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==a&&null==s)throw new TypeError("No timeout provided.");return i.timeout({first:a,each:s,scheduler:n,with:u})}},4869:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var r=n(2823),o=n(7843),i=n(3111);function a(){return new r.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=a),o.operate(function(t,n){var r=!1;t.subscribe(i.createOperatorSubscriber(n,function(e){r=!0,n.next(e)},function(){return r?n.complete():n.error(e())}))})}},4883:function(e,t,n){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)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;var i=n(9691),a="error",s="warn",u="info",l="debug",c=u,f=((r={})[a]=0,r[s]=1,r[u]=2,r[l]=3,r),h=function(){function e(e,t){this._level=e,this._loggerFunction=t}return e.create=function(t){if(null!=(null==t?void 0:t.logging)){var n=t.logging,r=function(e){if(null!=(null==e?void 0:e.level)){var t=e.level,n=f[t];if(null==n&&0!==n)throw(0,i.newError)("Illegal logging level: ".concat(t,". Supported levels are: ").concat(Object.keys(f).toString()));return t}return c}(n),o=function(e){var t,n;if(null!=(null==e?void 0:e.logger)){var r=e.logger;if(null!=r&&"function"==typeof r)return r}throw(0,i.newError)("Illegal logger function: ".concat(null!==(n=null===(t=null==e?void 0:e.logger)||void 0===t?void 0:t.toString())&&void 0!==n?n:"undefined"))}(n);return new e(r,o)}return this.noOp()},e.noOp=function(){return d},e.prototype.isErrorEnabled=function(){return p(this._level,a)},e.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(a,e)},e.prototype.isWarnEnabled=function(){return p(this._level,s)},e.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(s,e)},e.prototype.isInfoEnabled=function(){return p(this._level,u)},e.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(u,e)},e.prototype.isDebugEnabled=function(){return p(this._level,l)},e.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(l,e)},e}();t.Logger=h;var d=new(function(e){function t(){return e.call(this,u,function(e,t){})||this}return o(t,e),t.prototype.isErrorEnabled=function(){return!1},t.prototype.error=function(e){},t.prototype.isWarnEnabled=function(){return!1},t.prototype.warn=function(e){},t.prototype.isInfoEnabled=function(){return!1},t.prototype.info=function(e){},t.prototype.isDebugEnabled=function(){return!1},t.prototype.debug=function(e){},t}(h));function p(e,t){return f[e]>=f[t]}},4912:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var r=n(5471);t.pluck=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var r=n(1656),o=n(9445);t.from=function(e,t){return t?r.scheduled(e,t):o.innerFrom(e)}},4953:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var r=n(854),o=n(9137);t.scheduleReadableStreamLike=function(e,t){return r.scheduleAsyncIterable(o.readableStreamLikeToAsyncGenerator(e),t)}},5006:function(e,t,n){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}),t.AsapAction=void 0;var o=n(5267),i=n(6293),a=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=i.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){var o;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var a=t.actions;null!=n&&(null===(o=a[a.length-1])||void 0===o?void 0:o.id)!==n&&(i.immediateProvider.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(o.AsyncAction);t.AsapAction=a},5022:function(e,t,n){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(3371)),s=n(9691),u=n(6587),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)).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){return 1===e?t%400==0||t%4==0&&t%100!=0?29:28:[0,2,4,6,7,9,11].includes(e)?31:30}t.YEAR_RANGE=new l(-999999999,999999999),t.MONTH_OF_YEAR_RANGE=new l(1,12),t.DAY_OF_MONTH_RANGE=new l(1,31),t.HOUR_OF_DAY_RANGE=new l(0,23),t.MINUTE_OF_HOUR_RANGE=new l(0,59),t.SECOND_OF_MINUTE_RANGE=new l(0,59),t.NANOSECOND_OF_SECOND_RANGE=new l(0,999999999),t.MINUTES_PER_HOUR=60,t.SECONDS_PER_MINUTE=60,t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE*t.MINUTES_PER_HOUR,t.NANOS_PER_SECOND=1e9,t.NANOS_PER_MILLISECOND=1e6,t.NANOS_PER_MINUTE=t.NANOS_PER_SECOND*t.SECONDS_PER_MINUTE,t.NANOS_PER_HOUR=t.NANOS_PER_MINUTE*t.MINUTES_PER_HOUR,t.DAYS_0000_TO_1970=719528,t.DAYS_PER_400_YEAR_CYCLE=146097,t.SECONDS_PER_DAY=86400,t.normalizeSecondsForDuration=function(e,n){return(0,a.int)(e).add(v(n,t.NANOS_PER_SECOND))},t.normalizeNanosecondsForDuration=function(e){return g(e,t.NANOS_PER_SECOND)},t.localTimeToNanoOfDay=function(e,n,r,o){e=(0,a.int)(e),n=(0,a.int)(n),r=(0,a.int)(r),o=(0,a.int)(o);var i=e.multiply(t.NANOS_PER_HOUR);return(i=(i=i.add(n.multiply(t.NANOS_PER_MINUTE))).add(r.multiply(t.NANOS_PER_SECOND))).add(o)},t.localDateTimeToEpochSecond=function(e,n,r,o,i,s,u){var l=c(e,n,r),f=function(e,n,r){e=(0,a.int)(e),n=(0,a.int)(n),r=(0,a.int)(r);var o=e.multiply(t.SECONDS_PER_HOUR);return(o=o.add(n.multiply(t.SECONDS_PER_MINUTE))).add(r)}(o,i,s);return l.multiply(t.SECONDS_PER_DAY).add(f)},t.dateToEpochDay=c,t.durationToIsoString=function(e,n,r,o){var i=m(e),s=m(n),u=function(e,n){var r,o;e=(0,a.int)(e),n=(0,a.int)(n);var i=e.isNegative(),s=n.greaterThan(0);return r=i&&s?e.equals(-1)?"-0":e.add(1).toString():e.toString(),s&&(o=y(i?n.negate().add(2*t.NANOS_PER_SECOND).modulo(t.NANOS_PER_SECOND):n.add(t.NANOS_PER_SECOND).modulo(t.NANOS_PER_SECOND))),null!=o?r+o:r}(r,o);return"P".concat(i,"M").concat(s,"DT").concat(u,"S")},t.timeToIsoString=function(e,t,n,r){var o=m(e,2),i=m(t,2),a=m(n,2),s=y(r);return"".concat(o,":").concat(i,":").concat(a).concat(s)},t.timeZoneOffsetToIsoString=function(e){if((e=(0,a.int)(e)).equals(0))return"Z";var n=e.isNegative();n&&(e=e.multiply(-1));var r=n?"-":"+",o=m(e.div(t.SECONDS_PER_HOUR),2),i=m(e.div(t.SECONDS_PER_MINUTE).modulo(t.MINUTES_PER_HOUR),2),s=e.modulo(t.SECONDS_PER_MINUTE),u=s.equals(0)?null:m(s,2);return null!=u?"".concat(r).concat(o,":").concat(i,":").concat(u):"".concat(r).concat(o,":").concat(i)},t.dateToIsoString=function(e,t,n){var r=function(e){var t=(0,a.int)(e);return t.isNegative()||t.greaterThan(9999)?m(t,6,{usePositiveSign:!0}):m(t,4)}(e),o=m(t,2),i=m(n,2);return"".concat(r,"-").concat(o,"-").concat(i)},t.isoStringToStandardDate=function(e){return new Date(e)},t.toStandardDate=function(e){return new Date(e)},t.newDate=function(e){return new Date(e)},t.totalNanoseconds=function(e,n){return function(e,t){return e instanceof a.default?e.add(t):"bigint"==typeof e?e+BigInt(t):e+t}(n=null!=n?n:0,e.getMilliseconds()*t.NANOS_PER_MILLISECOND)},t.timeZoneOffsetInSeconds=function(e){var n=e.getSeconds()-e.getUTCSeconds(),r=e.getMinutes()-e.getUTCMinutes(),o=e.getHours()-e.getUTCHours(),i=function(e){return e.getMonth()===e.getUTCMonth()?e.getDate()-e.getUTCDate():e.getFullYear()>e.getUTCFullYear()||e.getMonth()>e.getUTCMonth()&&e.getFullYear()===e.getUTCFullYear()?e.getDate()+f(e.getUTCMonth(),e.getUTCFullYear())-e.getUTCDate():e.getDate()-(e.getUTCDate()+f(e.getMonth(),e.getFullYear()))}(e);return o*t.SECONDS_PER_HOUR+r*t.SECONDS_PER_MINUTE+n+i*t.SECONDS_PER_DAY},t.assertValidYear=function(e){return p(e,t.YEAR_RANGE,"Year")},t.assertValidMonth=function(e){return p(e,t.MONTH_OF_YEAR_RANGE,"Month")},t.assertValidDay=function(e){return p(e,t.DAY_OF_MONTH_RANGE,"Day")},t.assertValidHour=function(e){return p(e,t.HOUR_OF_DAY_RANGE,"Hour")},t.assertValidMinute=function(e){return p(e,t.MINUTE_OF_HOUR_RANGE,"Minute")},t.assertValidSecond=function(e){return p(e,t.SECOND_OF_MINUTE_RANGE,"Second")},t.assertValidNanosecond=function(e){return p(e,t.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")};var h=new Map,d=function(e,t){return(0,s.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))};function p(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 v(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 g(e,t){return e=(0,a.int)(e),t=(0,a.int)(t),e.subtract(v(e,t).multiply(t))}function y(e){return(e=(0,a.int)(e)).equals(0)?"":"."+m(e,9)}function m(e,t,n){var r=(e=(0,a.int)(e)).isNegative();r&&(e=e.negate());var o=e.toString();if(null!=t)for(;o.length0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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(7168),a=n(9305),s=o(n(7518)),u=n(5973),l=n(6492),c=a.internal.temporalUtil.localDateTimeToEpochSecond,f=new Map;function h(e,t,n){var r=function(e){if(!f.has(e)){var t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"});f.set(e,t)}return f.get(e)}(e),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 d(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=h(l,s,u);return d(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=h(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=h(e,i,n);return c(a.year,a.month,a.day,a.hour,a.minute,a.second,n).subtract(i)}(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),h=(0,u.epochSecondAndNanoToLocalDateTime)(f,l);return d(new a.DateTime(h.year,h.month,h.day,h.hour,h.minute,h.second,h.nanosecond,c,null),t,n)}})}}},5184:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var r=n(7110),o=n(7843),i=n(3111);t.observeOn=function(e,t){return void 0===t&&(t=0),o.operate(function(n,o){n.subscribe(i.createOperatorSubscriber(o,function(n){return r.executeSchedule(o,e,function(){return o.next(n)},t)},function(){return r.executeSchedule(o,e,function(){return o.complete()},t)},function(n){return r.executeSchedule(o,e,function(){return o.error(n)},t)}))})}},5250:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],v="[object Arguments]",g="[object Array]",y="[object Boolean]",m="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",x="[object Map]",E="[object Number]",O="[object Object]",S="[object Promise]",T="[object RegExp]",P="[object Set]",C="[object String]",A="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",j="[object Float32Array]",M="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",B="[object Uint8Array]",F="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,q=RegExp(H.source),X=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Oe="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="["+we+"]",Ae="["+Pe+"]",ke="["+xe+"]",Ie="\\d+",Re="["+Ee+"]",je="["+Oe+"]",Me="[^"+we+Pe+Ie+Ee+Oe+Se+"]",Ne="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Se+"]",Ue="\\u200d",ze="(?:"+je+"|"+Me+")",Ve="(?:"+Fe+"|"+Me+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ge="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+ke+"|"+Ne+")?",Ye="["+Te+"]?",qe=Ye+He+"(?:"+Ue+"(?:"+[De,Le,Be].join("|")+")"+Ye+He+")*",Xe="(?:"+[Re,Le,Be].join("|")+")"+qe,Ke="(?:"+[De+ke+"?",ke,Le,Be,Ce].join("|")+")",Ze=RegExp("['’]","g"),$e=RegExp(ke,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ke+qe,"g"),Je=RegExp([Fe+"?"+je+"+"+We+"(?="+[Ae,Fe,"$"].join("|")+")",Ve+"+"+Ge+"(?="+[Ae,Fe+ze,"$"].join("|")+")",Fe+"?"+ze+"+"+We,Fe+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Xe].join("|"),"g"),et=RegExp("["+Ue+we+xe+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[j]=ot[M]=ot[N]=ot[D]=ot[L]=ot[B]=ot[F]=ot[U]=ot[z]=!0,ot[v]=ot[g]=ot[I]=ot[y]=ot[R]=ot[m]=ot[b]=ot[_]=ot[x]=ot[E]=ot[O]=ot[T]=ot[P]=ot[C]=ot[k]=!1;var it={};it[v]=it[g]=it[I]=it[R]=it[y]=it[m]=it[j]=it[M]=it[N]=it[D]=it[L]=it[x]=it[E]=it[O]=it[T]=it[P]=it[C]=it[A]=it[B]=it[F]=it[U]=it[z]=!0,it[b]=it[_]=it[k]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ct||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,vt=pt&<.process,gt=function(){try{return dt&&dt.require&&dt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,mt=gt&>.isDate,bt=gt&>.isMap,_t=gt&>.isRegExp,wt=gt&>.isSet,xt=gt&>.isTypedArray;function Et(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ot(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function kt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function Jt(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var en=Gt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n",""":'"',"'":"'"}),dn=function e(t){var n,r=(t=null==t?ft:dn.defaults(ft.Object(),t,dn.pick(ft,nt))).Array,oe=t.Date,we=t.Error,xe=t.Function,Ee=t.Math,Oe=t.Object,Se=t.RegExp,Te=t.String,Pe=t.TypeError,Ce=r.prototype,Ae=xe.prototype,ke=Oe.prototype,Ie=t["__core-js_shared__"],Re=Ae.toString,je=ke.hasOwnProperty,Me=0,Ne=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=ke.toString,Le=Re.call(Oe),Be=ft._,Fe=Se("^"+Re.call(je).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=pt?t.Buffer:o,ze=t.Symbol,Ve=t.Uint8Array,We=Ue?Ue.allocUnsafe:o,Ge=an(Oe.getPrototypeOf,Oe),He=Oe.create,Ye=ke.propertyIsEnumerable,qe=Ce.splice,Xe=ze?ze.isConcatSpreadable:o,Ke=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=ui(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,lt=oe&&oe.now!==ft.Date.now&&oe.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Ee.ceil,dt=Ee.floor,vt=Oe.getOwnPropertySymbols,gt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Gt=Ce.join,pn=an(Oe.keys,Oe),vn=Ee.max,gn=Ee.min,yn=oe.now,mn=t.parseInt,bn=Ee.random,_n=Ce.reverse,wn=ui(t,"DataView"),xn=ui(t,"Map"),En=ui(t,"Promise"),On=ui(t,"Set"),Sn=ui(t,"WeakMap"),Tn=ui(Oe,"create"),Pn=Sn&&new Sn,Cn={},An=Di(wn),kn=Di(xn),In=Di(En),Rn=Di(On),jn=Di(Sn),Mn=ze?ze.prototype:o,Nn=Mn?Mn.valueOf:o,Dn=Mn?Mn.toString:o;function Ln(e){if(Ja(e)&&!Va(e)&&!(e instanceof zn)){if(e instanceof Un)return e;if(je.call(e,"__wrapped__"))return Li(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!Qa(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Fn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ir(e,t,n,r,i,a){var s,u=1&t,l=2&t,c=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!Qa(e))return e;var f=Va(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return To(e,s)}else{var h=fi(e),d=h==_||h==w;if(Ya(e))return _o(e,u);if(h==O||h==v||d&&!i){if(s=l||d?{}:di(e),!u)return l?function(e,t){return Po(e,ci(e),t)}(e,function(e,t){return e&&Po(t,ks(t),e)}(s,e)):function(e,t){return Po(e,li(e),t)}(e,tr(s,e))}else{if(!it[h])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case I:return wo(e);case y:case m:return new o(+e);case R:return function(e,t){var n=t?wo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case j:case M:case N:case D:case L:case B:case F:case U:case z:return xo(e,n);case x:return new o;case E:case C:return new o(e);case T:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new o;case A:return r=e,Nn?Oe(Nn.call(r)):{}}}(e,h,u)}}a||(a=new Yn);var p=a.get(e);if(p)return p;a.set(e,s),os(e)?e.forEach(function(r){s.add(ir(r,t,n,r,e,a))}):es(e)&&e.forEach(function(r,o){s.set(o,ir(r,t,n,o,e,a))});var g=f?o:(c?l?ti:ei:l?ks:As)(e);return St(g||e,function(r,o){g&&(r=e[o=r]),Qn(s,o,ir(r,t,n,o,e,a))}),s}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Oe(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function sr(e,t,n){if("function"!=typeof e)throw new Pe(i);return Pi(function(){e.apply(o,n)},t)}function ur(e,t,n,r){var o=-1,i=At,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=It(t,Kt(n))),r?(i=kt,a=!1):t.length>=200&&(i=$t,a=!1,t=new Hn(t));e:for(;++o-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=Jn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(xn||Wn),string:new Vn}},Gn.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return ai(this,e).get(e)},Gn.prototype.has=function(e){return ai(this,e).has(e)},Gn.prototype.set=function(e,t){var n=ai(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(e){return this.__data__.set(e,a),this},Hn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var lr=ko(yr),cr=ko(mr,!0);function fr(e,t){var n=!0;return lr(e,function(e,r,o){return n=!!t(e,r,o)}),n}function hr(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?pr(s,t-1,n,r,o):Rt(o,s):r||(o[o.length]=s)}return o}var vr=Io(),gr=Io(!0);function yr(e,t){return e&&vr(e,t,As)}function mr(e,t){return e&&gr(e,t,As)}function br(e,t){return Ct(t,function(t){return Ka(e[t])})}function _r(e,t){for(var n=0,r=(t=go(t,e)).length;null!=e&&nt}function Or(e,t){return null!=e&&je.call(e,t)}function Sr(e,t){return null!=e&&t in Oe(e)}function Tr(e,t,n){for(var i=n?kt:At,a=e[0].length,s=e.length,u=s,l=r(s),c=1/0,f=[];u--;){var h=e[u];u&&t&&(h=It(h,Kt(t))),c=gn(h.length,c),l[u]=!n&&(t||a>=120&&h.length>=120)?new Hn(u&&h):o}h=e[0];var d=-1,p=l[0];e:for(;++d=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(o)}function zr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&qe.call(s,u,1),qe.call(e,u,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;vi(o)?qe.call(e,o,1):so(e,o)}}return e}function Gr(e,t){return e+dt(bn()*(t-e+1))}function Hr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Ci(Ei(e,t,tu),e+"")}function qr(e){return Xn(Bs(e))}function Xr(e,t){var n=Bs(e);return Ii(n,or(t,0,n.length))}function Kr(e,t,n,r){if(!Qa(e))return e;for(var i=-1,a=(t=go(t,e)).length,s=a-1,u=e;null!=u&&++ii?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o>>1,a=e[i];null!==a&&!as(a)&&(n?a<=t:a=200){var l=t?null:Yo(e);if(l)return un(l);a=!1,o=$t,u=new Hn}else u=t?[]:s;e:for(;++r=r?e:Jr(e,t,n)}var bo=at||function(e){return ft.clearTimeout(e)};function _o(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function wo(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function xo(e,t){var n=t?wo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Eo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=as(e),s=t!==o,u=null===t,l=t==t,c=as(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&e1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&gi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Oe(t);++r-1?i[a?t[s]:s]:o}}function Do(e){return Jo(function(t){var n=t.length,r=n,a=Un.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Pe(i);if(a&&!u&&"wrapper"==ri(s))var u=new Un([],!0)}for(r=u?r:n;++r1&&_.reverse(),d&&fu))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var h=-1,d=!0,p=2&n?new Hn:o;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return St(p,function(n){var r="_."+n[0];t&n[1]&&!At(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function ki(e){var t=0,n=0;return function(){var r=yn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ii(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,ra(e,n)});function ca(e){var t=Ln(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var ha=Jo(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return rr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof zn&&vi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:fa,args:[i],thisArg:o}),new Un(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)}),da=Co(function(e,t,n){je.call(e,n)?++e[n]:nr(e,n,1)}),pa=No(zi),va=No(Vi);function ga(e,t){return(Va(e)?St:lr)(e,ii(t,3))}function ya(e,t){return(Va(e)?Tt:cr)(e,ii(t,3))}var ma=Co(function(e,t,n){je.call(e,n)?e[n].push(t):nr(e,n,[t])}),ba=Yr(function(e,t,n){var o=-1,i="function"==typeof t,a=Ga(e)?r(e.length):[];return lr(e,function(e){a[++o]=i?Et(t,e,n):Pr(e,t,n)}),a}),_a=Co(function(e,t,n){nr(e,n,t)});function wa(e,t){return(Va(e)?It:Nr)(e,ii(t,3))}var xa=Co(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ea=Yr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&gi(e,t[0],t[1])?t=[]:n>2&&gi(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,pr(t,1),[])}),Oa=lt||function(){return ft.Date.now()};function Sa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Xo(e,l,o,o,o,o,t)}function Ta(e,t){var n;if("function"!=typeof t)throw new Pe(i);return e=hs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Pa=Yr(function(e,t,n){var r=1;if(n.length){var o=sn(n,oi(Pa));r|=u}return Xo(e,r,t,n,o)}),Ca=Yr(function(e,t,n){var r=3;if(n.length){var o=sn(n,oi(Ca));r|=u}return Xo(t,r,e,n,o)});function Aa(e,t,n){var r,a,s,u,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Pe(i);function v(t){var n=r,i=a;return r=a=o,f=t,u=e.apply(i,n)}function g(e){var n=e-c;return c===o||n>=t||n<0||d&&e-f>=s}function y(){var e=Oa();if(g(e))return m(e);l=Pi(y,function(e){var n=t-(e-c);return d?gn(n,s-(e-f)):n}(e))}function m(e){return l=o,p&&r?v(e):(r=a=o,u)}function b(){var e=Oa(),n=g(e);if(r=arguments,a=this,c=e,n){if(l===o)return function(e){return f=e,l=Pi(y,t),h?v(e):u}(c);if(d)return bo(l),l=Pi(y,t),v(c)}return l===o&&(l=Pi(y,t)),u}return t=ps(t)||0,Qa(n)&&(h=!!n.leading,s=(d="maxWait"in n)?vn(ps(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==o&&bo(l),f=0,r=c=a=l=o},b.flush=function(){return l===o?u:m(Oa())},b}var ka=Yr(function(e,t){return sr(e,1,t)}),Ia=Yr(function(e,t,n){return sr(e,ps(t)||0,n)});function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ra.Cache||Gn),n}function ja(e){if("function"!=typeof e)throw new Pe(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Gn;var Ma=yo(function(e,t){var n=(t=1==t.length&&Va(t[0])?It(t[0],Kt(ii())):It(pr(t,1),Kt(ii()))).length;return Yr(function(r){for(var o=-1,i=gn(r.length,n);++o=t}),za=Cr(function(){return arguments}())?Cr:function(e){return Ja(e)&&je.call(e,"callee")&&!Ye.call(e,"callee")},Va=r.isArray,Wa=yt?Kt(yt):function(e){return Ja(e)&&xr(e)==I};function Ga(e){return null!=e&&$a(e.length)&&!Ka(e)}function Ha(e){return Ja(e)&&Ga(e)}var Ya=gt||pu,qa=mt?Kt(mt):function(e){return Ja(e)&&xr(e)==m};function Xa(e){if(!Ja(e))return!1;var t=xr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ns(e)}function Ka(e){if(!Qa(e))return!1;var t=xr(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==hs(e)}function $a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ja(e){return null!=e&&"object"==typeof e}var es=bt?Kt(bt):function(e){return Ja(e)&&fi(e)==x};function ts(e){return"number"==typeof e||Ja(e)&&xr(e)==E}function ns(e){if(!Ja(e)||xr(e)!=O)return!1;var t=Ge(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==Le}var rs=_t?Kt(_t):function(e){return Ja(e)&&xr(e)==T},os=wt?Kt(wt):function(e){return Ja(e)&&fi(e)==P};function is(e){return"string"==typeof e||!Va(e)&&Ja(e)&&xr(e)==C}function as(e){return"symbol"==typeof e||Ja(e)&&xr(e)==A}var ss=xt?Kt(xt):function(e){return Ja(e)&&$a(e.length)&&!!ot[xr(e)]},us=Wo(Mr),ls=Wo(function(e,t){return e<=t});function cs(e){if(!e)return[];if(Ga(e))return is(e)?cn(e):To(e);if(Ke&&e[Ke])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ke]());var t=fi(e);return(t==x?on:t==P?un:Bs)(e)}function fs(e){return e?(e=ps(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=fs(e),n=t%1;return t==t?n?t-n:t:0}function ds(e){return e?or(hs(e),0,d):0}function ps(e){if("number"==typeof e)return e;if(as(e))return h;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=pe.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function vs(e){return Po(e,ks(e))}function gs(e){return null==e?"":io(e)}var ys=Ao(function(e,t){if(_i(t)||Ga(t))Po(t,As(t),e);else for(var n in t)je.call(t,n)&&Qn(e,n,t[n])}),ms=Ao(function(e,t){Po(t,ks(t),e)}),bs=Ao(function(e,t,n,r){Po(t,ks(t),e,r)}),_s=Ao(function(e,t,n,r){Po(t,As(t),e,r)}),ws=Jo(rr),xs=Yr(function(e,t){e=Oe(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&gi(t[0],t[1],i)&&(r=1);++n1),t}),Po(e,ti(e),n),r&&(n=ir(n,7,$o));for(var o=t.length;o--;)so(n,t[o]);return n}),Ms=Jo(function(e,t){return null==e?{}:function(e,t){return zr(e,t,function(t,n){return Ss(e,n)})}(e,t)});function Ns(e,t){if(null==e)return{};var n=It(ti(e),function(e){return[e]});return t=ii(t),zr(e,n,function(e,n){return t(e,n[0])})}var Ds=qo(As),Ls=qo(ks);function Bs(e){return null==e?[]:Zt(e,As(e))}var Fs=jo(function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)});function Us(e){return Xs(gs(e).toLowerCase())}function zs(e){return(e=gs(e))&&e.replace(me,en).replace($e,"")}var Vs=jo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ws=jo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Gs=Ro("toLowerCase"),Hs=jo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Ys=jo(function(e,t,n){return e+(n?" ":"")+Xs(t)}),qs=jo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Xs=Ro("toUpperCase");function Ks(e,t,n){return e=gs(e),(t=n?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Zs=Yr(function(e,t){try{return Et(e,o,t)}catch(e){return Xa(e)?e:new we(e)}}),$s=Jo(function(e,t){return St(t,function(t){t=Ni(t),nr(e,t,Pa(e[t],e))}),e});function Qs(e){return function(){return e}}var Js=Do(),eu=Do(!0);function tu(e){return e}function nu(e){return Rr("function"==typeof e?e:ir(e,1))}var ru=Yr(function(e,t){return function(n){return Pr(n,e,t)}}),ou=Yr(function(e,t){return function(n){return Pr(e,n,t)}});function iu(e,t,n){var r=As(t),o=br(t,r);null!=n||Qa(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=br(t,As(t)));var i=!(Qa(n)&&"chain"in n&&!n.chain),a=Ka(e);return St(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=To(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Rt([this.value()],arguments))})}),e}function au(){}var su=Uo(It),uu=Uo(Pt),lu=Uo(Nt);function cu(e){return yi(e)?Wt(Ni(e)):function(e){return function(t){return _r(t,e)}}(e)}var fu=Vo(),hu=Vo(!0);function du(){return[]}function pu(){return!1}var vu,gu=Fo(function(e,t){return e+t},0),yu=Ho("ceil"),mu=Fo(function(e,t){return e/t},1),bu=Ho("floor"),_u=Fo(function(e,t){return e*t},1),wu=Ho("round"),xu=Fo(function(e,t){return e-t},0);return Ln.after=function(e,t){if("function"!=typeof t)throw new Pe(i);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Ln.ary=Sa,Ln.assign=ys,Ln.assignIn=ms,Ln.assignInWith=bs,Ln.assignWith=_s,Ln.at=ws,Ln.before=Ta,Ln.bind=Pa,Ln.bindAll=$s,Ln.bindKey=Ca,Ln.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},Ln.chain=ca,Ln.chunk=function(e,t,n){t=(n?gi(e,t,n):t===o)?1:vn(hs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(ht(i/t));ai?0:i+n),(r=r===o||r>i?i:hs(r))<0&&(r+=i),r=n>r?0:ds(r);n>>0)?(e=gs(e))&&("string"==typeof t||null!=t&&!rs(t))&&!(t=io(t))&&rn(e)?mo(cn(e),0,n):e.split(t,n):[]},Ln.spread=function(e,t){if("function"!=typeof e)throw new Pe(i);return t=null==t?0:vn(hs(t),0),Yr(function(n){var r=n[t],o=mo(n,0,t);return r&&Rt(o,r),Et(e,this,o)})},Ln.tail=function(e){var t=null==e?0:e.length;return t?Jr(e,1,t):[]},Ln.take=function(e,t,n){return e&&e.length?Jr(e,0,(t=n||t===o?1:hs(t))<0?0:t):[]},Ln.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Jr(e,(t=r-(t=n||t===o?1:hs(t)))<0?0:t,r):[]},Ln.takeRightWhile=function(e,t){return e&&e.length?lo(e,ii(t,3),!1,!0):[]},Ln.takeWhile=function(e,t){return e&&e.length?lo(e,ii(t,3)):[]},Ln.tap=function(e,t){return t(e),e},Ln.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Pe(i);return Qa(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Aa(e,t,{leading:r,maxWait:t,trailing:o})},Ln.thru=fa,Ln.toArray=cs,Ln.toPairs=Ds,Ln.toPairsIn=Ls,Ln.toPath=function(e){return Va(e)?It(e,Ni):as(e)?[e]:To(Mi(gs(e)))},Ln.toPlainObject=vs,Ln.transform=function(e,t,n){var r=Va(e),o=r||Ya(e)||ss(e);if(t=ii(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Qa(e)&&Ka(i)?Bn(Ge(e)):{}}return(o?St:yr)(e,function(e,r,o){return t(n,e,r,o)}),n},Ln.unary=function(e){return Sa(e,1)},Ln.union=Ji,Ln.unionBy=ea,Ln.unionWith=ta,Ln.uniq=function(e){return e&&e.length?ao(e):[]},Ln.uniqBy=function(e,t){return e&&e.length?ao(e,ii(t,2)):[]},Ln.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?ao(e,o,t):[]},Ln.unset=function(e,t){return null==e||so(e,t)},Ln.unzip=na,Ln.unzipWith=ra,Ln.update=function(e,t,n){return null==e?e:uo(e,t,vo(n))},Ln.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:uo(e,t,vo(n),r)},Ln.values=Bs,Ln.valuesIn=function(e){return null==e?[]:Zt(e,ks(e))},Ln.without=oa,Ln.words=Ks,Ln.wrap=function(e,t){return Na(vo(t),e)},Ln.xor=ia,Ln.xorBy=aa,Ln.xorWith=sa,Ln.zip=ua,Ln.zipObject=function(e,t){return ho(e||[],t||[],Qn)},Ln.zipObjectDeep=function(e,t){return ho(e||[],t||[],Kr)},Ln.zipWith=la,Ln.entries=Ds,Ln.entriesIn=Ls,Ln.extend=ms,Ln.extendWith=bs,iu(Ln,Ln),Ln.add=gu,Ln.attempt=Zs,Ln.camelCase=Fs,Ln.capitalize=Us,Ln.ceil=yu,Ln.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=ps(n))==n?n:0),t!==o&&(t=(t=ps(t))==t?t:0),or(ps(e),t,n)},Ln.clone=function(e){return ir(e,4)},Ln.cloneDeep=function(e){return ir(e,5)},Ln.cloneDeepWith=function(e,t){return ir(e,5,t="function"==typeof t?t:o)},Ln.cloneWith=function(e,t){return ir(e,4,t="function"==typeof t?t:o)},Ln.conformsTo=function(e,t){return null==t||ar(e,t,As(t))},Ln.deburr=zs,Ln.defaultTo=function(e,t){return null==e||e!=e?t:e},Ln.divide=mu,Ln.endsWith=function(e,t,n){e=gs(e),t=io(t);var r=e.length,i=n=n===o?r:or(hs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Ln.eq=Ba,Ln.escape=function(e){return(e=gs(e))&&X.test(e)?e.replace(Y,tn):e},Ln.escapeRegExp=function(e){return(e=gs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Ln.every=function(e,t,n){var r=Va(e)?Pt:fr;return n&&gi(e,t,n)&&(t=o),r(e,ii(t,3))},Ln.find=pa,Ln.findIndex=zi,Ln.findKey=function(e,t){return Lt(e,ii(t,3),yr)},Ln.findLast=va,Ln.findLastIndex=Vi,Ln.findLastKey=function(e,t){return Lt(e,ii(t,3),mr)},Ln.floor=bu,Ln.forEach=ga,Ln.forEachRight=ya,Ln.forIn=function(e,t){return null==e?e:vr(e,ii(t,3),ks)},Ln.forInRight=function(e,t){return null==e?e:gr(e,ii(t,3),ks)},Ln.forOwn=function(e,t){return e&&yr(e,ii(t,3))},Ln.forOwnRight=function(e,t){return e&&mr(e,ii(t,3))},Ln.get=Os,Ln.gt=Fa,Ln.gte=Ua,Ln.has=function(e,t){return null!=e&&hi(e,t,Or)},Ln.hasIn=Ss,Ln.head=Gi,Ln.identity=tu,Ln.includes=function(e,t,n,r){e=Ga(e)?e:Bs(e),n=n&&!r?hs(n):0;var o=e.length;return n<0&&(n=vn(o+n,0)),is(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ft(e,t,n)>-1},Ln.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=vn(r+o,0)),Ft(e,t,o)},Ln.inRange=function(e,t,n){return t=fs(t),n===o?(n=t,t=0):n=fs(n),function(e,t,n){return e>=gn(t,n)&&e=-9007199254740991&&e<=f},Ln.isSet=os,Ln.isString=is,Ln.isSymbol=as,Ln.isTypedArray=ss,Ln.isUndefined=function(e){return e===o},Ln.isWeakMap=function(e){return Ja(e)&&fi(e)==k},Ln.isWeakSet=function(e){return Ja(e)&&"[object WeakSet]"==xr(e)},Ln.join=function(e,t){return null==e?"":Gt.call(e,t)},Ln.kebabCase=Vs,Ln.last=Xi,Ln.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=hs(n))<0?vn(r+i,0):gn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Bt(e,zt,i,!0)},Ln.lowerCase=Ws,Ln.lowerFirst=Gs,Ln.lt=us,Ln.lte=ls,Ln.max=function(e){return e&&e.length?hr(e,tu,Er):o},Ln.maxBy=function(e,t){return e&&e.length?hr(e,ii(t,2),Er):o},Ln.mean=function(e){return Vt(e,tu)},Ln.meanBy=function(e,t){return Vt(e,ii(t,2))},Ln.min=function(e){return e&&e.length?hr(e,tu,Mr):o},Ln.minBy=function(e,t){return e&&e.length?hr(e,ii(t,2),Mr):o},Ln.stubArray=du,Ln.stubFalse=pu,Ln.stubObject=function(){return{}},Ln.stubString=function(){return""},Ln.stubTrue=function(){return!0},Ln.multiply=_u,Ln.nth=function(e,t){return e&&e.length?Fr(e,hs(t)):o},Ln.noConflict=function(){return ft._===this&&(ft._=Be),this},Ln.noop=au,Ln.now=Oa,Ln.pad=function(e,t,n){e=gs(e);var r=(t=hs(t))?ln(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return zo(dt(o),n)+e+zo(ht(o),n)},Ln.padEnd=function(e,t,n){e=gs(e);var r=(t=hs(t))?ln(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=bn();return gn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Gr(e,t)},Ln.reduce=function(e,t,n){var r=Va(e)?jt:Ht,o=arguments.length<3;return r(e,ii(t,4),n,o,lr)},Ln.reduceRight=function(e,t,n){var r=Va(e)?Mt:Ht,o=arguments.length<3;return r(e,ii(t,4),n,o,cr)},Ln.repeat=function(e,t,n){return t=(n?gi(e,t,n):t===o)?1:hs(t),Hr(gs(e),t)},Ln.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Ln.result=function(e,t,n){var r=-1,i=(t=go(t,e)).length;for(i||(i=1,e=o);++rf)return[];var n=d,r=gn(e,d);t=ii(t),e-=d;for(var o=qt(r,t);++n=a)return e;var u=n-ln(r);if(u<1)return r;var l=s?mo(s,0,u).join(""):e.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),rs(i)){if(e.slice(u).search(i)){var c,f=l;for(i.global||(i=Se(i.source,gs(he.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(e.indexOf(io(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Ln.unescape=function(e){return(e=gs(e))&&q.test(e)?e.replace(H,hn):e},Ln.uniqueId=function(e){var t=++Me;return gs(e)+t},Ln.upperCase=qs,Ln.upperFirst=Xs,Ln.each=ga,Ln.eachRight=ya,Ln.first=Gi,iu(Ln,(vu={},yr(Ln,function(e,t){je.call(Ln.prototype,t)||(vu[t]=e)}),vu),{chain:!1}),Ln.VERSION="4.17.21",St(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Ln[e].placeholder=Ln}),St(["drop","take"],function(e,t){zn.prototype[e]=function(n){n=n===o?1:vn(hs(n),0);var r=this.__filtered__&&!t?new zn(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),St(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ii(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),St(["head","last"],function(e,t){var n="take"+(t?"Right":"");zn.prototype[e]=function(){return this[n](1).value()[0]}}),St(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");zn.prototype[e]=function(){return this.__filtered__?new zn(this):this[n](1)}}),zn.prototype.compact=function(){return this.filter(tu)},zn.prototype.find=function(e){return this.filter(e).head()},zn.prototype.findLast=function(e){return this.reverse().find(e)},zn.prototype.invokeMap=Yr(function(e,t){return"function"==typeof e?new zn(this):this.map(function(n){return Pr(n,e,t)})}),zn.prototype.reject=function(e){return this.filter(ja(ii(e)))},zn.prototype.slice=function(e,t){e=hs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new zn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=hs(t))<0?n.dropRight(-t):n.take(t-e)),n)},zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zn.prototype.toArray=function(){return this.take(d)},yr(zn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Ln[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Ln.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof zn,l=s[0],c=u||Va(t),f=function(e){var t=i.apply(Ln,Rt([e],s));return r&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=u&&!d;if(!a&&c){t=v?t:new zn(this);var g=e.apply(t,s);return g.__actions__.push({func:fa,args:[f],thisArg:o}),new Un(g,h)}return p&&v?e.apply(this,s):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})}),St(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Ln.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Va(o)?o:[],e)}return this[n](function(n){return t.apply(Va(n)?n:[],e)})}}),yr(zn.prototype,function(e,t){var n=Ln[t];if(n){var r=n.name+"";je.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}}),Cn[Lo(o,2).name]=[{name:"wrapper",func:o}],zn.prototype.clone=function(){var e=new zn(this.__wrapped__);return e.__actions__=To(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=To(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=To(this.__views__),e},zn.prototype.reverse=function(){if(this.__filtered__){var e=new zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Va(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Ln.prototype.plant=function(e){for(var t,n=this;n instanceof Fn;){var r=Li(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Ln.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zn){var t=e;return this.__actions__.length&&(t=new zn(this)),(t=t.reverse()).__actions__.push({func:fa,args:[Qi],thisArg:o}),new Un(t,this.__chain__)}return this.thru(Qi)},Ln.prototype.toJSON=Ln.prototype.valueOf=Ln.prototype.value=function(){return co(this.__wrapped__,this.__actions__)},Ln.prototype.first=Ln.prototype.head,Ke&&(Ln.prototype[Ke]=function(){return this}),Ln}();ft._=dn,(r=function(){return dn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},5267:function(e,t,n){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}),t.AsyncAction=void 0;var o=n(4671),i=n(5649),a=n(7479),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(o,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),i.intervalProvider.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&i.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a.arrRemove(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=s},5319:function(e,t,n){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.alloc=void 0;var i=o(n(1048)),a=function(e){function t(t){var n=this,r=function(e){return e instanceof i.default.Buffer?e:"number"==typeof e&&"function"==typeof i.default.Buffer.alloc?i.default.Buffer.alloc(e):new i.default.Buffer(e)}(t);return(n=e.call(this,r.length)||this)._buffer=r,n}return r(t,e),t.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},t.prototype.getInt8=function(e){return this._buffer.readInt8(e)},t.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},t.prototype.getVarInt=function(e){for(var t=0,n=this._buffer.readInt8(e+t),r=n%128;n/128>=1;)t+=1,r+=(n=this._buffer.readInt8(e+t))%128;return{length:t+1,value:r}},t.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},t.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},t.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},t.prototype.putBytes=function(n,r){if(r instanceof t){var o=Math.min(r.length-r.position,this.length-n);r._buffer.copy(this._buffer,n,r.position,r.position+o),r.position+=o}else e.prototype.putBytes.call(this,n,r)},t.prototype.getSlice=function(e,n){return new t(this._buffer.slice(e,e+n))},t}(o(n(7174)).default);t.default=a,t.alloc=function(e){return new a(e)}},5337:function(e,t,n){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(e){o={error:e}}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.fromEvent=void 0;var o=n(9445),i=n(4662),a=n(983),s=n(8046),u=n(1018),l=n(1251),c=["addListener","removeListener"],f=["addEventListener","removeEventListener"],h=["on","off"];function d(e,t){return function(n){return function(r){return e[n](t,r)}}}t.fromEvent=function e(t,n,p,v){if(u.isFunction(p)&&(v=p,p=void 0),v)return e(t,n,p).pipe(l.mapOneOrManyArgs(v));var g=r(function(e){return u.isFunction(e.addEventListener)&&u.isFunction(e.removeEventListener)}(t)?f.map(function(e){return function(r){return t[e](n,r,p)}}):function(e){return u.isFunction(e.addListener)&&u.isFunction(e.removeListener)}(t)?c.map(d(t,n)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?h.map(d(t,n)):[],2),y=g[0],m=g[1];if(!y&&s.isArrayLike(t))return a.mergeMap(function(t){return e(t,n,p)})(o.innerFrom(t));if(!y)throw new TypeError("Invalid event target");return new i.Observable(function(e){var t=function(){for(var t=[],n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.Unpacker=t.Packer=void 0;var r=n(7452),o=n(6781),i=n(7665),a=n(9305),s=a.error.PROTOCOL_ERROR,u=function(){function e(e){this._ch=e,this._byteArraysSupported=!0}return e.prototype.packable=function(e,t){var n,r=this;void 0===t&&(t=o.functional.identity);try{e=t(e)}catch(e){return function(){throw e}}if(null===e)return function(){return r._ch.writeUInt8(192)};if(!0===e)return function(){return r._ch.writeUInt8(195)};if(!1===e)return function(){return r._ch.writeUInt8(194)};if("number"==typeof e)return function(){return r.packFloat(e)};if("string"==typeof e)return function(){return r.packString(e)};if("bigint"==typeof e)return function(){return r.packInteger((0,a.int)(e))};if((0,a.isInt)(e))return function(){return r.packInteger(e)};if(e instanceof Int8Array)return function(){return r.packBytes(e)};if(e instanceof Array)return function(){r.packListHeader(e.length);for(var n=0;n=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;o{Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var r=n(7843),o=n(3111),i=n(1342),a=n(9445);t.distinct=function(e,t){return r.operate(function(n,r){var s=new Set;n.subscribe(o.createOperatorSubscriber(r,function(t){var n=e?e(t):t;s.has(n)||(s.add(n),r.next(t))})),t&&a.innerFrom(t).subscribe(o.createOperatorSubscriber(r,function(){return s.clear()},i.noop))})}},5382:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var r=n(2823),o=n(1505),i=n(1759),a=n(7843),s=n(3111);t.single=function(e){return a.operate(function(t,n){var a,u=!1,l=!1,c=0;t.subscribe(s.createOperatorSubscriber(n,function(r){l=!0,e&&!e(r,c++,t)||(u&&n.error(new o.SequenceError("Too many matching values")),u=!0,a=r)},function(){u?(n.next(a),n.complete()):n.error(l?new i.NotFoundError("No matching values"):new r.EmptyError)}))})}},5442:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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(5022)),u=n(6587),l=n(9691),c=i(n(3371)),f={value:!0,enumerable:!1,configurable:!1,writable:!1},h="__isDuration__",d="__isLocalTime__",p="__isTime__",v="__isDate__",g="__isLocalDateTime__",y="__isDateTime__",m=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=m,Object.defineProperty(m.prototype,h,f),t.isDuration=function(e){return O(e,h)};var b=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){T(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=b,Object.defineProperty(b.prototype,d,f),t.isLocalTime=function(e){return O(e,d)};var _=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 T(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=_,Object.defineProperty(_.prototype,p,f),t.isTime=function(e){return O(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 T(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 O(e,v)};var x=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 T(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 S(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},e}();t.LocalDateTime=x,Object.defineProperty(x.prototype,g,f),t.isLocalDateTime=function(e){return O(e,g)};var E=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,r=null!=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];return 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),o}(f,h),2),p=d[0],v=d[1];this.timeZoneOffsetSeconds=p,this.timeZoneId=null!=v?v:void 0,Object.freeze(this)}return e.fromStandardDate=function(t,n){return T(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 S(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 O(e,t){return null!=e&&!0===e[t]}function S(e,t,n,r,o,i,a){return s.dateToIsoString(e,t,n)+"T"+s.timeToIsoString(r,o,i,a)}function T(e,t){(0,u.assertValidDate)(e,"Standard date"),null!=t&&(0,u.assertNumberOrInteger)(t,"Nanosecond")}t.DateTime=E,Object.defineProperty(E.prototype,y,f),t.isDateTime=function(e){return O(e,y)}},5471:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var r=n(7843),o=n(3111);t.map=function(e,t){return r.operate(function(n,r){var i=0;n.subscribe(o.createOperatorSubscriber(r,function(n){r.next(e.call(t,n,i++))}))})}},5477:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var r=n(2483),o=n(7843),i=n(3111),a=n(1342),s=n(9445);t.window=function(e){return o.operate(function(t,n){var o=new r.Subject;n.next(o.asObservable());var u=function(e){o.error(e),n.error(e)};return t.subscribe(i.createOperatorSubscriber(n,function(e){return null==o?void 0:o.next(e)},function(){o.complete(),n.complete()},u)),s.innerFrom(e).subscribe(i.createOperatorSubscriber(n,function(){o.complete(),n.next(o=new r.Subject)},a.noop,u)),function(){null==o||o.unsubscribe(),o=null}})}},5481:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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(e){o={error:e}}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;o{Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var r=n(7843),o=n(3111);t.every=function(e,t){return r.operate(function(n,r){var i=0;n.subscribe(o.createOperatorSubscriber(r,function(o){e.call(t,o,i++,n)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})}},5553:function(e,t,n){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(7174),i=n(5319),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},5568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},5572:function(e,t,n){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.bufferCount=void 0;var o=n(7843),i=n(3111),a=n(7479);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,o.operate(function(n,o){var s=[],u=0;n.subscribe(i.createOperatorSubscriber(o,function(n){var i,l,c,f,h=null;u++%t===0&&s.push([]);try{for(var d=r(s),p=d.next();!p.done;p=d.next())(y=p.value).push(n),e<=y.length&&(h=null!=h?h:[]).push(y)}catch(e){i={error:e}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(i)throw i.error}}if(h)try{for(var v=r(h),g=v.next();!g.done;g=v.next()){var y=g.value;a.arrRemove(s,y),o.next(y)}}catch(e){c={error:e}}finally{try{g&&!g.done&&(f=v.return)&&f.call(v)}finally{if(c)throw c.error}}},function(){var e,t;try{for(var n=r(s),i=n.next();!i.done;i=n.next()){var a=i.value;o.next(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}o.complete()},void 0,function(){s=null}))})}},5584:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var r=n(4662),o=n(9445),i=n(8535),a=n(3111);function s(e){return function(t){for(var n=[],r=function(r){n.push(o.innerFrom(e[r]).subscribe(a.createOperatorSubscriber(t,function(e){if(n){for(var o=0;o{var r=n(7192);r=r.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)}),e.exports=r.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},5600:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{var r=n(1048),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},5642:function(e,t,n){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(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var r=n(5568);t.UnsubscriptionError=r.createErrorClass(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}})},5815:function(e,t,n){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;n{Object.defineProperty(t,"__esModule",{value:!0}),t.fromVersion=void 0,t.fromVersion=function(e,t){void 0===t&&(t=function(){return{get userAgent(){}}});var n=t(),r=null!=n.userAgent?n.userAgent.split("(")[1].split(")")[0]:void 0,o=n.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:o}}},5880:function(e,t,n){var r,o;r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],o={},i=null;function a(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var n=this.getLevel(),o=0;o=0&&t<=f.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),f.name=e,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=n||c,f.getLevel=function(){return null!=l?l:null!=s?s:a},f.setLevel=function(e,n){return l=p(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+n+";"}catch(e){}}}(l),u.call(f)},f.setDefaultLevel=function(e){s=p(e),d()||f.setLevel(e,!1)},f.resetLevel=function(){l=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),u.call(f)},f.enableAll=function(e){f.setLevel(f.levels.TRACE,e)},f.disableAll=function(e){f.setLevel(f.levels.SILENT,e)},f.rebuild=function(){if(i!==f&&(a=p(i.getLevel())),u.call(f),i===f)for(var e in o)o[e].rebuild()},a=p(i?i.getLevel():"WARN");var v=d();null!=v&&(l=p(v)),u.call(f)}(i=new f).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=o[e];return t||(t=o[e]=new f(e,i.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return i.noConflict=function(){return typeof window!==t&&window.log===i&&(window.log=h),i},i.getLoggers=function(){return o},i.default=i,i},void 0===(o=r.call(t,n,t,e))||(e.exports=o)},5909:(e,t)=>{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},5918:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.epochSecondAndNanoToLocalDateTime=t.nanoOfDayToLocalTime=t.epochDayToDate=void 0;var r=n(9305),o=r.internal.temporalUtil,i=o.DAYS_0000_TO_1970,a=o.DAYS_PER_400_YEAR_CYCLE,s=o.NANOS_PER_HOUR,u=o.NANOS_PER_MINUTE,l=o.NANOS_PER_SECOND,c=o.SECONDS_PER_DAY,f=o.floorDiv,h=o.floorMod;function d(e){var t=(e=(0,r.int)(e)).add(i).subtract(60),n=(0,r.int)(0);if(t.lessThan(0)){var o=t.add(1).div(a).subtract(1);n=o.multiply(400),t=t.add(o.multiply(-a))}var s=t.multiply(400).add(591).div(a),u=t.subtract(s.multiply(365).add(s.div(4)).subtract(s.div(100)).add(s.div(400)));u.lessThan(0)&&(s=s.subtract(1),u=t.subtract(s.multiply(365).add(s.div(4)).subtract(s.div(100)).add(s.div(400)))),s=s.add(n);var l=u,c=l.multiply(5).add(2).div(153),f=c.add(2).modulo(12).add(1),h=l.subtract(c.multiply(306).add(5).div(10)).add(1);return s=s.add(c.div(10)),new r.Date(s,f,h)}function p(e){var t=(e=(0,r.int)(e)).div(s),n=(e=e.subtract(t.multiply(s))).div(u),o=(e=e.subtract(n.multiply(u))).div(l),i=e.subtract(o.multiply(l));return new r.LocalTime(t,n,o,i)}t.epochDayToDate=d,t.nanoOfDayToLocalTime=p,t.epochSecondAndNanoToLocalDateTime=function(e,t){var n=f(e,c),o=h(e,c).multiply(l).add(t),i=d(n),a=p(o);return new r.LocalDateTime(i.year,i.month,i.day,a.hour,a.minute,a.second,a.nanosecond)}},6013:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce(function(e,n,r){return e[n]=t[r],e},{})}},6030:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.cacheKey=void 0;var r=n(4027);t.cacheKey=function(e,t){var n;return null!=t?"basic:"+t:void 0===e?"DEFAULT":"basic"===e.scheme?"basic:"+(null!==(n=e.principal)&&void 0!==n?n:""):"kerberos"===e.scheme?"kerberos:"+e.credentials:"bearer"===e.scheme?"bearer:"+e.credentials:"none"===e.scheme?"none":(0,r.stringify)(e,{sortedElements:!0})}},6033:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Stats=t.QueryStatistics=t.ProfiledPlan=t.Plan=t.ServerInfo=t.queryType=void 0;var r=n(6995),o=n(1866),i=function(){function e(e,t,n,r){var i,c,f;this.query={text:e,parameters:t},this.queryType=n.type,this.counters=new u(null!==(i=n.stats)&&void 0!==i?i:{}),this.updateStatistics=this.counters,this.plan=(null!=n.plan||null!=n.profile)&&new a(null!==(c=n.plan)&&void 0!==c?c:n.profile),this.profile=null!=n.profile&&new s(n.profile),this.notifications=(0,o.buildNotificationsFromMetadata)(n),this.gqlStatusObjects=(0,o.buildGqlStatusObjectFromMetadata)(n),this.server=new l(n.server,r),this.resultConsumedAfter=n.result_consumed_after,this.resultAvailableAfter=n.result_available_after,this.database={name:null!==(f=n.db)&&void 0!==f?f:null}}return e.prototype.hasPlan=function(){return this.plan instanceof a},e.prototype.hasProfile=function(){return this.profile instanceof s},e}(),a=function e(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.children=null!=t.children?t.children.map(function(t){return new e(t)}):[]};t.Plan=a;var s=function(){function e(t){this.operatorType=t.operatorType,this.identifiers=t.identifiers,this.arguments=t.args,this.dbHits=c("dbHits",t),this.rows=c("rows",t),this.pageCacheMisses=c("pageCacheMisses",t),this.pageCacheHits=c("pageCacheHits",t),this.pageCacheHitRatio=c("pageCacheHitRatio",t),this.time=c("time",t),this.children=null!=t.children?t.children.map(function(t){return new e(t)}):[]}return e.prototype.hasPageCacheStats=function(){return this.pageCacheMisses>0||this.pageCacheHits>0||this.pageCacheHitRatio>0},e}();t.ProfiledPlan=s,t.Stats=function(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0};var u=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 o=n.replace(/(-\w)/g,function(e){return e[1].toUpperCase()});o in t._stats?t._stats[o]=r.util.toNumber(e[n]):"systemUpdates"===o?t._systemUpdates=r.util.toNumber(e[n]):"containsSystemUpdates"===o?t._containsSystemUpdates=e[n]:"containsUpdates"===o&&(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=u;var l=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function c(e,t,n){if(void 0===n&&(n=0),!1!==t&&e in t){var o=t[e];return r.util.toNumber(o)}return n}t.ServerInfo=l,t.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},t.default=i},6038:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6086:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var r=n(7961),o=n(1731),i=n(6472);t.sampleTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),o.sample(i.interval(e,t))}},6102:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var r=n(4662),o=n(8535),i=n(3111),a=n(1342),s=n(9445);t.onErrorResumeNext=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var r=n(95),o=n(8918);t.publishLast=function(){return function(e){var t=new r.AsyncSubject;return new o.ConnectableObservable(e,function(){return t})}}},6161:function(e,t,n){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(e){o={error:e}}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.apiTransactionConfig)?r({},null==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?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(e){return Promise.reject(e)}},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},6245:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(5319)),i=n(9305),a=i.internal.util,s=a.ENCRYPTION_OFF,u=a.ENCRYPTION_ON,l=function(){function e(e,t,n){void 0===t&&(t=c),void 0===n&&(n=function(e){return new WebSocket(e)});var r=this;this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null;var a=function(e,t){var n=function(e){return!0===e.encrypted||e.encrypted===u}(e),r=function(e){return!1===e.encrypted||e.encrypted===s}(e),o=e.trust,a=function(e){var t="function"==typeof e?e():"";return t&&t.toLowerCase().indexOf("https")>=0}(t);return 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?{scheme:"ws",error:null}:a?{scheme:"wss",error:null}:n?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}:{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(r){if(function(e,t){return"SyntaxError"===e.name&&"["===(n=t.asHostPort()).charAt(0)&&-1!==n.indexOf("]");var n}(r,t)){var o=function(e,t){var n=t.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(n,":").concat(t.port())}(e,t);return n(o)}throw r}}(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)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var r=n(1964),o=n(1018);t.isIterable=function(e){return o.isFunction(null==e?void 0:e[r.iterator])}},6377:function(e,t,n){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;n{Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var r=n(3111);t.scanInternals=function(e,t,n,o,i){return function(a,s){var u=n,l=t,c=0;a.subscribe(r.createOperatorSubscriber(s,function(t){var n=c++;l=u?e(l,t,n):(u=!0,t),o&&s.next(l)},i&&function(){u&&s.next(l),s.complete()}))}}},6385:function(e,t,n){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(7666);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}),Object.defineProperty(t.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){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(9305).Connection);t.default=o},6445:function(e,t,n){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(4596)),a=n(9305),s=o(n(5348)),u=o(n(3321)),l=a.internal.constants.BOLT_PROTOCOL_V4_2,c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transformer",{get:function(){var e=this;return void 0===this._transformer&&(this._transformer=new u.default(Object.values(s.default).map(function(t){return t(e._config,e._log)}))),this._transformer},enumerable:!1,configurable:!0}),t}(i.default);t.default=c},6472:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var r=n(7961),o=n(4092);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=r.asyncScheduler),e<0&&(e=0),o.timer(e,e,t)}},6492:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reuseOngoingRequest=t.identity=void 0;var r=n(9305);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{Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var r=n(9568),o=n(5471);t.timestamp=function(e){return void 0===e&&(e=r.dateTimestampProvider),o.map(function(t){return{value:t,timestamp:e.now()}})}},6544:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(9305),i=r(n(8320)),a=r(n(2857)),s=r(n(5642)),u=r(n(2539)),l=r(n(4596)),c=r(n(6445)),f=r(n(9054)),h=r(n(1711)),d=r(n(844)),p=r(n(6345)),v=r(n(934)),g=r(n(9125)),y=r(n(9744)),m=r(n(5815)),b=r(n(6890)),_=r(n(6377)),w=r(n(1092)),x=(n(7452),r(n(2578)));t.default=function(e){var t=void 0===e?{}:e,n=t.version,r=t.chunker,E=t.dechunker,O=t.channel,S=t.disableLosslessIntegers,T=t.useBigInt,P=t.serversideRouting,C=t.server,A=t.log,k=t.observer;return function(e,t,n,r,x,E,O,S){switch(e){case 1:return new i.default(t,n,r,E,S,O);case 2:return new a.default(t,n,r,E,S,O);case 3:return new s.default(t,n,r,E,S,O);case 4:return new u.default(t,n,r,E,S,O);case 4.1:return new l.default(t,n,r,E,S,O,x);case 4.2:return new c.default(t,n,r,E,S,O,x);case 4.3:return new f.default(t,n,r,E,S,O,x);case 4.4:return new h.default(t,n,r,E,S,O,x);case 5:return new d.default(t,n,r,E,S,O,x);case 5.1:return new p.default(t,n,r,E,S,O,x);case 5.2:return new v.default(t,n,r,E,S,O,x);case 5.3:return new g.default(t,n,r,E,S,O,x);case 5.4:return new y.default(t,n,r,E,S,O,x);case 5.5:return new m.default(t,n,r,E,S,O,x);case 5.6:return new b.default(t,n,r,E,S,O,x);case 5.7:return new _.default(t,n,r,E,S,O,x);case 5.8:return new w.default(t,n,r,E,S,O,x);default:throw(0,o.newError)("Unknown Bolt protocol version: "+e)}}(n,C,r,{disableLosslessIntegers:S,useBigInt:T},P,function(e){var t=new x.default({transformMetadata:e.transformMetadata.bind(e),enrichErrorMetadata:e.enrichErrorMetadata.bind(e),log:A,observer:k});return O.onerror=k.onError.bind(k),O.onmessage=function(e){return E.write(e)},E.onmessage=function(n){try{t.handleResponse(e.unpack(n))}catch(e){return k.onError(e)}},t},k.onProtocolError.bind(k),A)}},6566:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var r=n(9445),o=n(2483),i=n(7843),a=n(3111);t.repeatWhen=function(e){return i.operate(function(t,n){var i,s,u=!1,l=!1,c=!1,f=function(){return c&&l&&(n.complete(),!0)},h=function(){c=!1,i=t.subscribe(a.createOperatorSubscriber(n,void 0,function(){c=!0,!f()&&(s||(s=new o.Subject,r.innerFrom(e(s)).subscribe(a.createOperatorSubscriber(n,function(){i?h():u=!0},function(){l=!0,f()}))),s).next()})),u&&(i.unsubscribe(),i=null,u=!1,h())};h()})}},6586:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var r=n(983),o=n(1018);t.mergeMapTo=function(e,t,n){return void 0===n&&(n=1/0),o.isFunction(t)?r.mergeMap(function(){return e},t,n):("number"==typeof t&&(n=t),r.mergeMap(function(){return e},n))}},6587:function(e,t,n){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.__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.toNumber=t.assertValidDate=t.assertNumberOrInteger=t.assertNumber=t.assertString=t.assertObject=t.isString=t.isObject=t.isEmptyObjectOrNull=void 0;var s=i(n(3371)),u=n(4027);function l(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function c(e,t){if(!f(e))throw new TypeError((0,u.stringify)(t)+" expected to be string but was: "+(0,u.stringify)(e));return e}function f(e){return"[object String]"===Object.prototype.toString.call(e)}t.ENCRYPTION_ON="ENCRYPTION_ON",t.ENCRYPTION_OFF="ENCRYPTION_OFF",t.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!l(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},t.isObject=l,t.validateQueryAndParameters=function(e,t,n){var r,o,i="",a=null!=t?t:{},s=null!==(r=null==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,a=null!==(o=e.parameters)&&void 0!==o?o:{}),s||(function(e){if(c(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")}(i),function(e){if(!l(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)))}}(a)),{validatedQuery:i,params:a}},t.assertObject=function(e,t){if(!l(e))throw new TypeError(t+" expected to be an object but was: "+(0,u.stringify)(e));return e},t.assertString=c,t.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,u.stringify)(e));return e},t.assertNumberOrInteger=function(e,t){if("number"!=typeof e&&"bigint"!=typeof e&&!(0,s.isInt)(e))throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,u.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,u.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,u.stringify)(e));return e},t.isString=f,t.equals=function e(t,n){var r,o;if(t===n)return!0;if(null===t||null===n)return!1;if("object"==typeof t&&"object"==typeof n){var i=Object.keys(t),s=Object.keys(n);if(i.length!==s.length)return!1;try{for(var u=a(i),l=u.next();!l.done;l=u.next()){var c=l.value;if(!e(t[c],n[c]))return!1}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return!0}return!1},t.toNumber=function(e){return e instanceof s.default?e.toNumber():"bigint"==typeof e?(0,s.int)(e).toNumber():e}},6625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var r=n(6728);t.combineAll=r.combineLatestAll},6637:function(e,t,n){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.windowToggle=void 0;var o=n(2483),i=n(8014),a=n(7843),s=n(9445),u=n(3111),l=n(1342),c=n(7479);t.windowToggle=function(e,t){return a.operate(function(n,a){var f=[],h=function(e){for(;0{Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},6661:function(e,t,n){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(e){o={error:e}}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(9305),i=n(7168),a=n(3321),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)}})}}},6672:function(e,t,n){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.packstream=t.channel=t.buf=t.bolt=t.loadBalancing=void 0,t.loadBalancing=i(n(4455)),t.bolt=i(n(7666)),t.buf=i(n(7174)),t.channel=i(n(7452)),t.packstream=i(n(7168)),a(n(9689),t)},6702:function(e,t){var n=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.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(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return!0}return!1}},6728:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var r=n(3247),o=n(3638);t.combineLatestAll=function(e){return o.joinAllInternals(r.combineLatest,e)}},6746:function(e,t,n){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.windowCount=void 0;var o=n(2483),i=n(7843),a=n(3111);t.windowCount=function(e,t){void 0===t&&(t=0);var n=t>0?t:e;return i.operate(function(t,i){var s=[new o.Subject],u=0;i.next(s[0].asObservable()),t.subscribe(a.createOperatorSubscriber(i,function(t){var a,l;try{for(var c=r(s),f=c.next();!f.done;f=c.next())f.value.next(t)}catch(e){a={error:e}}finally{try{f&&!f.done&&(l=c.return)&&l.call(c)}finally{if(a)throw a.error}}var h=u-e+1;if(h>=0&&h%n===0&&s.shift().complete(),++u%n===0){var d=new o.Subject;s.push(d),i.next(d.asObservable())}},function(){for(;s.length>0;)s.shift().complete();i.complete()},function(e){for(;s.length>0;)s.shift().error(e);i.error(e)},function(){s=null}))})}},6755:function(e,t){var n=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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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())})},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(e){o={error:e}}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;o{e.exports=function(e,o){Array.isArray(o)||(o=[o]);var i=function(e){for(var t=-1,n=0;n0?e[i-1]:null;a&&n.test(a.data)&&e.splice(i++,0,t),e.splice.apply(e,[i,0].concat(o));var s=i+o.length;return e[s]&&/[^\r\n]$/.test(e[s].data)&&e.splice(s,0,t),e};var t={data:"\n",type:"whitespace"},n=/[^\r\n]$/;function r(e,t){for(var n=t;n{Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var r=n(4662);t.fromSubscribable=function(e){return new r.Observable(function(t){return e.subscribe(t)})}},6842:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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))return[3,10];if(null==(u=a.pop()))return[3,1];c(i,this._activeResourceCounts),null!=this._removeIdleObserver&&this._removeIdleObserver(u),l=!1,g.label=2;case 2:return g.trys.push([2,4,,6]),[4,this._validateOnAcquire(e,u)];case 3:return l=g.sent(),[3,6];case 4:return h=g.sent(),f(i,this._activeResourceCounts),a.removeInUse(u),[4,this._destroy(u)];case 5:throw g.sent(),h;case 6:return l?(this._log.isDebugEnabled()&&this._log.debug("".concat(u," acquired from the pool ").concat(i)),[2,{resource:u,pool:a}]):[3,7];case 7:return f(i,this._activeResourceCounts),a.removeInUse(u),[4,this._destroy(u)];case 8:g.sent(),g.label=9;case 9:return[3,1];case 10:if(this._maxSize>0&&this.activeResourceCount(t)+this._pendingCreates[i]>=this._maxSize)return[2,{resource:null,pool:a}];this._pendingCreates[i]=this._pendingCreates[i]+1,g.label=11;case 11:return g.trys.push([11,,15,16]),this.activeResourceCount(t)+a.length>=this._maxSize&&n?null==(p=a.pop())?[3,13]:(null!=this._removeIdleObserver&&this._removeIdleObserver(p),a.removeInUse(p),[4,this._destroy(p)]):[3,13];case 12:g.sent(),g.label=13;case 13:return[4,this._create(e,t,function(e,t){return r(v,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,this._release(e,t,a)];case 1:return[2,n.sent()]}})})})];case 14:return d=g.sent(),a.pushInUse(d),c(i,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(d," created for the pool ").concat(i)),[3,16];case 15:return this._pendingCreates[i]=this._pendingCreates[i]-1,[7];case 16:return[2,{resource:d,pool:a}]}})})},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:null!=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];null!=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 f(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=[],null==t)return[3,2];for(;t.length>0;)null!=(r=t.pop())&&(null!=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(null!=r){var o=r.shift();null!=o?this._acquire(o.context,e,o.requireNew).catch(function(e){return o.reject(e),{resource:null,pool:null}}).then(function(r){var i=r.resource,a=r.pool;null!=i&&null!=a?o.isCompleted()?t._release(e,i,a).catch(function(e){t._log.isDebugEnabled()&&t._log.debug("".concat(i," could not be release back to the pool. Cause: ").concat(e))}):o.resolve(i):o.isCompleted()||(null==t._acquireRequests[n]&&(t._acquireRequests[n]=[]),t._acquireRequests[n].unshift(o))}).catch(function(e){return o.reject(e)}):delete this._acquireRequests[n]}},e}();function c(e,t){var n,r=null!==(n=t[e])&&void 0!==n?n:0;t[e]=r+1}function f(e,t){var n,r=(null!==(n=t[e])&&void 0!==n?n:0)-1;r>0?t[e]=r:delete t[e]}var h=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=null!=n?n:{}}return Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requireNew",{get:function(){var e;return null!==(e=this._config.requireNew)&&void 0!==e&&e},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}(),d=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 null!=e&&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},6872:function(e,t){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.InternalConfig=t.Config=void 0;var r=function(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0};t.Config=r;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(r);t.InternalConfig=o},6890:function(e,t,n){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;n{Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var r=n(2823);t.lastValueFrom=function(e,t){var n="object"==typeof t;return new Promise(function(o,i){var a,s=!1;e.subscribe({next:function(e){a=e,s=!0},error:i,complete:function(){s?o(a):n?o(t.defaultValue):i(new r.EmptyError)}})})}},6902:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var r=n(983);t.flatMap=r.mergeMap},6931:e=>{e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},6985:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var r=n(4662);t.scheduleArray=function(e,t){return new r.Observable(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}},6995:function(e,t,n){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.pool=t.boltAgent=t.objectUtil=t.resolver=t.serverAddress=t.urlUtil=t.logger=t.transactionExecutor=t.txConfig=t.connectionHolder=t.constants=t.bookmarks=t.observer=t.temporalUtil=t.util=void 0;var a=i(n(6587));t.util=a;var s=i(n(5022));t.temporalUtil=s;var u=i(n(2696));t.observer=u;var l=i(n(9730));t.bookmarks=l;var c=i(n(326));t.constants=c;var f=i(n(3618));t.connectionHolder=f;var h=i(n(754));t.txConfig=h;var d=i(n(6189));t.transactionExecutor=d;var p=i(n(4883));t.logger=p;var v=i(n(407));t.urlUtil=v;var g=i(n(7509));t.serverAddress=g;var y=i(n(9470));t.resolver=y;var m=i(n(93));t.objectUtil=m;var b=i(n(3488));t.boltAgent=b;var _=i(n(2906));t.pool=_},7021:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIGNATURES=void 0;var r=n(9305),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 p},e.reset=function(){return v},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 h(i,n),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}),h(a,o),i&&(a.routing=i),new e(1,[a],function(){return"HELLO ".concat(r.json.stringify(a))})},e.hello5x5=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}),d(a,o),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.begin5x5=function(t){var n=void 0===t?{}:t,o=c(n.bookmarks,n.txConfig,n.database,n.mode,n.impersonatedUser,n.notificationFilter,{appendNotificationFilter:d});return new e(17,[o],function(){return"BEGIN ".concat(r.json.stringify(o))})},e.commit=function(){return g},e.rollback=function(){return y},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.runWithMetadata5x5=function(t,n,o){var i=void 0===o?{}:o,a=c(i.bookmarks,i.txConfig,i.database,i.mode,i.impersonatedUser,i.notificationFilter,{appendNotificationFilter:d});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?-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?-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,u){var l;void 0===u&&(u={});var c={};return e.isEmpty()||(c.bookmarks=e.values()),null!==t.timeout&&(c.tx_timeout=t.timeout),t.metadata&&(c.tx_metadata=t.metadata),n&&(c.db=s(n,"database")),o&&(c.imp_user=s(o,"impersonatedUser")),r===i&&(c.mode="r"),(null!==(l=u.appendNotificationFilter)&&void 0!==l?l:h)(c,a),c}function f(e,t){var n={n:(0,r.int)(t)};return-1!==e&&(n.qid=(0,r.int)(e)),n}function h(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_categories=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_categories=t.disabledClassifications))}function d(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_classifications=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_classifications=t.disabledClassifications))}t.default=l;var p=new l(63,[],function(){return"PULL_ALL"}),v=new l(15,[],function(){return"RESET"}),g=new l(18,[],function(){return"COMMIT"}),y=new l(19,[],function(){return"ROLLBACK"}),m=new l(2,[],function(){return"GOODBYE"})},7041:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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]{var r=n(3206);e.exports=function(e,t){var n=r(t),o=[];return(o=o.concat(n(e))).concat(n(null))}},7057:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var r=n(5568);t.ArgumentOutOfRangeError=r.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})},7093:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPoint=t.Point=void 0;var r=n(6587),o="__isPoint__",i=function(){function e(e,t,n,o){this.srid=(0,r.assertNumberOrInteger)(e,"SRID"),this.x=(0,r.assertNumber)(t,"X coordinate"),this.y=(0,r.assertNumber)(n,"Y coordinate"),this.z=null==o?o:(0,r.assertNumber)(o,"Z coordinate"),Object.freeze(this)}return e.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(a(this.srid),", x=").concat(a(this.x),", y=").concat(a(this.y),"}"):"Point{srid=".concat(a(this.srid),", x=").concat(a(this.x),", y=").concat(a(this.y),", z=").concat(a(this.z),"}")},e}();function a(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}t.Point=i,Object.defineProperty(i.prototype,o,{value:!0,enumerable:!1,configurable:!1,writable:!1}),t.isPoint=function(e){return null!=e&&!0===e[o]}},7101:e=>{e.exports=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},7110:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,n,r,o){void 0===r&&(r=0),void 0===o&&(o=!1);var i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}},7168:function(e,t,n){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.structure=t.v2=t.v1=void 0;var a=i(n(5361));t.v1=a;var s=i(n(2072));t.v2=s;var u=i(n(7665));t.structure=u,t.default=s},7174:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBuffer=void 0;var o=r(n(45));t.BaseBuffer=o.default,t.default=o.default},7192:e=>{e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7210:function(e,t,n){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.bufferTime=void 0;var o=n(8014),i=n(7843),a=n(3111),s=n(7479),u=n(7961),l=n(1107),c=n(7110);t.bufferTime=function(e){for(var t,n,f=[],h=1;h=0?c.executeSchedule(n,d,f,p,!0):u=!0,f();var h=a.createOperatorSubscriber(n,function(e){var t,n,o=i.slice();try{for(var a=r(o),s=a.next();!s.done;s=a.next()){var u=s.value,c=u.buffer;c.push(e),v<=c.length&&l(u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},function(){for(;null==i?void 0:i.length;)n.next(i.shift().buffer);null==h||h.unsubscribe(),n.complete(),n.unsubscribe()},void 0,function(){return i=null});t.subscribe(h)})}},7220:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var r=n(1637),o=n(8918);t.publishBehavior=function(e){return function(t){var n=new r.BehaviorSubject(e);return new o.ConnectableObservable(t,function(){return n})}}},7245:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var n,r=1,o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return o[t]=!0,n||(n=Promise.resolve()),n.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},7264:function(e,t,n){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||0===n?n:n<0?Number.MAX_SAFE_INTEGER:t}function S(e,t){var n=parseInt(e,10);if(n>0||n===l.FETCH_ALL)return n;if(0===n||n<0)throw new Error("The fetch size can only be a positive value or ".concat(l.FETCH_ALL," for ALL. However fetchSize = ").concat(n));return t}t.Driver=E,t.default=E},7286:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var r=n(983),o=n(6640);t.mergeAll=function(e){return void 0===e&&(e=1/0),r.mergeMap(o.identity,e)}},7315:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var r=n(3413),o=n(9155);t.reportUnhandledError=function(e){o.timeoutProvider.setTimeout(function(){var t=r.config.onUnhandledError;if(!t)throw e;t(e)})}},7331:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var n=Array.isArray,r=Object.getPrototypeOf,o=Object.prototype,i=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(n(t))return{args:t,keys:null};if((s=t)&&"object"==typeof s&&r(s)===o){var a=i(t);return{args:a.map(function(e){return t[e]}),keys:a}}}var s;return{args:e,keys:null}}},7372:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var r=n(7843),o=n(3111),i=n(9445),a=n(1342);t.skipUntil=function(e){return r.operate(function(t,n){var r=!1,s=o.createOperatorSubscriber(n,function(){null==s||s.unsubscribe(),r=!0},a.noop);i.innerFrom(e).subscribe(s),t.subscribe(o.createOperatorSubscriber(n,function(e){return r&&n.next(e)}))})}},7428:function(e,t,n){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(e){o={error:e}}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(9305),p=s(n(206)),v=n(7452),g=h(n(4132)),y=h(n(8987)),m=n(4455),b=n(7721),_=n(6781),w=d.error.SERVICE_UNAVAILABLE,x=d.error.SESSION_EXPIRED,E=d.internal.bookmarks.Bookmarks,O=d.internal.constants,S=O.ACCESS_MODE_READ,T=O.ACCESS_MODE_WRITE,P=O.BOLT_PROTOCOL_V3,C=O.BOLT_PROTOCOL_V4_0,A=O.BOLT_PROTOCOL_V4_4,k=O.BOLT_PROTOCOL_V5_1,I="Neo.ClientError.Database.DatabaseNotFound",R="Neo.ClientError.Transaction.InvalidBookmark",j="Neo.ClientError.Transaction.InvalidBookmarkMixture",M="Neo.ClientError.Security.AuthorizationExpired",N="Neo.ClientError.Statement.ArgumentError",D="Neo.ClientError.Request.Invalid",L="Neo.ClientError.Statement.TypeError",B="N/A",F=null,U=(0,d.int)(3e4),z=function(e){function t(t){var n=t.id,r=t.address,i=t.routingContext,a=t.hostNameResolver,s=t.config,c=t.log,f=t.userAgent,h=t.boltAgent,g=t.authTokenManager,y=t.routingTablePurgeDelay,w=t.newPool,x=e.call(this,{id:n,config:s,log:c,userAgent:f,boltAgent:h,authTokenManager:g,newPool:w},function(e){return u(x,void 0,void 0,function(){var t,n;return l(this,function(r){switch(r.label){case 0:return t=b.createChannelConnection,n=[e,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,n.concat([r.sent(),this._routingContext,this._channelSsrCallback.bind(this)]))]}})})})||this;return x._routingContext=o(o({},i),{address:r.toString()}),x._seedRouter=r,x._rediscovery=new p.default(x._routingContext),x._loadBalancingStrategy=new m.LeastConnectedLoadBalancingStrategy(x._connectionPool),x._hostNameResolver=a,x._dnsResolver=new v.HostNameResolver,x._log=c,x._useSeedRouter=!0,x._routingTableRegistry=new V(y?(0,d.int)(y):U),x._refreshRoutingTable=_.functional.reuseOngoingRequest(x._refreshRoutingTable,x),x._withSSR=0,x._withoutSSR=0,x}return r(t,e),t.prototype._createConnectionErrorHandler=function(){return new b.ConnectionErrorHandler(x)},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||F),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||F),(0,d.newError)("No longer possible to write to server at "+t,x,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,c=t.homeDb;return u(this,void 0,void 0,function(){var e,t,u,f,h,d=this;return l(this,function(l){switch(l.label){case 0:return e={database:r||F},t=new b.ConnectionErrorHandler(x,function(t,n){return d._handleUnavailability(t,n,e.database)},function(t,n){return d._handleWriteFailure(t,n,null!=c?c:e.database)},function(t,n,r){return d._handleSecurityError(t,n,r,e.database)}),this.SSREnabled()&&void 0!==c&&""===r?!(f=this._routingTableRegistry.get(c,function(){return new p.RoutingTable({database:c})}))||f.isStaleFor(n)?[3,2]:[4,this.getConnectionFromRoutingTable(f,s,n,t)]:[3,2];case 1:if(u=l.sent(),this.SSREnabled())return[2,u];u.release(),l.label=2;case 2:return[4,this._freshRoutingTable({accessMode:n,database:e.database,bookmarks:o,impersonatedUser:i,auth:s,onDatabaseNameResolved:function(t){e.database=e.database||t,a&&a(t)}})];case 3:return h=l.sent(),[2,this.getConnectionFromRoutingTable(h,s,n,t)]}})})},t.prototype.getConnectionFromRoutingTable=function(e,t,n,r){return u(this,void 0,void 0,function(){var o,i,a,s;return l(this,function(u){switch(u.label){case 0:if(n===S)i=this._loadBalancingStrategy.selectReader(e.readers),o="read";else{if(n!==T)throw(0,d.newError)("Illegal mode "+n);i=this._loadBalancingStrategy.selectWriter(e.writers),o="write"}if(!i)throw(0,d.newError)("Failed to obtain connection towards ".concat(o," server. Known routing table is: ").concat(e),x);u.label=1;case 1:return u.trys.push([1,5,,6]),[4,this._connectionPool.acquire({auth:t},i)];case 2:return a=u.sent(),t?[4,this._verifyStickyConnection({auth:t,connection:a,address:i})]:[3,4];case 3:return u.sent(),[2,a];case 4:return[2,new b.DelegateConnection(a,r)];case 5:throw s=u.sent(),r.handleAndTransformError(s,i);case 6: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=C})];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>=P})];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>=A})];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>=k})];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||F},[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===T?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||F},[4,this._freshRoutingTable({accessMode:n,database:e.database,onDatabaseNameResolved:function(t){e.database=e.database||t}})];case 1:r=l.sent(),o=n===T?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,g,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],g=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,g]];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=b.ConnectionErrorHandler.create({errorCode:x,handleSecurityError:function(e,t,n){return c._handleSecurityError(e,t,n)}}),a=o._sticky?new b.DelegateConnection(o):new b.DelegateConnection(o,i),s=new g.default(a),o.protocol().version<4?[2,[new d.Session({mode:T,bookmarks:E.empty(),connectionProvider:s}),null]]:[2,[new d.Session({mode:S,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[I,R,j,N,D,L,B].includes(e.code)}(e)||function(e){return e.code.startsWith("Neo.ClientError.Security.")&&![M].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.prototype._channelSsrCallback=function(e,t){if("OPEN"===t)!0===e?this._withSSR=this._withSSR+1:this._withoutSSR=this._withoutSSR+1;else{if("CLOSE"!==t)throw(0,d.newError)("Channel SSR Callback invoked with action other than 'OPEN' or 'CLOSE'");!0===e?this._withSSR=this._withSSR-1:this._withoutSSR=this._withoutSSR-1}},t.prototype.SSREnabled=function(){return this._withSSR>0&&0===this._withoutSSR},t}(y.default);t.default=z;var V=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(e){t={error:e}}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(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e}()},7441:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var r=n(7800),o=n(7843),i=n(3111);t.dematerialize=function(){return o.operate(function(e,t){e.subscribe(i.createOperatorSubscriber(t,function(e){return r.observeNotification(e,t)}))})}},7449:function(e,t,n){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(e){o={error:e}}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(7168),s=n(9305),u=i(n(7518)),l=i(n(5045));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)}})}})},7452:function(e,t,n){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(3951),t),o(n(373),t);var a=n(2481);Object.defineProperty(t,"ChannelConfig",{enumerable:!0,get:function(){return i(a).default}});var s=n(5319);Object.defineProperty(t,"alloc",{enumerable:!0,get:function(){return s.alloc}});var u=n(3473);Object.defineProperty(t,"utf8",{enumerable:!0,get:function(){return i(u).default}})},7479:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}},7509:function(e,t,n){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(6587),s=i(n(407)),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},7518:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var r=n(7843),o=n(3111);t.refCount=function(){return r.operate(function(e,t){var n=null;e._refCount++;var r=o.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount)n=null;else{var r=e._connection,o=n;n=null,!r||o&&r!==o||r.unsubscribe(),t.unsubscribe()}});e.subscribe(r),r.closed||(n=e.connect())})}},7579:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var r=n(2483),o=n(4662),i=n(9353),a={connector:function(){return new r.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=a);var n=null,r=t.connector,s=t.resetOnDisconnect,u=void 0===s||s,l=r(),c=new o.Observable(function(e){return l.subscribe(e)});return c.connect=function(){return n&&!n.closed||(n=i.defer(function(){return e}).subscribe(l),u&&n.add(function(){return l=r()})),n},c}},7589:(e,t)=>{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 a(e)?e:t}function a(e){return 0===e||null!=e}t.default=o},7601:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},7629:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var r=n(1018);t.isPromise=function(e){return r.isFunction(null==e?void 0:e.then)}},7640:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var r=n(7961),o=n(8941),i=n(4092);t.throttleTime=function(e,t,n){void 0===t&&(t=r.asyncScheduler);var a=i.timer(e,t);return o.throttle(function(){return a},n)}},7661:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var r=n(7843),o=n(1983);t.expand=function(e,t,n){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,r.operate(function(r,i){return o.mergeInternals(r,i,e,t,void 0,!0,n)})}},7665:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.verifyStructSize=t.Structure=void 0;var r=n(9305),o=r.error.PROTOCOL_ERROR,i=function(){function e(e,t){this.signature=e,this.fields=t}return Object.defineProperty(e.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),e.prototype.toString=function(){for(var e="",t=0;t0&&(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},7666:function(e,t,n){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(8731)),s=i(n(6544)),u=i(n(9054)),l=i(n(7790));o(n(9014),t),t.BoltProtocol=u.default,t.RawRoutingTable=l.default,t.default={handshake:a.default,create:s.default}},7714:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var r=n(7843),o=n(3111);function i(e,t,n){var r="index"===n;return function(n,i){var a=0;n.subscribe(o.createOperatorSubscriber(i,function(o){var s=a++;e.call(t,o,s,n)&&(i.next(r?s:o),i.complete())},function(){i.next(r?-1:void 0),i.complete()}))}}t.find=function(e,t){return r.operate(i(e,t,"value"))},t.createFind=i},7721:function(e,t,n){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(6385));t.Connection=s.default;var u=i(n(8031));t.ChannelConnection=u.default,Object.defineProperty(t,"createChannelConnection",{enumerable:!0,get:function(){return u.createChannelConnection}});var l=a(n(9857));t.DelegateConnection=l.default;var c=a(n(2363));t.ConnectionErrorHandler=c.default,t.default=s.default},7740:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var r=n(4917);t.pairs=function(e,t){return r.from(Object.entries(e),t)}},7790:function(e,t,n){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(9305));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)},7800:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var r,o=n(8616),i=n(1004),a=n(1103),s=n(1018);(r=t.NotificationKind||(t.NotificationKind={})).NEXT="N",r.ERROR="E",r.COMPLETE="C";var u=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){return l(this,e)},e.prototype.do=function(e,t,n){var r=this,o=r.kind,i=r.value,a=r.error;return"N"===o?null==e?void 0:e(i):"E"===o?null==t?void 0:t(a):null==n?void 0:n()},e.prototype.accept=function(e,t,n){var r;return s.isFunction(null===(r=e)||void 0===r?void 0:r.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,s="N"===t?i.of(n):"E"===t?a.throwError(function(){return r}):"C"===t?o.EMPTY:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function l(e,t){var n,r,o,i=e,a=i.kind,s=i.value,u=i.error;if("string"!=typeof a)throw new TypeError('Invalid notification, missing "kind"');"N"===a?null===(n=t.next)||void 0===n||n.call(t,s):"E"===a?null===(r=t.error)||void 0===r||r.call(t,u):null===(o=t.complete)||void 0===o||o.call(t)}t.Notification=u,t.observeNotification=l},7815:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var r=n(4662),o=n(9445),i=n(2483),a=n(7843),s=n(3111);t.groupBy=function(e,t,n,u){return a.operate(function(a,l){var c;t&&"function"!=typeof t?(n=t.duration,c=t.element,u=t.connector):c=t;var f=new Map,h=function(e){f.forEach(e),e(l)},d=function(e){return h(function(t){return t.error(e)})},p=0,v=!1,g=new s.OperatorSubscriber(l,function(t){try{var a=e(t),h=f.get(a);if(!h){f.set(a,h=u?u():new i.Subject);var y=(b=a,_=h,(w=new r.Observable(function(e){p++;var t=_.subscribe(e);return function(){t.unsubscribe(),0===--p&&v&&g.unsubscribe()}})).key=b,w);if(l.next(y),n){var m=s.createOperatorSubscriber(h,function(){h.complete(),null==m||m.unsubscribe()},void 0,void 0,function(){return f.delete(a)});g.add(o.innerFrom(n(y)).subscribe(m))}}h.next(c?c(t):t)}catch(e){d(e)}var b,_,w},function(){return h(function(e){return e.complete()})},d,function(){return f.clear()},function(){return v=!0,0===p});a.subscribe(g)})}},7835:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var r=n(7843),o=n(3111),i=n(6640),a=n(4092),s=n(9445);t.retry=function(e){var t;void 0===e&&(e=1/0);var n=(t=e&&"object"==typeof e?e:{count:e}).count,u=void 0===n?1/0:n,l=t.delay,c=t.resetOnSuccess,f=void 0!==c&&c;return u<=0?i.identity:r.operate(function(e,t){var n,r=0,i=function(){var c=!1;n=e.subscribe(o.createOperatorSubscriber(t,function(e){f&&(r=0),t.next(e)},void 0,function(e){if(r++{Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var r=n(1018);function o(e){return r.isFunction(null==e?void 0:e.lift)}t.hasLift=o,t.operate=function(e){return function(t){if(o(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}}},7853:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var r=n(4662),o=n(9445),i=n(8616);t.using=function(e,t){return new r.Observable(function(n){var r=e(),a=t(r);return(a?o.innerFrom(a):i.EMPTY).subscribe(n),function(){r&&r.unsubscribe()}})}},7857:function(e,t,n){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.WRITE=t.READ=t.Driver=void 0;var i=n(9305),a=o(n(3466)),s=i.internal.constants.FETCH_ALL,u=i.driver.READ,l=i.driver.WRITE;t.READ=u,t.WRITE=l;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.rxSession=function(e){var t=void 0===e?{}:e,n=t.defaultAccessMode,r=void 0===n?l:n,o=t.bookmarks,i=t.database,s=void 0===i?"":i,u=t.fetchSize,c=t.impersonatedUser,h=t.bookmarkManager,d=t.notificationFilter,p=t.auth;return new a.default({session:this._newSession({defaultAccessMode:r,bookmarkOrBookmarks:o,database:s,impersonatedUser:c,auth:p,reactive:!1,fetchSize:f(u,this._config.fetchSize),bookmarkManager:h,notificationFilter:d,log:this._log}),config:this._config,log:this._log})},t}(i.Driver);function f(e,t){var n=parseInt(e,10);if(n>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},7961:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var r=n(5267),o=n(5648);t.asyncScheduler=new o.AsyncScheduler(r.AsyncAction),t.async=t.asyncScheduler},7991:(e,t)=>{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;return 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),l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,u=r-o;su?u:s+a));return 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]+"=")),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){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;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.")},o=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(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var r=n(7843),o=n(1342),i=n(3111),a=n(9445);t.buffer=function(e){return r.operate(function(t,n){var r=[];return t.subscribe(i.createOperatorSubscriber(n,function(e){return r.push(e)},function(){n.next(r),n.complete()})),a.innerFrom(e).subscribe(i.createOperatorSubscriber(n,function(){var e=r;r=[],n.next(e)},o.noop)),function(){r=null}})}},8031:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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*l):r._log.info("Server located at ".concat(r._address," supplied an invalid connection receive timeout value (").concat(l,"). ")+"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),r.SSREnabledHint=e.hints["ssr.enabled"]}r._ssrCallback(null!==(t=r.SSREnabledHint)&&void 0!==t&&t,"OPEN")}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._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},t.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},t.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},t.prototype.hasOngoingObservableRequests=function(){return!this._idle&&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: ".concat(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){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},t.prototype.close=function(){var e;return o(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this._ssrCallback(null!==(e=this.SSREnabledHint)&&void 0!==e&&e,"CLOSE"),this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return t.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},8046:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},8079:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var r=n(7961),o=n(7843),i=n(3111);t.debounceTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),o.operate(function(n,r){var o=null,a=null,s=null,u=function(){if(o){o.unsubscribe(),o=null;var e=a;a=null,r.next(e)}};function l(){var n=s+e,i=t.now();if(i{Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var r=n(9445),o=n(3111),i=n(7843);t.catchError=function e(t){return i.operate(function(n,i){var a,s=null,u=!1;s=n.subscribe(o.createOperatorSubscriber(i,void 0,void 0,function(o){a=r.innerFrom(t(o,e(t)(n))),s?(s.unsubscribe(),s=null,a.subscribe(i)):u=!0})),u&&(s.unsubscribe(),s=null,a.subscribe(i))})}},8157:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var r=n(1242),o=n(9247),i=n(1018);t.publishReplay=function(e,t,n,a){n&&!i.isFunction(n)&&(a=n);var s=i.isFunction(n)?n:void 0;return function(n){return o.multicast(new r.ReplaySubject(e,t,a),s)(n)}}},8158:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var r=n(7302);t.concatAll=function(){return r.mergeAll(1)}},8208:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var r=n(2483),o=n(7961),i=n(8014),a=n(7843),s=n(3111),u=n(7479),l=n(1107),c=n(7110);t.windowTime=function(e){for(var t,n,f=[],h=1;h=0?c.executeSchedule(n,d,f,p,!0):a=!0,f();var h=function(e){return o.slice().forEach(e)},g=function(e){h(function(t){var n=t.window;return e(n)}),e(n),n.unsubscribe()};return t.subscribe(s.createOperatorSubscriber(n,function(e){h(function(t){t.window.next(e),v<=++t.seen&&l(t)})},function(){return g(function(e){return e.complete()})},function(e){return g(function(t){return t.error(e)})})),function(){o=null}})}},8239:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0)&&e.filter(t).length===e.length}function v(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}t.clientCertificateProviders=f,Object.freeze(f),t.resolveCertificateProvider=function(e){if(null!=e){if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;if(h(e)){var t=o({},e);return{getClientCertificate:function(){return t},hasUpdate:function(){return!1}}}throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(u.stringify(e)))}};var g=function(){function e(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}return e.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},e.prototype.getClientCertificate=function(){return this._certificate},e.prototype.updateCertificate=function(e){if(!h(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(u.stringify(e)));this._certificate=o({},e),this._updated=!0},e}()},8275:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var r=n(2823),o=n(783),i=n(846),a=n(378),s=n(4869),u=n(6640);t.first=function(e,t){var n=arguments.length>=2;return function(l){return l.pipe(e?o.filter(function(t,n){return e(t,n,l)}):u.identity,i.take(1),n?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new r.EmptyError}))}}},8320:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=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.takeLast=void 0;var o=n(8616),i=n(7843),a=n(3111);t.takeLast=function(e){return e<=0?function(){return o.EMPTY}:i.operate(function(t,n){var o=[];t.subscribe(a.createOperatorSubscriber(n,function(t){o.push(t),e{Object.defineProperty(t,"__esModule",{value:!0});var r=n(7509);function o(e){return Promise.resolve([e])}var i=function(){function e(e){this._resolverFunction=null!=e?e:o}return e.prototype.resolve=function(e){var t=this;return new Promise(function(n){return n(t._resolverFunction(e.asHostPort()))}).then(function(e){if(!Array.isArray(e))throw new TypeError("Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses."+"Each address is ':'. Got: ".concat(e));return e.map(function(e){return r.ServerAddress.fromUrl(e)})})},e}();t.default=i},8522:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var r=n(8616),o=n(7843),i=n(3111),a=n(9445),s=n(4092);t.repeat=function(e){var t,n,u=1/0;return null!=e&&("object"==typeof e?(t=e.count,u=void 0===t?1/0:t,n=e.delay):u=e),u<=0?function(){return r.EMPTY}:o.operate(function(e,t){var r,o=0,l=function(){if(null==r||r.unsubscribe(),r=null,null!=n){var e="number"==typeof n?s.timer(n):a.innerFrom(n(o)),u=i.createOperatorSubscriber(t,function(){u.unsubscribe(),c()});e.subscribe(u)}else c()},c=function(){var n=!1;r=e.subscribe(i.createOperatorSubscriber(t,void 0,function(){++o{Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var n=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&n(e[0])?e[0]:e}},8538:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var r=n(1439);t.bindNodeCallback=function(e,t,n){return r.bindCallbackInternals(!0,e,t,n)}},8613:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var r=n(1018);t.isScheduler=function(e){return e&&r.isFunction(e.schedule)}},8616:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var r=n(4662);t.EMPTY=new r.Observable(function(e){return e.complete()}),t.empty=function(e){return e?function(e){return new r.Observable(function(t){return e.schedule(function(){return t.complete()})})}(e):t.EMPTY}},8624:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var r=n(7843),o=n(6384);t.scan=function(e,t){return r.operate(o.scanInternals(e,t,arguments.length>=2,!0))}},8655:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var r=n(4662),o=n(1342);t.NEVER=new r.Observable(o.noop),t.never=function(){return t.NEVER}},8669:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var r=n(2823),o=n(783),i=n(8330),a=n(4869),s=n(378),u=n(6640);t.last=function(e,t){var n=arguments.length>=2;return function(l){return l.pipe(e?o.filter(function(t,n){return e(t,n,l)}):u.identity,i.takeLast(1),n?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new r.EmptyError}))}}},8712:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var r=n(3879),o=n(7843);t.switchScan=function(e,t){return o.operate(function(n,o){var i=t;return r.switchMap(function(t,n){return e(i,t,n)},function(e,t){return i=t,t})(n).subscribe(o),function(){i=null}})}},8731:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(7452),o=n(9305),i=["5.8","5.7","5.6","5.4","5.3","5.2","5.1","5.0","4.4","4.3","4.2","3.0"];function a(e,t){return{major:e,minor:t}}function s(e){for(var t=[],n=e[3],r=e[2],o=0;o<=e[1];o++)t.push({major:n,minor:r-o});return t}t.default=function(e,t){return function(e,t){var n=this;return new Promise(function(i,s){var u=function(e){s(e)};e.onerror=u.bind(n),e._error&&u(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);i({protocolVersion:n,capabilites:0,buffer:e,consumeRemainingBuffer:function(t){e.hasRemaining()&&t(e.readSlice(e.remaining()))}})}catch(e){s(e)}},e.write(function(e){if(e.length>4)throw(0,o.newError)("It should not have more than 4 versions of the protocol");var t=(0,r.alloc)(20);return t.writeInt32(1616949271),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(255,1),[a(5,8),a(5,0)],[a(4,4),a(4,2)],a(3,0)]))})}(e,t).then(function(t){return 255.1===t.protocolVersion?function(e,t){for(var n=t.readVarInt(),o=[],a=0;a{Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var r=n(3865),o=n(846),i=n(490),a=n(3218),s=n(983),u=n(9445);t.delayWhen=function e(t,n){return n?function(a){return r.concat(n.pipe(o.take(1),i.ignoreElements()),a.pipe(e(t)))}:s.mergeMap(function(e,n){return u.innerFrom(t(e,n)).pipe(o.take(1),a.mapTo(e))})}},8774:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var r=n(3879),o=n(6640);t.switchAll=function(){return r.switchMap(o.identity)}},8784:(e,t,n)=>{var r=n(4704);e.exports=r.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},8808:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var r=n(4662),o=n(1964),i=n(1018),a=n(7110);t.scheduleIterable=function(e,t){return new r.Observable(function(n){var r;return a.executeSchedule(n,t,function(){r=e[o.iterator](),a.executeSchedule(n,t,function(){var e,t,o;try{t=(e=r.next()).value,o=e.done}catch(e){return void n.error(e)}o?n.complete():n.next(t)},0,!0)}),function(){return i.isFunction(null==r?void 0:r.return)&&r.return()}})}},8813:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}: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)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.onErrorResumeNextWith=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=void 0;var i=n(4662);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return i.Observable}});var a=n(8918);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return a.ConnectableObservable}});var s=n(3327);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return s.observable}});var u=n(3110);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var l=n(2483);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return l.Subject}});var c=n(1637);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return c.BehaviorSubject}});var f=n(1242);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var h=n(95);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return h.AsyncSubject}});var d=n(3692);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var p=n(7961);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var v=n(2886);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return v.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return v.queueScheduler}});var g=n(3862);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return g.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return g.animationFrameScheduler}});var y=n(182);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return y.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return y.VirtualAction}});var m=n(8986);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return m.Scheduler}});var b=n(8014);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return b.Subscription}});var _=n(5);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return _.Subscriber}});var w=n(7800);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var x=n(2706);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return x.pipe}});var E=n(1342);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return E.noop}});var O=n(6640);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return O.identity}});var S=n(1751);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return S.isObservable}});var T=n(6894);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return T.lastValueFrom}});var P=n(9060);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return P.firstValueFrom}});var C=n(7057);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return C.ArgumentOutOfRangeError}});var A=n(2823);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return A.EmptyError}});var k=n(1759);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return k.NotFoundError}});var I=n(9686);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return I.ObjectUnsubscribedError}});var R=n(1505);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return R.SequenceError}});var j=n(1554);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return j.TimeoutError}});var M=n(5788);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return M.UnsubscriptionError}});var N=n(2713);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return N.bindCallback}});var D=n(8561);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return D.bindNodeCallback}});var L=n(3247);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return L.combineLatest}});var B=n(3865);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return B.concat}});var F=n(7579);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return F.connectable}});var U=n(9353);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return U.defer}});var z=n(8616);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return z.empty}});var V=n(9105);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return V.forkJoin}});var W=n(4917);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return W.from}});var G=n(5337);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return G.fromEvent}});var H=n(347);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return H.fromEventPattern}});var Y=n(7610);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Y.generate}});var q=n(4209);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return q.iif}});var X=n(6472);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return X.interval}});var K=n(2833);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return K.merge}});var Z=n(8655);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return Z.never}});var $=n(1004);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return $.of}});var Q=n(6102);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Q.onErrorResumeNext}});var J=n(7740);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return J.pairs}});var ee=n(1699);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=n(5584);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var ne=n(9376);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return ne.range}});var re=n(1103);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return re.throwError}});var oe=n(4092);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return oe.timer}});var ie=n(7853);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return ie.using}});var ae=n(7286);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ae.zip}});var se=n(1656);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return se.scheduled}});var ue=n(8616);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var le=n(8655);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return le.NEVER}}),o(n(6038),t);var ce=n(3413);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return ce.config}});var fe=n(3146);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var he=n(3231);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return he.auditTime}});var de=n(8015);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var pe=n(5572);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return pe.bufferCount}});var ve=n(7210);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ve.bufferTime}});var ge=n(8995);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ge.bufferToggle}});var ye=n(8831);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return ye.bufferWhen}});var me=n(8118);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return me.catchError}});var be=n(6625);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return be.combineAll}});var _e=n(6728);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return _e.combineLatestAll}});var we=n(8239);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var xe=n(8158);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return xe.concatAll}});var Ee=n(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Ee.concatMap}});var Oe=n(9938);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Oe.concatMapTo}});var Se=n(9669);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Se.concatWith}});var Te=n(1483);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Te.connect}});var Pe=n(1038);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return Pe.count}});var Ce=n(4461);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Ce.debounce}});var Ae=n(8079);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return Ae.debounceTime}});var ke=n(378);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return ke.defaultIfEmpty}});var Ie=n(914);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ie.delay}});var Re=n(8766);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Re.delayWhen}});var je=n(7441);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return je.dematerialize}});var Me=n(5365);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return Me.distinct}});var Ne=n(8937);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Ne.distinctUntilChanged}});var De=n(9612);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return De.distinctUntilKeyChanged}});var Le=n(4520);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Le.elementAt}});var Be=n(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Be.endWith}});var Fe=n(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Fe.every}});var Ue=n(1551);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Ue.exhaust}});var ze=n(2752);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return ze.exhaustAll}});var Ve=n(4753);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ve.exhaustMap}});var We=n(7661);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return We.expand}});var Ge=n(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return Ge.filter}});var He=n(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return He.finalize}});var Ye=n(7714);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ye.find}});var qe=n(9756);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return qe.findIndex}});var Xe=n(8275);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return Xe.first}});var Ke=n(7815);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ke.groupBy}});var Ze=n(490);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Ze.ignoreElements}});var $e=n(9356);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return $e.isEmpty}});var Qe=n(8669);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Qe.last}});var Je=n(5471);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Je.map}});var et=n(3218);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=n(2360);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var nt=n(1415);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return nt.max}});var rt=n(7302);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return rt.mergeAll}});var ot=n(6902);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return ot.flatMap}});var it=n(983);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return it.mergeMap}});var at=n(6586);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return at.mergeMapTo}});var st=n(4408);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return st.mergeScan}});var ut=n(8253);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var lt=n(2669);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return lt.min}});var ct=n(9247);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ct.multicast}});var ft=n(5184);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var ht=n(1226);Object.defineProperty(t,"onErrorResumeNextWith",{enumerable:!0,get:function(){return ht.onErrorResumeNextWith}});var dt=n(1518);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return dt.pairwise}});var pt=n(4912);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return pt.pluck}});var vt=n(766);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return vt.publish}});var gt=n(7220);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return gt.publishBehavior}});var yt=n(6106);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return yt.publishLast}});var mt=n(8157);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var bt=n(5600);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var _t=n(9139);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return _t.reduce}});var wt=n(8522);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return wt.repeat}});var xt=n(6566);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return xt.repeatWhen}});var Et=n(7835);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Et.retry}});var Ot=n(9843);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Ot.retryWhen}});var St=n(7561);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return St.refCount}});var Tt=n(1731);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Tt.sample}});var Pt=n(6086);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Pt.sampleTime}});var Ct=n(8624);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Ct.scan}});var At=n(582);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return At.sequenceEqual}});var kt=n(8977);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return kt.share}});var It=n(3133);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return It.shareReplay}});var Rt=n(5382);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Rt.single}});var jt=n(3982);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return jt.skip}});var Mt=n(9098);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Mt.skipLast}});var Nt=n(7372);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Nt.skipUntil}});var Dt=n(4721);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Dt.skipWhile}});var Lt=n(269);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Lt.startWith}});var Bt=n(8960);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Bt.subscribeOn}});var Ft=n(8774);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ft.switchAll}});var Ut=n(3879);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Ut.switchMap}});var zt=n(3274);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return zt.switchMapTo}});var Vt=n(8712);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Vt.switchScan}});var Wt=n(846);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Wt.take}});var Gt=n(8330);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Gt.takeLast}});var Ht=n(4780);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ht.takeUntil}});var Yt=n(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Yt.takeWhile}});var qt=n(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return qt.tap}});var Xt=n(8941);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Xt.throttle}});var Kt=n(7640);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Zt=n(4869);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Zt.throwIfEmpty}});var $t=n(489);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return $t.timeInterval}});var Qt=n(1554);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Qt.timeout}});var Jt=n(4862);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Jt.timeoutWith}});var en=n(6505);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return en.timestamp}});var tn=n(2343);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return tn.toArray}});var nn=n(5477);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return nn.window}});var rn=n(6746);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return rn.windowCount}});var on=n(8208);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return on.windowTime}});var an=n(6637);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return an.windowToggle}});var sn=n(1141);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return sn.windowWhen}});var un=n(5442);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return un.withLatestFrom}});var ln=n(187);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ln.zipAll}});var cn=n(8538);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return cn.zipWith}})},8831:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var r=n(7843),o=n(1342),i=n(3111),a=n(9445);t.bufferWhen=function(e){return r.operate(function(t,n){var r=null,s=null,u=function(){null==s||s.unsubscribe();var t=r;r=[],t&&n.next(t),a.innerFrom(e()).subscribe(s=i.createOperatorSubscriber(n,u,o.noop))};u(),t.subscribe(i.createOperatorSubscriber(n,function(e){return null==r?void 0:r.push(e)},function(){r&&n.next(r),n.complete()},void 0,function(){return r=s=null}))})}},8888:(e,t,n)=>{var r=n(5636).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(o>0&&(e.lastNeed=o-1),o):--r=0?(o>0&&(e.lastNeed=o-2),o):--r=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8917:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){this.keys=e,this.records=t,this.summary=n}},8918:function(e,t,n){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}),t.ConnectableObservable=void 0;var o=n(4662),i=n(8014),a=n(7561),s=n(3111),u=n(7843),l=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,u.hasLift(t)&&(r.lift=t.lift),r}return r(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new i.Subscription;var n=this.getSubject();t.add(this.source.subscribe(s.createOperatorSubscriber(n,void 0,function(){e._teardown(),n.complete()},function(t){e._teardown(),n.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=i.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return a.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},8937:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var r=n(6640),o=n(7843),i=n(3111);function a(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=r.identity),e=null!=e?e:a,o.operate(function(n,r){var o,a=!0;n.subscribe(i.createOperatorSubscriber(r,function(n){var i=t(n);!a&&e(o,i)||(a=!1,o=i,r.next(n))}))})}},8941:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=void 0;var r=n(7843),o=n(3111),i=n(9445);t.throttle=function(e,t){return r.operate(function(n,r){var a=null!=t?t:{},s=a.leading,u=void 0===s||s,l=a.trailing,c=void 0!==l&&l,f=!1,h=null,d=null,p=!1,v=function(){null==d||d.unsubscribe(),d=null,c&&(m(),p&&r.complete())},g=function(){d=null,p&&r.complete()},y=function(t){return d=i.innerFrom(e(t)).subscribe(o.createOperatorSubscriber(r,v,g))},m=function(){if(f){f=!1;var e=h;h=null,r.next(e),!p&&y(e)}};n.subscribe(o.createOperatorSubscriber(r,function(e){f=!0,h=e,(!d||d.closed)&&(u?m():y(e))},function(){p=!0,(!(c&&f&&d)||d.closed)&&r.complete()}))})}},8960:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var r=n(7843);t.subscribeOn=function(e,t){return void 0===t&&(t=0),r.operate(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}},8977:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n0&&(t=new s.SafeSubscriber({next:function(e){return m.next(e)},error:function(e){p=!0,v(),r=l(g,o,e),m.error(e)},complete:function(){h=!0,v(),r=l(g,f),m.complete()}}),i.innerFrom(e).subscribe(t))})(e)}}},8986:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var r=n(9568),o=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=r.dateTimestampProvider.now,e}();t.Scheduler=o},8987:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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;ot)},t.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},t.prototype._verifyConnectivityAndGetServerVersion=function(e){var t=e.address;return o(this,void 0,void 0,function(){var e,n;return i(this,function(r){switch(r.label){case 0:return[4,this._connectionPool.acquire({},t)];case 1:e=r.sent(),n=new c.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 o(this,void 0,void 0,function(){var e,r,o,a,s,u;return i(this,function(i){switch(i.label){case 0:e=[],i.label=1;case 1:return i.trys.push([1,8,9,11]),[4,t()];case 2:return r=i.sent(),[4,this._connectionPool.acquire({auth:n,skipReAuth:!0},r)];case 3:if(o=i.sent(),e.push(o),a=!o.protocol().isLastMessageLogon(),!o.supportsReAuth)throw(0,c.newError)("Driver is connected to a database that does not support user switch.");return a&&o.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:o,auth:n,waitReAuth:!0,forceReAuth:!0})]:[3,5];case 4:return i.sent(),[3,7];case 5:return!a||o.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:n},r,{requireNew:!0})];case 6:(s=i.sent())._sticky=!0,e.push(s),i.label=7;case 7:return[2,!0];case 8:if(u=i.sent(),g.includes(u.code))return[2,!1];throw u;case 9:return[4,Promise.all(e.map(function(e){return e.release()}))];case 10:return i.sent(),[7];case 11:return[2]}})})},t.prototype._verifyStickyConnection=function(e){var t=e.auth,n=e.connection;return e.address,o(this,void 0,void 0,function(){var e,r;return i(this,function(o){switch(o.label){case 0:return e=h.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,c.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},t.prototype.close=function(){return o(this,void 0,void 0,function(){return i(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._setIdle(t)},t._removeIdleObserverOnConnection=function(e){e._unsetIdle()},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}(c.ConnectionProvider);t.default=_},8995:function(e,t,n){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.bufferToggle=void 0;var o=n(8014),i=n(7843),a=n(9445),s=n(3111),u=n(1342),l=n(7479);t.bufferToggle=function(e,t){return i.operate(function(n,i){var c=[];a.innerFrom(e).subscribe(s.createOperatorSubscriber(i,function(e){var n=[];c.push(n);var r=new o.Subscription;r.add(a.innerFrom(t(e)).subscribe(s.createOperatorSubscriber(i,function(){l.arrRemove(c,n),i.next(n),r.unsubscribe()},u.noop)))},u.noop)),n.subscribe(s.createOperatorSubscriber(i,function(e){var t,n;try{for(var o=r(c),i=o.next();!i.done;i=o.next())i.value.push(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},function(){for(;c.length>0;)i.next(c.shift());i.complete()}))})}},9014:function(e,t,n){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(9305),a=o(n(7790)),s=n(6781),u=i.internal.constants.FETCH_ALL,l=i.error.PROTOCOL_ERROR,c=function(){function e(){}return e.prototype.onNext=function(e){},e.prototype.onError=function(e){},e.prototype.onCompleted=function(e){},e}();t.StreamObserver=c;var f=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,l=n.fetchSize,c=void 0===l?u:l,f=n.beforeError,h=n.afterError,d=n.beforeKeys,p=n.afterKeys,v=n.beforeComplete,g=n.afterComplete,y=n.server,m=n.highRecordWatermark,b=void 0===m?Number.MAX_VALUE:m,w=n.lowRecordWatermark,x=void 0===w?Number.MAX_VALUE:w,E=n.enrichMetadata,O=n.onDb,S=e.call(this)||this;return S._fieldKeys=null,S._fieldLookup=null,S._head=null,S._queuedRecords=[],S._tail=null,S._error=null,S._observers=[],S._meta={},S._server=y,S._beforeError=f,S._afterError=h,S._beforeKeys=d,S._afterKeys=p,S._beforeComplete=v,S._afterComplete=g,S._enrichMetadata=E||s.functional.identity,S._queryId=null,S._moreFunction=i,S._discardFunction=a,S._discard=!1,S._fetchSize=c,S._lowRecordWatermark=x,S._highRecordWatermark=b,S._setState(o?_.READY:_.READY_STREAMING),S._setupAutoPull(),S._paused=!1,S._pulled=!o,S._haveRecordStreamed=!1,S._onDb=O,S}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){this._haveRecordStreamed=!0;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}},e));if([void 0,null,"r","w","rw","s"].includes(n.type)){this._setState(_.SUCCEEDED);var r=null;this._beforeComplete&&(r=this._beforeComplete(n));var o=function(){t._tail=n,t._observers.some(function(e){return e.onCompleted})&&t._observers.forEach(function(e){e.onCompleted&&e.onCompleted(n)}),t._afterComplete&&t._afterComplete(n)};r?Promise.resolve(r).then(function(){return o()}):o()}else this.onError((0,i.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),l))},t.prototype._handleRunSuccess=function(e,t){var n=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&e.fields.length>0){this._fieldKeys=e.fields;for(var r=0;r0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}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;o{function n(e,t,n){return{kind:e,value:t,error:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=n("C",void 0,void 0),t.errorNotification=function(e){return n("E",void 0,e)},t.nextNotification=function(e){return n("N",e,void 0)},t.createNotification=n},9054:function(e,t,n){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;n{Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var r=n(2823),o=n(5);t.firstValueFrom=function(e,t){var n="object"==typeof t;return new Promise(function(i,a){var s=new o.SafeSubscriber({next:function(e){i(e),s.unsubscribe()},error:a,complete:function(){n?i(t.defaultValue):a(new r.EmptyError)}});e.subscribe(s)})}},9098:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var r=n(6640),o=n(7843),i=n(3111);t.skipLast=function(e){return e<=0?r.identity:o.operate(function(t,n){var r=new Array(e),o=0;return t.subscribe(i.createOperatorSubscriber(n,function(t){var i=o++;if(i{Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var r=n(4662),o=n(7360),i=n(9445),a=n(1107),s=n(3111),u=n(1251),l=n(6013);t.forkJoin=function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var r=n(983),o=n(1018);t.concatMap=function(e,t){return o.isFunction(t)?r.mergeMap(e,t,1):r.mergeMap(e,1)}},9137:function(e,t,n){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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||u(e,t)})})}function u(e,t){try{(n=i[e](t)).value instanceof o?Promise.resolve(n.value.v).then(l,c):f(a[0][2],n)}catch(e){f(a[0][3],e)}var n}function l(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var a=n(1018);t.readableStreamLikeToAsyncGenerator=function(e){return i(this,arguments,function(){var t,n,i;return r(this,function(r){switch(r.label){case 0:t=e.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,o(t.read())];case 3:return n=r.sent(),i=n.value,n.done?[4,o(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,o(i)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})},t.isReadableStreamLike=function(e){return a.isFunction(null==e?void 0:e.getReader)}},9139:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var r=n(6384),o=n(7843);t.reduce=function(e,t){return o.operate(r.scanInternals(e,t,arguments.length>=2,!1,!0))}},9155:function(e,t){var n=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(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var r=n(3413),o=null;t.errorContext=function(e){if(r.config.useDeprecatedSynchronousErrorHandling){var t=!o;if(t&&(o={errorThrown:!1,error:null}),e(),t){var n=o,i=n.errorThrown,a=n.error;if(o=null,i)throw a}}else e()},t.captureError=function(e){r.config.useDeprecatedSynchronousErrorHandling&&o&&(o.errorThrown=!0,o.error=e)}},9238:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var r=n(8918),o=n(1018),i=n(1483);t.multicast=function(e,t){var n=o.isFunction(e)?e:function(){return e};return o.isFunction(t)?i.connect(t,{connector:n}):function(e){return new r.ConnectableObservable(e,n)}}},9305:function(e,t,n){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.EagerResult=t.Result=t.Stats=t.QueryStatistics=t.ProfiledPlan=t.Plan=t.GqlStatusObject=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.GQLError=t.newGQLError=t.Neo4jError=t.newError=t.authTokenManagers=void 0,t.resolveCertificateProvider=t.clientCertificateProviders=t.notificationFilterMinimumSeverityLevel=t.notificationFilterDisabledClassification=t.notificationFilterDisabledCategory=t.notificationSeverityLevel=t.notificationClassification=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=t.Transaction=t.Connection=t.Releasable=t.ConnectionProvider=void 0;var s=n(9691);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,"newGQLError",{enumerable:!0,get:function(){return s.newGQLError}}),Object.defineProperty(t,"GQLError",{enumerable:!0,get:function(){return s.GQLError}}),Object.defineProperty(t,"isRetriableError",{enumerable:!0,get:function(){return s.isRetriableError}});var u=i(n(3371));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(5459);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(1517);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(4820));t.Record=f.default;var h=n(7093);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(6033));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,"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}});var p=i(n(1866));t.Notification=p.default,Object.defineProperty(t,"GqlStatusObject",{enumerable:!0,get:function(){return p.GqlStatusObject}}),Object.defineProperty(t,"notificationCategory",{enumerable:!0,get:function(){return p.notificationCategory}}),Object.defineProperty(t,"notificationClassification",{enumerable:!0,get:function(){return p.notificationClassification}}),Object.defineProperty(t,"notificationSeverityLevel",{enumerable:!0,get:function(){return p.notificationSeverityLevel}});var v=n(1985);Object.defineProperty(t,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return v.notificationFilterDisabledCategory}}),Object.defineProperty(t,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return v.notificationFilterDisabledClassification}}),Object.defineProperty(t,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return v.notificationFilterMinimumSeverityLevel}});var g=a(n(9512));t.Result=g.default;var y=a(n(8917));t.EagerResult=y.default;var m=i(n(2007));t.ConnectionProvider=m.default,Object.defineProperty(t,"Releasable",{enumerable:!0,get:function(){return m.Releasable}});var b=a(n(1409));t.Connection=b.default;var _=a(n(9473));t.Transaction=_.default;var w=a(n(5909));t.ManagedTransaction=w.default;var x=a(n(4569));t.TransactionPromise=x.default;var E=a(n(5481));t.Session=E.default;var O=i(n(7264)),S=O;t.Driver=O.default,t.driver=S;var T=a(n(1967));t.auth=T.default;var P=n(6755);Object.defineProperty(t,"bookmarkManager",{enumerable:!0,get:function(){return P.bookmarkManager}});var C=n(2069);Object.defineProperty(t,"authTokenManagers",{enumerable:!0,get:function(){return C.authTokenManagers}}),Object.defineProperty(t,"staticAuthTokenManager",{enumerable:!0,get:function(){return C.staticAuthTokenManager}});var A=n(7264);Object.defineProperty(t,"routing",{enumerable:!0,get:function(){return A.routing}});var k=i(n(6872));t.types=k;var I=i(n(4027));t.json=I;var R=a(n(1573));t.resultTransformers=R.default;var j=n(8264);Object.defineProperty(t,"clientCertificateProviders",{enumerable:!0,get:function(){return j.clientCertificateProviders}}),Object.defineProperty(t,"resolveCertificateProvider",{enumerable:!0,get:function(){return j.resolveCertificateProvider}});var M=i(n(6995));t.internal=M;var N={SERVICE_UNAVAILABLE:s.SERVICE_UNAVAILABLE,SESSION_EXPIRED:s.SESSION_EXPIRED,PROTOCOL_ERROR:s.PROTOCOL_ERROR};t.error=N;var D={authTokenManagers:C.authTokenManagers,newError:s.newError,Neo4jError:s.Neo4jError,newGQLError:s.newGQLError,GQLError:s.GQLError,isRetriableError:s.isRetriableError,error:N,Integer:u.default,int:u.int,isInt:u.isInt,inSafeRange:u.inSafeRange,toNumber:u.toNumber,toString:u.toString,internal:M,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:p.default,GqlStatusObject:p.GqlStatusObject,Plan:d.Plan,ProfiledPlan:d.ProfiledPlan,QueryStatistics:d.QueryStatistics,Stats:d.Stats,Result:g.default,EagerResult:y.default,Transaction:_.default,ManagedTransaction:w.default,TransactionPromise:x.default,Session:E.default,Driver:O.default,Connection:b.default,Releasable:m.Releasable,types:k,driver:S,json:I,auth:T.default,bookmarkManager:P.bookmarkManager,routing:A.routing,resultTransformers:R.default,notificationCategory:p.notificationCategory,notificationClassification:p.notificationClassification,notificationSeverityLevel:p.notificationSeverityLevel,notificationFilterDisabledCategory:v.notificationFilterDisabledCategory,notificationFilterDisabledClassification:v.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:v.notificationFilterMinimumSeverityLevel,clientCertificateProviders:j.clientCertificateProviders,resolveCertificateProvider:j.resolveCertificateProvider};t.default=D},9318:(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}},9353:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var r=n(4662),o=n(9445);t.defer=function(e){return new r.Observable(function(t){o.innerFrom(e()).subscribe(t)})}},9356:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var r=n(7843),o=n(3111);t.isEmpty=function(){return r.operate(function(e,t){e.subscribe(o.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}},9376:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var r=n(4662),o=n(8616);t.range=function(e,t,n){if(null==t&&(t=e,e=0),t<=0)return o.EMPTY;var i=t+e;return new r.Observable(n?function(t){var r=e;return n.schedule(function(){r{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var r=n(3146);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return r.audit}});var o=n(3231);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return o.auditTime}});var i=n(8015);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return i.buffer}});var a=n(5572);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return a.bufferCount}});var s=n(7210);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return s.bufferTime}});var u=n(8995);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var l=n(8831);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return l.bufferWhen}});var c=n(8118);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return c.catchError}});var f=n(6625);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var h=n(6728);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return h.combineLatestAll}});var d=n(2551);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var p=n(8239);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var v=n(7601);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return v.concat}});var g=n(8158);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return g.concatAll}});var y=n(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return y.concatMap}});var m=n(9938);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return m.concatMapTo}});var b=n(9669);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return b.concatWith}});var _=n(1483);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _.connect}});var w=n(1038);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var x=n(4461);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return x.debounce}});var E=n(8079);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return E.debounceTime}});var O=n(378);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return O.defaultIfEmpty}});var S=n(914);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return S.delay}});var T=n(8766);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return T.delayWhen}});var P=n(7441);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return P.dematerialize}});var C=n(5365);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return C.distinct}});var A=n(8937);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return A.distinctUntilChanged}});var k=n(9612);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return k.distinctUntilKeyChanged}});var I=n(4520);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return I.elementAt}});var R=n(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return R.endWith}});var j=n(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return j.every}});var M=n(1551);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return M.exhaust}});var N=n(2752);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return N.exhaustAll}});var D=n(4753);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return D.exhaustMap}});var L=n(7661);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return L.expand}});var B=n(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return B.filter}});var F=n(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return F.finalize}});var U=n(7714);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return U.find}});var z=n(9756);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return z.findIndex}});var V=n(8275);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return V.first}});var W=n(7815);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return W.groupBy}});var G=n(490);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return G.ignoreElements}});var H=n(9356);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return H.isEmpty}});var Y=n(8669);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Y.last}});var q=n(5471);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return q.map}});var X=n(3218);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return X.mapTo}});var K=n(2360);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return K.materialize}});var Z=n(1415);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return Z.max}});var $=n(361);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return $.merge}});var Q=n(7302);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Q.mergeAll}});var J=n(6902);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return J.flatMap}});var ee=n(983);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=n(6586);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var ne=n(4408);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return ne.mergeScan}});var re=n(8253);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return re.mergeWith}});var oe=n(2669);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return oe.min}});var ie=n(9247);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ie.multicast}});var ae=n(5184);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ae.observeOn}});var se=n(1226);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return se.onErrorResumeNext}});var ue=n(1518);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ue.pairwise}});var le=n(2171);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return le.partition}});var ce=n(4912);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return ce.pluck}});var fe=n(766);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var he=n(7220);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return he.publishBehavior}});var de=n(6106);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var pe=n(8157);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return pe.publishReplay}});var ve=n(4440);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ve.race}});var ge=n(5600);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ge.raceWith}});var ye=n(9139);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return ye.reduce}});var me=n(8522);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return me.repeat}});var be=n(6566);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return be.repeatWhen}});var _e=n(7835);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _e.retry}});var we=n(9843);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var xe=n(7561);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return xe.refCount}});var Ee=n(1731);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Ee.sample}});var Oe=n(6086);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Oe.sampleTime}});var Se=n(8624);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Se.scan}});var Te=n(582);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Te.sequenceEqual}});var Pe=n(8977);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Pe.share}});var Ce=n(3133);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Ce.shareReplay}});var Ae=n(5382);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Ae.single}});var ke=n(3982);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return ke.skip}});var Ie=n(9098);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ie.skipLast}});var Re=n(7372);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Re.skipUntil}});var je=n(4721);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return je.skipWhile}});var Me=n(269);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Me.startWith}});var Ne=n(8960);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Ne.subscribeOn}});var De=n(8774);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return De.switchAll}});var Le=n(3879);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Le.switchMap}});var Be=n(3274);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Be.switchMapTo}});var Fe=n(8712);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Fe.switchScan}});var Ue=n(846);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ue.take}});var ze=n(8330);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return ze.takeLast}});var Ve=n(4780);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ve.takeUntil}});var We=n(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return We.takeWhile}});var Ge=n(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Ge.tap}});var He=n(8941);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return He.throttle}});var Ye=n(7640);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ye.throttleTime}});var qe=n(4869);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return qe.throwIfEmpty}});var Xe=n(489);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Xe.timeInterval}});var Ke=n(1554);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ke.timeout}});var Ze=n(4862);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ze.timeoutWith}});var $e=n(6505);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return $e.timestamp}});var Qe=n(2343);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Qe.toArray}});var Je=n(5477);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Je.window}});var et=n(6746);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=n(8208);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var nt=n(6637);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return nt.windowToggle}});var rt=n(1141);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return rt.windowWhen}});var ot=n(5442);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return ot.withLatestFrom}});var it=n(5918);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return it.zip}});var at=n(187);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return at.zipAll}});var st=n(8538);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return st.zipWith}})},9445:function(e,t,n){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(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var s=n(8046),u=n(7629),l=n(4662),c=n(1116),f=n(1358),h=n(7614),d=n(6368),p=n(9137),v=n(1018),g=n(7315),y=n(3327);function m(e){return new l.Observable(function(t){var n=e[y.observable]();if(v.isFunction(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function b(e){return new l.Observable(function(t){for(var n=0;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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.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._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 o(e,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return void 0!==n.queuedObserver?[3,2]:(n.queuedObserver=this._createQueuedResultObserver(r),e=n,[4,this._subscribe(n.queuedObserver,!0).catch(function(){})]);case 1:e.streaming=t.sent(),r(),t.label=2;case 2:return[2,n.queuedObserver]}})})},s=function(e){if(void 0===e)throw(0,l.newError)("InvalidState: Result stream finished without Summary",l.PROTOCOL_ERROR);return!0};return{next:function(){return o(e,void 0,void 0,function(){var e;return i(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 o(e,void 0,void 0,function(){var e,r;return i(this,function(o){switch(o.label){case 0:return n.finished&&s(n.summary)?[2,{done:!0,value:null!=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?t:e.value,n.summary=e.value,[2,e]}})})},peek:function(){return o(e,void 0,void 0,function(){return i(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:h,a=null!==(n=e.onError)&&void 0!==n?n:f,s=null!==(r=e.onKeys)&&void 0!==r?r:d;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=u.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.getProtocolVersion()})},function(e){}).then(function(t){return new s.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 r(e){return e instanceof Error}function a(){var t;return o(this,void 0,void 0,function(){var o;return i(this,function(i){switch(i.label){case 0:if(s.length>0){if(o=null!==(t=s.shift())&&void 0!==t?t:(0,l.newError)("Unexpected empty buffer",l.PROTOCOL_ERROR),e(),r(o))throw o;return[2,o]}return u.resolvable=n(),[4,u.resolvable.promise];case 1:return[2,i.sent()]}})})}var s=[],u={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!==u.resolvable){var n=u.resolvable;u.resolvable=null,r(t)?n.reject(t):n.resolve(t)}else s.push(t),e()},dequeue:a,dequeueUntilDone:function(){return o(t,void 0,void 0,function(){var e;return i(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 o(t,void 0,void 0,function(){var t,o;return i(this,function(i){switch(i.label){case 0:if(s.length>0){if(r(t=s[0]))throw t;return[2,t]}u.resolvable=n(),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,u.resolvable.promise];case 2:return t=i.sent(),s.unshift(t),[2,t];case 3:throw o=i.sent(),s.unshift(o),o;case 4:return e(),[7];case 5:return[2]}})})},get size(){return s.length}};return c},e}();r=Symbol.toStringTag,t.default=p},9567:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var r=n(9445),o=n(5184),i=n(8960);t.scheduleObservable=function(e,t){return r.innerFrom(e).pipe(i.subscribeOn(t),o.observeOn(t))}},9568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},9589:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var r=n(9445),o=n(5184),i=n(8960);t.schedulePromise=function(e,t){return r.innerFrom(e).pipe(i.subscribeOn(t),o.observeOn(t))}},9612:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var r=n(8937);t.distinctUntilKeyChanged=function(e,t){return r.distinctUntilChanged(function(n,r){return t?t(n[e],r[e]):n[e]===r[e]})}},9669:function(e,t,n){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(e){o={error:e}}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){for(var n=0,r=t.length,o=e.length;n{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var r=n(5568);t.ObjectUnsubscribedError=r.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})},9689:function(e,t,n){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(4132);Object.defineProperty(t,"SingleConnectionProvider",{enumerable:!0,get:function(){return r(o).default}});var i=n(8987);Object.defineProperty(t,"PooledConnectionProvider",{enumerable:!0,get:function(){return r(i).default}});var a=n(3545);Object.defineProperty(t,"DirectConnectionProvider",{enumerable:!0,get:function(){return r(a).default}});var s=n(7428);Object.defineProperty(t,"RoutingConnectionProvider",{enumerable:!0,get:function(){return r(s).default}})},9691:function(e,t,n){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};Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.GQLError=t.Neo4jError=t.isRetriableError=t.newGQLError=t.newError=void 0;var s=a(n(4027)),u=n(1053),l={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"};Object.freeze(l);var c=Object.values(l),f="ServiceUnavailable";t.SERVICE_UNAVAILABLE=f;var h="SessionExpired";t.SESSION_EXPIRED=h,t.PROTOCOL_ERROR="ProtocolError";var d=function(e){function t(n,r,o,i,a){var s,u=this;return(u=e.call(this,n,null!=a?{cause:a}:void 0)||this).constructor=t,u.__proto__=t.prototype,u.cause=null!=a?a:void 0,u.gqlStatus=r,u.gqlStatusDescription=o,u.diagnosticRecord=i,u.classification=function(e){return void 0===e||void 0===e._classification?"UNKNOWN":c.includes(e._classification)?null==e?void 0:e._classification:"UNKNOWN"}(u.diagnosticRecord),u.rawClassification=null!==(s=null==i?void 0:i._classification)&&void 0!==s?s:void 0,u.name="GQLError",u}return r(t,e),Object.defineProperty(t.prototype,"diagnosticRecordAsJsonString",{get:function(){return s.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),t}(Error);t.GQLError=d;var p=function(e){function t(n,r,o,i,a,s){var u=e.call(this,n,o,i,a,s)||this;return u.constructor=t,u.__proto__=t.prototype,u.code=r,u.name="Neo4jError",u.retriable=function(e){return e===f||e===h||function(e){return"Neo.ClientError.Security.AuthorizationExpired"===e}(e)||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(e)}(r),u}return r(t,e),t.isRetriable=function(e){return null!=e&&e instanceof t&&e.retriable},t}(d);t.Neo4jError=p,t.newError=function(e,t,n,r,o,i){return new p(e,null!=t?t:"N/A",null!=r?r:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:u.rawPolyfilledDiagnosticRecord,n)},t.newGQLError=function(e,t,n,r,o){return new d(e,null!=n?n:"50N42",null!=r?r:"error: general processing exception - unexpected error. "+e,null!=o?o:u.rawPolyfilledDiagnosticRecord,t)};var v=p.isRetriable;t.isRetriableError=v},9730:function(e,t,n){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.__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(e){o={error:e}}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;o{Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var r=n(7843),o=n(7714);t.findIndex=function(e,t){return r.operate(o.createFind(e,t,"index"))}},9792:(e,t,n)=>{var r=n(7045),o=n(4360),i=n(6804);e.exports=function(e,t){if(!t)return e;var n=Object.keys(t);if(0===n.length)return e;for(var a=r(e),s=n.length-1;s>=0;s--){var u=n[s],l=String(t[u]);l&&(l=" "+l),i(a,{type:"preprocessor",data:"#define "+u+l})}return o(a)}},9823:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(9305),o=n(8813),i=n(9419),a=(r.internal.logger.Logger,r.error.SERVICE_UNAVAILABLE),s=function(){function e(e){var t=void 0===e?{}:e,n=t.maxRetryTimeout,r=void 0===n?3e4:n,o=t.initialDelay,i=void 0===o?1e3:o,a=t.delayMultiplier,s=void 0===a?2:a,l=t.delayJitter,c=void 0===l?.2:l,f=t.logger,h=void 0===f?null:f;this._maxRetryTimeout=u(r,3e4),this._initialDelay=u(i,1e3),this._delayMultiplier=u(s,2),this._delayJitter=u(c,.2),this._logger=h}return e.prototype.retry=function(e){var t=this;return e.pipe((0,i.retryWhen)(function(e){var n=[],s=Date.now(),u=1,l=t._initialDelay;return e.pipe((0,i.mergeMap)(function(e){if(!(0,r.isRetriableError)(e))return(0,o.throwError)(function(){return e});if(n.push(e),u>=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},9843:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var r=n(9445),o=n(2483),i=n(7843),a=n(3111);t.retryWhen=function(e){return i.operate(function(t,n){var i,s,u=!1,l=function(){i=t.subscribe(a.createOperatorSubscriber(n,void 0,void 0,function(t){s||(s=new o.Subject,r.innerFrom(e(s)).subscribe(a.createOperatorSubscriber(n,function(){return i?l():u=!0}))),s&&s.next(t)})),u&&(i.unsubscribe(),i=null,u=!1,l())};l()})}},9857:function(e,t,n){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}),Object.defineProperty(t.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=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(6385)).default);t.default=i},9938:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var r=n(9135),o=n(1018);t.concatMapTo=function(e,t){return o.isFunction(t)?r.concatMap(function(){return e},t):r.concatMap(function(){return e})}},9975:(e,t,n)=>{var r=n(7101),o=Array.prototype.concat,i=Array.prototype.slice,a=e.exports=function(e){for(var t=[],n=0,a=e.length;n{var t=e&&e.__esModule?()=>e.default:()=>e;return jp.d(t,{a:t}),t},jp.d=(e,t)=>{for(var n in t)jp.o(t,n)&&!jp.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},jp.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),jp.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),jp.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var Mp=jp(5250),Np=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function Dp(e,t){function n(){this.constructor=e}Np(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Lp=function(){function e(e){void 0===e&&(e="Atom@"+kg()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Qg.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){by(this)},e.prototype.reportChanged=function(){yy(),function(e){if(e.lowestObserverState!==Qg.STALE){e.lowestObserverState=Qg.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Qg.UP_TO_DATE&&(r.isTracing!==Jg.NONE&&_y(r,e),r.onBecomeStale()),r.dependenciesState=Qg.STALE}}}(this),my()},e.prototype.toString=function(){return this.name},e}(),Bp=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+kg()),void 0===n&&(n=Dg),void 0===r&&(r=Dg);var o=e.call(this,t)||this;return o.name=t,o.onBecomeObservedHandler=n,o.onBecomeUnobservedHandler=r,o.isPendingUnobservation=!1,o.isBeingTracked=!1,o}return Dp(t,e),t.prototype.reportObserved=function(){return yy(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),my(),!!ny.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Lp),Fp=Xg("Atom",Lp);function Up(e){return e.interceptors&&e.interceptors.length>0}function zp(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),Ng(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Vp(e,t){var n=ky();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o0}function Gp(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),Ng(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Hp(e,t){var n=ky(),r=e.changeListeners;if(r){for(var o=0,i=(r=r.slice()).length;o=this.length,value:tt){for(var n=new Array(e-t),r=0;r0&&e+t+1>av&&dv(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;Ty(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=[]),Up(this)){var i=Vp(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return Cg;t=i.removedCount,n=i.added}var a=(n=n.map(function(e){return r.enhancer(e,void 0)})).length-t;this.updateArrayLength(o,a);var s=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,n){if(n.length<1e4)return(r=this.values).splice.apply(r,[e,t].concat(n));var r,o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&Yp(),o=Wp(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&Xp(i),this.atom.reportChanged(),o&&Hp(this,i),r&&Zp()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&Yp(),o=Wp(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&Xp(i),this.atom.reportChanged(),o&&Hp(this,i),r&&Zp()},e}(),lv=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+kg()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new uv(r,n,i,o);return Hg(i,"$mobx",a),t&&t.length&&i.spliceWithArray(0,0,t),iv&&Object.defineProperty(a.array,"0",cv),i}return Dp(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var r,o=this.$mobx.values;r=e0,"actions should have valid names, got: '"+e+"'");var n=function(){return xv(e,t,this,arguments)};return n.originalFn=t,n.isMobxAction=!0,n}function xv(e,t,n,r){var o=function(e,t,n,r){var o=Yp()&&!!e,i=0;if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u";Gg(e,t,Rv(i,n))},function(e){return this[e]},function(){Rg(!1,_v("m001"))},!1,!0),Iv=Tv(function(e,t,n){Nv(e,t,n)},function(e){return this[e]},function(){Rg(!1,_v("m001"))},!1,!1),Rv=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?wv(e.name||"",e):2===arguments.length&&"function"==typeof t?wv(e,t):1===arguments.length&&"string"==typeof e?jv(e):jv(t).apply(null,arguments)};function jv(e){return function(t,n,r){if(r&&"function"==typeof r.value)return r.value=wv(e,r.value),r.enumerable=!1,r.configurable=!0,r;if(void 0!==r&&void 0!==r.get)throw new Error("[mobx] action is not expected to be used with getters");return kv(e).apply(this,arguments)}}function Mv(e){return"function"==typeof e&&!0===e.isMobxAction}function Nv(e,t,n){var r=function(){return xv(t,n,e,arguments)};r.isMobxAction=!0,Gg(e,t,r)}Rv.bound=function(e,t,n){if("function"==typeof e){var r=wv("",e);return r.autoBind=!0,r}return Iv.apply(null,arguments)};var Dv=Object.prototype.toString;function Lv(e,t){return Bv(e,t)}function Bv(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function(e,t,n,r){e=Fv(e),t=Fv(t);var o=Dv.call(e);if(o!==Dv.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),i){if((u=e.length)!==t.length)return!1;for(;u--;)if(!Bv(e[u],t[u],n,r))return!1}else{var l,c=Object.keys(e);if(u=c.length,Object.keys(t).length!==u)return!1;for(;u--;)if(!Uv(t,l=c[u])||!Bv(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,n,r)}function Fv(e){return vv(e)?e.peek():Pg(e)?e.entries():Kg(e)?function(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}(e.entries()):e}function Uv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function zv(e,t){return e===t}var Vv={identity:zv,structural:function(e,t){return Lv(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||zv(e,t)}};function Wv(e,t,n){var r,o,i;"string"==typeof e?(r=e,o=t,i=n):(r=e.name||"Autorun@"+kg(),o=e,i=t),Rg("function"==typeof o,_v("m004")),Rg(!1===Mv(o),_v("m005")),i&&(o=o.bind(i));var a=new Ny(r,function(){this.track(s)});function s(){o(a)}return a.schedule(),a.getDisposer()}function Gv(e,t,n){var r;arguments.length>3&&Ig(_v("m007")),yg(e)&&Ig(_v("m008")),(r="object"==typeof n?n:{}).name=r.name||e.name||t.name||"Reaction@"+kg(),r.fireImmediately=!0===n||!0===r.fireImmediately,r.delay=r.delay||0,r.compareStructural=r.compareStructural||r.struct||!1,t=Rv(r.name,r.context?t.bind(r.context):t),r.context&&(e=e.bind(r.context));var o,i=!0,a=!1,s=r.equals?r.equals:r.compareStructural||r.struct?Vv.structural:Vv.default,u=new Ny(r.name,function(){i||r.delay<1?l():a||(a=!0,setTimeout(function(){a=!1,l()},r.delay))});function l(){if(!u.isDisposed){var n=!1;u.track(function(){var t=e(u);n=i||!s(o,t),o=t}),i&&r.fireImmediately&&t(o,u),i||!0!==n||t(o,u),i&&(i=!1)}}return u.schedule(),u.getDisposer()}var Hv=function(){function e(e,t,n,r,o){this.derivation=e,this.scope=t,this.equals=n,this.dependenciesState=Qg.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Qg.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+kg(),this.value=new xy(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Jg.NONE,this.name=r||"ComputedValue@"+kg(),o&&(this.setter=wv(r+"-setter",o))}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState===Qg.UP_TO_DATE){e.lowestObserverState=Qg.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Qg.UP_TO_DATE&&(r.dependenciesState=Qg.POSSIBLY_STALE,r.isTracing!==Jg.NONE&&_y(r,e),r.onBecomeStale())}}}(this)},e.prototype.onBecomeUnobserved=function(){Cy(this),this.value=void 0},e.prototype.get=function(){Rg(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===ny.inBatch?(yy(),Oy(this)&&(this.isTracing!==Jg.NONE&&console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context and doing a full recompute"),this.value=this.computeValue(!1)),my()):(by(this),Oy(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState!==Qg.STALE){e.lowestObserverState=Qg.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Qg.POSSIBLY_STALE?r.dependenciesState=Qg.STALE:r.dependenciesState===Qg.UP_TO_DATE&&(e.lowestObserverState=Qg.UP_TO_DATE)}}}(this));var e=this.value;if(Ey(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(Ey(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){Rg(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Rg(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){Yp()&&qp({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.dependenciesState===Qg.NOT_TRACKING,n=this.value=this.computeValue(!0);return t||Ey(e)||Ey(n)||!this.equals(e,n)},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,ny.computationDepth++,e)t=Py(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new xy(e)}return ny.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return Wv(function(){var i=n.get();if(!r||t){var a=ky();e({type:"update",object:n,newValue:i,oldValue:o}),Iy(a)}r=!1,o=i})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return $g(this.get())},e.prototype.whyRun=function(){var e=Boolean(ny.trackingDerivation),t=Lg(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=Lg(dy(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Qg.NOT_TRACKING?_v("m032"):" * This computation will re-run if any of the following observables changes:\n "+Bg(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n "+_v("m038")+"\n\n * If the outcome of this computation changes, the following observers will be re-run:\n "+Bg(n)+"\n")},e}();Hv.prototype[Zg()]=Hv.prototype.valueOf;var Yv=Xg("ComputedValue",Hv),qv=function(){function e(e,t){this.target=e,this.name=t,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return Rg(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),Gp(this,e)},e.prototype.intercept=function(e){return zp(this,e)},e}();function Xv(e,t){if(rg(e)&&e.hasOwnProperty("$mobx"))return e.$mobx;Rg(Object.isExtensible(e),_v("m035")),Ug(e)||(t=(e.constructor.name||"ObservableObject")+"@"+kg()),t||(t="ObservableObject@"+kg());var n=new qv(e,t);return Hg(e,"$mobx",n),n}function Kv(e,t,n,r){if(e.values[t]&&!Yv(e.values[t]))return Rg("value"in n,"The property "+t+" in "+e.name+" is already observable, cannot redefine it as computed property"),void(e.target[t]=n.value);if("value"in n)if(yg(n.value)){var o=n.value;Zv(e,t,o.initialValue,o.enhancer)}else Mv(n.value)&&!0===n.value.autoBind?Nv(e.target,t,n.value.originalFn):Yv(n.value)?function(e,t,n){var r=e.name+"."+t;n.name=r,n.scope||(n.scope=e.target),e.values[t]=n,Object.defineProperty(e.target,t,eg(t))}(e,t,n.value):Zv(e,t,n.value,r);else $v(e,t,n.get,n.set,Vv.default,!0)}function Zv(e,t,n,r){if(qg(e.target,t),Up(e)){var o=Vp(e,{object:e.target,name:t,type:"add",newValue:n});if(!o)return;n=o.newValue}n=(e.values[t]=new yv(n,r,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,function(e){return Qv[e]||(Qv[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){tg(this,e,t)}})}(t)),function(e,t,n,r){var o=Wp(e),i=Yp(),a=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&Xp(a),o&&Hp(e,a),i&&Zp()}(e,e.target,t,n)}function $v(e,t,n,r,o,i){i&&qg(e.target,t),e.values[t]=new Hv(n,e.target,o,e.name+"."+t,r),i&&Object.defineProperty(e.target,t,eg(t))}var Qv={},Jv={};function eg(e){return Jv[e]||(Jv[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function tg(e,t,n){var r=e.$mobx,o=r.values[t];if(Up(r)){if(!(s=Vp(r,{type:"update",object:e,name:t,newValue:n})))return;n=s.newValue}if((n=o.prepareNewValue(n))!==gv){var i=Wp(r),a=Yp(),s=i||a?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;a&&Xp(s),o.setNewValue(n),i&&Hp(r,s),a&&Zp()}}var ng=Xg("ObservableObjectAdministration",qv);function rg(e){return!!Fg(e)&&(Cv(e),ng(e.$mobx))}function og(e,t){if(null==e)return!1;if(void 0!==t){if(vv(e)||Pg(e))throw new Error(_v("m019"));if(rg(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return rg(e)||!!e.$mobx||Fp(e)||zy(e)||Yv(e)}function ig(e){return Rg(!!e,":("),Tv(function(t,n,r,o,i){qg(t,n),Rg(!i||!i.get,_v("m022")),Zv(Xv(t,void 0),n,r,e)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){tg(this,e,t)},!0,!1)}function ag(e){for(var t=[],n=1;n=2,_v("m014")),Rg("object"==typeof e,_v("m015")),Rg(!Pg(e),_v("m016")),n.forEach(function(e){Rg("object"==typeof e,_v("m017")),Rg(!og(e),_v("m018"))});for(var r=Xv(e),o={},i=n.length-1;i>=0;i--){var a=n[i];for(var s in a)if(!0!==o[s]&&Wg(a,s)){if(o[s]=!0,e===a&&!Yg(e,s))continue;Kv(r,s,Object.getOwnPropertyDescriptor(a,s),t)}}return e}var lg=ig(bg),cg=ig(_g),fg=ig(wg),hg=ig(xg),dg=ig(Eg),pg={box:function(e,t){return arguments.length>2&&gg("box"),new yv(e,bg,t)},shallowBox:function(e,t){return arguments.length>2&&gg("shallowBox"),new yv(e,wg,t)},array:function(e,t){return arguments.length>2&&gg("array"),new lv(e,bg,t)},shallowArray:function(e,t){return arguments.length>2&&gg("shallowArray"),new lv(e,wg,t)},map:function(e,t){return arguments.length>2&&gg("map"),new Tg(e,bg,t)},shallowMap:function(e,t){return arguments.length>2&&gg("shallowMap"),new Tg(e,wg,t)},object:function(e,t){arguments.length>2&&gg("object");var n={};return Xv(n,t),ag(n,e),n},shallowObject:function(e,t){arguments.length>2&&gg("shallowObject");var n={};return Xv(n,t),sg(n,e),n},ref:function(){return arguments.length<2?mg(wg,arguments[0]):fg.apply(null,arguments)},shallow:function(){return arguments.length<2?mg(_g,arguments[0]):cg.apply(null,arguments)},deep:function(){return arguments.length<2?mg(bg,arguments[0]):lg.apply(null,arguments)},struct:function(){return arguments.length<2?mg(xg,arguments[0]):hg.apply(null,arguments)}},vg=function(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return lg.apply(null,arguments);if(Rg(arguments.length<=1,_v("m021")),Rg(!yg(e),_v("m020")),og(e))return e;var t=bg(e,0,void 0);return t!==e?t:vg.box(e)};function gg(e){Ig("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function yg(e){return"object"==typeof e&&null!==e&&!0===e.isMobxModifierDescriptor}function mg(e,t){return Rg(!yg(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function bg(e,t,n){return yg(e)&&Ig("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),og(e)?e:Array.isArray(e)?vg.array(e,n):Ug(e)?vg.object(e,n):Kg(e)?vg.map(e,n):e}function _g(e,t,n){return yg(e)&&Ig("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),null==e||rg(e)||vv(e)||Pg(e)?e:Array.isArray(e)?vg.shallowArray(e,n):Ug(e)?vg.shallowObject(e,n):Kg(e)?vg.shallowMap(e,n):Ig("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function wg(e){return e}function xg(e,t,n){if(Lv(e,t))return t;if(og(e))return e;if(Array.isArray(e))return new lv(e,xg,n);if(Kg(e))return new Tg(e,xg,n);if(Ug(e)){var r={};return Xv(r,n),ug(r,xg,[e]),r}return e}function Eg(e,t,n){return Lv(e,t)?t:e}function Og(e,t){void 0===t&&(t=void 0),yy();try{return e.apply(t)}finally{my()}}Object.keys(pg).forEach(function(e){return vg[e]=pg[e]}),vg.deep.struct=vg.struct,vg.ref.struct=function(){return arguments.length<2?mg(Eg,arguments[0]):dg.apply(null,arguments)};var Sg={},Tg=function(){function e(e,t,n){void 0===t&&(t=bg),void 0===n&&(n="ObservableMap@"+kg()),this.enhancer=t,this.name=n,this.$mobx=Sg,this._data=Object.create(null),this._hasMap=Object.create(null),this._keys=new lv(void 0,wg,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this.dehancer=void 0,this.merge(e)}return e.prototype._has=function(e){return void 0!==this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Up(this)){var r=Vp(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,Up(this)&&!(o=Vp(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=Yp(),r=Wp(this),o=r||n?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return n&&Xp(o),Og(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0}),r&&Hp(this,o),n&&Zp(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new yv(t,wg,this.name+"."+e+"?",!1),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if((t=n.prepareNewValue(t))!==gv){var r=Yp(),o=Wp(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&Xp(i),n.setNewValue(t),o&&Hp(this,i),r&&Zp()}},e.prototype._addValue=function(e,t){var n=this;Og(function(){var r=n._data[e]=new yv(t,n.enhancer,n.name+"."+e,!1);t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)});var r=Yp(),o=Wp(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&Xp(i),o&&Hp(this,i),r&&Zp()},e.prototype.get=function(e){return e=""+e,this.has(e)?this.dehanceValue(this._data[e].get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return Jp(this._keys.slice())},e.prototype.values=function(){return Jp(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return Jp(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r,n)})},e.prototype.merge=function(e){var t=this;return Pg(e)&&(e=e.toJS()),Og(function(){Ug(e)?Object.keys(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):Kg(e)?e.forEach(function(e,n){return t.set(n,e)}):null!=e&&Ig("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;Og(function(){Ay(function(){e.keys().forEach(e.delete,e)})})},e.prototype.replace=function(e){var t=this;return Og(function(){var n,r=Ug(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return e[0]}):Kg(n)?Array.from(n.keys()):Pg(n)?n.keys():Ig("Cannot get keys from "+n);t.keys().filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!=e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"', only strings, numbers and booleans are accepted as key in observable maps.")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return Rg(!0!==t,_v("m033")),Gp(this,e)},e.prototype.intercept=function(e){return zp(this,e)},e}();ev(Tg.prototype,function(){return this.entries()});var Pg=Xg("ObservableMap",Tg),Cg=[];function Ag(){return"undefined"!=typeof window?window:jp.g}function kg(){return++ny.mobxGuid}function Ig(e,t){throw Rg(!1,e,t),"X"}function Rg(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}Object.freeze(Cg);var jg=[];function Mg(e){return-1===jg.indexOf(e)&&(jg.push(e),console.error("[mobx] Deprecated: "+e),!0)}function Ng(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Dg=function(){};function Lg(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}function Bg(e,t,n){return void 0===t&&(t=100),void 0===n&&(n=" - "),e?e.slice(0,t).join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":""):""}function Fg(e){return null!==e&&"object"==typeof e}function Ug(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function zg(){for(var e=arguments[0],t=1,n=arguments.length;t0&&(t.dependencies=Lg(e.observing).map(fy)),t}function hy(e){var t={name:e.name};return function(e){return e.observers&&e.observers.length>0}(e)&&(t.observers=dy(e).map(hy)),t}function dy(e){return e.observers}function py(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function vy(e,t){if(1===e.observers.length)e.observers.length=0,gy(e);else{var n=e.observers,r=e.observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function gy(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,ny.pendingUnobservations.push(e))}function yy(){ny.inBatch++}function my(){if(0===--ny.inBatch){Fy();for(var e=ny.pendingUnobservations,t=0;t=1e3?t.push("(and many more)"):(t.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach(function(e){return wy(e,t,n+1)}))}ay.__mobxInstanceCount?(ay.__mobxInstanceCount++,setTimeout(function(){ry||oy||iy||(iy=!0,console.warn("[mobx] Warning: there are multiple mobx instances active. This might lead to unexpected results. See https://github.com/mobxjs/mobx/issues/1082 for details."))},1)):ay.__mobxInstanceCount=1,function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(Qg||(Qg={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Jg||(Jg={}));var xy=function(e){this.cause=e};function Ey(e){return e instanceof xy}function Oy(e){switch(e.dependenciesState){case Qg.UP_TO_DATE:return!1;case Qg.NOT_TRACKING:case Qg.STALE:return!0;case Qg.POSSIBLY_STALE:for(var t=ky(),n=e.observing,r=n.length,o=0;o0;ny.computationDepth>0&&t&&Ig(_v("m031")+e.name),!ny.allowStateChanges&&t&&Ig(_v(ny.strictMode?"m030a":"m030b")+e.name)}function Py(e,t,n){Ry(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++ny.runId;var r,o=ny.trackingDerivation;ny.trackingDerivation=e;try{r=t.call(n)}catch(e){r=new xy(e)}return ny.trackingDerivation=o,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=Qg.UP_TO_DATE,o=0,i=e.unboundDepsCount,a=0;ar&&(r=s.dependenciesState);for(n.length=o,e.newObserving=null,i=t.length;i--;)0===(s=t[i]).diffValue&&vy(s,e),s.diffValue=0;for(;o--;){var s;1===(s=n[o]).diffValue&&(s.diffValue=0,py(s,e))}r!==Qg.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),r}function Cy(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)vy(t[n],e);e.dependenciesState=Qg.NOT_TRACKING}function Ay(e){var t=ky(),n=e();return Iy(t),n}function ky(){var e=ny.trackingDerivation;return ny.trackingDerivation=null,e}function Iy(e){ny.trackingDerivation=e}function Ry(e){if(e.dependenciesState!==Qg.UP_TO_DATE){e.dependenciesState=Qg.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Qg.UP_TO_DATE}}function jy(e){return console.log(e),e}function My(e){switch(e.length){case 0:return ny.trackingDerivation;case 1:return sy(e[0]);case 2:return sy(e[0],e[1])}}var Ny=function(){function e(e,t){void 0===e&&(e="Reaction@"+kg()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Qg.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+kg(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Jg.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,ny.pendingReactions.push(this),Fy())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(yy(),this._isScheduled=!1,Oy(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&Yp()&&qp({object:this,type:"scheduled-reaction"})),my())},e.prototype.track=function(e){yy();var t,n=Yp();n&&(t=Date.now(),Xp({object:this,type:"reaction",fn:e})),this._isRunning=!0;var r=Py(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Cy(this),Ey(r)&&this.reportExceptionInDerivation(r.cause),n&&Zp({time:Date.now()-t}),my()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this,r=_v("m037");console.error(n||r,e),Yp()&&qp({type:"error",message:n,error:e,object:this}),ny.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(yy(),Cy(this),my()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=Dy,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=Lg(this._isRunning?this.newObserving:this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+Bg(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+_v("m038")+"\n"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t0||ny.isRunningReactions||By(Uy)}function Uy(){ny.isRunningReactions=!0;for(var e=ny.pendingReactions,t=0;e.length>0;){++t===Ly&&(console.error("Reaction doesn't converge to a stable state after "+Ly+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r=0&&ny.globalReactionErrorHandlers.splice(t,1)}},reserveArrayBuffer:dv,resetGlobalState:function(){ny.resetId++;var e=new ty;for(var t in e)-1===ey.indexOf(t)&&(ny[t]=e[t]);ny.allowStateChanges=!ny.strictMode},isolateGlobalState:function(){oy=!0,Ag().__mobxInstanceCount--},shareGlobalState:function(){Mg("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),ry=!0;var e=Ag(),t=ny;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");e.__mobxGlobal?ny=e.__mobxGlobal:e.__mobxGlobal=t},spyReport:qp,spyReportEnd:Zp,spyReportStart:Xp,setReactionScheduler:function(e){var t=By;By=function(n){return e(function(){return t(n)})}}},Xy={Reaction:Ny,untracked:Ay,Atom:Bp,BaseAtom:Lp,useStrict:Ev,isStrictModeEnabled:function(){return ny.strictMode},spy:$p,comparer:Vv,asReference:function(e){return Mg("asReference is deprecated, use observable.ref instead"),vg.ref(e)},asFlat:function(e){return Mg("asFlat is deprecated, use observable.shallow instead"),vg.shallow(e)},asStructure:function(e){return Mg("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),vg.struct(e)},asMap:function(e){return Mg("asMap is deprecated, use observable.map or observable.shallowMap instead"),vg.map(e||{})},isModifierDescriptor:yg,isObservableObject:rg,isBoxedObservable:mv,isObservableArray:vv,ObservableMap:Tg,isObservableMap:Pg,map:function(e){return Mg("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),vg.map(e)},transaction:Og,observable:vg,computed:Hy,isObservable:og,isComputed:function(e,t){if(null==e)return!1;if(void 0!==t){if(!1===rg(e))return!1;if(!e.$mobx.values[t])return!1;var n=sy(e,t);return Yv(n)}return Yv(e)},extendObservable:ag,extendShallowObservable:sg,observe:function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return uy(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return uy(e).observe(t,n)}(e,t,n)},intercept:function(e,t,n){return"function"==typeof n?function(e,t,n){return uy(e,t).intercept(n)}(e,t,n):function(e,t){return uy(e).intercept(t)}(e,t)},autorun:Wv,autorunAsync:function(e,t,n,r){var o,i,a,s;"string"==typeof e?(o=e,i=t,a=n,s=r):(o=e.name||"AutorunAsync@"+kg(),i=e,a=t,s=n),Rg(!1===Mv(i),_v("m006")),void 0===a&&(a=1),s&&(i=i.bind(s));var u=!1,l=new Ny(o,function(){u||(u=!0,setTimeout(function(){u=!1,l.isDisposed||l.track(c)},a))});function c(){i(l)}return l.schedule(),l.getDisposer()},when:function(e,t,n,r){var o,i,a,s;return"string"==typeof e?(o=e,i=t,a=n,s=r):(o="When@"+kg(),i=e,a=t,s=n),Wv(o,function(e){if(i.call(s)){e.dispose();var t=ky();a.call(s),Iy(t)}})},reaction:Gv,action:Rv,isAction:Mv,runInAction:function(e,t,n){var r="string"==typeof e?e:e.name||"",o="function"==typeof e?e:t,i="function"==typeof e?t:n;return Rg("function"==typeof o,_v("m002")),Rg(0===o.length,_v("m003")),Rg("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),xv(r,o,i,void 0)},expr:function(e,t){return Sy()||console.warn(_v("m013")),Hy(e,{context:t}).get()},toJS:Yy,createTransformer:function(e,t){Rg("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var n={},r=ny.resetId,o=function(r){function o(t,n){var o=r.call(this,function(){return e(n)},void 0,Vv.default,"Transformer-"+e.name+"-"+t,void 0)||this;return o.sourceIdentifier=t,o.sourceObject=n,o}return Dp(o,r),o.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},o}(Hv);return function(e){r!==ny.resetId&&(n={},r=ny.resetId);var t=function(e){if("string"==typeof e||"number"==typeof e)return e;if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object or primitive value, got: "+e);var t=e.$transformId;return void 0===t&&Gg(e,"$transformId",t=kg()),t}(e),i=n[t];return i?i.get():(i=n[t]=new o(t,e)).get()}},whyRun:function(e,t){return Mg("`whyRun` is deprecated in favor of `trace`"),(e=My(arguments))?Yv(e)||zy(e)?jy(e.whyRun()):Ig(_v("m025")):jy(_v("m024"))},isArrayLike:function(e){return Array.isArray(e)||vv(e)},extras:qy},Ky=!1,Zy=function(e){var t=Xy[e];Object.defineProperty(Xy,e,{get:function(){return Ky||(Ky=!0,console.warn("Using default export (`import mobx from 'mobx'`) is deprecated and won’t work in mobx@4.0.0\nUse `import * as mobx from 'mobx'` instead")),t}})};for(var $y in Xy)Zy($y);function Qy(e){return Qy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qy(e)}function Jy(e){var t=function(e){if("object"!=Qy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qy(t)?t:t+""}"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:$p,extras:qy});var em=["onLayoutDone","onLayoutStep","onError","onInitialization","onLayoutComputing","onWebGLContextLost","onZoomTransitionDone","restart"],tm=function(){return e=function e(){var t,n,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,r=void 0,(n=Jy(n="callbacks"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.callbacks=o},t=[{key:"onInitialization",value:function(){this.isValidFunction(this.callbacks.onInitialization)&&this.callbacks.onInitialization()}},{key:"onZoomTransitionDone",value:function(){this.isValidFunction(this.callbacks.onZoomTransitionDone)&&this.callbacks.onZoomTransitionDone()}},{key:"onLayoutDone",value:function(){this.isValidFunction(this.callbacks.onLayoutDone)&&this.callbacks.onLayoutDone()}},{key:"onLayoutStep",value:function(e){this.isValidFunction(this.callbacks.onLayoutStep)&&this.callbacks.onLayoutStep(e)}},{key:"onLayoutComputing",value:function(e){this.isValidFunction(this.callbacks.onLayoutComputing)&&this.callbacks.onLayoutComputing(e)}},{key:"onError",value:function(e){this.isValidFunction(this.callbacks.onError)&&this.callbacks.onError(e)}},{key:"onWebGLContextLost",value:function(e){this.isValidFunction(this.callbacks.onWebGLContextLost)&&this.callbacks.onWebGLContextLost(e)}},{key:"isValidFunction",value:function(e){return void 0!==e&&"function"==typeof e}}],t&&function(e,t){for(var n=0;n{}};function im(){for(var e,t=0,n=arguments.length,r={};t=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a0)for(var n,r,o=new Array(n),i=0;i=0&&t._call.call(void 0,e),t=t._next;--hm}()}finally{hm=0,function(){for(var e,t,n=cm,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:cm=t);fm=e,Tm(r)}(),gm=0}}function Sm(){var e=mm.now(),t=e-vm;t>1e3&&(ym-=t,vm=e)}function Tm(e){hm||(dm&&(dm=clearTimeout(dm)),e-gm>24?(e<1/0&&(dm=setTimeout(Om,e-mm.now()-ym)),pm&&(pm=clearInterval(pm))):(pm||(vm=mm.now(),pm=setInterval(Sm,1e3)),hm=1,bm(Om)))}xm.prototype=Em.prototype={constructor:xm,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?_m():+n)+(null==t?0:+t),this._next||fm===this||(fm?fm._next=this:cm=this,fm=this),this._call=e,this._time=n,Tm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Tm())}};const Pm=4294967296;function Cm(e){return e.x}function Am(e){return e.y}var km=Math.PI*(3-Math.sqrt(5));function Im(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,i,a,s,u,l,c,f,h,d=e._root,p={data:r},v=e._x0,g=e._y0,y=e._x1,m=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((l=t>=(i=(v+y)/2))?v=i:y=i,(c=n>=(a=(g+m)/2))?g=a:m=a,o=d,!(d=d[f=c<<1|l]))return o[f]=p,e;if(s=+e._x.call(null,d.data),u=+e._y.call(null,d.data),t===s&&n===u)return p.next=d,o?o[f]=p:e._root=p,e;do{o=o?o[f]=new Array(4):e._root=new Array(4),(l=t>=(i=(v+y)/2))?v=i:y=i,(c=n>=(a=(g+m)/2))?g=a:m=a}while((f=c<<1|l)==(h=(u>=a)<<1|s>=i));return o[h]=d,o[f]=p,e}function Rm(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function jm(e){return e[0]}function Mm(e){return e[1]}function Nm(e,t,n){var r=new Dm(null==t?jm:t,null==n?Mm:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function Dm(e,t,n,r,o,i){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function Lm(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Bm=Nm.prototype=Dm.prototype;function Fm(e){return function(){return e}}function Um(e){return 1e-6*(e()-.5)}function zm(){var e,t,n,r,o,i=Fm(-30),a=1,s=1/0,u=.81;function l(n){var o,i=e.length,a=Nm(e,Cm,Am).visitAfter(f);for(r=n,o=0;o=s)){(e.data!==t||e.next)&&(0===f&&(p+=(f=Um(n))*f),0===h&&(p+=(h=Um(n))*h),pc&&(c=r),of&&(f=o));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;ne||e>=o||r>t||t>=i;)switch(s=(th||(i=u.y0)>d||(a=u.x1)=y)<<1|e>=g)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=u)}else{var m=e-+this._x.call(null,v.data),b=t-+this._y.call(null,v.data),_=m*m+b*b;if(_=(s=(p+g)/2))?p=s:g=s,(c=a>=(u=(v+y)/2))?v=u:y=u,t=d,!(d=d[f=c<<1|l]))return this;if(!d.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,h=f)}for(;d.data!==e;)if(r=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,r?(o?r.next=o:delete r.next,this):t?(o?t[f]=o:delete t[f],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=o,this)},Bm.removeAll=function(e){for(var t=0,n=e.length;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function sb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:$m,n=new Map;return e.forEach(function(e){var t=e.id,r=e.from,o=e.to,i=e.color,a=e.width,s=e.disabled,u=ub(r,o),l=n.get(u);l?l.bundledRels.push({id:t,color:null!=i?i:void 0,disabled:null!=s&&s,width:null!=a?a:1}):n.set(u,{bundledRels:[{id:t,color:null!=i?i:void 0,disabled:null!=s&&s,width:null!=a?a:1}],key:u,from:r,to:o,color:null!=i?i:void 0,disabled:null!=s&&s,width:0})}),n.forEach(function(e){var n=(0,Mp.uniqBy)(e.bundledRels,"disabled"),r=1===n.length&&!0===n[0].disabled,o=1===n.length&&!0!==n[0].disabled;if(r)e.color=t,e.width=1;else{var i=e.bundledRels.filter(function(e){return!0!==e.disabled}),a=(0,Mp.uniqBy)(i,"color");o?(e.color=a.length>1?void 0:e.bundledRels[0].color,e.bundledRels.forEach(function(t){e.width+=t.width})):(e.color=1===a.length?a[0].color:void 0,e.disabled=!1,e.bundledRels.forEach(function(t){e.width+=!0!==t.disabled?t.width:0}))}e.width=Math.min(e.width,20)}),Array.from(n.values())},fb=function(){return void 0!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find(function(e){return"size"in e})};function hb(e){return hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hb(e)}var db=function(e){var t,n;return"number"==typeof e.source||"number"==typeof e.target||"string"==typeof e.source||"string"==typeof e.target?45*devicePixelRatio:(null!==(t=e.source.size)&&void 0!==t?t:Xm)+(null!==(n=e.target.size)&&void 0!==n?n:Xm)+90*devicePixelRatio};function pb(e){return"object"===hb(e)}var vb=function(e){var t;return(null!==(t=e.size)&&void 0!==t?t:Xm)+25*devicePixelRatio},gb=function(){return-400*Math.pow(devicePixelRatio,2)},yb=function(){return 2*gb()};function mb(e){return mb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mb(e)}function bb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n(e=(1664525*e+1013904223)%Pm)/Pm}();function f(){h(),l.call("tick",t),n1?(null==n?s.delete(e):s.set(e,p(n)),t):s.get(e)},find:function(t,n,r){var o,i,a,s,u,l=0,c=e.length;for(null==r?r=1/0:r*=r,l=0;l1?(l.on(e,n),t):l.on(e)}}}().velocityDecay(.4).force("charge",zm().strength(gb)).force("centerX",function(e){var t,n,r,o=Fm(.1);function i(e){for(var o,i=0,a=t.length;i0,r=Object.values(e.removes).length>0,o=Object.values(e.updates),s=fb(o);t||r||s?(n.shouldUpdate=!0,n.shouldReheatNodes=!0,n.shouldCountNodeRels=!0):n.shouldReheatNodes=!1}var u=a.channels[Eb];if(void 0!==a.version&&u){var l=Object.values(u.adds).length>0,c=Object.values(u.removes).length>0;(l||c)&&(n.shouldUpdate=!0,n.shouldReheatNodes=!0,n.shouldCountNodeRels=!0)}}))},t=[{key:"setOptions",value:function(e){}},{key:"updateNodes",value:function(e){var t=this;e.forEach(function(e){void 0===t.d3Nodes[e.id]&&(t.d3Nodes[e.id]={id:e.id}),null!=e&&e.pinned?(t.d3Nodes[e.id].fx=e.x,t.d3Nodes[e.id].fy=e.y):(t.d3Nodes[e.id].x=e.x,t.d3Nodes[e.id].y=e.y),t.d3Nodes[e.id].vy=0,t.d3Nodes[e.id].vx=0}),this.shouldUpdate=!0,this.simulation.tick().alpha(.2)}},{key:"update",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||n){var r=this.state,o=r.nodes,i=r.rels,a=o.channels[Eb],s=i.channels[Eb],u=Object.values(a.adds).length>0,l=Object.values(s.adds).length>0,c=Object.values(a.removes).length>0,f=Object.values(s.removes).length>0,h=Object.values(a.updates).length>0;if(u||l||c||f||h){var d=u&&0===Object.keys(this.d3Nodes).length,p=Ob(a.removes);Object.keys(p).forEach(function(e){delete t.d3Nodes[e]});var v=Ob(a.adds);if(Object.keys(v).forEach(function(e){t.d3Nodes[e]=function(e){for(var t=1;tthis.simulation.alphaMin()&&(this.shouldUpdate=!0,this.simulationStopped&&(this.simulation.restart(),this.simulationStopped=!1))}}},{key:"layout",value:function(e,t,n){var r=this;if(!(0,Mp.isEmpty)(this.d3Nodes)){if(this.simulation.stop(),this.simulation.nodes(Object.values(this.d3Nodes)).force("collide",function(e){var t,n,r,o=1,i=1;function a(){for(var e,a,u,l,c,f,h,d=t.length,p=0;pl+p||ic+p||au.index){var v=l-s.x-s.vx,g=c-s.y-s.vy,y=v*v+g*g;ye.r&&(e.r=e[t].r)}function u(){if(t){var r,o,i=t.length;for(n=new Array(i),r=0;r[s(e,t,r),e]));for(a=0,o=new Array(l);a=this.simulation.alphaMin();)this.simulation.tick(1);return requestAnimationFrame(function(){r.computing=!1}),void this.simulation.restart()}this.shouldReheatNodes?this.simulation.alpha(1).restart():this.simulation.restart()}}},{key:"getNodePositions",value:function(e){var t,n=[],r=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return bb(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bb(e,t):void 0}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,i=this.d3Nodes[o.id];if(void 0!==i){var a={id:i.id,x:i.x,y:i.y};n.push(a)}}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return this.computing}},{key:"terminateUpdate",value:function(){this.simulation.alpha(this.simulation.alphaMin()).stop(),this.simulationStopped=!0}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel(Eb),this.state.rels.removeChannel(Eb),this.simulation.stop()}},{key:"setAlpha",value:function(e){this.simulation.alpha(e),this.simulation.restart(),this.simulation.shouldUpdate=!0}},{key:"countNodeRels",value:function(){for(var e=new Map(Object.entries(this.d3Nodes)),t=Object.values(this.d3RelList),n=new Array(e.length),r=0;r1&&void 0!==arguments[1]&&arguments[1],r=kb[e],o=r.standard,i=r.fallback;if(n)t=Ab[i];else try{t=Ab[o]()}catch(n){console.warn("Failed to initialise ".concat(e,' worker: "').concat(JSON.stringify(n),'". Falling back to syncronous code.')),t=Ab[i]}if(void 0===t)throw new Error("".concat(e," code could not be initialized."));return t.port.start(),t};function Rb(e){return Rb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rb(e)}function jb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mb(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Db(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0?[n.x/o,n.y/o]:[0,0]}(e,r),i={x:o[0],y:o[1]},a=[],s=Nb(e);try{for(s.s();!(t=s.n()).done;){var u=t.value,l=this.positions[u.id],c=r[u.id],f={id:u.id};if(void 0!==l){for(var h,d,p,v=u.id,g=null!==(h=this.oldPositions[u.id])&&void 0!==h?h:Mb({},i);void 0===g&&void 0!==n[v];)v=n[v],g=this.oldPositions[v];g.x=null!==(d=g.x)&&void 0!==d?d:i.x,g.y=null!==(p=g.y)&&void 0!==p?p:i.y,f.x=Fb(g.x,l.x,this.t),f.y=Fb(g.y,l.y,this.t)}else void 0!==c&&(f.x=c.x||i.x,f.y=c.y||i.y);a.push(f)}}catch(e){s.e(e)}finally{s.f()}return this.currentT=this.t,a}}],t&&function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(this.shouldUpdate||t){var o=e_(n),i=e_(r);(o.length>0||i.length>0)&&(this.updatePositionsFromState(),this.layout(o,i))}!function(e,t,n){var r=Kb(Zb(e.prototype),"update",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(e,0,this)([]),this.shouldUpdate=!1}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate||this.shouldUpdateAnimator}},{key:"getComputing",value:function(){return this.computing}},{key:"layout",value:function(e,t){var n=this;if(this.worker){if(e.length){var r=e.map(function(e){return{group:"nodes",data:{id:e.id}}}),o=t.map(function(e){return{group:"edges",data:{id:"rel".concat(e.id),source:e.from,target:e.to}}}),i={elements:[].concat(Hb(r),Hb(o)),spacingFactor:e.reduce(function(e,t){var n;return e+(null!==(n=t.size)&&void 0!==n?n:Xm)},0)/e.length*4.5/50*ob()};this.computing?this.pendingLayoutData=i:(this.computing=!0,this.worker.port.onmessage=function(e){var t=e.data.positions;if(n.computing){for(var r=0,o=Object.entries(t);r3&&void 0!==arguments[3]?arguments[3]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u_(this,"shaderProgram",void 0),u_(this,"gl",void 0),u_(this,"curTexture",void 0),u_(this,"attributeInfo",void 0),u_(this,"uniformInfo",void 0);var i=t.createShader(t.FRAGMENT_SHADER);if(!t.isShader(i))throw new Error("Could not create shader object");var a=a_()(r,o);t.shaderSource(i,a),t.compileShader(i),(0,Mp.isNil)(t.getShaderParameter(i,t.COMPILE_STATUS))&&Cb.info(t.getShaderInfoLog(i));var s=t.createShader(t.VERTEX_SHADER);if(!t.isShader(s))throw new Error("Could not create shader object");var u=a_()(n,o);if(t.shaderSource(s,u),t.compileShader(s),(0,Mp.isNil)(t.getShaderParameter(s,t.COMPILE_STATUS))&&Cb.info(t.getShaderInfoLog(s)),this.shaderProgram=t.createProgram(),t.attachShader(this.shaderProgram,i),t.attachShader(this.shaderProgram,s),t.linkProgram(this.shaderProgram),(0,Mp.isNil)(t.getProgramParameter(this.shaderProgram,t.LINK_STATUS)))throw new Error("Could not initialise shader");this.gl=t,this.curTexture=0,this.scanUniforms(),this.scanAttributes()},t=[{key:"setUniform",value:function(e,t){var n=this.gl,r=this.uniformInfo[e];if(void 0===r)throw new Error("Shader.setUniform - Uniform ".concat(e," not found in shader"));switch(r.type){case n.INT:n.uniform1i(r.location,t);break;case n.INT_VEC2:n.uniform2iv(r.location,t);break;case n.INT_VEC3:n.uniform3iv(r.location,t);break;case n.INT_VEC4:n.uniform4iv(r.location,t);break;case n.SAMPLER_2D:n.activeTexture(n.TEXTURE0+r.texture),n.bindTexture(n.TEXTURE_2D,t),n.uniform1i(r.location,r.texture);break;case n.SAMPLER_CUBE:case n.FLOAT:n.uniform1f(r.location,t);break;case n.FLOAT_VEC2:n.uniform2fv(r.location,t);break;case n.FLOAT_VEC3:n.uniform3fv(r.location,t);break;case n.FLOAT_VEC4:n.uniform4fv(r.location,t);break;case n.FLOAT_MAT2:n.uniformMatrix2fv(r.location,!1,t);break;case n.FLOAT_MAT3:n.uniformMatrix3fv(r.location,!1,t);break;case n.FLOAT_MAT4:n.uniformMatrix4fv(r.location,!1,t)}}},{key:"setAttributePointer",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e],a=n*Float32Array.BYTES_PER_ELEMENT,s=r*Float32Array.BYTES_PER_ELEMENT;o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.FLOAT,!1,s,a)}},{key:"setAttributePointerFloat",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.FLOAT,!1,r,n)}},{key:"setAttributePointerUShort",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.UNSIGNED_SHORT,!1,r,n)}},{key:"setAttributePointerByteNorm",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.UNSIGNED_BYTE,!0,r,n)}},{key:"setAttributePointerByte",value:function(e,t,n,r){var o=this.gl,i=this.attributeInfo[e];o.enableVertexAttribArray(i.position),o.vertexAttribPointer(i.position,t,o.UNSIGNED_BYTE,!1,r,n)}},{key:"use",value:function(){this.gl.useProgram(this.shaderProgram)}},{key:"remove",value:function(){this.gl.deleteProgram(this.shaderProgram)}},{key:"scanAttributes",value:function(){var e=this.gl;this.attributeInfo={};for(var t,n,r=e.getProgramParameter(this.shaderProgram,e.ACTIVE_ATTRIBUTES),o=0;oe&&t.relationships.some(function(e){return e.length>0});){var o=this.coarsen(t,0===r);if(0===r&&(this.nodeSortMap=o.nodeSortMap),this.subGraphs.push(o.sortedInput),0===(t=o.output).relationships.length||t.relationships.every(function(e){return 0===e.length})||n===t.nodes.length)break;n=t.nodes.length,r+=1}return this.subGraphs.push(t),t}},{key:"coarsenBy",value:function(e){for(var t=e,n=this.graph,r=n.nodes.length,o=t;t>0;){var i=this.coarsen(n,t===o);if(this.subGraphs.push(i.sortedInput),0===(n=i.output).relationships.length||n.relationships.every(function(e){return 0===e.length})||r===n.nodes.length)break;r=n.nodes.length,t-=1}return this.subGraphs.push(n),n}},{key:"coarsen",value:function(e,t){var n=this,r=e.nodes,o=e.relationships,i=r.map(function(e,t){return t}),a={},s={};r.forEach(function(e,t){a[t]=e,s[e.id]=t});for(var u=o.map(function(e){return e.slice()}),l={suns:{},planets:{},moons:{}},c=[],f=[],h=function(){var e=i[0];i.splice(i.indexOf(e),1),o[e].forEach(function(t){var n=i.indexOf(t);n>=0&&i.splice(n,1);var r=-1,o=u[t];o.forEach(function(t,n){var o=i.indexOf(t);o>=0?i.splice(o,1):t===e&&(r=n)}),o.splice(r,1)});var n={id:e};if(t)n.originalId=a[e].id;else{var r=a[e];n.finestIndex=r.finestIndex,n.originalId=r.originalId}c.push(n),l.suns[e]=n};i.length>0;)h();c.forEach(function(e,t){f[t]=[]}),c.forEach(function(e,n){var r={},i=[];o[e.id].forEach(function(o){if(o!==e.id&&!r[o]){var s={id:o,parent:e,sunId:n,moons:[]},u=a[o];s.size=function(){return s.moons.length+1},s.weight=u.weight||1,s.children=function(){return s.moons},t?s.originalId=u.id:(s.finestIndex=u.finestIndex,s.originalId=u.originalId),i.push(s),r[o]=!0}}),i.forEach(function(e){l.planets[e.id]=e}),e.planets=i,e.children=function(){return e.planets},e.weight=e.planets.reduce(function(e,t){return e+(t.weight||1)},0)+(a[e.id].weight||1),e.size=function(){return e.planets.reduce(function(e,t){return e+t.size()},0)+1}});var d=r.filter(function(e,t){return!c.find(function(e){return e.id===t})&&!l.planets[t]}),p=[];d.forEach(function(e){for(var n=s[e.id],r=u[n],o=null,i=-1,c=0;c0&&(this.relIdMap=b),{output:{nodes:c,relationships:f},sortedInput:{nodes:v,relationships:m},nodeSortMap:y}}}],t&&function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function S_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0,r=Object.values(e.removes).length>0,o=Object.values(e.updates),i=fb(o);(t||r||i)&&(n.shouldUpdate=!0,n.checkForUpdates())}var a=l.channels[C_];if(void 0!==l.version&&a){var s=Object.values(a.adds).length>0,c=Object.values(a.removes).length>0;(s||c)&&(n.shouldUpdate=!0,n.checkForUpdates())}})),this.setData({nodes:u.items,rels:l.items}),this.state=r,this.dpr=window.devicePixelRatio||1},t=[{key:"setOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var n=e.intelWorkaround,r=e.enableVerlet,o=void 0===r||r;t&&(this.intelWorkaround=n,this.enableVerlet=o);var i=this.enableVerlet?.25:100;this.simulationStopVelocitySquared=i*i,this.gravity=100,this.force=0}}},{key:"setData",value:function(e){var t=I_(e.nodes),n=t.nodeIdToIndex,r=t.nodeIndexToId;return this.nodeIdToIndex=n,this.nodeIndexToId=r,this.numNodes=e.nodes.length,this.flatRelationshipKeys=lb(e.rels),this.solarMerger=new w_(e,n),this.solarMerger.coarsenTo(1),this.subGraphs=this.solarMerger.subGraphs,this.nodeSortMap=this.solarMerger.nodeSortMap,this.setupSprings(this.subGraphs[0]),this.setupSize(this.subGraphs[0]),this.setupPhysics(),this.firstUpdate=!0,this.curPhysData=0,this.shouldUpdate=!0,this.iterationCount=0,this.subGraphs[0]}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.gl;if(this.checkForUpdates(e),!this.shouldUpdate)return t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(0).frameBuffer),t.readPixels(0,0,Ym,Ym,t.RGBA,t.FLOAT,this.physPositions),!1;t.disable(t.BLEND);for(var n=this.nodeVariation/(this.numNodes||1)>.3,r=this.getScaleNumber(this.iterationCount),o=this.subGraphs?this.subGraphs.length:0,i=this.getPhysData(0).texture,a=o-1;a>0;a--){var s=this.subGraphs[a].nodes.length,u=a===o-1;this.apprxRepForceShader.use(),this.apprxRepForceShader.setUniform("u_physData",i),this.apprxRepForceShader.setUniform("u_clusterData",this.levelsClusterTexture[a]),this.apprxRepForceShader.setUniform("u_finestIndexes",this.levelsFinestIndexTexture[a]),this.apprxRepForceShader.setUniform("u_prevForce",u?this.initalLevelTexture:this.levelsData[a+1].texture),this.apprxRepForceShader.setUniform("u_numNodes",s),this.apprxRepForceShader.setUniform("u_iterationMultiplier",r),this.apprxRepForceShader.setUniform("u_baseLength",this.getBaseLength(s)),this.apprxRepForceShader.setUniform("u_isTopLevel",u?1:0),t.bindBuffer(t.ARRAY_BUFFER,this.physSmallVbo),this.apprxRepForceShader.setAttributePointer("a_position",2,0,2),t.bindFramebuffer(t.FRAMEBUFFER,this.levelsData[a].frameBuffer),t.viewport(0,0,k_,k_),t.drawArrays(t.TRIANGLE_STRIP,0,4)}if(this.collisionDetectionMultiplier=0,this.collisionDetectionMultiplier=n?Math.min(this.iterationCount/Math.min(this.numNodes,300),1):1,this.force=o<=1?this.initalLevelTexture:this.levelsData[1].texture,this.physShader.use(),this.physShader.setUniform("u_prevForce",o<=1?this.initalLevelTexture:this.levelsData[1].texture),this.physShader.setUniform("u_connections",this.springTexture),this.physShader.setUniform("u_sizeTexture",this.sizeTexture),this.physShader.setUniform("u_connectionOffsets",this.offsetTexture),this.physShader.setUniform("u_physData",i),this.physShader.setUniform("u_pinnedNodes",this.pinTexture),this.physShader.setUniform("u_iterationMultiplier",r),this.physShader.setUniform("u_curIteration",this.iterationCount),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_clusterData",this.levelsClusterTexture[0]),this.physShader.setUniform("u_collisionMultiplier",this.collisionDetectionMultiplier),this.physShader.setUniform("u_baseLength",this.getBaseLength()),this.firstUpdate=!1,t.bindBuffer(t.ARRAY_BUFFER,this.physVbo),this.physShader.setAttributePointer("a_position",2,0,2),t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(1).frameBuffer),t.viewport(0,0,Ym,Ym),t.drawArrays(t.TRIANGLE_STRIP,0,4),this.useReadpixelWorkaround?this.doReadpixelWorkaround():(t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(0).frameBuffer),t.readPixels(0,0,Ym,Ym,t.RGBA,t.FLOAT,this.physPositions)),this.curPhysData=(this.curPhysData+1)%this.physData.length,this.iterationCount+=1,this.numNodes<2)this.shouldUpdate=!1,this.iterationCount=0;else if(this.iterationCount%5==0){var l=this.iterationCount<300,c=l?this.getMaxSpeedSquared():this.getMedianSpeedSquared(this.addedNodes);this.lastSpeedValues.push(c),this.rollingAvgGraphSpeed=this.lastSpeedValues.reduce(function(e,t){return e+t},0)/this.lastSpeedValues.length;var f=l&&c>=this.rollingAvgGraphSpeed,h=this.simulationStopVelocitySquared&&this.rollingAvgGraphSpeed20&&this.lastSpeedValues.shift(),!f&&!0===h&&this.iterationCount>2&&this.terminateUpdate()}return this.shouldUpdate}},{key:"terminateUpdate",value:function(){Cb.info("Cooling down after ".concat(this.iterationCount," iterations at graph speed of ").concat(Math.sqrt(this.rollingAvgGraphSpeed))),this.shouldUpdate=!1,this.iterationCount=0,this.rollingAvgGraphSpeed=0,this.lastSpeedValues=[],this.addedNodes=null,this.nodeVariation=0}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate}},{key:"getComputing",value:function(){return!1}},{key:"getNodePositions",value:function(e){var t=[];if(this.useReadpixelWorkaround){var n,r=O_(e);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=this.nodeIdToIndex[o.id],a=o.id,s=void 0,u=void 0;void 0!==i&&(s=this.workaroundData[0].dataFloat[i],u=this.workaroundData[1].dataFloat[i]),t.push({id:a,x:s,y:u})}}catch(e){r.e(e)}finally{r.f()}}else{var l,c=O_(e);try{for(c.s();!(l=c.n()).done;){var f=l.value,h=this.nodeIdToIndex[f.id],d=f.id,p=void 0,v=void 0;void 0!==h&&(p=this.physPositions[4*h+0],v=this.physPositions[4*h+1]),t.push({id:d,x:p,y:v})}}catch(e){c.e(e)}finally{c.f()}}return t}},{key:"reheat",value:function(e){this.setupSize(this.subGraphs[0]),this.shouldUpdate=!0,this.iterationCount=0,this.nodeVariation=e.nodes.length}},{key:"updateNodes",value:function(e){var t=this.gl,n=new Set;t.bindTexture(t.TEXTURE_2D,this.getPhysData().texture);var r,o=O_(e);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=this.nodeIdToIndex[i.id];if(void 0!==i.x&&void 0!==i.y){A_[0]=i.x,A_[1]=i.y,A_[2]=0,A_[3]=0;var s=a%Ym,u=(a-s)/Ym;t.texSubImage2D(t.TEXTURE_2D,0,s,u,1,1,t.RGBA,t.FLOAT,A_),this.useReadpixelWorkaround?(this.workaroundData[0].dataFloat[a]=i.x,this.workaroundData[1].dataFloat[a]=i.y):(this.physPositions[4*a+0]=i.x,this.physPositions[4*a+1]=i.y)}void 0!==i.pinned&&(this.pinData[a]=i.pinned?255:0),Object.keys(i).forEach(function(e){return n.add(e)})}}catch(e){o.e(e)}finally{o.f()}n.has("pinned")&&(t.bindTexture(t.TEXTURE_2D,this.pinTexture),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,Ym,Ym,0,t.ALPHA,t.UNSIGNED_BYTE,this.pinData)),(n.has("x")||n.has("y")||n.has("size"))&&(this.shouldUpdate=!0,this.iterationCount=0)}},{key:"addRemoveData",value:function(e,t,n){var r=this.gl;this.numNodes=e.nodes.length,this.physShader.use(),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_baseLength",this.getBaseLength());var o=I_(e.nodes).nodeIdToIndex,i=new w_(e,o);i.coarsenTo(1);var a=i.subGraphs[0],s=this.subGraphs[0],u=function(e){return s.nodes.findIndex(function(t){return t.id===e})},l=Object.values(t.adds),c=Object.values(t.removes);this.addedNodes=l.length>0?{}:null,this.nodeVariation=l.length+c.length;for(var f=function(e){return Boolean(t.adds[e])},h=3*Math.sqrt(e.nodes.length),d={x:0,y:0},p=a.nodes.length,v=new Uint8Array(65536),g=0;g0||c.length>0)&&(r.bindTexture(r.TEXTURE_2D,this.pinTexture),r.texImage2D(r.TEXTURE_2D,0,r.ALPHA,Ym,Ym,0,r.ALPHA,r.UNSIGNED_BYTE,this.pinData));var A=lb(e.rels),k=this.hasRelationshipFlatMapChanged(A,n);return this.shouldUpdate=this.nodeVariation>0||k,this.iterationCount=0,this.flatRelationshipKeys=A,this.setupPhysicsForCoarse(),this.subGraphs[0]}},{key:"destroy",value:function(){var e=this;this.gl.deleteBuffer(this.physVbo),this.gl.deleteBuffer(this.physSmallVbo),this.physData.forEach(function(t){e.gl.deleteFramebuffer(t.frameBuffer),e.gl.deleteTexture(t.texture)}),this.levelsData.forEach(function(t){e.gl.deleteFramebuffer(t.frameBuffer),e.gl.deleteTexture(t.texture)}),this.levelsClusterTexture.forEach(function(t){e.gl.deleteTexture(t)}),this.levelsFinestIndexTexture.forEach(function(t){e.gl.deleteTexture(t)}),this.gl.deleteTexture(this.initalLevelTexture),this.gl.deleteTexture(this.sizeTexture),this.gl.deleteTexture(this.offsetTexture),this.gl.deleteTexture(this.springTexture),this.gl.deleteTexture(this.pinTexture),this.gl.deleteTexture(this.updateTexture),void 0!==this.apprxRepForceShader&&this.apprxRepForceShader.remove(),void 0!==this.updateShader&&this.updateShader.remove(),void 0!==this.physShader&&this.physShader.remove(),this.physPositions=null,this.gl=null,this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel(C_),this.state.rels.removeChannel(C_)}},{key:"hasRelationshipFlatMapChanged",value:function(e,t){if(e.size!==this.flatRelationshipKeys.size)return!0;var n=!1,r=Object.values(t.adds),o=Object.values(t.removes);if(r.length>0||o.length>0){var i,a=O_(lb(r));try{for(a.s();!(i=a.n()).done;){var s=i.value;if(!this.flatRelationshipKeys.has(s)){n=!0;break}}}catch(e){a.e(e)}finally{a.f()}if(!n){var u,l=O_(lb(o));try{for(l.s();!(u=l.n()).done;){var c=u.value;if(!e.has(c)){n=!0;break}}}catch(e){l.e(e)}finally{l.f()}}}return n}},{key:"dumpTexture",value:function(e,t,n){var r=this.gl;Cb.info("--- Dumping texture ",n),r.bindFramebuffer(r.FRAMEBUFFER,e),r.readPixels(0,0,Ym,Ym,r.RGBA,r.FLOAT,this.physPositions);for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:function(e,t,n){return n+Math.pow(10,6)*Math.pow(e-120,-1.7)};return 0===e?0:e<300?200+-1/Math.pow(10,5)*3*Math.pow(Math.abs(e-200+12),3):t(e,200,10)}},{key:"getBaseLength",value:function(e){if(void 0===e||e===this.numNodes)return 100*this.dpr;var t=Math.pow(this.averageNodeSize/2,2)*Math.PI,n=this.numNodes/e*t;return(100+Math.sqrt(n/Math.PI)/2/e)*this.dpr}},{key:"checkForUpdates",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.state,n=t.nodes,r=t.rels,o={nodes:n.items,rels:r.items},i=Object.values(n.channels[C_].adds).length>0,a=Object.values(r.channels[C_].adds).length>0,s=Object.values(n.channels[C_].removes).length>0,u=Object.values(r.channels[C_].removes).length>0,l=Object.values(n.channels[C_].updates);(i||a||s||u)&&this.addRemoveData(o,{adds:n.channels[C_].adds,removes:n.channels[C_].removes},{adds:r.channels[C_].adds,removes:r.channels[C_].removes}),e?(this.updateNodes(o.nodes),this.reheat(o)):l.length>0&&(this.updateNodes(l),fb(l)&&this.reheat(o)),n.clearChannel(C_),r.clearChannel(C_)}},{key:"getNodePosition",value:function(e){return this.useReadpixelWorkaround?{x:this.workaroundData[0].dataFloat[e],y:this.workaroundData[1].dataFloat[e]}:{x:this.physPositions[4*e+0],y:this.physPositions[4*e+1]}}},{key:"getMaxSpeedSquared",value:function(){var e=0;if(this.useReadpixelWorkaround)for(var t=0;te&&(e=o)}else for(var i=0;ie&&(e=u)}return e}},{key:"getMedianSpeedSquared",value:function(e){var t=[];if(this.useReadpixelWorkaround)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0;return this.physData[(this.curPhysData+e)%this.physData.length]}},{key:"newTexture",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.FLOAT,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.RGBA,i=e.createTexture();return e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,o,n,n,0,o,r,t),i}},{key:"newFramebuffer",value:function(e,t){var n=e.createFramebuffer();return e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),n}},{key:"checkCompatibility",value:function(e){function t(e){throw new y_(e)}e||t("Could not initialize WebGL"),0===e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)&&t("Vertex shader texture access not available"),e.getExtension("OES_texture_float")||t("OES_texture_float extension not available"),e.getExtension("WEBGL_color_buffer_float")||(Cb.info("gl.readPixels doesnt work for float texture, activating workaround"),this.useReadpixelWorkaround=!0);var n=e.getParameter(e.MAX_TEXTURE_SIZE),r=Math.max(Ym,qm);if(n0&&i.forEach(function(e){return Cb.trace(e)})}},{key:"adjustToGlSize",value:function(e){return e*this.dpr*2.5}},{key:"setupSize",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},t=new Float32Array(65536),n=e.nodes,r=n.length,o=0,i=0;i=0;u--){var l=u===t-1?[]:this.subGraphs[u+1].nodes;0===l.length?this.subGraphs[u].nodes.forEach(function(e,t){var n=e.placement?e.placement.x:r*(Math.random()-.5),i=e.placement?e.placement.y:r*(Math.random()-.5);s(void 0===e.finestIndex?t:e.finestIndex,n,i,o)}):l.forEach(function(e){var t=e.finestIndex,n=o[4*e.finestIndex],r=o[4*e.finestIndex+1],i=x_({x:n,y:r},10,e.planets.length+1);t+=1,e.planets.forEach(function(e,n){var r=i[n];s(t+=1,r.x,r.y,o);var a=x_({x:r.x,y:r.y},10,e.moons.length+1);e.moons.forEach(function(e,n){var r=a[n];s(t+=1,r.x,r.y,o)})})})}this.physData=[];for(var c=0;c<2;c++){var f=this.newTexture(e,0===c?o:i,Ym),h=this.newFramebuffer(e,f);this.physData.push({texture:f,frameBuffer:h})}var d=this.enableVerlet?"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_connections;\nuniform sampler2D u_connectionOffsets;\nuniform sampler2D u_pinnedNodes;\nuniform sampler2D u_sizeTexture;\nuniform float u_baseLength;\nuniform float u_curIteration;\nuniform float u_iterationMultiplier;\nuniform vec2 u_gravityCenter;\nuniform float u_numNodes;\nuniform float u_gravity;\n\nuniform sampler2D u_clusterData;\nuniform sampler2D u_prevForce;\nuniform float u_collisionMultiplier;\n\n\nfloat DAMP = 0.6;\nfloat COOL = 0.99998;\nfloat TEMP = max(0.02, pow(COOL, u_curIteration));\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\nfloat accLimitLow = 500000.0;\nfloat accLimitHigh = 750000.0;\nfloat accLimitPosHigh = 10000000.0;\n\nconst float denseNodeThreshold = 1000.0;\nconst float MIN_DISTANCE = 0.00000001;\nconst float MAX_DISTANCE = 1000000000.0;\nconst float MAX_ACCELERATION = 50000.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nbool isNan(float val) {\n return (val < 0.0 || 0.0 < val || val == 0.0) ? false : true;\n}\n\nconst float BIG_NUMBER = 999999999999999999.0;\nbool isInf(float val) {\n return val > BIG_NUMBER || val < -BIG_NUMBER;\n}\n\nvec2 getDelta(vec2 v1, vec2 v2) {\n vec2 delta = v1 - v2;\n float dist = length(delta);\n if (dist < MIN_DISTANCE || isNan(dist)) {\n return vec2(MIN_DISTANCE, MIN_DISTANCE);\n }\n if (dist > MAX_DISTANCE) {\n vec2 normDelta = delta / dist;\n return normDelta * MAX_DISTANCE;\n }\n return delta;\n}\n\nvec4 getOtherNodePosition(float i) {\n return getTextureData(u_physData, i, 256.0);\n}\n\nfloat getCombinedNodeSize(float i, float nodeSize) {\n float otherNodeSize = getTextureData(u_sizeTexture, i, 256.0).a;\n return nodeSize + otherNodeSize;\n}\n\nvec2 getSpringForce(float curConnection, float numConnections, float springFScale, vec4 myPosition, float i) {\n float curSpring = getTextureData(u_connections, curConnection + i, 4096.0).a;\n\n vec4 otherPosition = getTextureData(u_physData, curSpring, 256.0);\n float otherDataPosition = getTextureData(u_connectionOffsets, curSpring, 256.0).a;\n float avgDegree;\n#if INTEL_WORKAROUND\n avgDegree = max(numConnections, 4.0);\n#else\n float otherNumConnections = getTextureData(u_connections, otherDataPosition, 4096.0).a;\n avgDegree = max((otherNumConnections + numConnections * 3.0) / 4.0, 4.0);\n#endif\n\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n\n float F = (dist * dist * springFScale) / (u_baseLength * avgDegree);\n if (u_collisionMultiplier > 0.0) {\n F *= u_collisionMultiplier;\n }\n return (-delta / dist) * F;\n}\n\nvec2 getCollisionForce(float combinedNodeSize, float dist, float fScale, vec2 delta) {\n float collisionForce = (combinedNodeSize - dist) / (dist);\n if (u_collisionMultiplier > 0.0) {\n collisionForce *= u_collisionMultiplier;\n }\n return (delta * collisionForce * fScale * combinedNodeSize) / (combinedNodeSize + 1.0);\n}\n\nvec2 getRepulsionForce(float dist, float fScale, vec2 delta) {\n float F = (u_baseLength * u_baseLength * fScale) / (dist);\n return (delta / dist) * F * 0.05;\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * textureSide;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterWeight = clusterData.w;\n\n vec4 myPosition = getTextureData(u_physData, index, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n\n vec2 acceleration = previousForce.xy;\n\n float isPinned = getTextureData(u_pinnedNodes, index, 256.0).a;\n float nodeSize = getTextureData(u_sizeTexture, index, 256.0).a;\n\n if (isPinned > 0.5) {\n gl_FragColor = vec4(myPosition.xy, 0.0, 0.0);\n return;\n }\n\n float curConnection = getTextureData(u_connectionOffsets, index, 256.0).a;\n float numConnections = getTextureData(u_connections, curConnection, 4096.0).a;\n\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n float springFScale = fScale;\n\n if (numConnections > denseNodeThreshold) {\n springFScale = sqrt(fScale);\n }\n\n float numOfRels = 0.0;\n\n // Springs\n for (float i = 1.0; i <= 256.0 * 256.0; i++) {\n if (numOfRels >= numConnections) {\n break;\n }\n acceleration += getSpringForce(curConnection, numConnections, springFScale, myPosition, i);\n numOfRels += 1.0;\n }\n\n // Repulsion && collision detection\n if (u_collisionMultiplier > 0.0) {\n float number_of_collisions = 0.0;\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= u_numNodes) {\n break;\n }\n\n if (i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize) * 2.0;\n\n if (dist < combinedNodeSize && number_of_collisions < 40.0) {\n number_of_collisions++;\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n if (i >= clusterStartIndex && i < clusterStartIndex + clusterSize) {\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n } else {\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize);\n\n if (dist < combinedNodeSize) {\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n\n // Gravity\n vec2 delta = getDelta(u_gravityCenter, myPosition.xy);\n float dist = length(delta);\n\n vec2 grav = (delta / dist) * u_gravity * fScale;\n acceleration += grav * smoothstep(0.0, 500.0, dist);\n\n float accMagnitude = length(acceleration);\n acceleration *= min(MAX_ACCELERATION, accMagnitude) / accMagnitude;\n\n float iterationFrictionThreshold = 1000.0;\n\n if (u_curIteration > iterationFrictionThreshold) {\n float friction = 1.0 + pow((u_curIteration - iterationFrictionThreshold), 2.0) / 100.0;\n acceleration *= 1.0 / friction;\n }\n\n if (u_curIteration == 0.0) {\n gl_FragColor = vec4(myPosition.xy, myPosition.zw);\n } else {\n vec2 prevVelocity = myPosition.zw;\n vec2 currentPos = myPosition.xy;\n vec2 prevPos = currentPos - prevVelocity;\n\n vec2 newPos = currentPos + TEMP * ( DAMP * (prevVelocity) + acceleration * TIMESTEP * TIMESTEP);\n vec2 newVelocity = newPos - currentPos;\n gl_FragColor = vec4(newPos, newVelocity);\n }\n}":"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_connections;\nuniform sampler2D u_connectionOffsets;\nuniform sampler2D u_pinnedNodes;\nuniform sampler2D u_sizeTexture;\nuniform float u_baseLength;\nuniform float u_curIteration;\nuniform float u_iterationMultiplier;\nuniform vec2 u_gravityCenter;\nuniform float u_numNodes;\nuniform float u_gravity;\n\nuniform sampler2D u_clusterData;\nuniform sampler2D u_prevForce;\nuniform float u_collisionMultiplier;\n\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\nfloat accLimitLow = 500000.0;\nfloat accLimitHigh = 750000.0;\nfloat accLimitPosHigh = 10000000.0;\n\nconst float denseNodeThreshold = 1000.0;\nconst float MIN_DISTANCE = 0.00000001;\nconst float MAX_DISTANCE = 1000000000.0;\nconst float MAX_ACCELERATION = 500000.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nbool isNan(float val) {\n return (val < 0.0 || 0.0 < val || val == 0.0) ? false : true;\n}\n\nconst float BIG_NUMBER = 999999999999999999.0;\nbool isInf(float val) {\n return val > BIG_NUMBER || val < -BIG_NUMBER;\n}\n\nvec2 getDelta(vec2 v1, vec2 v2) {\n vec2 delta = v1 - v2;\n float dist = length(delta);\n if (dist < MIN_DISTANCE || isNan(dist)) {\n return vec2(MIN_DISTANCE, MIN_DISTANCE);\n }\n if (dist > MAX_DISTANCE) {\n vec2 normDelta = delta / dist;\n return normDelta * MAX_DISTANCE;\n }\n return delta;\n}\n\nvec4 getOtherNodePosition(float i) {\n return getTextureData(u_physData, i, 256.0);\n}\n\nfloat getCombinedNodeSize(float i, float nodeSize) {\n float otherNodeSize = getTextureData(u_sizeTexture, i, 256.0).a;\n return nodeSize + otherNodeSize;\n}\n\nvec2 getSpringForce(float curConnection, float numConnections, float springFScale, vec4 myPosition, float i) {\n float curSpring = getTextureData(u_connections, curConnection + i, 4096.0).a;\n\n vec4 otherPosition = getTextureData(u_physData, curSpring, 256.0);\n float otherDataPosition = getTextureData(u_connectionOffsets, curSpring, 256.0).a;\n float avgDegree;\n#if INTEL_WORKAROUND\n avgDegree = max(numConnections, 4.0);\n#else\n float otherNumConnections = getTextureData(u_connections, otherDataPosition, 4096.0).a;\n avgDegree = max((otherNumConnections + numConnections * 3.0) / 4.0, 4.0);\n#endif\n\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n\n float F = (dist * dist * springFScale) / (u_baseLength * avgDegree);\n if (u_collisionMultiplier > 0.0) {\n F *= u_collisionMultiplier;\n }\n return (-delta / dist) * F;\n}\n\nvec2 getCollisionForce(float combinedNodeSize, float dist, float fScale, vec2 delta) {\n float collisionForce = ((combinedNodeSize - dist) / dist);\n if (u_collisionMultiplier > 0.0) {\n collisionForce *= u_collisionMultiplier;\n }\n return (delta * collisionForce * fScale * combinedNodeSize) / (combinedNodeSize + 1.0);\n}\n\nvec2 getRepulsionForce(float dist, float fScale, vec2 delta) {\n float F = (u_baseLength * u_baseLength * (fScale / 1.5)) / dist;\n return (delta / dist) * F * 0.05;\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * textureSide;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterWeight = clusterData.w;\n\n vec4 myPosition = getTextureData(u_physData, index, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n\n vec2 acceleration = previousForce.xy;\n\n float isPinned = getTextureData(u_pinnedNodes, index, 256.0).a;\n float nodeSize = getTextureData(u_sizeTexture, index, 256.0).a;\n\n if (isPinned > 0.5) {\n gl_FragColor = vec4(myPosition.xy, 0.0, 0.0);\n return;\n }\n\n float curConnection = getTextureData(u_connectionOffsets, index, 256.0).a;\n float numConnections = getTextureData(u_connections, curConnection, 4096.0).a;\n\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n float springFScale = fScale;\n\n if (numConnections > denseNodeThreshold) {\n springFScale = sqrt(fScale);\n }\n\n float numOfRels = 0.0;\n\n // Springs\n for (float i = 1.0; i <= 256.0 * 256.0; i++) {\n if (numOfRels >= numConnections) {\n break;\n }\n acceleration += getSpringForce(curConnection, numConnections, springFScale, myPosition, i);\n numOfRels += 1.0;\n }\n\n // Repulsion && collision detection\n if (u_collisionMultiplier > 0.0) {\n float number_of_collisions = 0.0;\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= u_numNodes) {\n break;\n }\n\n if (i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize) * 2.0;\n\n if (dist < combinedNodeSize && number_of_collisions < 40.0) {\n number_of_collisions++;\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n if (i >= clusterStartIndex && i < clusterStartIndex + clusterSize) {\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n } else {\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherPosition = getOtherNodePosition(i);\n vec2 delta = getDelta(myPosition.xy, otherPosition.xy);\n float dist = length(delta);\n float combinedNodeSize = getCombinedNodeSize(i, nodeSize);\n\n if (dist < combinedNodeSize) {\n acceleration += getCollisionForce(combinedNodeSize, dist, fScale, delta);\n }\n\n acceleration += getRepulsionForce(dist, fScale, delta);\n }\n }\n\n // Gravity\n vec2 delta = getDelta(u_gravityCenter, myPosition.xy);\n float dist = length(delta);\n\n vec2 grav = (delta / dist) * u_gravity * fScale;\n acceleration += grav * smoothstep(0.0, 500.0, dist);\n\n float accMagnitude = length(acceleration);\n acceleration *= min(MAX_ACCELERATION, accMagnitude) / accMagnitude;\n\n float iterationFrictionThreshold = 1000.0;\n\n if (u_curIteration > iterationFrictionThreshold) {\n float friction = 1.0 + pow((u_curIteration - iterationFrictionThreshold), 2.0) / 100.0;\n acceleration *= 1.0 / friction;\n }\n\n if (u_curIteration == 0.0) {\n gl_FragColor = vec4(myPosition.xy, acceleration * TIMESTEP * 0.5);\n } else {\n myPosition.zw = myPosition.zw * VELOCITYDECAY;\n gl_FragColor = vec4(myPosition.xy + myPosition.zw * TIMESTEP, myPosition.zw + acceleration * TIMESTEP);\n }\n}";this.physShader=new c_(e,m_,d,{INTEL_WORKAROUND:this.intelWorkaround?1:0}),this.physShader.use(),this.physShader.setUniform("u_projection",this.physProjection),this.physShader.setUniform("u_baseLength",this.getBaseLength()),this.physShader.setUniform("u_connections",this.springTexture),this.physShader.setUniform("u_sizeTexture",this.sizeTexture),this.physShader.setUniform("u_connectionOffsets",this.offsetTexture),this.physShader.setUniform("u_pinnedNodes",this.pinTexture),this.physShader.setUniform("u_gravityCenter",this.nodeCenterPoint),this.physShader.setUniform("u_numNodes",this.numNodes),this.physShader.setUniform("u_gravity",this.gravity)}},{key:"setupPhysicsForCoarse",value:function(){var e=this,t=this.gl;this.levelsData=[],this.levelsClusterTexture=[],this.levelsFinestIndexTexture=[];var n,r,o=this.subGraphs.length,i=function(e,t,r,o,i){n[4*e+0]=t,n[4*e+1]=r,n[4*e+2]=i.size(),n[4*e+3]=o||1};if(1===o){n=new Float32Array(262144);var a=this.subGraphs[0].nodes;a.forEach(function(e,t){i(t,0,0,e.weight,{size:function(){return a.length}})}),this.levelsClusterTexture[0]=this.newTexture(t,n,k_)}else for(var s=function(){var o=e.subGraphs[u].nodes,a=u===e.subGraphs.length-1?[]:e.subGraphs[u+1].nodes;n=new Float32Array(262144),r=new Float32Array(65536);var s=0;if(a.length>0){var l=a.slice();l.sort(function(e,t){return e.previousIndex-t.previousIndex}),l.forEach(function(e,t){var n=s,u=a.indexOf(e);i(s,u,n,o[e.id].weight,e),r[s]=o[s].finestIndex,s+=1,e.planets.forEach(function(t){i(s,u,n,t.weight,e),r[s]=o[s].finestIndex,s+=1,t.moons.forEach(function(t){i(s,u,n,t.weight,e),r[s]=o[s].finestIndex,s+=1})})})}else o.forEach(function(e,t){i(t,0,0,e.weight,{size:function(){return o.length}}),r[t]=o[t].finestIndex});var c=e.newTexture(t,null,k_),f=e.newFramebuffer(t,c);e.levelsData[u]={texture:c,frameBuffer:f},e.levelsClusterTexture[u]=e.newTexture(t,n,k_),e.levelsFinestIndexTexture[u]=e.newTexture(t,r,Ym,t.FLOAT,t.ALPHA)},u=this.subGraphs.length-1;u>=0;u--)s();for(var l=new Float32Array(262144),c=0;c= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n float clusterArea = pow(clusterSize + u_baseLength * 2.0, 2.0);\n\n float finestIndex = getTextureData(u_finestIndexes, index, 256.0).a;\n vec4 myPosition = getTextureData(u_physData, finestIndex, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n\n vec2 acceleration = previousForce.xy;\n\n // Repulsion & Collision Detection\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherClusterData = getTextureData(u_clusterData, i, 256.0);\n float otherClusterWeight = getSquaredLogClusterWeight(otherClusterData.w);\n\n float otherFinestIndex = getTextureData(u_finestIndexes, i, 256.0).a;\n vec4 otherPosition = getTextureData(u_physData, otherFinestIndex, 256.0);\n\n vec2 delta = myPosition.xy - otherPosition.xy;\n float dist = max(length(delta), 0.0000001);\n float maxDist = 25.0;\n float repulsionForceScale = 0.1;\n\n float F = (clusterArea * fScale) / (dist * dist);\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.2;\n }\n\n acceleration += ((delta / sqrt(dist)) * F) * repulsionForceScale * otherClusterWeight;\n\n if (dist < maxDist) {\n float collide = (maxDist - dist) / (dist * dist);\n acceleration += delta * collide * fScale * maxDist / (maxDist + 1.0);\n }\n }\n\n gl_FragColor = vec4(acceleration, vec2(finestIndex, 0));\n}":"precision mediump float;\nuniform sampler2D u_physData;\nuniform sampler2D u_clusterData;\nuniform sampler2D u_finestIndexes;\nuniform sampler2D u_prevForce;\n\nuniform float u_baseLength;\nuniform float u_numNodes;\nuniform float u_iterationMultiplier;\nuniform float u_isTopLevel;\n\nfloat TIMESTEP = 1.0 / 30.0;\nfloat VELOCITYDECAY = 0.6;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nfloat getLogClusterWeight(float value) {\n return value / max(log(value), 1.0);\n}\n\nvoid main(void) {\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5) * 256.0;\n\n if (index >= u_numNodes) {\n discard;\n }\n\n vec4 clusterData = getTextureData(u_clusterData, index, 256.0);\n\n float clusterIndex = clusterData.x;\n float clusterStartIndex = clusterData.y;\n float clusterSize = clusterData.z;\n\n float finestIndex = getTextureData(u_finestIndexes, index, 256.0).a;\n vec4 myPosition = getTextureData(u_physData, finestIndex, 256.0);\n vec4 previousForce = getTextureData(u_prevForce, clusterIndex, 256.0);\n float fScale = 1.0 + sqrt(u_iterationMultiplier);\n\n vec2 acceleration = previousForce.xy;\n\n // Repulsion & Collision Detection\n for (float i = 0.0; i < 256.0 * 256.0; i++) {\n if (i >= clusterStartIndex + clusterSize || i >= u_numNodes) {\n break;\n }\n if (i < clusterStartIndex || i == index) {\n continue;\n }\n\n vec4 otherClusterData = getTextureData(u_clusterData, i, 256.0);\n float otherClusterWeight = getLogClusterWeight(otherClusterData.w);\n\n float otherFinestIndex = getTextureData(u_finestIndexes, i, 256.0).a;\n vec4 otherPosition = getTextureData(u_physData, otherFinestIndex, 256.0);\n\n vec2 delta = myPosition.xy - otherPosition.xy;\n float dist = max(length(delta), 0.0000001);\n float maxDist = 25.0;\n float repulsionForceScale = 0.1;\n\n float F = ((u_baseLength * u_baseLength) * (fScale / 1.5)) / dist;\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.3;\n }\n\n acceleration += ((delta / dist) * F) * repulsionForceScale * otherClusterWeight;\n\n if (dist < maxDist) {\n float collide = (maxDist - dist) / dist;\n acceleration += delta * collide * fScale * maxDist / (maxDist + 1.0);\n }\n }\n\n gl_FragColor = vec4(acceleration, vec2(finestIndex, 0));\n}";this.apprxRepForceShader=new c_(t,m_,f),this.apprxRepForceShader.use(),this.apprxRepForceShader.setUniform("u_projection",this.physSmallProjection)}},{key:"setupPinData",value:function(){var e=this.gl;this.pinTexture=e.createTexture(),this.pinData=new Uint8Array(65536);for(var t=0;t<65536;t++)this.pinData[t]=0;e.bindTexture(e.TEXTURE_2D,this.pinTexture),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,Ym,Ym,0,e.ALPHA,e.UNSIGNED_BYTE,this.pinData),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}},{key:"setupUpdates",value:function(){var e=this.gl;this.updateData=new Float32Array(65536),this.updateTexture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.updateTexture),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,Ym,Ym,0,e.ALPHA,e.FLOAT,this.updateData),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),this.updateShader=new c_(e,m_,"precision mediump float;\n\nuniform sampler2D u_physData;\nuniform sampler2D u_updateData;\nuniform float u_numNodesNew;\n\nconst float INDEX_FLAG = 999999.0;\n\nvec4 getTextureData(sampler2D texture, float index, float base) {\n float x = mod(index, base);\n float y = (index - x) / base;\n return texture2D(texture, vec2(x + 0.5, y + 0.5) / base);\n}\n\nvoid main(void) {\n float textureSide = 256.0; //#TEXTURE_SIDE#;\n float index = (gl_FragCoord.x - 0.5) + (gl_FragCoord.y - 0.5)*textureSide;\n\n if (index >= u_numNodesNew) {\n discard;\n }\n\n float firstValue = getTextureData(u_updateData, index * 2.0, 256.0).a;\n float secondValue = getTextureData(u_updateData, index * 2.0 + 1.0, 256.0).a;\n\n if (secondValue == INDEX_FLAG) {\n vec4 myPosition = getTextureData(u_physData, firstValue, 256.0);\n gl_FragColor = myPosition;\n } else {\n gl_FragColor = vec4(firstValue, secondValue, 0.0, 0.0);\n }\n}\n"),this.updateShader.use(),this.updateShader.setUniform("u_projection",this.physProjection)}},{key:"setupReadpixelWorkaround",value:function(){var e=this.gl;this.workaroundShader=new c_(e,m_,"precision lowp float;\n\nuniform sampler2D u_physData;\nuniform float u_index;\n\nfloat shift_right (float v, float amt) { \n v = floor(v) + 0.5; \n return floor(v / exp2(amt)); \n}\n\nfloat shift_left (float v, float amt) { \n return floor(v * exp2(amt) + 0.5); \n}\n\nfloat mask_last (float v, float bits) { \n return mod(v, shift_left(1.0, bits)); \n}\n\nfloat extract_bits (float num, float from, float to) { \n from = floor(from + 0.5); to = floor(to + 0.5); \n return mask_last(shift_right(num, from), to - from); \n}\n\n// From https://stackoverflow.com/questions/17981163/webgl-read-pixels-from-floating-point-render-target\nvec4 encode_float (float val) { \n if (val == 0.0) return vec4(0, 0, 0, 0); \n float sign = val > 0.0 ? 0.0 : 1.0; \n val = abs(val); \n float exponent = floor(log2(val)); \n float biased_exponent = exponent + 127.0; \n float fraction = ((val / exp2(exponent)) - 1.0) * 8388608.0; \n float t = biased_exponent / 2.0; \n float last_bit_of_biased_exponent = fract(t) * 2.0; \n float remaining_bits_of_biased_exponent = floor(t); \n float byte4 = extract_bits(fraction, 0.0, 8.0) / 255.0; \n float byte3 = extract_bits(fraction, 8.0, 16.0) / 255.0; \n float byte2 = (last_bit_of_biased_exponent * 128.0 + extract_bits(fraction, 16.0, 23.0)) / 255.0; \n float byte1 = (sign * 128.0 + remaining_bits_of_biased_exponent) / 255.0; \n return vec4(byte4, byte3, byte2, byte1); \n}\n\nvoid main(void) {\n vec4 texData = texture2D(u_physData, gl_FragCoord.xy / 255.0);\n float data;\n if (u_index == 0.0) {\n data = texData.x;\n } else if (u_index == 1.0) {\n data = texData.y;\n } else if (u_index == 2.0) {\n data = texData.z;\n } else if (u_index == 3.0) {\n data = texData.w;\n }\n\n gl_FragColor = encode_float(data);\n}\n"),this.workaroundShader.use(),this.workaroundShader.setUniform("u_projection",this.physProjection),this.workaroundData=[];for(var t=0;t<4;t++){var n=new Uint8Array(262144),r=this.newTexture(e,null,Ym,e.UNSIGNED_BYTE),o=this.newFramebuffer(e,r);this.workaroundData.push({dataByte:n,dataFloat:new Float32Array(n.buffer),texture:r,frameBuffer:o})}}},{key:"doReadpixelWorkaround",value:function(){for(var e=this.gl,t=0;t<4;t++){var n=this.workaroundData[t];e.bindFramebuffer(e.FRAMEBUFFER,n.frameBuffer),e.viewport(0,0,Ym,Ym),this.workaroundShader.use(),this.workaroundShader.setUniform("u_index",t),this.workaroundShader.setUniform("u_physData",this.getPhysData(0).texture),e.bindBuffer(e.ARRAY_BUFFER,this.physVbo),this.workaroundShader.setAttributePointer("a_position",2,0,2),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.readPixels(0,0,Ym,Ym,e.RGBA,e.UNSIGNED_BYTE,n.dataByte)}}},{key:"definePhysicsArrays",value:function(){this.physData=[],this.levelsData=[],this.levelsClusterTexture=[],this.levelsFinestIndexTexture=[]}}],t&&function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]&&arguments[0],t=this.state,n=t.nodes,r=t.rels,o=n.channels[B_],i=r.channels[B_],a=Object.values(o.adds).length,s=Object.values(i.adds).length,u=Object.values(o.adds).map(function(e){return e.id}),l=Object.values(i.adds).map(function(e){return e.id}),c=new Set(Object.keys(o.adds)),f=new Set(Object.keys(i.adds));if(n.clearChannel(B_),r.clearChannel(B_),this.currentLayoutType===F_&&this.enableCytoscape&&n.items.length<=100&&a<100&&a>0&&s>0){var h=n.items.map(function(e){return e.id}),d=new Set([].concat(M_(h),M_(u))),p=r.items.map(function(e){return e.id}),v=new Set([].concat(M_(p),M_(l)));if(d.size<=100&&v.size<=300){var g=function(e,t,n,r){var o,i=new Set(e),a=ab(new Set(t));try{for(a.s();!(o=a.n()).done;){var s=o.value,u=r.idToItem[s];if(u){var l=u.from,c=u.to;i.add(l),i.add(c)}}}catch(e){a.e(e)}finally{a.f()}var f,h=function(e){var t,n={},r={},o=ab(e);try{for(o.s();!(t=o.n()).done;){for(var i=t.value,a=i.from,s=i.to,u="".concat(a,"-").concat(s),l="".concat(s,"-").concat(a),c=0,f=[u,l];c0;){var r=t.shift();if(v[r]=n.idToItem[r],void 0!==d[r]){var o,i=ab(d[r]);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(!v[a]){t.push(a);var s=p["".concat(r,"-").concat(a)];if(s){var u,l=ab(s);try{for(l.s();!(u=l.n()).done;){var c=u.value;g[c.id]||(g[c.id]=c)}}catch(e){l.e(e)}finally{l.f()}}}}}catch(e){i.e(e)}finally{i.f()}}}},m=ab(i);try{for(m.s();!(f=m.n()).done;)y(f.value)}catch(e){m.e(e)}finally{m.f()}return{connectedNodes:v,connectedRels:g}}(c,f,n,r),y=g.connectedNodes,m=g.connectedRels,b=Object.values(y),_=Object.values(m),w=b.length,x=_.length;w===c.size&&x===f.size&&(f.size>0||c.size>0)?(this.setLayout(U_),this.coseBilkentLayout.update(!0,n.items,r.items)):x>0&&f.size/x>.25&&(this.setLayout(U_),this.coseBilkentLayout.update(!0,b,_))}}this.physLayout.update(e),this.coseBilkentLayout.update(e)}},{key:"getShouldUpdate",value:function(){return this.currentLayout.getShouldUpdate()}},{key:"getComputing",value:function(){return this.currentLayout.getComputing()}},{key:"updateNodes",value:function(e){this.setLayout(F_),this.physLayout.updateNodes(e)}},{key:"getNodePositions",value:function(e){return this.currentLayout.getNodePositions(e)}},{key:"terminateUpdate",value:function(){this.physLayout.terminateUpdate(),this.coseBilkentLayout.terminateUpdate()}},{key:"destroy",value:function(){this.physLayout.destroy(),this.coseBilkentLayout.destroy()}}],t&&function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Y_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||e){var t=this.state,n=t.nodes,r=t.rels,o=Object.values(n.channels[K_].adds).length>0,i=Object.values(r.channels[K_].adds).length>0,a=Object.values(n.channels[K_].removes).length>0,s=Object.values(r.channels[K_].removes).length>0;(o||i||a||s)&&this.layout(n.items,n.idToItem,n.idToPosition),n.clearChannel(K_),r.clearChannel(K_)}this.shouldUpdate=!1}},{key:"layout",value:function(e,t,n){var r,o=void 0!==(r=e)?Yy(r):r;if(!(0,Mp.isEmpty)(o)){for(var i={},a=0;a=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function nw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||e){var t=this.state,n=t.nodes,r=t.rels,o=Object.values(n.channels[ow].adds).length>0,i=Object.values(r.channels[ow].adds).length>0,a=Object.values(n.channels[ow].removes).length>0,s=Object.values(r.channels[ow].removes).length>0;(o||i||a||s)&&(this.layout(n.items,n.idToItem,n.idToPosition,r.items),n.idToPosition=this.positions),n.clearChannel(ow),r.clearChannel(ow)}this.shouldUpdate=!1}},{key:"layout",value:function(e,t,n,r){var o,i=(o=e)?Yy(o):o;if(!(0,Mp.isEmpty)(i)){for(var a=i.length,s=Math.ceil(Math.sqrt(a)),u=new Array(a),l=0,c=0;c0,r=Object.values(e.removes).length>0,a=Object.values(e.updates),s=fb(a);n.shouldUpdate=n.shouldUpdate||t||r||s}if(void 0!==i.version){var u=i.channels[Pw],l=Object.values(u.adds).length>0,c=Object.values(u.removes).length>0;n.shouldUpdate=n.shouldUpdate||l||c}})],n.shouldUpdate=!0,n.oldComputing=!1,n.computing=!1,n.workersDisabled=t.state.disableWebWorkers,n.setOptions(t),n.worker=Ib("HierarchicalLayout",n.workersDisabled),n.pendingLayoutData=null,n.layout(o.items,o.idToItem,o.idToPosition,i.items),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ow(e,t)}(e,Ub),t=e,n=[{key:"setOptions",value:function(e){if(void 0!==e&&function(e){return Object.keys(e).every(function(e){return aw.has(e)})}(e)){var t=e.direction,n=void 0===t?hw:t,r=e.packing,o=void 0===r?pw:r;Object.keys(dw).includes(n)&&(this.directionChanged=this.direction&&this.direction!==n,this.direction=n),vw.includes(o)&&(this.packingChanged=this.packing&&this.packing!==o,this.packing=o),this.shouldUpdate=this.shouldUpdate||this.directionChanged||this.packingChanged}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.shouldUpdate||t){var n=this.state,r=n.nodes,o=n.rels,i=this.directionChanged,a=this.packingChanged,s=Object.values(r.channels[Pw].adds).length>0,u=Object.values(o.channels[Pw].adds).length>0,l=Object.values(r.channels[Pw].removes).length>0,c=Object.values(o.channels[Pw].removes).length>0,f=Object.values(r.channels[Pw].updates),h=fb(f);(t||s||u||l||c||i||a||h)&&this.layout(r.items,r.idToItem,r.idToPosition,o.items),r.clearChannel(Pw),o.clearChannel(Pw),this.directionChanged=!1,this.packingChanged=!1}!function(e,t,n){var r=xw(Ew(e.prototype),"update",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(e,0,this)([]),this.shouldUpdate=!1,this.oldComputing=this.computing}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate||this.shouldUpdateAnimator}},{key:"getComputing",value:function(){return this.computing}},{key:"layout",value:function(e,t,n,r){var o=this;if(this.worker){var i=Cw(e).map(function(e){return e.html,_w(e,gw)}),a=Cw(t),s={};Object.keys(a).forEach(function(e){var t=a[e],n=(t.html,_w(t,yw));s[e]=n});var u=Cw(r).map(function(e){return e.captionHtml,_w(e,mw)}),l=Cw(n),c=this.direction,f=this.packing,h=window.devicePixelRatio,d={nodes:i,nodeIds:s,idToPosition:l,rels:u,direction:c,packing:f,pixelRatio:h,forcedDelay:0};this.computing?this.pendingLayoutData=d:(this.worker.port.onmessage=function(e){var t=e.data,n=t.positions,r=t.parents,i=t.waypoints;o.computing&&(o.positions=n),o.parents=r,o.state.setWaypoints(i),null!==o.pendingLayoutData?(o.worker.port.postMessage(o.pendingLayoutData),o.pendingLayoutData=null):o.computing=!1,o.shouldUpdate=!0,o.startAnimation()},this.computing=!0,this.worker.port.postMessage(d))}else Cb.info("Hierarchical layout code not yet initialised.")}},{key:"terminateUpdate",value:function(){var e,t;this.computing=!1,this.shouldUpdate=!1,null===(e=this.state.nodes)||void 0===e||e.clearChannel(Pw),null===(t=this.state.rels)||void 0===t||t.clearChannel(Pw)}},{key:"destroy",value:function(){var e;this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel(Pw),this.state.rels.removeChannel(Pw),null===(e=this.worker)||void 0===e||e.port.close()}}],n&&function(e,t){for(var n=0;n0?(this.currentTime-this.startTime)/t:1)>=1?(this.currentValue=this.endValue,this.status=2):(this.currentValue=this.startValue+e*(this.endValue-this.startValue),this.hasNextAnimation=!0),this.hasNextAnimation}},{key:"setEndValue",value:function(e){this.endValue!==e&&(e-this.currentValue!==0?(this.currentTime=(new Date).getTime(),this.status=1,this.startValue=this.currentValue,this.endValue=e,this.startTime=this.currentTime,this.setEndTime(this.startTime+this.duration)):this.endValue=e)}},{key:"setEndTime",value:function(e){this.endTime=Math.max(e,this.startTime)}}])&&function(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:1;if(this.ignoreAnimationsFlag)return n;var a=null!==(r=this.getById(e))&&void 0!==r?r:{};if(void 0===a[t]){var s=1===i?this.createSizeAnimation(0,e,t):this.createFadeAnimation(0,e,t);s.setEndValue(n),o=s.currentValue}else{var u=a[t];if(u.currentValue===n)return n;u.setEndValue(n),o=u.currentValue}return this.hasNextAnimation=!0,o}},{key:"createAnimation",value:function(e,t,n){var r,o=new jw(t,e),i=null!==(r=this.animations.get(t))&&void 0!==r?r:{};return this.animations.set(t,Dw(Dw({},i),{},Lw({},n,o))),o}},{key:"getById",value:function(e){return this.animations.get(e)}},{key:"createFadeAnimation",value:function(e,t,n){var r,o=this.createAnimation(e,t,n);return o.setDuration(null!==(r=this.durations[0])&&void 0!==r?r:this.defaultDuration),o}},{key:"createSizeAnimation",value:function(e,t,n){var r,o=this.createAnimation(e,t,n);return o.setDuration(null!==(r=this.durations[1])&&void 0!==r?r:this.defaultDuration),o}}],t&&function(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.getOrCreateEntry(e),r=t?"inverted":"image",o=n[r];return void 0===o&&(o=this.loadImage(e),n[r]=o),this.drawIfNeeded(o,t),o.canvas}},{key:"getOrCreateEntry",value:function(e){return void 0===this.cache[e]&&(this.cache[e]={}),this.cache[e]}},{key:"invertCanvas",value:function(e){for(var t=e.getImageData(0,0,Vw,Vw),n=t.data,r=0;r<4096;r++){var o=4*r;n[o]^=255,n[o+1]^=255,n[o+2]^=255}e.putImageData(t,0,0)}},{key:"loadImage",value:function(e){var t=document.createElement("canvas");t.width=Vw,t.height=Vw;var n=new Image;return n.src=e,n.crossOrigin="anonymous",{canvas:t,image:n,drawn:!1}}},{key:"drawIfNeeded",value:function(e,t){var n=e.image,r=e.canvas;if(!e.drawn&&n.complete){var o=r.getContext("2d");try{o.drawImage(n,0,0,Vw,Vw)}catch(e){Cb.error("Failed to draw image",n.src,e),o.beginPath(),o.strokeStyle="black",o.rect(0,0,Vw,Vw),o.moveTo(0,0),o.lineTo(Vw,Vw),o.moveTo(0,Vw),o.lineTo(Vw,0),o.stroke(),o.closePath()}t&&this.invertCanvas(o),e.drawn=!0}}}],t&&function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0)){var n=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,u=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),1!==a.length);s=!0);}catch(e){u=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}(e)||Yw(e,1)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.relArray())[0];this.fromId=n.from,this.toId=n.to}}},{key:"size",value:function(){return this.rels.size}},{key:"relArray",value:function(){return Array.from(this.rels.values())}},{key:"maxFontSize",value:function(){if(0===this.size())return 1;var e=this.relArray().map(function(e){return(0,Mp.isNumber)(e.captionSize)?e.captionSize:1});return Math.max.apply(Math,function(e){return function(e){if(Array.isArray(e))return qw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Yw(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e))}},{key:"relIsOppositeDirection",value:function(e){var t=e.from,n=e.to,r=this.fromId,o=this.toId;return t!==r&&n!==o||t===o&&n===r}},{key:"indexOf",value:function(e){var t=e.id,n=Array.from(this.rels.keys());return this.rels.has(t)?n.indexOf(t):-1}},{key:"getRel",value:function(e){var t=this.relArray();return e<0||e>=t.length?null:t[e]}},{key:"setWaypoints",value:function(e){this.waypointPath=e}},{key:"setAngles",value:function(e){this.angles=e}}],t&&function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function nx(e){return function(e){if(Array.isArray(e))return ox(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||rx(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rx(e,t){if(e){if("string"==typeof e)return ox(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ox(e,t):void 0}}function ox(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;n--){var r=void 0,o=void 0;0===n?(o=e[e.length-1],r=e[n]-e[e.length-1]+2*Math.PI):(o=e[n-1],r=e[n]-e[n-1]),t.push({size:r,start:o})}t.sort(function(e,t){return t.size-e.size})}return t},ux=function(e,t){for(;t>e.length||e[0].size>2*e[t-1].size;)e.push({size:e[0].size/2,start:e[0].start}),e.push({size:e[0].size/2,start:e[0].start+e[0].size/2}),e.shift(),e.sort(function(e,t){return t.size-e.size});return e},lx=function(){return e=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ix(this,"bundles",void 0),ix(this,"nodeToBundles",void 0),this.bundles={},this.nodeToBundles={};var r=t.reduce(function(e,t){return e[t.id]=t,e},{});this.updateData(r,{},{},n)},t=[{key:"getBundle",value:function(e){var t=this.bundles,n=this.nodeToBundles,r=this.generatePairId(e.from,e.to),o=t[r];return void 0===o&&(o=new Zw(r,e.from,e.to),t[r]=o,void 0===n[e.from]&&(n[e.from]=[]),void 0===n[e.to]&&(n[e.to]=[]),n[e.from].push(o),n[e.to].push(o)),o}},{key:"updateData",value:function(e,t,n,r){var o,i=this.bundles,a=this.nodeToBundles,s=function(e,t){var n=a[t].findIndex(function(t){return t===e});-1!==n&&a[t].splice(n,1),0===a[t].length&&delete a[t]},u=[].concat(nx(Object.values(e)),nx(Object.values(n))),l=Object.values(t),c=tx(u);try{for(c.s();!(o=c.n()).done;){var f=o.value;this.getBundle(f).insert(f)}}catch(e){c.e(e)}finally{c.f()}for(var h=0,d=l;h1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=Nx(e,360),t=Nx(t,100),n=Nx(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=a(u,s,e+1/3),o=a(u,s,e),i=a(u,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,a,u),l=!0,c="hsl"),e.hasOwnProperty("a")&&(i=e.a)),i=Mx(i),{ok:l,format:e.format||c,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:i}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function gx(e,t,n){e=Nx(e,255),t=Nx(t,255),n=Nx(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var u=i-a;switch(o=s>.5?u/(2-i-a):u/(i+a),i){case e:r=(t-n)/u+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(vx(r));return i}function Ix(e,t){t=t||6;for(var n=vx(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(vx({h:r,s:o,v:i})),i=(i+s)%1;return a}vx.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=Mx(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=yx(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=yx(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=gx(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=gx(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return mx(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[Bx(Math.round(e).toString(16)),Bx(Math.round(t).toString(16)),Bx(Math.round(n).toString(16)),Bx(Ux(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*Nx(this._r,255))+"%",g:Math.round(100*Nx(this._g,255))+"%",b:Math.round(100*Nx(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*Nx(this._r,255))+"%, "+Math.round(100*Nx(this._g,255))+"%, "+Math.round(100*Nx(this._b,255))+"%)":"rgba("+Math.round(100*Nx(this._r,255))+"%, "+Math.round(100*Nx(this._g,255))+"%, "+Math.round(100*Nx(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(jx[mx(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+bx(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=vx(e);n="#"+bx(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return vx(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Ex,arguments)},brighten:function(){return this._applyModification(Ox,arguments)},darken:function(){return this._applyModification(Sx,arguments)},desaturate:function(){return this._applyModification(_x,arguments)},saturate:function(){return this._applyModification(wx,arguments)},greyscale:function(){return this._applyModification(xx,arguments)},spin:function(){return this._applyModification(Tx,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(kx,arguments)},complement:function(){return this._applyCombination(Px,arguments)},monochromatic:function(){return this._applyCombination(Ix,arguments)},splitcomplement:function(){return this._applyCombination(Ax,arguments)},triad:function(){return this._applyCombination(Cx,[3])},tetrad:function(){return this._applyCombination(Cx,[4])}},vx.fromRatio=function(e,t){if("object"==hx(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:Fx(e[r]));e=n}return vx(e,t)},vx.equals=function(e,t){return!(!e||!t)&&vx(e).toRgbString()==vx(t).toRgbString()},vx.random=function(){return vx.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},vx.mix=function(e,t,n){n=0===n?0:n||50;var r=vx(e).toRgb(),o=vx(t).toRgb(),i=n/100;return vx({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},vx.readability=function(e,t){var n=vx(e),r=vx(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},vx.isReadable=function(e,t,n){var r,o,i,a,s,u=vx.readability(e,t);switch(o=!1,"AA"!==(a=((i=(i=n)||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(i.size||"small").toLowerCase())&&"large"!==s&&(s="small"),(r={level:a,size:s}).level+r.size){case"AAsmall":case"AAAlarge":o=u>=4.5;break;case"AAlarge":o=u>=3;break;case"AAAsmall":o=u>=7}return o},vx.mostReadable=function(e,t,n){var r,o,i,a,s=null,u=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var l=0;lu&&(u=r,s=vx(t[l]));return vx.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,vx.mostReadable(e,["#fff","#000"],n))};var Rx=vx.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},jx=vx.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(Rx);function Mx(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Nx(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Dx(e){return Math.min(1,Math.max(0,e))}function Lx(e){return parseInt(e,16)}function Bx(e){return 1==e.length?"0"+e:""+e}function Fx(e){return e<=1&&(e=100*e+"%"),e}function Ux(e){return Math.round(255*parseFloat(e)).toString(16)}function zx(e){return Lx(e)/255}var Vx,Wx,Gx,Hx=(Wx="[\\s|\\(]+("+(Vx="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Vx+")[,|\\s]+("+Vx+")\\s*\\)?",Gx="[\\s|\\(]+("+Vx+")[,|\\s]+("+Vx+")[,|\\s]+("+Vx+")[,|\\s]+("+Vx+")\\s*\\)?",{CSS_UNIT:new RegExp(Vx),rgb:new RegExp("rgb"+Wx),rgba:new RegExp("rgba"+Gx),hsl:new RegExp("hsl"+Wx),hsla:new RegExp("hsla"+Gx),hsv:new RegExp("hsv"+Wx),hsva:new RegExp("hsva"+Gx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Yx(e){return!!Hx.CSS_UNIT.exec(e)}var qx=function(e){return fx().get.rgb(e)},Xx=function(e){var t=new ArrayBuffer(4),n=new Uint32Array(t),r=new Uint8Array(t),o=qx(e);return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=255*o[3],n[0]},Kx=function(e){return[(t=qx(e))[0]/255,t[1]/255,t[2]/255];var t},Zx={selected:{rings:[{widthFactor:.05,color:Jm},{widthFactor:.1,color:eb}],shadow:{width:10,opacity:1,color:Qm}},default:{rings:[]}},$x={selected:{rings:[{color:Jm,width:2},{color:eb,width:4}],shadow:{width:18,opacity:1,color:Qm}},default:{rings:[]}},Qx=.75,Jx={noPan:!1,outOnly:!1,animated:!0};function eE(e){return eE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eE(e)}function tE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0?e.captions:e.caption&&e.caption.length>0?[{value:e.caption}]:[]},aE=function(e,t,n){(0,Mp.isNil)(e)||(function(e){return"string"==typeof e&&null!==qx(e)}(e)?t(e):Pb().warn("Invalid color string for ".concat(n,":"),e))};function sE(e){return sE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sE(e)}function uE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lE(e,t,n){return(t=cE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cE(e){var t=function(e){if("object"!=sE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sE(t)?t:t+""}var fE=function(e,t){return(0,Mp.isFinite)(e.x)&&(0,Mp.isFinite)(e.y)&&(0,Mp.isFinite)(t.x)&&(0,Mp.isFinite)(t.y)},hE=function(e,t){if(void 0===e||void 0===t||!fE(e,t))return!1;var n=t.x-e.x,r=t.y-e.y,o=ob();return n*n+r*r<100*o*o},dE=function(){return e=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),lE(this,"p1",void 0),lE(this,"p2",void 0),lE(this,"unit",void 0),lE(this,"norm",void 0),lE(this,"length",void 0),lE(this,"vector",void 0),this.p1=t,this.p2=n,this.vector=this.getVector(),this.length=this.getLength(),this.unit=this.getUnitVector(),this.norm=this.getUnitNormalVector()},t=[{key:"getVector",value:function(){return{x:this.p2.x-this.p1.x,y:this.p2.y-this.p1.y}}},{key:"getLength",value:function(){var e=this.vector,t=e.x,n=e.y;return Math.sqrt(t*t+n*n)}},{key:"getUnitVector",value:function(){var e=this.vector,t=this.length;return{x:e.x/t,y:e.y/t}}},{key:"getUnitNormalVector",value:function(){return{x:this.unit.y,y:-this.unit.x}}}],t&&function(e,t){for(var n=0;n0&&(s=(o=pE(u,l,r))e.length)&&(t=e.length);for(var n=0,r=Array(t);n4&&void 0!==arguments[4]&&arguments[4],a=[],s=[],u=0,l=0,c=!1,f=!1,h=0;hd||(n=e[v-1],"\n\r\v".includes(n))){if(!(ld;){for(p-=1;PE(g());)p-=1;if(!(p-u>1)){o="",f=!0,c=!1;break}o=e.slice(u,p),h=t(o),f=!0,c=!1}return s[l]={text:o,hasEllipsisChar:f,hasHyphenChar:c},{v:s}}c=!1,f=!1;var y=function(e){var t=e.length,n=Math.min(t-1,3);if(1===t)return{hyphen:!1,cnt:0};for(var r=0;rd;){if(!(m-u>1)){o=e[u],m=u+1,h=t(o),c=!1;break}m-=1,o=e.slice(u,m),h=t(o),c=!0}else o=(o=e.slice(u,m)).trim();s[l]={text:o,hasEllipsisChar:f,hasHyphenChar:c},u=m,l+=1}},v=1;v<=e.length;v++)if(d=p())return d.v;return o=e.slice(u,e.length),s[l]={text:o,hasEllipsisChar:f,hasHyphenChar:!1},s},AE=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t,n){var r=t.value;if(r){var o="".concat(n>0&&e.length?", ":"").concat(r);return[].concat(mE(e),[_E(_E({},t),{},{value:o,chars:o.split("").map(function(r,o){var i,a;return 0!==n&&e.length?o<2?null:mE(null!==(i=t.styles)&&void 0!==i?i:[]):mE(null!==(a=t.styles)&&void 0!==a?a:[])})})])}return e},[]);return{stylesPerChar:e.reduce(function(e,t){return[].concat(mE(e),mE(t.chars))},[]),fullCaption:e.map(function(e){return e.value}).join("")}};function kE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n4&&void 0!==arguments[4])||arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=r.headPosition,s=r.headAngle,u=r.headHeight,l=r.headChinHeight,c=r.headWidth,f=Math.cos(s),h=Math.sin(s),d=function(e,t){return{x:a.x+e*f-t*h,y:a.y+e*h+t*f}},p=[d(l-u,0),d(-u,c/2),d(0,0),d(-u,-c/2)],v={lineWidth:e.lineWidth,strokeStyle:e.strokeStyle,fillStyle:e.fillStyle};e.lineWidth=t,e.strokeStyle=n,e.fillStyle=n,function(e,t,n,r){if(e.beginPath(),t.length>0){var o=t[0];e.moveTo(o.x,o.y)}for(var i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function YE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n5&&void 0!==arguments[5]&&arguments[5],a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.norm.x,r=e.norm.y;return t?{x:-n,y:-r}:e.norm},s=ob(),u=t.indexOf(e),l=(t.size()-1)/2,c=u>l,f=Math.abs(u-l),h=o?17*t.maxFontSize():8,d=(t.size()-1)*h*s,p=function(e,t,n,r,o,i,a){var s,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=ob(),c=e.size(),f=c>1,h=e.relIsOppositeDirection(i),d=h?n:t,p=h?t:n,v=e.waypointPath,g=null==v?void 0:v.points,y=null==v?void 0:v.from,m=null==v?void 0:v.to,b=hE(d,y)&&hE(p,m)||hE(p,y)&&hE(d,m),_=b?g[1]:null,w=b?g[g.length-2]:null,x=ZE(d),E=ZE(p),O=function(e,t){return Math.atan2(e.y-t.y,e.x-t.x)},S=Math.max(Math.PI,qE/(c/2)),T=f?r*S*(a?1:-1)/(null!==(s=d.size)&&void 0!==s?s:Xm):0,P=O(b?_:p,d),C=b?O(p,w):P,A=function(e,t,n,r){return{x:e.x+Math.cos(t)*n*(r?-1:1),y:e.y+Math.sin(t)*n*(r?-1:1)}},k=function(e,t){return A(d,P+e,t,!1)},I=function(e,t){return A(p,C-e,t,!0)},R=function(e,t){return{x:e.x+(t.x-e.x)/2,y:e.y+(t.y-e.y)/2}},j=function(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))*l},M=k(T,x),N=I(T,E),D=f?k(0,x):null,L=f?I(0,E):null,B=200*l,F=[];if(b){var U=j(M,_)2*(30*l+Math.min(x,E)))if(u){var Y=KE(d,p,x,E,i,e);F.push(new dE(M,Y)),F.push(new dE(Y,N))}else{var q=r*o,X=30+x,K=Math.sqrt(X*X+q*q),Z=30+E,$=Math.sqrt(Z*Z+q*q),Q=k(0,K),J=I(0,$);F.push(new dE(M,Q)),F.push(new dE(Q,J)),F.push(new dE(J,N))}else if(H>(x+E)/2){var ee=KE(d,p,x,E,i,e);F.push(new dE(M,ee)),F.push(new dE(ee,N))}else F.push(new dE(M,N))}return F}(t,n,r,f,h,e,c,i),v=[],g=p[0],y=a(g,c);v.push({x:g.p1.x+y.x,y:g.p1.y+y.y});for(var m=1;m8&&void 0!==arguments[8]&&arguments[8],c=ob(),f=o.selected,h=o.width,d=o.disabled,p=o.captionAlign,v=void 0===p?"top":p,g=o.captionSize,y=void 0===g?1:g,m=iE(o),b=m.length>0?null===(u=AE(m))||void 0===u?void 0:u.fullCaption:"";if(void 0!==b){var _=6*y*c,w=!0===f?"bold":"normal",x=b;e.fillStyle=!0===d?a.fontColor:s,e.font="".concat(w," ").concat(_,"px ").concat('"Open Sans", sans-serif');var E=function(t){return e.measureText(t).width},O=(null!=h?h:1)*(!0===f?1.5:1),S=E(x);if(S>r){var T=CE(x,E,function(){return r},1,!1)[0];x=!0===T.hasEllipsisChar?"".concat(T.text,"..."):x,S=r}var P=Math.cos(n),C=Math.sin(n),A={x:t.x,y:t.y},k=A.x,I=A.y,R=n;l&&(R=n-XE,k+=2*_*P,I+=2*_*C,R-=XE);var j=(1+y)*c,M="bottom"===v?_/2+O+j:-(O+j);e.translate(k,I),e.rotate(R),e.fillText(x,-S/2,M),e.rotate(-R),e.translate(-k,-I);var N=2*M*Math.sin(n),D=2*M*Math.cos(n),L={position:{x:t.x-N,y:t.y+D},rotation:l?n-Math.PI:n,width:r/c,height:(_+j)/c};i.setLabelInfo(o.id,L)}},tO=function(e,t,n,r,o){if(e.beginPath(),e.moveTo(t[0].x,t[0].y),o&&t.length>2){for(var i=1;i10&&void 0!==arguments[10])||arguments[10];fE(n,r)&&(n.id===r.id?function(e,t,n,r,o,i,a,s){var u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:$w,l=t.overlayIcon,c=t.selected,f=t.width,h=t.hovered,d=t.disabled,p=t.color,v=iO(t,n,r),g=v.startPoint,y=v.endPoint,m=v.apexPoint,b=v.control1Point,_=v.control2Point,w=a.rings,x=a.shadow,E=ob(),O=w[0].color,S=w[1].color,T=w[0].width*E,P=w[1].width*E,C=40*E,A=(null!=f?f:1)*E,k=A>1?A/2:1,I=9*k,R=2*k,j=7*k,M=!0===c,N=!0===d,D=void 0!==l,L=Math.atan2(y.y-_.y,y.x-_.x),B=M?T*Math.sqrt(1+2*I/j*(2*I/j)):0,F={x:y.x-Math.cos(L)*(.5*I-R+B),y:y.y-Math.sin(L)*(.5*I-R+B)},U={headPosition:{x:y.x+Math.cos(L)*(.5*I-R-B),y:y.y+Math.sin(L)*(.5*I-R-B)},headAngle:L,headHeight:I,headChinHeight:R,headWidth:j};if(e.save(),e.lineCap="round",M&&($E(e,x),e.lineWidth=A+P,e.strokeStyle=S,aO(e,g,F,m,b,_),NE(e,P,S,U,!1,!0),QE(e),e.lineWidth=A+T,e.strokeStyle=O,aO(e,g,F,m,b,_),NE(e,T,O,U,!1,!0)),e.lineWidth=A,!0===h&&!M&&!N){var z=x.color;$E(e,x),e.strokeStyle=z,e.fillStyle=z,aO(e,g,F,m,b,_),NE(e,A,z,U),QE(e)}var V=N?s.color:null!=p?p:u;if(e.fillStyle=V,e.strokeStyle=V,aO(e,g,F,m,b,_),NE(e,A,V,U),i||D){var W,G=r.indexOf(t),H=null!==(W=r.angles[G])&&void 0!==W?W:0,Y=m.x-Math.cos(L)*(B/4),q=m.y-Math.sin(L)*(B/4),X=(H+XE)%qE,K=(H+qE)%qE10&&void 0!==arguments[10]?arguments[10]:$w,f=t.overlayIcon,h=t.color,d=t.disabled,p=t.selected,v=t.width,g=t.hovered,y=t.captionAlign,m=!0===p,b=!0===d,_=void 0!==f,w=u.rings,x=u.shadow,E=JE(t,o,n,r,a,s),O=ob(),S=function(e){var t,n=!0===e.selected?1.5:1;return(null!==(t=e.width)&&void 0!==t?t:1)*n*ob()}(t),T=b?l.color:null!=h?h:c,P=w[0].width*O,C=w[1].width*O,A=O*(v>1?v/2:1),k=9*A,I=2*A,R=7*A,j=WE(E[E.length-2],E[E.length-1]),M=2*k,N=m?P*Math.sqrt(1+M/R*(M/R)):0,D=2-N,L=Math.floor(E.length/2);E.length>2&&m&&jr.x,se=E[L];1&~E.length?(te=E[ae?L:L-1],ne=E[ae?L-1:L],re=(te.x+ne.x)/2,oe=(te.y+ne.y)/2,ie=Math.atan2(ne.y-te.y,ne.x-te.x)):(te=E[ae?L+1:L-1],ne=E[ae?L-1:L+1],s?(re=(se.x+(te.x+ne.x)/2)/2,oe=(se.y+(te.y+ne.y)/2)/2,ie=ae?Math.atan2(n.y-r.y,n.x-r.x):Math.atan2(r.y-n.y,r.x-n.x)):(WE(se,te)>WE(se,ne)?ne=se:te=se,re=(te.x+ne.x)/2,oe=(te.y+ne.y)/2,ie=Math.atan2(ne.y-te.y,ne.x-te.x)));var ue=m?GE(ie+XE,nO(u)):{x:0,y:0},le=WE(te,ne);if(a){var ce="bottom"===y?1:-1,fe={x:re+ue.x*ce,y:oe+ue.y*ce};eO(e,fe,ie,le,t,o,l,c)}if(_){var he=f.position,de=void 0===he?[0,0]:he,pe=f.url,ve=f.size,ge=rO(void 0===ve?1:ve),ye=oO(de,le,ge),me=ye.widthAlign,be=ye.heightAlign,_e=de[1]<0?-1:1,we=ue.x*_e,xe=ue.y*_e,Ee=ge/2;e.translate(re,oe),e.rotate(ie);var Oe=-Ee+we+me,Se=-Ee+xe+be;e.drawImage(i.getImage(pe),Oe,Se,ge,ge),e.rotate(-ie),e.translate(-re,-oe)}}e.restore()}(e,t,n,r,o,i,a,c,s,u,l))},uO=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return fE(n,r)?n.id===r.id?function(e,t,n){for(var r=iO(e,t,n),o={left:1/0,top:1/0,right:-1/0,bottom:-1/0},i=["startPoint","endPoint","apexPoint","control1Point","control2Point"],a=0;ao.right&&(o.right=u),lo.bottom&&(o.bottom=l)}return o}(e,n,t):function(e,t,n,r,o,i){var a,s={left:1/0,top:1/0,right:-1/0,bottom:-1/0},u=HE(JE(e,t,n,r,o,i));try{for(u.s();!(a=u.n()).done;){var l=a.value,c=l.x,f=l.y;cs.right&&(s.right=c),fs.bottom&&(s.bottom=f)}}catch(e){u.e(e)}finally{u.f()}return s}(e,t,n,r,o,i):null};function lO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n6&&void 0!==arguments[6]?arguments[6]:Km,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,l=t.x,c=void 0===l?0:l,f=t.y,h=void 0===f?0:f,d=t.size,p=void 0===d?Xm:d,v=t.captionAlign,g=void 0===v?"center":v,y=t.captionSize,m=void 0===y?1:y,b=t.disabled,_=t.activated,w=t.selected,x=t.hovered,E=t.id,O=t.icon,S=t.overlayIcon,T=iE(t),P=ob(),C=function(e,t,n){var r=e.selected?n.selected.rings:n.default.rings;if(!r.length){var o=t.getById(e.id);return void 0!==o&&Object.entries(o).forEach(function(e){var t=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,u=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){u=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return lO(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?lO(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e),n=t[0],r=t[1];n.startsWith("ring-")&&r.setEndValue(0)}),[{width:0,color:""}]}return r.map(function(n,r){var o=n.widthFactor,i=n.color,a=(e.size||Xm)*o*ob();return{width:t.getValueForAnimationName(e.id,"ring-".concat(r),a),color:i}})}(t,r,o),A=C.reduce(function(e,t){return e+t.width},0),k=p*P,I=2*k,R=function(e,t){if(!e||!t)return{nodeInfoLevel:0,fontInfoLevel:1.25,iconInfoLevel:1};var n=ob(),r=1600*n*(1200*n),o=Math.pow(e,2)*Math.PI*Math.pow(t,2)/(r/100);return{nodeInfoLevel:BE(o,IE),fontInfoLevel:BE(o,RE),iconInfoLevel:BE(o,jE)}}(k,u),j=R.nodeInfoLevel,M=R.fontInfoLevel,N=R.iconInfoLevel,D=t.color||a,L=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xm)/({1:3.5,2:2.75,3:2}[arguments.length>2&&void 0!==arguments[2]?arguments[2]:1]+(arguments.length>3&&void 0!==arguments[3]&&arguments[3]?1:0))/e}(M,k,m,Boolean(O)),B=function(e){return vx.mostReadable(e,[tb,"#FFFFFF"]).toString()}(D),F=k;if(A>0&&(F=k+A),b)D=i.color,B=i.fontColor;else{var U;if(_){var z=Date.now()%1e3/1e3,V=z<.7?z/.7:0,W=ME(D,.4-.4*V);LE(e,c,h,W,k+.88*k*V)}var G=null!==(U=o.selected.shadow)&&void 0!==U?U:{width:0,opacity:0,color:""},H=G.width*P,Y=G.opacity,q=G.color,X=w||x?H:0,K=r.getValueForAnimationName(E,"shadowWidth",X);K>0&&function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=o+i,u=e.createRadialGradient(t,n,o,t,n,s);u.addColorStop(0,"transparent"),u.addColorStop(.01,ME(r,.5*a)),u.addColorStop(.05,ME(r,.5*a)),u.addColorStop(.5,ME(r,.12*a)),u.addColorStop(.75,ME(r,.03*a)),u.addColorStop(1,ME(r,0)),e.fillStyle=u,DE(e,t,n,s),e.fill()}(e,c,h,q,F,K,Y)}LE(e,c,h,D,k),A>0&&function(e,t,n,r,o){var i=r;o.forEach(function(r){var o=r.width,a=r.color,s=i+o;e.beginPath(),e.fillStyle=a,e.arc(t,n,s,0,2*Math.PI,!1),e.arc(t,n,i,2*Math.PI,0,!0),e.fill(),e.closePath(),i=s})}(e,c,h,k,C);var Z=Boolean(T.length),$=Boolean(O);if(O){var Q=j<2||!Z,J=j>0?1:0,ee=Q?1*k:.75*k;ee/=N;var te=Q?.5*ee:ee*(1===N?"center"===g?1.3:"bottom"===g||Q?1.1:0:"center"===g?1.35:"bottom"===g||Q?1.1:0),ne=ee/2;ee=r.getValueForAnimationName(E,"iconSize",ee),ne=r.getValueForAnimationName(E,"iconXPos",ne),te=r.getValueForAnimationName(E,"iconYPos",te);var re=e.globalAlpha,oe=b?.1:J;e.globalAlpha=r.getValueForAnimationName(E,"iconOpacity",oe);var ie="#ffffff"===B,ae=n.getImage(O,ie);e.drawImage(ae,c-ne,h-te,Math.floor(ee),Math.floor(ee)),e.globalAlpha=re}if(void 0!==S){var se,ue,le,ce,fe,he=I*(null!==(se=S.size)&&void 0!==se?se:1),de=he/2-k*(null!==(ue=null===(le=S.position)||void 0===le?void 0:le[1])&&void 0!==ue?ue:0),pe=he/2-k*(null!==(ce=null===(fe=S.position)||void 0===fe?void 0:fe[0])&&void 0!==ce?ce:0),ve=e.globalAlpha,ge=b?.1:1;e.globalAlpha=r.getValueForAnimationName(E,"iconOpacity",ge);var ye=n.getImage(S.url);e.drawImage(ye,c-pe,h-de,he,he),e.globalAlpha=ve}if(Z){var me=j<2?0:1,be=r.getValueForAnimationName(E,"textOpacity",me,0);if(be>0){var _e,we,xe='"Open Sans", sans-serif',Ee=2;M===(null===(_e=RE[1])||void 0===_e?void 0:_e[1])?Ee=3:M===(null===(we=RE[2])||void 0===we?void 0:we[1])&&(Ee=4);var Oe="center"===g?.7*I:2*Math.sqrt(Math.pow(I/2,2)-Math.pow(I/3,2));if(e.fillStyle=ME(B,be),Z){var Se=AE(T),Te=Se.stylesPerChar,Pe=function(e,t,n,r,o,i,a){var s=function(e){return/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(e)}(t)?t.split("").reverse().join(""):t;e.font="bold ".concat(r,"px ").concat(n).replace(/"/g,"");for(var u=function(t){var n;return null===(n=e.measureText(t))||void 0===n?void 0:n.width},l=i?(a<4?["",""]:[""]).length:0,c=function(e,t){return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"top",o=.98*n,i=.89*n,a=.95*n;return 1===t?o:2===t?a:3===t&&"top"===r?0===e||2===e?i:o:4===t&&"top"===r?0===e||3===e?.78*n:a:5===t&&"top"===r?0===e||4===e?.65*n:1===e||3===e?i:a:o}(e+l,t+l,o)},f=1,h=[],d=function(){if(0===(h=function(e,t,n,r){var o,i=e.split(/\s/g).filter(function(e){return e.length>0}),a=[],s=null,u=function(e){return t(e)>n(a.length,r)},l=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=xE(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(i);try{for(l.s();!(o=l.n()).done;){var c=o.value,f=s?"".concat(s," ").concat(c):c;if(t(f)r)return[]}}}catch(e){l.e(e)}finally{l.f()}if(s){var d=u(s);a.push({text:s,overflowed:d})}return a.length<=r?a:[]}(s,u,c,f)).length)h=CE(s,u,c,f,a>f);else if(h.some(function(e){return e.overflowed})){var e=f;h=h.reduce(function(t,n){var r=a-t.length;if(0===r){var o=t[t.length-1];return o.text.endsWith(OE)||(u(o.text)+u(OE)>c(t.length,e)?(t[t.length-1].text=o.text.slice(0,-2),t[t.length-1].hasEllipsisChar=!0):(t[t.length-1].text=o.text,t[t.length-1].hasEllipsisChar=!0)),t}if(n.overflowed){var i=CE(n.text,u,c,r);t=t.concat(i)}else t.push({text:n.text,hasEllipsisChar:!1,hasHyphenChar:!1});return t},[])}else h=h.map(function(e){return _E(_E({},e),{},{hasEllipsisChar:!1,hasHyphenChar:!1})});f+=1};0===h.length;)d();return Array.from(h)}(e,Se.fullCaption,xe,L,Oe,$,Ee,null==t||t.captionAlign),Ce=-(Pe.length-2)*L/2;!function(e,t,n,r,o,i,a,s,u,l){var c=r,f=0,h=0,d="".concat(o,"px ").concat(i),p="normal ".concat(d);t.forEach(function(t){var r;e.font=p;var o,i=-(null===(r=e.measureText(t.text))||void 0===r?void 0:r.width)/2,v=t.text?function(e){if(Array.isArray(e))return kE(e)}(o=t.text)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return kE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kE(e,t):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():[];t.hasHyphenChar||t.hasEllipsisChar||v.push(" "),v.forEach(function(r){var o,a=e.measureText(r).width,v=null!==(o=n[h])&&void 0!==o?o:[],g=v.includes("bold"),y=v.includes("italic");e.font=g&&y?"italic 600 ".concat(d):y?"italic 400 ".concat(d):g?"bold ".concat(d):p,v.includes("underline")&&e.fillRect(s+i+f,u+c+.2,a,.2),t.hasEllipsisChar?e.fillText(r,s+i+f-l/2,u+c):e.fillText(r,s+i+f,u+c),f+=a,h+=1}),e.font=p,t.hasHyphenChar&&e.fillText("‐",s+i+f,u+c),t.hasEllipsisChar&&e.fillText(OE,s+i+f-l/2,u+c),f=0,c+=a})}(e,Pe,Te,g&&"center"!==g?"bottom"===g?Ce+k/Math.PI:Ce-k/Math.PI:Ce,L,xe,L,c,h,s)}}}};function hO(e){return hO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hO(e)}function dO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pO(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function gO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n3&&void 0!==arguments[3]?arguments[3]:{}).relationshipThreshold,a=void 0===i?0:i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),yO(this,"arrowBundler",void 0),yO(this,"activeNodes",void 0),yO(this,"canvas",void 0),yO(this,"context",void 0),yO(this,"state",void 0),yO(this,"stateDisposers",void 0),yO(this,"relationshipThreshold",void 0),yO(this,"animationHandler",void 0),yO(this,"imageCache",void 0),yO(this,"needsRun",void 0),yO(this,"nodeVersion",void 0),yO(this,"relVersion",void 0),yO(this,"waypointVersion",void 0),yO(this,"ellipsisWidth",void 0),null!==n&&(this.activeNodes=new Set,this.canvas=t,this.context=n,this.state=r,this.stateDisposers=[],this.stateDisposers.push(r.autorun(function(){void 0!==r.zoom&&(o.needsRun=!0),void 0!==r.panX&&(o.needsRun=!0),void 0!==r.panY&&(o.needsRun=!0),void 0!==r.nodes.version&&(o.needsRun=!0),void 0!==r.rels.version&&(o.needsRun=!0),r.waypoints.counter>0&&(o.needsRun=!0),void 0!==r.layout&&(o.needsRun=!0)})),r.nodes.addChannel(bO),r.rels.addChannel(bO),this.relationshipThreshold=a,this.nodeVersion=r.nodes.version,this.relVersion=r.rels.version,this.waypointVersion=r.waypoints.counter,this.animationHandler=new Fw,this.animationHandler.setOptions({fadeDuration:150,sizeDuration:150}),this.arrowBundler=new lx(r.rels.items,r.waypoints.data),this.imageCache=new Gw,this.needsRun=!0,this.ellipsisWidth=n.measureText(OE).width)},t=[{key:"needsToRun",value:function(){return this.needsRun||this.animationHandler.needsToRun()||this.activeNodes.size>0}},{key:"processUpdates",value:function(){var e=this.state,t=!1,n=e.nodes.channels[bO],r=e.rels.channels[bO],o=r.adds,i=r.removes,a=r.updates;this.nodeVersion0||Object.keys(i).length>0||Object.keys(a).length>0,e.rels.clearChannel(bO),this.relVersion=e.rels.version),(t||this.waypointVersion1&&void 0!==arguments[1]?arguments[1]:{},o=this.state,i=this.animationHandler,a=this.arrowBundler,s=o.zoom,u=o.layout,l=o.nodes.idToPosition,c=null!==(t=r.canvas)&&void 0!==t?t:this.canvas,f=null!==(n=r.context)&&void 0!==n?n:this.context,h=ob(),d=c.clientWidth*h,p=c.clientHeight*h;f.save(),void 0!==r.backgroundColor?(f.fillStyle=r.backgroundColor,f.fillRect(0,0,d,p)):f.clearRect(0,0,d,p),this.zoomAndPan(f,c),i.ignoreAnimations(Boolean(r.ignoreAnimations)),r.ignoreAnimations||i.advance(),a.updatePositions(l);var v=this.getRelationshipsToRender(r.showCaptions,d,p);this.renderRelationships(v,f,u!==sw);var g=this.getNodesToRender(e,d,p);this.renderNodes(g,f,s),f.restore(),this.needsRun=!1}},{key:"getRelationshipsToRender",value:function(e,t,n){var r,o=[],i=[],a=[],s=this.arrowBundler,u=this.state,l=this.relationshipThreshold,c=u.layout,f=u.zoom,h=u.rels,d=u.nodes,p=d.idToItem,v=d.idToPosition,g=vO(h.items);try{for(g.s();!(r=g.n()).done;){var y=r.value,m=s.getBundle(y),b=pO(pO({},p[y.from]),v[y.from]),_=pO(pO({},p[y.to]),v[y.to]),w=e||f>l||void 0!==y.captionHtml,x=uO(y,m,b,_,w,c!==sw);if(null!==x){var E,O,S,T,P,C,A=this.isBoundingBoxOffScreen(x,t,n),k=WE({x:null!==(E=b.x)&&void 0!==E?E:0,y:null!==(O=b.y)&&void 0!==O?O:0},{x:null!==(S=_.x)&&void 0!==S?S:0,y:null!==(T=_.y)&&void 0!==T?T:0}),I=((null!==(P=b.size)&&void 0!==P?P:Xm)+(null!==(C=_.size)&&void 0!==C?C:Xm))*devicePixelRatio,R=b.id!==_.id&&I>k;A||R||(y.disabled?i.push(pO(pO({},y),{},{fromNode:b,toNode:_,showLabel:w})):y.selected?o.push(pO(pO({},y),{},{fromNode:b,toNode:_,showLabel:w})):a.push(pO(pO({},y),{},{fromNode:b,toNode:_,showLabel:w})))}}}catch(e){g.e(e)}finally{g.f()}return[].concat(i,a,o)}},{key:"getNodesToRender",value:function(e,t,n){var r,o=[],i=[],a=[],s=this.state.nodes.idToItem,u=vO(e);try{for(u.s();!(r=u.n()).done;){var l=r.value,c=cO(l);this.isBoundingBoxOffScreen(c,t,n)||(s[l.id].disabled?o.push(pO({},l)):s[l.id].selected?i.push(pO({},l)):a.push(pO({},l)))}}catch(e){u.e(e)}finally{u.f()}return[].concat(o,a,i)}},{key:"renderNodes",value:function(e,t,n){var r,o=this.imageCache,i=this.animationHandler,a=this.state,s=this.ellipsisWidth,u=a.nodes.idToItem,l=a.nodeBorderStyles,c=a.disabledItemStyles,f=a.defaultNodeColor,h=vO(e);try{for(h.s();!(r=h.n()).done;){var d=r.value;fO(t,pO(pO({},u[d.id]),d),o,i,l,c,f,s,n)}}catch(e){h.e(e)}finally{h.f()}}},{key:"renderRelationships",value:function(e,t,n){var r,o=this.state.relationshipBorderStyles.selected,i=this.arrowBundler,a=this.imageCache,s=this.state,u=s.disabledItemStyles,l=s.defaultRelationshipColor,c=vO(e);try{for(c.s();!(r=c.n()).done;){var f=r.value,h=i.getBundle(f),d=f.fromNode,p=f.toNode,v=f.showLabel;sO(t,f,d,p,h,a,v,o,u,l,n)}}catch(e){c.e(e)}finally{c.f()}}},{key:"getNodesAt",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],o=this.state.nodes,i=o.items,a=o.idToPosition,s=ob(),u=vO(i);try{var l=function(){var o=t.value,i=o.id,u=o.size,l=void 0===u?Xm:u,c=a[i],f=c.x,h=c.y,d=Math.sqrt(Math.pow(e.x-f,2)+Math.pow(e.y-h,2));if(d<=(l+n)*s){var p=r.findIndex(function(e){return e.distance>d});r.splice(-1!==p?p:r.length,0,{data:o,targetCoordinates:{x:f,y:h},pointerCoordinates:e,distanceVector:{x:e.x-f,y:e.y-h},insideNode:d<=l*s,distance:d})}};for(u.s();!(t=u.n()).done;)l()}catch(e){u.e(e)}finally{u.f()}return r}},{key:"getRelsAt",value:function(e){var t,n=[],r=this.state,o=this.arrowBundler,i=this.relationshipThreshold,a=r.zoom,s=r.rels.items,u=r.nodes.idToPosition,l=r.layout,c=a>i,f=vO(s);try{var h=function(){var r=t.value,i=o.getBundle(r),a=u[r.from],s=u[r.to];if(void 0!==a&&void 0!==s&&i.has(r)){var f=function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(!fE(n,r))return 1/0;var s=n===r?function(e,t,n,r){var o=iO(t,n,r),i=o.startPoint,a=o.endPoint,s=o.apexPoint,u=o.control1Point,l=o.control2Point,c=gE(i,s,u,e),f=gE(s,a,l,e);return Math.min(c,f)}(e,t,n,o):function(e,t,n,r,o,i,a){var s=JE(t,n,r,o,i,a),u=1/0;if(a&&3===s.length)u=gE(s[0],s[2],s[1],e);else for(var l=1;lf});n.splice(-1!==h?h:n.length,0,{data:r,fromTargetCoordinates:a,toTargetCoordinates:s,pointerCoordinates:e,distance:f})}}};for(f.s();!(t=f.n()).done;)h()}catch(e){f.e(e)}finally{f.f()}return n}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel(bO),this.state.rels.removeChannel(bO)}},{key:"isBoundingBoxOffScreen",value:function(e,t,n){var r=this.state,o=r.zoom,i=t/o,a=n/o,s=r.panX-i/2,u=r.panY-a/2,l=e.rights+i,h=e.top>u+a;return l||f||c||h}},{key:"handleChannelUpdate",value:function(e,t,n){for(var r=Object.keys(e.adds),o=0;o2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=function(e,t){if((0,Mp.isNil)(e)||(0,Mp.isNil)(t))return{offsetX:0,offsetY:0};var n=t.getBoundingClientRect(),r=window.devicePixelRatio||1;return{offsetX:r*(e.clientX-n.left-.5*n.width),offsetY:r*(e.clientY-n.top-.5*n.height)}}(e,t);return{x:r+i.offsetX/n,y:o+i.offsetY/n}};function xO(e){return xO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xO(e)}function EO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OO(e,t){for(var n=0;n0}},{key:"renderMainScene",value:function(e){var t=this.state,n=t.nodes,r=t.rels;this.checkForUpdates(n,r),this.mainSceneRenderer.render(e,n,r),this.needsRun=!1}},{key:"renderMinimap",value:function(e){var t=this.state,n=t.nodes,r=t.rels;this.checkForUpdates(n,r),this.minimapRenderer.render(e,n,r),this.minimapRenderer.renderViewbox(),this.needsRun=!1}},{key:"checkForUpdates",value:function(e,t){var n=Object.values(e.channels[CO].adds).length>0,r=Object.values(t.channels[CO].adds).length>0,o=Object.values(e.channels[CO].removes).length>0,i=Object.values(t.channels[CO].removes).length>0,a=Object.values(e.channels[CO].updates),s=Object.values(t.channels[CO].updates);n||r||o||i?(this.mainSceneRenderer.setData({nodes:e.items,rels:t.items}),this.minimapRenderer.setData({nodes:e.items,rels:t.items})):(a.length>0&&(this.mainSceneRenderer.updateNodes(a),this.minimapRenderer.updateNodes(a)),s.length>0&&(this.mainSceneRenderer.updateRelationships(t.items),this.minimapRenderer.updateRelationships(t.items))),e.clearChannel(CO),t.clearChannel(CO)}},{key:"onResize",value:function(){var e=this.state,t=e.zoom,n=e.panX,r=e.panY,o=e.minimapZoom,i=e.minimapPanX,a=e.minimapPanY;this.updateMainViewport(t,n,r),this.updateMinimapViewport(o,i,a)}},{key:"updateMainViewport",value:function(e,t,n){this.mainSceneRenderer.updateViewport(e,t,n);var r=this.mainSceneRenderer.canvas.clientWidth,o=this.mainSceneRenderer.canvas.clientHeight;this.minimapRenderer.updateViewportBox(e,t,n,r,o),this.needsRun=!0}},{key:"updateMinimapViewport",value:function(e,t,n){this.minimapRenderer.updateViewport(e,t,n),this.needsRun=!0}},{key:"handleMinimapDrag",value:function(e){var t=this.state,n=this.minimapRenderer,r=wO(e,n.canvas,t.minimapZoom,t.minimapPanX,t.minimapPanY),o=r.x,i=r.y;t.setPan(o,i)}},{key:"handleMinimapWheel",value:function(e){var t=this.state,n=this.mainSceneRenderer;t.setZoom(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,Mp.isNil)(e)||isNaN(e.deltaY)?t:t-e.deltaY/500*Math.min(1,t)}(e,t.zoom),n.canvas),e.preventDefault()}},{key:"setupMinimapInteractions",value:function(){var e=this,t=this.minimapRenderer.canvas;t.addEventListener("mousedown",function(t){e.handleMinimapDrag(t),e.minimapMouseDown=!0}),t.addEventListener("mousemove",function(t){e.minimapMouseDown&&e.handleMinimapDrag(t)}),t.addEventListener("mouseup",function(){e.minimapMouseDown=!1}),t.addEventListener("mouseleave",function(){e.minimapMouseDown=!1}),t.addEventListener("wheel",function(t){e.handleMinimapWheel(t)})}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(e){e()}),this.state.nodes.removeChannel(CO),this.state.rels.removeChannel(CO),this.mainSceneRenderer.destroy(),this.minimapRenderer.destroy()}}]),kO=SO(function e(){EO(this,e),TO(this,"mainSceneRenderer",void 0),TO(this,"minimapRenderer",void 0),TO(this,"needsRun",void 0),TO(this,"minimapMouseDown",void 0),TO(this,"stateDisposers",void 0),TO(this,"state",void 0)},[{key:"renderMainScene",value:function(e){}},{key:"renderMinimap",value:function(e){}},{key:"checkForUpdates",value:function(e,t){}},{key:"onResize",value:function(){}},{key:"updateMainViewport",value:function(e,t,n){}},{key:"updateMinimapViewport",value:function(e,t,n){}},{key:"handleMinimapDrag",value:function(e){}},{key:"handleMinimapWheel",value:function(e){}},{key:"setupMinimapInteractions",value:function(){}},{key:"destroy",value:function(){}},{key:"needsToRun",value:function(){return!1}}]);function IO(e){return IO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},IO(e)}function RO(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return jO(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jO(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function jO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n 0.51) {\n discard;\n }\n else {\n lowp float nodeSize = 1.0 / varNodeSize;\n lowp float nodeAlpha = getCircleAlpha(circleSize, nodeSize, dist);\n lowp float borderAlpha = getCircleAlpha(defaultBoderSize, nodeSize, dist);\n lowp float ringAlpha = getCircleAlpha(innerSelectedRingSize, nodeSize, dist);\n lowp vec3 finalColor = color.xyz;\n lowp float finalAlpha = nodeAlpha;\n\n if (selected > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(outerSelectedRingSize, dist);\n lowp float ringAlpha2 = getCircleAlpha(outerSelectedRingSize, nodeSize, dist);\n\n if (drawDefaultBorder > 0.0) {\n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalColor = mix(selectedInnerBorderColor, finalColor, borderAlpha);\n finalColor = mix(selectedBorderColor, finalColor, ringAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha2);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, max(borderAlpha, ringAlpha2)));\n } else {\n finalColor = mix(selectedInnerBorderColor, finalColor, nodeAlpha);\n finalColor = mix(selectedBorderColor, finalColor, ringAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha2);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, max(ringAlpha, ringAlpha2)));\n }\n } else if (hovered > 0.0) {\n if (drawDefaultBorder > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(defaultBoderSize, dist);\n \n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalColor = mix(shadowColor, finalColor, borderAlpha);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, ringAlpha));\n } else {\n lowp float shadowAlpha = getShadowAlpha(circleSize, dist);\n\n finalColor = mix(shadowColor, finalColor, nodeAlpha);\n finalAlpha = max(shadowAlpha, nodeAlpha);\n }\n } else {\n if (drawDefaultBorder > 0.0) {\n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalAlpha = borderAlpha;\n }\n }\n gl_FragColor = vec4(finalColor, 1.0) * finalAlpha;\n }\n}\n"),this.nodeAnimShader=new c_(t,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform lowp float u_animPos;\nuniform mediump float u_zoom;\nuniform mediump float u_glAdjust;\n\nattribute float a_size;\nattribute lowp vec2 a_index;\nattribute lowp vec4 a_color;\nattribute lowp float a_active;\n\nvarying lowp float varNodeSize;\nvarying lowp vec4 color;\n\nvoid main(void) {\n vec4 data = texture2D(u_positions, a_index);\n\n gl_Position = u_projection * vec4(data.xy, 0.0, 1.0);\n\n float nodeSize = a_size * u_zoom * u_glAdjust;\n nodeSize = nodeSize * (0.4 / 0.5); // Remove extra space added for shadow and selection ring\n\n gl_PointSize = a_active > 0.5\n ? nodeSize + 0.88 * nodeSize * u_animPos\n : 0.0;\n\n color = a_color;\n varNodeSize = a_size;\n}","uniform mediump float u_zoom;\nuniform lowp float u_animPos;\nuniform mediump float u_glAdjust;\n\nvarying lowp vec4 color;\nvarying lowp float varNodeSize;\nmediump float circleSize = 0.50;\n\nvoid main(void) {\n\n lowp float dist = distance(gl_PointCoord, vec2(0.5));\n\n if (dist > 0.51) {\n discard;\n }\n else {\n lowp float alpha = 1.0 - smoothstep(circleSize - (1.0 / (varNodeSize * 2.0 * u_zoom * u_glAdjust)), circleSize, dist);\n lowp float pulseAlpha = 0.9 - 0.9 * u_animPos;\n gl_FragColor = vec4(color.xyz, 1.0) * alpha * pulseAlpha;\n }\n}\n"),this.relShader=new c_(t,"uniform mat4 u_projection;\nuniform sampler2D u_positions;\nuniform mediump float u_glAdjust;\n\nattribute vec2 a_from;\nattribute vec2 a_to;\nattribute lowp vec4 a_color;\nattribute lowp float a_triside;\nattribute float a_width;\n\nvarying lowp vec4 color;\n\nvoid main(void) {\n vec4 from = texture2D(u_positions, a_from);\n vec4 to = texture2D(u_positions, a_to);\n vec2 direction = normalize(to.xy - from.xy);\n direction = vec2(-direction.y, direction.x);\n\n float width = a_width * u_glAdjust * 0.5;\n\n if (a_triside == 0.0) {\n from.y += (width / 2.0) * direction.y;\n from.x += (width / 2.0) * direction.x;\n } else {\n from.y -= (width / 2.0) * direction.y;\n from.x -= (width / 2.0) * direction.x;\n }\n\n color = a_color;\n gl_Position = u_projection * vec4(from.xy, 0.0, 1.0);\n}\n","varying lowp vec4 color;\n\nvoid main(void) {\n gl_FragColor = vec4(color.xyz, 1.0) * color.w;\n}\n"),this.viewportBoxShader=new c_(t,"\nattribute vec2 coordinates;\nuniform mat4 u_projection;\nuniform lowp vec4 u_minimapViewportBoxColor;\n\nvarying lowp vec4 minimapViewportBoxColor;\n\nvoid main(void) {\n gl_Position = u_projection * vec4(coordinates, 0.0, 1.0);\n minimapViewportBoxColor = u_minimapViewportBoxColor;\n}\n","\nvarying lowp vec4 minimapViewportBoxColor;\n\nvoid main(void) {\n gl_FragColor = minimapViewportBoxColor;\n}\n"),this.setShaderUniforms(o),t.clearColor(0,0,0,0),t.disable(t.DEPTH_TEST),this.defaultRelColor=o.defaultRelationshipColor,this.defaultNodeColor=o.defaultNodeColor,this.disableRelColor=o.disabledItemStyles.color,this.disableNodeColor=o.disabledItemStyles.color,t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.gl=t,this.activeNodes={},this.canvas=t.canvas,this.projection=r_(),this.setData({nodes:n.items,rels:r.items}),this.createPositionTexture(),this.setupViewportRendering(o.minimapViewportBoxColor)},t=[{key:"setShaderUniforms",value:function(e){var t,n,r,o,i,a=e.nodeBorderStyles,s=null;(null===(t=a.default)||void 0===t?void 0:t.rings.length)>0&&(s=null===(i=a.default.rings[0])||void 0===i?void 0:i.color);var u,l,c=null,f=null,h=null!==(n=null===(r=a.selected)||void 0===r?void 0:r.rings)&&void 0!==n?n:[],d=h.length;d>1&&(f=null===(u=h[d-2])||void 0===u?void 0:u.color,c=null===(l=h[d-1])||void 0===l?void 0:l.color);var p=null;null!==(o=a.selected)&&void 0!==o&&o.shadow&&(p=a.selected.shadow.color),this.nodeShader.use(),(0,Mp.isNil)(s)?this.nodeShader.setUniform("u_drawDefaultBorder",0):(this.nodeShader.setUniform("u_nodeBorderColor",Kx(s)),this.nodeShader.setUniform("u_drawDefaultBorder",1));var v=Kx(c),g=Kx(f),y=Kx(p);this.nodeShader.setUniform("u_selectedBorderColor",v),this.nodeShader.setUniform("u_selectedInnerBorderColor",g),this.nodeShader.setUniform("u_shadowColor",y)}},{key:"setData",value:function(e){var t=cb(e.rels,this.disableRelColor);this.setupNodeRendering(e.nodes),this.setupRelationshipRendering(t)}},{key:"render",value:function(e,t,n){var r,o=this.gl,i=this.idToIndex,a=RO(e);try{for(a.s();!(r=a.n()).done;){var s=r.value,u=i[s.id];this.posBuffer[4*u+0]=s.x,this.posBuffer[4*u+1]=s.y}}catch(e){a.e(e)}finally{a.f()}o.bindTexture(o.TEXTURE_2D,this.posTexture),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,Ym,Ym,0,o.RGBA,o.FLOAT,this.posBuffer),o.enable(o.BLEND),o.bindFramebuffer(o.FRAMEBUFFER,null),o.clear(o.COLOR_BUFFER_BIT),o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),this.renderAnimations(this.posTexture),this.numRels>0&&(this.relShader.use(),this.relShader.setUniform("u_positions",this.posTexture),o.bindBuffer(o.ARRAY_BUFFER,this.relBuffer),this.relShader.setAttributePointerByteNorm("a_color",4,0,16),this.relShader.setAttributePointerByteNorm("a_from",2,4,16),this.relShader.setAttributePointerByteNorm("a_to",2,6,16),this.relShader.setAttributePointerByteNorm("a_triside",1,8,16),this.relShader.setAttributePointerFloat("a_width",1,12,16),o.drawArrays(o.TRIANGLES,0,6*this.numRels)),this.numNodes>0&&(this.nodeShader.use(),this.nodeShader.setUniform("u_positions",this.posTexture),o.bindBuffer(o.ARRAY_BUFFER,this.nodeBuffer),this.nodeShader.setAttributePointerByteNorm("a_color",4,0,12),this.nodeShader.setAttributePointerByteNorm("a_selected",1,4,12),this.nodeShader.setAttributePointerByteNorm("a_index",2,5,12),this.nodeShader.setAttributePointerByte("a_size",4,8,12),this.nodeShader.setAttributePointerByteNorm("a_hovered",1,9,12),o.drawArrays(o.POINTS,0,this.numNodes))}},{key:"renderViewbox",value:function(){var e=this.gl,t=this.projection,n=this.viewportBoxBuffer;this.viewportBoxShader.use(),this.viewportBoxShader.setUniform("u_projection",t),e.bindBuffer(e.ARRAY_BUFFER,n),this.viewportBoxShader.setAttributePointerFloat("coordinates",2,0,0),e.drawArrays(e.LINES,0,8)}},{key:"updateNodes",value:function(e){var t,n=this.gl,r=this.idToIndex,o=this.disableNodeColor,i=this.nodeBuffer,a=this.nodeDataByte,s=!1,u=RO(e);try{for(u.s();!(t=u.n()).done;){var l=t.value,c=r[l.id];if(!(0,Mp.isNil)(l.color)||!0===l.disabled){var f=qx(!0===l.disabled?o:l.color);this.nodeDataByte[3*c*4+0]=f[0],this.nodeDataByte[3*c*4+1]=f[1],this.nodeDataByte[3*c*4+2]=f[2],this.nodeDataByte[3*c*4+3]=255*f[3],s=!0}if(void 0!==l.selected){var h=l.selected;this.nodeDataByte[3*c*4+4]=h?255:0,s=!0}if(void 0!==l.activated&&(this.nodeDataByte[3*c*4+7]=l.activated?255:0,s=!0,l.activated?this.activeNodes[l.id]=!0:delete this.activeNodes[l.id]),void 0!==l.hovered){var d=!0!==l.disabled&&l.hovered;this.nodeDataByte[3*c*4+9]=d?255:0,s=!0}if(void 0!==l.size){var p=l.size;this.nodeDataByte[3*c*4+8]=p||Xm,s=!0}}}catch(e){u.e(e)}finally{u.f()}s&&(n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,a,n.DYNAMIC_DRAW))}},{key:"updateRelationships",value:function(e){var t,n=cb(e,this.disableRelColor),r=this.gl,o=!1,i=RO(n);try{for(i.s();!(t=i.n()).done;){var a=t.value,s=a.key,u=a.width,l=a.color,c=a.disabled,f=this.relIdToIndex[s],h=(0,Mp.isNil)(l)?this.defaultRelColor:l,d=Xx(c?this.disableRelColor:h);this.relData.positionsAndColors[f*LO+0]=d,this.relData.positionsAndColors[f*LO+4]=d,this.relData.positionsAndColors[f*LO+8]=d,this.relData.positionsAndColors[f*LO+12]=d,this.relData.positionsAndColors[f*LO+16]=d,this.relData.positionsAndColors[f*LO+20]=d,o=!0,void 0!==u&&(this.relData.widths[f*LO+3]=u,this.relData.widths[f*LO+7]=u,this.relData.widths[f*LO+11]=u,this.relData.widths[f*LO+15]=u,this.relData.widths[f*LO+19]=u,this.relData.widths[f*LO+23]=u,o=!0)}}catch(e){i.e(e)}finally{i.f()}o&&(r.bindBuffer(r.ARRAY_BUFFER,this.relBuffer),r.bufferData(r.ARRAY_BUFFER,this.relDataBuffer,r.DYNAMIC_DRAW))}},{key:"createPositionTexture",value:function(){var e=this.gl,t=e.createTexture(),n=new Float32Array(262144);e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,Ym,Ym,0,e.RGBA,e.FLOAT,n),this.posTexture=t,this.posBuffer=n}},{key:"updateViewportBox",value:function(e,t,n,r,o){var i=this.gl,a=ob(),s=r*a,u=o*a,l=(.5*s+t*e)/e,c=(.5*u+n*e)/e,f=(.5*-s+t*e)/e,h=(.5*-u+n*e)/e,d=[l,c,f,c,f,c,f,h,f,h,l,h,l,h,l,c];i.bindBuffer(i.ARRAY_BUFFER,this.viewportBoxBuffer),i.bufferData(i.ARRAY_BUFFER,new Float32Array(d),i.DYNAMIC_DRAW)}},{key:"updateViewport",value:function(e,t,n){var r=this.gl,o=1/e,i=t-r.drawingBufferWidth*o*.5,a=n-r.drawingBufferHeight*o*.5,s=r.drawingBufferWidth*o,u=r.drawingBufferHeight*o,l=r_(),c=rb*ob();o_(l,i,i+s,a+u,a,0,1e6),this.nodeShader.use(),this.nodeShader.setUniform("u_zoom",e),this.nodeShader.setUniform("u_glAdjust",c),this.nodeShader.setUniform("u_projection",l),this.nodeAnimShader.use(),this.nodeAnimShader.setUniform("u_zoom",e),this.nodeAnimShader.setUniform("u_glAdjust",c),this.nodeAnimShader.setUniform("u_projection",l),this.relShader.use(),this.relShader.setUniform("u_glAdjust",c),this.relShader.setUniform("u_projection",l),this.projection=l}},{key:"setupViewportRendering",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tb;this.viewportBoxBuffer=this.gl.createBuffer(),this.viewportBoxShader.use(),this.viewportBoxShader.setUniform("u_minimapViewportBoxColor",[(e=qx(t))[0]/255,e[1]/255,e[2]/255,e[3]])}},{key:"setupNodeRendering",value:function(e){var t=this.gl,n=new ArrayBuffer(8),r=new Uint32Array(n),o=new Uint8Array(n);void 0===this.nodeBuffer&&(this.nodeBuffer=t.createBuffer()),this.numNodes=e.length;var i=new ArrayBuffer(3*e.length*8),a=new Uint32Array(i),s={};this.activeNodes={};for(var u=0;u=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function XO(e,t){if(e){if("string"==typeof e)return KO(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?KO(e,t):void 0}}function KO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},r=0;re[r].x&&(n.minX=e[r].x),n.minY>e[r].y&&(n.minY=e[r].y),n.maxX1&&(o=n/e),t>1&&(i=r/t),{zoomX:o,zoomY:i}},rS=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,o=Math.min(e,t);return Math.min(r,Math.max(n,o))},oS=function(e,t,n,r){return Math.max(Math.min(t,n),Math.min(e,r))},iS=function(e,t,n,r,o,i){var a=t;return function(e,t,n){return e1?(a=function(e,t){var n=function(e){var t=new Array(4).fill(e[0]);return e.forEach(function(e){t[0]=e.x0&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0,r=0;ri?.9*i/r:.9*r/i}(e,r),oS(o,i,Math.min(t,a),n)):oS(o,i,t,n)};function aS(e){return aS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aS(e)}function sS(e){var t=function(e){if("object"!=aS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=aS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aS(t)?t:t+""}var uS=function(){return e=function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,r=void 0,(n=sS(n="callbacks"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.callbacks={}},t=[{key:"register",value:function(e,t){this.isCallbackRegistered(e)||(this.callbacks[e]=[]),this.callbacks[e].push(t)}},{key:"isCallbackRegistered",value:function(e){return void 0!==this.callbacks[e]}},{key:"callIfRegistered",value:function(){var e,t=arguments,n=Array.prototype.slice.call(arguments)[0];e=n,em.includes(e)&&this.isCallbackRegistered(n)&&this.callbacks[n].slice(0).forEach(function(e){return e.apply(null,Array.prototype.slice.call(t,1))})}}],t&&function(e,t){for(var n=0;n0||n}},{key:"update",value:function(e,t){var n=this.state,r=n.fitNodeIds,o=n.resetZoom;r.length>0?this.fitNodes(r,e,t):o&&this.reset(e,t)}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(e){return e()})}},{key:"recalculateTarget",value:function(e,t,n,r){for(var o=this.xCtrl,i=this.yCtrl,a=this.zoomCtrl,s=this.state,u=[],l=0;l3?(o=p===r)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=n<2&&dr||r>p)&&(i[4]=n,i[5]=r,h.n=p,s=0))}if(o||n>1)return a;throw f=!0,r}return function(o,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(h.n=-1),d(s,u)):h.n=u:h.v=u);try{if(l=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(mS(t={},r,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,mS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,mS(f,"constructor",l),mS(l,"constructor",u),u.displayName="GeneratorFunction",mS(l,o,"GeneratorFunction"),mS(f),mS(f,o,"Generator"),mS(f,r,function(){return this}),mS(f,"toString",function(){return"[object Generator]"}),(yS=function(){return{w:i,m:h}})()}function mS(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}mS=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){mS(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},mS(e,t,n,r)}function bS(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function _S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:"default"])&&void 0!==e?e:Object.values(kS).pop()},RS=function(){return e=function e(t,n,r){var o,i,a,s=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ES(this,"destroyed",void 0),ES(this,"state",void 0),ES(this,"callbacks",void 0),ES(this,"instanceId",void 0),ES(this,"glController",void 0),ES(this,"webGLContext",void 0),ES(this,"webGLMinimapContext",void 0),ES(this,"htmlOverlay",void 0),ES(this,"hasResized",void 0),ES(this,"hierarchicalLayout",void 0),ES(this,"gridLayout",void 0),ES(this,"freeLayout",void 0),ES(this,"d3ForceLayout",void 0),ES(this,"forceLayout",void 0),ES(this,"canvasRenderer",void 0),ES(this,"glCanvas",void 0),ES(this,"canvasRect",void 0),ES(this,"glMinimapCanvas",void 0),ES(this,"c2dCanvas",void 0),ES(this,"isInRenderSwitchAnimation",void 0),ES(this,"justSwitchedRenderer",void 0),ES(this,"justSwitchedLayout",void 0),ES(this,"layoutUpdating",void 0),ES(this,"layoutComputing",void 0),ES(this,"isRenderingDisabled",void 0),ES(this,"setRenderSwitchAnimation",void 0),ES(this,"stateDisposers",void 0),ES(this,"zoomTransitionHandler",void 0),ES(this,"currentLayout",void 0),ES(this,"layoutTimeLimit",void 0),ES(this,"pixelRatio",void 0),ES(this,"removeResizeListener",void 0),ES(this,"removeMinimapResizeListener",void 0),ES(this,"pendingZoomOperation",void 0),ES(this,"layoutRunner",void 0),ES(this,"animationRequestId",void 0),ES(this,"layoutDoneCallback",void 0),ES(this,"layoutComputingCallback",void 0),ES(this,"currentLayoutType",void 0),ES(this,"descriptionElement",void 0),this.destroyed=!1;var u=r.minimapContainer,l=void 0===u?document.createElement("span"):u,c=r.layoutOptions,f=r.layout,h=r.instanceId,d=void 0===h?"default":h,p=r.disableAria,v=void 0!==p&&p,g=t.nodes,y=t.rels,m=t.webGLVisible,b=t.disableWebGL;this.state=t,this.callbacks=new uS,this.instanceId=d;var _=n;_.setAttribute("instanceId",d),_.setAttribute("data-testid","nvl-parent"),null!==(o=_.style.height)&&void 0!==o&&o.length||Object.assign(_.style,{height:"100%"}),null!==(i=_.style.outline)&&void 0!==i&&i.length||Object.assign(_.style,{outline:"none"}),this.descriptionElement=v?document.createElement("div"):function(e,t){var n;e.setAttribute("role","img"),e.setAttribute("aria-label","Graph visualization");var r="nvl-".concat(t,"-description"),o=null!==(n=document.getElementById(r))&&void 0!==n?n:document.createElement("div");return o.innerHTML="",o.id="nvl-".concat(t,"-description"),o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),o.setAttribute("aria-atomic","false"),o.style.display="none",e.appendChild(o),e.setAttribute("aria-describedby",o.id),o}(_,d);var w=VO(_,this.onWebGLContextLost.bind(this)),x=VO(l,this.onWebGLContextLost.bind(this));if(w.setAttribute("data-testid","nvl-gl-canvas"),b)this.glController=new kO;else{var E=GO(w),O=GO(x);this.glController=new AO({mainSceneRenderer:new BO(E,g,y,this.state),minimapRenderer:new BO(O,g,y,this.state),state:t}),this.webGLContext=E,this.webGLMinimapContext=O}var S=VO(_,this.onWebGLContextLost.bind(this));S.setAttribute("data-testid","nvl-c2d-canvas");var T=S.getContext("2d"),P=document.createElement("div");Object.assign(P.style,xS(xS({},nb),{},{overflow:"hidden"})),_.appendChild(P),this.htmlOverlay=P,this.hasResized=!0,this.hierarchicalLayout=new Aw(xS(xS({},c),{},{state:this.state})),this.gridLayout=new iw({state:this.state}),this.freeLayout=new Z_({state:this.state}),this.d3ForceLayout=new Sb({state:this.state}),this.forceLayout=b?this.d3ForceLayout:new z_(xS(xS({},c),{},{webGLContext:this.webGLContext,state:this.state})),this.state.setLayout(f),this.state.setLayoutOptions(c);var C=new _O(S,T,t,r);this.canvasRenderer=C,this.glCanvas=w,this.canvasRect=w.getBoundingClientRect(),this.glMinimapCanvas=x,this.c2dCanvas=S,this.glCanvas.style.opacity=m?"1":"0",this.c2dCanvas.style.opacity=m?"0":"1",this.isInRenderSwitchAnimation=!1,this.justSwitchedRenderer=!1,this.justSwitchedLayout=!1,this.hasResized=!1,this.layoutUpdating=!1,this.layoutComputing=!1,this.isRenderingDisabled=!1,g.addChannel(SS),y.addChannel(SS),this.setRenderSwitchAnimation=function(){s.isInRenderSwitchAnimation=!1},this.stateDisposers=[],this.stateDisposers.push(t.autorun(function(){s.callIfRegistered("zoom",t.zoom)})),this.stateDisposers.push(t.autorun(function(){s.callIfRegistered("pan",{panX:t.panX,panY:t.panY})})),this.stateDisposers.push(t.autorun(function(){s.setLayout(t.layout)})),this.stateDisposers.push(t.autorun(function(){s.setLayoutOptions(t.layoutOptions)})),v||this.stateDisposers.push(t.autorun(function(){!function(e,t){var n=e.nodes,r=e.rels,o=e.layout,i=n.items.length,a=r.items.length;if(0!==i||0!==a){var s="".concat(i," node").concat(1!==i?"s":""),u="".concat(a," relationship").concat(1!==a?"s":""),l="displayed using a ".concat(null!=o?o:"forceDirected"," layout");t.innerHTML="A graph visualization with ".concat(s," and ").concat(u,", ").concat(l,".")}else t.innerHTML="An empty graph visualization."}(t,s.descriptionElement)})),this.stateDisposers.push(t.autorun(function(){var e=t.webGLVisible?"1":"0";e!==s.glCanvas.style.opacity&&(s.justSwitchedRenderer=!0,s.glCanvas.style.opacity=e,s.c2dCanvas.style.opacity=t.webGLVisible?"0":"1")})),this.startMainLoop(),this.zoomTransitionHandler=new vS({state:t,getNodePositions:function(e){return s.currentLayout.getNodePositions(e)},canvas:w}),this.layoutTimeLimit=null!==(a=r.layoutTimeLimit)&&void 0!==a?a:16,this.pixelRatio=ob(),this.removeResizeListener=rm()(_,function(){zO(w),zO(S),s.canvasRect=w.getBoundingClientRect(),s.hasResized=!0}),this.removeMinimapResizeListener=rm()(l,function(){zO(x)}),kS[d]=this,window.__Nvl_dumpNodes=function(e){var t;return null===(t=IS(e))||void 0===t?void 0:t.dumpNodes()},window.__Nvl_dumpRelationships=function(e){var t;return null===(t=IS(e))||void 0===t?void 0:t.dumpRelationships()},window.__Nvl_registerDoneCallback=function(e,t){var n;return null===(n=IS(t))||void 0===n?void 0:n.on(CS,e)},window.__Nvl_getNodesOnScreen=function(e){var t;return null===(t=IS(e))||void 0===t?void 0:t.getNodesOnScreen()},window.__Nvl_getZoomLevel=function(e){var t;return null===(t=IS(e))||void 0===t?void 0:t.getScale()},this.pendingZoomOperation=null},t=[{key:"onWebGLContextLost",value:function(e){this.callIfRegistered("onWebGLContextLost",e)}},{key:"updateMinimapZoom",value:function(){var e=this.state,t=e.nodes,n=e.maxNodeRadius,r=e.maxMinimapZoom,o=e.minMinimapZoom,i=tS(Object.values(t.idToPosition),n),a=i.centerX,s=i.centerY,u=i.nodesWidth,l=i.nodesHeight,c=nS(u,l,this.glMinimapCanvas.width,this.glMinimapCanvas.height),f=c.zoomX,h=c.zoomY,d=rS(f,h,o,r);this.state.updateMinimapZoomToFit(d,a,s)}},{key:"startMainLoop",value:function(){var e=this,t=this.state,n=t.nodes,r=t.rels;this.currentLayout.update();var o=this.currentLayout.getNodePositions(n.items);n.updatePositions(o),this.isRenderingDisabled||(this.glController.renderMainScene(o),this.glController.renderMinimap(o),this.canvasRenderer.processUpdates(),this.canvasRenderer.render(o)),this.layoutRunner=setInterval(function(){try{!function(){var t=e.currentLayout.getShouldUpdate(),n=t||e.justSwitchedLayout,r=n&&!e.layoutUpdating&&!e.justSwitchedLayout;if(n)for(var o=window.performance.now(),i=r?0:50,a=0;ae.layoutTimeLimit)break}}()}catch(t){if(!e.callbacks.isCallbackRegistered(PS))throw t;e.callIfRegistered(PS,t)}},13);var i=function(){try{!function(t){if(e.destroyed)Cb.info("STEP IN A DESTROYED STRIP");else{var o=ob();if(o!==e.pixelRatio)return e.pixelRatio=o,void e.callIfRegistered("restart");var i=e.currentLayout.getShouldUpdate(),a=i||e.justSwitchedLayout,s=e.currentLayout.getComputing(),u=e.zoomTransitionHandler.needsToRun(),l=a&&!e.layoutUpdating&&!e.justSwitchedLayout,c=e.layoutComputing&&!s,f=e.state.webGLVisible&&e.glController.needsToRun(),h=!e.state.webGLVisible&&e.canvasRenderer.needsToRun(),d=e.isInRenderSwitchAnimation||e.justSwitchedRenderer,p=e.hasResized,v=null!==e.pendingZoomOperation,g=e.glController.minimapMouseDown;if(n.clearChannel(SS),r.clearChannel(SS),u||a||c||d||f||h||g||p||v){!v||l||e.currentLayout.getComputing()||(e.pendingZoomOperation(),e.pendingZoomOperation=null);var y=i||s||c;e.zoomTransitionHandler.update(y,function(){return e.callIfRegistered("onZoomTransitionDone")}),p&&e.glController.onResize();var m=e.currentLayout.getNodePositions(n.items);if(n.updatePositions(m),e.callbacks.isCallbackRegistered(AS)&&e.callIfRegistered(AS,e.dumpNodes()),e.updateMinimapZoom(),e.glController.renderMinimap(m),!e.isRenderingDisabled){if((e.state.webGLVisible||d)&&e.glController.renderMainScene(m),!e.state.webGLVisible||d){e.canvasRenderer.processUpdates(),e.canvasRenderer.render(m);for(var b=0;b5&&!e.state.webGLVisible;Object.assign(x.style,{top:"".concat(k,"px"),left:"".concat(A,"px"),width:"".concat(T,"px"),height:"".concat(P,"px"),display:I?"block":"none",transform:"translate(-50%, -50%) scale(".concat(Number(e.state.zoom),") rotate(").concat(O,"rad")})}}}for(var R=0;R=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(t);try{for(o.s();!(e=o.n()).done;){var i=e.value,a=n[i.id],s=this.mapCanvasSpaceToRelativePosition(a.x,a.y);r.push(xS(xS({},i),{},{x:s.x,y:s.y}))}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"dumpRelationships",value:function(){return Yy(this.state.rels.items)}},{key:"mapCanvasSpaceToRelativePosition",value:function(e,t){var n=this.canvasRect,r=window.devicePixelRatio||1,o=(e-this.state.panX)*this.state.zoom/r,i=(t-this.state.panY)*this.state.zoom/r;return{x:o+.5*n.width,y:i+.5*n.height}}},{key:"mapRelativePositionToCanvasSpace",value:function(e,t){var n=this.glCanvas.getBoundingClientRect(),r=window.devicePixelRatio||1,o=r*(e-.5*n.width),i=r*(t-.5*n.height);return{x:this.state.panX+o/this.state.zoom,y:this.state.panY+i/this.state.zoom}}},{key:"getNodePositions",value:function(){return Object.values(Yy(this.state.nodes.idToPosition))}},{key:"setNodePositions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[],o=e.filter(function(e){var n=e.id,o=void 0!==t.state.nodes.idToItem[n];return o||r.push(n),o});r.length>0&&Cb.warn("Failed to set positions for following nodes:",r,"They do not exist in the graph."),this.state.nodes.updatePositions(o),this.currentLayout.updateNodes(o),n||this.currentLayout.terminateUpdate(),this.hasResized=!0,0===this.getNodesOnScreen().nodes.length&&this.state.setPan(0,0),this.state.clearFit()}},{key:"isLayoutMoving",value:function(){return this.layoutUpdating}},{key:"getNodesOnScreen",value:function(){var e=this.glCanvas.getBoundingClientRect(),t=this.mapRelativePositionToCanvasSpace(0,0),n=t.x,r=t.y,o=this.mapRelativePositionToCanvasSpace(e.width,e.height);return function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:["node"],a=o.nodes,s=o.rels,u=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),f=Math.max(t,r),h=[],d=[];if(i.includes("node"))for(var p=0,v=Object.values(a.idToPosition);pu&&yc&&mu&&O.xc&&O.yu&&S.xc&&S.y1&&void 0!==arguments[1]?arguments[1]:0;return this.canvasRenderer.getNodesAt(e,t)}},{key:"getLayout",value:function(e){return e===sw?this.hierarchicalLayout:"forceDirected"===e?this.forceLayout:"grid"===e?this.gridLayout:e===uw?this.freeLayout:"d3Force"===e?this.d3ForceLayout:this.forceLayout}},{key:"setLayout",value:function(e){Cb.info("Switching to layout: ".concat(e));var t=this.currentLayoutType,n=this.getLayout(e);"free"===e&&n.setNodePositions(this.state.nodes.idToPosition),this.currentLayout=n,this.currentLayoutType=e,t&&t!==this.currentLayoutType&&(this.justSwitchedLayout=!0)}},{key:"setLayoutOptions",value:function(e){this.getLayout(this.state.layout).setOptions(e)}},{key:"getDataUrlForCanvas",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.toDataURL("image/png");return t?n.replace(/^data:image\/png/,"data:application/octet-stream"):n}},{key:"initiateFileDownload",value:function(e,t){var n=document.createElement("a");n.style.display="none",n.setAttribute("download",e);var r=this.getDataUrlForCanvas(t,!0);n.setAttribute("href",r),n.click()}},{key:"updateLayoutAndPositions",value:function(){var e=this.state.nodes,t=e.items;this.currentLayout.update(this.justSwitchedLayout),this.justSwitchedLayout=!1;var n=this.currentLayout.getNodePositions(t);return e.updatePositions(n),n}},{key:"saveToFile",value:function(e){var t=xS(xS({},TS),e),n=this.createCanvasAndRenderImage(this.c2dCanvas.width,this.c2dCanvas.height,t.backgroundColor);this.initiateFileDownload(t.filename,n),WO(n),n=null}},{key:"getImageDataURL",value:function(e){var t=xS(xS({},TS),e),n=this.createCanvasAndRenderImage(this.c2dCanvas.width,this.c2dCanvas.height,t.backgroundColor),r=this.getDataUrlForCanvas(n);return WO(n),n=null,r}},{key:"prepareLargeFileForDownload",value:function(e){var t=this,n=xS(xS({},TS),e),r=this.currentLayout.getNodePositions(this.state.nodes.items),o=tS(r,100),i=o.nodesWidth,a=o.nodesHeight,s=o.centerX,u=o.centerY,l=Math.max(Math.min(i+100,15e3),5e3),c=Math.max(Math.min(a+100,15e3),5e3);return this.isRenderingDisabled=!0,new Promise(function(e,r){try{t.setPanCoordinates(s,u);var o=Math.max(l/i-.02,t.state.minZoom),f=Math.max(c/a-.02,t.state.minZoom);t.setZoomLevel(Math.min(o,f))}catch(e){return Cb.error("An error occurred while downloading the file"),void r(new Error("An error occurred while downloading the file",{cause:e}))}setTimeout(function(){try{var o=t.createCanvasAndRenderImage(l,c,n.backgroundColor);t.initiateFileDownload(n.filename,o),WO(o),o=null,e(!0)}catch(e){r(new Error("An error occurred while downloading the file",{cause:e}))}},500)})}},{key:"createCanvasAndRenderImage",value:function(e,t,n){var r=function(e,t){var n=document.createElement("canvas");return document.body.appendChild(n),FO(n,e,t),n}(e,t),o=function(e){return e.getContext("2d")}(r),i=this.updateLayoutAndPositions();return this.canvasRenderer.processUpdates(),this.canvasRenderer.render(i,{canvas:r,context:o,backgroundColor:n,ignoreAnimations:!0,showCaptions:!0}),r}},{key:"saveFullGraphToLargeFile",value:(n=yS().m(function e(t){var n,r,o,i,a;return yS().w(function(e){for(;;)switch(e.n){case 0:return n=xS(xS({},TS),t),r=this.state.zoom,o=this.state.panX,i=this.state.panY,e.p=1,e.n=2,this.prepareLargeFileForDownload(n);case 2:e.n=5;break;case 3:if(e.p=3,a=e.v,Cb.error("An error occurred while downloading the image"),!this.callbacks.isCallbackRegistered(PS)){e.n=4;break}this.callIfRegistered(PS,a),e.n=5;break;case 4:throw a;case 5:return e.p=5,this.isRenderingDisabled=!1,this.setZoomLevel(r),this.setPanCoordinates(o,i),e.f(5);case 6:return e.a(2)}},e,this,[[1,3,5,6]])}),r=function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){bS(i,r,o,a,s,"next",e)}function s(e){bS(i,r,o,a,s,"throw",e)}a(void 0)})},function(e){return r.apply(this,arguments)})}],t&&function(e,t){for(var n=0;n0;for(var n in t?(e="".concat(e,"\t Children: ").concat(this.noOfChildren()),console.groupCollapsed(e)):console.log(e),this.children)this.children[n].print();t&&console.groupEnd()}},{key:"noOfChildren",value:function(){return this.children.length}},{key:"_percentageOfParentSpent",value:function(){return Math.round(this.data._timeSpent()/this.parent.data._timeSpent()*100)}}]),FS=DS(function e(t){MS(this,e),this.name=t,this.startTime=performance.now(),this.endTime=null},[{key:"close",value:function(){this.endTime=performance.now()}},{key:"_timeSpent",value:function(){if(null===this.startTime||null===this.endTime)throw new Error("You have an error in your performance measurements that makes the whole tree unreliable. You probably forgot to call performanceTestEnd on ".concat(this.name));return this.endTime-this.startTime}}]),US=DS(function e(){MS(this,e),this.root=new BS(new FS("Performance Tree"),null),this.current=this.root},[{key:"clear",value:function(){this.root.children=[],this.current=this.root}},{key:"add",value:function(e){if(this.current){var t=new BS(e,this.current);this.current.addChild(t),this.current=t}else{if(this.root)throw new Error("Performance tree is screwed up");this.root=new BS(e,null),this.current=this.root}}},{key:"close",value:function(){if(this.current.isRoot())throw new Error("Tried to close performance tree root. You probably have one too many Performance.endTest() in your code.");this.current.data.close(),this.current=this.current.parent}},{key:"getCurrentData",value:function(){return this.current.data}},{key:"print",value:function(){this.root.noOfChildren()>0&&this.root.print()}}]),zS=DS(function e(){MS(this,e),window.performance?(this.disabled=!1,this.tree=new US):(this.disabled=!0,this.tree=null)},[{key:"startTest",value:function(e){if(!this.disabled){var t,n=e||(t="at"===(t=(new Error).stack.split("\n")[3].trim()).split(" ")[0]?t.split(" ")[1]:t.split("@")[0]),r=new FS(n);this.tree.add(r)}}},{key:"endTest",value:function(){this.disabled||this.tree.close()}},{key:"reset",value:function(){this.disabled||this.tree.clear()}},{key:"print",value:function(){this.disabled||this.tree.print()}}]);function VS(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return WS(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?WS(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function WS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0},aT=jp(1187);function sT(e){return sT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sT(e)}function uT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lT(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{var t={};return jp.d(t,e),t})({AnalyticsBrowser:()=>kp});var gT,yT=new Uint8Array(16);function mT(){if(!gT&&!(gT="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gT(yT)}const bT=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var _T=[],wT=0;wT<256;++wT)_T.push((wT+256).toString(16).substr(1));var xT,ET,OT=0,ST=0;const TT=function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||xT,a=void 0!==e.clockseq?e.clockseq:ET;if(null==i||null==a){var s=e.random||(e.rng||mT)();null==i&&(i=xT=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=ET=16383&(s[6]<<8|s[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:ST+1,c=u-OT+(l-ST)/1e4;if(c<0&&void 0===e.clockseq&&(a=a+1&16383),(c<0||u>OT)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");OT=u,ST=l,ET=a;var f=(1e4*(268435455&(u+=122192928e5))+l)%4294967296;o[r++]=f>>>24&255,o[r++]=f>>>16&255,o[r++]=f>>>8&255,o[r++]=255&f;var h=u/4294967296*1e4&268435455;o[r++]=h>>>8&255,o[r++]=255&h,o[r++]=h>>>24&15|16,o[r++]=h>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var d=0;d<6;++d)o[r+d]=i[d];return t||function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(_T[e[t+0]]+_T[e[t+1]]+_T[e[t+2]]+_T[e[t+3]]+"-"+_T[e[t+4]]+_T[e[t+5]]+"-"+_T[e[t+6]]+_T[e[t+7]]+"-"+_T[e[t+8]]+_T[e[t+9]]+"-"+_T[e[t+10]]+_T[e[t+11]]+_T[e[t+12]]+_T[e[t+13]]+_T[e[t+14]]+_T[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&bT.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n}(o)};function PT(e){return PT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PT(e)}function CT(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof s?r:s,l=Object.create(u.prototype);return AT(l,"_invoke",function(n,r,o){var i,s,u,l=0,c=o||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,s=0,u=e,h.n=n,a}};function d(n,r){for(s=n,u=r,t=0;!f&&l&&!o&&t3?(o=p===r)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=n<2&&dr||r>p)&&(i[4]=n,i[5]=r,h.n=p,s=0))}if(o||n>1)return a;throw f=!0,r}return function(o,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(h.n=-1),d(s,u)):h.n=u:h.v=u);try{if(l=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(AT(t={},r,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,AT(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,AT(f,"constructor",l),AT(l,"constructor",u),u.displayName="GeneratorFunction",AT(l,o,"GeneratorFunction"),AT(f),AT(f,o,"Generator"),AT(f,r,function(){return this}),AT(f,"toString",function(){return"[object Generator]"}),(CT=function(){return{w:i,m:h}})()}function AT(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}AT=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){AT(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},AT(e,t,n,r)}function kT(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function IT(e){var t=function(e){if("object"!=PT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=PT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==PT(t)?t:t+""}var RT=window.localStorage,jT="neo4j.nvl.sTid",MT=!1,NT=function(){return e=function e(){var t,n,r;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),t=this,r=void 0,(n=IT(n="analytics"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;var o=new vT.AnalyticsBrowser;this.analytics=o},t=[{key:"init",value:function(e){this.analytics.load({writeKey:e}),this.analytics.addSourceMiddleware(function(e){var t=e.payload,n=e.next,r=t.obj.context.page;void 0!==r&&(r.url="",r.title="",r.search="",r.referrer="",r.path=""),n(t)})}},{key:"trackEvent",value:(n=CT().m(function e(t){var n;return CT().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.ready();case 1:n="".concat(t.eventPrefix?t.eventPrefix:"NVL_core","-").concat(t.event),this.analytics.track(n,t.properties).catch(function(e){Cb.warn("TRACKING: Event tracking is failed. err: ".concat(e))});case 2:return e.a(2)}},e,this)}),r=function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){kT(i,r,o,a,s,"next",e)}function s(e){kT(i,r,o,a,s,"throw",e)}a(void 0)})},function(e){return r.apply(this,arguments)})},{key:"identify",value:function(){if(!MT){var e=this.getSegmentTrackingId();this.analytics.identify(e).catch(function(e){Cb.debug("TRACKING: Identifying user for Segment tracking failed. err: ".concat(e))}),MT=!0}}},{key:"loadSavedSegmentId",value:function(){try{var e=RT.getItem(jT);return"string"==typeof e?e:null}catch(e){return Cb.debug("TRACKING: Retrieving tracking Id failed. err: ".concat(e)),null}}},{key:"getSegmentTrackingId",value:function(){var e=this.loadSavedSegmentId(),t=null!=e?e:TT();return this.saveTrackingId(t),t}},{key:"saveTrackingId",value:function(e){RT.setItem(jT,e)}},{key:"ready",value:function(){return this.analytics.ready().catch(function(e){Cb.debug("TRACKING: segment track instance not ready. err: ".concat(e))})}}],t&&function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function BT(e,t){if(e){if("string"==typeof e)return FT(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?FT(e,t):void 0}}function FT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){WT(e,t),t.add(e)}(this,tP),GT(this,"performance",void 0),VT(this,KT,void 0),VT(this,ZT,void 0),VT(this,$T,void 0),VT(this,QT,void 0),VT(this,JT,void 0),VT(this,eP,void 0),o.disableTelemetry||(qT(eP,this,new NT),YT(eP,this).init("4SGwdwzuDm5WkFvQtz7D6ATQlo14yjmW"),YT(eP,this).identify()),XT(tP,this,oP).call(this,o),qT(KT,this,new tm(i)),this.performance=new zS,qT(QT,this,o),qT(JT,this,t),this.checkWebGLCompatibility(),XT(tP,this,rP).call(this,n,r,o)},t=[{key:"restart",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getNodePositions(),r=YT(ZT,this),o=r.zoom,i=r.layout,a=r.layoutOptions,s=r.nodes,u=r.rels;YT($T,this).destroy(),Object.assign(YT(QT,this),e),XT(tP,this,rP).call(this,s.items,u.items,YT(QT,this)),this.setZoom(o),this.setLayout(i),this.setLayoutOptions(a),this.addAndUpdateElementsInGraph(s.items,u.items),t&&this.setNodePositions(n)}},{key:"addAndUpdateElementsInGraph",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];XT(tP,this,sP).call(this,e),XT(tP,this,uP).call(this,t,e);var n={added:!1,updated:!1};YT(ZT,this).nodes.update(e,zT({},n)),YT(ZT,this).rels.update(t,zT({},n)),YT(ZT,this).nodes.add(e,zT({},n)),YT(ZT,this).rels.add(t,zT({},n)),YT(ZT,this).setGraphUpdated(),YT($T,this).updateHtmlOverlay()}},{key:"getSelectedNodes",value:function(){var e=this;return Yy(YT(ZT,this).nodes.items).filter(function(e){return e.selected}).map(function(t){return zT(zT({},t),YT(ZT,e).nodes.idToPosition[t.id])})}},{key:"getSelectedRelationships",value:function(){return Yy(YT(ZT,this).rels.items).filter(function(e){return e.selected})}},{key:"updateElementsInGraph",value:function(e,t){var n=this,r={added:!1,updated:!1},o=e.filter(function(e){return void 0!==YT(ZT,n).nodes.idToItem[e.id]}),i=t.filter(function(e){return void 0!==YT(ZT,n).rels.idToItem[e.id]});XT(tP,this,sP).call(this,o),XT(tP,this,uP).call(this,i,e),YT(ZT,this).nodes.update(o,zT({},r)),YT(ZT,this).rels.update(i,zT({},r)),YT($T,this).updateHtmlOverlay()}},{key:"addElementsToGraph",value:function(e,t){XT(tP,this,sP).call(this,e),XT(tP,this,uP).call(this,t,e);var n={added:!1,updated:!1};YT(ZT,this).nodes.add(e,zT({},n)),YT(ZT,this).rels.add(t,zT({},n)),YT($T,this).updateHtmlOverlay()}},{key:"removeNodesWithIds",value:function(e){if(Array.isArray(e)&&!(0,Mp.isEmpty)(e)){var t,n={},r=LT(e);try{for(r.s();!(t=r.n()).done;)n[t.value]=!0}catch(e){r.e(e)}finally{r.f()}var o,i=[],a=LT(YT(ZT,this).rels.items);try{for(a.s();!(o=a.n()).done;){var s=o.value;!0!==n[s.from]&&!0!==n[s.to]||i.push(s.id)}}catch(e){a.e(e)}finally{a.f()}i.length>0&&XT(tP,this,aP).call(this,i),XT(tP,this,iP).call(this,e),YT(ZT,this).setGraphUpdated(),YT($T,this).updateHtmlOverlay()}}},{key:"removeRelationshipsWithIds",value:function(e){Array.isArray(e)&&!(0,Mp.isEmpty)(e)&&(XT(tP,this,aP).call(this,e),YT(ZT,this).setGraphUpdated(),YT($T,this).updateHtmlOverlay())}},{key:"getNodes",value:function(){return YT($T,this).dumpNodes()}},{key:"getRelationships",value:function(){return YT($T,this).dumpRelationships()}},{key:"getNodeById",value:function(e){return YT(ZT,this).nodes.idToItem[e]}},{key:"getRelationshipById",value:function(e){return YT(ZT,this).rels.idToItem[e]}},{key:"getPositionById",value:function(e){return YT(ZT,this).nodes.idToPosition[e]}},{key:"getCurrentOptions",value:function(){return YT(QT,this)}},{key:"destroy",value:function(){YT($T,this).destroy()}},{key:"deselectAll",value:function(){this.updateElementsInGraph(YT(ZT,this).nodes.items.map(function(e){return zT(zT({},e),{},{selected:!1})}),YT(ZT,this).rels.items.map(function(e){return zT(zT({},e),{},{selected:!1})}))}},{key:"fit",value:function(e,t){YT($T,this).fit(e,t)}},{key:"resetZoom",value:function(){YT($T,this).resetZoom()}},{key:"setRenderer",value:function(e){YT($T,this).setRenderer(e)}},{key:"setDisableWebGL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];YT(QT,this).disableWebGL!==e&&(YT(QT,this).disableWebGL=e,this.restart())}},{key:"pinNode",value:function(e){YT(ZT,this).nodes.update([{id:e,pinned:!0}],{})}},{key:"unPinNode",value:function(e){YT(ZT,this).nodes.update(e.map(function(e){return{id:e,pinned:!1}}),{})}},{key:"setLayout",value:function(e){YT(ZT,this).setLayout(e)}},{key:"setLayoutOptions",value:function(e){YT(ZT,this).setLayoutOptions(e)}},{key:"getNodesOnScreen",value:function(){return YT($T,this).getNodesOnScreen()}},{key:"getNodePositions",value:function(){return YT($T,this).getNodePositions()}},{key:"setNodePositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];YT($T,this).setNodePositions(e,t)}},{key:"isLayoutMoving",value:function(){return YT($T,this).isLayoutMoving()}},{key:"saveToFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};YT($T,this).saveToFile(e)}},{key:"getImageDataUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return YT($T,this).getImageDataURL(e)}},{key:"saveFullGraphToLargeFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};YT($T,this).saveFullGraphToLargeFile(e)}},{key:"setZoom",value:function(e){YT($T,this).setZoomLevel(e)}},{key:"setPan",value:function(e,t){YT($T,this).setPanCoordinates(e,t)}},{key:"setZoomAndPan",value:function(e,t,n){YT($T,this).setZoomAndPan(e,t,n)}},{key:"getScale",value:function(){return YT($T,this).getScale()}},{key:"getPan",value:function(){return YT($T,this).getPan()}},{key:"getHits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["node","relationship"],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{hitNodeMarginWidth:0},r=YT(ZT,this),o=r.zoom,i=r.panX,a=r.panY,s=r.webGLVisible,u=wO(e,YT(JT,this),o,i,a),l=u.x,c=u.y,f=s?function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["node","relationship"],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=[],a=[],s=n.nodes,u=n.rels;return r.includes("node")&&i.push.apply(i,YO(function(e,t){var n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=[],a=qO(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]);try{var s=function(){var a,s=n.value,u=r[s.id];if(void 0===(null==u?void 0:u.x)||void 0===u.y)return 1;var l=(null!==(a=s.size)&&void 0!==a?a:Xm)*ob(),c={x:u.x-e,y:u.y-t},f=Math.pow(l,2),h=Math.pow(l+o,2),d=Math.pow(c.x,2)+Math.pow(c.y,2),p=Math.sqrt(d);if(dp});i.splice(-1!==v?v:i.length,0,{data:s,targetCoordinates:{x:u.x,y:u.y},pointerCoordinates:{x:e,y:t},distanceVector:c,distance:p,insideNode:d3&&void 0!==arguments[3]?arguments[3]:{},o=[],i={},a=qO(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]);try{var s=function(){var a=n.value,s=a.from,u=a.to;if(void 0===i["".concat(s,".").concat(u)]){var l=r[s],c=r[u];if(void 0===(null==l?void 0:l.x)||void 0===l.y)return 0;if(void 0===(null==c?void 0:c.x)||void 0===c.y)return 0;var f=pE({x:l.x,y:l.y},{x:c.x,y:c.y},{x:e,y:t});if(f<=ZO){var h=o.findIndex(function(e){return e.distance>f});o.splice(-1!==h?h:o.length,0,{data:a,fromTargetCoordinates:{x:l.x,y:l.y},toTargetCoordinates:{x:c.x,y:c.y},pointerCoordinates:{x:e,y:t},distance:f})}i["".concat(s,".").concat(u)]=1,i["".concat(u,".").concat(s)]=1}};for(a.s();!(n=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return o}(e,t,u.items,s.idToPosition))),{nodes:i,relationships:a}}(l,c,YT(ZT,this),t,n):function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["node","relationship"],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=[],a=[];return r.includes("node")&&i.push.apply(i,YO(n.getCanvasNodesAt({x:e,y:t},o.hitNodeMarginWidth))),r.includes("relationship")&&a.push.apply(a,YO(n.getCanvasRelsAt({x:e,y:t}))),{nodes:i,relationships:a}}(l,c,YT($T,this),t,n);return zT(zT({},e),{},{nvlTargets:f})}},{key:"getContainer",value:function(){return YT(JT,this)}},{key:"checkWebGLCompatibility",value:function(){var e=YT(QT,this).disableWebGL;if(void 0===e||!e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.createElement("canvas");try{return Boolean(void 0!==window.WebGLRenderingContext&&(null!==e.getContext("webgl")||null!==e.getContext("experimental-webgl")))}catch(e){return!1}}();if(!t){if(void 0!==e)throw new y_("Could not initialize WebGL");YT(QT,this).renderer=lw,Cb.warn("GPU acceleration is not available on your browser. Falling back to CPU layout and rendering. You can disable this warning by setting the disableWebGL option to true.")}void 0===e&&(YT(QT,this).disableWebGL=!t)}}}],t&&function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};qT(ZT,this,function(e){var t=e.minZoom,n=e.maxZoom,r=e.allowDynamicMinZoom,o=void 0===r||r,i=e.layout,a=e.layoutOptions,s=e.styling,u=void 0===s?{}:s,l=e.panX,c=void 0===l?0:l,f=e.panY,h=void 0===f?0:f,d=e.initialZoom,p=e.renderer,v=void 0===p?lw:p,g=e.disableWebGL,y=void 0!==g&&g,m=e.disableWebWorkers,b=void 0!==m&&m,_=e.disableTelemetry,w=void 0!==_&&_;Ev(!0),qy.isolateGlobalState();var x=(0,Mp.isNil)(t)?.075:t,E=(0,Mp.isNil)(n)?10:n,O=function(e){var t=e.nodeDefaultBorderColor,n=e.selectedBorderColor,r=e.disabledItemColor,o=e.disabledItemFontColor,i=e.selectedInnerBorderColor,a=e.dropShadowColor,s=e.defaultNodeColor,u=e.defaultRelationshipColor,l=e.minimapViewportBoxColor,c=rE({},Zx.default),f=rE({},Zx.selected),h=rE({},$x.selected),d={color:$m,fontColor:"#DDDDDD"},p=Zm,v=Km;return aE(i,function(e){f.rings[0].color=e,h.rings[0].color=e},"selectedInnerBorderColor"),aE(n,function(e){f.rings[1].color=e,h.rings[1].color=e},"selectedBorderColor"),aE(t,function(e){var t;c.rings=[{color:e,widthFactor:.025}],f.rings=[{color:e,widthFactor:.025}].concat(function(e){if(Array.isArray(e))return tE(e)}(t=f.rings)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return tE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tE(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())},"nodeDefaultBorderColor"),aE(a,function(e){f.shadow.color=e,h.shadow.color=e},"dropShadowColor"),aE(r,function(e){d.color=e},"disabledItemColor"),aE(o,function(e){d.fontColor=e},"disabledItemFontColor"),aE(s,function(e){v=e},"defaultNodeColor"),aE(u,function(e){p=e},"defaultRelationshipColor"),{nodeBorderStyles:{default:c,selected:f},relationshipBorderStyles:{default:$x.default,selected:h},disabledItemStyles:d,defaultNodeColor:v,defaultRelationshipColor:p,minimapViewportBoxColor:l||tb}}(u),S=O.nodeBorderStyles,T=O.relationshipBorderStyles,P=O.disabledItemStyles,C=O.defaultNodeColor,A=O.defaultRelationshipColor,k=O.minimapViewportBoxColor,I=vg({zoom:d||Qx,minimapZoom:Qx,defaultZoomLevel:Qx,panX:c,panY:h,minimapPanX:0,minimapPanY:0,fitNodeIds:[],resetZoom:!1,zoomOptions:Jx,forceWebGL:!1,renderer:v,disableWebGL:y,disableWebWorkers:b,disableTelemetry:w,fitMovement:0,layout:i,layoutOptions:a,maxDistance:0,maxNodeRadius:50,nodeBorderStyles:S,relationshipBorderStyles:T,disabledItemStyles:P,defaultNodeColor:C,defaultRelationshipColor:A,minimapViewportBoxColor:k,get minZoom(){return x},get maxZoom(){return E},get minMinimapZoom(){return 0},get maxMinimapZoom(){return.2},get webGLVisible(){var e=this.fitMovement>50;return"webgl"===this.renderer||e},nodes:eT(),rels:eT(),graphUpdates:0,waypoints:{data:vg.shallow({}),counter:0},setGraphUpdated:Rv(function(){this.graphUpdates+=1}),setRenderer:Rv(function(e){Rv(function(){this.graphUpdates+=1}),this.renderer=e}),setWaypoints:Rv(function(e){this.waypoints.data=e,this.waypoints.counter+=1}),setZoomPan:Rv(function(e,t,n,r){if(o){var i=Object.values(this.nodes.idToPosition),a=iS(i,x,E,r,e,this.zoom);a!==this.zoom&&(this.zoom=a,e===a&&(this.panX=t,this.panY=n))}else{var s=oS(e,this.zoom,x,E);s!==this.zoom&&(this.zoom=s,this.panX=t,this.panY=n)}this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1}),setZoom:Rv(function(e,t){if(o){var n=Object.values(this.nodes.idToPosition);this.zoom=iS(n,x,E,t,e,this.zoom)}else this.zoom=oS(e,this.zoom,x,E);this.fitNodeIds=[],this.fitMovement=0,this.resetZoom=!1,this.forceWebGL=!1}),setPan:Rv(function(e,t){this.panX=e,this.panY=t,this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1}),setLayout:Rv(function(e){this.layout=e}),setLayoutOptions:Rv(function(e){this.layoutOptions=e}),fitNodes:Rv(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.fitNodeIds=(0,Mp.intersection)(e,(0,Mp.map)(this.nodes.items,"id")),this.zoomOptions=rT(rT({},Jx),t)}),setZoomReset:Rv(function(){this.resetZoom=!0}),clearFit:Rv(function(){this.fitNodeIds=[],this.forceWebGL=!1,this.fitMovement=0,this.zoomOptions=Jx}),clearReset:Rv(function(){this.resetZoom=!1,this.fitMovement=0}),updateZoomToFit:Rv(function(e,t,n,r){var i;if(this.fitMovement=Math.abs(e-this.zoom)+Math.abs(t-this.panX)+Math.abs(n-this.panY),o){var a=Object.values(this.nodes.idToPosition);i=iS(a,x,E,r,e,this.zoom)}else i=oS(e,this.zoom,x,E);this.zoom=i,this.panX=t,this.panY=n}),updateMinimapZoomToFit:Rv(function(e,t,n){this.minimapZoom=e,this.minimapPanX=t,this.minimapPanY=n}),autorun:Wv,reaction:Gv});return I}(o)),o.minimapContainer instanceof HTMLElement||delete o.minimapContainer,qT($T,this,new RS(YT(ZT,this),YT(JT,this),o)),this.addAndUpdateElementsInGraph(n,r),YT($T,this).on("restart",this.restart.bind(this));var i,a,s=LT((i=YT(KT,this).callbacks,Object.entries(i)));try{var u=function(){var e,n=function(e){if(Array.isArray(e))return e}(e=a.value)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,u=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){u=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}(e)||BT(e,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];void 0!==o&&YT($T,t).on(r,function(){for(var e=arguments.length,n=new Array(e),r=0;r0}(e)});if(t){var n="";throw/^\d+$/.test(t.id)||(n=" Node ids need to be numeric strings. Strings that contain anything other than numbers are not yet supported."),new TypeError("Invalid node provided: ".concat(JSON.stringify(t),".").concat(n))}}function uP(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n="",r=null,o=YT(ZT,this),i=o.nodes,a=o.rels,s={},u=0;u{this.container?.addEventListener(e,t,n)};removeEventListener=(e,t,n)=>{this.container?.removeEventListener(e,t,n)};callCallbackIfRegistered=(e,...t)=>{const n=this.callbackMap.get(e);"function"==typeof n&&n(...t)};updateCallback=(e,t)=>{this.callbackMap.set(e,t)};removeCallback=e=>{this.callbackMap.delete(e)};toggleGlobalTextSelection=(e,t)=>{e?(document.body.style.removeProperty("user-select"),t&&document.body.removeEventListener("mouseup",t)):(document.body.style.setProperty("user-select","none","important"),t&&document.body.addEventListener("mouseup",t))}}class cP extends lP{mousePosition={x:0,y:0};mouseDownNode=null;isDragging=!1;isDrawing=!1;selectedNodes=[];moveSelectedNodes=!1;constructor(e,t={}){super(e,t),this.addEventListener("mousedown",this.handleMouseDown),this.addEventListener("mousemove",this.handleMouseMove)}handleMouseDown=e=>{this.mousePosition={x:e.clientX,y:e.clientY};const t=this.nvlInstance.getHits(e,["node"],{hitNodeMarginWidth:10}),n=t.nvlTargets.nodes.filter(e=>e.insideNode);t.nvlTargets.nodes.filter(e=>!e.insideNode).length>0?(this.isDrawing=!0,this.mouseDownNode=null,this.addEventListener("mouseup",this.resetState,{once:!0})):n.length>0?this.mouseDownNode=t.nvlTargets.nodes[0]??null:this.mouseDownNode=null,this.selectedNodes=this.nvlInstance.getSelectedNodes(),null!==this.mouseDownNode&&this.selectedNodes.map(e=>e.id).includes(this.mouseDownNode.data.id)?this.moveSelectedNodes=!0:this.moveSelectedNodes=!1};handleMouseMove=e=>{if(null===this.mouseDownNode||1!==e.buttons||this.isDrawing)return;if(!((e,t)=>{const n=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y);return n>10||r>10||Math.pow(n,2)+Math.pow(r,2)>10})(e,this.mousePosition))return;this.isDragging||(this.toggleGlobalTextSelection(!1,this.handleBodyMouseUp),this.moveSelectedNodes?this.callCallbackIfRegistered("onDragStart",this.selectedNodes,e):this.callCallbackIfRegistered("onDragStart",[this.mouseDownNode.data],e),this.isDragging=!0);const t=this.nvlInstance.getScale(),n=(e.clientX-this.mousePosition.x)/t*window.devicePixelRatio,r=(e.clientY-this.mousePosition.y)/t*window.devicePixelRatio;this.moveSelectedNodes?(this.nvlInstance.setNodePositions(this.selectedNodes.map(e=>({id:e.id,x:e.x+n,y:e.y+r,pinned:!0})),!0),this.callCallbackIfRegistered("onDrag",this.selectedNodes,e)):(this.nvlInstance.setNodePositions([{id:this.mouseDownNode.data.id,x:this.mouseDownNode.targetCoordinates.x+n,y:this.mouseDownNode.targetCoordinates.y+r,pinned:!0}],!0),this.callCallbackIfRegistered("onDrag",[this.mouseDownNode.data],e))};handleBodyMouseUp=e=>{this.toggleGlobalTextSelection(!0,this.handleBodyMouseUp),this.isDragging&&null!==this.mouseDownNode&&(this.moveSelectedNodes?this.callCallbackIfRegistered("onDragEnd",this.selectedNodes,e):this.callCallbackIfRegistered("onDragEnd",[this.mouseDownNode.data],e)),this.isDragging&&this.resetState()};resetState=()=>{this.isDragging=!1,this.mouseDownNode=null,this.isDrawing=!1,this.selectedNodes=[],this.moveSelectedNodes=!1};destroy=()=>{this.toggleGlobalTextSelection(!0,this.handleBodyMouseUp),this.removeEventListener("mousedown",this.handleMouseDown),this.removeEventListener("mousemove",this.handleMouseMove)}}class fP extends lP{currentHoveredElementId=void 0;currentHoveredElementIsNode=void 0;updates={nodes:[],relationships:[]};constructor(e,t={drawShadowOnHover:!1}){super(e,t),this.addEventListener("mousemove",this.handleHover,!0)}handleHover=e=>{const{nvlTargets:t}=this.nvlInstance.getHits(e),{nodes:n=[],relationships:r=[]}=t,o=n[0]??r[0],i=o?.data,a=void 0!==i&&void 0!==n[0],s=void 0===this.currentHoveredElementId&&void 0===i,u=void 0!==i?.id&&this.currentHoveredElementId===i.id&&a===this.currentHoveredElementIsNode;if(s||u)this.callCallbackIfRegistered("onHover",i,t,e);else{if(void 0!==this.currentHoveredElementId&&this.currentHoveredElementId!==i?.id&&this.unHoverCurrentElement(),a)this.updates.nodes.push({id:i.id,hovered:!0}),this.currentHoveredElementId=i.id,this.currentHoveredElementIsNode=!0;else if(void 0!==i){const{id:e}=i;this.updates.relationships.push({id:e,hovered:!0}),this.currentHoveredElementId=i.id,this.currentHoveredElementIsNode=!1}else this.currentHoveredElementId=void 0,this.currentHoveredElementIsNode=void 0;this.callCallbackIfRegistered("onHover",i,t,e),this.updateElementsInNVL(),this.clearUpdates()}};updateElementsInNVL(){!0===this.currentOptions.drawShadowOnHover&&this.nvlInstance.getNodes().length>0&&this.nvlInstance.updateElementsInGraph(this.updates.nodes,this.updates.relationships)}clearUpdates(){this.updates.nodes=[],this.updates.relationships=[]}unHoverCurrentElement(){if(void 0===this.currentHoveredElementId)return;const e={id:this.currentHoveredElementId,hovered:!1};!0===this.currentHoveredElementIsNode?this.updates.nodes.push(e):this.updates.relationships.push({...e})}destroy(){this.removeEventListener("mousemove",this.handleHover,!0)}}a(1582);var hP=a(2543);class dP extends lP{mousePosition={x:0,y:0};targets=[];shouldPan=!1;isPanning=!1;constructor(e,t={excludeNodeMargin:!1}){super(e,t),this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mousemove",this.handleMouseMove,!0),this.addEventListener("mouseup",this.handleMouseUp,!0)}updateTargets=(e,t)=>{this.targets=e,this.currentOptions.excludeNodeMargin=t};handleMouseDown=e=>{const t=this.nvlInstance.getHits(e,(0,hP.difference)(["node","relationship"],this.targets),{hitNodeMarginWidth:!0===this.currentOptions.excludeNodeMargin?10:0});t.nvlTargets.nodes.length>0||t.nvlTargets.relationships.length>0?this.shouldPan=!1:(this.mousePosition={x:e.clientX,y:e.clientY},this.shouldPan=!0)};handleMouseMove=e=>{if(!this.shouldPan||1!==e.buttons)return;this.isPanning||(this.toggleGlobalTextSelection(!1,this.handleMouseUp),this.isPanning=!0);const t=this.nvlInstance.getScale(),{x:n,y:r}=this.nvlInstance.getPan(),o=(e.clientX-this.mousePosition.x)/t*window.devicePixelRatio,i=(e.clientY-this.mousePosition.y)/t*window.devicePixelRatio;this.nvlInstance.setPan(n-o,r-i),this.callCallbackIfRegistered("onPan",{x:n-o,y:r-i},e),this.mousePosition={x:e.clientX,y:e.clientY}};handleMouseUp=()=>{this.isPanning&&(this.toggleGlobalTextSelection(!0,this.handleMouseUp),this.isPanning=!1),this.shouldPan=!1};destroy(){this.toggleGlobalTextSelection(!0,this.handleMouseUp),this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mousemove",this.handleMouseMove,!0),this.removeEventListener("mouseup",this.handleMouseUp,!0)}}class pP extends lP{constructor(e,t={}){super(e,t),this.addEventListener("wheel",this.handleWheel)}throttledZoom=(0,hP.throttle)(e=>{const t=this.nvlInstance.getScale(),{x:n,y:r}=this.nvlInstance.getPan(),o=e.deltaY/500,i=t-(t>=1?o*Math.pow(t,1):o)*Math.min(1,t),a=((e,t)=>{const n=e.getBoundingClientRect(),r=window.devicePixelRatio||1;return{x:(t.clientX-n.left-.5*n.width)*r,y:(t.clientY-n.top-.5*n.height)*r}})(this.containerInstance,e),s=n+(a.x/t-a.x/i),u=r+(a.y/t-a.y/i);this.nvlInstance.setZoomAndPan(i,s,u),this.callCallbackIfRegistered("onZoom",i,e)},25,{leading:!0});handleWheel=e=>{e.ctrlKey||e.metaKey||(e.preventDefault(),this.throttledZoom(e))};destroy=()=>{this.removeEventListener("wheel",this.handleWheel)}}class vP{nvl;zoomInteraction;panInteraction;dragNodeInteraction;hoverInteraction;constructor(e,t=null,n=[],r=[],o={},i={}){this.nvl=new nP(e,n,r,{...o,disableTelemetry:!0,disableWebWorkers:!0,disableAria:!0},i),this.zoomInteraction=new pP(this.nvl),this.panInteraction=new dP(this.nvl),this.dragNodeInteraction=new cP(this.nvl),null!==t&&(this.hoverInteraction=new fP(this.nvl),this.hoverInteraction.updateCallback("onHover",e=>{if(void 0===e)t.textContent="","block"===t.style.display&&(t.style.display="none");else if("from"in e){const n=e;let r=`Source ID: ${n.from}
Target ID: ${n.to}`;for(const[t,n]of Object.entries(e.properties))r+=`
${t}: ${n}`;t.setHTMLUnsafe(r),"none"===t.style.display&&(t.style.display="block")}else if("id"in e){let n=`ID: ${e.id}`;for(const[t,r]of Object.entries(e.properties))n+=`
${t}: ${r}`;t.setHTMLUnsafe(n),"none"===t.style.display&&(t.style.display="block")}})),o.layout===uw&&this.nvl.setNodePositions(n,!1)}}})(),NVLBase=s})(); \ No newline at end of file