From 12082a7447e71848481a0a3d81cfff0fb5d30561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Mon, 20 Jan 2025 18:12:42 +0100 Subject: [PATCH 1/2] Add COORDINATE layout we can use the node objects as long as they still have the x and y property. This might change in the future. --- js-applet/src/index.ts | 6 +++++- python-wrapper/src/neo4j_viz/options.py | 5 ++++- .../neo4j_viz/resources/nvl_entrypoint/base.js | 2 +- python-wrapper/tests/test_render.py | 15 ++++++++------- scripts/build_js_applet.sh | 11 +++++++++++ 5 files changed, 29 insertions(+), 10 deletions(-) create mode 100755 scripts/build_js_applet.sh diff --git a/js-applet/src/index.ts b/js-applet/src/index.ts index fae8574a..8eafff56 100644 --- a/js-applet/src/index.ts +++ b/js-applet/src/index.ts @@ -1,4 +1,4 @@ -import { NVL } from '@neo4j-nvl/base' +import { FreeLayoutType, NVL } from '@neo4j-nvl/base' import type { Node, NvlOptions, Relationship } from '@neo4j-nvl/base' import { DragNodeInteraction, PanInteraction, ZoomInteraction } from '@neo4j-nvl/interaction-handlers' @@ -22,6 +22,10 @@ class PyNVL { this.zoomInteraction = new ZoomInteraction(this.nvl) this.panInteraction = new PanInteraction(this.nvl) this.dragNodeInteraction = new DragNodeInteraction(this.nvl) + + if (options.layout === FreeLayoutType) { + this.nvl.setNodePositions(nvlNodes, false) + } } } diff --git a/python-wrapper/src/neo4j_viz/options.py b/python-wrapper/src/neo4j_viz/options.py index 55c0cfea..3d449dc0 100644 --- a/python-wrapper/src/neo4j_viz/options.py +++ b/python-wrapper/src/neo4j_viz/options.py @@ -17,7 +17,10 @@ class Layout(str, Enum): FORCE_DIRECTED = "forcedirected" HIERARCHICAL = "hierarchical" GRID = "grid" - # TODO expose free layout for X,Y based + COORDINATE = "free" + """" + The coordinate layout sets the position of each node based on the `x` and `y` properties of the node. + """ class Renderer(str, Enum): 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 9b937df0..a6cedb5d 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={8353:(e,t,n)=>{e.exports={graphlib:n(8362),layout:n(4267),debug:n(8294),util:{time:n(6718).time,notime:n(6718).notime},version:n(3353)}},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)}}))}}},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{"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))}}},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(", ")+"]"}},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}}},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)}},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),y=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 y({multigraph:!0,compound:!0}),n=T(e.graph());return t.setGraph(r.merge({},m,S(n,g),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({},O,S(o,x),r.pick(o,E)))})),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 g=["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"],O={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["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}},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)}))}}},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(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}}))}},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}}))}},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}},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{"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 y=i(e,s);y{"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}},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})))}},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 y=a(v,u);if(f&&(y.vs=r.flatten([f,y.vs,h],!0),t.predecessors(f).length)){var g=t.node(t.predecessors(f)[0]),m=t.node(t.predecessors(h)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+g.order+m.order)/(y.weight+2),y.weight+=2}return y}},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}},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{"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{"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}))}},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){"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},1581:(e,t,n)=>{"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);)g(n,e,t,y(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 y(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 g(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=y,c.exchangeEdges=g},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}}},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()}}},3353:e=>{e.exports="0.8.14"},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})},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}()},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{"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)}))}},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{"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})},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{"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{"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()}},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)},9839:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof window}function o(){return!r()}n.d(t,{B:()=>r,S:()=>o})},5770:(e,t,n)=>{"use strict";function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}n.d(t,{p:()=>r})},4568:(e,t,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)},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})},8167:(e,t,n)=>{"use strict";n.d(t,{r:()=>r});var r="1.76.0"},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{"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}},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}},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})},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))}),{})}},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)]}))}))}},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")}},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)},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}},1298:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var r="npm";function o(){return r}},5939:(e,t,n)=>{"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{"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}},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"}},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)},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")||{}}},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")},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{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/.+\@.+\..+/;t.default=function(e){return n.test(e)}},8822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Salesforce:!0};t.default=function(e){return!n[e]}},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)}},2542: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.Screen=void 0;var o=r(n(6698)),i=n(5525),a=n(3863);function s(e,t){i.Page.call(this,e,t)}t.Screen=s,o.default(s,i.Page),s.prototype.action=function(){return"screen"},s.prototype.type=s.prototype.action,s.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},s.prototype.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)}},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)}},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}},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)}},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}},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},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 y=u.pop(),m=y.node,b=g(m,t,n),_=g(m,r,i);if(y.dist=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function h(e,t,n){for(var r,o,i,a,s=Math.min(e[0],t[0]),u=Math.min(e[1],t[1]),l=Math.max(e[0],t[0]),c=Math.max(e[1],t[1]),f=n.search({minX:s,minY:u,maxX:l,maxY:c}),h=0;h0!=d(r,o,a)>0&&d(i,a,r)>0!=d(i,a,o)>0)return!1;return!0}function d(e,t,n){return a(e[0],e[1],t[0],t[1],n[0],n[1])}function p(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 v(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 g(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 m(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,y=e-o,g=t-i,m=h*h+d*d,b=h*p+d*v,_=p*p+v*v,w=h*y+d*g,x=p*y+v*g,O=m*_-b*b,E=O,S=O;0===O?(l=0,E=1,f=x,S=_):(f=m*x-b*w,(l=b*x-_*w)<0?(l=0,f=x,S=_):l>E&&(l=E,f=x+b,S=_)),f<0?(f=0,-w<0?l=0:-w>m?l=E:(l=-w,E=m)):f>S&&(f=S,-w+b<0?l=0:-w+b>m?l=E:(l=-w+b,E=m));var T=(1-(c=0===f?0:f/S))*o+c*a-((1-(u=0===l?0:l/E))*e+u*n),P=(1-c)*i+c*s-((1-u)*t+u*r);return T*T+P*P}function b(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},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=y.calculateBounds(e),i=new g;i.setDeviceOrgX(o.getMinX()),i.setDeviceOrgY(o.getMinY()),i.setWorldOrgX(n.x),i.setWorldOrgY(n.y);for(var a=0;a1;){var g=y[0];y.splice(0,1);var b=c.indexOf(g);b>=0&&c.splice(b,1),p--,f--}h=null!=t?(c.indexOf(y[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 O=(n+d*_)%360,E=(O+_)%360;m.branchRadialLayout(x,e,O,E,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;v0&&(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))},8362:(e,t,n)=>{var r=n(1166);e.exports={Graph:r.Graph,json:n(7494),alg:n(1667),version:r.version}},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}},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}},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)}),{})}},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)},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])}))}},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={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)}},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}},1045:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"post")}},6016:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"pre")}},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}},6291:(e,t,n)=>{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}},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},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{"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))}},1166:(e,t,n)=>{e.exports={Graph:n(6454),version:n(4458)}},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}}},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},4458:e=>{e.exports="2.1.8"},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}}},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 y=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=y.x-a,this.right=y.x+y.width+a,this.top=y.y-a,this.bottom=y.y+y.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]=g,n[3]=a,!1;if(ri?(n[0]=c,n[1]=f,O=!0):(n[0]=l,n[1]=u,O=!0):S===P&&(r>i?(n[0]=s,n[1]=u,O=!0):(n[0]=h,n[1]=f,O=!0)),-T===P?i>r?(n[2]=m,n[3]=b,E=!0):(n[2]=g,n[3]=y,E=!0):T===P&&(i>r?(n[2]=v,n[3]=y,E=!0):(n[2]=_,n[3]=b,E=!0)),O&&E)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)),!O)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(!E)switch(A){case 1:M=y,j=i+-x/P,n[2]=j,n[3]=M;break;case 2:j=_,M=a+w*P,n[2]=j,n[3]=M;break;case 3:M=b,j=i+x/P,n[2]=j,n[3]=M;break;case 4:j=m,M=a+-w*P,n[2]=j,n[3]=M}}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,y=n.x,g=n.y,m=o.x,b=o.y;return 0==(f=(i=v-d)*(u=y-m)-(a=b-g)*(s=h-p))?null:new r((s*(c=m*g-y*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{var r=n(6110)(n(9325),"DataView");e.exports=r},1549:(e,t,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{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(6110)(n(9325),"Map");e.exports=r},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(6110)(n(9325),"Promise");e.exports=r},6545:(e,t,n)=>{var r=n(6110)(n(9325),"Set");e.exports=r},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(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},1873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},7828:(e,t,n)=>{var r=n(9325).Uint8Array;e.exports=r},8303:(e,t,n)=>{var r=n(6110)(n(9325),"WeakMap");e.exports=r},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)}},3729:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n{var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},9905:e=>{e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r{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 y in e)!t&&!l.call(e,y)||d&&("length"==y||f&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,v))||p.push(y);return p}},4932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n{e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(7237)("length");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)}},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}},4733:(e,t,n)=>{var r=n(1791),o=n(5950);e.exports=function(e,t){return e&&r(t,o(t),e)}},3838:(e,t,n)=>{var r=n(1791),o=n(7241);e.exports=function(e,t){return e&&r(t,o(t),e)}},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}},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),y=n(7199),g=n(5529),m=n(6449),b=n(3656),_=n(7730),w=n(3805),x=n(8440),O=n(5950),E=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,j){var M,R=1&n,N=2&n,D=4&n;if(A&&(M=I?A(t,k,I,j):A(t)),void 0!==M)return M;if(!w(t))return t;var L=m(t);if(L){if(M=v(t),!R)return l(t,M)}else{var F=p(t),B=F==T||"[object GeneratorFunction]"==F;if(b(t))return u(t,R);if(F==P||F==S||B&&!I){if(M=N||B?{}:g(t),!R)return N?f(t,s(M,t)):c(t,a(M,t))}else{if(!C[F])return I?t:{};M=y(t,F,R)}}j||(j=new r);var U=j.get(t);if(U)return U;j.set(t,M),x(t)?t.forEach((function(r){M.add(e(r,n,A,r,t,j))})):_(t)&&t.forEach((function(r,o){M.set(o,e(r,n,A,o,t,j))}));var z=L?void 0:(D?N?d:h:N?E:O)(t);return o(z||t,(function(r,o){z&&(r=t[o=r]),i(M,o,e(r,n,A,o,t,j))})),M}},9344:(e,t,n)=>{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},909:(e,t,n)=>{var r=n(641),o=n(8329)(r);e.exports=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}},2523:e=>{e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i{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}},6649:(e,t,n)=>{var r=n(3221)();e.exports=r},641:(e,t,n)=>{var r=n(6649),o=n(5950);e.exports=function(e,t){return e&&r(e,t,o)}},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 r=n(4528),o=n(6449);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},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)}},426:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},6131:(e,t,n)=>{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)}},7534:(e,t,n)=>{var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},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))}},7068:(e,t,n)=>{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,y,g){var m=u(e),b=u(t),_=m?h:s(e),w=b?h:s(t),x=(_=_==f?d:_)==d,O=(w=w==f?d:w)==d,E=_==w;if(E&&l(e)){if(!l(t))return!1;m=!0,x=!1}if(E&&!x)return g||(g=new r),m||c(e)?o(e,t,n,v,y,g):i(e,t,_,n,v,y,g);if(!(1&n)){var S=x&&p.call(e,"__wrapped__"),T=O&&p.call(t,"__wrapped__");if(S||T){var P=S?e.value():e,C=T?t.value():t;return g||(g=new r),y(P,C,n,v,g)}}return!!E&&(g||(g=new r),a(e,t,n,v,y,g))}},9172:(e,t,n)=>{var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},1799:(e,t,n)=>{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{e.exports=function(e){return e!=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))}},6038:(e,t,n)=>{var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Set]"==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)]}},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)}},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}},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}},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}},3663:(e,t,n)=>{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)}}},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)}}},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,n)=>{var r=n(7422);e.exports=function(e){return function(t){return r(t,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}},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+"")}},9570:(e,t,n)=>{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},8096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++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}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},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{var r=n(4932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},9219:e=>{e.exports=function(e,t){return e.has(t)}},4066:(e,t,n)=>{var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},1769:(e,t,n)=>{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))}},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}},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}},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)}},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}},3736:(e,t,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)):{}}},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)}},3007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++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(1791),o=n(4664);e.exports=function(e,t){return r(e,o(e),t)}},8948:(e,t,n)=>{var r=n(1791),o=n(6375);e.exports=function(e,t){return r(e,o(e),t)}},5481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];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=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}}},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},3243:(e,t,n)=>{var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},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,y=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p{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 y=a(d(e),d(t),r,l,f,h);return h.delete(e),y;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},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 y=u;++f{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},2:(e,t,n)=>{var r=n(2199),o=n(4664),i=n(5950);e.exports=function(e){return r(e,i,o)}},3349:(e,t,n)=>{var r=n(2199),o=n(6375),i=n(7241);e.exports=function(e){return r(e,i,o)}},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}},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}},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}},8879:(e,t,n)=>{var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},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}},4664:(e,t,n)=>{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},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},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),y=l(o),g=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 y:return c;case g:return f;case m:return h;case b:return d}return t}),e.exports=_},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},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 t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},2032:(e,t,n)=>{var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,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}},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)}},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}},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}},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)}}},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))}},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])}},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{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)}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===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}},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},756:(e,t,n)=>{var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},80:(e,t,n)=>{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))}},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]}},8655:(e,t,n)=>{var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},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}},3040:(e,t,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}}},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}},289:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},4509:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},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}},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},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}},1042:(e,t,n)=>{var r=n(6110)(Object,"create");e.exports=r},3650:(e,t,n)=>{var r=n(4335)(Object.keys,Object);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}},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},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},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{var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},2865:(e,t,n)=>{var r=n(9570),o=n(1811)(r);e.exports=o},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)}}},1420:(e,t,n)=>{var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},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}},6959:e=>{e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r{var r=n(9811),o=n(9698),i=n(7927);e.exports=function(e){return o(e)?i(e):r(e)}},1802:(e,t,n)=>{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},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}},7473:e=>{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""}},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}},2629:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,4)}},7334:e=>{e.exports=function(e){return function(){return e}}},6135:(e,t,n)=>{e.exports=n(9754)},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},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))}},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))}},8156:(e,t,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}},1448:(e,t,n)=>{var r=n(426),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},631:(e,t,n)=>{var r=n(8077),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},3488:e=>{e.exports=function(e){return e}},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},6449:e=>{var t=Array.isArray;e.exports=t},4894:(e,t,n)=>{var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},3693:(e,t,n)=>{var r=n(4894),o=n(346);e.exports=function(e){return o(e)&&r(e)}},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},2193:(e,t,n)=>{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}},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}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},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},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},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},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)}},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)}},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},2216:e=>{e.exports=function(e){return void 0===e}},5950:(e,t,n)=>{var r=n(695),o=n(8984),i=n(4894);e.exports=function(e){return i(e)?r(e):o(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)}},2543: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]",y="[object Array]",g="[object Boolean]",m="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",x="[object Map]",O="[object Number]",E="[object Object]",S="[object Promise]",T="[object RegExp]",P="[object Set]",C="[object String]",A="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",j="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,H=RegExp(Y.source),X=RegExp(q.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\]$/,ye=/^0o[0-7]+$/i,ge=/^(?: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",Oe="\\u2700-\\u27bf",Ee="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+",je="["+Oe+"]",Me="["+Ee+"]",Re="[^"+we+Pe+Ie+Oe+Ee+Se+"]",Ne="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Se+"]",Ue="\\u200d",ze="(?:"+Me+"|"+Re+")",Ve="(?:"+Be+"|"+Re+")",Ge="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+ke+"|"+Ne+")?",qe="["+Te+"]?",He=qe+Ye+"(?:"+Ue+"(?:"+[De,Le,Fe].join("|")+")"+qe+Ye+")*",Xe="(?:"+[je,Le,Fe].join("|")+")"+He,Ke="(?:"+[De+ke+"?",ke,Le,Fe,Ce].join("|")+")",Ze=RegExp("['’]","g"),$e=RegExp(ke,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ke+He,"g"),Je=RegExp([Be+"?"+Me+"+"+Ge+"(?="+[Ae,Be,"$"].join("|")+")",Ve+"+"+We+"(?="+[Ae,Be+ze,"$"].join("|")+")",Be+"?"+ze+"+"+Ge,Be+"+"+We,"\\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[M]=ot[R]=ot[N]=ot[D]=ot[L]=ot[F]=ot[B]=ot[U]=ot[z]=!0,ot[v]=ot[y]=ot[I]=ot[g]=ot[j]=ot[m]=ot[b]=ot[_]=ot[x]=ot[O]=ot[E]=ot[T]=ot[P]=ot[C]=ot[k]=!1;var it={};it[v]=it[y]=it[I]=it[j]=it[g]=it[m]=it[M]=it[R]=it[N]=it[D]=it[L]=it[x]=it[O]=it[E]=it[T]=it[P]=it[C]=it[A]=it[F]=it[B]=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,yt=function(){try{return dt&&dt.require&&dt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),gt=yt&&yt.isArrayBuffer,mt=yt&&yt.isDate,bt=yt&&yt.isMap,_t=yt&&yt.isRegExp,wt=yt&&yt.isSet,xt=yt&&yt.isTypedArray;function Ot(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 Et(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--&&Bt(t,e[n],0)>-1;);return n}var en=Wt({À:"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=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});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,Oe=t.Math,Ee=t.Object,Se=t.RegExp,Te=t.String,Pe=t.TypeError,Ce=r.prototype,Ae=xe.prototype,ke=Ee.prototype,Ie=t["__core-js_shared__"],je=Ae.toString,Me=ke.hasOwnProperty,Re=0,Ne=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=ke.toString,Le=je.call(Ee),Fe=ft._,Be=Se("^"+je.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=pt?t.Buffer:o,ze=t.Symbol,Ve=t.Uint8Array,Ge=Ue?Ue.allocUnsafe:o,We=an(Ee.getPrototypeOf,Ee),Ye=Ee.create,qe=ke.propertyIsEnumerable,He=Ce.splice,Xe=ze?ze.isConcatSpreadable:o,Ke=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=li(Ee,"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=Oe.ceil,dt=Oe.floor,vt=Ee.getOwnPropertySymbols,yt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Wt=Ce.join,vn=an(Ee.keys,Ee),yn=Oe.max,gn=Oe.min,mn=oe.now,bn=t.parseInt,_n=Oe.random,wn=Ce.reverse,xn=li(t,"DataView"),On=li(t,"Map"),En=li(t,"Promise"),Sn=li(t,"Set"),Tn=li(t,"WeakMap"),Pn=li(Ee,"create"),Cn=Tn&&new Tn,An={},kn=Li(xn),In=Li(On),jn=Li(En),Mn=Li(Sn),Rn=Li(Tn),Nn=ze?ze.prototype:o,Dn=Nn?Nn.valueOf:o,Ln=Nn?Nn.toString:o;function Fn(e){if(es(e)&&!Ga(e)&&!(e instanceof Vn)){if(e instanceof zn)return e;if(Me.call(e,"__wrapped__"))return Fi(e)}return new zn(e)}var Bn=function(){function e(){}return function(t){if(!Ja(t))return{};if(Ye)return Ye(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 Gn(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=Ga(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.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(Ha(e))return wo(e,u);if(h==E||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 g:case m:return new o(+e);case j:return function(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case R:case N:case D:case L:case F:case B:case U:case z:return Oo(e,n);case x:return new o;case O: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?Ee(Dn.call(r)):{}}}(e,h,u)}}a||(a=new Hn);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 y=f?o:(c?l?ni:ti:l?Is:ks)(e);return St(y||e,(function(r,o){y&&(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=Ee(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 qn(t));e:for(;++o-1},Wn.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},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(On||Wn),string:new Gn}},Yn.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return si(this,e).get(e)},Yn.prototype.has=function(e){return si(this,e).has(e)},Yn.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},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,a),this},qn.prototype.has=function(e){return this.__data__.has(e)},Hn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Hn.prototype.get=function(e){return this.__data__.get(e)},Hn.prototype.has=function(e){return this.__data__.has(e)},Hn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yn(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):jt(o,s):r||(o[o.length]=s)}return o}var yr=jo(),gr=jo(!0);function mr(e,t){return e&&yr(e,t,ks)}function br(e,t){return e&&gr(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=go(t,e)).length;null!=e&&nt}function Sr(e,t){return null!=e&&Me.call(e,t)}function Tr(e,t){return null!=e&&t in Ee(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=gn(h.length,c),l[u]=!n&&(t||a>=120&&h.length>=120)?new qn(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&&He.call(s,u,1),He.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;yi(o)?He.call(e,o,1):uo(e,o)}}return e}function Yr(e,t){return e+dt(_n()*(t-e+1))}function qr(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 Hr(e,t){return Ai(Ei(e,t,nu),e+"")}function Xr(e){return Kn(Bs(e))}function Kr(e,t){var n=Bs(e);return ji(n,ir(t,0,n.length))}function Zr(e,t,n,r){if(!Ja(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&&!ss(a)&&(n?a<=t:a=200){var l=t?null:Ho(e);if(l)return un(l);a=!1,o=$t,u=new qn}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=Ge?Ge(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 Oo(e,t){var n=t?xo(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=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&&gi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Ee(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 qn: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 ji(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=Fn(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&&yi(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){Me.call(e,n)?++e[n]:rr(e,n,1)})),va=Do(Vi),ya=Do(Gi);function ga(e,t){return(Ga(e)?St:cr)(e,ai(t,3))}function ma(e,t){return(Ga(e)?Tt:fr)(e,ai(t,3))}var ba=Ao((function(e,t,n){Me.call(e,n)?e[n].push(t):rr(e,n,[t])})),_a=Hr((function(e,t,n){var o=-1,i="function"==typeof t,a=Ya(e)?r(e.length):[];return cr(e,(function(e){a[++o]=i?Ot(t,e,n):Cr(e,t,n)})),a})),wa=Ao((function(e,t,n){rr(e,n,t)}));function xa(e,t){return(Ga(e)?It:Dr)(e,ai(t,3))}var Oa=Ao((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ea=Hr((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]]),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=Hr((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=Hr((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 y(e){var n=e-c;return c===o||n>=t||n<0||d&&e-f>=s}function g(){var e=Sa();if(y(e))return m(e);l=Ci(g,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=Sa(),n=y(e);if(r=arguments,a=this,c=e,n){if(l===o)return function(e){return f=e,l=Ci(g,t),h?v(e):u}(c);if(d)return _o(l),l=Ci(g,t),v(c)}return l===o&&(l=Ci(g,t)),u}return t=vs(t)||0,Ja(n)&&(h=!!n.leading,s=(d="maxWait"in n)?yn(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=Hr((function(e,t){return ur(e,1,t)})),ja=Hr((function(e,t,n){return ur(e,vs(t)||0,n)}));function Ma(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(Ma.Cache||Yn),n}function Ra(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)}}Ma.Cache=Yn;var Na=mo((function(e,t){var n=(t=1==t.length&&Ga(t[0])?It(t[0],Kt(ai())):It(vr(t,1),Kt(ai()))).length;return Hr((function(r){for(var o=-1,i=gn(r.length,n);++o=t})),Va=Ar(function(){return arguments}())?Ar:function(e){return es(e)&&Me.call(e,"callee")&&!qe.call(e,"callee")},Ga=r.isArray,Wa=gt?Kt(gt):function(e){return es(e)&&Or(e)==I};function Ya(e){return null!=e&&Qa(e.length)&&!Za(e)}function qa(e){return es(e)&&Ya(e)}var Ha=yt||vu,Xa=mt?Kt(mt):function(e){return es(e)&&Or(e)==m};function Ka(e){if(!es(e))return!1;var t=Or(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=Or(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)&&Or(e)==O}function rs(e){if(!es(e)||Or(e)!=E)return!1;var t=We(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.call(n)==Le}var os=_t?Kt(_t):function(e){return es(e)&&Or(e)==T},is=wt?Kt(wt):function(e){return es(e)&&hi(e)==P};function as(e){return"string"==typeof e||!Ga(e)&&es(e)&&Or(e)==C}function ss(e){return"symbol"==typeof e||es(e)&&Or(e)==A}var us=xt?Kt(xt):function(e){return es(e)&&Qa(e.length)&&!!ot[Or(e)]},ls=Wo(Nr),cs=Wo((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Ya(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:Bs)(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||ye.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function ys(e){return Co(e,Is(e))}function gs(e){return null==e?"":ao(e)}var ms=ko((function(e,t){if(wi(t)||Ya(t))Co(t,ks(t),e);else for(var n in t)Me.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),Os=Hr((function(e,t){e=Ee(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})),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),Fs=Xo(Is);function Bs(e){return null==e?[]:Zt(e,ks(e))}var Us=Ro((function(e,t,n){return t=t.toLowerCase(),e+(n?zs(t):t)}));function zs(e){return Ks(gs(e).toLowerCase())}function Vs(e){return(e=gs(e))&&e.replace(me,en).replace($e,"")}var Gs=Ro((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ws=Ro((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ys=Mo("toLowerCase"),qs=Ro((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Hs=Ro((function(e,t,n){return e+(n?" ":"")+Ks(t)})),Xs=Ro((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ks=Mo("toUpperCase");function Zs(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 $s=Hr((function(e,t){try{return Ot(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 Mr("function"==typeof e?e:ar(e,1))}var ou=Hr((function(e,t){return function(n){return Cr(n,e,t)}})),iu=Hr((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,jt([this.value()],arguments))})})),e}function su(){}var uu=zo(It),lu=zo(Pt),cu=zo(Nt);function fu(e){return mi(e)?Gt(Di(e)):function(e){return function(t){return wr(t,e)}}(e)}var hu=Go(),du=Go(!0);function pu(){return[]}function vu(){return!1}var yu,gu=Uo((function(e,t){return e+t}),0),mu=qo("ceil"),bu=Uo((function(e,t){return e/t}),1),_u=qo("floor"),wu=Uo((function(e,t){return e*t}),1),xu=qo("round"),Ou=Uo((function(e,t){return e-t}),0);return Fn.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)}},Fn.ary=Ta,Fn.assign=ms,Fn.assignIn=bs,Fn.assignInWith=_s,Fn.assignWith=ws,Fn.at=xs,Fn.before=Pa,Fn.bind=Ca,Fn.bindAll=Qs,Fn.bindKey=Aa,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ga(e)?e:[e]},Fn.chain=fa,Fn.chunk=function(e,t,n){t=(n?gi(e,t,n):t===o)?1:yn(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=gs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&rn(e)?bo(fn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Pe(i);return t=null==t?0:yn(ds(t),0),Hr((function(n){var r=n[t],o=bo(n,0,t);return r&&jt(o,r),Ot(e,this,o)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:ds(t))<0?0:t):[]},Fn.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):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?co(e,ai(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?co(e,ai(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.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})},Fn.thru=ha,Fn.toArray=fs,Fn.toPairs=Ls,Fn.toPairsIn=Fs,Fn.toPath=function(e){return Ga(e)?It(e,Di):ss(e)?[e]:Po(Ni(gs(e)))},Fn.toPlainObject=ys,Fn.transform=function(e,t,n){var r=Ga(e),o=r||Ha(e)||us(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ja(e)&&Za(i)?Bn(We(e)):{}}return(o?St:mr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Fn.unary=function(e){return Ta(e,1)},Fn.union=ea,Fn.unionBy=ta,Fn.unionWith=na,Fn.uniq=function(e){return e&&e.length?so(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?so(e,ai(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},Fn.unset=function(e,t){return null==e||uo(e,t)},Fn.unzip=ra,Fn.unzipWith=oa,Fn.update=function(e,t,n){return null==e?e:lo(e,t,yo(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:lo(e,t,yo(n),r)},Fn.values=Bs,Fn.valuesIn=function(e){return null==e?[]:Zt(e,Is(e))},Fn.without=ia,Fn.words=Zs,Fn.wrap=function(e,t){return Da(yo(t),e)},Fn.xor=aa,Fn.xorBy=sa,Fn.xorWith=ua,Fn.zip=la,Fn.zipObject=function(e,t){return po(e||[],t||[],Jn)},Fn.zipObjectDeep=function(e,t){return po(e||[],t||[],Zr)},Fn.zipWith=ca,Fn.entries=Ls,Fn.entriesIn=Fs,Fn.extend=bs,Fn.extendWith=_s,au(Fn,Fn),Fn.add=gu,Fn.attempt=$s,Fn.camelCase=Us,Fn.capitalize=zs,Fn.ceil=mu,Fn.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)},Fn.clone=function(e){return ar(e,4)},Fn.cloneDeep=function(e){return ar(e,5)},Fn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},Fn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},Fn.conformsTo=function(e,t){return null==t||sr(e,t,ks(t))},Fn.deburr=Vs,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=bu,Fn.endsWith=function(e,t,n){e=gs(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},Fn.eq=Ba,Fn.escape=function(e){return(e=gs(e))&&X.test(e)?e.replace(q,tn):e},Fn.escapeRegExp=function(e){return(e=gs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Fn.every=function(e,t,n){var r=Ga(e)?Pt:hr;return n&&gi(e,t,n)&&(t=o),r(e,ai(t,3))},Fn.find=va,Fn.findIndex=Vi,Fn.findKey=function(e,t){return Lt(e,ai(t,3),mr)},Fn.findLast=ya,Fn.findLastIndex=Gi,Fn.findLastKey=function(e,t){return Lt(e,ai(t,3),br)},Fn.floor=_u,Fn.forEach=ga,Fn.forEachRight=ma,Fn.forIn=function(e,t){return null==e?e:yr(e,ai(t,3),Is)},Fn.forInRight=function(e,t){return null==e?e:gr(e,ai(t,3),Is)},Fn.forOwn=function(e,t){return e&&mr(e,ai(t,3))},Fn.forOwnRight=function(e,t){return e&&br(e,ai(t,3))},Fn.get=Ss,Fn.gt=Ua,Fn.gte=za,Fn.has=function(e,t){return null!=e&&di(e,t,Sr)},Fn.hasIn=Ts,Fn.head=Yi,Fn.identity=nu,Fn.includes=function(e,t,n,r){e=Ya(e)?e:Bs(e),n=n&&!r?ds(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),as(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Bt(e,t,n)>-1},Fn.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=yn(r+o,0)),Bt(e,t,o)},Fn.inRange=function(e,t,n){return t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n){return e>=gn(t,n)&&e=-9007199254740991&&e<=f},Fn.isSet=is,Fn.isString=as,Fn.isSymbol=ss,Fn.isTypedArray=us,Fn.isUndefined=function(e){return e===o},Fn.isWeakMap=function(e){return es(e)&&hi(e)==k},Fn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Or(e)},Fn.join=function(e,t){return null==e?"":Wt.call(e,t)},Fn.kebabCase=Gs,Fn.last=Ki,Fn.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?yn(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):Ft(e,zt,i,!0)},Fn.lowerCase=Ws,Fn.lowerFirst=Ys,Fn.lt=ls,Fn.lte=cs,Fn.max=function(e){return e&&e.length?dr(e,nu,Er):o},Fn.maxBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Er):o},Fn.mean=function(e){return Vt(e,nu)},Fn.meanBy=function(e,t){return Vt(e,ai(t,2))},Fn.min=function(e){return e&&e.length?dr(e,nu,Nr):o},Fn.minBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Nr):o},Fn.stubArray=pu,Fn.stubFalse=vu,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=wu,Fn.nth=function(e,t){return e&&e.length?Ur(e,ds(t)):o},Fn.noConflict=function(){return ft._===this&&(ft._=Fe),this},Fn.noop=su,Fn.now=Sa,Fn.pad=function(e,t,n){e=gs(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)},Fn.padEnd=function(e,t,n){e=gs(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 gn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Yr(e,t)},Fn.reduce=function(e,t,n){var r=Ga(e)?Mt:Yt,o=arguments.length<3;return r(e,ai(t,4),n,o,cr)},Fn.reduceRight=function(e,t,n){var r=Ga(e)?Rt:Yt,o=arguments.length<3;return r(e,ai(t,4),n,o,fr)},Fn.repeat=function(e,t,n){return t=(n?gi(e,t,n):t===o)?1:ds(t),qr(gs(e),t)},Fn.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.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=ai(t),e-=d;for(var o=Ht(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,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(ao(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Fn.unescape=function(e){return(e=gs(e))&&H.test(e)?e.replace(Y,dn):e},Fn.uniqueId=function(e){var t=++Re;return gs(e)+t},Fn.upperCase=Xs,Fn.upperFirst=Ks,Fn.each=ga,Fn.eachRight=ma,Fn.first=Yi,au(Fn,(yu={},mr(Fn,(function(e,t){Me.call(Fn.prototype,t)||(yu[t]=e)})),yu),{chain:!1}),Fn.VERSION="4.17.21",St(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),St(["drop","take"],(function(e,t){Vn.prototype[e]=function(n){n=n===o?1:yn(ds(n),0);var r=this.__filtered__&&!t?new Vn(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},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=Hr((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(Ra(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=Fn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Fn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Vn,l=s[0],c=u||Ga(t),f=function(e){var t=i.apply(Fn,jt([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 y=e.apply(t,s);return y.__actions__.push({func:ha,args:[f],thisArg:o}),new zn(y,h)}return p&&v?e.apply(this,s):(y=this.thru(f),p?r?y.value()[0]:y.value():y)})})),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);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ga(o)?o:[],e)}return this[n]((function(n){return t.apply(Ga(n)?n:[],e)}))}})),mr(Vn.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";Me.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}})),An[Fo(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=Ga(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__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof Un;){var r=Fi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Fn.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)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Ke&&(Fn.prototype[Ke]=function(){return this}),Fn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},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))}},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},3950:e=>{e.exports=function(){}},583:(e,t,n)=>{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)}},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)}},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}},3345:e=>{e.exports=function(){return[]}},9935:e=>{e.exports=function(){return!1}},3222:(e,t,n)=>{var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},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}},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},5880:(e,t,n)=>{var r=n(514),o=n(5950);e.exports=function(e){return null==e?[]:r(e,o(e))}},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}},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)}},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)}},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}},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}},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},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}},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),y=a(e,p,n,this.toBBox),g=(o=v,i=y,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(y);g=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}()},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 y=Math.abs(d+p);return Math.abs(v)>=33306690738754716e-32*y?v:-function(e,r,l,c,f,h,d){let p,v,y,g,m,b,_,w,x,O,E,S,T,P,C,A,k,I;const j=e-f,M=l-f,R=r-h,N=c-h;m=(C=(w=j-(_=(b=t*j)-(b-j)))*(O=N-(x=(b=t*N)-(b-N)))-((P=j*N)-_*x-w*x-_*O))-(E=C-(k=(w=R-(_=(b=t*R)-(b-R)))*(O=M-(x=(b=t*M)-(b-M)))-((A=R*M)-_*x-w*x-_*O))),o[0]=C-(E+m)+(m-k),m=(T=P-((S=P+E)-(m=S-P))+(E-m))-(E=T-A),o[1]=T-(E+m)+(m-A),m=(I=S+E)-S,o[2]=S-(I-m)+(E-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-(j+(m=e-j))+(m-f),y=l-(M+(m=l-M))+(m-f),v=r-(R+(m=r-R))+(m-h),g=c-(N+(m=c-N))+(m-h),0===p&&0===v&&0===y&&0===g)return D;if(L=11093356479670487e-47*d+33306690738754706e-32*Math.abs(D),(D+=j*g+N*p-(R*y+M*v))>=L||-D>=L)return D;m=(C=(w=p-(_=(b=t*p)-(b-p)))*(O=N-(x=(b=t*N)-(b-N)))-((P=p*N)-_*x-w*x-_*O))-(E=C-(k=(w=v-(_=(b=t*v)-(b-v)))*(O=M-(x=(b=t*M)-(b-M)))-((A=v*M)-_*x-w*x-_*O))),u[0]=C-(E+m)+(m-k),m=(T=P-((S=P+E)-(m=S-P))+(E-m))-(E=T-A),u[1]=T-(E+m)+(m-A),m=(I=S+E)-S,u[2]=S-(I-m)+(E-m),u[3]=I;const F=n(4,o,4,u,i);m=(C=(w=j-(_=(b=t*j)-(b-j)))*(O=g-(x=(b=t*g)-(b-g)))-((P=j*g)-_*x-w*x-_*O))-(E=C-(k=(w=R-(_=(b=t*R)-(b-R)))*(O=y-(x=(b=t*y)-(b-y)))-((A=R*y)-_*x-w*x-_*O))),u[0]=C-(E+m)+(m-k),m=(T=P-((S=P+E)-(m=S-P))+(E-m))-(E=T-A),u[1]=T-(E+m)+(m-A),m=(I=S+E)-S,u[2]=S-(I-m)+(E-m),u[3]=I;const B=n(F,i,4,u,a);m=(C=(w=p-(_=(b=t*p)-(b-p)))*(O=g-(x=(b=t*g)-(b-g)))-((P=p*g)-_*x-w*x-_*O))-(E=C-(k=(w=v-(_=(b=t*v)-(b-v)))*(O=y-(x=(b=t*y)-(b-y)))-((A=v*y)-_*x-w*x-_*O))),u[0]=C-(E+m)+(m-k),m=(T=P-((S=P+E)-(m=S-P))+(E-m))-(E=T-A),u[1]=T-(E+m)+(m-A),m=(I=S+E)-S,u[2]=S-(I-m)+(E-m),u[3]=I;const U=n(B,a,4,u,s);return s[U-1]}(e,r,l,c,f,h,y)},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)},4262:(e,t,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}},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}},3172:(e,t,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})},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]{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&&!~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=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:()=>fh});var e={};function t(e){return t="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},t(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new 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}}}}a.r(e),a.d(e,{coseBilkentLayoutFallbackWorker:()=>Ul,createCoseBilkentLayoutWorker:()=>zl,createHierarchicalLayoutWorker:()=>ac,hierarchicalLayoutFallbackWorker:()=>ic});var h="undefined"==typeof window?null:window,d=h?h.navigator:null;h&&h.document;var p=t(""),v=t({}),y=t((function(){})),g="undefined"==typeof HTMLElement?"undefined":t(HTMLElement),m=function(e){return e&&e.instanceString&&_(e.instanceString)?e.instanceString():null},b=function(e){return null!=e&&t(e)==p},_=function(e){return null!=e&&t(e)===y},w=function(e){return!S(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},x=function(e){return null!=e&&t(e)===v&&!w(e)&&e.constructor===Object},O=function(e){return null!=e&&t(e)===t(1)&&!isNaN(e)},E=function(e){return"undefined"===g?void 0:null!=e&&e instanceof HTMLElement},S=function(e){return T(e)||P(e)},T=function(e){return"collection"===m(e)&&e._private.single},P=function(e){return"collection"===m(e)&&!e._private.single},C=function(e){return"core"===m(e)},A=function(e){return"stylesheet"===m(e)},k=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},I=function(e){return function(e){return null!=e&&t(e)===v}(e)&&_(e.then)},j=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},G=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n=t||n<0||f&&e-l>=i}function v(){var e=Q();if(p(e))return y(e);s=setTimeout(v,function(e){var n=t-(e-u);return f?ge(n,i-(e-l)):n}(e))}function y(e){return s=void 0,h&&r?d(e):(r=o=void 0,a)}function g(){var e=Q(),n=p(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(v,t),c?d(e):a}(u);if(f)return clearTimeout(s),s=setTimeout(v,t),d(u)}return void 0===s&&(s=setTimeout(v,t)),a}return t=ve(t)||0,H(n)&&(c=!!n.leading,i=(f="maxWait"in n)?ye(ve(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h),g.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=o=s=void 0},g.flush=function(){return void 0===s?a:y(Q())},g},be=h?h.performance:null,_e=be&&be.now?function(){return be.now()}:function(){return Date.now()},we=function(){if(h){if(h.requestAnimationFrame)return function(e){h.requestAnimationFrame(e)};if(h.mozRequestAnimationFrame)return function(e){h.mozRequestAnimationFrame(e)};if(h.webkitRequestAnimationFrame)return function(e){h.webkitRequestAnimationFrame(e)};if(h.msRequestAnimationFrame)return function(e){h.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(_e())}),1e3/60)}}(),xe=function(e){return we(e)},Oe=_e,Ee=9261,Se=5381,Te=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee;!(t=e.next()).done;)n=65599*n+t.value|0;return n},Pe=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee)+e|0},Ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se;return(t<<5)+t+e|0},Ae=function(e){return 2097152*e[0]+e[1]},ke=function(e,t){return[Pe(e[0],t[0]),Ce(e[1],t[1])]},Ie=function(e,t){var n={value:0,done:!1},r=0,o=e.length;return Te({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},$e=function(e){e.splice(0,e.length)},Qe=function(e,t,n){return n&&(t=N(n,t)),e[t]},Je=function(e,t,n,r){n&&(t=N(n,t)),e[t]=r},et="undefined"!=typeof Map?Map:function(){function e(){n(this,e),this._obj={}}return o(e,[{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]}}]),e}(),tt=function(){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&&C(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 nt,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=[];w(t.classes)?u=t.classes:b(t.classes)&&(u=t.classes.split(/\s+/));for(var l=0,c=u.length;lt?1:0},l=function(e,t,o,i,a){var s;if(null==o&&(o=0),null==a&&(a=n),o<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);on;0<=n?t++:t--)l.push(t);return l}.apply(this).reverse()).length;iv;0<=v?++h:--h)y.push(i(e,r));return y},p=function(e,t,r,o){var i,a,s;for(null==o&&(o=n),i=e[r];r>t&&o(i,a=e[s=r-1>>1])<0;)e[r]=a,r=s;return e[r]=i},v=function(e,t,r){var o,i,a,s,u;for(null==r&&(r=n),i=e.length,u=t,a=e[t],o=2*t+1;o0;){var O=g.pop(),E=v(O),S=O.id();if(f[S]=E,E!==1/0)for(var T=O.neighborhood().intersect(d),P=0;P0)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)}}}},ht={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(l=(u=v.pop()).id(),y.delete(l),w++,l===f){for(var x=[],O=o,E=f,S=m[E];x.unshift(O),null!=S&&x.unshift(S),null!=(O=g[E]);)S=m[E=O.id()];return{found:!0,distance:h[l],path:this.spawn(x),steps:w}}p[l]=!0;for(var T=u._private.edges,P=0;PP&&(d[T]=P,g[T]=S,m[T]=w),!o){var C=S*l+E;!o&&d[C]>P&&(d[C]=P,g[C]=E,m[C]=w)}}}for(var A=0;A1&&void 0!==arguments[1]?arguments[1]:i,r=[],o=m(e);;){if(null==o)return t.spawn();var a=g(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}}},bt=Math.sqrt(2),_t=function(e,t,n){0===n.length&&Ve("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=_t(o,e,t),n--}return t},xt={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/bt);if(!(o<2)){for(var u=[],l=0;l0?1:e<0?-1:0},At=function(e,t){return Math.sqrt(kt(e,t))},kt=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},It=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}}},Dt=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},Lt=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},Ft=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},Bt=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},Ut=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},zt=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},Vt=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},Gt=function(e,t){return Vt(e,t.x1,t.y1)&&Vt(e,t.x2,t.y2)},Wt=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?ln(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=nn(e,t,n,r,n-f+c-a,v,n+f-c+a,v,!1)).length>0)return s}if(p){var y=n+f+a;if((s=nn(e,t,n,r,y,r-h+c-a,y,r+h-c+a,!1)).length>0)return s}if(d){var g=r+h+a;if((s=nn(e,t,n,r,n-f+c-a,g,n+f-c+a,g,!1)).length>0)return s}if(p){var m=n-f-a;if((s=nn(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=en(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=en(e,t,n,r,w,x,c+a)).length>0&&u[0]>=w&&u[1]<=x)return[u[0],u[1]];var O=n+f-c,E=r+h-c;if((u=en(e,t,n,r,O,E,c+a)).length>0&&u[0]>=O&&u[1]>=E)return[u[0],u[1]];var S=n-f+c,T=r+h-c;return(u=en(e,t,n,r,S,T,c+a)).length>0&&u[0]<=S&&u[1]>=T?[u[0],u[1]]:[]},Yt=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},qt=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)},Ht=function(e,t,n,r,o,i,a,s){var u,l,c,f,h,d,p,v,y,g,m,b,_,w=[];l=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,c=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,f=1*n*o-n*n+n*e-o*e+r*i-r*r+r*t-i*t,0===(u=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)&&(u=1e-5),v=-27*(f/=u)+(l/=u)*(9*(c/=u)-l*l*2),d=(p=(3*c-l*l)/9)*p*p+(v/=54)*v,(h=w)[1]=0,b=l/3,d>0?(g=(g=v+Math.sqrt(d))<0?-Math.pow(-g,1/3):Math.pow(g,1/3),m=(m=v-Math.sqrt(d))<0?-Math.pow(-m,1/3):Math.pow(m,1/3),h[0]=-b+g+m,b+=(g+m)/2,h[4]=h[2]=-b,b=Math.sqrt(3)*(-m+g)/2,h[3]=b,h[5]=-b):(h[5]=h[3]=0,0===d?(_=v<0?-Math.pow(-v,1/3):Math.pow(v,1/3),h[0]=2*_-b,h[4]=h[2]=-(_+b)):(y=(p=-p)*p*p,y=Math.acos(v/Math.sqrt(y)),_=2*Math.sqrt(p),h[0]=-b+_*Math.cos(y/3),h[2]=-b+_*Math.cos((y+2*Math.PI)/3),h[4]=-b+_*Math.cos((y+4*Math.PI)/3)));for(var x=[],O=0;O<6;O+=2)Math.abs(w[O+1])<1e-7&&w[O]>=0&&w[O]<=1&&x.push(w[O]);x.push(1),x.push(0);for(var E,S,T,P=-1,C=0;C=0?Tu?(e-o)*(e-o)+(t-i)*(t-i):l-f},Kt=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},Zt=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=Qt(c,-u);f=$t(v)}else f=c;return Kt(e,t,f)},$t=function(e){for(var t,n,r,o,i,a,s,u,l=new Array(e.length/2),c=0;c=0&&p<=1&&y.push(p),v>=0&&v<=1&&y.push(v),0===y.length)return[];var g=y[0]*s[0]+e,m=y[0]*s[1]+t;return y.length>1?y[0]==y[1]?[g,m]:[g,m,y[1]*s[0]+e,y[1]*s[1]+t]:[g,m]},tn=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},nn=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,y=c*h-d*l,g=p*c-f*d;if(0!==g){var m=v/g,b=y/g,_=-.001;return _<=m&&m<=1.001&&_<=b&&b<=1.001||u?[e+m*c,t+m*d]:[]}return 0===v||0===y?tn(e,n,a)===a?[a,s]:tn(e,n,o)===o?[o,i]:tn(o,a,n)===n?[n,r]:[]:[]},rn=function(e,t,n,r,o,i,a,s){var u,l,c,f,h,d,p=[],v=new Array(n.length),y=!0;if(null==i&&(y=!1),y){for(var g=0;g0){var m=Qt(v,-s);l=$t(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(),h[b]>h[y]+w&&(h[b]=h[y]+w,d.nodes.indexOf(b)<0?d.push(b):d.updateItem(b),l[b]=0,u[b]=[]),h[b]==h[y]+w&&(l[b]=l[b]+l[y],u[b].push(y))}else for(var x=0;x0;){for(var T=n.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]:kn,a=r,s=0;s=2?Dn(e,t,n,0,Mn,Rn):Dn(e,t,n,0,jn)},squaredEuclidean:function(e,t,n){return Dn(e,t,n,0,Mn)},manhattan:function(e,t,n){return Dn(e,t,n,0,jn)},max:function(e,t,n){return Dn(e,t,n,-1/0,Nn)}};function Fn(e,t,n,r,o,i){var a;return a=_(e)?e:Ln[e]||Ln.euclidean,0===t&&_(e)?a(o,i):a(t,n,r,o,i)}Ln["squared-euclidean"]=Ln.squaredEuclidean,Ln.squaredeuclidean=Ln.squaredEuclidean;var Bn=Ke({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Un=function(e){return Bn(e)},zn=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 Fn(e,r.length,i,(function(e){return r[e](t)}),a,s)},Vn=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},qn=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 y=0;yn[v.key][g.key]&&(i=n[v.key][g.key])):"max"===o.linkage?(i=n[p.key][g.key],n[p.key][g.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=P?(C=P,P=k,A=I):k>C&&(C=k);for(var j=0;j0?1:0;E[x%l.minIterations*t+F]=B,L+=B}if(L>0&&(x>=l.minIterations-1||x==l.maxIterations-1)){for(var U=0,z=0;z0&&r.push(o);return r}(t,i,a),W=function(e,t,n){for(var r=lr(e,t,n),o=0;ou&&(s=l,u=c)}n[o]=i[s]}return lr(e,t,n)}(t,r,G),Y={},q=0;q1)}}));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}},pr=function(){var e=this,t={},n=0,r=[],o=[],i=e.spawn(e),a=function a(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}},vr={};[it,ft,ht,pt,yt,mt,xt,dn,vn,gn,bn,An,Qn,ar,fr,{hierholzer:function(e){if(!x(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,o,i=hr(e),a=i.root,s=i.directed,u=this,l=!1;a&&(o=b(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 y in p.unshift(u.getElementById(v.shift())),c)if(c[y].length)return h;return h.found=!0,h.trail=this.spawn(p,!0),h}},{hopcroftTarjanBiconnected:dr,htbc:dr,htb:dr,hopcroftTarjanBiconnectedComponents:dr},{tarjanStronglyConnected:pr,tsc:pr,tscc:pr,tarjanStronglyConnectedComponents:pr}].forEach((function(e){G(vr,e)}));var yr=function e(t){if(!(this instanceof e))return new e(t);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 t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};yr.prototype={fulfill:function(e){return gr(this,1,"fulfillValue",e)},reject:function(e){return gr(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new yr;return n.onFulfilled.push(_r(e,r,"fulfill")),n.onRejected.push(_r(t,r,"reject")),mr(n),r.proxy}};var gr=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,mr(e)),e},mr=function(e){1===e.state?br(e,"onFulfilled",e.fulfillValue):2===e.state&&br(e,"onRejected",e.rejectReason)},br=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},Kr.prototype.set=function(e,t){var n=this.__data__,r=Hr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Zr=Kr,$r=Ur($,"Map"),Qr=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function Jr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&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){w(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}};To.className=To.classNames=To.classes;var Po={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:L,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Po.variable="(?:[\\w-.]|(?:\\\\"+Po.metaChar+"))+",Po.className="(?:[\\w-]|(?:\\\\"+Po.metaChar+"))+",Po.value=Po.string+"|"+Po.number,Po.id=Po.variable,function(){var e,t,n;for(e=Po.comparatorOp.split("|"),n=0;n=0||"="!==t&&(Po.comparatorOp+="|\\!"+t)}();var Co=20,Ao=[{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*V(e,t)}(e.selector,t.selector)})),ko=function(){for(var e,t={},n=0;n0&&l.edgeCount>0)return We("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(l.edgeCount>1)return We("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&We("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 b(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),y=r(o.right,i);return p+(p.length>0?" ":"")+v+y;case Co: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 Ko(e,t,n){if(n.isParent())for(var r=n._private.children,o=0;o1&&void 0!==arguments[1])||arguments[1],Ko)},Ho.forEachUp=function(e){return Xo(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Zo)},Ho.forEachUpAndDown=function(e){return Xo(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],$o)},Ho.ancestors=Ho.parents,(Wo=Yo={data:Eo.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:Eo.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Eo.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Eo.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Eo.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Eo.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Wo.data,Wo.removeAttr=Wo.removeData;var Qo,Jo,ei=Yo,ti={};function ni(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:ri("indegree",(function(e,t){return et})),minOutdegree:ri("outdegree",(function(e,t){return et}))}),G(ti,{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,y=v;v&&(p=p[0]);var g=y?p.position():{x:0,y:0};void 0!==t?d.position(e,t+g[e]):void 0!==o&&d.position({x:o.x+g.x,y:o.y+g.y})}}else if(!i)return;return this}}).modelPosition=Qo.point=Qo.position,Qo.modelPositions=Qo.points=Qo.positions,Qo.renderedPoint=Qo.renderedPosition,Qo.relativePoint=Qo.relativePosition;var ai,si,ui=Jo;ai=si={},si.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}},si.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},si.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=g(o.width.val-i.w,s,u),h=f.biasDiff,d=f.biasComplementDiff,p=g(o.height.val-i.h,l,c),v=p.biasDiff,y=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+y)/2}function g(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)},fi=function(e,t){return null==t?e:ci(e,t.x1,t.y1,t.x2,t.y2)},hi=function(e,t,n){return Qe(e,t,n)},di=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,Ft(l,1),ci(e,l.x1,l.y1,l.x2,l.y2)}}},pi=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=hi(i,"labelWidth",n),d=hi(i,"labelHeight",n),p=hi(i,"labelX",n),v=hi(i,"labelY",n),y=t.pstyle(r+"text-margin-x").pfValue,g=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,O=d,E=h,S=E/2,T=O/2;if(m)a=p-S,s=p+S,u=v-T,l=v+T;else{switch(c.value){case"left":a=p-E,s=p;break;case"center":a=p-S,s=p+S;break;case"right":a=p,s=p+E}switch(f.value){case"top":u=v-O,l=v;break;case"center":u=v-T,l=v+T;break;case"bottom":u=v,l=v+O}}var P=y-Math.max(_,w)-x-2,C=y+Math.max(_,w)+x+2,A=g-Math.max(_,w)-x-2,k=g+Math.max(_,w)+x+2;a+=P,s+=C,u+=A,l+=k;var I=n||"main",j=o.labelBounds,M=j[I]=j[I]||{};M.x1=a,M.y1=u,M.x2=s,M.y2=l,M.w=s-a,M.h=l-u,M.leftPad=P,M.rightPad=C,M.topPad=A,M.botPad=k;var R=m&&"autorotate"===b.strValue,N=null!=b.pfValue&&0!==b.pfValue;if(R||N){var D=R?hi(o.rstyle,"labelAngle",n):b.pfValue,L=Math.cos(D),F=Math.sin(D),B=(a+s)/2,U=(u+l)/2;if(!m){switch(c.value){case"left":B=s;break;case"right":B=a}switch(f.value){case"top":U=l;break;case"bottom":U=u}}var z=function(e,t){return{x:(e-=B)*L-(t-=U)*F+B,y:e*F+t*L+U}},V=z(a,u),G=z(a,l),W=z(s,u),Y=z(s,l);a=Math.min(V.x,G.x,W.x,Y.x),s=Math.max(V.x,G.x,W.x,Y.x),u=Math.min(V.y,G.y,W.y,Y.y),l=Math.max(V.y,G.y,W.y,Y.y)}var q=I+"Rot",H=j[q]=j[q]||{};H.x1=a,H.y1=u,H.x2=s,H.y2=l,H.w=s-a,H.h=l-u,ci(e,a,u,s,l),ci(o.labelBounds.all,a,u,s,l)}return e}},vi=function(e){var t=0,n=function(e){return(e?1:0)<0&&i>0){var a=t.pstyle("outline-offset").value,s=t.pstyle("shape").value,u=i+a,l=(e.w+2*u)/e.w,c=(e.h+2*u)/e.h,f=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+2.4*u)/e.w,f=-u/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+2.4*u)/e.w:"star"===s?(l=(e.w+2.8*u)/e.w,c=(e.h+2.6*u)/e.h,f=-u/3.8):"triangle"===s?(l=(e.w+2.8*u)/e.w,c=(e.h+2.4*u)/e.h,f=-u/1.4):"vee"===s&&(l=(e.w+4.4*u)/e.w,c=(e.h+3.8*u)/e.h,f=.5*-u);var h=e.h*c-e.h,d=e.w*l-e.w;if(Bt(e,[Math.ceil(h/2),Math.ceil(d/2)]),0!==f){var p=(r=f,{x1:(n=e).x1+0,x2:n.x2+0,y1:n.y1+r,y2:n.y2+r,w:n.w,h:n.h});Dt(e,p)}}}}(h,e)}else if(v&&t.includeEdges)if(c&&!f){var P=e.pstyle("curve-style").strValue;if(n=Math.min(y.srcX,y.midX,y.tgtX),r=Math.max(y.srcX,y.midX,y.tgtX),o=Math.min(y.srcY,y.midY,y.tgtY),i=Math.max(y.srcY,y.midY,y.tgtY),ci(h,n-=O,o-=O,r+=O,i+=O),"haystack"===P){var C=y.haystackPts;if(C&&2===C.length){if(n=C[0].x,o=C[0].y,n>(r=C[1].x)){var A=n;n=r,r=A}if(o>(i=C[1].y)){var k=o;o=i,i=k}ci(h,n-O,o-O,r+O,i+O)}}else if("bezier"===P||"unbundled-bezier"===P||P.endsWith("segments")||P.endsWith("taxi")){var I;switch(P){case"bezier":case"unbundled-bezier":I=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":I=y.linePts}if(null!=I)for(var j=0;j(r=N.x)){var D=n;n=r,r=D}if((o=R.y)>(i=N.y)){var L=o;o=i,i=L}ci(h,n-=O,o-=O,r+=O,i+=O)}if(c&&t.includeEdges&&v&&(di(h,e,"mid-source"),di(h,e,"mid-target"),di(h,e,"source"),di(h,e,"target")),c&&"yes"===e.pstyle("ghost").value){var F=e.pstyle("ghost-offset-x").pfValue,B=e.pstyle("ghost-offset-y").pfValue;ci(h,h.x1+F,h.y1+B,h.x2+F,h.y2+B)}var U=d.bodyBounds=d.bodyBounds||{};Ut(U,h),Bt(U,g),Ft(U,1),c&&(n=h.x1,r=h.x2,o=h.y1,i=h.y2,ci(h,n-x,o-x,r+x,i+x));var z=d.overlayBounds=d.overlayBounds||{};Ut(z,h),Bt(z,g),Ft(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=Nt(),c&&t.includeLabels&&(t.includeMainLabels&&pi(h,e,null),v&&(t.includeSourceLabels&&pi(h,e,"source"),t.includeTargetLabels&&pi(h,e,"target")))}return h.x1=li(h.x1),h.y1=li(h.y1),h.x2=li(h.x2),h.y2=li(h.y2),h.w=li(h.x2-h.x1),h.h=li(h.y2-h.y1),h.w>0&&h.h>0&&b&&(Bt(h,g),Ft(h,1)),h}(e,mi),r.bbCache=n,r.bbCachePosKey=a):n=r.bbCache,!i){var c=e.isNode();n=Nt(),(t.includeNodes&&c||t.includeEdges&&!c)&&(t.includeOverlays?fi(n,r.overlayBounds):fi(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!o||t.includeSourceLabels&&t.includeTargetLabels)?fi(n,r.labelBounds.all):(t.includeMainLabels&&fi(n,r.labelBounds.mainRot),t.includeSourceLabels&&fi(n,r.labelBounds.sourceRot),t.includeTargetLabels&&fi(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},mi={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},bi=vi(mi),_i=Ke(mi);si.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=Nt();var n=_i(e=e||mi),r=this;if(r.cy().styleEnabled())for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:Ni,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)a(s);return this},Li.removeAllListeners=function(){return this.removeListener("*")},Li.emit=Li.trigger=function(e,t,n){var r=this.listeners,o=r.length;return this.emitting++,w(t)||(t=[t]),function(e,t,n){if("event"!==m(n))if(x(n))t(e,Bi(e,n));else for(var r=w(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&&b(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){this.cleanStyle();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(x(e)){var i=e;o.applyBypass(this,i,r),this.emitAndNotify("style")}else if(b(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)}}),ca.neighbourhood=ca.neighborhood,ca.closedNeighbourhood=ca.closedNeighborhood,ca.openNeighbourhood=ca.openNeighborhood,G(ca,{source:qo((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:qo((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:pa({attr:"source"}),targets:pa({attr:"target"})}),G(ca,{edgesWith:qo(va(),"edgesWith"),edgesTo:qo(va({thisIsSrc:!0}),"edgesTo")}),G(ca,{connectedEdges:qo((function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),ca.componentsOf=ca.components;var ga=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 et,i=!1;if(t){if(t.length>0&&x(t[0])&&!T(t[0])){i=!0;for(var a=[],s=new nt,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 L=e.length===o.length?o:new ga(i,e),F=0;F0&&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?O.emitAndNotify("remove"):t&&O.emit("remove"));for(var E=0;E=.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 wa=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}}(),xa=function(e,t,n,r){var o=_a(e,t,n,r);return function(e,t,n){return e+(t-e)*o(n)}},Oa={linear:function(e,t,n){return e+(t-e)*n},ease:xa(.25,.1,.25,1),"ease-in":xa(.42,0,1,1),"ease-out":xa(0,0,.58,1),"ease-in-out":xa(.42,0,.58,1),"ease-in-sine":xa(.47,0,.745,.715),"ease-out-sine":xa(.39,.575,.565,1),"ease-in-out-sine":xa(.445,.05,.55,.95),"ease-in-quad":xa(.55,.085,.68,.53),"ease-out-quad":xa(.25,.46,.45,.94),"ease-in-out-quad":xa(.455,.03,.515,.955),"ease-in-cubic":xa(.55,.055,.675,.19),"ease-out-cubic":xa(.215,.61,.355,1),"ease-in-out-cubic":xa(.645,.045,.355,1),"ease-in-quart":xa(.895,.03,.685,.22),"ease-out-quart":xa(.165,.84,.44,1),"ease-in-out-quart":xa(.77,0,.175,1),"ease-in-quint":xa(.755,.05,.855,.06),"ease-out-quint":xa(.23,1,.32,1),"ease-in-out-quint":xa(.86,0,.07,1),"ease-in-expo":xa(.95,.05,.795,.035),"ease-out-expo":xa(.19,1,.22,1),"ease-in-out-expo":xa(1,0,0,1),"ease-in-circ":xa(.6,.04,.98,.335),"ease-out-circ":xa(.075,.82,.165,1),"ease-in-out-circ":xa(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Oa.linear;var r=wa(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":xa};function Ea(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 Sa(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Ta(e,t,n,r,o){var i=null!=o?o.type:null;n<0?n=0:n>1&&(n=1);var a=Sa(e,o),s=Sa(t,o);if(O(a)&&O(s))return Ea(i,a,s,n,r);if(w(a)&&w(s)){for(var u=[],l=0;l0?("spring"===f&&h.push(a.duration),a.easingImpl=Oa[f].apply(null,h)):a.easingImpl=Oa[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,y=a.position;if(y&&o&&!e.locked()){var g={};Ca(v.x,y.x)&&(g.x=Ta(v.x,y.x,d,p)),Ca(v.y,y.y)&&(g.y=Ta(v.y,y.y,d,p)),e.position(g)}var m=a.startPan,_=a.pan,w=i.pan,x=null!=_&&r;x&&(Ca(m.x,_.x)&&(w.x=Ta(m.x,_.x,d,p)),Ca(m.y,_.y)&&(w.y=Ta(m.y,_.y,d,p)),e.emit("pan"));var O=a.startZoom,E=a.zoom,S=null!=E&&r;S&&(Ca(O,E)&&(i.zoom=Rt(i.minZoom,Ta(O,E,d,p),i.maxZoom)),e.emit("zoom")),(x||S)&&e.emit("viewport");var T=a.style;if(T&&T.length>0&&o){for(var P=0;P=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||Aa(0,f,e),Pa(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 Ia={animate:Eo.animate(),animation:Eo.animation(),animated:Eo.animated(),clearQueue:Eo.clearQueue(),delay:Eo.delay(),delayAnimation:Eo.delayAnimation(),stop:Eo.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){ka(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&xe((function(n){ka(n,e),t()}))}()}}},ja={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&&T(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}},Ma=function(e){return b(e)?new zo(e):e},Ra={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Di(ja,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Ma(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Ma(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Ma(t),n),this},once:function(e,t,n){return this.emitter().one(e,Ma(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}};Eo.eventAliasesOn(Ra);var Na={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)}};Na.jpeg=Na.jpg;var Da={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=b(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new o(G({},e,{cy:t,eles:n}));Ve("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else Ve("A `name` must be specified to make a layout");else Ve("Layout options must be specified to make a layout")}};Da.createLayout=Da.makeLayout=Da.layout;var La={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)}};Ba.invalidateDimensions=Ba.resize;var Ua={collection:function(e,t){return b(e)?this.$(e):S(e)?e.collection():w(e)?(t||(t={}),new ga(this,e,t.unique,t.removed)):new ga(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}};Ua.elements=Ua.filter=Ua.$;var za={},Va="t";za.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&&(y=1),s.color){var w=o.valueMin[0],x=o.valueMax[0],E=o.valueMin[1],S=o.valueMax[1],T=o.valueMin[2],P=o.valueMax[2],C=null==o.valueMin[3]?1:o.valueMin[3],A=null==o.valueMax[3]?1:o.valueMax[3],k=[Math.round(w+(x-w)*y),Math.round(E+(S-E)*y),Math.round(T+(P-T)*y),Math.round(C+(A-C)*y)];n={bypass:o.bypass,name:o.name,value:k,strValue:"rgb("+k[0]+", "+k[1]+", "+k[2]+")"}}else{if(!s.number)return!1;var I=o.valueMin+(o.valueMax-o.valueMin)*y;n=this.parse(o.name,I,o.bypass,h)}if(!n)return v(),!1;n.mapping=o,o=n;break;case a.data:for(var j=o.field.split("."),M=f.data,R=0;R0&&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)},za.checkTrigger=function(e,t,n,r,o,i){var a=this.properties[t],s=o(a);null!=s&&s(n,r)&&i(a)},za.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)}))},za.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(o){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!o.triggersBoundsOfParallelBeziers||"curve-style"!==t||"bezier"!==n&&"bezier"!==r||e.parallelEdges().forEach((function(e){e.dirtyBoundingBoxCache()})),!o.triggersBoundsOfConnectedEdges||"display"!==t||"none"!==n&&"none"!==r||e.connectedEdges().forEach((function(e){e.dirtyBoundingBoxCache()}))}))},za.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Ga={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){We("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 zo(l).invalid)We("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){We("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()):(We("Skipping property: Invalid property definition in: "+r),s()):(We("Skipping property: Invalid property name in: "+r),s())}if(f){a();break}o.selector(l);for(var y=0;y=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 We("`"+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 y=p.value,g=v.value;if(!(y[0]!==g[0]||y[1]!==g[1]||y[2]!==g[2]||y[3]!==g[3]&&(null!=y[3]&&1!==y[3]||null!=g[3]&&1!==g[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+/):w(t)?t:[t],f.evenMultiple&&m.length%2!=0)return null;for(var x=[],E=[],S=[],T="",P=!1,C=0;C0?" ":"")+A.strValue}return f.validate&&!f.validate(x,E)?null:f.singleEnum&&P?1===x.length&&b(x[0])?{name:e,value:x[0],strValue:x[0],bypass:n}:null:{name:e,value:x,pfValue:S,strValue:T,bypass:n,units:E}}var k,I,j,R=function(){for(var r=0;rf.max||f.strictMax&&t===f.max))return null;var V={name:e,value:t,strValue:""+t+(N||""),units:N,bypass:n};return f.unitless||"px"!==N&&"em"!==N?V.pfValue=t:V.pfValue="px"!==N&&N?this.getEmSizeInPixels()*t:t,"ms"!==N&&"s"!==N||(V.pfValue="ms"===N?t:1e3*t),"deg"!==N&&"rad"!==N||(V.pfValue="rad"===N?t:(k=t,Math.PI*k/180)),"%"===N&&(V.pfValue=t/100),V}if(f.propList){var G=[],Y=""+t;if("none"===Y);else{for(var q=Y.split(/\s*,\s*|\s+/),H=0;H255)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}(j)||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("^"+U+"$").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}(j);return K?{name:e,value:K,pfValue:K,strValue:"rgb("+K[0]+","+K[1]+","+K[2]+")",bypass:n}:null}if(f.regex||f.regexes){if(f.enums){var Z=R();if(Z)return Z}for(var $=f.regexes?f.regexes:[f.regex],Q=0;Q<$.length;Q++){var J=new RegExp($[Q]).exec(t);if(J)return{name:e,value:f.singleRegexMatchValue?J[1]:J,strValue:""+t,bypass:n}}return null}return f.string?{name:e,value:""+t,strValue:""+t,bypass:n}:f.enums?R():null};var Za=function e(t){if(!(this instanceof e))return new e(t);C(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):Ve("A style must have a core reference")},$a=Za.prototype;$a.instanceString=function(){return"style"},$a.clear=function(){for(var e=this._private,t=e.cy.elements(),n=0;n0&&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),O(e)?n=e:x(e)&&(n=e.level,null!=e.position?t=Ot(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;O(u.x)&&(t.pan.x=u.x,a=!1),O(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(b(e)){var n=e;e=this.mutableElements().filter(n)}else S(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}};Ja.centre=Ja.center,Ja.autolockNodes=Ja.autolock,Ja.autoungrabifyNodes=Ja.autoungrabify;var es={data:Eo.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Eo.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Eo.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Eo.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};es.attr=es.data,es.removeAttr=es.removeData;var ts=function(e){var t=this,n=(e=G({},e)).container;n&&!E(n)&&E(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!==h&&void 0!==n&&!e.headless,a=e;a.layout=G({name:i?"grid":"null"},a.layout),a.renderer=G({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 ga(this),listeners:[],aniEles:new ga(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:O(a.zoom)?a.zoom:1,pan:{x:x(a.pan)&&O(a.pan.x)?a.pan.x:0,y:x(a.pan)&&O(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=G({},a,a.renderer);t.initRenderer(l),function(e,t){if(e.some(I))return xr.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&&(x(e)||w(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=G({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,(function(){t.startAnimationLoop(),u.ready=!0,_(a.ready)&&t.on("ready",a.ready);for(var e=0;e0,l=Nt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(S(n.roots))e=n.roots;else if(w(n.roots)){for(var c=[],f=0;f0;){var j=A.shift(),M=C(j,k);if(M)j.outgoers().filter((function(e){return e.isNode()&&o.has(e)})).forEach(I);else if(null===M){We("Detected double maximal shift for node `"+j.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}P();var R=0;if(n.avoidOverlap)for(var N=0;N0&&g[0].length<=3?u/2:0),f=2*Math.PI/g[r].length*o;return 0===r&&1===g[0].length&&(c=1),{x:X+c*Math.cos(f),y:K+c*Math.sin(f)}}return{x:X+(o+1-(i+1)/2)*a,y:(r+1)*s}})),this};var us={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 ls(e){this.options=G({},us,e)}ls.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=Nt(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 y=Math.cos(c)-Math.cos(0),g=Math.sin(c)-Math.sin(0),m=Math.sqrt(f*f/(y*y+g*g));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 cs,fs={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 hs(e){this.options=G({},fs,e)}hs.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=Nt(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)>=y&&(m=[],g.push(m)),m.push(_)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var x=g.length>0&&g[0].length>1,O=(Math.min(a.w,a.h)/2-w)/(g.length+x?1:0);w=Math.min(w,O)}for(var E=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));E=Math.max(I,E)}T.r=E,E+=w}if(t.equidistant){for(var j=0,M=0,R=0;R=e.numIter||(ws(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&i(),xe(t)):(Ms(r,e),s())}();else{for(;l;)l=a(u),u++;Ms(r,e),s()}return this},ps.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},ps.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var vs=function(e,t,n){for(var r=n.eles.edges(),o=n.eles.nodes(),i=Nt(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(x),l=0;lr.count?0:r.graph},gs=function e(t,n,r,o){var i=o.graphSet[r];if(-10)var s=(l=r.nodeOverlap*a)*o/(v=Math.sqrt(o*o+i*i)),u=l*i/v;else{var l,c=Ts(e,o,i),f=Ts(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)}},Ss=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},Ts=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},Ps=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}}}}},As=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},js=function e(t,n){var r=t.parentId;if(null!=r){var o=n.layoutNodes[n.idToIndex[r]],i=!1;return(null==o.maxX||t.maxX+o.padRight>o.maxX)&&(o.maxX=t.maxX+o.padRight,i=!0),(null==o.minX||t.minX-o.padLefto.maxY)&&(o.maxY=t.maxY+o.padBottom,i=!0),(null==o.minY||t.minY-o.padTopp&&(f+=d+t.componentSpacing,c=0,h=0,d=0)}}},Rs={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 Ns(e){this.options=G({},Rs,e)}Ns.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=Nt(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(g+1):c(y+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++)},M={},R=0;R(r=Xt(e,t,_[w],_[w+1],_[w+2],_[w+3])))return y(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=Ht(e,t,_[w],_[w+1],_[w+2],_[w+3],_[w+4],_[w+5])))return y(n,r),!0;m=m||o.source,b=b||o.target;var x=a.getArrowWidth(u,c),O=[{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&&(g(m),g(b))}function b(e,t,n){return Qe(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,g=s.x2+a-h,m=s.y1-a-d,_=s.y2+a-d;if(f){var w=Math.cos(f),x=Math.sin(f),O=function(e,t){return{x:(e-=l)*w-(t-=c)*x+l,y:e*x+t*w+c}},E=O(v,m),S=O(v,_),T=O(g,m),P=O(g,_),C=[E.x+h,E.y+d,T.x+h,T.y+d,P.x+h,P.y+d,S.x+h,S.y+d];if(Kt(e,t,C))return y(n),!0}else if(Vt(s,e,t))return y(n),!0}}n&&(u=u.interactive);for(var w=u.length-1;w>=0;w--){var x=u[w];x.isNode()?g(x)||_(x):m(x)||_(x)||_(x,"source")||_(x,"target")}return l},getAllInBox:function(e,t,n,r){for(var o,i,a=this.getCachedZSortedEles().interactive,s=[],u=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),f=Math.max(t,r),h=Nt({x1:e=u,y1:t=c,x2:n=l,y2:r=f}),d=0;d4&&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!==fu?pu(t,e,hu):((a=hu).x=-1*(i=du).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),pu(t,n,du),$s=hu.nx*du.ny-hu.ny*du.nx,Qs=hu.nx*du.nx-hu.ny*-du.ny,tu=Math.asin(Math.max(-1,Math.min(1,$s))),Math.abs(tu)<1e-6)return Ks=t.x,Zs=t.y,void(ru=iu=0);Js=1,eu=!1,Qs<0?tu<0?tu=Math.PI+tu:(tu=Math.PI-tu,Js=-1,eu=!0):tu>0&&(Js=-1,eu=!0),iu=void 0!==t.radius?t.radius:r,nu=tu/2,au=Math.min(hu.len/2,du.len/2),o?(ou=Math.abs(Math.cos(nu)*iu/Math.sin(nu)))>au?(ou=au,ru=Math.abs(ou*Math.sin(nu)/Math.cos(nu))):ru=iu:(ou=Math.min(au,iu),ru=Math.abs(ou*Math.sin(nu)/Math.cos(nu))),lu=t.x+du.nx*ou,cu=t.y+du.ny*ou,Ks=lu-du.ny*ru*Js,Zs=cu+du.nx*ru*Js,su=t.x+hu.nx*ou,uu=t.y+hu.ny*ou,fu=t}(e,t,n,r,o),{cx:Ks,cy:Zs,radius:ru,startX:su,startY:uu,stopX:lu,stopY:cu,startAngle:hu.ang+Math.PI/2*Js,endAngle:du.ang-Math.PI/2*Js,counterClockwise:eu})}var gu={};function mu(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},P=T(E,x),C=T(S,O),A=!1;"auto"===y?v=Math.abs(P)>Math.abs(C)?o:r:y===u||y===s?(v=r,A=!0):y!==i&&y!==a||(v=o,A=!0);var k,I=v===r,j=I?C:P,M=I?S:E,R=Ct(M),N=!1;A&&(m||_)||!(y===s&&M<0||y===u&&M>0||y===i&&M>0||y===a&&M<0)||(j=(R*=-1)*Math.abs(j),N=!0);var D=function(e){return Math.abs(e)=Math.abs(j)},L=D(k=m?(b<0?1+b:b)*j:(b<0?j:0)+b*R),F=D(Math.abs(j)-Math.abs(k));if(!L&&!F||N)if(I){var B=l.y1+k+(p?f/2*R:0),U=l.x1,z=l.x2;n.segpts=[U,B,z,B]}else{var V=l.x1+k+(p?c/2*R:0),G=l.y1,W=l.y2;n.segpts=[V,G,V,W]}else if(I){var Y=Math.abs(M)<=f/2,q=Math.abs(E)<=h/2;if(Y){var H=(l.x1+l.x2)/2,X=l.y1,K=l.y2;n.segpts=[H,X,H,K]}else if(q){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(M)<=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)}},gu.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=!O(n.startX)||!O(n.startY),y=!O(n.arrowStartX)||!O(n.arrowStartY),g=!O(n.endX)||!O(n.endY),m=!O(n.arrowEndX)||!O(n.arrowEndY),b=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,_=At({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=_h.poolIndex()){var d=f;f=h,h=d}var p=s.srcPos=f.position(),v=s.tgtPos=h.position(),y=s.srcW=f.outerWidth(),g=s.srcH=f.outerHeight(),m=s.tgtW=h.outerWidth(),b=s.tgtH=h.outerHeight(),_=s.srcShape=n.nodeShapes[t.getNodeShape(f)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(h)],x=s.srcCornerRadius="auto"===f.pstyle("corner-radius").value?"auto":f.pstyle("corner-radius").pfValue,E=s.tgtCornerRadius="auto"===h.pstyle("corner-radius").value?"auto":h.pstyle("corner-radius").pfValue,S=s.tgtRs=h._private.rscratch,T=s.srcRs=f._private.rscratch;s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var P=0;P0){var q=l,H=kt(q,St(t)),X=kt(q,St(Y)),K=H;X2&&kt(q,{x:Y[2],y:Y[3]})0){var ue=c,le=kt(ue,St(t)),ce=kt(ue,St(se)),fe=le;ce2&&kt(ue,{x:se[2],y:se[3]})=l||m){c={cp:v,segment:g};break}}if(c)break}var b=c.cp,_=c.segment,w=(l-h)/_.length,x=_.t1-_.t0,O=s?_.t0+x*w:_.t1-x*w;O=Rt(0,O,1),t=Mt(b.p0,b.p1,b.p2,O),o=function(e,t,n,r){var o=Rt(0,r-.001,1),i=Rt(0,r+.001,1),a=Mt(e,t,n,o),s=Mt(e,t,n,i);return Eu(a,s)}(b.p0,b.p1,b.p2,O);break;case"straight":case"segments":case"haystack":for(var E,S,T,P,C=0,A=r.allpts.length,k=0;k+3=l));k+=2);var I=(l-S)/E;I=Rt(0,I,1),t=function(e,t,n,r){var o=t.x-e.x,i=t.y-e.y,a=At(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=Eu(T,P)}a("labelX",n,t.x),a("labelY",n,t.y),a("labelAutoAngle",n,o)}};l("source"),l("target"),this.applyLabelDimensions(e)}},xu.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},xu.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),o=this.calculateLabelDimensions(e,r),i=e.pstyle("line-height").pfValue,a=e.pstyle("text-wrap").strValue,s=Qe(n.rscratch,"labelWrapCachedLines",t)||[],u="wrap"!==a?1:Math.max(s.length,1),l=o.height/u,c=l*i,f=o.width,h=o.height+(u-1)*(i-1)*l;Je(n.rstyle,"labelWidth",t,f),Je(n.rscratch,"labelWidth",t,f),Je(n.rstyle,"labelHeight",t,h),Je(n.rscratch,"labelHeight",t,h),Je(n.rscratch,"labelLineHeight",t,c)},xu.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",o=e.pstyle(r+"label").strValue,i=e.pstyle("text-transform").value,a=function(e,r){return r?(Je(n.rscratch,e,t,r),r):Qe(n.rscratch,e,t)};if(!o)return"";"none"==i||("uppercase"==i?o=o.toUpperCase():"lowercase"==i&&(o=o.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var u=a("labelKey");if(null!=u&&a("labelWrapKey")===u)return a("labelWrapCachedText");for(var l=o.split("\n"),c=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,d=[],p=/[\s\u200b]+|$/g,v=0;vc){var b,_="",w=0,x=f(y.matchAll(p));try{for(x.s();!(b=x.n()).done;){var O=b.value,E=O[0],S=y.substring(w,O.index);w=O.index+E.length;var T=0===_.length?S:_+S+E;this.calculateLabelDimensions(e,T).width<=c?_+=S+E:(_&&d.push(_),_=S+E)}}catch(e){x.e(e)}finally{x.f()}_.match(/^[\s\u200b]+$/)||d.push(_)}else d.push(y)}a("labelWrapCachedLines",d),o=a("labelWrapCachedText",d.join("\n")),a("labelWrapKey",u)}else if("ellipsis"===s){var P=e.pstyle("text-max-width").pfValue,C="",A=!1;if(this.calculateLabelDimensions(e,o).widthP);k++)C+=o[k],k===o.length-1&&(A=!0);return A||(C+="…"),C}return o},xu.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"}},xu.calculateLabelDimensions=function(e,t){var n=this,r=n.cy.window().document,o=Ie(t,e._private.labelDimsKey),i=n.labelDimCache||(n.labelDimCache=[]),a=i[o];if(null!=a)return a;var s=e.pstyle("font-style").strValue,u=e.pstyle("font-size").pfValue,l=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,f=this.labelCalcCanvas,h=this.labelCalcCanvasContext;if(!f){f=this.labelCalcCanvas=r.createElement("canvas"),h=this.labelCalcCanvasContext=f.getContext("2d");var d=f.style;d.position="absolute",d.left="-9999px",d.top="-9999px",d.zIndex="-1",d.visibility="hidden",d.pointerEvents="none"}h.font="".concat(s," ").concat(c," ").concat(u,"px ").concat(l);for(var p=0,v=0,y=t.split("\n"),g=0;g1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var P=o(t);y&&(e.hoverData.tapholdCancelled=!0),n=!0,r(v,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var C=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(y){var A={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};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({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=v,v&&v.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}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("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==g||(g&&r(g,["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(y){if(a.boxSelectionEnabled()&&P)b&&b.grabbed()&&(f(w),b.emit("freeon"),w.emit("free"),e.dragData.didDrag&&(b.emit("dragfreeon"),w.emit("dragfree"))),C();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var j=!e.dragData.didDrag;j&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||l(w,{inDragLayer:!0});var M={x:0,y:0};if(O(_[0])&&O(_[1])&&(M.x+=_[0],M.y+=_[1],j)){var R=e.hoverData.dragDelta;R&&O(R[0])&&O(R[1])&&(M.x+=R[0],M.y+=R[1])}e.hoverData.draggingEles=!0,w.silentShift(M).emit("position 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 y&&(e.hoverData.dragging||!a.boxSelectionEnabled()||!P&&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=St(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);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var d={originalEvent:t,type:"cxttapend",position:{x:a[0],y:a[1]}};if(c?c.emit(d):i.emit(d),!e.hoverData.cxtDragged){var p={originalEvent:t,type:"cxttap",position:{x:a[0],y:a[1]}};c?c.emit(p):i.emit(p)}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 v=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),v.length>0&&e.redrawHint("eles",!0),i.emit({type:"boxend",originalEvent:t,position:{x:a[0],y:a[1]}});"additive"===i.selectionType()||h||i.$(n).unmerge(v).unselect(),v.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("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("freeon"),l.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),l.emit("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,S,T,P,C,A,k,I,j,M,R,N,D,L=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),o=n.pan(),i=e.projectIntoViewport(t.clientX,t.clientY),a=[i[0]*r+o.x,i[1]*r+o.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var u=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(u=e.gestureStartZoom*t.scale),n.zoom({level:u,renderedPosition:{x:a[0],y:a[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",L,!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||L(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 F,B,U,z,V,G,W,Y=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},q=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",F=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]}if(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]),t.touches[1]){e.touchData.singleTouchMoved=!0,f(e.dragData.touchDragEles);var u=e.findContainerClientCoords();j=u[0],M=u[1],R=u[2],N=u[3],E=t.touches[0].clientX-j,S=t.touches[0].clientY-M,T=t.touches[1].clientX-j,P=t.touches[1].clientY-M,D=0<=E&&E<=R&&0<=T&&T<=R&&0<=S&&S<=N&&0<=P&&P<=N;var h=n.pan(),p=n.zoom();if(C=Y(E,S,T,P),A=q(E,S,T,P),I=[((k=[(E+T)/2,(S+P)/2])[0]-h.x)/p,(k[1]-h.y)/p],A<4e4&&!t.touches[2]){var v=e.findNearestElement(o[0],o[1],!0,!0),y=e.findNearestElement(o[2],o[3],!0,!0);return v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:o[0],y:o[1]}}),e.touchData.start=v):y&&y.isNode()?(y.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:o[0],y:o[1]}}),e.touchData.start=y):n.emit({originalEvent:t,type:"cxttapstart",position:{x:o[0],y:o[1]}}),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 g=e.findNearestElements(o[0],o[1],!0,!0),b=g[0];if(null!=b&&(b.activate(),e.touchData.start=b,e.touchData.starts=g,e.nodeIsGrabbable(b))){var _=e.dragData.touchDragEles=n.collection(),w=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),b.selected()?(w=n.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),l(w,{addToList:_})):c(b,{addToList:_}),s(b);var x=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};b.emit(x("grabon")),w?w.forEach((function(e){e.emit(x("grab"))})):b.emit(x("grab"))}r(b,["touchstart","tapstart","vmousedown"],t,{x:o[0],y:o[1]}),null==b&&(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 O=e.touchData.startPosition=[null,null,null,null,null,null],L=0;L=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var w=t.touches[0].clientX-j,x=t.touches[0].clientY-M,k=t.touches[1].clientX-j,R=t.touches[1].clientY-M,N=q(w,x,k,R);if(N/A>=2.25||N>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var L={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(L),e.touchData.start=null):a.emit(L)}}if(n&&e.touchData.cxt){L={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}},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 F=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&F===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=F,F&&F.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),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),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var B=0;B0&&!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",U=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",z=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,s=e.cy,u=s.zoom(),l=e.touchData.now,c=e.touchData.earlier;if(t.touches[0]){var h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);l[0]=h[0],l[1]=h[1]}if(t.touches[1]&&(h=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),l[2]=h[0],l[3]=h[1]),t.touches[2]&&(h=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),l[4]=h[0],l[5]=h[1]),o&&o.unactivate(),e.touchData.cxt){if(a={originalEvent:t,type:"cxttapend",position:{x:l[0],y:l[1]}},o?o.emit(a):s.emit(a),!e.touchData.cxtDragged){var d={originalEvent:t,type:"cxttap",position:{x:l[0],y:l[1]}};o?o.emit(d):s.emit(d)}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]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var p=s.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),s.emit({type:"boxend",originalEvent:t,position:{x:l[0],y:l[1]}}),p.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),p.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 v=e.dragData.touchDragEles;if(null!=o){var y=o._private.grabbed;f(v),e.redrawHint("drag",!0),e.redrawHint("eles",!0),y&&(o.emit("freeon"),v.emit("free"),e.dragData.didDrag&&(o.emit("dragfreeon"),v.emit("dragfree"))),r(o,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]}),o.unactivate(),e.touchData.start=null}else{var g=e.findNearestElement(l[0],l[1],!0,!0);r(g,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]})}var m=e.touchData.startPosition[0]-l[0],b=m*m,_=e.touchData.startPosition[1]-l[1],w=(b+_*_)*u*u;e.touchData.singleTouchMoved||(o||s.$(":selected").unselect(["tapunselect"]),r(o,["tap","vclick"],t,{x:l[0],y:l[1]}),V=!1,t.timeStamp-W<=s.multiClickDebounceTime()?(G&&clearTimeout(G),V=!0,W=null,r(o,["dbltap","vdblclick"],t,{x:l[0],y:l[1]})):(G=setTimeout((function(){V||r(o,["onetap","voneclick"],t,{x:l[0],y:l[1]})}),s.multiClickDebounceTime()),W=t.timeStamp)),null!=o&&!e.dragData.didDrag&&o._private.selectable&&w2){for(var d=[c[0],c[1]],p=Math.pow(d[0]-e,2)+Math.pow(d[1]-t,2),v=1;v0)return v[0]}return null},d=Object.keys(f),p=0;p0?l:Wt(o,i,e,t,n,r,a,s)},checkPoint:function(e,t,n,r,o,i,a,s){var u=2*(s="auto"===s?ln(r,o):s);if(Zt(e,t,this.points,i,a,r,o-u,[0,-1],n))return!0;if(Zt(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!!Kt(e,t,[i-l,a-c,i-l,a,i+l,a,i+l,a-c])||!!Jt(e,t,u,u,i+r/2-s,a+o/2-s,n)||!!Jt(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",an(3,0)),this.generateRoundPolygon("round-triangle",an(3,0)),this.generatePolygon("rectangle",an(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",an(5,0)),this.generateRoundPolygon("round-pentagon",an(5,0)),this.generatePolygon("hexagon",an(6,0)),this.generateRoundPolygon("round-hexagon",an(6,0)),this.generatePolygon("heptagon",an(7,0)),this.generateRoundPolygon("round-heptagon",an(7,0)),this.generatePolygon("octagon",an(8,0)),this.generateRoundPolygon("round-octagon",an(8,0));var r=new Array(20),o=un(5,0),i=un(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*Nu)break;var y=e.deq(t,f,c);if(!(y.length>0))break;for(var g=0;g0&&(e.onDeqd(t,l),!o&&e.shouldRedraw(t,l,f,c)&&r())}),o(t))}}},Lu=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Be;n(this,e),this.idsByKey=new et,this.keyForId=new et,this.cachesByLvl=new et,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=r}return o(e,[{key:"getIdsFor",value:function(e){null==e&&Ve("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new nt,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 et,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)}}]),e}(),Fu={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Bu=Ke({getKey:null,doesEleInvalidateKey:Be,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Fe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Uu=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Bu(t);G(n,r),n.lookup=new Lu(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},zu=Uu.prototype;zu.reasons=Fu,zu.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},zu.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},zu.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new lt((function(e,t){return t.reqs-e.reqs}))},zu.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},zu.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(Pt(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),y=v[v.length-2],g=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};y||(y=v[v.length-1]),y||(y=g()),y.width-y.usedWidthr;P--)S=i.getElement(e,t,n,P,Fu.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;y.context.translate(y.usedWidth,0),y.context.scale(l,l),this.drawElement(y.context,e,t,h,!1),y.context.scale(1/l,1/l),y.context.translate(-y.usedWidth,0)}return p={x:y.usedWidth,texture:y,level:r,scale:l,width:f,height:c,scaledLabelShown:h},y.usedWidth+=Math.ceil(f+8),y.eleCaches.push(p),u.set(e,r,p),i.checkTextureFullness(y),p},zu.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},zu.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?Ze(t,e):e.fullnessChecks++},zu.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;Ze(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,$e(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),Ze(r,i),n.push(i),i}},zu.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}},zu.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,Fu.dequeue)}}return o},zu.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=Le,t.updateItem(o),t.pop(),n[r]=null):o.eles.unmerge(e))},zu.onDequeue=function(e){this.onDequeues.push(e)},zu.offDequeue=function(e){Ze(this.onDequeues,e)},zu.setupDequeueing=Du({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&&Ze(c,a)}}();var f=function(t){var o=(t=t||{}).after;!function(){if(!a){a=Nt();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||!Gt(h.bb,y.boundingBox()))&&!(h=f({insert:!0,after:h})))return null;s||p?r.queueLayer(h,y):r.drawEleInLayer(h,y,n,t),h.eles.push(y),m[n]=h}}return s||(p?null:c)},Gu.getEleLevelForLayerLevel=function(e,t){return e},Gu.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))},Gu.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},Gu.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},Gu.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=Oe(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},Gu.invalidateLayer=function(e){if(this.lastInvalidationTime=Oe(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];Ze(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,y=t.pstyle("line-outline-color").value,g=l*c,m=l*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;"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,O=t.pstyle("ghost-opacity").value,E=g*O;e.translate(w,x),b(E),_(E),e.translate(-w,-x)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;e.lineWidth=d+v,e.lineCap=p,v>0?(a.colorStrokeStyle(e,y[0],y[1],y[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)}}},sl=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")}}}};al.drawEdgeOverlay=sl("overlay"),al.drawEdgeUnderlay=sl("underlay"),al.drawEdgePath=function(e,t,n,r){var o,i=e._private.rscratch,a=t,s=!1,u=this.usePaths(),l=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(u){var h=n.join("$");i.pathCacheKey&&i.pathCacheKey===h?(o=t=i.pathCache,s=!0):(o=t=new Path2D,i.pathCacheKey=h,i.pathCache=o)}if(a.setLineDash)switch(r){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(l),a.lineDashOffset=c;break;case"solid":a.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+35&&void 0!==arguments[5]?arguments[5]:5,a=arguments.length>6?arguments[6]:void 0;e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+o-i),e.quadraticCurveTo(t+r,n+o,t+r-i,n+o),e.lineTo(t+i,n+o),e.quadraticCurveTo(t,n+o,t,n+o-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),a?e.stroke():e.fill()}ll.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),o=Math.ceil(Pt(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)},ll.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)},ll.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",o=e.pstyle(r+"text-rotation"),i=Qe(n,"labelAngle",t);return"autorotate"===o.strValue?e.isEdge()?i:0:"none"===o.strValue?0:o.pfValue},ll.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=Qe(i,"labelX",n),c=Qe(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=Qe(i,"labelWidth",n),v=Qe(i,"labelHeight",n),y=t.pstyle(d+"text-margin-x").pfValue,g=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+=y,c+=g,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,O=t.pstyle("text-border-width").pfValue,E=t.pstyle("text-background-padding").pfValue,S=0===t.pstyle("text-background-shape").strValue.indexOf("round");if(w>0||O>0&&x>0){var T=l-E;switch(b){case"left":T-=p;break;case"center":T-=p/2}var P=c-v-E,C=p+2*E,A=v+2*E;if(w>0){var k=e.fillStyle,I=t.pstyle("text-background-color").value;e.fillStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+w*a+")",S?cl(e,T,P,C,A,2):e.fillRect(T,P,C,A),e.fillStyle=k}if(O>0&&x>0){var j=e.strokeStyle,M=e.lineWidth,R=t.pstyle("text-border-color").value,N=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+R[0]+","+R[1]+","+R[2]+","+x*a+")",e.lineWidth=O,e.setLineDash)switch(N){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=O/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(S?cl(e,T,P,C,A,2,"stroke"):e.strokeRect(T,P,C,A),"double"===N){var D=O/2;S?cl(e,T+D,P+D,C-2*D,A-2*D,2,"stroke"):e.strokeRect(T+D,P+D,C-2*D,A-2*D)}e.setLineDash&&e.setLineDash([]),e.lineWidth=M,e.strokeStyle=j}}var L=2*t.pstyle("text-outline-width").pfValue;if(L>0&&(e.lineWidth=L),"wrap"===t.pstyle("text-wrap").value){var F=Qe(i,"labelWrapCachedLines",n),B=Qe(i,"labelLineHeight",n),U=p/2,z=this.getLabelJustification(t);switch("auto"===z||("left"===b?"left"===z?l+=-p:"center"===z&&(l+=-U):"center"===b?"left"===z?l+=-U:"right"===z&&(l+=U):"right"===b&&("center"===z?l+=U:"right"===z&&(l+=p))),_){case"top":case"center":case"bottom":c-=(F.length-1)*B}for(var V=0;V0&&e.strokeText(F[V],l,c),e.fillText(F[V],l,c),c+=B}else L>0&&e.strokeText(f,l,c),e.fillText(f,l,c);0!==h&&(e.rotate(-h),e.translate(-s,-u))}}};var fl={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(O(f.x)&&O(f.y)&&(!s||t.visible())){var h,d,p=s?t.effectiveOpacity():1,v=u.usePaths(),y=!1,g=t.padding();r=t.width()+2*g,o=t.height()+2*g,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]:C;u.eleFillStyle(e,t,n)},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;u.colorStrokeStyle(e,A[0],A[1],A[2],t)},Y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U;u.colorStrokeStyle(e,F[0],F[1],F[2],t)},q=function(e,t,n,r){var o,i=u.nodePathCache=u.nodePathCache||[],a=je("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+V),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}},H=t.pstyle("shape").strValue,X=t.pstyle("shape-polygon-points").pfValue;if(v){e.translate(f.x,f.y);var K=q(r,o,H,X);h=K.path,y=K.cacheHit}var Z=function(){if(!y){var n=f;v&&(n={x:0,y:0}),u.nodeShapes[u.getNodeShape(t)].draw(h||e,n.x,n.y,r,o,V,c)}v?e.fill(h):e.fill()},$=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)},Q=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,V,c)))},J=function(){var t=(T>0?T:-T)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:p),n=T>0?0:255;0!==T&&(u.colorFillStyle(e,n,n,n,t),v?e.fill(h):e.fill())},ee=function(){if(P>0){if(e.lineWidth=P,e.lineCap=j,e.lineJoin=I,e.setLineDash)switch(k){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(R),e.lineDashOffset=N;break;case"solid":case"double":e.setLineDash([])}if("center"!==M){if(e.save(),e.lineWidth*=2,"inside"===M)v?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-P,-o/2-P,r+2*P,o+2*P),t.addPath(h),e.clip(t,"evenodd")}v?e.stroke(h):e.stroke(),e.restore()}else v?e.stroke(h):e.stroke();if("double"===k){e.lineWidth=P/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",v?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},te=function(){if(L>0){if(e.lineWidth=L,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=P;"inside"===M&&(a=0),"outside"===M&&(a*=2);var s,l=(r+a+(L+z))/r,c=(o+a+(L+z))/o,h=r*l,d=o*c,p=u.nodeShapes[i].points;if(v&&(s=q(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 y=0,g=0,m=0;"round-diamond"===i?y=1.4*(a+z+L):"round-heptagon"===i?(y=1.075*(a+z+L),m=-(a/2+z+L)/35):"round-hexagon"===i?y=1.12*(a+z+L):"round-pentagon"===i?(y=1.13*(a+z+L),m=-(a/2+z+L)/15):"round-tag"===i?(y=1.12*(a+z+L),g=.07*(a/2+L+z)):"round-triangle"===i&&(y=(a+z+L)*(Math.PI/2),m=-(a+z/2+L)/Math.PI),0!==y&&(h=r*(l=(r+y)/r),["round-hexagon","round-tag"].includes(i)||(d=o*(c=(o+y)/o)));for(var b=h/2,_=d/2,w=(V="auto"===V?cn(h,d):V)+(a+L+z)/2,x=new Array(p.length/2),O=new Array(p.length/2),E=0;E0){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()}}}};fl.drawNodeOverlay=hl("overlay"),fl.drawNodeUnderlay=hl("underlay"),fl.hasPie=function(e){return(e=e[0])._private.hasPie},fl.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var o=t.cy().style(),i=t.pstyle("pie-size"),a=r.x,s=r.y,u=t.width(),l=t.height(),c=Math.min(u,l)/2,f=0;this.usePaths()&&(a=0,s=0),"%"===i.units?c*=i.pfValue:void 0!==i.pfValue&&(c=i.pfValue/2);for(var h=1;h<=o.pieBackgroundN;h++){var d=t.pstyle("pie-"+h+"-background-size").value,p=t.pstyle("pie-"+h+"-background-color").value,v=t.pstyle("pie-"+h+"-background-opacity").value*n,y=d/100;y+f>1&&(y=1-f);var g=1.5*Math.PI+2*Math.PI*f,m=g+2*Math.PI*y;0===d||f>=1||f+y>1||(e.beginPath(),e.moveTo(a,s),e.arc(a,s,c,g,m),e.closePath(),this.colorFillStyle(e,p[0],p[1],p[2],v),e.fill(),f+=y)}};for(var dl={getPixelRatio:function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},paintCache:function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,o=0;oa.minMbLowQualFrames&&(a.motionBlurPxRatio=a.mbPxRBlurry)),a.clearingMotionBlur&&(a.motionBlurPxRatio=1),a.textureDrawLastFrame&&!f&&(c[a.NODE]=!0,c[a.SELECT_BOX]=!0);var m=u.style(),b=u.zoom(),_=void 0!==o?o:b,w=u.pan(),x={x:w.x,y:w.y},O={zoom:b,pan:{x:w.x,y:w.y}},E=a.prevViewport;void 0===E||O.zoom!==E.zoom||O.pan.x!==E.pan.x||O.pan.y!==E.pan.y||v&&!p||(a.motionBlurPxRatio=1),i&&(x=i),_*=s,x.x*=s,x.y*=s;var S=a.getCachedZSortedEles();function T(e,t,n,r,o){var i=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",a.colorFillStyle(e,255,255,255,a.motionBlurTransparency),e.fillRect(t,n,r,o),e.globalCompositeOperation=i}function P(e,r){var s,u,c,f;a.clearingMotionBlur||e!==l.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]&&e!==l.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]?(s=x,u=_,c=a.canvasWidth,f=a.canvasHeight):(s={x:w.x*d,y:w.y*d},u=b*d,c=a.canvasWidth*d,f=a.canvasHeight*d),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?T(e,0,0,c,f):t||void 0!==r&&!r||e.clearRect(0,0,c,f),n||(e.translate(s.x,s.y),e.scale(u,u)),i&&e.translate(i.x,i.y),o&&e.scale(o,o)}if(f||(a.textureDrawLastFrame=!1),f){if(a.textureDrawLastFrame=!0,!a.textureCache){a.textureCache={},a.textureCache.bb=u.mutableElements().boundingBox(),a.textureCache.texture=a.data.bufferCanvases[a.TEXTURE_BUFFER];var C=a.data.bufferContexts[a.TEXTURE_BUFFER];C.setTransform(1,0,0,1,0,0),C.clearRect(0,0,a.canvasWidth*a.textureMult,a.canvasHeight*a.textureMult),a.render({forcedContext:C,drawOnlyNodeLayer:!0,forcedPxRatio:s*a.textureMult}),(O=a.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:a.canvasWidth,height:a.canvasHeight}).mpan={x:(0-O.pan.x)/O.zoom,y:(0-O.pan.y)/O.zoom}}c[a.DRAG]=!1,c[a.NODE]=!1;var A=l.contexts[a.NODE],k=a.textureCache.texture;O=a.textureCache.viewport,A.setTransform(1,0,0,1,0,0),h?T(A,0,0,O.width,O.height):A.clearRect(0,0,O.width,O.height);var I=m.core("outside-texture-bg-color").value,j=m.core("outside-texture-bg-opacity").value;a.colorFillStyle(A,I[0],I[1],I[2],j),A.fillRect(0,0,O.width,O.height),b=u.zoom(),P(A,!1),A.clearRect(O.mpan.x,O.mpan.y,O.width/O.zoom/s,O.height/O.zoom/s),A.drawImage(k,O.mpan.x,O.mpan.y,O.width/O.zoom/s,O.height/O.zoom/s)}else a.textureOnViewport&&!t&&(a.textureCache=null);var M=u.extent(),R=a.pinching||a.hoverData.dragging||a.swipePanning||a.data.wheelZooming||a.hoverData.draggingEles||a.cy.animated(),N=a.hideEdgesOnViewport&&R,D=[];if(D[a.NODE]=!c[a.NODE]&&h&&!a.clearedForMotionBlur[a.NODE]||a.clearingMotionBlur,D[a.NODE]&&(a.clearedForMotionBlur[a.NODE]=!0),D[a.DRAG]=!c[a.DRAG]&&h&&!a.clearedForMotionBlur[a.DRAG]||a.clearingMotionBlur,D[a.DRAG]&&(a.clearedForMotionBlur[a.DRAG]=!0),c[a.NODE]||n||r||D[a.NODE]){var L=h&&!D[a.NODE]&&1!==d;P(A=t||(L?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]:l.contexts[a.NODE]),h&&!L?"motionBlur":void 0),N?a.drawCachedNodes(A,S.nondrag,s,M):a.drawLayeredElements(A,S.nondrag,s,M),a.debug&&a.drawDebugPoints(A,S.nondrag),n||h||(c[a.NODE]=!1)}if(!r&&(c[a.DRAG]||n||D[a.DRAG])&&(L=h&&!D[a.DRAG]&&1!==d,P(A=t||(L?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]:l.contexts[a.DRAG]),h&&!L?"motionBlur":void 0),N?a.drawCachedNodes(A,S.drag,s,M):a.drawCachedElements(A,S.drag,s,M),a.debug&&a.drawDebugPoints(A,S.drag),n||h||(c[a.DRAG]=!1)),a.showFps||!r&&c[a.SELECT_BOX]&&!n){if(P(A=t||l.contexts[a.SELECT_BOX]),1==a.selection[4]&&(a.hoverData.selecting||a.touchData.selecting)){b=a.cy.zoom();var F=m.core("selection-box-border-width").value/b;A.lineWidth=F,A.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",A.fillRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]),F>0&&(A.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",A.strokeRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]))}if(l.bgActivePosistion&&!a.hoverData.selecting){b=a.cy.zoom();var B=l.bgActivePosistion;A.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",A.beginPath(),A.arc(B.x,B.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),A.fill()}var U=a.lastRedrawTime;if(a.showFps&&U){U=Math.round(U);var z=Math.round(1e3/U);A.setTransform(1,0,0,1,0,0),A.fillStyle="rgba(255, 0, 0, 0.75)",A.strokeStyle="rgba(255, 0, 0, 0.75)",A.lineWidth=1,A.fillText("1 frame = "+U+" ms = "+z+" fps",0,20),A.strokeRect(0,30,250,20),A.fillRect(0,30,250*Math.min(z/60,1),20)}n||(c[a.SELECT_BOX]=!1)}if(h&&1!==d){var V=l.contexts[a.NODE],G=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_NODE],W=l.contexts[a.DRAG],Y=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_DRAG],q=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!g?e.clearRect(0,0,a.canvasWidth,a.canvasHeight):T(e,0,0,a.canvasWidth,a.canvasHeight);var r=d;e.drawImage(t,0,0,a.canvasWidth*r,a.canvasHeight*r,0,0,a.canvasWidth,a.canvasHeight)};(c[a.NODE]||D[a.NODE])&&(q(V,G,D[a.NODE]),c[a.NODE]=!1),(c[a.DRAG]||D[a.DRAG])&&(q(W,Y,D[a.DRAG]),c[a.DRAG]=!1)}a.prevViewport=O,a.clearingMotionBlur&&(a.clearingMotionBlur=!1,a.motionBlurCleared=!0,a.motionBlur=!0),h&&(a.motionBlurTimeout=setTimeout((function(){a.motionBlurTimeout=null,a.clearedForMotionBlur[a.NODE]=!1,a.clearedForMotionBlur[a.DRAG]=!1,a.motionBlur=!1,a.clearingMotionBlur=!f,a.mbFrames=0,c[a.NODE]=!0,c[a.DRAG]=!0,a.redraw()}),100)),t||u.emit("render")}},pl={drawPolygonPath:function(e,t,n,r,o,i){var a=r/2,s=o/2;e.beginPath&&e.beginPath(),e.moveTo(t+a*i[0],n+s*i[1]);for(var u=1;u0&&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},wl.png=function(e){return Ol(e,this.bufferCanvasImage(e),"image/png")},wl.jpg=function(e){return Ol(e,this.bufferCanvasImage(e),"image/jpeg")};var El=Tl,Sl=Tl.prototype;function Tl(e){var t=this,n=t.cy.window().document;t.data={canvases:new Array(Sl.CANVAS_LAYERS),contexts:new Array(Sl.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Sl.CANVAS_LAYERS),bufferCanvases:new Array(Sl.BUFFER_COUNT),bufferContexts:new Array(Sl.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"};d&&d.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var u=0;u{const n=Fl({headless:!0,styleEnabled:!1});n.add(e);const r={};return 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()}}))}}).run(),{positions:r}})(t,n);this.onmessage({data:r})}onmessage(){}close(){}}},zl=()=>new SharedWorker(new URL(a.p+a.u(574),a.b),{type:void 0,name:"CoseBilkentLayout"});var Vl=a(8353),Gl=a(8812),Wl=a(8362);const Yl=100,ql="up",Hl="down",Xl="left",Kl="right",Zl={[ql]:"BT",[Hl]:"TB",[Xl]:"RL",[Kl]:"LR"},$l=1/.38,Ql=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}},Jl=e=>{const t=new Vl.graphlib.Graph;return t.setGraph({}),t.setDefaultEdgeLabel((()=>({}))),t.graph().nodesep=75*e,t.graph().ranksep=75*e,t},ec=(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},tc=(e,t)=>{let n=ec(e,t.predecessors(e),t);return null===n&&(n=ec(e,t.successors(e),t)),n},nc=(e,t,n)=>{e.graph().ranker="tight-tree",e.graph().rankdir=Zl[t];const r=Vl.layout(e);for(const e of r.nodes()){const t=tc(e,r);null!==t&&(n[e]=t)}},rc=(e,t)=>Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)),oc=e=>{const t=[e[0]];let n={p1:e[0],p2:e[1]},r=rc(n.p1,n.p2);for(let o=2;o{const s=Jl(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)*$l*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=Wl.alg.components(e);if(r.length>1)for(const o of r){const r=Jl(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=>nc(e,o,u)));const e=(e=>"up"===e||e===Hl)(o),t=(e=>e===Hl||e===Kl)(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+Yl,height:t+Yl}):({width:e,height:t,...n})=>({...n,width:t+Yl,height:e+Yl}),i=r.map(Ql).map(o),a=n.map(Ql).map(o),u=i.concat(a);Gl(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(Ql),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)*Yl: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)+Yl}},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+=Yl+o.width}d=a+Yl};t?(p(),v()):(v(),p())}}else nc(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],y=f[0]-v[0],g=f[1]-v[1];for(const e in p)p[e].x+=y,p[e].y+=g;const m={};for(const e of s.edges()){const t=s.edge(e);if(t.points&&t.points.length>3){const n=oc(t.points);for(const e of n)e.x+=y,e.y+=g;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(){}}},ac=()=>new SharedWorker(new URL(a.p+a.u(654),a.b),{type:void 0,name:"HierarchicalLayout"});var sc=a(1635);function uc(){return"undefined"!=typeof process&&process.env?process.env:{}}var lc=a(9456),cc=a(524),fc=a(2321);function hc(e,t,n,r){var o,i=[e,t,n,r],a=(0,fc.Qd)(e)?e.event:e;if(!a||!(0,fc.Kg)(a))throw new Error("Event missing");var s=(0,fc.Qd)(e)?null!==(o=e.properties)&&void 0!==o?o:{}:(0,fc.Qd)(t)?t:{},u={};return(0,fc.Tn)(n)||(u=null!=n?n:{}),(0,fc.Qd)(e)&&!(0,fc.Tn)(t)&&(u=null!=t?t:{}),[a,s,u,i.find(fc.Tn)]}function dc(e,t,n,r,o){var i,a,s=null,u=null,l=[e,t,n,r,o],c=l.filter(fc.Kg);void 0!==c[0]&&void 0!==c[1]&&(s=c[0],u=c[1]),1===c.length&&(s=null,u=c[0]);var f=l.find(fc.Tn),h=l.filter((function(e){return null===u?(0,fc.Qd)(e):(0,fc.Qd)(e)||null===e})),d=null!==(i=h[0])&&void 0!==i?i:{},p=null!==(a=h[1])&&void 0!==a?a:{};return[s,u,d,p,f]}var pc=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}},Sc=function(){var e=document.querySelector("link[rel='canonical']");return xc(location.href,e&&e.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},Tc=function(e,t){void 0===t&&(t=Ec(Sc()));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,sc.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,sc.Cl)((0,sc.Cl)((0,sc.Cl)({},t),e.properties),e.name?{name:e.name}:{})),i.page=(0,sc.Cl)((0,sc.Cl)((0,sc.Cl)({},t),n),i.page)},Pc=a(3172),Cc=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return(0,sc.C6)(t,e),t}(Error),Ac="is not a string",kc="is not an object";var Ic=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(){}},jc=function(e){function t(t){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,wc.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,sc.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 Tc(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 Tc(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 Tc(s,a),s},t.prototype.identify=function(t,n,r,o,i){var a=e.prototype.identify.call(this,t,n,r,o);return Tc(a,i),a},t.prototype.group=function(t,n,r,o,i){var a=e.prototype.group.call(this,t,n,r,o);return Tc(a,i),a},t.prototype.alias=function(t,n,r,o,i){var a=e.prototype.alias.call(this,t,n,r,o);return Tc(a,i),a},t}(function(){function e(e){this.settings=new Ic(e)}return e.prototype.track=function(e,t,n,r){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize((0,sc.Cl)((0,sc.Cl)({},this.baseEvent()),{event:e,type:"track",properties:null!=t?t:{},options:(0,sc.Cl)({},n),integrations:(0,sc.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,sc.Cl)({},n),options:(0,sc.Cl)({},r),integrations:(0,sc.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,sc.Cl)((0,sc.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,sc.Cl)({},n),options:(0,sc.Cl)({},r),integrations:(0,sc.Cl)({},o)};return null!==e&&(i.category=e),null!==t&&(i.name=t),this.normalize((0,sc.Cl)((0,sc.Cl)({},this.baseEvent()),i))},e.prototype.identify=function(e,t,n,r){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize((0,sc.Cl)((0,sc.Cl)({},this.baseEvent()),{type:"identify",userId:e,traits:null!=t?t:{},options:(0,sc.Cl)({},n),integrations:r}))},e.prototype.group=function(e,t,n,r){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize((0,sc.Cl)((0,sc.Cl)({},this.baseEvent()),{type:"group",traits:null!=t?t:{},options:(0,sc.Cl)({},n),integrations:(0,sc.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,sc.Cl)({},n),integrations:(0,sc.Cl)({},r)};return null!==t&&(o.previousId=t),void 0===e?this.normalize((0,sc.Cl)((0,sc.Cl)({},o),this.baseEvent())):this.normalize((0,sc.Cl)((0,sc.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,Pc.J)(i,t,e[t]):(0,Pc.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,sc.Cl)((0,sc.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,sc.Cl)((0,sc.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,sc.Tt)(e,["options"]),f=(0,sc.Cl)((0,sc.Cl)((0,sc.Cl)((0,sc.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,fc.t2)(e))throw new Cc("Event","is nil");if("object"!=typeof e)throw new Cc("Event",kc)}(e),function(e){if(!(0,fc.Kg)(e.type))throw new Cc(".type",Ac)}(e),function(e){if(!(0,fc.Kg)(e.messageId))throw new Cc(".messageId",Ac)}(e),"track"===e.type&&(function(e){if(!(0,fc.Kg)(e.event))throw new Cc(".event",Ac)}(e),function(e){if(!(0,fc.Qd)(e.properties))throw new Cc(".properties",kc)}(e)),["group","identify"].includes(e.type)&&function(e){if(!(0,fc.Qd)(e.traits))throw new Cc(".traits",kc)}(e)}(f),f},e}()),Mc=function(e){return"addMiddleware"in e&&"destination"===e.type},Rc=a(5881),Nc=a(6115),Dc=a(9952),Lc=a(4980),Fc=function(e){function t(t){return e.call(this,"string"==typeof t?new Rc.x(4,t):t)||this}return(0,sc.C6)(t,e),t.prototype.flush=function(){return(0,sc.sH)(this,void 0,void 0,(function(){return(0,sc.YH)(this,(function(t){return(0,yc.a)()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(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(Nc.g,(function(){i.scheduleFlush(0)})),i}return(0,sc.C6)(t,e),t.prototype.register=function(e,t,n){return(0,sc.sH)(this,void 0,void 0,(function(){var r,o,i=this;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var r;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var t;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var t=this;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var t=this;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var t,n,r,o;return(0,sc.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 Dc.d&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return(0,sc.sH)(this,void 0,void 0,(function(){var e,t;return(0,sc.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,n,r=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)})),o=(t="type",n={},r.forEach((function(e){var r,o=void 0,i=e[t];void 0!==(o="string"!=typeof i?JSON.stringify(i):i)&&(n[o]=(0,sc.fX)((0,sc.fX)([],null!==(r=n[o])&&void 0!==r?r:[],!0),[e],!1))})),n),i=o.before,a=void 0===i?[]:i,s=o.enrichment,u=void 0===s?[]:s,l=o.destination,c=void 0===l?[]:l,f=o.after;return{before:a,enrichment:u,destinations:c,after:void 0===f?[]:f}},t.prototype.flushOne=function(e){var t,n;return(0,sc.sH)(this,void 0,void 0,(function(){var r,o,i,a,s,u,l,c,f,h,d,p,v,y;return(0,sc.YH)(this,(function(g){switch(g.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,g.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,sc.Cl)((0,sc.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,yc.a)()}),(function(){return(0,sc.sH)(r,void 0,void 0,(function(){var r;return(0,sc.YH)(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,(0,Lc.C)(r,e)]:[2];case 1:return o.sent()instanceof gc.o||n.push(r),[2]}}))}))}))];case 1:return o.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function Ef(e,t,n,r){var o=this;e||setTimeout((function(){return(0,sc.sH)(o,void 0,void 0,(function(){var e,o;return(0,sc.YH)(this,(function(i){switch(i.label){case 0:return e=!0,[4,Of(n,t)];case 1:return o=i.sent(),e=!1,t.todo>0&&r(e,o,n,r),[2]}}))}))}),5e3*Math.random())}var Sf=a(7947),Tf=function(e){return"Segment.io"===e.name};function Pf(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 Nc.M(e.queue.queue.maxAttempts,[]):new Rc.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:Sf.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="batching"===(null==p?void 0: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,sc.Tt)(t,["sentAt"])}));return(0,cc.h)("https://".concat(e,"/b"),{keepalive:(null==t?void 0:t.keepalive)||u,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:o,batch:i,sentAt:(new Date).toISOString()})}).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 bf("Rate limit exceeded: ".concat(e.status),r)}}))}}function d(e){var n;return void 0===e&&(e=1),(0,sc.sH)(this,void 0,void 0,(function(){var r;return(0,sc.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;gc.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,sc.Cl)((0,sc.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=(n=s,r=[],o=0,n.forEach((function(e){_f(r[o])>=64&&o++,r[o]?r[o].push(e):r[o]=[e]})),r).map(h);Promise.all(t).catch(console.error)}var n,r,o},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,sc.sH)(this,void 0,void 0,(function(){var e;return(0,sc.YH)(this,(function(r){return s.push(n),e=s.length>=l||function(e){return _f(e)>=450}(s)||(null==t?void 0:t.keepalive)&&function(e){return _f(e)>=54}(s),[2,e||u?d():p()]}))}))}}}(f,p.config):(a=null==p?void 0:p.config,{dispatch:function(e,t){return(0,cc.h)(e,{keepalive:null==a?void 0:a.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)}).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 bf("Rate limit exceeded: ".concat(e.status),r)}}))}});function y(r){return(0,sc.sH)(this,void 0,void 0,(function(){var o,i;return(0,sc.YH)(this,(function(a){return(0,yc.a)()?(u.push(r),Ef(c,u,g,Ef),[2,r]):(l.add(r),o=r.event.type.charAt(0),i=(0,mf.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)),[2,v.dispatch("".concat(d,"/").concat(o),wf(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 Ef(c,u,g,Ef),r})).finally((function(){l.delete(r)}))])}))}))}var g={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:y,identify:y,page:y,alias:y,group:y,screen:y};return u.todo&&Ef(c,u,g,Ef),g}var Cf="This is being deprecated and will be not be available in future releases of Analytics JS",Af=(0,rf.m)(),kf=null==Af?void 0:Af.analytics,If=function(){function e(e,t){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var e;return null===(e=t.plugins.find(Tf))||void 0===e?void 0:e.metadata},this.writeKey=e.writeKey,this.cdnSettings=null!==(n=e.cdnSettings)&&void 0!==n?n:{integrations:{},edgeFunction:{}},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 jf(){console.warn(Cf)}var Mf,Rf=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=jf,u.addIntegrationMiddleware=jf,u.listeners=jf,u.addEventListener=jf,u.removeAllListeners=jf,u.removeListener=jf,u.removeEventListener=jf,u.hasListeners=jf,u.add=jf,u.addIntegration=jf;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 Nc.M(r,[]):new Rc.x(r,e);return new Fc(o)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,c),u.settings=new If(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 Jc((0,sc.Cl)({persist:!c,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),u._group=null!=i?i:new tf((0,sc.Cl)({persist:!c,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),u.eventFactory=new jc(u._user),u.integrations=null!==(s=null==n?void 0:n.integrations)&&void 0!==s?s:{},u.options=null!=n?n:{},Bc(u),u}return(0,sc.C6)(t,e),t.prototype.createStore=function(e,t,n){return e?new Vc([new Gc]):t&&Wc(t)?new Vc(Zc($c(t.stores,n))):new Vc(Zc([Uc.LocalStorage,{name:Uc.Cookie,settings:n},Uc.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,Ff.p)(i)}return e}),{})}(a));var u=function(){var e=qc.get("_ga");if(e&&e.startsWith("amp"))return e}();u&&(o.amp={id:u}),function(e,t,n){var r,o=new Vc(n?[]:[new Xc(Uf())]),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"!==uc().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 y=T.sent(),[3,6];case 5:y=[],T.label=6;case 6:return v=y,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 g=m,b=(0,Df.J)(t,r),[4,Kf(t,n.integrations,b,r,d,h).catch((function(){return[]}))];case 12:return _=T.sent(),w=(0,sc.fX)((0,sc.fX)([Gf],v,!0),_,!0),g&&w.push(g),!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]:(O=(x=w).push,[4,Pf(n,b["Segment.io"],t.integrations)]);case 13:O.apply(x,[T.sent()]),T.label=14;case 14:return[4,n.register.apply(n,(0,sc.fX)((0,sc.fX)([],w,!1),f,!1))];case 15:return E=T.sent(),[4,lf(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,sc.sH)(S,void 0,void 0,(function(){var e,i;return(0,sc.YH)(this,(function(a){switch(a.label){case 0:return[4,o(E,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[2,E]}var P}))}))}var eh=function(e){function t(){var t=this,n=(0,Lf.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,h,d;return void 0===t&&(t={}),(0,sc.sH)(this,void 0,void 0,(function(){var p,v,y,g,m,b,_,w,x,O,E,S;return(0,sc.YH)(this,(function(T){switch(T.label){case 0:return!0===t.disable?[2,[new Nf,gc.o.system()]]:(t.globalAnalyticsKey&&(0,of.rY)(t.globalAnalyticsKey),e.cdnURL&&(0,lc.qQ)(e.cdnURL),t.initialPageview&&n.add(new pf("page",[])),p=null!==(r=e.cdnURL)&&void 0!==r?r:(0,lc.I2)(),null===(o=e.cdnSettings)||void 0===o?[3,1]:(y=o,[3,3]));case 1:return[4,(P=e.writeKey,C=p,(0,cc.h)("".concat(C,"/v1/projects/").concat(P,"/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:y=T.sent(),T.label=3;case 3:return v=y,t.updateCDNSettings&&(v=t.updateCDNSettings(v)),"function"!=typeof t.disable?[3,5]:[4,t.disable(v)];case 4:if(T.sent())return[2,[new Nf,gc.o.system()]];T.label=5;case 5:return g=null===(a=null===(i=v.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===a||a,t=(0,sc.Cl)({retryQueue:g},t),function(e){var t;null===(t=Zf.attach)||void 0===t||t.call(Zf,e)}(m=new Rf((0,sc.Cl)((0,sc.Cl)({},e),{cdnSettings:v,cdnURL:p}),t)),b=null!==(s=e.plugins)&&void 0!==s?s:[],_=null!==(u=e.classicIntegrations)&&void 0!==u?u:[],w=null===(l=t.integrations)||void 0===l?void 0:l["Segment.io"],$f.U.initRemoteMetrics((0,sc.Cl)((0,sc.Cl)({},v.metrics),{host:null!==(c=null==w?void 0:w.apiHost)&&void 0!==c?c:null===(f=v.metrics)||void 0===f?void 0:f.host,protocol:null==w?void 0:w.protocol})),[4,Jf(e.writeKey,v,m,t,b,_,n)];case 6:return x=T.sent(),O=null!==(h=window.location.search)&&void 0!==h?h:"",E=null!==(d=window.location.hash)&&void 0!==d?d:"",(S=O.length?O:E.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,m.queryString(S).catch(console.error)]:[3,8];case 7:T.sent(),T.label=8;case 8:return m.initialized=!0,m.emit("initialize",e,t),[4,Qf(m,n)];case 9:return T.sent(),[2,[m,x]]}var P,C}))}))}(t[0],t[1],e)}))}))||this,t._resolveLoadStart=function(e,t){return o([e,t])},t}return(0,sc.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}(gf),th={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 q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(o)return r?-1:q(e).length;t=(""+t).toLowerCase(),o=!0}}function y(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 g(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 O(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(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 M(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 R(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 F(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||j(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||j(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||j(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(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||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Q((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(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||W(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||j(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||j(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||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||j(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||j(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||j(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||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Q((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(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||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||j(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(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||M(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||M(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||M(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||M(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||M(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||M(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||M(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 R(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);M(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);M(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||M(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||M(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||M(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||M(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||M(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 R(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 F(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return F(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 B.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,o,i)}function G(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw G(e,n),new B.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.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 Y=/[^+/0-9A-Za-z-_]/g;function q(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 H(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).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,O,E=0,S=0,T=u,P=[],C=[],A=1,k=0,I=0,j=!1,M=!1,R="",N=i,D=r;"300 es"===(e=e||{}).version&&(N=s,D=a);var L={},F={};for(E=0;E0)continue;n=e.slice(0,1).join("")}return B(n),I+=n.length,(P=P.slice(n.length)).length}}function q(){return/[^a-fA-F0-9]/.test(t)?(B(P.join("")),T=u,E):(P.push(t),n=t,E+1)}function H(){return"."===t||/[eE]/.test(t)?(P.push(t),T=v,n=t,E+1):"x"===t&&1===P.length&&"0"===P[0]?(T=w,P.push(t),n=t,E+1):/[^\d]/.test(t)?(B(P.join("")),T=u,E):(P.push(t),n=t,E+1)}function X(){return"f"===t&&(P.push(t),n=t,E+=1),/[eE]/.test(t)?(P.push(t),n=t,E+1):("-"!==t&&"+"!==t||!/[eE]/.test(n))&&/[^\d]/.test(t)?(B(P.join("")),T=u,E):(P.push(t),n=t,E+1)}function K(){if(/[^\d\w_]/.test(t)){var e=P.join("");return T=F[e]?m:L[e]?g:y,B(P.join("")),T=u,E}return P.push(t),n=t,E+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,y=6,g=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]",y="[object Array]",g="[object Boolean]",m="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",x="[object Map]",O="[object Number]",E="[object Object]",S="[object Promise]",T="[object RegExp]",P="[object Set]",C="[object String]",A="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",j="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,H=RegExp(Y.source),X=RegExp(q.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\]$/,ye=/^0o[0-7]+$/i,ge=/^(?: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",Oe="\\u2700-\\u27bf",Ee="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+",je="["+Oe+"]",Me="["+Ee+"]",Re="[^"+we+Pe+Ie+Oe+Ee+Se+"]",Ne="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Se+"]",Ue="\\u200d",ze="(?:"+Me+"|"+Re+")",Ve="(?:"+Be+"|"+Re+")",Ge="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+ke+"|"+Ne+")?",qe="["+Te+"]?",He=qe+Ye+"(?:"+Ue+"(?:"+[De,Le,Fe].join("|")+")"+qe+Ye+")*",Xe="(?:"+[je,Le,Fe].join("|")+")"+He,Ke="(?:"+[De+ke+"?",ke,Le,Fe,Ce].join("|")+")",Ze=RegExp("['’]","g"),$e=RegExp(ke,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ke+He,"g"),Je=RegExp([Be+"?"+Me+"+"+Ge+"(?="+[Ae,Be,"$"].join("|")+")",Ve+"+"+We+"(?="+[Ae,Be+ze,"$"].join("|")+")",Be+"?"+ze+"+"+Ge,Be+"+"+We,"\\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[M]=ot[R]=ot[N]=ot[D]=ot[L]=ot[F]=ot[B]=ot[U]=ot[z]=!0,ot[v]=ot[y]=ot[I]=ot[g]=ot[j]=ot[m]=ot[b]=ot[_]=ot[x]=ot[O]=ot[E]=ot[T]=ot[P]=ot[C]=ot[k]=!1;var it={};it[v]=it[y]=it[I]=it[j]=it[g]=it[m]=it[M]=it[R]=it[N]=it[D]=it[L]=it[x]=it[O]=it[E]=it[T]=it[P]=it[C]=it[A]=it[F]=it[B]=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,yt=function(){try{return dt&&dt.require&&dt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),gt=yt&&yt.isArrayBuffer,mt=yt&&yt.isDate,bt=yt&&yt.isMap,_t=yt&&yt.isRegExp,wt=yt&&yt.isSet,xt=yt&&yt.isTypedArray;function Ot(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 Et(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--&&Bt(t,e[n],0)>-1;);return n}var en=Wt({À:"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=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});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,Oe=t.Math,Ee=t.Object,Se=t.RegExp,Te=t.String,Pe=t.TypeError,Ce=r.prototype,Ae=xe.prototype,ke=Ee.prototype,Ie=t["__core-js_shared__"],je=Ae.toString,Me=ke.hasOwnProperty,Re=0,Ne=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=ke.toString,Le=je.call(Ee),Fe=ft._,Be=Se("^"+je.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=pt?t.Buffer:o,ze=t.Symbol,Ve=t.Uint8Array,Ge=Ue?Ue.allocUnsafe:o,We=an(Ee.getPrototypeOf,Ee),Ye=Ee.create,qe=ke.propertyIsEnumerable,He=Ce.splice,Xe=ze?ze.isConcatSpreadable:o,Ke=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=ui(Ee,"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=Oe.ceil,dt=Oe.floor,vt=Ee.getOwnPropertySymbols,yt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Wt=Ce.join,pn=an(Ee.keys,Ee),vn=Oe.max,yn=Oe.min,gn=oe.now,mn=t.parseInt,bn=Oe.random,_n=Ce.reverse,wn=ui(t,"DataView"),xn=ui(t,"Map"),On=ui(t,"Promise"),En=ui(t,"Set"),Sn=ui(t,"WeakMap"),Tn=ui(Ee,"create"),Pn=Sn&&new Sn,Cn={},An=Di(wn),kn=Di(xn),In=Di(On),jn=Di(En),Mn=Di(Sn),Rn=ze?ze.prototype:o,Nn=Rn?Rn.valueOf:o,Dn=Rn?Rn.toString:o;function Ln(e){if(Ja(e)&&!Va(e)&&!(e instanceof zn)){if(e instanceof Un)return e;if(Me.call(e,"__wrapped__"))return Li(e)}return new Un(e)}var Fn=function(){function e(){}return function(t){if(!Qa(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Bn(){}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]&&Me.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(qa(e))return _o(e,u);if(h==E||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 g:case m:return new o(+e);case j:return function(e,t){var n=t?wo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case R:case N:case D:case L:case F:case B:case U:case z:return xo(e,n);case x:return new o;case O: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?Ee(Nn.call(r)):{}}}(e,h,u)}}a||(a=new qn);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 y=f?o:(c?l?ti:ei:l?ks:As)(e);return St(y||e,(function(r,o){y&&(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=Ee(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 Yn(t));e:for(;++o-1},Gn.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},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(xn||Gn),string:new Vn}},Wn.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return ai(this,e).get(e)},Wn.prototype.has=function(e){return ai(this,e).has(e)},Wn.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},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(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var lr=ko(gr),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):jt(o,s):r||(o[o.length]=s)}return o}var vr=Io(),yr=Io(!0);function gr(e,t){return e&&vr(e,t,As)}function mr(e,t){return e&&yr(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=yo(t,e)).length;null!=e&&nt}function Er(e,t){return null!=e&&Me.call(e,t)}function Sr(e,t){return null!=e&&t in Ee(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=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 zr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&He.call(s,u,1),He.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;vi(o)?He.call(e,o,1):so(e,o)}}return e}function Wr(e,t){return e+dt(bn()*(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 Ci(Oi(e,t,tu),e+"")}function Hr(e){return Xn(Fs(e))}function Xr(e,t){var n=Fs(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=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&&!as(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: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=Ge?Ge(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 Oo(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&&yi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Ee(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 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 ki(e){var t=0,n=0;return function(){var r=gn(),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){Me.call(e,n)?++e[n]:nr(e,n,1)})),pa=No(zi),va=No(Vi);function ya(e,t){return(Va(e)?St:lr)(e,ii(t,3))}function ga(e,t){return(Va(e)?Tt:cr)(e,ii(t,3))}var ma=Co((function(e,t,n){Me.call(e,n)?e[n].push(t):nr(e,n,[t])})),ba=qr((function(e,t,n){var o=-1,i="function"==typeof t,a=Wa(e)?r(e.length):[];return lr(e,(function(e){a[++o]=i?Ot(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[[],[]]})),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]]),Ur(e,pr(t,1),[])})),Ea=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=qr((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=qr((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 y(e){var n=e-c;return c===o||n>=t||n<0||d&&e-f>=s}function g(){var e=Ea();if(y(e))return m(e);l=Pi(g,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=Ea(),n=y(e);if(r=arguments,a=this,c=e,n){if(l===o)return function(e){return f=e,l=Pi(g,t),h?v(e):u}(c);if(d)return bo(l),l=Pi(g,t),v(c)}return l===o&&(l=Pi(g,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(Ea())},b}var ka=qr((function(e,t){return sr(e,1,t)})),Ia=qr((function(e,t,n){return sr(e,ps(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||Wn),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=Wn;var Ra=go((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 qr((function(r){for(var o=-1,i=yn(r.length,n);++o=t})),za=Cr(function(){return arguments}())?Cr:function(e){return Ja(e)&&Me.call(e,"callee")&&!qe.call(e,"callee")},Va=r.isArray,Ga=gt?Kt(gt):function(e){return Ja(e)&&xr(e)==I};function Wa(e){return null!=e&&$a(e.length)&&!Ka(e)}function Ya(e){return Ja(e)&&Wa(e)}var qa=yt||pu,Ha=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)==O}function ns(e){if(!Ja(e)||xr(e)!=E)return!1;var t=We(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.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=Go(Rr),ls=Go((function(e,t){return e<=t}));function cs(e){if(!e)return[];if(Wa(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:Fs)(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||ye.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function vs(e){return Po(e,ks(e))}function ys(e){return null==e?"":io(e)}var gs=Ao((function(e,t){if(_i(t)||Wa(t))Po(t,As(t),e);else for(var n in t)Me.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=qr((function(e,t){e=Ee(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})),Po(e,ti(e),n),r&&(n=ir(n,7,$o));for(var o=t.length;o--;)so(n,t[o]);return n})),Rs=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=Ho(As),Ls=Ho(ks);function Fs(e){return null==e?[]:Zt(e,As(e))}var Bs=Mo((function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)}));function Us(e){return Xs(ys(e).toLowerCase())}function zs(e){return(e=ys(e))&&e.replace(me,en).replace($e,"")}var Vs=Mo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=Mo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ws=jo("toLowerCase"),Ys=Mo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),qs=Mo((function(e,t,n){return e+(n?" ":"")+Xs(t)})),Hs=Mo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=jo("toUpperCase");function Ks(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 Zs=qr((function(e,t){try{return Ot(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 jr("function"==typeof e?e:ir(e,1))}var ru=qr((function(e,t){return function(n){return Pr(n,e,t)}})),ou=qr((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,jt([this.value()],arguments))})})),e}function au(){}var su=Uo(It),uu=Uo(Pt),lu=Uo(Nt);function cu(e){return gi(e)?Gt(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,yu=Bo((function(e,t){return e+t}),0),gu=Yo("ceil"),mu=Bo((function(e,t){return e/t}),1),bu=Yo("floor"),_u=Bo((function(e,t){return e*t}),1),wu=Yo("round"),xu=Bo((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=gs,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?yi(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=ys(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),qr((function(n){var r=n[t],o=mo(n,0,t);return r&&jt(o,r),Ot(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(Ri(ys(e)))},Ln.toPlainObject=vs,Ln.transform=function(e,t,n){var r=Va(e),o=r||qa(e)||ss(e);if(t=ii(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Qa(e)&&Ka(i)?Fn(We(e)):{}}return(o?St:gr)(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=Fs,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=yu,Ln.attempt=Zs,Ln.camelCase=Bs,Ln.capitalize=Us,Ln.ceil=gu,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=ys(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=Fa,Ln.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(q,tn):e},Ln.escapeRegExp=function(e){return(e=ys(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Ln.every=function(e,t,n){var r=Va(e)?Pt:fr;return n&&yi(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),gr)},Ln.findLast=va,Ln.findLastIndex=Vi,Ln.findLastKey=function(e,t){return Lt(e,ii(t,3),mr)},Ln.floor=bu,Ln.forEach=ya,Ln.forEachRight=ga,Ln.forIn=function(e,t){return null==e?e:vr(e,ii(t,3),ks)},Ln.forInRight=function(e,t){return null==e?e:yr(e,ii(t,3),ks)},Ln.forOwn=function(e,t){return e&&gr(e,ii(t,3))},Ln.forOwnRight=function(e,t){return e&&mr(e,ii(t,3))},Ln.get=Es,Ln.gt=Ba,Ln.gte=Ua,Ln.has=function(e,t){return null!=e&&hi(e,t,Er)},Ln.hasIn=Ss,Ln.head=Wi,Ln.identity=tu,Ln.includes=function(e,t,n,r){e=Wa(e)?e:Fs(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&&Bt(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)),Bt(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>=yn(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?"":Wt.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):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):Ft(e,zt,i,!0)},Ln.lowerCase=Gs,Ln.lowerFirst=Ws,Ln.lt=us,Ln.lte=ls,Ln.max=function(e){return e&&e.length?hr(e,tu,Or):o},Ln.maxBy=function(e,t){return e&&e.length?hr(e,ii(t,2),Or):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,Rr):o},Ln.minBy=function(e,t){return e&&e.length?hr(e,ii(t,2),Rr):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?Br(e,hs(t)):o},Ln.noConflict=function(){return ft._===this&&(ft._=Fe),this},Ln.noop=au,Ln.now=Ea,Ln.pad=function(e,t,n){e=ys(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=ys(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 yn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Wr(e,t)},Ln.reduce=function(e,t,n){var r=Va(e)?Mt:Yt,o=arguments.length<3;return r(e,ii(t,4),n,o,lr)},Ln.reduceRight=function(e,t,n){var r=Va(e)?Rt:Yt,o=arguments.length<3;return r(e,ii(t,4),n,o,cr)},Ln.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:hs(t),Yr(ys(e),t)},Ln.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Ln.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=ii(t),e-=d;for(var o=Ht(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,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(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=ys(e))&&H.test(e)?e.replace(Y,hn):e},Ln.uniqueId=function(e){var t=++Re;return ys(e)+t},Ln.upperCase=Hs,Ln.upperFirst=Xs,Ln.each=ya,Ln.eachRight=ga,Ln.first=Wi,iu(Ln,(vu={},gr(Ln,(function(e,t){Me.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__=yn(n,r.__takeCount__):r.__views__.push({size:yn(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=qr((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(Ma(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)},gr(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,jt([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 y=e.apply(t,s);return y.__actions__.push({func:fa,args:[f],thisArg:o}),new Un(y,h)}return p&&v?e.apply(this,s):(y=this.thru(f),p?r?y.value()[0]:y.value():y)})})),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)}))}})),gr(zn.prototype,(function(e,t){var n=Ln[t];if(n){var r=n.name+"";Me.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 Bn;){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 y},e.rollback=function(){return g},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"})),y=new l(18,[],(function(){return"COMMIT"})),g=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,y=n.afterComplete,g=n.server,m=n.highRecordWatermark,b=void 0===m?Number.MAX_VALUE:m,_=n.lowRecordWatermark,x=void 0===_?Number.MAX_VALUE:_,O=n.enrichMetadata,E=e.call(this)||this;return E._fieldKeys=null,E._fieldLookup=null,E._head=null,E._queuedRecords=[],E._tail=null,E._error=null,E._observers=[],E._meta={},E._server=g,E._beforeError=f,E._afterError=h,E._beforeKeys=d,E._afterKeys=p,E._beforeComplete=v,E._afterComplete=y,E._enrichMetadata=O||u.functional.identity,E._queryId=null,E._moreFunction=i,E._discardFunction=a,E._discard=!1,E._fetchSize=c,E._lowRecordWatermark=x,E._highRecordWatermark=b,E._setState(o?w.READY:w.READY_STREAMING),E._setupAutoPull(),E._paused=!1,E._pulled=!o,E._haveRecordStreamed=!1,E}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=g},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(),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 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)),y=n(7452),g=d(n(4132)),m=d(n(8987)),b=n(4455),_=n(7721),w=n(6781),x=p.error.SERVICE_UNAVAILABLE,O=p.error.SESSION_EXPIRED,E=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,j="Neo.ClientError.Database.DatabaseNotFound",M="Neo.ClientError.Transaction.InvalidBookmark",R="Neo.ClientError.Transaction.InvalidBookmarkMixture",N="Neo.ClientError.Security.AuthorizationExpired",D="Neo.ClientError.Statement.ArgumentError",L="Neo.ClientError.Request.Invalid",F="Neo.ClientError.Statement.TypeError",B="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,g=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 y.HostNameResolver,x._log=u,x._useSeedRouter=!0,x._routingTableRegistry=new G(g?(0,p.int)(g):z),x._refreshRoutingTable=w.functional.reuseOngoingRequest(x._refreshRoutingTable,x),x}return o(t,e),t.prototype._createConnectionErrorHandler=function(){return new _.ConnectionErrorHandler(O)},t.prototype._handleUnavailability=function(e,t,n){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,n||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,O,e)},t.prototype.acquireConnection=function(e){var t=void 0===e?{}:e,n=t.accessMode,r=t.database,o=t.bookmarks,i=t.impersonatedUser,a=t.onDatabaseNameResolved,s=t.auth;return 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(O,(function(e,t){return v._handleUnavailability(e,t,u.database)}),(function(e,t){return v._handleWriteFailure(e,t,u.database)}),(function(e,t,n){return v._handleSecurityError(e,t,n,u.database)})),[4,this._freshRoutingTable({accessMode:n,database:u.database,bookmarks:o,impersonatedUser:i,auth:s,onDatabaseNameResolved:function(e){u.database=u.database||e,a&&a(e)}})];case 1:if(f=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),O);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,y,g;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],y=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 g=c.sent(),[2,this._handleRediscoveryError(g,u)];case 6:return v.close(),[7];case 7:return[3,9];case 8:return[2,[null,y]];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:O,handleSecurityError:function(e,t,n){return l._handleSecurityError(e,t,n)}}),a=o._sticky?new _.DelegateConnection(o):new _.DelegateConnection(o,i),s=new g.default(a),o.protocol().version<4?[2,[new p.Session({mode:P,bookmarks:E.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[j,M,R,D,L,F,B].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 G=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 y(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 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(!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 y=v.isRetriable;t.isRetriableError=y},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=y(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=y(i,(function(){return e.toString()})),this.startNodeElementId=y(a,(function(){return t.toString()})),this.endNodeElementId=y(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=y(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 y(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 y=a(n(9512));t.Result=y.default;var g=a(n(8917));t.EagerResult=g.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 O=a(n(5481));t.Session=O.default;var E=i(n(7264)),S=E;t.Driver=E.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 j=a(n(1573));t.resultTransformers=j.default;var M=n(8264);Object.defineProperty(t,"clientCertificateProviders",{enumerable:!0,get:function(){return M.clientCertificateProviders}}),Object.defineProperty(t,"resolveCertificateProvider",{enumerable:!0,get:function(){return M.resolveCertificateProvider}});var R=i(n(6995));t.internal=R;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:R,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:y.default,EagerResult:g.default,Transaction:_.default,ManagedTransaction:w.default,TransactionPromise:x.default,Session:O.default,Driver:E.default,Connection:b.default,Releasable:m.Releasable,types:k,driver:S,json:I,auth:T.default,bookmarkManager:P.bookmarkManager,routing:A.routing,resultTransformers:j.default,notificationCategory:p.notificationCategory,notificationClassification:p.notificationClassification,notificationSeverityLevel:p.notificationSeverityLevel,notificationFilterDisabledCategory:v.notificationFilterDisabledCategory,notificationFilterDisabledClassification:v.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:v.notificationFilterMinimumSeverityLevel,clientCertificateProviders:M.clientCertificateProviders,resolveCertificateProvider:M.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 y=i(n(7509));t.serverAddress=y;var g=i(n(9470));t.resolver=g;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,y.label=2;case 2:return y.trys.push([2,4,,6]),[4,this._validateOnAcquire(e,u)];case 3:return l=y.sent(),[3,6];case 4:return h=y.sent(),f(i,this._activeResourceCounts),a.removeInUse(u),[4,this._destroy(u)];case 5:throw y.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:y.sent(),y.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,y.label=11;case 11:return y.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:y.sent(),y.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=y.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=g(e),s=g(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=g(e,2),i=g(t,2),a=g(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=g(e.div(t.SECONDS_PER_HOUR),2),i=g(e.div(t.SECONDS_PER_MINUTE).modulo(t.MINUTES_PER_HOUR),2),s=e.modulo(t.SECONDS_PER_MINUTE),u=s.equals(0)?null:g(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)?g(t,6,{usePositiveSign:!0}):g(t,4)}(e),o=g(t,2),i=g(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 y(e){return(e=(0,a.int)(e)).equals(0)?"":"."+g(e,9)}function g(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),y="".concat(p,":").concat(v),g=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,y,g)},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__",y="__isLocalDateTime__",g="__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 E(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 E(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 E(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 E(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,y,f),t.isLocalDateTime=function(e){return E(e,y)};var O=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 E(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=O,Object.defineProperty(O.prototype,g,f),t.isDateTime=function(e){return E(e,g)}},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==y&&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 y=n(3862);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return y.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return y.animationFrameScheduler}});var g=n(182);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return g.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return g.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 O=n(1342);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return O.noop}});var E=n(6640);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return E.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 j=n(1505);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return j.SequenceError}});var M=n(1554);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return M.TimeoutError}});var R=n(5788);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return R.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 F=n(3865);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return F.concat}});var B=n(7579);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return B.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 G=n(4917);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return G.from}});var W=n(5337);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return W.fromEvent}});var Y=n(347);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return Y.fromEventPattern}});var q=n(7610);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return q.generate}});var H=n(4209);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return H.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 ye=n(8995);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ye.bufferToggle}});var ge=n(8831);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return ge.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 Oe=n(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Oe.concatMap}});var Ee=n(9938);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Ee.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 je=n(8766);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return je.delayWhen}});var Me=n(7441);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Me.dematerialize}});var Re=n(5365);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return Re.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 Fe=n(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Fe.endWith}});var Be=n(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Be.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 Ge=n(7661);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ge.expand}});var We=n(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return We.filter}});var Ye=n(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Ye.finalize}});var qe=n(7714);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return qe.find}});var He=n(9756);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return He.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 yt=n(7220);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var gt=n(6106);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return gt.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 Ot=n(7835);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Ot.retry}});var Et=n(9843);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Et.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 jt=n(3001);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return jt.single}});var Mt=n(3982);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Mt.skip}});var Rt=n(9098);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Rt.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 Ft=n(8960);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Ft.subscribeOn}});var Bt=n(8774);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Bt.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 Gt=n(846);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Gt.take}});var Wt=n(8330);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Wt.takeLast}});var Yt=n(4780);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Yt.takeUntil}});var qt=n(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return qt.takeWhile}});var Ht=n(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Ht.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 g(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 y=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}(),g=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 y(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=g,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 y=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),g=y[0],m=y[1];if(!g&&s.isArrayLike(t))return a.mergeMap((function(t){return e(t,n,p)}))(o.innerFrom(t));if(!g)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),y=n(7315),g=n(3327);function m(e){return new l.Observable((function(t){var n=e[g.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())(g=p.value).push(n),e<=g.length&&(h=null!=h?h:[]).push(g)}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),y=v.next();!y.done;y=v.next()){var g=y.value;a.arrRemove(s,g),o.next(g)}}catch(e){c={error:e}}finally{try{y&&!y.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,y=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 g=(b=a,_=h,(w=new r.Observable((function(e){p++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--p&&v&&y.unsubscribe()}}))).key=b,w);if(l.next(g),n){var m=s.createOperatorSubscriber(h,(function(){h.complete(),null==m||m.unsubscribe()}),void 0,void 0,(function(){return f.delete(a)}));y.add(o.innerFrom(n(g)).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(y)}))}},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()},y=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(y,o,e),m.error(e)},complete:function(){h=!0,v(),r=l(y,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())},y=function(){d=null,p&&r.complete()},g=function(t){return d=i.innerFrom(e(t)).subscribe(o.createOperatorSubscriber(r,v,y))},m=function(){if(f){f=!1;var e=h;h=null,r.next(e),!p&&g(e)}};n.subscribe(o.createOperatorSubscriber(r,(function(e){f=!0,h=e,(!d||d.closed)&&(u?m():g(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,y=n.meta,g=void 0===y?null:y;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:g,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)},y=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 y((function(e){return e.complete()}))}),(function(e){return y((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 y=n(8158);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return y.concatAll}});var g=n(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return g.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 O=n(8079);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return O.debounceTime}});var E=n(378);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return E.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 j=n(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return j.endWith}});var M=n(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return M.every}});var R=n(1551);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return R.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 F=n(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return F.filter}});var B=n(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return B.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 G=n(7815);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return G.groupBy}});var W=n(490);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return W.ignoreElements}});var Y=n(9356);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Y.isEmpty}});var q=n(8669);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return q.last}});var H=n(5471);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return H.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 ye=n(5600);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ye.raceWith}});var ge=n(9139);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return ge.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 Oe=n(1731);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Oe.sample}});var Ee=n(6086);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ee.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 je=n(7372);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return je.skipUntil}});var Me=n(4721);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Me.skipWhile}});var Re=n(269);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Re.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 Fe=n(3274);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Fe.switchMapTo}});var Be=n(8712);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Be.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 Ge=n(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ge.takeWhile}});var We=n(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return We.tap}});var Ye=n(8941);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Ye.throttle}});var qe=n(7640);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return qe.throttleTime}});var He=n(4869);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return He.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}},8716:t=>{t.exports=e}},nh={};function rh(e){var t=nh[e];if(void 0!==t)return t.exports;var n=nh[e]={id:e,loaded:!1,exports:{}};return th[e].call(n.exports,n,n.exports,rh),n.loaded=!0,n.exports}rh.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return rh.d(t,{a:t}),t},rh.d=(e,t)=>{for(var n in t)rh.o(t,n)&&!rh.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},rh.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),rh.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),rh.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var oh={};(()=>{rh.d(oh,{RL:()=>To,wK:()=>qi,x_:()=>Ki,lv:()=>Xi,YQ:()=>Hi,BP:()=>rf,GZ:()=>ff,Vw:()=>Zi,Ay:()=>hf,_G:()=>gs,h4:()=>yc});var e=rh(5250);function t(e){return t="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},t(e)}function n(e){var n=function(e){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:String(n)}var r=["onLayoutDone","onLayoutStep","onError","onLayoutComputing","onWebGLContextLost","onZoomTransitionDone","restart"],o=function(){function e(){var t,r,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,(r=n(r="callbacks"))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,this.callbacks=i}var t,r;return t=e,r=[{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}}],r&&function(e,t){for(var r=0;r0}function f(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),rt((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function h(e,t){var n=Qt();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o0}function p(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),rt((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function v(e,t){var n=Qt(),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>C&&N(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;Xt(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=[]),c(this)){var i=h(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return Ze;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=d(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&m(i),this.atom.reportChanged(),o&&v(this,i),r&&_()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&y(),o=d(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&m(i),this.atom.reportChanged(),o&&v(this,i),r&&_()},e}(),I=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+Qe()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new k(r,n,i,o);return dt(i,"$mobx",a),t&&t.length&&i.spliceWithArray(0,0,t),P&&Object.defineProperty(a.array,"0",j),i}return a(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 W(e,t,this,arguments)};return n.originalFn=t,n.isMobxAction=!0,n}function W(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";ht(e,t,ee(i,n))}),(function(e){return this[e]}),(function(){et(!1,V("m001"))}),!1,!0),J=X((function(e,t,n){re(e,t,n)}),(function(e){return this[e]}),(function(){et(!1,V("m001"))}),!1,!1),ee=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?G(e.name||"",e):2===arguments.length&&"function"==typeof t?G(e,t):1===arguments.length&&"string"==typeof e?te(e):te(t).apply(null,arguments)};function te(e){return function(t,n,r){if(r&&"function"==typeof r.value)return r.value=G(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 Q(e).apply(this,arguments)}}function ne(e){return"function"==typeof e&&!0===e.isMobxAction}function re(e,t,n){var r=function(){return W(t,n,e,arguments)};r.isMobxAction=!0,ht(e,t,r)}ee.bound=function(e,t,n){if("function"==typeof e){var r=G("",e);return r.autoBind=!0,r}return J.apply(null,arguments)};var oe=Object.prototype.toString;function ie(e,t){return ae(e,t)}function ae(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=se(e),t=se(t);var o=oe.call(e);if(o!==oe.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(!ae(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(!ue(t,l=c[u])||!ae(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,n,r)}function se(e){return L(e)?e.peek():Ke(e)?e.entries():gt(e)?function(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}(e.entries()):e}function ue(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function le(e,t){return e===t}var ce={identity:le,structural:function(e,t){return ie(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||le(e,t)}};function fe(e,t,n){var r,o,i;"string"==typeof e?(r=e,o=t,i=n):(r=e.name||"Autorun@"+Qe(),o=e,i=t),et("function"==typeof o,V("m004")),et(!1===ne(o),V("m005")),i&&(o=o.bind(i));var a=new rn(r,(function(){this.track(s)}));function s(){o(a)}return a.schedule(),a.getDisposer()}function he(e,t,n){var r;arguments.length>3&&Je(V("m007")),Be(e)&&Je(V("m008")),(r="object"==typeof n?n:{}).name=r.name||e.name||t.name||"Reaction@"+Qe(),r.fireImmediately=!0===n||!0===r.fireImmediately,r.delay=r.delay||0,r.compareStructural=r.compareStructural||r.struct||!1,t=ee(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?ce.structural:ce.default,u=new rn(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 de=function(){function e(e,t,n,r,o){this.derivation=e,this.scope=t,this.equals=n,this.dependenciesState=_t.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=_t.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Qe(),this.value=new Wt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=wt.NONE,this.name=r||"ComputedValue@"+Qe(),o&&(this.setter=G(r+"-setter",o))}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState===_t.UP_TO_DATE){e.lowestObserverState=_t.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===_t.UP_TO_DATE&&(r.dependenciesState=_t.POSSIBLY_STALE,r.isTracing!==wt.NONE&&Vt(r,e),r.onBecomeStale())}}}(this)},e.prototype.onBecomeUnobserved=function(){Zt(this),this.value=void 0},e.prototype.get=function(){et(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===Et.inBatch?(Bt(),qt(this)&&(this.isTracing!==wt.NONE&&console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context and doing a full recompute"),this.value=this.computeValue(!1)),Ut()):(zt(this),qt(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState!==_t.STALE){e.lowestObserverState=_t.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===_t.POSSIBLY_STALE?r.dependenciesState=_t.STALE:r.dependenciesState===_t.UP_TO_DATE&&(e.lowestObserverState=_t.UP_TO_DATE)}}}(this));var e=this.value;if(Yt(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(Yt(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){et(!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 et(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){y()&&g({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.dependenciesState===_t.NOT_TRACKING,n=this.value=this.computeValue(!0);return t||Yt(e)||Yt(n)||!this.equals(e,n)},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Et.computationDepth++,e)t=Kt(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new Wt(e)}return Et.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return fe((function(){var i=n.get();if(!r||t){var a=Qt();e({type:"update",object:n,newValue:i,oldValue:o}),Jt(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 bt(this.get())},e.prototype.whyRun=function(){var e=Boolean(Et.trackingDerivation),t=it(this.isComputing?this.newObserving:this.observing).map((function(e){return e.name})),n=it(Nt(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===_t.NOT_TRACKING?V("m032"):" * This computation will re-run if any of the following observables changes:\n "+at(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 "+at(n)+"\n")},e}();de.prototype[mt()]=de.prototype.valueOf;var pe=yt("ComputedValue",de),ve=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 et(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),p(this,e)},e.prototype.intercept=function(e){return f(this,e)},e}();function ye(e,t){if(Se(e)&&e.hasOwnProperty("$mobx"))return e.$mobx;et(Object.isExtensible(e),V("m035")),ut(e)||(t=(e.constructor.name||"ObservableObject")+"@"+Qe()),t||(t="ObservableObject@"+Qe());var n=new ve(e,t);return dt(e,"$mobx",n),n}function ge(e,t,n,r){if(e.values[t]&&!pe(e.values[t]))return et("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(Be(n.value)){var o=n.value;me(e,t,o.initialValue,o.enhancer)}else ne(n.value)&&!0===n.value.autoBind?re(e.target,t,n.value.originalFn):pe(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,xe(t))}(e,t,n.value):me(e,t,n.value,r);else be(e,t,n.get,n.set,ce.default,!0)}function me(e,t,n,r){if(vt(e.target,t),c(e)){var o=h(e,{object:e.target,name:t,type:"add",newValue:n});if(!o)return;n=o.newValue}n=(e.values[t]=new B(n,r,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,function(e){return _e[e]||(_e[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Oe(this,e,t)}})}(t)),function(e,t,n,r){var o=d(e),i=y(),a=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&m(a),o&&v(e,a),i&&_()}(e,e.target,t,n)}function be(e,t,n,r,o,i){i&&vt(e.target,t),e.values[t]=new de(n,e.target,o,e.name+"."+t,r),i&&Object.defineProperty(e.target,t,xe(t))}var _e={},we={};function xe(e){return we[e]||(we[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function Oe(e,t,n){var r=e.$mobx,o=r.values[t];if(c(r)){if(!(s=h(r,{type:"update",object:e,name:t,newValue:n})))return;n=s.newValue}if((n=o.prepareNewValue(n))!==F){var i=d(r),a=y(),s=i||a?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;a&&m(s),o.setNewValue(n),i&&v(r,s),a&&_()}}var Ee=yt("ObservableObjectAdministration",ve);function Se(e){return!!st(e)&&(Z(e),Ee(e.$mobx))}function Te(e,t){if(null==e)return!1;if(void 0!==t){if(L(e)||Ke(e))throw new Error(V("m019"));if(Se(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return Se(e)||!!e.$mobx||l(e)||cn(e)||pe(e)}function Pe(e){return et(!!e,":("),X((function(t,n,r,o,i){vt(t,n),et(!i||!i.get,V("m022")),me(ye(t,void 0),n,r,e)}),(function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()}),(function(e,t){Oe(this,e,t)}),!0,!1)}function Ce(e){for(var t=[],n=1;n=2,V("m014")),et("object"==typeof e,V("m015")),et(!Ke(e),V("m016")),n.forEach((function(e){et("object"==typeof e,V("m017")),et(!Te(e),V("m018"))}));for(var r=ye(e),o={},i=n.length-1;i>=0;i--){var a=n[i];for(var s in a)if(!0!==o[s]&&ft(a,s)){if(o[s]=!0,e===a&&!pt(e,s))continue;ge(r,s,Object.getOwnPropertyDescriptor(a,s),t)}}return e}var Ie=Pe(ze),je=Pe(Ve),Me=Pe(Ge),Re=Pe(We),Ne=Pe(Ye),De={box:function(e,t){return arguments.length>2&&Fe("box"),new B(e,ze,t)},shallowBox:function(e,t){return arguments.length>2&&Fe("shallowBox"),new B(e,Ge,t)},array:function(e,t){return arguments.length>2&&Fe("array"),new I(e,ze,t)},shallowArray:function(e,t){return arguments.length>2&&Fe("shallowArray"),new I(e,Ge,t)},map:function(e,t){return arguments.length>2&&Fe("map"),new Xe(e,ze,t)},shallowMap:function(e,t){return arguments.length>2&&Fe("shallowMap"),new Xe(e,Ge,t)},object:function(e,t){arguments.length>2&&Fe("object");var n={};return ye(n,t),Ce(n,e),n},shallowObject:function(e,t){arguments.length>2&&Fe("shallowObject");var n={};return ye(n,t),Ae(n,e),n},ref:function(){return arguments.length<2?Ue(Ge,arguments[0]):Me.apply(null,arguments)},shallow:function(){return arguments.length<2?Ue(Ve,arguments[0]):je.apply(null,arguments)},deep:function(){return arguments.length<2?Ue(ze,arguments[0]):Ie.apply(null,arguments)},struct:function(){return arguments.length<2?Ue(We,arguments[0]):Re.apply(null,arguments)}},Le=function(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Ie.apply(null,arguments);if(et(arguments.length<=1,V("m021")),et(!Be(e),V("m020")),Te(e))return e;var t=ze(e,0,void 0);return t!==e?t:Le.box(e)};function Fe(e){Je("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function Be(e){return"object"==typeof e&&null!==e&&!0===e.isMobxModifierDescriptor}function Ue(e,t){return et(!Be(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function ze(e,t,n){return Be(e)&&Je("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),Te(e)?e:Array.isArray(e)?Le.array(e,n):ut(e)?Le.object(e,n):gt(e)?Le.map(e,n):e}function Ve(e,t,n){return Be(e)&&Je("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),null==e||Se(e)||L(e)||Ke(e)?e:Array.isArray(e)?Le.shallowArray(e,n):ut(e)?Le.shallowObject(e,n):gt(e)?Le.shallowMap(e,n):Je("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function Ge(e){return e}function We(e,t,n){if(ie(e,t))return t;if(Te(e))return e;if(Array.isArray(e))return new I(e,We,n);if(gt(e))return new Xe(e,We,n);if(ut(e)){var r={};return ye(r,n),ke(r,We,[e]),r}return e}function Ye(e,t,n){return ie(e,t)?t:e}function qe(e,t){void 0===t&&(t=void 0),Bt();try{return e.apply(t)}finally{Ut()}}Object.keys(De).forEach((function(e){return Le[e]=De[e]})),Le.deep.struct=Le.struct,Le.ref.struct=function(){return arguments.length<2?Ue(Ye,arguments[0]):Ne.apply(null,arguments)};var He={},Xe=function(){function e(e,t,n){void 0===t&&(t=ze),void 0===n&&(n="ObservableMap@"+Qe()),this.enhancer=t,this.name=n,this.$mobx=He,this._data=Object.create(null),this._hasMap=Object.create(null),this._keys=new I(void 0,Ge,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(c(this)){var r=h(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,c(this)&&!(o=h(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=y(),r=d(this),o=r||n?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return n&&m(o),qe((function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0})),r&&v(this,o),n&&_(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new B(t,Ge,this.name+"."+e+"?",!1),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if((t=n.prepareNewValue(t))!==F){var r=y(),o=d(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&m(i),n.setNewValue(t),o&&v(this,i),r&&_()}},e.prototype._addValue=function(e,t){var n=this;qe((function(){var r=n._data[e]=new B(t,n.enhancer,n.name+"."+e,!1);t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)}));var r=y(),o=d(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&m(i),o&&v(this,i),r&&_()},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 Ke(e)&&(e=e.toJS()),qe((function(){ut(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)})):gt(e)?e.forEach((function(e,n){return t.set(n,e)})):null!=e&&Je("Cannot initialize map from "+e)})),this},e.prototype.clear=function(){var e=this;qe((function(){$t((function(){e.keys().forEach(e.delete,e)}))}))},e.prototype.replace=function(e){var t=this;return qe((function(){var n,r=ut(n=e)?Object.keys(n):Array.isArray(n)?n.map((function(e){return e[0]})):gt(n)?Array.from(n.keys()):Ke(n)?n.keys():Je("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 et(!0!==t,V("m033")),p(this,e)},e.prototype.intercept=function(e){return f(this,e)},e}();E(Xe.prototype,(function(){return this.entries()}));var Ke=yt("ObservableMap",Xe),Ze=[];function $e(){return"undefined"!=typeof window?window:rh.g}function Qe(){return++Et.mobxGuid}function Je(e,t){throw et(!1,e,t),"X"}function et(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}Object.freeze(Ze);var tt=[];function nt(e){return-1===tt.indexOf(e)&&(tt.push(e),console.error("[mobx] Deprecated: "+e),!0)}function rt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var ot=function(){};function it(e){var t=[];return e.forEach((function(e){-1===t.indexOf(e)&&t.push(e)})),t}function at(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 st(e){return null!==e&&"object"==typeof e}function ut(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function lt(){for(var e=arguments[0],t=1,n=arguments.length;t0&&(t.dependencies=it(e.observing).map(Mt)),t}function Rt(e){var t={name:e.name};return function(e){return e.observers&&e.observers.length>0}(e)&&(t.observers=Nt(e).map(Rt)),t}function Nt(e){return e.observers}function Dt(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 Lt(e,t){if(1===e.observers.length)e.observers.length=0,Ft(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 Ft(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Et.pendingUnobservations.push(e))}function Bt(){Et.inBatch++}function Ut(){if(0==--Et.inBatch){un();for(var e=Et.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 Gt(e,t,n+1)})))}Ct.__mobxInstanceCount?(Ct.__mobxInstanceCount++,setTimeout((function(){St||Tt||Pt||(Pt=!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)):Ct.__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"}(_t||(_t={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(wt||(wt={}));var Wt=function(e){this.cause=e};function Yt(e){return e instanceof Wt}function qt(e){switch(e.dependenciesState){case _t.UP_TO_DATE:return!1;case _t.NOT_TRACKING:case _t.STALE:return!0;case _t.POSSIBLY_STALE:for(var t=Qt(),n=e.observing,r=n.length,o=0;o0;Et.computationDepth>0&&t&&Je(V("m031")+e.name),!Et.allowStateChanges&&t&&Je(V(Et.strictMode?"m030a":"m030b")+e.name)}function Kt(e,t,n){en(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Et.runId;var r,o=Et.trackingDerivation;Et.trackingDerivation=e;try{r=t.call(n)}catch(e){r=new Wt(e)}return Et.trackingDerivation=o,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=_t.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&&Lt(s,e),s.diffValue=0;for(;o--;){var s;1===(s=n[o]).diffValue&&(s.diffValue=0,Dt(s,e))}r!==_t.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),r}function Zt(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Lt(t[n],e);e.dependenciesState=_t.NOT_TRACKING}function $t(e){var t=Qt(),n=e();return Jt(t),n}function Qt(){var e=Et.trackingDerivation;return Et.trackingDerivation=null,e}function Jt(e){Et.trackingDerivation=e}function en(e){if(e.dependenciesState!==_t.UP_TO_DATE){e.dependenciesState=_t.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=_t.UP_TO_DATE}}function tn(e){return console.log(e),e}function nn(e){switch(e.length){case 0:return Et.trackingDerivation;case 1:return At(e[0]);case 2:return At(e[0],e[1])}}var rn=function(){function e(e,t){void 0===e&&(e="Reaction@"+Qe()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=_t.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+Qe(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=wt.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Et.pendingReactions.push(this),un())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(Bt(),this._isScheduled=!1,qt(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&y()&&g({object:this,type:"scheduled-reaction"})),Ut())},e.prototype.track=function(e){Bt();var t,n=y();n&&(t=Date.now(),m({object:this,type:"reaction",fn:e})),this._isRunning=!0;var r=Kt(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Zt(this),Yt(r)&&this.reportExceptionInDerivation(r.cause),n&&_({time:Date.now()-t}),Ut()},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),y()&&g({type:"error",message:n,error:e,object:this}),Et.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Bt(),Zt(this),Ut()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=on,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=it(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 "+at(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||Et.isRunningReactions||sn(ln)}function ln(){Et.isRunningReactions=!0;for(var e=Et.pendingReactions,t=0;e.length>0;){++t===an&&(console.error("Reaction doesn't converge to a stable state after "+an+" 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&&Et.globalReactionErrorHandlers.splice(t,1)}},reserveArrayBuffer:N,resetGlobalState:function(){Et.resetId++;var e=new Ot;for(var t in e)-1===xt.indexOf(t)&&(Et[t]=e[t]);Et.allowStateChanges=!Et.strictMode},isolateGlobalState:function(){Tt=!0,$e().__mobxInstanceCount--},shareGlobalState:function(){nt("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),St=!0;var e=$e(),t=Et;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?Et=e.__mobxGlobal:e.__mobxGlobal=t},spyReport:g,spyReportEnd:_,spyReportStart:m,setReactionScheduler:function(e){var t=sn;sn=function(n){return e((function(){return t(n)}))}}},gn={Reaction:rn,untracked:$t,Atom:u,BaseAtom:s,useStrict:Y,isStrictModeEnabled:function(){return Et.strictMode},spy:w,comparer:ce,asReference:function(e){return nt("asReference is deprecated, use observable.ref instead"),Le.ref(e)},asFlat:function(e){return nt("asFlat is deprecated, use observable.shallow instead"),Le.shallow(e)},asStructure:function(e){return nt("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),Le.struct(e)},asMap:function(e){return nt("asMap is deprecated, use observable.map or observable.shallowMap instead"),Le.map(e||{})},isModifierDescriptor:Be,isObservableObject:Se,isBoxedObservable:U,isObservableArray:L,ObservableMap:Xe,isObservableMap:Ke,map:function(e){return nt("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),Le.map(e)},transaction:qe,observable:Le,computed:pn,isObservable:Te,isComputed:function(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Se(e))return!1;if(!e.$mobx.values[t])return!1;var n=At(e,t);return pe(n)}return pe(e)},extendObservable:Ce,extendShallowObservable:Ae,observe:function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return kt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return kt(e).observe(t,n)}(e,t,n)},intercept:function(e,t,n){return"function"==typeof n?function(e,t,n){return kt(e,t).intercept(n)}(e,t,n):function(e,t){return kt(e).intercept(t)}(e,t)},autorun:fe,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@"+Qe(),i=e,a=t,s=n),et(!1===ne(i),V("m006")),void 0===a&&(a=1),s&&(i=i.bind(s));var u=!1,l=new rn(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@"+Qe(),i=e,a=t,s=n),fe(o,(function(e){if(i.call(s)){e.dispose();var t=Qt();a.call(s),Jt(t)}}))},reaction:he,action:ee,isAction:ne,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 et("function"==typeof o,V("m002")),et(0===o.length,V("m003")),et("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),W(r,o,i,void 0)},expr:function(e,t){return Ht()||console.warn(V("m013")),pn(e,{context:t}).get()},toJS:vn,createTransformer:function(e,t){et("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var n={},r=Et.resetId,o=function(r){function o(t,n){var o=r.call(this,(function(){return e(n)}),void 0,ce.default,"Transformer-"+e.name+"-"+t,void 0)||this;return o.sourceIdentifier=t,o.sourceObject=n,o}return a(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}(de);return function(e){r!==Et.resetId&&(n={},r=Et.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&&ht(e,"$transformId",t=Qe()),t}(e),i=n[t];return i?i.get():(i=n[t]=new o(t,e)).get()}},whyRun:function(e,t){return nt("`whyRun` is deprecated in favor of `trace`"),(e=nn(arguments))?pe(e)||cn(e)?tn(e.whyRun()):Je(V("m025")):tn(V("m024"))},isArrayLike:function(e){return Array.isArray(e)||L(e)},extras:yn},mn=!1,bn=function(e){var t=gn[e];Object.defineProperty(gn,e,{get:function(){return mn||(mn=!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 _n in gn)bn(_n);"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:w,extras:yn});var wn=rh(1803),xn=rh.n(wn),On={value:()=>{}};function En(){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;--In}()}finally{In=0,function(){for(var e,t,n=An,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:An=t);kn=e,Yn(r)}(),Nn=0}}function Wn(){var e=Ln.now(),t=e-Rn;t>1e3&&(Dn-=t,Rn=e)}function Yn(e){In||(jn&&(jn=clearTimeout(jn)),e-Nn>24?(e<1/0&&(jn=setTimeout(Gn,e-Ln.now()-Dn)),Mn&&(Mn=clearInterval(Mn))):(Mn||(Rn=Ln.now(),Mn=setInterval(Wn,1e3)),In=1,Fn(Gn)))}zn.prototype=Vn.prototype={constructor:zn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Bn():+n)+(null==t?0:+t),this._next||kn===this||(kn?kn._next=this:An=this,kn=this),this._call=e,this._time=n,Yn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Yn())}};const qn=4294967296;function Hn(e){return e.x}function Xn(e){return e.y}var Kn=Math.PI*(3-Math.sqrt(5));function Zn(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,y=e._y0,g=e._x1,m=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((l=t>=(i=(v+g)/2))?v=i:g=i,(c=n>=(a=(y+m)/2))?y=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+g)/2))?v=i:g=i,(c=n>=(a=(y+m)/2))?y=a:m=a}while((f=c<<1|l)==(h=(u>=a)<<1|s>=i));return o[h]=d,o[f]=p,e}function $n(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function Qn(e){return e[0]}function Jn(e){return e[1]}function er(e,t,n){var r=new tr(null==t?Qn:t,null==n?Jn:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function tr(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 nr(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var rr=er.prototype=tr.prototype;function or(e){return function(){return e}}function ir(e){return 1e-6*(e()-.5)}function ar(){var e,t,n,r,o,i=or(-30),a=1,s=1/0,u=.81;function l(n){var o,i=e.length,a=er(e,Hn,Xn).visitAfter(f);for(r=n,o=0;o=s)){(e.data!==t||e.next)&&(0===f&&(p+=(f=ir(n))*f),0===h&&(p+=(h=ir(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)=g)<<1|e>=y)&&(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+y)/2))?p=s:y=s,(c=a>=(u=(v+g)/2))?v=u:g=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)},rr.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 br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?void 0:t.bundledRels[0].color,t.bundledRels.forEach((function(e){t.width+=e.width}))):(t.color=1===a.length?a[0].color:void 0,t.disabled=!1,t.bundledRels.forEach((function(e){t.width+=!0!==e.disabled?e.width:0})))}})),Array.from(n.values())},wr=function(){return void 0!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((function(e){return"size"in e}))};function xr(e){return xr="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},xr(e)}var Or=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:dr)+(null!==(n=e.target.size)&&void 0!==n?n:dr)+90*devicePixelRatio};function Er(e){return"object"===xr(e)}var Sr=function(e){var t;return(null!==(t=e.size)&&void 0!==t?t:dr)+25*devicePixelRatio},Tr=function(){return-400*Math.pow(devicePixelRatio,2)},Pr=function(){return 2*Tr()};function Cr(e){return Cr="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},Cr(e)}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n(e=(1664525*e+1013904223)%qn)/qn}();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",ar().strength(Tr)).force("centerX",function(e){var t,n,r,o=or(.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=wr(o);t||r||s?(n.shouldUpdate=!0,n.shouldReheatNodes=!0,n.shouldCountNodeRels=!0):n.shouldReheatNodes=!1}var u=a.channels[jr];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=t,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[jr],s=i.channels[jr],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=Mr(a.removes);Object.keys(p).forEach((function(e){delete t.d3Nodes[e]}));var v=Mr(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(t,n,r){var o=this;if(!(0,e.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,y=c-s.y-s.vy,g=v*v+y*y;ge.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 Ar(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)?Ar(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(jr),this.state.rels.removeChannel(jr),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;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 zr(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=Ur(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,y=null!==(h=this.oldPositions[u.id])&&void 0!==h?h:Br({},i);void 0===y&&void 0!==n[v];)v=n[v],y=this.oldPositions[v];y.x=null!==(d=y.x)&&void 0!==d?d:i.x,y.y=null!==(p=y.y)&&void 0!==p?p:i.y,f.x=Wr(y.x,l.x,this.t),f.y=Wr(y.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);n=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),y}},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),y}},t}function eo(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 to(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(to=function(){return!!e})()}function no(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ro(){return ro="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=oo(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}},ro.apply(this,arguments)}function oo(e){return oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oo(e)}function io(e,t){return io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},io(e,t)}function ao(e,t,n){return(t=so(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function so(e){var t=function(e){if("object"!=qr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qr(t)?t:String(t)}var uo=function(e){return void 0!==e?vn(e):e},lo=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ao(no(n=function(e,t,n){return t=oo(t),function(e,t){if(t&&("object"===qr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return no(e)}(e,to()?Reflect.construct(t,n||[],oo(e).constructor):t.apply(e,n))}(this,t,[e])),"stateDisposers",void 0),ao(no(n),"cytoCompleteCallback",void 0),ao(no(n),"computing",void 0),ao(no(n),"pendingLayoutData",void 0),ao(no(n),"worker",void 0),n.stateDisposers=[],n.stateDisposers.push(n.state.reaction((function(){return n.state.graphUpdates}),(function(){void 0!==n.state.nodes.version&&(n.shouldUpdate=!0),void 0!==n.state.rels.version&&(n.shouldUpdate=!0)}))),n.cytoCompleteCallback=e.cytoCompleteCallback,n.shouldUpdate=!0,n.computing=!1,n.setOptions(),n.setupWorker().then((function(e){n.worker=e,n.worker.port.start(),n.pendingLayoutData=null})).catch((function(e){Dr.error("Error setting up worker:",e)})),n}var n,r,o,i;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&&io(e,t)}(t,e),n=t,r=[{key:"setupWorker",value:(o=Jr().mark((function e(){var t,n,r,o,i;return Jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(rh.bind(rh,8716));case 3:n=e.sent,r=n.createCoseBilkentLayoutWorker,t=r(),e.next=16;break;case 8:return e.prev=8,e.t0=e.catch(0),Dr.info("Failed to initialise shared worker: ",e.t0," Falling back to syncronous code."),e.next=13,Promise.resolve().then(rh.bind(rh,8716));case 13:o=e.sent,i=o.coseBilkentLayoutFallbackWorker,t=i;case 16:return e.abrupt("return",new Promise((function(e,n){t||n("Cose-bilkent layout code could not be initialized"),e(t)})));case 17:case"end":return e.stop()}}),e,null,[[0,8]])})),i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){eo(i,n,r,a,s,"next",e)}function s(e){eo(i,n,r,a,s,"throw",e)}a(void 0)}))},function(){return i.apply(this,arguments)})},{key:"setOptions",value:function(){this.shouldUpdate=!0}},{key:"update",value:function(){var e=arguments.length>0&&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=uo(n),i=uo(r);(o.length>0||i.length>0)&&(this.updatePositionsFromState(),this.layout(o,i))}ro(oo(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(Zr(r),Zr(o)),spacingFactor:e.reduce((function(e,t){var n;return e+(null!==(n=t.size)&&void 0!==n?n:dr)}),0)/e.length*4.5/50*yr()};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,t),go(this,"shaderProgram",void 0),go(this,"gl",void 0),go(this,"curTexture",void 0),go(this,"attributeInfo",void 0),go(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=vo()(o,i);n.shaderSource(a,s),n.compileShader(a),(0,e.isNil)(n.getShaderParameter(a,n.COMPILE_STATUS))&&Dr.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=vo()(r,i);if(n.shaderSource(u,l),n.compileShader(u),(0,e.isNil)(n.getShaderParameter(u,n.COMPILE_STATUS))&&Dr.info(n.getShaderInfoLog(u)),this.shaderProgram=n.createProgram(),n.attachShader(this.shaderProgram,a),n.attachShader(this.shaderProgram,u),n.linkProgram(this.shaderProgram),(0,e.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=t,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:g}}}],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 Ro(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=wr(o);(t||r||i)&&(n.shouldUpdate=!0,n.checkForUpdates())}var a=l.channels[Lo];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?.1:null!=r?r:100;this.simulationStopVelocitySquared=s*s,this.gravity=null!=o?o:100,this.force=0}}},{key:"setData",value:function(e){var t=Uo(e.nodes),n=t.nodeIdToIndex,r=t.nodeIndexToId;return this.nodeIdToIndex=n,this.nodeIndexToId=r,this.numNodes=e.nodes.length,this.solarMerger=new ko(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,fr,fr,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,Bo,Bo),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,fr,fr),t.drawArrays(t.TRIANGLE_STRIP,0,4),this.useReadpixelWorkaround?this.doReadpixelWorkaround():(t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(0).frameBuffer),t.readPixels(0,0,fr,fr,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(){Dr.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=Mo(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=Mo(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=Mo(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){Fo[0]=i.x,Fo[1]=i.y,Fo[2]=0,Fo[3]=0;var s=a%fr,u=(a-s)/fr;t.texSubImage2D(t.TEXTURE_2D,0,s,u,1,1,t.RGBA,t.FLOAT,Fo),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,fr,fr,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=Uo(e.nodes).nodeIdToIndex,o=new ko(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,fr,fr,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(Lo),this.state.rels.removeChannel(Lo)}},{key:"dumpTexture",value:function(e,t,n){var r=this.gl;Dr.info("--- Dumping texture ",n),r.bindFramebuffer(r.FRAMEBUFFER,e),r.readPixels(0,0,fr,fr,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[Lo].adds).length>0,a=Object.values(r.channels[Lo].adds).length>0,s=Object.values(n.channels[Lo].removes).length>0,u=Object.values(r.channels[Lo].removes).length>0,l=Object.values(n.channels[Lo].updates);(i||a||s||u)&&this.addRemoveData(o,{adds:n.channels[Lo].adds,removes:n.channels[Lo].removes}),e?(this.updateNodes(o.nodes),this.reheat(o)):l.length>0&&(this.updateNodes(l),wr(l)&&this.reheat(o)),n.clearChannel(Lo),r.clearChannel(Lo)}},{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 To(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");var n=e.getParameter(e.MAX_TEXTURE_SIZE),r=Math.max(fr,hr);n0&&i.forEach((function(e){return Dr.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=Io({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=Io({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,fr),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 bo(e,Po,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,Bo)}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,Bo),f=e.newFramebuffer(t,c);e.levelsData[u]={texture:c,frameBuffer:f},e.levelsClusterTexture[u]=e.newTexture(t,n,Bo),e.levelsFinestIndexTexture[u]=e.newTexture(t,r,fr,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 clusterRadius = (clusterSize * 0.5) + u_baseLength;\n float clusterArea = PI * clusterRadius * clusterRadius;\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 = (clusterArea * fScale) / (dist * dist);\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.3;\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 bo(t,Po,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,fr,fr,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,fr,fr,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 bo(e,Po,"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 bo(e,Po,"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,fr,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,fr,fr),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,fr,fr,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[Ho],i=r.channels[Ho],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(Ho),r.clearChannel(Ho),this.currentLayoutType===Xo&&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(Go(h),Go(u))),p=r.items.map((function(e){return e.id})),v=new Set([].concat(Go(p),Go(l)));if(d.size<=100&&v.size<=300){var y=function(e,t,n,r){var o,i=new Set(e),a=mr(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=mr(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=mr(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=mr(s);try{for(l.s();!(u=l.n()).done;){var c=u.value;y[c.id]||(y[c.id]=c)}}catch(e){l.e(e)}finally{l.f()}}}}}catch(e){i.e(e)}finally{i.f()}}}},m=mr(i);try{for(m.s();!(f=m.n()).done;)g(f.value)}catch(e){m.e(e)}finally{m.f()}return{connectedNodes:v,connectedRels:y}}(c,f,n,r),g=y.connectedNodes,m=y.connectedRels,b=Object.values(g),_=Object.values(m),w=b.length,x=_.length;w===c.size&&x===f.size&&(f.size>0||c.size>0)?(this.setLayout(Ko),this.coseBilkentLayout.update(!0,n.items,r.items)):x>0&&f.size/x>.25&&(this.setLayout(Ko),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(Xo),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 ti(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[oi].adds).length>0,i=Object.values(r.channels[oi].adds).length>0,a=Object.values(n.channels[oi].removes).length>0,s=Object.values(r.channels[oi].removes).length>0;(o||i||a||s)&&this.layout(n.items,n.idToItem,n.idToPosition),n.clearChannel(oi),r.clearChannel(oi)}this.shouldUpdate=!1}},{key:"layout",value:function(t,n,r){var o,i=void 0!==(o=t)?vn(o):o;if(!(0,e.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 ci(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[hi].adds).length>0,i=Object.values(r.channels[hi].adds).length>0,a=Object.values(n.channels[hi].removes).length>0,s=Object.values(r.channels[hi].removes).length>0;(o||i||a||s)&&(this.layout(n.items,n.idToItem,n.idToPosition,r.items),n.idToPosition=this.positions),n.clearChannel(hi),r.clearChannel(hi)}this.shouldUpdate=!1}},{key:"layout",value:function(t,n,r,o){var i,a=(i=t)?vn(i):i;if(!(0,e.isEmpty)(a)){for(var s=a.length,u=Math.ceil(Math.sqrt(s)),l=new Array(s),c=0,f=0;f0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,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}},wi=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))},xi=function(e,t,n,r){return Math.max(Math.min(t,n),Math.min(e,r))},Oi=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),xi(o,i,Math.min(t,a),n)):xi(o,i,t,n)};function Ei(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 Si(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)?Si(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 Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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 fa(){fa=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 g?t:g,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",y={};function g(){}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 O=b.prototype=g.prototype=Object.create(_);function E(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"==la(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===y)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===y)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")),y;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;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,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}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),y}},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),y}},t}function ha(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 da(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(da=function(){return!!e})()}function pa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function va(){return va="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=ya(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}},va.apply(this,arguments)}function ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ya(e)}function ga(e,t){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ga(e,t)}function ma(e,t,n){return(t=ba(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ba(e){var t=function(e){if("object"!=la(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=la(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==la(t)?t:String(t)}var _a="HierarchicalLayout",wa=function(e){return void 0!==e?vn(e):e},xa=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),ma(pa(n=function(e,t,n){return t=ya(t),function(e,t){if(t&&("object"===la(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pa(e)}(e,da()?Reflect.construct(t,n||[],ya(e).constructor):t.apply(e,n))}(this,t,[e])),"direction",void 0),ma(pa(n),"packing",void 0),ma(pa(n),"stateDisposers",void 0),ma(pa(n),"oldComputing",void 0),ma(pa(n),"computing",void 0),ma(pa(n),"pendingLayoutData",void 0),ma(pa(n),"worker",void 0),ma(pa(n),"directionChanged",void 0),ma(pa(n),"packingChanged",void 0),n.direction=na,n.packing=oa;var r=n.state,o=r.nodes,i=r.rels;return o.addChannel(_a),i.addChannel(_a),n.stateDisposers=[n.state.reaction((function(){return n.state.graphUpdates}),(function(){if(void 0!==o.version){var e=o.channels[_a],t=Object.values(e.adds).length>0,r=Object.values(e.removes).length>0,a=Object.values(e.updates),s=wr(a);n.shouldUpdate=n.shouldUpdate||t||r||s}if(void 0!==i.version){var u=i.channels[_a],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.setOptions(e),n.setupWorker().then((function(e){n.worker=e,n.worker.port.start(),n.pendingLayoutData=null,n.layout(o.items,o.idToItem,o.idToPosition,i.items)})).catch((function(e){Dr.error("Error setting up worker:",e)})),n}var n,r,o,i;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&&ga(e,t)}(t,e),n=t,r=[{key:"setupWorker",value:(o=fa().mark((function e(){var t,n,r,o,i;return fa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(rh.bind(rh,8716));case 3:n=e.sent,r=n.createHierarchicalLayoutWorker,t=r(),e.next=16;break;case 8:return e.prev=8,e.t0=e.catch(0),Dr.info("Failed to initialise shared worker: ",e.t0," Falling back to syncronous code."),e.next=13,Promise.resolve().then(rh.bind(rh,8716));case 13:o=e.sent,i=o.hierarchicalLayoutFallbackWorker,t=i;case 16:return e.abrupt("return",new Promise((function(e,n){t||n("Hierarchical layout code could not be initialised"),e(t)})));case 17:case"end":return e.stop()}}),e,null,[[0,8]])})),i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){ha(i,n,r,a,s,"next",e)}function s(e){ha(i,n,r,a,s,"throw",e)}a(void 0)}))},function(){return i.apply(this,arguments)})},{key:"setOptions",value:function(e){if(void 0!==e&&function(e){return Object.keys(e).every((function(e){return Yi.has(e)}))}(e)){var t=e.direction,n=void 0===t?na:t,r=e.packing,o=void 0===r?oa:r;Object.keys(ra).includes(n)&&(this.directionChanged=this.direction&&this.direction!==n,this.direction=n),ia.includes(o)&&(this.packingChanged=this.packing&&this.packing!==o,this.packing=o),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[_a].adds).length>0,u=Object.values(o.channels[_a].adds).length>0,l=Object.values(r.channels[_a].removes).length>0,c=Object.values(o.channels[_a].removes).length>0,f=Object.values(r.channels[_a].updates),h=wr(f);(e||s||u||l||c||i||a||h)&&this.layout(r.items,r.idToItem,r.idToPosition,o.items),r.clearChannel(_a),o.clearChannel(_a),this.directionChanged=!1,this.packingChanged=!1}va(ya(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=wa(e).map((function(e){return e.html,ca(e,aa)})),a=wa(t),s={};Object.keys(a).forEach((function(e){var t=a[e],n=(t.html,ca(t,sa));s[e]=n}));var u=wa(r).map((function(e){return e.captionHtml,ca(e,ua)})),l=wa(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 Dr.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(_a),null===(t=this.state.rels)||void 0===t||t.clearChannel(_a)}},{key:"destroy",value:function(){var e;this.stateDisposers.forEach((function(e){e()})),this.state.nodes.removeChannel(_a),this.state.rels.removeChannel(_a),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 Ta(t,e),i=null!==(r=this.animations.get(t))&&void 0!==r?r:{};return this.animations.set(t,Aa(Aa({},i),{},ka({},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,Na,Na),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=Na,t.height=Na;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,Na,Na)}catch(e){Dr.error("Failed to draw image",n.src,e),o.beginPath(),o.strokeStyle="black",o.rect(0,0,Na,Na),o.moveTo(0,0),o.lineTo(Na,Na),o.moveTo(0,Na),o.lineTo(Na,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 Ba(e)}(t=this.rels.map((function(t){var n=t.rel;return(0,e.isNumber)(n.captionSize)?n.captionSize:1})))||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 Ba(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)?Ba(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.")}());var t}},{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 Ka(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},Ja=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},es=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Za(this,"bundles",void 0),Za(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 Va(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=us(u,l,r))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;e.save(),e.lineWidth=t,e.strokeStyle=n,e.fillStyle=n,e.translate(a.x,a.y),e.rotate(s),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;ie.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(y-=1;n=e[y-1]," \t\n\r\v".includes(n);)y-=1;if(!(y-u>1)){o="",f=!0,c=!1;break}o=e.slice(u,y),d=t(o),f=!0,c=!1}return s[l]={text:o,hasEllipsisChar:f,hasHyphenChar:c},{v:s}}c=!1,f=!1;var g=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},Ds=function(e,t,n,r,o,i,a,s){e.font="bold ".concat(r,"px ").concat(n).replace(/"/g,"");var u=function(t){var n;return null===(n=e.measureText(t))||void 0===n?void 0:n.width},l=2;a===ds[1][1]?l=3:a===ds[2][1]&&(l=4);for(var c=a3&&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+f,t+f,o)},d=1,p=[],v=function(){if(0===(p=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=Is(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,h,d)).length)p=Ns(t,u,h,d,l>d);else if(p.some((function(e){return e.overflowed}))){var e=d;p=p.reduce((function(t,n){var r=l-t.length;if(0===r){var o=t[t.length-1];return o.text.endsWith("…")||(u(o.text)+u("…")>h(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=Ns(n.text,u,h,r);t=t.concat(i)}else t.push({text:n.text,hasEllipsisChar:!1,hasHyphenChar:!1});return t}),[])}else p=p.map((function(e){return ks(ks({},e),{},{hasEllipsisChar:!1,hasHyphenChar:!1})}));d+=1};0===p.length;)v();return Array.from(p)},Ls=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(Cs(e),[ks(ks({},t),{},{value:o,chars:o.split("").map((function(r,o){var i,a;return 0!==n&&e.length?o<2?null:Cs(null!==(i=t.styles)&&void 0!==i?i:[]):Cs(null!==(a=t.styles)&&void 0!==a?a:[])}))})])}return[]}),[]);return{stylesPerChar:e.reduce((function(e,t){return[].concat(Cs(e),Cs(t.chars))}),[]),fullCaption:e.map((function(e){return e.value})).join("")}};function Fs(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 Bs(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)?Bs(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 Bs(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=yr(),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,y=function(e,t,n,r,o,i,a){var s,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=yr(),c=e.size(),f=c>1,h=e.relIsOppositeDirection(i),d=h?n:t,p=h?t:n,v=e.waypointPath,y=null==v?void 0:v.points,g=null==v?void 0:v.from,m=null==v?void 0:v.to,b=as(d,g)&&as(p,m)||as(p,g)&&as(d,m),_=b?y[1]:null,w=b?y[y.length-2]:null,x=Gs(d),O=Gs(p),E=function(e,t){return Math.atan2(e.y-t.y,e.x-t.x)},S=Math.max(Math.PI,Us/(c/2)),T=f?r*S*(a?1:-1)/(null!==(s=d.size)&&void 0!==s?s:dr):0,P=E(b?_:p,d),C=b?E(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)},j=function(e,t){return{x:e.x+(t.x-e.x)/2,y:e.y+(t.y-e.y)/2}},M=function(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))*l},R=k(T,x),N=I(T,O),D=f?k(0,x):null,L=f?I(0,O):null,F=200*l,B=[];if(b){var U=M(R,_)2*(30*l+Math.min(x,O)))if(u){var q=Vs(d,p,x,O,i,e);B.push(new ss(R,q)),B.push(new ss(q,N))}else{var H=r*o,X=30+x,K=Math.sqrt(X*X+H*H),Z=30+O,$=Math.sqrt(Z*Z+H*H),Q=k(0,K),J=I(0,$);B.push(new ss(R,Q)),B.push(new ss(Q,J)),B.push(new ss(J,N))}else if(Y>(x+O)/2){var ee=Vs(d,p,x,O,i,e);B.push(new ss(R,ee)),B.push(new ss(ee,N))}else B.push(new ss(R,N))}return B}(t,n,r,d,p,e,h,s),g=[],m=y[0],b=u(m,h);g.push({x:m.p1.x+b.x,y:m.p1.y+b.y});for(var _=1;_6&&void 0!==arguments[6]&&arguments[6],u=yr(),l=o.selected,c=o.captions,f=void 0===c?[]:c,h=o.caption,d=void 0===h?"":h,p=o.width,v=o.disabled,y=o.captionAlign,g=void 0===y?"top":y,m=o.captionSize,b=void 0===m?1:m,_=f.length>0?null===(a=Ls(f))||void 0===a?void 0:a.fullCaption:d;if(void 0!==_){var w=!0===v?"#DDDDDD":"#848484",x=6*b*u,O=!0===l?"bold":"normal",E=_;e.fillStyle=w,e.font="".concat(O," ").concat(x,"px ").concat('"Open Sans", sans-serif');var S=function(t){return e.measureText(t).width},T=(null!=p?p:1)*(!0===l?1.5:1),P=S(E);if(P>r){var C=Ns(E,S,(function(){return r}),1,!1)[0];E=!0===C.hasEllipsisChar?"".concat(C.text,"..."):E,P=r}e.save(),e.translate(t.x,t.y),s?(e.rotate(n-zs),e.translate(2*x,0),e.rotate(-zs)):e.rotate(n);var A=(1+b)*u,k="bottom"===g?x/2+T+A:-(T+A);e.fillText(E,-P/2,k),e.restore();var I=2*k*Math.sin(n),j=2*k*Math.cos(n),M={position:{x:t.x-I,y:t.y+j},rotation:s?n-Math.PI:n,width:r/u,height:(x+A)/u};i.setLabelInfo(o.id,M)}},Xs=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;i8&&void 0!==arguments[8])||arguments[8];is(n,r)&&(n.id===r.id?function(e,t,n,r,o,i,a){var s=t.overlayIcon,u=t.selected,l=t.width,c=t.hovered,f=t.disabled,h=t.color,d=Qs(t,n,r),p=d.startPoint,v=d.endPoint,y=d.apexPoint,g=d.control1Point,m=d.control2Point,b=a.rings,_=a.shadow,w=yr(),x=b[0].color,O=b[1].color,E=b[0].width*w,S=b[1].width*w,T=40*w,P=(null!=l?l:1)*w,C=P>1?P/2:1,A=9*C,k=2*C,I=7*C,j=!0===u,M=!0===f,R=void 0!==s,N=Math.atan2(v.y-m.y,v.x-m.x),D=j?E*Math.sqrt(1+2*A/I*(2*A/I)):0,L={x:v.x-Math.cos(N)*(.5*A-k+D),y:v.y-Math.sin(N)*(.5*A-k+D)},F={headPosition:{x:v.x+Math.cos(N)*(.5*A-k-D),y:v.y+Math.sin(N)*(.5*A-k-D)},headAngle:N,headHeight:A,headChinHeight:k,headWidth:I};if(e.save(),e.lineCap="round",j&&(Ws(e,_),e.lineWidth=P+S,e.strokeStyle=O,Js(e,p,L,y,g,m),ys(e,S,O,F,!1,!0),Ys(e),e.lineWidth=P+E,e.strokeStyle=x,Js(e,p,L,y,g,m),ys(e,E,x,F,!1,!0)),e.lineWidth=P,!0===c&&!j&&!M){var B=_.color;Ws(e,_),e.strokeStyle=B,e.fillStyle=B,Js(e,p,L,y,g,m),ys(e,P,B,F),Ys(e)}var U=M?qa:null!=h?h:Ga;if(e.fillStyle=U,e.strokeStyle=U,Js(e,p,L,y,g,m),ys(e,P,U,F),i||R){var z,V=r.indexOf(t),G=null!==(z=r.angles[V])&&void 0!==z?z:0,W=y.x-Math.cos(N)*(D/4),Y=y.y-Math.sin(N)*(D/4),q=(G+zs)%Us,H=(G+Us)%Us1?d/2:1),C=9*P,A=2*P,k=7*P,I=Ss(w[w.length-2],w[w.length-1]),j=2*C,M=y?S*Math.sqrt(1+j/k*(j/k)):0,R=2-M,N=Math.floor(w.length/2);w.length>2&&y&&Ir.x,ie=w[N];1&~w.length?(J=w[oe?N:N-1],ee=w[oe?N-1:N],te=(J.x+ee.x)/2,ne=(J.y+ee.y)/2,re=Math.atan2(ee.y-J.y,ee.x-J.x)):(J=w[oe?N+1:N-1],ee=w[oe?N-1:N+1],s?(te=(ie.x+(J.x+ee.x)/2)/2,ne=(ie.y+(J.y+ee.y)/2)/2,re=oe?Math.atan2(n.y-r.y,n.x-r.x):Math.atan2(r.y-n.y,r.x-n.x)):(Ss(ie,J)>Ss(ie,ee)?ee=ie:J=ie,te=(J.x+ee.x)/2,ne=(J.y+ee.y)/2,re=Math.atan2(ee.y-J.y,ee.x-J.x)));var ae=y?Ts(re+zs,Ks(u)):{x:0,y:0},se=Ss(J,ee);if(a){var ue="bottom"===v?1:-1,le={x:te+ae.x*ue,y:ne+ae.y*ue};Hs(e,le,re,se,t,o)}if(m){var ce=l.position,fe=void 0===ce?[0,0]:ce,he=l.url,de=l.size,pe=Zs(void 0===de?1:de),ve=$s(fe,se,pe),ye=ve.widthAlign,ge=ve.heightAlign,me=fe[1]<0?-1:1,be=ae.x*me,_e=ae.y*me,we=pe/2;e.save(),e.translate(te,ne),e.rotate(re);var xe=-we+be+ye,Oe=-we+_e+ge;e.drawImage(i.getImage(he),xe,Oe,pe,pe),e.restore()}}e.restore()}(e,t,n,r,o,i,a,u,s))},tu=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 is(n,r)?n.id===r.id?function(e,t,n){for(var r=Qs(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=Fs(qs(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 nu(e){return nu="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},nu(e)}var ru=/^\s+/,ou=/\s+$/;function iu(e,t){if(t=t||{},(e=e||"")instanceof iu)return e;if(!(this instanceof iu))return new iu(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(ru,"").replace(ou,"").toLowerCase();var t,n=!1;if(xu[e])e=xu[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=Nu.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Nu.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Nu.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Nu.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Nu.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Nu.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Nu.hex8.exec(e))?{r:Pu(t[1]),g:Pu(t[2]),b:Pu(t[3]),a:Iu(t[4]),format:n?"name":"hex8"}:(t=Nu.hex6.exec(e))?{r:Pu(t[1]),g:Pu(t[2]),b:Pu(t[3]),format:n?"name":"hex"}:(t=Nu.hex4.exec(e))?{r:Pu(t[1]+""+t[1]),g:Pu(t[2]+""+t[2]),b:Pu(t[3]+""+t[3]),a:Iu(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=Nu.hex3.exec(e))&&{r:Pu(t[1]+""+t[1]),g:Pu(t[2]+""+t[2]),b:Pu(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==nu(e)&&(Du(e.r)&&Du(e.g)&&Du(e.b)?(t=e.r,n=e.g,r=e.b,o={r:255*Su(t,255),g:255*Su(n,255),b:255*Su(r,255)},l=!0,c="%"===String(e.r).substr(-1)?"prgb":"rgb"):Du(e.h)&&Du(e.s)&&Du(e.v)?(a=Au(e.s),s=Au(e.v),o=function(e,t,n){e=6*Su(e,360),t=Su(t,100),n=Su(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"):Du(e.h)&&Du(e.s)&&Du(e.l)&&(a=Au(e.s),u=Au(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=Su(e,360),t=Su(t,100),n=Su(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=Eu(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 au(e,t,n){e=Su(e,255),t=Su(t,255),n=Su(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(iu(r));return i}function wu(e,t){t=t||6;for(var n=iu(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(iu({h:r,s:o,v:i})),i=(i+s)%1;return a}iu.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=Eu(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=su(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=su(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=au(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=au(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 uu(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=[Cu(Math.round(e).toString(16)),Cu(Math.round(t).toString(16)),Cu(Math.round(n).toString(16)),Cu(ku(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*Su(this._r,255))+"%",g:Math.round(100*Su(this._g,255))+"%",b:Math.round(100*Su(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*Su(this._r,255))+"%, "+Math.round(100*Su(this._g,255))+"%, "+Math.round(100*Su(this._b,255))+"%)":"rgba("+Math.round(100*Su(this._r,255))+"%, "+Math.round(100*Su(this._g,255))+"%, "+Math.round(100*Su(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Ou[uu(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+lu(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=iu(e);n="#"+lu(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 iu(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(du,arguments)},brighten:function(){return this._applyModification(pu,arguments)},darken:function(){return this._applyModification(vu,arguments)},desaturate:function(){return this._applyModification(cu,arguments)},saturate:function(){return this._applyModification(fu,arguments)},greyscale:function(){return this._applyModification(hu,arguments)},spin:function(){return this._applyModification(yu,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(_u,arguments)},complement:function(){return this._applyCombination(gu,arguments)},monochromatic:function(){return this._applyCombination(wu,arguments)},splitcomplement:function(){return this._applyCombination(bu,arguments)},triad:function(){return this._applyCombination(mu,[3])},tetrad:function(){return this._applyCombination(mu,[4])}},iu.fromRatio=function(e,t){if("object"==nu(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:Au(e[r]));e=n}return iu(e,t)},iu.equals=function(e,t){return!(!e||!t)&&iu(e).toRgbString()==iu(t).toRgbString()},iu.random=function(){return iu.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},iu.mix=function(e,t,n){n=0===n?0:n||50;var r=iu(e).toRgb(),o=iu(t).toRgb(),i=n/100;return iu({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})},iu.readability=function(e,t){var n=iu(e),r=iu(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},iu.isReadable=function(e,t,n){var r,o,i,a,s,u=iu.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},iu.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=iu(t[l]));return iu.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,iu.mostReadable(e,["#fff","#000"],n))};var xu=iu.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"},Ou=iu.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(xu);function Eu(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Su(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 Tu(e){return Math.min(1,Math.max(0,e))}function Pu(e){return parseInt(e,16)}function Cu(e){return 1==e.length?"0"+e:""+e}function Au(e){return e<=1&&(e=100*e+"%"),e}function ku(e){return Math.round(255*parseFloat(e)).toString(16)}function Iu(e){return Pu(e)/255}var ju,Mu,Ru,Nu=(Mu="[\\s|\\(]+("+(ju="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+ju+")[,|\\s]+("+ju+")\\s*\\)?",Ru="[\\s|\\(]+("+ju+")[,|\\s]+("+ju+")[,|\\s]+("+ju+")[,|\\s]+("+ju+")\\s*\\)?",{CSS_UNIT:new RegExp(ju),rgb:new RegExp("rgb"+Mu),rgba:new RegExp("rgba"+Ru),hsl:new RegExp("hsl"+Mu),hsla:new RegExp("hsla"+Ru),hsv:new RegExp("hsv"+Mu),hsva:new RegExp("hsva"+Ru),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 Du(e){return!!Nu.CSS_UNIT.exec(e)}var Lu=function(e){return iu.mostReadable(e,["#1A1B1D","#FFFFFF"]).toString()};function Fu(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]:1,a=t.x,s=void 0===a?0:a,u=t.y,l=void 0===u?0:u,c=t.size,f=void 0===c?dr:c,h=t.caption,d=void 0===h?"":h,p=t.captions,v=void 0===p?[]:p,y=t.captionAlign,g=void 0===y?"center":y,m=t.captionSize,b=void 0===m?1:m,_=t.disabled,w=t.activated,x=t.selected,O=t.hovered,E=t.id,S=t.icon,T=t.overlayIcon,P=o.selected,C=yr(),A=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 Fu(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)?Fu(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||dr)*o*yr();return{width:t.getValueForAnimationName(e.id,"ring-".concat(r),a),color:i}}))}(t,r,o),k=A.reduce((function(e,t){return e+t.width}),0),I=P.shadow.width*C,j=P.shadow.opacity,M=P.shadow.color,R=f*C,N=2*R,D=function(e,t){if(!e||!t)return{nodeInfoLevel:0,fontInfoLevel:1.25,iconInfoLevel:1};var n=yr(),r=1600*n*(1200*n),o=Math.pow(e,2)*Math.PI*Math.pow(t,2)/(r/100);return{nodeInfoLevel:_s(o,hs),fontInfoLevel:_s(o,ds),iconInfoLevel:_s(o,ps)}}(R,i),L=D.nodeInfoLevel,F=D.fontInfoLevel,B=D.iconInfoLevel,U=t.color||"#478BFF",z=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:dr)/({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}(F,R,b,Boolean(S)),V=Lu(U),G=R,W=G,Y=Boolean(d.length),q=Boolean(v.length),H=Boolean(S),X=Boolean(T);if(k>0&&(G=R+k),_)U="#EDEDED",V="#DDDDDD";else{if(w){var K=Date.now()%1e3/1e3,Z=K<.7?K/.7:0,$=vs(U,.4-.4*Z);bs(e,s,l,$,R+.88*R*Z)}var Q=x||O?I:0,J=r.getValueForAnimationName(E,"shadowWidth",Q);J>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,vs(r,.5*a)),u.addColorStop(.05,vs(r,.5*a)),u.addColorStop(.5,vs(r,.12*a)),u.addColorStop(.75,vs(r,.03*a)),u.addColorStop(1,vs(r,0)),e.fillStyle=u,ms(e,t,n,s),e.fill()}(e,s,l,M,G,J,j)}if(bs(e,s,l,U,R),k>0&&gs(e,s,l,W,A),H){var ee=L<2||!(Y||q),te=L>0?1:0,ne=ee?1*R:.75*R;ne/=B;var re=ee?.5*ne:ne*(1===B?"center"===g?1.3:"bottom"===g||ee?1.1:0:"center"===g?1.35:"bottom"===g||ee?1.1:0),oe=ne/2;ne=r.getValueForAnimationName(E,"iconSize",ne),oe=r.getValueForAnimationName(E,"iconXPos",oe),re=r.getValueForAnimationName(E,"iconYPos",re),e.save();var ie=!0===_?.1:te;e.globalAlpha=r.getValueForAnimationName(E,"iconOpacity",ie);var ae="#fff"===V,se=n.getImage(S,ae);e.drawImage(se,s-oe,l-re,Math.floor(ne),Math.floor(ne)),e.restore()}if(X){var ue,le,ce,fe,he,de=N*(null!==(ue=T.size)&&void 0!==ue?ue:1),pe=de/2-R*(null!==(le=null===(ce=T.position)||void 0===ce?void 0:ce[1])&&void 0!==le?le:0),ve=de/2-R*(null!==(fe=null===(he=T.position)||void 0===he?void 0:he[0])&&void 0!==fe?fe:0);e.save();var ye=!0===_?.1:1;e.globalAlpha=r.getValueForAnimationName(E,"iconOpacity",ye);var ge=n.getImage(T.url);e.drawImage(ge,s-ve,l-pe,de,de),e.restore()}var me=L<2?0:1,be=r.getValueForAnimationName(E,"textOpacity",me,0),_e=vs(V,be),we='"Open Sans", sans-serif';if(Y&&be>0){var xe=Ds(e,d,we,z,.7*N,H,F,null==t||t.captionAlign);e.fillStyle=_e,e.font="normal ".concat(z,"px ").concat(we);var Oe=1+z,Ee=-(xe.length-2)*Oe/2,Se=d.split("").map((function(e){return[]}));ws(e,xe,Se,Ee,z,we,Oe,s,l)}if(q){var Te=L<2?0:1,Pe=r.getValueForAnimationName(E,"textOpacity",Te,0),Ce=vs(V,Pe),Ae='"Open Sans", sans-serif',ke=Boolean(S);if(Pe>0){var Ie=Ls(v),je=Ie.stylesPerChar,Me=Ie.fullCaption,Re="center"===g?.7*N:2*Math.sqrt(Math.pow(N/2,2)-Math.pow(N/3,2)),Ne=Ds(e,Me,Ae,z,Re,ke,F,null==t||t.captionAlign);e.fillStyle=Ce;var De,Le=z,Fe=-(Ne.length-2)*Le/2;De=g&&"center"!==g?"bottom"===g?Fe+R/Math.PI:Fe-R/Math.PI:Fe,ws(e,Ne,je,De,z,Ae,Le,s,l)}}e.save(),e.restore()};function zu(e){return zu="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},zu(e)}function Vu(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 Gu(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 Yu(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?2.5:i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),qu(this,"arrowBundler",void 0),qu(this,"activeNodes",void 0),qu(this,"canvas",void 0),qu(this,"context",void 0),qu(this,"state",void 0),qu(this,"stateDisposers",void 0),qu(this,"relationshipThreshold",void 0),qu(this,"animationHandler",void 0),qu(this,"imageCache",void 0),qu(this,"needsRun",void 0),qu(this,"nodeVersion",void 0),qu(this,"relVersion",void 0),qu(this,"waypointVersion",void 0),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(Xu),r.rels.addChannel(Xu),this.relationshipThreshold=a,this.nodeVersion=r.nodes.version,this.relVersion=r.rels.version,this.waypointVersion=r.waypoints.counter,this.animationHandler=new ja,this.animationHandler.setOptions({fadeDuration:150,sizeDuration:150}),this.arrowBundler=new es(r.rels.items,r.waypoints.data),this.imageCache=new La,this.needsRun=!0}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[Xu],r=e.rels.channels[Xu],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(Xu)),this.relVersion0||Object.keys(s).length>0,e.rels.clearChannel(Xu),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=yr(),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!==Hi);var y=this.getNodesToRender(e,d,p);this.renderNodes(y,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,y=Wu(h.items);try{for(y.s();!(r=y.n()).done;){var g=r.value,m=s.getBundle(g),b=Gu(Gu({},p[g.from]),v[g.from]),_=Gu(Gu({},p[g.to]),v[g.to]),w=e||f>l||void 0!==g.captionHtml,x=tu(g,m,b,_,w,c!==Hi);if(null!==x){var O,E,S,T,P,C,A=this.isBoundingBoxOffScreen(x,t,n),k=Ss({x:null!==(O=b.x)&&void 0!==O?O:0,y:null!==(E=b.y)&&void 0!==E?E: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:dr)+(null!==(C=_.size)&&void 0!==C?C:dr))*devicePixelRatio,j=b.id!==_.id&&I>k;A||j||(!0===g.disabled?i.push(Gu(Gu({},g),{},{fromNode:b,toNode:_,showLabel:w})):!0===g.selected?o.push(Gu(Gu({},g),{},{fromNode:b,toNode:_,showLabel:w})):a.push(Gu(Gu({},g),{},{fromNode:b,toNode:_,showLabel:w})))}}}catch(e){y.e(e)}finally{y.f()}return[].concat(i,a,o)}},{key:"getNodesToRender",value:function(e,t,n){var r,o=[],i=[],a=[],s=this.state.nodes.idToItem,u=Wu(e);try{for(u.s();!(r=u.n()).done;){var l,c,f=r.value,h=Bu(f);this.isBoundingBoxOffScreen(h,t,n)||(!0===(null===(l=s[f.id])||void 0===l?void 0:l.disabled)?o.push(Gu({},f)):!0===(null===(c=s[f.id])||void 0===c?void 0:c.selected)?i.push(Gu({},f)):a.push(Gu({},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=a.nodes.idToItem,u=a.nodeBorderStyles,l=Wu(e);try{for(l.s();!(r=l.n()).done;){var c=r.value;Uu(t,Gu(Gu({},s[c.id]),c),o,i,u,n)}}catch(e){l.e(e)}finally{l.f()}}},{key:"renderRelationships",value:function(e,t,n){var r,o=this.state.relationshipBorderStyles.selected,i=this.arrowBundler,a=this.imageCache,s=Wu(e);try{for(s.s();!(r=s.n()).done;){var u=r.value,l=i.getBundle(u),c=u.fromNode,f=u.toNode,h=u.showLabel;eu(t,u,c,f,l,a,h,o,n)}}catch(e){s.e(e)}finally{s.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=yr(),u=Wu(i);try{var l=function(){var o=t.value,i=o.id,u=o.size,l=void 0===u?dr: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=Wu(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(!is(n,r))return 1/0;var s=n===r?function(e,t,n,r){var o=Qs(t,n,r),i=o.startPoint,a=o.endPoint,s=o.apexPoint,u=o.control1Point,l=o.control2Point,c=cs(i,s,u,e),f=cs(s,a,l,e);return Math.min(c,f)}(e,t,n,o):function(e,t,n,r,o,i,a){var s=qs(t,n,r,o,i,a),u=1/0;if(a&&3===s.length)u=cs(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(Xu),this.state.rels.removeChannel(Xu)}},{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(t,n){if((0,e.isNil)(t)||(0,e.isNil)(n))return{offsetX:0,offsetY:0};var r=n.getBoundingClientRect(),o=window.devicePixelRatio||1;return{offsetX:o*(t.clientX-r.left-.5*r.width),offsetY:o*(t.clientY-r.top-.5*r.height)}}(t,n);return{x:o+a.offsetX/r,y:i+a.offsetY/r}};function $u(e){return $u="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},$u(e)}function Qu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ju(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[rl].adds).length>0,r=Object.values(t.channels[rl].adds).length>0,o=Object.values(e.channels[rl].removes).length>0,i=Object.values(t.channels[rl].removes).length>0,a=Object.values(e.channels[rl].updates),s=Object.values(t.channels[rl].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(rl),t.clearChannel(rl)}},{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=Zu(e,n.canvas,t.minimapZoom,t.minimapPanX,t.minimapPanY),o=r.x,i=r.y;t.setPan(o,i)}},{key:"handleMinimapWheel",value:function(t){var n=this.state,r=this.mainSceneRenderer;n.setZoom(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,e.isNil)(t)||isNaN(t.deltaY)?n:n-t.deltaY/500*Math.min(1,n)}(t,n.zoom),r.canvas),t.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(rl),this.state.rels.removeChannel(rl),this.mainSceneRenderer.destroy(),this.minimapRenderer.destroy()}}]),t}(),il=function(){function e(){Qu(this,e),tl(this,"mainSceneRenderer",void 0),tl(this,"minimapRenderer",void 0),tl(this,"needsRun",void 0),tl(this,"minimapMouseDown",void 0),tl(this,"stateDisposers",void 0),tl(this,"state",void 0)}return el(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 al(e){return al="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},al(e)}function sl(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 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}}(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 ul(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 ringAlpha = getCircleAlpha(ringSize, nodeSize, dist);\n lowp vec3 finalColor = color.xyz;\n lowp float finalAlpha = nodeAlpha;\n\n if (selected > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(ringSize2, dist);\n lowp float ringAlpha2 = getCircleAlpha(ringSize2, nodeSize, dist);\n\n finalColor = mix(lineColor, finalColor, nodeAlpha);\n finalColor = mix(selectedBorderColor, finalColor, ringAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha2);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, max(ringAlpha, ringAlpha2)));\n } else if (hovered > 0.0) {\n if (drawDefaultBorder > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(ringSize, dist);\n \n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha);\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 = ringAlpha;\n }\n }\n gl_FragColor = vec4(finalColor, 1.0) * finalAlpha;\n }\n}\n"),this.nodeAnimShader=new bo(e,"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 bo(e,"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 bo(e,"attribute vec2 coordinates;\nuniform mat4 u_projection;\n\nvoid main(void) {\n gl_Position = u_projection * vec4(coordinates, 0.0, 1.0);\n}\n","void main(void) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n}\n"),this.setShaderUniforms(o),e.clearColor(0,0,0,0),e.disable(e.DEPTH_TEST),this.defaultRelColor=4284900966,this.defaultNodeColor=4294937415,this.disableRelColor="#EDEDED",this.disableNodeColor="#EDEDED",e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this.gl=e,this.activeNodes={},this.canvas=e.canvas,this.projection=fo(),this.setData({nodes:n.items,rels:r.items}),this.createPositionTexture(),this.setupViewportRendering()}var n,r;return n=t,r=[{key:"setShaderUniforms",value:function(e){var t,n,r=vi().get.rgb(null===(t=e.nodeBorderStyles.default)||void 0===t||null===(t=t.rings[0])||void 0===t?void 0:t.color),o=vi().get.rgb(null===(n=e.nodeBorderStyles.selected)||void 0===n||null===(n=n.rings[1])||void 0===n?void 0:n.color);if(this.nodeShader.use(),null!=r&&r.length){var i=r.slice(0,3).map((function(e){return e/255}));this.nodeShader.setUniform("u_nodeBorderColor",i),this.nodeShader.setUniform("u_drawDefaultBorder",1)}else this.nodeShader.setUniform("u_drawDefaultBorder",0);var a=o.slice(0,3).map((function(e){return e/255}));this.nodeShader.setUniform("u_selectedBorderColor",a)}},{key:"setData",value:function(e){var t=_r(e.rels);this.setupNodeRendering(e.nodes),this.setupRelationshipRendering(t)}},{key:"render",value:function(e,t,n){var r,o=this.gl,i=this.idToIndex,a=sl(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,fr,fr,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(t){var n,r=this.gl,o=this.idToIndex,i=this.disableNodeColor,a=this.nodeBuffer,s=this.nodeDataByte,u=!1,l=sl(t);try{for(l.s();!(n=l.n()).done;){var c=n.value,f=o[c.id];if(!(0,e.isNil)(c.color)||!0===c.disabled){var h=vi().get.rgb(!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||dr,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 t,n=_r(e),r=this.gl,o=!1,i=sl(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=void 0===l?this.defaultRelColor:dl(!0===c?this.disableRelColor:l);this.relData.positionsAndColors[f*hl+0]=h,this.relData.positionsAndColors[f*hl+4]=h,this.relData.positionsAndColors[f*hl+8]=h,this.relData.positionsAndColors[f*hl+12]=h,this.relData.positionsAndColors[f*hl+16]=h,this.relData.positionsAndColors[f*hl+20]=h,o=!0,void 0!==u&&(this.relData.widths[f*hl+3]=u,this.relData.widths[f*hl+7]=u,this.relData.widths[f*hl+11]=u,this.relData.widths[f*hl+15]=u,this.relData.widths[f*hl+19]=u,this.relData.widths[f*hl+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,fr,fr,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=yr(),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=fo(),c=2.6315789473684212*yr();ho(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(){this.viewportBoxBuffer=this.gl.createBuffer()}},{key:"setupNodeRendering",value:function(t){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=t.length;var a=new ArrayBuffer(3*t.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 Tl(e,t){if(e){if("string"==typeof e)return Pl(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)?Pl(e,t):void 0}}function Pl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);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),y}},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),y}},t}function zl(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 Vl(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($l).pop()},Jl=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),Yl(this,"destroyed",void 0),Yl(this,"state",void 0),Yl(this,"callbacks",void 0),Yl(this,"instanceId",void 0),Yl(this,"glController",void 0),Yl(this,"webGLContext",void 0),Yl(this,"webGLMinimapContext",void 0),Yl(this,"htmlOverlay",void 0),Yl(this,"hasResized",void 0),Yl(this,"hierarchicalLayout",void 0),Yl(this,"gridLayout",void 0),Yl(this,"freeLayout",void 0),Yl(this,"d3ForceLayout",void 0),Yl(this,"forceLayout",void 0),Yl(this,"canvasRenderer",void 0),Yl(this,"glCanvas",void 0),Yl(this,"canvasRect",void 0),Yl(this,"glMinimapCanvas",void 0),Yl(this,"c2dCanvas",void 0),Yl(this,"isInRenderSwitchAnimation",void 0),Yl(this,"justSwitchedRenderer",void 0),Yl(this,"justSwitchedLayout",void 0),Yl(this,"layoutUpdating",void 0),Yl(this,"layoutComputing",void 0),Yl(this,"isRenderingDisabled",void 0),Yl(this,"setRenderSwitchAnimation",void 0),Yl(this,"stateDisposers",void 0),Yl(this,"zoomTransitionHandler",void 0),Yl(this,"currentLayout",void 0),Yl(this,"layoutTimeLimit",void 0),Yl(this,"pixelRatio",void 0),Yl(this,"removeResizeListener",void 0),Yl(this,"removeMinimapResizeListener",void 0),Yl(this,"pendingZoomOperation",void 0),Yl(this,"layoutRunner",void 0),Yl(this,"animationRequestId",void 0),Yl(this,"layoutDoneCallback",void 0),Yl(this,"layoutComputingCallback",void 0),Yl(this,"currentLayoutType",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=t.nodes,v=t.rels,y=t.webGLVisible,g=t.disableWebGL;this.state=t,this.callbacks=new Il,this.instanceId=d;var m=s;m.setAttribute("instanceId",d),m.setAttribute("data-testid","nvl-parent"),null!==(r=m.style.height)&&void 0!==r&&r.length||Object.assign(m.style,{height:"100%"}),null!==(o=m.style.outline)&&void 0!==o&&o.length||Object.assign(m.style,{outline:"none"});var b=bl(m,this.onWebGLContextLost.bind(this)),_=bl(l,this.onWebGLContextLost.bind(this));if(b.setAttribute("data-testid","nvl-gl-canvas"),g)this.glController=new il;else{var w=xl(b),x=xl(_);this.glController=new ol({mainSceneRenderer:new pl(w,p,v,this.state),minimapRenderer:new pl(x,p,v,this.state),state:t}),this.webGLContext=w,this.webGLMinimapContext=x}var O=bl(m,this.onWebGLContextLost.bind(this));O.setAttribute("data-testid","nvl-c2d-canvas");var E=O.getContext("2d"),S=document.createElement("div");Object.assign(S.style,Wl(Wl({},vr),{},{overflow:"hidden"})),m.appendChild(S),this.htmlOverlay=S,this.hasResized=!0,this.hierarchicalLayout=new xa(Wl(Wl({},c),{},{state:this.state})),this.gridLayout=new di({state:this.state}),this.freeLayout=new ii({state:this.state}),this.d3ForceLayout=new Rr({state:this.state}),this.forceLayout=g?this.d3ForceLayout:new Zo(Wl(Wl({},c),{},{webGLContext:this.webGLContext,state:this.state})),this.state.setLayout(f),this.state.setLayoutOptions(c);var T=new Ku(O,E,t,n);this.canvasRenderer=T,this.glCanvas=b,this.canvasRect=b.getBoundingClientRect(),this.glMinimapCanvas=_,this.c2dCanvas=O,this.glCanvas.style.opacity=y?"1":"0",this.c2dCanvas.style.opacity=y?"0":"1",this.isInRenderSwitchAnimation=!1,this.justSwitchedRenderer=!1,this.justSwitchedLayout=!1,this.hasResized=!1,this.layoutUpdating=!1,this.layoutComputing=!1,this.isRenderingDisabled=!1,p.addChannel(Hl),v.addChannel(Hl),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)}))),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 Fl({state:t,getNodePositions:function(e){return a.currentLayout.getNodePositions(e)},canvas:b}),this.layoutTimeLimit=null!==(i=n.layoutTimeLimit)&&void 0!==i?i:16,this.pixelRatio=yr(),this.removeResizeListener=xn()(m,(function(){gl(b),gl(O),a.canvasRect=b.getBoundingClientRect(),a.hasResized=!0})),this.removeMinimapResizeListener=xn()(l,(function(){gl(_)})),$l[d]=this,window.__Nvl_dumpNodes=function(e){var t;return null===(t=Ql(e))||void 0===t?void 0:t.dumpNodes()},window.__Nvl_dumpRelationships=function(e){var t;return null===(t=Ql(e))||void 0===t?void 0:t.dumpRelationships()},window.__Nvl_registerDoneCallback=function(e,t){var n;return null===(n=Ql(t))||void 0===n?void 0:n.on(Zl,e)},window.__Nvl_getNodesOnScreen=function(e){var t;return null===(t=Ql(e))||void 0===t?void 0:t.getNodesOnScreen()},window.__Nvl_getZoomLevel=function(e){var t;return null===(t=Ql(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=bi(Object.values(t.idToPosition),n),a=i.centerX,s=i.centerY,u=i.nodesWidth,l=i.nodesHeight,c=_i(u,l,this.glMinimapCanvas.width,this.glMinimapCanvas.height),f=c.zoomX,h=c.zoomY,d=wi(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(Kl))throw t;e.callIfRegistered(Kl,t)}}),13),this.animationRequestId=window.requestAnimationFrame((function t(){try{!function(t){if(e.destroyed)Dr.info("STEP IN A DESTROYED STRIP");else{var o=yr();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,y=e.glController.minimapMouseDown;if(n.clearChannel(Hl),r.clearChannel(Hl),u||a||c||d||f||h||y||p||v){!v||l||e.currentLayout.getComputing()||(e.pendingZoomOperation(),e.pendingZoomOperation=null);var g=i||s||c;e.zoomTransitionHandler.update(g,(function(){return e.callIfRegistered("onZoomTransitionDone")})),p&&e.glController.onResize();var m=e.currentLayout.getNodePositions(n.items);if(n.updatePositions(m),e.callIfRegistered("onLayoutStep",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(E,"rad")})}}}for(var j=0;j=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(Wl(Wl({},i),{},{x:s.x,y:s.y}))}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"dumpRelationships",value:function(){return vn(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(vn(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&&gc&&mu&&E.xc&&E.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===Hi?this.hierarchicalLayout:e===qi?this.forceLayout:e===Xi?this.gridLayout:e===Ki?this.freeLayout:e===Zi?this.d3ForceLayout:this.forceLayout}},{key:"setLayout",value:function(e){Dr.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=Wl(Wl({},Xl),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=ml(this.c2dCanvas.width,this.c2dCanvas.height),s=wl(a);this.canvasRenderer.processUpdates(),this.canvasRenderer.render(i,{canvas:a,context:s,backgroundColor:r,ignoreAnimations:!0}),this.createDownloadLink(n,a).click(),_l(a),a=null,s=null}},{key:"prepareLargeFileForDownload",value:function(e){var t=this,n=Wl(Wl({},Xl),e),r=this.state.nodes.items,o=n.filename,i=n.backgroundColor,a=this.currentLayout.getNodePositions(r),s=bi(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 Dr.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=ml(h,d),s=wl(r);t.canvasRenderer.processUpdates(),t.canvasRenderer.render(a,{canvas:r,context:s,backgroundColor:i,ignoreAnimations:!0,showCaptions:!0}),t.createDownloadLink(o,r).click(),_l(r),r=null,s=null,e(!0)}catch(e){n(e)}}),500)}))}},{key:"saveFullGraphToLargeFile",value:(r=Ul().mark((function e(t){var n,r,o,i;return Ul().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Wl(Wl({},Xl),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),Dr.error("An error occurred while downloading the image"),!this.callbacks.isCallbackRegistered(Kl)){e.next=16;break}this.callIfRegistered(Kl,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){zl(i,n,o,a,s,"next",e)}function s(e){zl(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}(),ac=function(){function e(t){tc(this,e),this.name=t,this.startTime=performance.now(),this.endTime=null}return rc(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}(),sc=function(){function e(){tc(this,e),this.root=new ic(new ac("Performance Tree"),null),this.current=this.root}return rc(e,[{key:"clear",value:function(){this.root.children=[],this.current=this.root}},{key:"add",value:function(e){if(this.current){var t=new ic(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 ic(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}(),uc=function(){function e(){tc(this,e),window.performance?(this.disabled=!1,this.tree=new sc):(this.disabled=!0,this.tree=null)}return rc(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 ac(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}(),lc=function(e){return Boolean(e)&&"string"==typeof e.id&&e.id.length>0},cc=rh(1187);function fc(e){return fc="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},fc(e)}function hc(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 dc(e){for(var t=1;t{var t={};return rh.d(t,e),t})({AnalyticsBrowser:()=>eh});var mc,bc=new Uint8Array(16);function _c(){if(!mc&&!(mc="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 mc(bc)}const wc=/^(?:[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 xc=[],Oc=0;Oc<256;++Oc)xc.push((Oc+256).toString(16).substr(1));var Ec,Sc,Tc=0,Pc=0;const Cc=function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||Ec,a=void 0!==e.clockseq?e.clockseq:Sc;if(null==i||null==a){var s=e.random||(e.rng||_c)();null==i&&(i=Ec=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=Sc=16383&(s[6]<<8|s[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:Pc+1,c=u-Tc+(l-Pc)/1e4;if(c<0&&void 0===e.clockseq&&(a=a+1&16383),(c<0||u>Tc)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Tc=u,Pc=l,Sc=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=(xc[e[t+0]]+xc[e[t+1]]+xc[e[t+2]]+xc[e[t+3]]+"-"+xc[e[t+4]]+xc[e[t+5]]+"-"+xc[e[t+6]]+xc[e[t+7]]+"-"+xc[e[t+8]]+xc[e[t+9]]+"-"+xc[e[t+10]]+xc[e[t+11]]+xc[e[t+12]]+xc[e[t+13]]+xc[e[t+14]]+xc[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&wc.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n}(o)};function Ac(e){return Ac="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},Ac(e)}function kc(){kc=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 g?t:g,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",y={};function g(){}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 O=b.prototype=g.prototype=Object.create(_);function E(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"==Ac(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===y)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===y)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")),y;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;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,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}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),y}},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),y}},t}function Ic(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 jc(e){var t=function(e){if("object"!=Ac(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ac(t)?t:String(t)}var Mc=window.localStorage,Rc="neo4j.nvl.sTid",Nc=!1,Dc=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=jc(n="analytics"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;var o=new gc.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=kc().mark((function e(t){var n;return kc().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){Dr.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){Ic(i,r,o,a,s,"next",e)}function s(e){Ic(i,r,o,a,s,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)})},{key:"identify",value:function(){if(!Nc){var e=this.getSegmentTrackingId();this.analytics.identify(e).catch((function(e){Dr.debug("TRACKING: Identifying user for Segment tracking failed. err: ".concat(e))})),Nc=!0}}},{key:"loadSavedSegmentId",value:function(){try{var e=Mc.getItem(Rc);return"string"==typeof e?e:null}catch(e){return Dr.debug("TRACKING: Retrieving tracking Id failed. err: ".concat(e)),null}}},{key:"getSegmentTrackingId",value:function(){var e=this.loadSavedSegmentId(),t=null!=e?e:Cc();return this.saveTrackingId(t),t}},{key:"saveTrackingId",value:function(e){Mc.setItem(Rc,e)}},{key:"ready",value:function(){return this.analytics.ready().catch((function(e){Dr.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 Uc(e,t){if(e){if("string"==typeof e)return zc(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)?zc(e,t):void 0}}function zc(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]:[],i=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,t),qc(this,n=nf),n.add(this),Yc(this,Zc,void 0),Yc(this,$c,void 0),Yc(this,Qc,void 0),Yc(this,Jc,void 0),Yc(this,ef,void 0),Yc(this,tf,void 0),!0!==a.disableTelemetry&&(Xc(tf,this,new Dc),Hc(tf,this).init("4SGwdwzuDm5WkFvQtz7D6ATQlo14yjmW"),Hc(tf,this).identify()),Kc(nf,this,af).call(this,a),Xc(Zc,this,new o(s)),Xc($c,this,new uc),Xc(ef,this,a),Hc(ef,this).frame=e,this.checkWebGLCompatibility(),Kc(nf,this,of).call(this,r,i,a)}var n,r;return n=t,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=Hc(Qc,this),o=r.zoom,i=r.layout,a=r.layoutOptions,s=r.nodes,u=r.rels;Hc(Jc,this).destroy(),Object.assign(Hc(ef,this),e),Kc(nf,this,of).call(this,s.items,u.items,Hc(ef,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]:[];Kc(nf,this,lf).call(this,e),Kc(nf,this,cf).call(this,t,e);var n={added:!1,updated:!1};Hc(Qc,this).nodes.update(e,Gc({},n)),Hc(Qc,this).rels.update(t,Gc({},n)),Hc(Qc,this).nodes.add(e,Gc({},n)),Hc(Qc,this).rels.add(t,Gc({},n)),Hc(Qc,this).setGraphUpdated(),Hc(Jc,this).updateHtmlOverlay()}},{key:"getSelectedNodes",value:function(){var e=this;return Hc(Qc,this).nodes.items.filter((function(e){return e.selected})).map((function(t){return Gc(Gc({},t),Hc(Qc,e).nodes.idToPosition[t.id])}))}},{key:"getSelectedRelationships",value:function(){return Hc(Qc,this).rels.items.filter((function(e){return e.selected}))}},{key:"updateElementsInGraph",value:function(e,t){var n={added:!1,updated:!1};Kc(nf,this,lf).call(this,e),Kc(nf,this,cf).call(this,t,e),Hc(Qc,this).nodes.update(e,Gc({},n)),Hc(Qc,this).rels.update(t,Gc({},n)),Hc(Jc,this).updateHtmlOverlay()}},{key:"addElementsToGraph",value:function(e,t){Kc(nf,this,lf).call(this,e),Kc(nf,this,cf).call(this,t,e);var n={added:!1,updated:!1};Hc(Qc,this).nodes.add(e,Gc({},n)),Hc(Qc,this).rels.add(t,Gc({},n)),Hc(Jc,this).updateHtmlOverlay()}},{key:"removeNodesWithIds",value:function(t){if(Array.isArray(t)&&!(0,e.isEmpty)(t)){var n,r={},o=Bc(t);try{for(o.s();!(n=o.n()).done;)r[n.value]=!0}catch(e){o.e(e)}finally{o.f()}var i,a=[],s=Bc(Hc(Qc,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&&Kc(nf,this,uf).call(this,a),Kc(nf,this,sf).call(this,t),Hc(Qc,this).setGraphUpdated(),Hc(Jc,this).updateHtmlOverlay()}}},{key:"removeRelationshipsWithIds",value:function(t){Array.isArray(t)&&!(0,e.isEmpty)(t)&&(Kc(nf,this,uf).call(this,t),Hc(Qc,this).setGraphUpdated(),Hc(Jc,this).updateHtmlOverlay())}},{key:"getNodes",value:function(){return Hc(Jc,this).dumpNodes()}},{key:"getRelationships",value:function(){return Hc(Jc,this).dumpRelationships()}},{key:"getNodeById",value:function(e){return Hc(Qc,this).nodes.idToItem[e]}},{key:"getRelationshipById",value:function(e){return Hc(Qc,this).rels.idToItem[e]}},{key:"getPositionById",value:function(e){return Hc(Qc,this).nodes.idToPosition[e]}},{key:"getCurrentOptions",value:function(){return Hc(ef,this)}},{key:"destroy",value:function(){Hc(Jc,this).destroy()}},{key:"deselectAll",value:function(){this.updateElementsInGraph(Hc(Qc,this).nodes.items.map((function(e){return Gc(Gc({},e),{},{selected:!1})})),Hc(Qc,this).rels.items.map((function(e){return Gc(Gc({},e),{},{selected:!1})})))}},{key:"fit",value:function(e,t){Hc(Jc,this).fit(e,t)}},{key:"resetZoom",value:function(){Hc(Jc,this).resetZoom()}},{key:"setUseWebGLRenderer",value:function(e){Hc(Jc,this).setRenderer(e?$i:Qi)}},{key:"setRenderer",value:function(e){Hc(Jc,this).setRenderer(e)}},{key:"setDisableWebGL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Hc(ef,this).disableWebGL!==e&&(Hc(ef,this).disableWebGL=e,this.restart())}},{key:"pinNode",value:function(e){Hc(Qc,this).nodes.update([{id:e,pinned:!0}],{})}},{key:"unPinNode",value:function(e){Hc(Qc,this).nodes.update(e.map((function(e){return{id:e,pinned:!1}})),{})}},{key:"setLayout",value:function(e){Hc(Qc,this).setLayout(e)}},{key:"setLayoutOptions",value:function(e){Hc(Qc,this).setLayoutOptions(e)}},{key:"getNodesOnScreen",value:function(){return Hc(Jc,this).getNodesOnScreen()}},{key:"getNodePositions",value:function(){return Hc(Jc,this).getNodePositions()}},{key:"setNodePositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Hc(Jc,this).setNodePositions(e,t)}},{key:"isLayoutMoving",value:function(){return Hc(Jc,this).isLayoutMoving()}},{key:"saveToFile",value:function(e){Hc(Jc,this).saveToFile(e)}},{key:"saveFullGraphToLargeFile",value:function(e){Hc(Jc,this).saveFullGraphToLargeFile(e)}},{key:"setZoom",value:function(e){Hc(Jc,this).setZoomLevel(e)}},{key:"setPan",value:function(e,t){Hc(Jc,this).setPanCoordinates(e,t)}},{key:"setZoomAndPan",value:function(e,t,n){Hc(Jc,this).setZoomAndPan(e,t,n)}},{key:"getScale",value:function(){return Hc(Jc,this).getScale()}},{key:"getPan",value:function(){return Hc(Jc,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=Hc(Qc,this),o=r.zoom,i=r.panX,a=r.panY,s=r.webGLVisible,u=Zu(e,Hc(ef,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,El(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=Sl(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:dr)*yr(),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=Sl(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=us({x:l.x,y:l.y},{x:c.x,y:c.y},{x:e,y:t});if(f<=Cl){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,Hc(Qc,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,El(n.getCanvasNodesAt({x:e,y:t},o.hitNodeMarginWidth))),r.includes("relationship")&&a.push.apply(a,El(n.getCanvasRelsAt({x:e,y:t}))),{nodes:i,relationships:a}}(l,c,Hc(Jc,this),t,n);return Gc(Gc({},e),{},{nvlTargets:f})}},{key:"getContainer",value:function(){return Hc(ef,this).frame}},{key:"checkWebGLCompatibility",value:function(){var e=Hc(ef,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 To("Could not initialize WebGL");Hc(ef,this).renderer=Qi,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&&(Hc(ef,this).disableWebGL=!t)}}}],r&&function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Xc(Qc,this,function(t){var n=t.minZoom,r=t.maxZoom,o=t.allowDynamicMinZoom,i=void 0===o||o,a=t.layout,s=t.layoutOptions,u=t.nodeDefaultBorderColor,l=t.selectedBorderColor,c=t.panX,f=void 0===c?0:c,h=t.panY,d=void 0===h?0:h,p=t.initialZoom,v=t.renderer,y=void 0===v?!0===t.useWebGL?$i:Qi:v,g=t.disableWebGL,m=void 0!==g&&g,b=t.disableTelemetry,_=void 0!==b&&b;Y(!0),yn.isolateGlobalState();var w=void 0!==n?n:.075,x=void 0!==r?r:10,O=Fi({},Vi.default);void 0!==u&&("string"==typeof u&&null!==vi().get.rgb(u)?O.rings=[{color:u,widthFactor:.05}]:Dr.warn("Invalid color string for nodeDefaultBorderColor:",u));var E=Fi({},Vi.selected),S=Fi({},Gi.selected);void 0!==l&&("string"==typeof u&&null!==vi().get.rgb(l)?(E.rings[1].color=l,S.rings[1].color=l):Dr.warn("Invalid color string for selectedBorderColor:",l));var T=Le({zoom:p||Wi,minimapZoom:Wi,defaultZoomLevel:Wi,panX:f,panY:d,minimapPanX:0,minimapPanY:0,fitNodeIds:[],resetZoom:!1,zoomOptions:Ji,forceWebGL:!1,renderer:y,disableWebGL:m,disableTelemetry:_,fitMovement:0,layout:a,layoutOptions:s,maxDistance:0,maxNodeRadius:50,nodeBorderStyles:{default:O,selected:E},relationshipBorderStyles:{default:Gi.default,selected:S},get minZoom(){return w},get maxZoom(){return x},get minMinimapZoom(){return 0},get maxMinimapZoom(){return.2},get webGLVisible(){var e=this.fitMovement>50;return this.renderer===$i||e},nodes:Ni(),rels:Ni(),graphUpdates:0,waypoints:{data:Le.shallow({}),counter:0},setGraphUpdated:ee((function(){this.graphUpdates+=1})),setRenderer:ee((function(e){ee((function(){this.graphUpdates+=1})),this.renderer=e})),setWaypoints:ee((function(e){this.waypoints.data=e,this.waypoints.counter+=1})),setZoomPan:ee((function(e,t,n,r){if(i){var o=Object.values(this.nodes.idToPosition),a=Oi(o,w,x,r,e,this.zoom);a!==this.zoom&&(this.zoom=a,e===a&&(this.panX=t,this.panY=n))}else{var s=xi(e,this.zoom,w,x);s!==this.zoom&&(this.zoom=s,this.panX=t,this.panY=n)}this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1})),setZoom:ee((function(e,t){if(i){var n=Object.values(this.nodes.idToPosition);this.zoom=Oi(n,w,x,t,e,this.zoom)}else this.zoom=xi(e,this.zoom,w,x);this.fitNodeIds=[],this.fitMovement=0,this.resetZoom=!1,this.forceWebGL=!1})),setPan:ee((function(e,t){this.panX=e,this.panY=t,this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1})),setLayout:ee((function(e){this.layout=e})),setLayoutOptions:ee((function(e){this.layoutOptions=e})),fitNodes:ee((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.fitNodeIds=(0,e.intersection)(t,(0,e.map)(this.nodes.items,"id")),this.zoomOptions=Fi(Fi({},Ji),n)})),setZoomReset:ee((function(){this.resetZoom=!0})),clearFit:ee((function(){this.fitNodeIds=[],this.forceWebGL=!1,this.fitMovement=0,this.zoomOptions=Ji})),clearReset:ee((function(){this.resetZoom=!1,this.fitMovement=0})),updateZoomToFit:ee((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=Oi(a,w,x,r,e,this.zoom)}else o=xi(e,this.zoom,w,x);this.zoom=o,this.panX=t,this.panY=n})),updateMinimapZoomToFit:ee((function(e,t,n){this.minimapZoom=e,this.minimapPanX=t,this.minimapPanY=n})),autorun:fe,reaction:he});return T}(i)),i.minimapContainer instanceof HTMLElement||delete i.minimapContainer,Xc(Jc,this,new Jl(Hc(Qc,this),i)),this.addAndUpdateElementsInGraph(r,o),Hc(Jc,this).on("restart",this.restart.bind(this));var a,s,u=Bc((a=Hc(Zc,this).callbacks,Object.entries(a)));try{for(u.s();!(s=u.n()).done;){var l=Fc(s.value,2),c=l[0];void 0!==l[1]&&Hc(Jc,this).on(c,Hc(Zc,this)[c].bind(Hc(Zc,this)))}}catch(e){u.e(e)}finally{u.f()}var f=null===(t=Hc(ef,this).frame)||void 0===t?void 0:t.getAttribute("id");!0!==Hc(ef,this).disableTelemetry&&setTimeout((function(){Hc(Jc,n).isDestroyed()||Hc(tf,n).trackEvent({eventPrefix:gr.includes(f)?f:null,event:"instantiated",properties:{}})}),200)}function af(e){var t,n=e.logging;void 0!==(null==n?void 0:n.level)&&(t=n.level,Dr.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=Hc(Qc,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 sh extends ah{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)}}a(1582);var uh=a(2543);class lh extends ah{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,uh.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 ch extends ah{constructor(e,t={}){super(e,t),this.addEventListener("wheel",this.handleWheel)}throttledZoom=(0,uh.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 fh{nvl;zoomInteraction;panInteraction;dragNodeInteraction;constructor(e,t=[],n=[],r={},o={}){this.nvl=new ih(e,t,n,{...r,disableTelemetry:!0},o),this.zoomInteraction=new ch(this.nvl),this.panInteraction=new lh(this.nvl),this.dragNodeInteraction=new sh(this.nvl)}}})(),NVLBase=s})(); \ No newline at end of file +var NVLBase;(()=>{var e,t,n,r,o={8353:(e,t,n)=>{e.exports={graphlib:n(8362),layout:n(4267),debug:n(8294),util:{time:n(6718).time,notime:n(6718).notime},version:n(3353)}},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)}}))}}},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{"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))}}},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(", ")+"]"}},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}}},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)}},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),y=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 y({multigraph:!0,compound:!0}),n=T(e.graph());return t.setGraph(r.merge({},m,S(n,g),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({},O,S(o,x),r.pick(o,E)))})),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 g=["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"],O={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["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}},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)}))}}},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(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}}))}},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}}))}},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}},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{"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 y=i(e,s);y{"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}},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})))}},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 y=a(v,u);if(f&&(y.vs=r.flatten([f,y.vs,h],!0),t.predecessors(f).length)){var g=t.node(t.predecessors(f)[0]),m=t.node(t.predecessors(h)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+g.order+m.order)/(y.weight+2),y.weight+=2}return y}},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}},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{"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{"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}))}},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){"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},1581:(e,t,n)=>{"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);)g(n,e,t,y(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 y(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 g(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=y,c.exchangeEdges=g},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}}},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()}}},3353:e=>{e.exports="0.8.14"},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})},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}()},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{"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)}))}},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{"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})},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{"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{"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()}},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)},9839:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof window}function o(){return!r()}n.d(t,{B:()=>r,S:()=>o})},5770:(e,t,n)=>{"use strict";function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}n.d(t,{p:()=>r})},4568:(e,t,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)},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})},8167:(e,t,n)=>{"use strict";n.d(t,{r:()=>r});var r="1.76.0"},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{"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}},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}},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})},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))}),{})}},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)]}))}))}},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")}},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)},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}},1298:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var r="npm";function o(){return r}},5939:(e,t,n)=>{"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{"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}},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"}},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)},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")||{}}},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")},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{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/.+\@.+\..+/;t.default=function(e){return n.test(e)}},8822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Salesforce:!0};t.default=function(e){return!n[e]}},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)}},2542: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.Screen=void 0;var o=r(n(6698)),i=n(5525),a=n(3863);function s(e,t){i.Page.call(this,e,t)}t.Screen=s,o.default(s,i.Page),s.prototype.action=function(){return"screen"},s.prototype.type=s.prototype.action,s.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},s.prototype.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)}},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)}},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}},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)}},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}},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},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 y=u.pop(),m=y.node,b=g(m,t,n),_=g(m,r,i);if(y.dist=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function h(e,t,n){for(var r,o,i,a,s=Math.min(e[0],t[0]),u=Math.min(e[1],t[1]),l=Math.max(e[0],t[0]),c=Math.max(e[1],t[1]),f=n.search({minX:s,minY:u,maxX:l,maxY:c}),h=0;h0!=d(r,o,a)>0&&d(i,a,r)>0!=d(i,a,o)>0)return!1;return!0}function d(e,t,n){return a(e[0],e[1],t[0],t[1],n[0],n[1])}function p(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 v(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 g(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 m(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,y=e-o,g=t-i,m=h*h+d*d,b=h*p+d*v,_=p*p+v*v,w=h*y+d*g,x=p*y+v*g,O=m*_-b*b,E=O,S=O;0===O?(l=0,E=1,f=x,S=_):(f=m*x-b*w,(l=b*x-_*w)<0?(l=0,f=x,S=_):l>E&&(l=E,f=x+b,S=_)),f<0?(f=0,-w<0?l=0:-w>m?l=E:(l=-w,E=m)):f>S&&(f=S,-w+b<0?l=0:-w+b>m?l=E:(l=-w+b,E=m));var T=(1-(c=0===f?0:f/S))*o+c*a-((1-(u=0===l?0:l/E))*e+u*n),P=(1-c)*i+c*s-((1-u)*t+u*r);return T*T+P*P}function b(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},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=y.calculateBounds(e),i=new g;i.setDeviceOrgX(o.getMinX()),i.setDeviceOrgY(o.getMinY()),i.setWorldOrgX(n.x),i.setWorldOrgY(n.y);for(var a=0;a1;){var g=y[0];y.splice(0,1);var b=c.indexOf(g);b>=0&&c.splice(b,1),p--,f--}h=null!=t?(c.indexOf(y[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 O=(n+d*_)%360,E=(O+_)%360;m.branchRadialLayout(x,e,O,E,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;v0&&(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))},8362:(e,t,n)=>{var r=n(1166);e.exports={Graph:r.Graph,json:n(7494),alg:n(1667),version:r.version}},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}},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}},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)}),{})}},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)},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])}))}},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={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)}},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}},1045:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"post")}},6016:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"pre")}},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}},6291:(e,t,n)=>{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}},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},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{"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))}},1166:(e,t,n)=>{e.exports={Graph:n(6454),version:n(4458)}},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}}},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},4458:e=>{e.exports="2.1.8"},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}}},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 y=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=y.x-a,this.right=y.x+y.width+a,this.top=y.y-a,this.bottom=y.y+y.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]=g,n[3]=a,!1;if(ri?(n[0]=c,n[1]=f,O=!0):(n[0]=l,n[1]=u,O=!0):S===P&&(r>i?(n[0]=s,n[1]=u,O=!0):(n[0]=h,n[1]=f,O=!0)),-T===P?i>r?(n[2]=m,n[3]=b,E=!0):(n[2]=g,n[3]=y,E=!0):T===P&&(i>r?(n[2]=v,n[3]=y,E=!0):(n[2]=_,n[3]=b,E=!0)),O&&E)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)),!O)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(!E)switch(A){case 1:M=y,j=i+-x/P,n[2]=j,n[3]=M;break;case 2:j=_,M=a+w*P,n[2]=j,n[3]=M;break;case 3:M=b,j=i+x/P,n[2]=j,n[3]=M;break;case 4:j=m,M=a+-w*P,n[2]=j,n[3]=M}}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,y=n.x,g=n.y,m=o.x,b=o.y;return 0==(f=(i=v-d)*(u=y-m)-(a=b-g)*(s=h-p))?null:new r((s*(c=m*g-y*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{var r=n(6110)(n(9325),"DataView");e.exports=r},1549:(e,t,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{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(6110)(n(9325),"Map");e.exports=r},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(6110)(n(9325),"Promise");e.exports=r},6545:(e,t,n)=>{var r=n(6110)(n(9325),"Set");e.exports=r},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(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},1873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},7828:(e,t,n)=>{var r=n(9325).Uint8Array;e.exports=r},8303:(e,t,n)=>{var r=n(6110)(n(9325),"WeakMap");e.exports=r},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)}},3729:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n{var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},9905:e=>{e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r{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 y in e)!t&&!l.call(e,y)||d&&("length"==y||f&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,v))||p.push(y);return p}},4932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n{e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(7237)("length");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)}},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}},4733:(e,t,n)=>{var r=n(1791),o=n(5950);e.exports=function(e,t){return e&&r(t,o(t),e)}},3838:(e,t,n)=>{var r=n(1791),o=n(7241);e.exports=function(e,t){return e&&r(t,o(t),e)}},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}},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),y=n(7199),g=n(5529),m=n(6449),b=n(3656),_=n(7730),w=n(3805),x=n(8440),O=n(5950),E=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,j){var M,R=1&n,N=2&n,D=4&n;if(A&&(M=I?A(t,k,I,j):A(t)),void 0!==M)return M;if(!w(t))return t;var L=m(t);if(L){if(M=v(t),!R)return l(t,M)}else{var F=p(t),B=F==T||"[object GeneratorFunction]"==F;if(b(t))return u(t,R);if(F==P||F==S||B&&!I){if(M=N||B?{}:g(t),!R)return N?f(t,s(M,t)):c(t,a(M,t))}else{if(!C[F])return I?t:{};M=y(t,F,R)}}j||(j=new r);var U=j.get(t);if(U)return U;j.set(t,M),x(t)?t.forEach((function(r){M.add(e(r,n,A,r,t,j))})):_(t)&&t.forEach((function(r,o){M.set(o,e(r,n,A,o,t,j))}));var z=L?void 0:(D?N?d:h:N?E:O)(t);return o(z||t,(function(r,o){z&&(r=t[o=r]),i(M,o,e(r,n,A,o,t,j))})),M}},9344:(e,t,n)=>{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},909:(e,t,n)=>{var r=n(641),o=n(8329)(r);e.exports=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}},2523:e=>{e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i{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}},6649:(e,t,n)=>{var r=n(3221)();e.exports=r},641:(e,t,n)=>{var r=n(6649),o=n(5950);e.exports=function(e,t){return e&&r(e,t,o)}},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 r=n(4528),o=n(6449);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},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)}},426:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},6131:(e,t,n)=>{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)}},7534:(e,t,n)=>{var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},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))}},7068:(e,t,n)=>{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,y,g){var m=u(e),b=u(t),_=m?h:s(e),w=b?h:s(t),x=(_=_==f?d:_)==d,O=(w=w==f?d:w)==d,E=_==w;if(E&&l(e)){if(!l(t))return!1;m=!0,x=!1}if(E&&!x)return g||(g=new r),m||c(e)?o(e,t,n,v,y,g):i(e,t,_,n,v,y,g);if(!(1&n)){var S=x&&p.call(e,"__wrapped__"),T=O&&p.call(t,"__wrapped__");if(S||T){var P=S?e.value():e,C=T?t.value():t;return g||(g=new r),y(P,C,n,v,g)}}return!!E&&(g||(g=new r),a(e,t,n,v,y,g))}},9172:(e,t,n)=>{var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},1799:(e,t,n)=>{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{e.exports=function(e){return e!=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))}},6038:(e,t,n)=>{var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Set]"==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)]}},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)}},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}},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}},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}},3663:(e,t,n)=>{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)}}},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)}}},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,n)=>{var r=n(7422);e.exports=function(e){return function(t){return r(t,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}},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+"")}},9570:(e,t,n)=>{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},8096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++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}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},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{var r=n(4932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},9219:e=>{e.exports=function(e,t){return e.has(t)}},4066:(e,t,n)=>{var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},1769:(e,t,n)=>{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))}},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}},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}},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)}},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}},3736:(e,t,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)):{}}},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)}},3007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++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(1791),o=n(4664);e.exports=function(e,t){return r(e,o(e),t)}},8948:(e,t,n)=>{var r=n(1791),o=n(6375);e.exports=function(e,t){return r(e,o(e),t)}},5481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];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=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}}},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},3243:(e,t,n)=>{var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},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,y=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p{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 y=a(d(e),d(t),r,l,f,h);return h.delete(e),y;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},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 y=u;++f{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},2:(e,t,n)=>{var r=n(2199),o=n(4664),i=n(5950);e.exports=function(e){return r(e,i,o)}},3349:(e,t,n)=>{var r=n(2199),o=n(6375),i=n(7241);e.exports=function(e){return r(e,i,o)}},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}},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}},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}},8879:(e,t,n)=>{var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},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}},4664:(e,t,n)=>{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},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},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),y=l(o),g=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 y:return c;case g:return f;case m:return h;case b:return d}return t}),e.exports=_},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},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 t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},2032:(e,t,n)=>{var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,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}},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)}},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}},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}},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)}}},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))}},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])}},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{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)}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===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}},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},756:(e,t,n)=>{var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},80:(e,t,n)=>{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))}},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]}},8655:(e,t,n)=>{var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},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}},3040:(e,t,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}}},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}},289:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},4509:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},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}},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},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}},1042:(e,t,n)=>{var r=n(6110)(Object,"create");e.exports=r},3650:(e,t,n)=>{var r=n(4335)(Object.keys,Object);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}},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},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},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{var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},2865:(e,t,n)=>{var r=n(9570),o=n(1811)(r);e.exports=o},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)}}},1420:(e,t,n)=>{var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},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}},6959:e=>{e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r{var r=n(9811),o=n(9698),i=n(7927);e.exports=function(e){return o(e)?i(e):r(e)}},1802:(e,t,n)=>{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},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}},7473:e=>{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""}},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}},2629:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,4)}},7334:e=>{e.exports=function(e){return function(){return e}}},6135:(e,t,n)=>{e.exports=n(9754)},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},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))}},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))}},8156:(e,t,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}},1448:(e,t,n)=>{var r=n(426),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},631:(e,t,n)=>{var r=n(8077),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},3488:e=>{e.exports=function(e){return e}},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},6449:e=>{var t=Array.isArray;e.exports=t},4894:(e,t,n)=>{var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},3693:(e,t,n)=>{var r=n(4894),o=n(346);e.exports=function(e){return o(e)&&r(e)}},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},2193:(e,t,n)=>{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}},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}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},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},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},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},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)}},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)}},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},2216:e=>{e.exports=function(e){return void 0===e}},5950:(e,t,n)=>{var r=n(695),o=n(8984),i=n(4894);e.exports=function(e){return i(e)?r(e):o(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)}},2543: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]",y="[object Array]",g="[object Boolean]",m="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",x="[object Map]",O="[object Number]",E="[object Object]",S="[object Promise]",T="[object RegExp]",P="[object Set]",C="[object String]",A="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",j="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,H=RegExp(Y.source),X=RegExp(q.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\]$/,ye=/^0o[0-7]+$/i,ge=/^(?: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",Oe="\\u2700-\\u27bf",Ee="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+",je="["+Oe+"]",Me="["+Ee+"]",Re="[^"+we+Pe+Ie+Oe+Ee+Se+"]",Ne="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Se+"]",Ue="\\u200d",ze="(?:"+Me+"|"+Re+")",Ve="(?:"+Be+"|"+Re+")",Ge="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+ke+"|"+Ne+")?",qe="["+Te+"]?",He=qe+Ye+"(?:"+Ue+"(?:"+[De,Le,Fe].join("|")+")"+qe+Ye+")*",Xe="(?:"+[je,Le,Fe].join("|")+")"+He,Ke="(?:"+[De+ke+"?",ke,Le,Fe,Ce].join("|")+")",Ze=RegExp("['’]","g"),$e=RegExp(ke,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ke+He,"g"),Je=RegExp([Be+"?"+Me+"+"+Ge+"(?="+[Ae,Be,"$"].join("|")+")",Ve+"+"+We+"(?="+[Ae,Be+ze,"$"].join("|")+")",Be+"?"+ze+"+"+Ge,Be+"+"+We,"\\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[M]=ot[R]=ot[N]=ot[D]=ot[L]=ot[F]=ot[B]=ot[U]=ot[z]=!0,ot[v]=ot[y]=ot[I]=ot[g]=ot[j]=ot[m]=ot[b]=ot[_]=ot[x]=ot[O]=ot[E]=ot[T]=ot[P]=ot[C]=ot[k]=!1;var it={};it[v]=it[y]=it[I]=it[j]=it[g]=it[m]=it[M]=it[R]=it[N]=it[D]=it[L]=it[x]=it[O]=it[E]=it[T]=it[P]=it[C]=it[A]=it[F]=it[B]=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,yt=function(){try{return dt&&dt.require&&dt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),gt=yt&&yt.isArrayBuffer,mt=yt&&yt.isDate,bt=yt&&yt.isMap,_t=yt&&yt.isRegExp,wt=yt&&yt.isSet,xt=yt&&yt.isTypedArray;function Ot(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 Et(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--&&Bt(t,e[n],0)>-1;);return n}var en=Wt({À:"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=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});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,Oe=t.Math,Ee=t.Object,Se=t.RegExp,Te=t.String,Pe=t.TypeError,Ce=r.prototype,Ae=xe.prototype,ke=Ee.prototype,Ie=t["__core-js_shared__"],je=Ae.toString,Me=ke.hasOwnProperty,Re=0,Ne=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=ke.toString,Le=je.call(Ee),Fe=ft._,Be=Se("^"+je.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=pt?t.Buffer:o,ze=t.Symbol,Ve=t.Uint8Array,Ge=Ue?Ue.allocUnsafe:o,We=an(Ee.getPrototypeOf,Ee),Ye=Ee.create,qe=ke.propertyIsEnumerable,He=Ce.splice,Xe=ze?ze.isConcatSpreadable:o,Ke=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=li(Ee,"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=Oe.ceil,dt=Oe.floor,vt=Ee.getOwnPropertySymbols,yt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Wt=Ce.join,vn=an(Ee.keys,Ee),yn=Oe.max,gn=Oe.min,mn=oe.now,bn=t.parseInt,_n=Oe.random,wn=Ce.reverse,xn=li(t,"DataView"),On=li(t,"Map"),En=li(t,"Promise"),Sn=li(t,"Set"),Tn=li(t,"WeakMap"),Pn=li(Ee,"create"),Cn=Tn&&new Tn,An={},kn=Li(xn),In=Li(On),jn=Li(En),Mn=Li(Sn),Rn=Li(Tn),Nn=ze?ze.prototype:o,Dn=Nn?Nn.valueOf:o,Ln=Nn?Nn.toString:o;function Fn(e){if(es(e)&&!Ga(e)&&!(e instanceof Vn)){if(e instanceof zn)return e;if(Me.call(e,"__wrapped__"))return Fi(e)}return new zn(e)}var Bn=function(){function e(){}return function(t){if(!Ja(t))return{};if(Ye)return Ye(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 Gn(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=Ga(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.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(Ha(e))return wo(e,u);if(h==E||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 g:case m:return new o(+e);case j:return function(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case R:case N:case D:case L:case F:case B:case U:case z:return Oo(e,n);case x:return new o;case O: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?Ee(Dn.call(r)):{}}}(e,h,u)}}a||(a=new Hn);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 y=f?o:(c?l?ni:ti:l?Is:ks)(e);return St(y||e,(function(r,o){y&&(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=Ee(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 qn(t));e:for(;++o-1},Wn.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},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(On||Wn),string:new Gn}},Yn.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return si(this,e).get(e)},Yn.prototype.has=function(e){return si(this,e).has(e)},Yn.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},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,a),this},qn.prototype.has=function(e){return this.__data__.has(e)},Hn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Hn.prototype.get=function(e){return this.__data__.get(e)},Hn.prototype.has=function(e){return this.__data__.has(e)},Hn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yn(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):jt(o,s):r||(o[o.length]=s)}return o}var yr=jo(),gr=jo(!0);function mr(e,t){return e&&yr(e,t,ks)}function br(e,t){return e&&gr(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=go(t,e)).length;null!=e&&nt}function Sr(e,t){return null!=e&&Me.call(e,t)}function Tr(e,t){return null!=e&&t in Ee(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=gn(h.length,c),l[u]=!n&&(t||a>=120&&h.length>=120)?new qn(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&&He.call(s,u,1),He.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;yi(o)?He.call(e,o,1):uo(e,o)}}return e}function Yr(e,t){return e+dt(_n()*(t-e+1))}function qr(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 Hr(e,t){return Ai(Ei(e,t,nu),e+"")}function Xr(e){return Kn(Bs(e))}function Kr(e,t){var n=Bs(e);return ji(n,ir(t,0,n.length))}function Zr(e,t,n,r){if(!Ja(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&&!ss(a)&&(n?a<=t:a=200){var l=t?null:Ho(e);if(l)return un(l);a=!1,o=$t,u=new qn}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=Ge?Ge(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 Oo(e,t){var n=t?xo(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=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&&gi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Ee(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 qn: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 ji(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=Fn(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&&yi(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){Me.call(e,n)?++e[n]:rr(e,n,1)})),va=Do(Vi),ya=Do(Gi);function ga(e,t){return(Ga(e)?St:cr)(e,ai(t,3))}function ma(e,t){return(Ga(e)?Tt:fr)(e,ai(t,3))}var ba=Ao((function(e,t,n){Me.call(e,n)?e[n].push(t):rr(e,n,[t])})),_a=Hr((function(e,t,n){var o=-1,i="function"==typeof t,a=Ya(e)?r(e.length):[];return cr(e,(function(e){a[++o]=i?Ot(t,e,n):Cr(e,t,n)})),a})),wa=Ao((function(e,t,n){rr(e,n,t)}));function xa(e,t){return(Ga(e)?It:Dr)(e,ai(t,3))}var Oa=Ao((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ea=Hr((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]]),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=Hr((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=Hr((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 y(e){var n=e-c;return c===o||n>=t||n<0||d&&e-f>=s}function g(){var e=Sa();if(y(e))return m(e);l=Ci(g,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=Sa(),n=y(e);if(r=arguments,a=this,c=e,n){if(l===o)return function(e){return f=e,l=Ci(g,t),h?v(e):u}(c);if(d)return _o(l),l=Ci(g,t),v(c)}return l===o&&(l=Ci(g,t)),u}return t=vs(t)||0,Ja(n)&&(h=!!n.leading,s=(d="maxWait"in n)?yn(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=Hr((function(e,t){return ur(e,1,t)})),ja=Hr((function(e,t,n){return ur(e,vs(t)||0,n)}));function Ma(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(Ma.Cache||Yn),n}function Ra(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)}}Ma.Cache=Yn;var Na=mo((function(e,t){var n=(t=1==t.length&&Ga(t[0])?It(t[0],Kt(ai())):It(vr(t,1),Kt(ai()))).length;return Hr((function(r){for(var o=-1,i=gn(r.length,n);++o=t})),Va=Ar(function(){return arguments}())?Ar:function(e){return es(e)&&Me.call(e,"callee")&&!qe.call(e,"callee")},Ga=r.isArray,Wa=gt?Kt(gt):function(e){return es(e)&&Or(e)==I};function Ya(e){return null!=e&&Qa(e.length)&&!Za(e)}function qa(e){return es(e)&&Ya(e)}var Ha=yt||vu,Xa=mt?Kt(mt):function(e){return es(e)&&Or(e)==m};function Ka(e){if(!es(e))return!1;var t=Or(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=Or(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)&&Or(e)==O}function rs(e){if(!es(e)||Or(e)!=E)return!1;var t=We(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.call(n)==Le}var os=_t?Kt(_t):function(e){return es(e)&&Or(e)==T},is=wt?Kt(wt):function(e){return es(e)&&hi(e)==P};function as(e){return"string"==typeof e||!Ga(e)&&es(e)&&Or(e)==C}function ss(e){return"symbol"==typeof e||es(e)&&Or(e)==A}var us=xt?Kt(xt):function(e){return es(e)&&Qa(e.length)&&!!ot[Or(e)]},ls=Wo(Nr),cs=Wo((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Ya(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:Bs)(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||ye.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function ys(e){return Co(e,Is(e))}function gs(e){return null==e?"":ao(e)}var ms=ko((function(e,t){if(wi(t)||Ya(t))Co(t,ks(t),e);else for(var n in t)Me.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),Os=Hr((function(e,t){e=Ee(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})),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),Fs=Xo(Is);function Bs(e){return null==e?[]:Zt(e,ks(e))}var Us=Ro((function(e,t,n){return t=t.toLowerCase(),e+(n?zs(t):t)}));function zs(e){return Ks(gs(e).toLowerCase())}function Vs(e){return(e=gs(e))&&e.replace(me,en).replace($e,"")}var Gs=Ro((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ws=Ro((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ys=Mo("toLowerCase"),qs=Ro((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Hs=Ro((function(e,t,n){return e+(n?" ":"")+Ks(t)})),Xs=Ro((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ks=Mo("toUpperCase");function Zs(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 $s=Hr((function(e,t){try{return Ot(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 Mr("function"==typeof e?e:ar(e,1))}var ou=Hr((function(e,t){return function(n){return Cr(n,e,t)}})),iu=Hr((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,jt([this.value()],arguments))})})),e}function su(){}var uu=zo(It),lu=zo(Pt),cu=zo(Nt);function fu(e){return mi(e)?Gt(Di(e)):function(e){return function(t){return wr(t,e)}}(e)}var hu=Go(),du=Go(!0);function pu(){return[]}function vu(){return!1}var yu,gu=Uo((function(e,t){return e+t}),0),mu=qo("ceil"),bu=Uo((function(e,t){return e/t}),1),_u=qo("floor"),wu=Uo((function(e,t){return e*t}),1),xu=qo("round"),Ou=Uo((function(e,t){return e-t}),0);return Fn.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)}},Fn.ary=Ta,Fn.assign=ms,Fn.assignIn=bs,Fn.assignInWith=_s,Fn.assignWith=ws,Fn.at=xs,Fn.before=Pa,Fn.bind=Ca,Fn.bindAll=Qs,Fn.bindKey=Aa,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ga(e)?e:[e]},Fn.chain=fa,Fn.chunk=function(e,t,n){t=(n?gi(e,t,n):t===o)?1:yn(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=gs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&rn(e)?bo(fn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Pe(i);return t=null==t?0:yn(ds(t),0),Hr((function(n){var r=n[t],o=bo(n,0,t);return r&&jt(o,r),Ot(e,this,o)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:ds(t))<0?0:t):[]},Fn.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):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?co(e,ai(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?co(e,ai(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.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})},Fn.thru=ha,Fn.toArray=fs,Fn.toPairs=Ls,Fn.toPairsIn=Fs,Fn.toPath=function(e){return Ga(e)?It(e,Di):ss(e)?[e]:Po(Ni(gs(e)))},Fn.toPlainObject=ys,Fn.transform=function(e,t,n){var r=Ga(e),o=r||Ha(e)||us(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ja(e)&&Za(i)?Bn(We(e)):{}}return(o?St:mr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Fn.unary=function(e){return Ta(e,1)},Fn.union=ea,Fn.unionBy=ta,Fn.unionWith=na,Fn.uniq=function(e){return e&&e.length?so(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?so(e,ai(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},Fn.unset=function(e,t){return null==e||uo(e,t)},Fn.unzip=ra,Fn.unzipWith=oa,Fn.update=function(e,t,n){return null==e?e:lo(e,t,yo(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:lo(e,t,yo(n),r)},Fn.values=Bs,Fn.valuesIn=function(e){return null==e?[]:Zt(e,Is(e))},Fn.without=ia,Fn.words=Zs,Fn.wrap=function(e,t){return Da(yo(t),e)},Fn.xor=aa,Fn.xorBy=sa,Fn.xorWith=ua,Fn.zip=la,Fn.zipObject=function(e,t){return po(e||[],t||[],Jn)},Fn.zipObjectDeep=function(e,t){return po(e||[],t||[],Zr)},Fn.zipWith=ca,Fn.entries=Ls,Fn.entriesIn=Fs,Fn.extend=bs,Fn.extendWith=_s,au(Fn,Fn),Fn.add=gu,Fn.attempt=$s,Fn.camelCase=Us,Fn.capitalize=zs,Fn.ceil=mu,Fn.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)},Fn.clone=function(e){return ar(e,4)},Fn.cloneDeep=function(e){return ar(e,5)},Fn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},Fn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},Fn.conformsTo=function(e,t){return null==t||sr(e,t,ks(t))},Fn.deburr=Vs,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=bu,Fn.endsWith=function(e,t,n){e=gs(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},Fn.eq=Ba,Fn.escape=function(e){return(e=gs(e))&&X.test(e)?e.replace(q,tn):e},Fn.escapeRegExp=function(e){return(e=gs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Fn.every=function(e,t,n){var r=Ga(e)?Pt:hr;return n&&gi(e,t,n)&&(t=o),r(e,ai(t,3))},Fn.find=va,Fn.findIndex=Vi,Fn.findKey=function(e,t){return Lt(e,ai(t,3),mr)},Fn.findLast=ya,Fn.findLastIndex=Gi,Fn.findLastKey=function(e,t){return Lt(e,ai(t,3),br)},Fn.floor=_u,Fn.forEach=ga,Fn.forEachRight=ma,Fn.forIn=function(e,t){return null==e?e:yr(e,ai(t,3),Is)},Fn.forInRight=function(e,t){return null==e?e:gr(e,ai(t,3),Is)},Fn.forOwn=function(e,t){return e&&mr(e,ai(t,3))},Fn.forOwnRight=function(e,t){return e&&br(e,ai(t,3))},Fn.get=Ss,Fn.gt=Ua,Fn.gte=za,Fn.has=function(e,t){return null!=e&&di(e,t,Sr)},Fn.hasIn=Ts,Fn.head=Yi,Fn.identity=nu,Fn.includes=function(e,t,n,r){e=Ya(e)?e:Bs(e),n=n&&!r?ds(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),as(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Bt(e,t,n)>-1},Fn.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=yn(r+o,0)),Bt(e,t,o)},Fn.inRange=function(e,t,n){return t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n){return e>=gn(t,n)&&e=-9007199254740991&&e<=f},Fn.isSet=is,Fn.isString=as,Fn.isSymbol=ss,Fn.isTypedArray=us,Fn.isUndefined=function(e){return e===o},Fn.isWeakMap=function(e){return es(e)&&hi(e)==k},Fn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Or(e)},Fn.join=function(e,t){return null==e?"":Wt.call(e,t)},Fn.kebabCase=Gs,Fn.last=Ki,Fn.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?yn(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):Ft(e,zt,i,!0)},Fn.lowerCase=Ws,Fn.lowerFirst=Ys,Fn.lt=ls,Fn.lte=cs,Fn.max=function(e){return e&&e.length?dr(e,nu,Er):o},Fn.maxBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Er):o},Fn.mean=function(e){return Vt(e,nu)},Fn.meanBy=function(e,t){return Vt(e,ai(t,2))},Fn.min=function(e){return e&&e.length?dr(e,nu,Nr):o},Fn.minBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Nr):o},Fn.stubArray=pu,Fn.stubFalse=vu,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=wu,Fn.nth=function(e,t){return e&&e.length?Ur(e,ds(t)):o},Fn.noConflict=function(){return ft._===this&&(ft._=Fe),this},Fn.noop=su,Fn.now=Sa,Fn.pad=function(e,t,n){e=gs(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)},Fn.padEnd=function(e,t,n){e=gs(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 gn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Yr(e,t)},Fn.reduce=function(e,t,n){var r=Ga(e)?Mt:Yt,o=arguments.length<3;return r(e,ai(t,4),n,o,cr)},Fn.reduceRight=function(e,t,n){var r=Ga(e)?Rt:Yt,o=arguments.length<3;return r(e,ai(t,4),n,o,fr)},Fn.repeat=function(e,t,n){return t=(n?gi(e,t,n):t===o)?1:ds(t),qr(gs(e),t)},Fn.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.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=ai(t),e-=d;for(var o=Ht(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,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(ao(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Fn.unescape=function(e){return(e=gs(e))&&H.test(e)?e.replace(Y,dn):e},Fn.uniqueId=function(e){var t=++Re;return gs(e)+t},Fn.upperCase=Xs,Fn.upperFirst=Ks,Fn.each=ga,Fn.eachRight=ma,Fn.first=Yi,au(Fn,(yu={},mr(Fn,(function(e,t){Me.call(Fn.prototype,t)||(yu[t]=e)})),yu),{chain:!1}),Fn.VERSION="4.17.21",St(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),St(["drop","take"],(function(e,t){Vn.prototype[e]=function(n){n=n===o?1:yn(ds(n),0);var r=this.__filtered__&&!t?new Vn(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},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=Hr((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(Ra(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=Fn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Fn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Vn,l=s[0],c=u||Ga(t),f=function(e){var t=i.apply(Fn,jt([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 y=e.apply(t,s);return y.__actions__.push({func:ha,args:[f],thisArg:o}),new zn(y,h)}return p&&v?e.apply(this,s):(y=this.thru(f),p?r?y.value()[0]:y.value():y)})})),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);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ga(o)?o:[],e)}return this[n]((function(n){return t.apply(Ga(n)?n:[],e)}))}})),mr(Vn.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";Me.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}})),An[Fo(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=Ga(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__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof Un;){var r=Fi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Fn.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)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Ke&&(Fn.prototype[Ke]=function(){return this}),Fn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},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))}},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},3950:e=>{e.exports=function(){}},583:(e,t,n)=>{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)}},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)}},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}},3345:e=>{e.exports=function(){return[]}},9935:e=>{e.exports=function(){return!1}},3222:(e,t,n)=>{var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},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}},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},5880:(e,t,n)=>{var r=n(514),o=n(5950);e.exports=function(e){return null==e?[]:r(e,o(e))}},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}},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)}},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)}},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}},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}},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},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}},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),y=a(e,p,n,this.toBBox),g=(o=v,i=y,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(y);g=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}()},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 y=Math.abs(d+p);return Math.abs(v)>=33306690738754716e-32*y?v:-function(e,r,l,c,f,h,d){let p,v,y,g,m,b,_,w,x,O,E,S,T,P,C,A,k,I;const j=e-f,M=l-f,R=r-h,N=c-h;m=(C=(w=j-(_=(b=t*j)-(b-j)))*(O=N-(x=(b=t*N)-(b-N)))-((P=j*N)-_*x-w*x-_*O))-(E=C-(k=(w=R-(_=(b=t*R)-(b-R)))*(O=M-(x=(b=t*M)-(b-M)))-((A=R*M)-_*x-w*x-_*O))),o[0]=C-(E+m)+(m-k),m=(T=P-((S=P+E)-(m=S-P))+(E-m))-(E=T-A),o[1]=T-(E+m)+(m-A),m=(I=S+E)-S,o[2]=S-(I-m)+(E-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-(j+(m=e-j))+(m-f),y=l-(M+(m=l-M))+(m-f),v=r-(R+(m=r-R))+(m-h),g=c-(N+(m=c-N))+(m-h),0===p&&0===v&&0===y&&0===g)return D;if(L=11093356479670487e-47*d+33306690738754706e-32*Math.abs(D),(D+=j*g+N*p-(R*y+M*v))>=L||-D>=L)return D;m=(C=(w=p-(_=(b=t*p)-(b-p)))*(O=N-(x=(b=t*N)-(b-N)))-((P=p*N)-_*x-w*x-_*O))-(E=C-(k=(w=v-(_=(b=t*v)-(b-v)))*(O=M-(x=(b=t*M)-(b-M)))-((A=v*M)-_*x-w*x-_*O))),u[0]=C-(E+m)+(m-k),m=(T=P-((S=P+E)-(m=S-P))+(E-m))-(E=T-A),u[1]=T-(E+m)+(m-A),m=(I=S+E)-S,u[2]=S-(I-m)+(E-m),u[3]=I;const F=n(4,o,4,u,i);m=(C=(w=j-(_=(b=t*j)-(b-j)))*(O=g-(x=(b=t*g)-(b-g)))-((P=j*g)-_*x-w*x-_*O))-(E=C-(k=(w=R-(_=(b=t*R)-(b-R)))*(O=y-(x=(b=t*y)-(b-y)))-((A=R*y)-_*x-w*x-_*O))),u[0]=C-(E+m)+(m-k),m=(T=P-((S=P+E)-(m=S-P))+(E-m))-(E=T-A),u[1]=T-(E+m)+(m-A),m=(I=S+E)-S,u[2]=S-(I-m)+(E-m),u[3]=I;const B=n(F,i,4,u,a);m=(C=(w=p-(_=(b=t*p)-(b-p)))*(O=g-(x=(b=t*g)-(b-g)))-((P=p*g)-_*x-w*x-_*O))-(E=C-(k=(w=v-(_=(b=t*v)-(b-v)))*(O=y-(x=(b=t*y)-(b-y)))-((A=v*y)-_*x-w*x-_*O))),u[0]=C-(E+m)+(m-k),m=(T=P-((S=P+E)-(m=S-P))+(E-m))-(E=T-A),u[1]=T-(E+m)+(m-A),m=(I=S+E)-S,u[2]=S-(I-m)+(E-m),u[3]=I;const U=n(B,a,4,u,s);return s[U-1]}(e,r,l,c,f,h,y)},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)},4262:(e,t,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}},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}},3172:(e,t,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})},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]{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&&!~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=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:()=>hh});var e={};function t(e){return t="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},t(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new 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}}}}a.r(e),a.d(e,{coseBilkentLayoutFallbackWorker:()=>Ul,createCoseBilkentLayoutWorker:()=>zl,createHierarchicalLayoutWorker:()=>ac,hierarchicalLayoutFallbackWorker:()=>ic});var h="undefined"==typeof window?null:window,d=h?h.navigator:null;h&&h.document;var p=t(""),v=t({}),y=t((function(){})),g="undefined"==typeof HTMLElement?"undefined":t(HTMLElement),m=function(e){return e&&e.instanceString&&_(e.instanceString)?e.instanceString():null},b=function(e){return null!=e&&t(e)==p},_=function(e){return null!=e&&t(e)===y},w=function(e){return!S(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},x=function(e){return null!=e&&t(e)===v&&!w(e)&&e.constructor===Object},O=function(e){return null!=e&&t(e)===t(1)&&!isNaN(e)},E=function(e){return"undefined"===g?void 0:null!=e&&e instanceof HTMLElement},S=function(e){return T(e)||P(e)},T=function(e){return"collection"===m(e)&&e._private.single},P=function(e){return"collection"===m(e)&&!e._private.single},C=function(e){return"core"===m(e)},A=function(e){return"stylesheet"===m(e)},k=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},I=function(e){return function(e){return null!=e&&t(e)===v}(e)&&_(e.then)},j=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},G=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n=t||n<0||f&&e-l>=i}function v(){var e=Q();if(p(e))return y(e);s=setTimeout(v,function(e){var n=t-(e-u);return f?ge(n,i-(e-l)):n}(e))}function y(e){return s=void 0,h&&r?d(e):(r=o=void 0,a)}function g(){var e=Q(),n=p(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(v,t),c?d(e):a}(u);if(f)return clearTimeout(s),s=setTimeout(v,t),d(u)}return void 0===s&&(s=setTimeout(v,t)),a}return t=ve(t)||0,H(n)&&(c=!!n.leading,i=(f="maxWait"in n)?ye(ve(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h),g.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=o=s=void 0},g.flush=function(){return void 0===s?a:y(Q())},g},be=h?h.performance:null,_e=be&&be.now?function(){return be.now()}:function(){return Date.now()},we=function(){if(h){if(h.requestAnimationFrame)return function(e){h.requestAnimationFrame(e)};if(h.mozRequestAnimationFrame)return function(e){h.mozRequestAnimationFrame(e)};if(h.webkitRequestAnimationFrame)return function(e){h.webkitRequestAnimationFrame(e)};if(h.msRequestAnimationFrame)return function(e){h.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(_e())}),1e3/60)}}(),xe=function(e){return we(e)},Oe=_e,Ee=9261,Se=5381,Te=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee;!(t=e.next()).done;)n=65599*n+t.value|0;return n},Pe=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee)+e|0},Ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se;return(t<<5)+t+e|0},Ae=function(e){return 2097152*e[0]+e[1]},ke=function(e,t){return[Pe(e[0],t[0]),Ce(e[1],t[1])]},Ie=function(e,t){var n={value:0,done:!1},r=0,o=e.length;return Te({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},$e=function(e){e.splice(0,e.length)},Qe=function(e,t,n){return n&&(t=N(n,t)),e[t]},Je=function(e,t,n,r){n&&(t=N(n,t)),e[t]=r},et="undefined"!=typeof Map?Map:function(){function e(){n(this,e),this._obj={}}return o(e,[{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]}}]),e}(),tt=function(){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&&C(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 nt,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=[];w(t.classes)?u=t.classes:b(t.classes)&&(u=t.classes.split(/\s+/));for(var l=0,c=u.length;lt?1:0},l=function(e,t,o,i,a){var s;if(null==o&&(o=0),null==a&&(a=n),o<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);on;0<=n?t++:t--)l.push(t);return l}.apply(this).reverse()).length;iv;0<=v?++h:--h)y.push(i(e,r));return y},p=function(e,t,r,o){var i,a,s;for(null==o&&(o=n),i=e[r];r>t&&o(i,a=e[s=r-1>>1])<0;)e[r]=a,r=s;return e[r]=i},v=function(e,t,r){var o,i,a,s,u;for(null==r&&(r=n),i=e.length,u=t,a=e[t],o=2*t+1;o0;){var O=g.pop(),E=v(O),S=O.id();if(f[S]=E,E!==1/0)for(var T=O.neighborhood().intersect(d),P=0;P0)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)}}}},ht={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(l=(u=v.pop()).id(),y.delete(l),w++,l===f){for(var x=[],O=o,E=f,S=m[E];x.unshift(O),null!=S&&x.unshift(S),null!=(O=g[E]);)S=m[E=O.id()];return{found:!0,distance:h[l],path:this.spawn(x),steps:w}}p[l]=!0;for(var T=u._private.edges,P=0;PP&&(d[T]=P,g[T]=S,m[T]=w),!o){var C=S*l+E;!o&&d[C]>P&&(d[C]=P,g[C]=E,m[C]=w)}}}for(var A=0;A1&&void 0!==arguments[1]?arguments[1]:i,r=[],o=m(e);;){if(null==o)return t.spawn();var a=g(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}}},bt=Math.sqrt(2),_t=function(e,t,n){0===n.length&&Ve("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=_t(o,e,t),n--}return t},xt={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/bt);if(!(o<2)){for(var u=[],l=0;l0?1:e<0?-1:0},At=function(e,t){return Math.sqrt(kt(e,t))},kt=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},It=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}}},Dt=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},Lt=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},Ft=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},Bt=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},Ut=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},zt=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},Vt=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},Gt=function(e,t){return Vt(e,t.x1,t.y1)&&Vt(e,t.x2,t.y2)},Wt=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?ln(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=nn(e,t,n,r,n-f+c-a,v,n+f-c+a,v,!1)).length>0)return s}if(p){var y=n+f+a;if((s=nn(e,t,n,r,y,r-h+c-a,y,r+h-c+a,!1)).length>0)return s}if(d){var g=r+h+a;if((s=nn(e,t,n,r,n-f+c-a,g,n+f-c+a,g,!1)).length>0)return s}if(p){var m=n-f-a;if((s=nn(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=en(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=en(e,t,n,r,w,x,c+a)).length>0&&u[0]>=w&&u[1]<=x)return[u[0],u[1]];var O=n+f-c,E=r+h-c;if((u=en(e,t,n,r,O,E,c+a)).length>0&&u[0]>=O&&u[1]>=E)return[u[0],u[1]];var S=n-f+c,T=r+h-c;return(u=en(e,t,n,r,S,T,c+a)).length>0&&u[0]<=S&&u[1]>=T?[u[0],u[1]]:[]},Yt=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},qt=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)},Ht=function(e,t,n,r,o,i,a,s){var u,l,c,f,h,d,p,v,y,g,m,b,_,w=[];l=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,c=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,f=1*n*o-n*n+n*e-o*e+r*i-r*r+r*t-i*t,0===(u=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)&&(u=1e-5),v=-27*(f/=u)+(l/=u)*(9*(c/=u)-l*l*2),d=(p=(3*c-l*l)/9)*p*p+(v/=54)*v,(h=w)[1]=0,b=l/3,d>0?(g=(g=v+Math.sqrt(d))<0?-Math.pow(-g,1/3):Math.pow(g,1/3),m=(m=v-Math.sqrt(d))<0?-Math.pow(-m,1/3):Math.pow(m,1/3),h[0]=-b+g+m,b+=(g+m)/2,h[4]=h[2]=-b,b=Math.sqrt(3)*(-m+g)/2,h[3]=b,h[5]=-b):(h[5]=h[3]=0,0===d?(_=v<0?-Math.pow(-v,1/3):Math.pow(v,1/3),h[0]=2*_-b,h[4]=h[2]=-(_+b)):(y=(p=-p)*p*p,y=Math.acos(v/Math.sqrt(y)),_=2*Math.sqrt(p),h[0]=-b+_*Math.cos(y/3),h[2]=-b+_*Math.cos((y+2*Math.PI)/3),h[4]=-b+_*Math.cos((y+4*Math.PI)/3)));for(var x=[],O=0;O<6;O+=2)Math.abs(w[O+1])<1e-7&&w[O]>=0&&w[O]<=1&&x.push(w[O]);x.push(1),x.push(0);for(var E,S,T,P=-1,C=0;C=0?Tu?(e-o)*(e-o)+(t-i)*(t-i):l-f},Kt=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},Zt=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=Qt(c,-u);f=$t(v)}else f=c;return Kt(e,t,f)},$t=function(e){for(var t,n,r,o,i,a,s,u,l=new Array(e.length/2),c=0;c=0&&p<=1&&y.push(p),v>=0&&v<=1&&y.push(v),0===y.length)return[];var g=y[0]*s[0]+e,m=y[0]*s[1]+t;return y.length>1?y[0]==y[1]?[g,m]:[g,m,y[1]*s[0]+e,y[1]*s[1]+t]:[g,m]},tn=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},nn=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,y=c*h-d*l,g=p*c-f*d;if(0!==g){var m=v/g,b=y/g,_=-.001;return _<=m&&m<=1.001&&_<=b&&b<=1.001||u?[e+m*c,t+m*d]:[]}return 0===v||0===y?tn(e,n,a)===a?[a,s]:tn(e,n,o)===o?[o,i]:tn(o,a,n)===n?[n,r]:[]:[]},rn=function(e,t,n,r,o,i,a,s){var u,l,c,f,h,d,p=[],v=new Array(n.length),y=!0;if(null==i&&(y=!1),y){for(var g=0;g0){var m=Qt(v,-s);l=$t(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(),h[b]>h[y]+w&&(h[b]=h[y]+w,d.nodes.indexOf(b)<0?d.push(b):d.updateItem(b),l[b]=0,u[b]=[]),h[b]==h[y]+w&&(l[b]=l[b]+l[y],u[b].push(y))}else for(var x=0;x0;){for(var T=n.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]:kn,a=r,s=0;s=2?Dn(e,t,n,0,Mn,Rn):Dn(e,t,n,0,jn)},squaredEuclidean:function(e,t,n){return Dn(e,t,n,0,Mn)},manhattan:function(e,t,n){return Dn(e,t,n,0,jn)},max:function(e,t,n){return Dn(e,t,n,-1/0,Nn)}};function Fn(e,t,n,r,o,i){var a;return a=_(e)?e:Ln[e]||Ln.euclidean,0===t&&_(e)?a(o,i):a(t,n,r,o,i)}Ln["squared-euclidean"]=Ln.squaredEuclidean,Ln.squaredeuclidean=Ln.squaredEuclidean;var Bn=Ke({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Un=function(e){return Bn(e)},zn=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 Fn(e,r.length,i,(function(e){return r[e](t)}),a,s)},Vn=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},qn=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 y=0;yn[v.key][g.key]&&(i=n[v.key][g.key])):"max"===o.linkage?(i=n[p.key][g.key],n[p.key][g.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=P?(C=P,P=k,A=I):k>C&&(C=k);for(var j=0;j0?1:0;E[x%l.minIterations*t+F]=B,L+=B}if(L>0&&(x>=l.minIterations-1||x==l.maxIterations-1)){for(var U=0,z=0;z0&&r.push(o);return r}(t,i,a),W=function(e,t,n){for(var r=lr(e,t,n),o=0;ou&&(s=l,u=c)}n[o]=i[s]}return lr(e,t,n)}(t,r,G),Y={},q=0;q1)}}));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}},pr=function(){var e=this,t={},n=0,r=[],o=[],i=e.spawn(e),a=function a(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}},vr={};[it,ft,ht,pt,yt,mt,xt,dn,vn,gn,bn,An,Qn,ar,fr,{hierholzer:function(e){if(!x(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,o,i=hr(e),a=i.root,s=i.directed,u=this,l=!1;a&&(o=b(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 y in p.unshift(u.getElementById(v.shift())),c)if(c[y].length)return h;return h.found=!0,h.trail=this.spawn(p,!0),h}},{hopcroftTarjanBiconnected:dr,htbc:dr,htb:dr,hopcroftTarjanBiconnectedComponents:dr},{tarjanStronglyConnected:pr,tsc:pr,tscc:pr,tarjanStronglyConnectedComponents:pr}].forEach((function(e){G(vr,e)}));var yr=function e(t){if(!(this instanceof e))return new e(t);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 t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};yr.prototype={fulfill:function(e){return gr(this,1,"fulfillValue",e)},reject:function(e){return gr(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new yr;return n.onFulfilled.push(_r(e,r,"fulfill")),n.onRejected.push(_r(t,r,"reject")),mr(n),r.proxy}};var gr=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,mr(e)),e},mr=function(e){1===e.state?br(e,"onFulfilled",e.fulfillValue):2===e.state&&br(e,"onRejected",e.rejectReason)},br=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},Kr.prototype.set=function(e,t){var n=this.__data__,r=Hr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Zr=Kr,$r=Ur($,"Map"),Qr=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function Jr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&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){w(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}};To.className=To.classNames=To.classes;var Po={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:L,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Po.variable="(?:[\\w-.]|(?:\\\\"+Po.metaChar+"))+",Po.className="(?:[\\w-]|(?:\\\\"+Po.metaChar+"))+",Po.value=Po.string+"|"+Po.number,Po.id=Po.variable,function(){var e,t,n;for(e=Po.comparatorOp.split("|"),n=0;n=0||"="!==t&&(Po.comparatorOp+="|\\!"+t)}();var Co=20,Ao=[{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*V(e,t)}(e.selector,t.selector)})),ko=function(){for(var e,t={},n=0;n0&&l.edgeCount>0)return We("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(l.edgeCount>1)return We("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&We("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 b(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),y=r(o.right,i);return p+(p.length>0?" ":"")+v+y;case Co: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 Ko(e,t,n){if(n.isParent())for(var r=n._private.children,o=0;o1&&void 0!==arguments[1])||arguments[1],Ko)},Ho.forEachUp=function(e){return Xo(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Zo)},Ho.forEachUpAndDown=function(e){return Xo(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],$o)},Ho.ancestors=Ho.parents,(Wo=Yo={data:Eo.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:Eo.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Eo.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Eo.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Eo.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Eo.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Wo.data,Wo.removeAttr=Wo.removeData;var Qo,Jo,ei=Yo,ti={};function ni(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:ri("indegree",(function(e,t){return et})),minOutdegree:ri("outdegree",(function(e,t){return et}))}),G(ti,{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,y=v;v&&(p=p[0]);var g=y?p.position():{x:0,y:0};void 0!==t?d.position(e,t+g[e]):void 0!==o&&d.position({x:o.x+g.x,y:o.y+g.y})}}else if(!i)return;return this}}).modelPosition=Qo.point=Qo.position,Qo.modelPositions=Qo.points=Qo.positions,Qo.renderedPoint=Qo.renderedPosition,Qo.relativePoint=Qo.relativePosition;var ai,si,ui=Jo;ai=si={},si.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}},si.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},si.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=g(o.width.val-i.w,s,u),h=f.biasDiff,d=f.biasComplementDiff,p=g(o.height.val-i.h,l,c),v=p.biasDiff,y=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+y)/2}function g(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)},fi=function(e,t){return null==t?e:ci(e,t.x1,t.y1,t.x2,t.y2)},hi=function(e,t,n){return Qe(e,t,n)},di=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,Ft(l,1),ci(e,l.x1,l.y1,l.x2,l.y2)}}},pi=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=hi(i,"labelWidth",n),d=hi(i,"labelHeight",n),p=hi(i,"labelX",n),v=hi(i,"labelY",n),y=t.pstyle(r+"text-margin-x").pfValue,g=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,O=d,E=h,S=E/2,T=O/2;if(m)a=p-S,s=p+S,u=v-T,l=v+T;else{switch(c.value){case"left":a=p-E,s=p;break;case"center":a=p-S,s=p+S;break;case"right":a=p,s=p+E}switch(f.value){case"top":u=v-O,l=v;break;case"center":u=v-T,l=v+T;break;case"bottom":u=v,l=v+O}}var P=y-Math.max(_,w)-x-2,C=y+Math.max(_,w)+x+2,A=g-Math.max(_,w)-x-2,k=g+Math.max(_,w)+x+2;a+=P,s+=C,u+=A,l+=k;var I=n||"main",j=o.labelBounds,M=j[I]=j[I]||{};M.x1=a,M.y1=u,M.x2=s,M.y2=l,M.w=s-a,M.h=l-u,M.leftPad=P,M.rightPad=C,M.topPad=A,M.botPad=k;var R=m&&"autorotate"===b.strValue,N=null!=b.pfValue&&0!==b.pfValue;if(R||N){var D=R?hi(o.rstyle,"labelAngle",n):b.pfValue,L=Math.cos(D),F=Math.sin(D),B=(a+s)/2,U=(u+l)/2;if(!m){switch(c.value){case"left":B=s;break;case"right":B=a}switch(f.value){case"top":U=l;break;case"bottom":U=u}}var z=function(e,t){return{x:(e-=B)*L-(t-=U)*F+B,y:e*F+t*L+U}},V=z(a,u),G=z(a,l),W=z(s,u),Y=z(s,l);a=Math.min(V.x,G.x,W.x,Y.x),s=Math.max(V.x,G.x,W.x,Y.x),u=Math.min(V.y,G.y,W.y,Y.y),l=Math.max(V.y,G.y,W.y,Y.y)}var q=I+"Rot",H=j[q]=j[q]||{};H.x1=a,H.y1=u,H.x2=s,H.y2=l,H.w=s-a,H.h=l-u,ci(e,a,u,s,l),ci(o.labelBounds.all,a,u,s,l)}return e}},vi=function(e){var t=0,n=function(e){return(e?1:0)<0&&i>0){var a=t.pstyle("outline-offset").value,s=t.pstyle("shape").value,u=i+a,l=(e.w+2*u)/e.w,c=(e.h+2*u)/e.h,f=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+2.4*u)/e.w,f=-u/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+2.4*u)/e.w:"star"===s?(l=(e.w+2.8*u)/e.w,c=(e.h+2.6*u)/e.h,f=-u/3.8):"triangle"===s?(l=(e.w+2.8*u)/e.w,c=(e.h+2.4*u)/e.h,f=-u/1.4):"vee"===s&&(l=(e.w+4.4*u)/e.w,c=(e.h+3.8*u)/e.h,f=.5*-u);var h=e.h*c-e.h,d=e.w*l-e.w;if(Bt(e,[Math.ceil(h/2),Math.ceil(d/2)]),0!==f){var p=(r=f,{x1:(n=e).x1+0,x2:n.x2+0,y1:n.y1+r,y2:n.y2+r,w:n.w,h:n.h});Dt(e,p)}}}}(h,e)}else if(v&&t.includeEdges)if(c&&!f){var P=e.pstyle("curve-style").strValue;if(n=Math.min(y.srcX,y.midX,y.tgtX),r=Math.max(y.srcX,y.midX,y.tgtX),o=Math.min(y.srcY,y.midY,y.tgtY),i=Math.max(y.srcY,y.midY,y.tgtY),ci(h,n-=O,o-=O,r+=O,i+=O),"haystack"===P){var C=y.haystackPts;if(C&&2===C.length){if(n=C[0].x,o=C[0].y,n>(r=C[1].x)){var A=n;n=r,r=A}if(o>(i=C[1].y)){var k=o;o=i,i=k}ci(h,n-O,o-O,r+O,i+O)}}else if("bezier"===P||"unbundled-bezier"===P||P.endsWith("segments")||P.endsWith("taxi")){var I;switch(P){case"bezier":case"unbundled-bezier":I=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":I=y.linePts}if(null!=I)for(var j=0;j(r=N.x)){var D=n;n=r,r=D}if((o=R.y)>(i=N.y)){var L=o;o=i,i=L}ci(h,n-=O,o-=O,r+=O,i+=O)}if(c&&t.includeEdges&&v&&(di(h,e,"mid-source"),di(h,e,"mid-target"),di(h,e,"source"),di(h,e,"target")),c&&"yes"===e.pstyle("ghost").value){var F=e.pstyle("ghost-offset-x").pfValue,B=e.pstyle("ghost-offset-y").pfValue;ci(h,h.x1+F,h.y1+B,h.x2+F,h.y2+B)}var U=d.bodyBounds=d.bodyBounds||{};Ut(U,h),Bt(U,g),Ft(U,1),c&&(n=h.x1,r=h.x2,o=h.y1,i=h.y2,ci(h,n-x,o-x,r+x,i+x));var z=d.overlayBounds=d.overlayBounds||{};Ut(z,h),Bt(z,g),Ft(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=Nt(),c&&t.includeLabels&&(t.includeMainLabels&&pi(h,e,null),v&&(t.includeSourceLabels&&pi(h,e,"source"),t.includeTargetLabels&&pi(h,e,"target")))}return h.x1=li(h.x1),h.y1=li(h.y1),h.x2=li(h.x2),h.y2=li(h.y2),h.w=li(h.x2-h.x1),h.h=li(h.y2-h.y1),h.w>0&&h.h>0&&b&&(Bt(h,g),Ft(h,1)),h}(e,mi),r.bbCache=n,r.bbCachePosKey=a):n=r.bbCache,!i){var c=e.isNode();n=Nt(),(t.includeNodes&&c||t.includeEdges&&!c)&&(t.includeOverlays?fi(n,r.overlayBounds):fi(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!o||t.includeSourceLabels&&t.includeTargetLabels)?fi(n,r.labelBounds.all):(t.includeMainLabels&&fi(n,r.labelBounds.mainRot),t.includeSourceLabels&&fi(n,r.labelBounds.sourceRot),t.includeTargetLabels&&fi(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},mi={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},bi=vi(mi),_i=Ke(mi);si.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=Nt();var n=_i(e=e||mi),r=this;if(r.cy().styleEnabled())for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:Ni,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)a(s);return this},Li.removeAllListeners=function(){return this.removeListener("*")},Li.emit=Li.trigger=function(e,t,n){var r=this.listeners,o=r.length;return this.emitting++,w(t)||(t=[t]),function(e,t,n){if("event"!==m(n))if(x(n))t(e,Bi(e,n));else for(var r=w(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&&b(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){this.cleanStyle();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(x(e)){var i=e;o.applyBypass(this,i,r),this.emitAndNotify("style")}else if(b(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)}}),ca.neighbourhood=ca.neighborhood,ca.closedNeighbourhood=ca.closedNeighborhood,ca.openNeighbourhood=ca.openNeighborhood,G(ca,{source:qo((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:qo((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:pa({attr:"source"}),targets:pa({attr:"target"})}),G(ca,{edgesWith:qo(va(),"edgesWith"),edgesTo:qo(va({thisIsSrc:!0}),"edgesTo")}),G(ca,{connectedEdges:qo((function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),ca.componentsOf=ca.components;var ga=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 et,i=!1;if(t){if(t.length>0&&x(t[0])&&!T(t[0])){i=!0;for(var a=[],s=new nt,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 L=e.length===o.length?o:new ga(i,e),F=0;F0&&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?O.emitAndNotify("remove"):t&&O.emit("remove"));for(var E=0;E=.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 wa=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}}(),xa=function(e,t,n,r){var o=_a(e,t,n,r);return function(e,t,n){return e+(t-e)*o(n)}},Oa={linear:function(e,t,n){return e+(t-e)*n},ease:xa(.25,.1,.25,1),"ease-in":xa(.42,0,1,1),"ease-out":xa(0,0,.58,1),"ease-in-out":xa(.42,0,.58,1),"ease-in-sine":xa(.47,0,.745,.715),"ease-out-sine":xa(.39,.575,.565,1),"ease-in-out-sine":xa(.445,.05,.55,.95),"ease-in-quad":xa(.55,.085,.68,.53),"ease-out-quad":xa(.25,.46,.45,.94),"ease-in-out-quad":xa(.455,.03,.515,.955),"ease-in-cubic":xa(.55,.055,.675,.19),"ease-out-cubic":xa(.215,.61,.355,1),"ease-in-out-cubic":xa(.645,.045,.355,1),"ease-in-quart":xa(.895,.03,.685,.22),"ease-out-quart":xa(.165,.84,.44,1),"ease-in-out-quart":xa(.77,0,.175,1),"ease-in-quint":xa(.755,.05,.855,.06),"ease-out-quint":xa(.23,1,.32,1),"ease-in-out-quint":xa(.86,0,.07,1),"ease-in-expo":xa(.95,.05,.795,.035),"ease-out-expo":xa(.19,1,.22,1),"ease-in-out-expo":xa(1,0,0,1),"ease-in-circ":xa(.6,.04,.98,.335),"ease-out-circ":xa(.075,.82,.165,1),"ease-in-out-circ":xa(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Oa.linear;var r=wa(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":xa};function Ea(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 Sa(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Ta(e,t,n,r,o){var i=null!=o?o.type:null;n<0?n=0:n>1&&(n=1);var a=Sa(e,o),s=Sa(t,o);if(O(a)&&O(s))return Ea(i,a,s,n,r);if(w(a)&&w(s)){for(var u=[],l=0;l0?("spring"===f&&h.push(a.duration),a.easingImpl=Oa[f].apply(null,h)):a.easingImpl=Oa[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,y=a.position;if(y&&o&&!e.locked()){var g={};Ca(v.x,y.x)&&(g.x=Ta(v.x,y.x,d,p)),Ca(v.y,y.y)&&(g.y=Ta(v.y,y.y,d,p)),e.position(g)}var m=a.startPan,_=a.pan,w=i.pan,x=null!=_&&r;x&&(Ca(m.x,_.x)&&(w.x=Ta(m.x,_.x,d,p)),Ca(m.y,_.y)&&(w.y=Ta(m.y,_.y,d,p)),e.emit("pan"));var O=a.startZoom,E=a.zoom,S=null!=E&&r;S&&(Ca(O,E)&&(i.zoom=Rt(i.minZoom,Ta(O,E,d,p),i.maxZoom)),e.emit("zoom")),(x||S)&&e.emit("viewport");var T=a.style;if(T&&T.length>0&&o){for(var P=0;P=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||Aa(0,f,e),Pa(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 Ia={animate:Eo.animate(),animation:Eo.animation(),animated:Eo.animated(),clearQueue:Eo.clearQueue(),delay:Eo.delay(),delayAnimation:Eo.delayAnimation(),stop:Eo.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){ka(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&xe((function(n){ka(n,e),t()}))}()}}},ja={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&&T(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}},Ma=function(e){return b(e)?new zo(e):e},Ra={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Di(ja,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Ma(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Ma(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Ma(t),n),this},once:function(e,t,n){return this.emitter().one(e,Ma(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}};Eo.eventAliasesOn(Ra);var Na={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)}};Na.jpeg=Na.jpg;var Da={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=b(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new o(G({},e,{cy:t,eles:n}));Ve("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else Ve("A `name` must be specified to make a layout");else Ve("Layout options must be specified to make a layout")}};Da.createLayout=Da.makeLayout=Da.layout;var La={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)}};Ba.invalidateDimensions=Ba.resize;var Ua={collection:function(e,t){return b(e)?this.$(e):S(e)?e.collection():w(e)?(t||(t={}),new ga(this,e,t.unique,t.removed)):new ga(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}};Ua.elements=Ua.filter=Ua.$;var za={},Va="t";za.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&&(y=1),s.color){var w=o.valueMin[0],x=o.valueMax[0],E=o.valueMin[1],S=o.valueMax[1],T=o.valueMin[2],P=o.valueMax[2],C=null==o.valueMin[3]?1:o.valueMin[3],A=null==o.valueMax[3]?1:o.valueMax[3],k=[Math.round(w+(x-w)*y),Math.round(E+(S-E)*y),Math.round(T+(P-T)*y),Math.round(C+(A-C)*y)];n={bypass:o.bypass,name:o.name,value:k,strValue:"rgb("+k[0]+", "+k[1]+", "+k[2]+")"}}else{if(!s.number)return!1;var I=o.valueMin+(o.valueMax-o.valueMin)*y;n=this.parse(o.name,I,o.bypass,h)}if(!n)return v(),!1;n.mapping=o,o=n;break;case a.data:for(var j=o.field.split("."),M=f.data,R=0;R0&&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)},za.checkTrigger=function(e,t,n,r,o,i){var a=this.properties[t],s=o(a);null!=s&&s(n,r)&&i(a)},za.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)}))},za.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(o){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!o.triggersBoundsOfParallelBeziers||"curve-style"!==t||"bezier"!==n&&"bezier"!==r||e.parallelEdges().forEach((function(e){e.dirtyBoundingBoxCache()})),!o.triggersBoundsOfConnectedEdges||"display"!==t||"none"!==n&&"none"!==r||e.connectedEdges().forEach((function(e){e.dirtyBoundingBoxCache()}))}))},za.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Ga={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){We("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 zo(l).invalid)We("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){We("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()):(We("Skipping property: Invalid property definition in: "+r),s()):(We("Skipping property: Invalid property name in: "+r),s())}if(f){a();break}o.selector(l);for(var y=0;y=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 We("`"+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 y=p.value,g=v.value;if(!(y[0]!==g[0]||y[1]!==g[1]||y[2]!==g[2]||y[3]!==g[3]&&(null!=y[3]&&1!==y[3]||null!=g[3]&&1!==g[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+/):w(t)?t:[t],f.evenMultiple&&m.length%2!=0)return null;for(var x=[],E=[],S=[],T="",P=!1,C=0;C0?" ":"")+A.strValue}return f.validate&&!f.validate(x,E)?null:f.singleEnum&&P?1===x.length&&b(x[0])?{name:e,value:x[0],strValue:x[0],bypass:n}:null:{name:e,value:x,pfValue:S,strValue:T,bypass:n,units:E}}var k,I,j,R=function(){for(var r=0;rf.max||f.strictMax&&t===f.max))return null;var V={name:e,value:t,strValue:""+t+(N||""),units:N,bypass:n};return f.unitless||"px"!==N&&"em"!==N?V.pfValue=t:V.pfValue="px"!==N&&N?this.getEmSizeInPixels()*t:t,"ms"!==N&&"s"!==N||(V.pfValue="ms"===N?t:1e3*t),"deg"!==N&&"rad"!==N||(V.pfValue="rad"===N?t:(k=t,Math.PI*k/180)),"%"===N&&(V.pfValue=t/100),V}if(f.propList){var G=[],Y=""+t;if("none"===Y);else{for(var q=Y.split(/\s*,\s*|\s+/),H=0;H255)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}(j)||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("^"+U+"$").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}(j);return K?{name:e,value:K,pfValue:K,strValue:"rgb("+K[0]+","+K[1]+","+K[2]+")",bypass:n}:null}if(f.regex||f.regexes){if(f.enums){var Z=R();if(Z)return Z}for(var $=f.regexes?f.regexes:[f.regex],Q=0;Q<$.length;Q++){var J=new RegExp($[Q]).exec(t);if(J)return{name:e,value:f.singleRegexMatchValue?J[1]:J,strValue:""+t,bypass:n}}return null}return f.string?{name:e,value:""+t,strValue:""+t,bypass:n}:f.enums?R():null};var Za=function e(t){if(!(this instanceof e))return new e(t);C(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):Ve("A style must have a core reference")},$a=Za.prototype;$a.instanceString=function(){return"style"},$a.clear=function(){for(var e=this._private,t=e.cy.elements(),n=0;n0&&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),O(e)?n=e:x(e)&&(n=e.level,null!=e.position?t=Ot(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;O(u.x)&&(t.pan.x=u.x,a=!1),O(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(b(e)){var n=e;e=this.mutableElements().filter(n)}else S(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}};Ja.centre=Ja.center,Ja.autolockNodes=Ja.autolock,Ja.autoungrabifyNodes=Ja.autoungrabify;var es={data:Eo.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Eo.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Eo.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Eo.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};es.attr=es.data,es.removeAttr=es.removeData;var ts=function(e){var t=this,n=(e=G({},e)).container;n&&!E(n)&&E(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!==h&&void 0!==n&&!e.headless,a=e;a.layout=G({name:i?"grid":"null"},a.layout),a.renderer=G({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 ga(this),listeners:[],aniEles:new ga(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:O(a.zoom)?a.zoom:1,pan:{x:x(a.pan)&&O(a.pan.x)?a.pan.x:0,y:x(a.pan)&&O(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=G({},a,a.renderer);t.initRenderer(l),function(e,t){if(e.some(I))return xr.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&&(x(e)||w(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=G({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,(function(){t.startAnimationLoop(),u.ready=!0,_(a.ready)&&t.on("ready",a.ready);for(var e=0;e0,l=Nt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(S(n.roots))e=n.roots;else if(w(n.roots)){for(var c=[],f=0;f0;){var j=A.shift(),M=C(j,k);if(M)j.outgoers().filter((function(e){return e.isNode()&&o.has(e)})).forEach(I);else if(null===M){We("Detected double maximal shift for node `"+j.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}P();var R=0;if(n.avoidOverlap)for(var N=0;N0&&g[0].length<=3?u/2:0),f=2*Math.PI/g[r].length*o;return 0===r&&1===g[0].length&&(c=1),{x:X+c*Math.cos(f),y:K+c*Math.sin(f)}}return{x:X+(o+1-(i+1)/2)*a,y:(r+1)*s}})),this};var us={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 ls(e){this.options=G({},us,e)}ls.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=Nt(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 y=Math.cos(c)-Math.cos(0),g=Math.sin(c)-Math.sin(0),m=Math.sqrt(f*f/(y*y+g*g));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 cs,fs={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 hs(e){this.options=G({},fs,e)}hs.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=Nt(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)>=y&&(m=[],g.push(m)),m.push(_)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var x=g.length>0&&g[0].length>1,O=(Math.min(a.w,a.h)/2-w)/(g.length+x?1:0);w=Math.min(w,O)}for(var E=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));E=Math.max(I,E)}T.r=E,E+=w}if(t.equidistant){for(var j=0,M=0,R=0;R=e.numIter||(ws(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&i(),xe(t)):(Ms(r,e),s())}();else{for(;l;)l=a(u),u++;Ms(r,e),s()}return this},ps.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},ps.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var vs=function(e,t,n){for(var r=n.eles.edges(),o=n.eles.nodes(),i=Nt(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(x),l=0;lr.count?0:r.graph},gs=function e(t,n,r,o){var i=o.graphSet[r];if(-10)var s=(l=r.nodeOverlap*a)*o/(v=Math.sqrt(o*o+i*i)),u=l*i/v;else{var l,c=Ts(e,o,i),f=Ts(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)}},Ss=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},Ts=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},Ps=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}}}}},As=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},js=function e(t,n){var r=t.parentId;if(null!=r){var o=n.layoutNodes[n.idToIndex[r]],i=!1;return(null==o.maxX||t.maxX+o.padRight>o.maxX)&&(o.maxX=t.maxX+o.padRight,i=!0),(null==o.minX||t.minX-o.padLefto.maxY)&&(o.maxY=t.maxY+o.padBottom,i=!0),(null==o.minY||t.minY-o.padTopp&&(f+=d+t.componentSpacing,c=0,h=0,d=0)}}},Rs={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 Ns(e){this.options=G({},Rs,e)}Ns.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=Nt(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(g+1):c(y+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++)},M={},R=0;R(r=Xt(e,t,_[w],_[w+1],_[w+2],_[w+3])))return y(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=Ht(e,t,_[w],_[w+1],_[w+2],_[w+3],_[w+4],_[w+5])))return y(n,r),!0;m=m||o.source,b=b||o.target;var x=a.getArrowWidth(u,c),O=[{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&&(g(m),g(b))}function b(e,t,n){return Qe(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,g=s.x2+a-h,m=s.y1-a-d,_=s.y2+a-d;if(f){var w=Math.cos(f),x=Math.sin(f),O=function(e,t){return{x:(e-=l)*w-(t-=c)*x+l,y:e*x+t*w+c}},E=O(v,m),S=O(v,_),T=O(g,m),P=O(g,_),C=[E.x+h,E.y+d,T.x+h,T.y+d,P.x+h,P.y+d,S.x+h,S.y+d];if(Kt(e,t,C))return y(n),!0}else if(Vt(s,e,t))return y(n),!0}}n&&(u=u.interactive);for(var w=u.length-1;w>=0;w--){var x=u[w];x.isNode()?g(x)||_(x):m(x)||_(x)||_(x,"source")||_(x,"target")}return l},getAllInBox:function(e,t,n,r){for(var o,i,a=this.getCachedZSortedEles().interactive,s=[],u=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),f=Math.max(t,r),h=Nt({x1:e=u,y1:t=c,x2:n=l,y2:r=f}),d=0;d4&&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!==fu?pu(t,e,hu):((a=hu).x=-1*(i=du).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),pu(t,n,du),$s=hu.nx*du.ny-hu.ny*du.nx,Qs=hu.nx*du.nx-hu.ny*-du.ny,tu=Math.asin(Math.max(-1,Math.min(1,$s))),Math.abs(tu)<1e-6)return Ks=t.x,Zs=t.y,void(ru=iu=0);Js=1,eu=!1,Qs<0?tu<0?tu=Math.PI+tu:(tu=Math.PI-tu,Js=-1,eu=!0):tu>0&&(Js=-1,eu=!0),iu=void 0!==t.radius?t.radius:r,nu=tu/2,au=Math.min(hu.len/2,du.len/2),o?(ou=Math.abs(Math.cos(nu)*iu/Math.sin(nu)))>au?(ou=au,ru=Math.abs(ou*Math.sin(nu)/Math.cos(nu))):ru=iu:(ou=Math.min(au,iu),ru=Math.abs(ou*Math.sin(nu)/Math.cos(nu))),lu=t.x+du.nx*ou,cu=t.y+du.ny*ou,Ks=lu-du.ny*ru*Js,Zs=cu+du.nx*ru*Js,su=t.x+hu.nx*ou,uu=t.y+hu.ny*ou,fu=t}(e,t,n,r,o),{cx:Ks,cy:Zs,radius:ru,startX:su,startY:uu,stopX:lu,stopY:cu,startAngle:hu.ang+Math.PI/2*Js,endAngle:du.ang-Math.PI/2*Js,counterClockwise:eu})}var gu={};function mu(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},P=T(E,x),C=T(S,O),A=!1;"auto"===y?v=Math.abs(P)>Math.abs(C)?o:r:y===u||y===s?(v=r,A=!0):y!==i&&y!==a||(v=o,A=!0);var k,I=v===r,j=I?C:P,M=I?S:E,R=Ct(M),N=!1;A&&(m||_)||!(y===s&&M<0||y===u&&M>0||y===i&&M>0||y===a&&M<0)||(j=(R*=-1)*Math.abs(j),N=!0);var D=function(e){return Math.abs(e)=Math.abs(j)},L=D(k=m?(b<0?1+b:b)*j:(b<0?j:0)+b*R),F=D(Math.abs(j)-Math.abs(k));if(!L&&!F||N)if(I){var B=l.y1+k+(p?f/2*R:0),U=l.x1,z=l.x2;n.segpts=[U,B,z,B]}else{var V=l.x1+k+(p?c/2*R:0),G=l.y1,W=l.y2;n.segpts=[V,G,V,W]}else if(I){var Y=Math.abs(M)<=f/2,q=Math.abs(E)<=h/2;if(Y){var H=(l.x1+l.x2)/2,X=l.y1,K=l.y2;n.segpts=[H,X,H,K]}else if(q){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(M)<=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)}},gu.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=!O(n.startX)||!O(n.startY),y=!O(n.arrowStartX)||!O(n.arrowStartY),g=!O(n.endX)||!O(n.endY),m=!O(n.arrowEndX)||!O(n.arrowEndY),b=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,_=At({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=_h.poolIndex()){var d=f;f=h,h=d}var p=s.srcPos=f.position(),v=s.tgtPos=h.position(),y=s.srcW=f.outerWidth(),g=s.srcH=f.outerHeight(),m=s.tgtW=h.outerWidth(),b=s.tgtH=h.outerHeight(),_=s.srcShape=n.nodeShapes[t.getNodeShape(f)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(h)],x=s.srcCornerRadius="auto"===f.pstyle("corner-radius").value?"auto":f.pstyle("corner-radius").pfValue,E=s.tgtCornerRadius="auto"===h.pstyle("corner-radius").value?"auto":h.pstyle("corner-radius").pfValue,S=s.tgtRs=h._private.rscratch,T=s.srcRs=f._private.rscratch;s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var P=0;P0){var q=l,H=kt(q,St(t)),X=kt(q,St(Y)),K=H;X2&&kt(q,{x:Y[2],y:Y[3]})0){var ue=c,le=kt(ue,St(t)),ce=kt(ue,St(se)),fe=le;ce2&&kt(ue,{x:se[2],y:se[3]})=l||m){c={cp:v,segment:g};break}}if(c)break}var b=c.cp,_=c.segment,w=(l-h)/_.length,x=_.t1-_.t0,O=s?_.t0+x*w:_.t1-x*w;O=Rt(0,O,1),t=Mt(b.p0,b.p1,b.p2,O),o=function(e,t,n,r){var o=Rt(0,r-.001,1),i=Rt(0,r+.001,1),a=Mt(e,t,n,o),s=Mt(e,t,n,i);return Eu(a,s)}(b.p0,b.p1,b.p2,O);break;case"straight":case"segments":case"haystack":for(var E,S,T,P,C=0,A=r.allpts.length,k=0;k+3=l));k+=2);var I=(l-S)/E;I=Rt(0,I,1),t=function(e,t,n,r){var o=t.x-e.x,i=t.y-e.y,a=At(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=Eu(T,P)}a("labelX",n,t.x),a("labelY",n,t.y),a("labelAutoAngle",n,o)}};l("source"),l("target"),this.applyLabelDimensions(e)}},xu.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},xu.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),o=this.calculateLabelDimensions(e,r),i=e.pstyle("line-height").pfValue,a=e.pstyle("text-wrap").strValue,s=Qe(n.rscratch,"labelWrapCachedLines",t)||[],u="wrap"!==a?1:Math.max(s.length,1),l=o.height/u,c=l*i,f=o.width,h=o.height+(u-1)*(i-1)*l;Je(n.rstyle,"labelWidth",t,f),Je(n.rscratch,"labelWidth",t,f),Je(n.rstyle,"labelHeight",t,h),Je(n.rscratch,"labelHeight",t,h),Je(n.rscratch,"labelLineHeight",t,c)},xu.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",o=e.pstyle(r+"label").strValue,i=e.pstyle("text-transform").value,a=function(e,r){return r?(Je(n.rscratch,e,t,r),r):Qe(n.rscratch,e,t)};if(!o)return"";"none"==i||("uppercase"==i?o=o.toUpperCase():"lowercase"==i&&(o=o.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var u=a("labelKey");if(null!=u&&a("labelWrapKey")===u)return a("labelWrapCachedText");for(var l=o.split("\n"),c=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,d=[],p=/[\s\u200b]+|$/g,v=0;vc){var b,_="",w=0,x=f(y.matchAll(p));try{for(x.s();!(b=x.n()).done;){var O=b.value,E=O[0],S=y.substring(w,O.index);w=O.index+E.length;var T=0===_.length?S:_+S+E;this.calculateLabelDimensions(e,T).width<=c?_+=S+E:(_&&d.push(_),_=S+E)}}catch(e){x.e(e)}finally{x.f()}_.match(/^[\s\u200b]+$/)||d.push(_)}else d.push(y)}a("labelWrapCachedLines",d),o=a("labelWrapCachedText",d.join("\n")),a("labelWrapKey",u)}else if("ellipsis"===s){var P=e.pstyle("text-max-width").pfValue,C="",A=!1;if(this.calculateLabelDimensions(e,o).widthP);k++)C+=o[k],k===o.length-1&&(A=!0);return A||(C+="…"),C}return o},xu.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"}},xu.calculateLabelDimensions=function(e,t){var n=this,r=n.cy.window().document,o=Ie(t,e._private.labelDimsKey),i=n.labelDimCache||(n.labelDimCache=[]),a=i[o];if(null!=a)return a;var s=e.pstyle("font-style").strValue,u=e.pstyle("font-size").pfValue,l=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,f=this.labelCalcCanvas,h=this.labelCalcCanvasContext;if(!f){f=this.labelCalcCanvas=r.createElement("canvas"),h=this.labelCalcCanvasContext=f.getContext("2d");var d=f.style;d.position="absolute",d.left="-9999px",d.top="-9999px",d.zIndex="-1",d.visibility="hidden",d.pointerEvents="none"}h.font="".concat(s," ").concat(c," ").concat(u,"px ").concat(l);for(var p=0,v=0,y=t.split("\n"),g=0;g1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var P=o(t);y&&(e.hoverData.tapholdCancelled=!0),n=!0,r(v,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var C=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(y){var A={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};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({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=v,v&&v.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}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("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==g||(g&&r(g,["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(y){if(a.boxSelectionEnabled()&&P)b&&b.grabbed()&&(f(w),b.emit("freeon"),w.emit("free"),e.dragData.didDrag&&(b.emit("dragfreeon"),w.emit("dragfree"))),C();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var j=!e.dragData.didDrag;j&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||l(w,{inDragLayer:!0});var M={x:0,y:0};if(O(_[0])&&O(_[1])&&(M.x+=_[0],M.y+=_[1],j)){var R=e.hoverData.dragDelta;R&&O(R[0])&&O(R[1])&&(M.x+=R[0],M.y+=R[1])}e.hoverData.draggingEles=!0,w.silentShift(M).emit("position 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 y&&(e.hoverData.dragging||!a.boxSelectionEnabled()||!P&&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=St(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);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var d={originalEvent:t,type:"cxttapend",position:{x:a[0],y:a[1]}};if(c?c.emit(d):i.emit(d),!e.hoverData.cxtDragged){var p={originalEvent:t,type:"cxttap",position:{x:a[0],y:a[1]}};c?c.emit(p):i.emit(p)}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 v=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),v.length>0&&e.redrawHint("eles",!0),i.emit({type:"boxend",originalEvent:t,position:{x:a[0],y:a[1]}});"additive"===i.selectionType()||h||i.$(n).unmerge(v).unselect(),v.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("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("freeon"),l.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),l.emit("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,S,T,P,C,A,k,I,j,M,R,N,D,L=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),o=n.pan(),i=e.projectIntoViewport(t.clientX,t.clientY),a=[i[0]*r+o.x,i[1]*r+o.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var u=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(u=e.gestureStartZoom*t.scale),n.zoom({level:u,renderedPosition:{x:a[0],y:a[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",L,!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||L(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 F,B,U,z,V,G,W,Y=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},q=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",F=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]}if(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]),t.touches[1]){e.touchData.singleTouchMoved=!0,f(e.dragData.touchDragEles);var u=e.findContainerClientCoords();j=u[0],M=u[1],R=u[2],N=u[3],E=t.touches[0].clientX-j,S=t.touches[0].clientY-M,T=t.touches[1].clientX-j,P=t.touches[1].clientY-M,D=0<=E&&E<=R&&0<=T&&T<=R&&0<=S&&S<=N&&0<=P&&P<=N;var h=n.pan(),p=n.zoom();if(C=Y(E,S,T,P),A=q(E,S,T,P),I=[((k=[(E+T)/2,(S+P)/2])[0]-h.x)/p,(k[1]-h.y)/p],A<4e4&&!t.touches[2]){var v=e.findNearestElement(o[0],o[1],!0,!0),y=e.findNearestElement(o[2],o[3],!0,!0);return v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:o[0],y:o[1]}}),e.touchData.start=v):y&&y.isNode()?(y.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:o[0],y:o[1]}}),e.touchData.start=y):n.emit({originalEvent:t,type:"cxttapstart",position:{x:o[0],y:o[1]}}),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 g=e.findNearestElements(o[0],o[1],!0,!0),b=g[0];if(null!=b&&(b.activate(),e.touchData.start=b,e.touchData.starts=g,e.nodeIsGrabbable(b))){var _=e.dragData.touchDragEles=n.collection(),w=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),b.selected()?(w=n.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),l(w,{addToList:_})):c(b,{addToList:_}),s(b);var x=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};b.emit(x("grabon")),w?w.forEach((function(e){e.emit(x("grab"))})):b.emit(x("grab"))}r(b,["touchstart","tapstart","vmousedown"],t,{x:o[0],y:o[1]}),null==b&&(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 O=e.touchData.startPosition=[null,null,null,null,null,null],L=0;L=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var w=t.touches[0].clientX-j,x=t.touches[0].clientY-M,k=t.touches[1].clientX-j,R=t.touches[1].clientY-M,N=q(w,x,k,R);if(N/A>=2.25||N>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var L={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(L),e.touchData.start=null):a.emit(L)}}if(n&&e.touchData.cxt){L={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}},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 F=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&F===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=F,F&&F.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),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),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var B=0;B0&&!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",U=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",z=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,s=e.cy,u=s.zoom(),l=e.touchData.now,c=e.touchData.earlier;if(t.touches[0]){var h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);l[0]=h[0],l[1]=h[1]}if(t.touches[1]&&(h=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),l[2]=h[0],l[3]=h[1]),t.touches[2]&&(h=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),l[4]=h[0],l[5]=h[1]),o&&o.unactivate(),e.touchData.cxt){if(a={originalEvent:t,type:"cxttapend",position:{x:l[0],y:l[1]}},o?o.emit(a):s.emit(a),!e.touchData.cxtDragged){var d={originalEvent:t,type:"cxttap",position:{x:l[0],y:l[1]}};o?o.emit(d):s.emit(d)}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]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var p=s.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),s.emit({type:"boxend",originalEvent:t,position:{x:l[0],y:l[1]}}),p.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),p.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 v=e.dragData.touchDragEles;if(null!=o){var y=o._private.grabbed;f(v),e.redrawHint("drag",!0),e.redrawHint("eles",!0),y&&(o.emit("freeon"),v.emit("free"),e.dragData.didDrag&&(o.emit("dragfreeon"),v.emit("dragfree"))),r(o,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]}),o.unactivate(),e.touchData.start=null}else{var g=e.findNearestElement(l[0],l[1],!0,!0);r(g,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]})}var m=e.touchData.startPosition[0]-l[0],b=m*m,_=e.touchData.startPosition[1]-l[1],w=(b+_*_)*u*u;e.touchData.singleTouchMoved||(o||s.$(":selected").unselect(["tapunselect"]),r(o,["tap","vclick"],t,{x:l[0],y:l[1]}),V=!1,t.timeStamp-W<=s.multiClickDebounceTime()?(G&&clearTimeout(G),V=!0,W=null,r(o,["dbltap","vdblclick"],t,{x:l[0],y:l[1]})):(G=setTimeout((function(){V||r(o,["onetap","voneclick"],t,{x:l[0],y:l[1]})}),s.multiClickDebounceTime()),W=t.timeStamp)),null!=o&&!e.dragData.didDrag&&o._private.selectable&&w2){for(var d=[c[0],c[1]],p=Math.pow(d[0]-e,2)+Math.pow(d[1]-t,2),v=1;v0)return v[0]}return null},d=Object.keys(f),p=0;p0?l:Wt(o,i,e,t,n,r,a,s)},checkPoint:function(e,t,n,r,o,i,a,s){var u=2*(s="auto"===s?ln(r,o):s);if(Zt(e,t,this.points,i,a,r,o-u,[0,-1],n))return!0;if(Zt(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!!Kt(e,t,[i-l,a-c,i-l,a,i+l,a,i+l,a-c])||!!Jt(e,t,u,u,i+r/2-s,a+o/2-s,n)||!!Jt(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",an(3,0)),this.generateRoundPolygon("round-triangle",an(3,0)),this.generatePolygon("rectangle",an(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",an(5,0)),this.generateRoundPolygon("round-pentagon",an(5,0)),this.generatePolygon("hexagon",an(6,0)),this.generateRoundPolygon("round-hexagon",an(6,0)),this.generatePolygon("heptagon",an(7,0)),this.generateRoundPolygon("round-heptagon",an(7,0)),this.generatePolygon("octagon",an(8,0)),this.generateRoundPolygon("round-octagon",an(8,0));var r=new Array(20),o=un(5,0),i=un(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*Nu)break;var y=e.deq(t,f,c);if(!(y.length>0))break;for(var g=0;g0&&(e.onDeqd(t,l),!o&&e.shouldRedraw(t,l,f,c)&&r())}),o(t))}}},Lu=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Be;n(this,e),this.idsByKey=new et,this.keyForId=new et,this.cachesByLvl=new et,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=r}return o(e,[{key:"getIdsFor",value:function(e){null==e&&Ve("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new nt,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 et,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)}}]),e}(),Fu={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Bu=Ke({getKey:null,doesEleInvalidateKey:Be,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Fe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Uu=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Bu(t);G(n,r),n.lookup=new Lu(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},zu=Uu.prototype;zu.reasons=Fu,zu.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},zu.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},zu.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new lt((function(e,t){return t.reqs-e.reqs}))},zu.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},zu.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(Pt(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),y=v[v.length-2],g=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};y||(y=v[v.length-1]),y||(y=g()),y.width-y.usedWidthr;P--)S=i.getElement(e,t,n,P,Fu.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;y.context.translate(y.usedWidth,0),y.context.scale(l,l),this.drawElement(y.context,e,t,h,!1),y.context.scale(1/l,1/l),y.context.translate(-y.usedWidth,0)}return p={x:y.usedWidth,texture:y,level:r,scale:l,width:f,height:c,scaledLabelShown:h},y.usedWidth+=Math.ceil(f+8),y.eleCaches.push(p),u.set(e,r,p),i.checkTextureFullness(y),p},zu.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},zu.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?Ze(t,e):e.fullnessChecks++},zu.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;Ze(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,$e(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),Ze(r,i),n.push(i),i}},zu.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}},zu.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,Fu.dequeue)}}return o},zu.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=Le,t.updateItem(o),t.pop(),n[r]=null):o.eles.unmerge(e))},zu.onDequeue=function(e){this.onDequeues.push(e)},zu.offDequeue=function(e){Ze(this.onDequeues,e)},zu.setupDequeueing=Du({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&&Ze(c,a)}}();var f=function(t){var o=(t=t||{}).after;!function(){if(!a){a=Nt();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||!Gt(h.bb,y.boundingBox()))&&!(h=f({insert:!0,after:h})))return null;s||p?r.queueLayer(h,y):r.drawEleInLayer(h,y,n,t),h.eles.push(y),m[n]=h}}return s||(p?null:c)},Gu.getEleLevelForLayerLevel=function(e,t){return e},Gu.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))},Gu.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},Gu.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},Gu.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=Oe(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},Gu.invalidateLayer=function(e){if(this.lastInvalidationTime=Oe(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];Ze(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,y=t.pstyle("line-outline-color").value,g=l*c,m=l*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;"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,O=t.pstyle("ghost-opacity").value,E=g*O;e.translate(w,x),b(E),_(E),e.translate(-w,-x)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;e.lineWidth=d+v,e.lineCap=p,v>0?(a.colorStrokeStyle(e,y[0],y[1],y[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)}}},sl=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")}}}};al.drawEdgeOverlay=sl("overlay"),al.drawEdgeUnderlay=sl("underlay"),al.drawEdgePath=function(e,t,n,r){var o,i=e._private.rscratch,a=t,s=!1,u=this.usePaths(),l=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(u){var h=n.join("$");i.pathCacheKey&&i.pathCacheKey===h?(o=t=i.pathCache,s=!0):(o=t=new Path2D,i.pathCacheKey=h,i.pathCache=o)}if(a.setLineDash)switch(r){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(l),a.lineDashOffset=c;break;case"solid":a.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+35&&void 0!==arguments[5]?arguments[5]:5,a=arguments.length>6?arguments[6]:void 0;e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+o-i),e.quadraticCurveTo(t+r,n+o,t+r-i,n+o),e.lineTo(t+i,n+o),e.quadraticCurveTo(t,n+o,t,n+o-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),a?e.stroke():e.fill()}ll.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),o=Math.ceil(Pt(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)},ll.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)},ll.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",o=e.pstyle(r+"text-rotation"),i=Qe(n,"labelAngle",t);return"autorotate"===o.strValue?e.isEdge()?i:0:"none"===o.strValue?0:o.pfValue},ll.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=Qe(i,"labelX",n),c=Qe(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=Qe(i,"labelWidth",n),v=Qe(i,"labelHeight",n),y=t.pstyle(d+"text-margin-x").pfValue,g=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+=y,c+=g,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,O=t.pstyle("text-border-width").pfValue,E=t.pstyle("text-background-padding").pfValue,S=0===t.pstyle("text-background-shape").strValue.indexOf("round");if(w>0||O>0&&x>0){var T=l-E;switch(b){case"left":T-=p;break;case"center":T-=p/2}var P=c-v-E,C=p+2*E,A=v+2*E;if(w>0){var k=e.fillStyle,I=t.pstyle("text-background-color").value;e.fillStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+w*a+")",S?cl(e,T,P,C,A,2):e.fillRect(T,P,C,A),e.fillStyle=k}if(O>0&&x>0){var j=e.strokeStyle,M=e.lineWidth,R=t.pstyle("text-border-color").value,N=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+R[0]+","+R[1]+","+R[2]+","+x*a+")",e.lineWidth=O,e.setLineDash)switch(N){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=O/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(S?cl(e,T,P,C,A,2,"stroke"):e.strokeRect(T,P,C,A),"double"===N){var D=O/2;S?cl(e,T+D,P+D,C-2*D,A-2*D,2,"stroke"):e.strokeRect(T+D,P+D,C-2*D,A-2*D)}e.setLineDash&&e.setLineDash([]),e.lineWidth=M,e.strokeStyle=j}}var L=2*t.pstyle("text-outline-width").pfValue;if(L>0&&(e.lineWidth=L),"wrap"===t.pstyle("text-wrap").value){var F=Qe(i,"labelWrapCachedLines",n),B=Qe(i,"labelLineHeight",n),U=p/2,z=this.getLabelJustification(t);switch("auto"===z||("left"===b?"left"===z?l+=-p:"center"===z&&(l+=-U):"center"===b?"left"===z?l+=-U:"right"===z&&(l+=U):"right"===b&&("center"===z?l+=U:"right"===z&&(l+=p))),_){case"top":case"center":case"bottom":c-=(F.length-1)*B}for(var V=0;V0&&e.strokeText(F[V],l,c),e.fillText(F[V],l,c),c+=B}else L>0&&e.strokeText(f,l,c),e.fillText(f,l,c);0!==h&&(e.rotate(-h),e.translate(-s,-u))}}};var fl={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(O(f.x)&&O(f.y)&&(!s||t.visible())){var h,d,p=s?t.effectiveOpacity():1,v=u.usePaths(),y=!1,g=t.padding();r=t.width()+2*g,o=t.height()+2*g,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]:C;u.eleFillStyle(e,t,n)},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;u.colorStrokeStyle(e,A[0],A[1],A[2],t)},Y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U;u.colorStrokeStyle(e,F[0],F[1],F[2],t)},q=function(e,t,n,r){var o,i=u.nodePathCache=u.nodePathCache||[],a=je("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+V),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}},H=t.pstyle("shape").strValue,X=t.pstyle("shape-polygon-points").pfValue;if(v){e.translate(f.x,f.y);var K=q(r,o,H,X);h=K.path,y=K.cacheHit}var Z=function(){if(!y){var n=f;v&&(n={x:0,y:0}),u.nodeShapes[u.getNodeShape(t)].draw(h||e,n.x,n.y,r,o,V,c)}v?e.fill(h):e.fill()},$=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)},Q=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,V,c)))},J=function(){var t=(T>0?T:-T)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:p),n=T>0?0:255;0!==T&&(u.colorFillStyle(e,n,n,n,t),v?e.fill(h):e.fill())},ee=function(){if(P>0){if(e.lineWidth=P,e.lineCap=j,e.lineJoin=I,e.setLineDash)switch(k){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(R),e.lineDashOffset=N;break;case"solid":case"double":e.setLineDash([])}if("center"!==M){if(e.save(),e.lineWidth*=2,"inside"===M)v?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-P,-o/2-P,r+2*P,o+2*P),t.addPath(h),e.clip(t,"evenodd")}v?e.stroke(h):e.stroke(),e.restore()}else v?e.stroke(h):e.stroke();if("double"===k){e.lineWidth=P/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",v?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},te=function(){if(L>0){if(e.lineWidth=L,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=P;"inside"===M&&(a=0),"outside"===M&&(a*=2);var s,l=(r+a+(L+z))/r,c=(o+a+(L+z))/o,h=r*l,d=o*c,p=u.nodeShapes[i].points;if(v&&(s=q(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 y=0,g=0,m=0;"round-diamond"===i?y=1.4*(a+z+L):"round-heptagon"===i?(y=1.075*(a+z+L),m=-(a/2+z+L)/35):"round-hexagon"===i?y=1.12*(a+z+L):"round-pentagon"===i?(y=1.13*(a+z+L),m=-(a/2+z+L)/15):"round-tag"===i?(y=1.12*(a+z+L),g=.07*(a/2+L+z)):"round-triangle"===i&&(y=(a+z+L)*(Math.PI/2),m=-(a+z/2+L)/Math.PI),0!==y&&(h=r*(l=(r+y)/r),["round-hexagon","round-tag"].includes(i)||(d=o*(c=(o+y)/o)));for(var b=h/2,_=d/2,w=(V="auto"===V?cn(h,d):V)+(a+L+z)/2,x=new Array(p.length/2),O=new Array(p.length/2),E=0;E0){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()}}}};fl.drawNodeOverlay=hl("overlay"),fl.drawNodeUnderlay=hl("underlay"),fl.hasPie=function(e){return(e=e[0])._private.hasPie},fl.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var o=t.cy().style(),i=t.pstyle("pie-size"),a=r.x,s=r.y,u=t.width(),l=t.height(),c=Math.min(u,l)/2,f=0;this.usePaths()&&(a=0,s=0),"%"===i.units?c*=i.pfValue:void 0!==i.pfValue&&(c=i.pfValue/2);for(var h=1;h<=o.pieBackgroundN;h++){var d=t.pstyle("pie-"+h+"-background-size").value,p=t.pstyle("pie-"+h+"-background-color").value,v=t.pstyle("pie-"+h+"-background-opacity").value*n,y=d/100;y+f>1&&(y=1-f);var g=1.5*Math.PI+2*Math.PI*f,m=g+2*Math.PI*y;0===d||f>=1||f+y>1||(e.beginPath(),e.moveTo(a,s),e.arc(a,s,c,g,m),e.closePath(),this.colorFillStyle(e,p[0],p[1],p[2],v),e.fill(),f+=y)}};for(var dl={getPixelRatio:function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},paintCache:function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,o=0;oa.minMbLowQualFrames&&(a.motionBlurPxRatio=a.mbPxRBlurry)),a.clearingMotionBlur&&(a.motionBlurPxRatio=1),a.textureDrawLastFrame&&!f&&(c[a.NODE]=!0,c[a.SELECT_BOX]=!0);var m=u.style(),b=u.zoom(),_=void 0!==o?o:b,w=u.pan(),x={x:w.x,y:w.y},O={zoom:b,pan:{x:w.x,y:w.y}},E=a.prevViewport;void 0===E||O.zoom!==E.zoom||O.pan.x!==E.pan.x||O.pan.y!==E.pan.y||v&&!p||(a.motionBlurPxRatio=1),i&&(x=i),_*=s,x.x*=s,x.y*=s;var S=a.getCachedZSortedEles();function T(e,t,n,r,o){var i=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",a.colorFillStyle(e,255,255,255,a.motionBlurTransparency),e.fillRect(t,n,r,o),e.globalCompositeOperation=i}function P(e,r){var s,u,c,f;a.clearingMotionBlur||e!==l.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]&&e!==l.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]?(s=x,u=_,c=a.canvasWidth,f=a.canvasHeight):(s={x:w.x*d,y:w.y*d},u=b*d,c=a.canvasWidth*d,f=a.canvasHeight*d),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?T(e,0,0,c,f):t||void 0!==r&&!r||e.clearRect(0,0,c,f),n||(e.translate(s.x,s.y),e.scale(u,u)),i&&e.translate(i.x,i.y),o&&e.scale(o,o)}if(f||(a.textureDrawLastFrame=!1),f){if(a.textureDrawLastFrame=!0,!a.textureCache){a.textureCache={},a.textureCache.bb=u.mutableElements().boundingBox(),a.textureCache.texture=a.data.bufferCanvases[a.TEXTURE_BUFFER];var C=a.data.bufferContexts[a.TEXTURE_BUFFER];C.setTransform(1,0,0,1,0,0),C.clearRect(0,0,a.canvasWidth*a.textureMult,a.canvasHeight*a.textureMult),a.render({forcedContext:C,drawOnlyNodeLayer:!0,forcedPxRatio:s*a.textureMult}),(O=a.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:a.canvasWidth,height:a.canvasHeight}).mpan={x:(0-O.pan.x)/O.zoom,y:(0-O.pan.y)/O.zoom}}c[a.DRAG]=!1,c[a.NODE]=!1;var A=l.contexts[a.NODE],k=a.textureCache.texture;O=a.textureCache.viewport,A.setTransform(1,0,0,1,0,0),h?T(A,0,0,O.width,O.height):A.clearRect(0,0,O.width,O.height);var I=m.core("outside-texture-bg-color").value,j=m.core("outside-texture-bg-opacity").value;a.colorFillStyle(A,I[0],I[1],I[2],j),A.fillRect(0,0,O.width,O.height),b=u.zoom(),P(A,!1),A.clearRect(O.mpan.x,O.mpan.y,O.width/O.zoom/s,O.height/O.zoom/s),A.drawImage(k,O.mpan.x,O.mpan.y,O.width/O.zoom/s,O.height/O.zoom/s)}else a.textureOnViewport&&!t&&(a.textureCache=null);var M=u.extent(),R=a.pinching||a.hoverData.dragging||a.swipePanning||a.data.wheelZooming||a.hoverData.draggingEles||a.cy.animated(),N=a.hideEdgesOnViewport&&R,D=[];if(D[a.NODE]=!c[a.NODE]&&h&&!a.clearedForMotionBlur[a.NODE]||a.clearingMotionBlur,D[a.NODE]&&(a.clearedForMotionBlur[a.NODE]=!0),D[a.DRAG]=!c[a.DRAG]&&h&&!a.clearedForMotionBlur[a.DRAG]||a.clearingMotionBlur,D[a.DRAG]&&(a.clearedForMotionBlur[a.DRAG]=!0),c[a.NODE]||n||r||D[a.NODE]){var L=h&&!D[a.NODE]&&1!==d;P(A=t||(L?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]:l.contexts[a.NODE]),h&&!L?"motionBlur":void 0),N?a.drawCachedNodes(A,S.nondrag,s,M):a.drawLayeredElements(A,S.nondrag,s,M),a.debug&&a.drawDebugPoints(A,S.nondrag),n||h||(c[a.NODE]=!1)}if(!r&&(c[a.DRAG]||n||D[a.DRAG])&&(L=h&&!D[a.DRAG]&&1!==d,P(A=t||(L?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]:l.contexts[a.DRAG]),h&&!L?"motionBlur":void 0),N?a.drawCachedNodes(A,S.drag,s,M):a.drawCachedElements(A,S.drag,s,M),a.debug&&a.drawDebugPoints(A,S.drag),n||h||(c[a.DRAG]=!1)),a.showFps||!r&&c[a.SELECT_BOX]&&!n){if(P(A=t||l.contexts[a.SELECT_BOX]),1==a.selection[4]&&(a.hoverData.selecting||a.touchData.selecting)){b=a.cy.zoom();var F=m.core("selection-box-border-width").value/b;A.lineWidth=F,A.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",A.fillRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]),F>0&&(A.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",A.strokeRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]))}if(l.bgActivePosistion&&!a.hoverData.selecting){b=a.cy.zoom();var B=l.bgActivePosistion;A.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",A.beginPath(),A.arc(B.x,B.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),A.fill()}var U=a.lastRedrawTime;if(a.showFps&&U){U=Math.round(U);var z=Math.round(1e3/U);A.setTransform(1,0,0,1,0,0),A.fillStyle="rgba(255, 0, 0, 0.75)",A.strokeStyle="rgba(255, 0, 0, 0.75)",A.lineWidth=1,A.fillText("1 frame = "+U+" ms = "+z+" fps",0,20),A.strokeRect(0,30,250,20),A.fillRect(0,30,250*Math.min(z/60,1),20)}n||(c[a.SELECT_BOX]=!1)}if(h&&1!==d){var V=l.contexts[a.NODE],G=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_NODE],W=l.contexts[a.DRAG],Y=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_DRAG],q=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!g?e.clearRect(0,0,a.canvasWidth,a.canvasHeight):T(e,0,0,a.canvasWidth,a.canvasHeight);var r=d;e.drawImage(t,0,0,a.canvasWidth*r,a.canvasHeight*r,0,0,a.canvasWidth,a.canvasHeight)};(c[a.NODE]||D[a.NODE])&&(q(V,G,D[a.NODE]),c[a.NODE]=!1),(c[a.DRAG]||D[a.DRAG])&&(q(W,Y,D[a.DRAG]),c[a.DRAG]=!1)}a.prevViewport=O,a.clearingMotionBlur&&(a.clearingMotionBlur=!1,a.motionBlurCleared=!0,a.motionBlur=!0),h&&(a.motionBlurTimeout=setTimeout((function(){a.motionBlurTimeout=null,a.clearedForMotionBlur[a.NODE]=!1,a.clearedForMotionBlur[a.DRAG]=!1,a.motionBlur=!1,a.clearingMotionBlur=!f,a.mbFrames=0,c[a.NODE]=!0,c[a.DRAG]=!0,a.redraw()}),100)),t||u.emit("render")}},pl={drawPolygonPath:function(e,t,n,r,o,i){var a=r/2,s=o/2;e.beginPath&&e.beginPath(),e.moveTo(t+a*i[0],n+s*i[1]);for(var u=1;u0&&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},wl.png=function(e){return Ol(e,this.bufferCanvasImage(e),"image/png")},wl.jpg=function(e){return Ol(e,this.bufferCanvasImage(e),"image/jpeg")};var El=Tl,Sl=Tl.prototype;function Tl(e){var t=this,n=t.cy.window().document;t.data={canvases:new Array(Sl.CANVAS_LAYERS),contexts:new Array(Sl.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Sl.CANVAS_LAYERS),bufferCanvases:new Array(Sl.BUFFER_COUNT),bufferContexts:new Array(Sl.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"};d&&d.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var u=0;u{const n=Fl({headless:!0,styleEnabled:!1});n.add(e);const r={};return 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()}}))}}).run(),{positions:r}})(t,n);this.onmessage({data:r})}onmessage(){}close(){}}},zl=()=>new SharedWorker(new URL(a.p+a.u(574),a.b),{type:void 0,name:"CoseBilkentLayout"});var Vl=a(8353),Gl=a(8812),Wl=a(8362);const Yl=100,ql="up",Hl="down",Xl="left",Kl="right",Zl={[ql]:"BT",[Hl]:"TB",[Xl]:"RL",[Kl]:"LR"},$l=1/.38,Ql=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}},Jl=e=>{const t=new Vl.graphlib.Graph;return t.setGraph({}),t.setDefaultEdgeLabel((()=>({}))),t.graph().nodesep=75*e,t.graph().ranksep=75*e,t},ec=(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},tc=(e,t)=>{let n=ec(e,t.predecessors(e),t);return null===n&&(n=ec(e,t.successors(e),t)),n},nc=(e,t,n)=>{e.graph().ranker="tight-tree",e.graph().rankdir=Zl[t];const r=Vl.layout(e);for(const e of r.nodes()){const t=tc(e,r);null!==t&&(n[e]=t)}},rc=(e,t)=>Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)),oc=e=>{const t=[e[0]];let n={p1:e[0],p2:e[1]},r=rc(n.p1,n.p2);for(let o=2;o{const s=Jl(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)*$l*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=Wl.alg.components(e);if(r.length>1)for(const o of r){const r=Jl(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=>nc(e,o,u)));const e=(e=>"up"===e||e===Hl)(o),t=(e=>e===Hl||e===Kl)(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+Yl,height:t+Yl}):({width:e,height:t,...n})=>({...n,width:t+Yl,height:e+Yl}),i=r.map(Ql).map(o),a=n.map(Ql).map(o),u=i.concat(a);Gl(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(Ql),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)*Yl: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)+Yl}},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+=Yl+o.width}d=a+Yl};t?(p(),v()):(v(),p())}}else nc(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],y=f[0]-v[0],g=f[1]-v[1];for(const e in p)p[e].x+=y,p[e].y+=g;const m={};for(const e of s.edges()){const t=s.edge(e);if(t.points&&t.points.length>3){const n=oc(t.points);for(const e of n)e.x+=y,e.y+=g;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(){}}},ac=()=>new SharedWorker(new URL(a.p+a.u(654),a.b),{type:void 0,name:"HierarchicalLayout"});var sc=a(1635);function uc(){return"undefined"!=typeof process&&process.env?process.env:{}}var lc=a(9456),cc=a(524),fc=a(2321);function hc(e,t,n,r){var o,i=[e,t,n,r],a=(0,fc.Qd)(e)?e.event:e;if(!a||!(0,fc.Kg)(a))throw new Error("Event missing");var s=(0,fc.Qd)(e)?null!==(o=e.properties)&&void 0!==o?o:{}:(0,fc.Qd)(t)?t:{},u={};return(0,fc.Tn)(n)||(u=null!=n?n:{}),(0,fc.Qd)(e)&&!(0,fc.Tn)(t)&&(u=null!=t?t:{}),[a,s,u,i.find(fc.Tn)]}function dc(e,t,n,r,o){var i,a,s=null,u=null,l=[e,t,n,r,o],c=l.filter(fc.Kg);void 0!==c[0]&&void 0!==c[1]&&(s=c[0],u=c[1]),1===c.length&&(s=null,u=c[0]);var f=l.find(fc.Tn),h=l.filter((function(e){return null===u?(0,fc.Qd)(e):(0,fc.Qd)(e)||null===e})),d=null!==(i=h[0])&&void 0!==i?i:{},p=null!==(a=h[1])&&void 0!==a?a:{};return[s,u,d,p,f]}var pc=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}},Sc=function(){var e=document.querySelector("link[rel='canonical']");return xc(location.href,e&&e.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},Tc=function(e,t){void 0===t&&(t=Ec(Sc()));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,sc.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,sc.Cl)((0,sc.Cl)((0,sc.Cl)({},t),e.properties),e.name?{name:e.name}:{})),i.page=(0,sc.Cl)((0,sc.Cl)((0,sc.Cl)({},t),n),i.page)},Pc=a(3172),Cc=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return(0,sc.C6)(t,e),t}(Error),Ac="is not a string",kc="is not an object";var Ic=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(){}},jc=function(e){function t(t){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,wc.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,sc.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 Tc(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 Tc(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 Tc(s,a),s},t.prototype.identify=function(t,n,r,o,i){var a=e.prototype.identify.call(this,t,n,r,o);return Tc(a,i),a},t.prototype.group=function(t,n,r,o,i){var a=e.prototype.group.call(this,t,n,r,o);return Tc(a,i),a},t.prototype.alias=function(t,n,r,o,i){var a=e.prototype.alias.call(this,t,n,r,o);return Tc(a,i),a},t}(function(){function e(e){this.settings=new Ic(e)}return e.prototype.track=function(e,t,n,r){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize((0,sc.Cl)((0,sc.Cl)({},this.baseEvent()),{event:e,type:"track",properties:null!=t?t:{},options:(0,sc.Cl)({},n),integrations:(0,sc.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,sc.Cl)({},n),options:(0,sc.Cl)({},r),integrations:(0,sc.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,sc.Cl)((0,sc.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,sc.Cl)({},n),options:(0,sc.Cl)({},r),integrations:(0,sc.Cl)({},o)};return null!==e&&(i.category=e),null!==t&&(i.name=t),this.normalize((0,sc.Cl)((0,sc.Cl)({},this.baseEvent()),i))},e.prototype.identify=function(e,t,n,r){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize((0,sc.Cl)((0,sc.Cl)({},this.baseEvent()),{type:"identify",userId:e,traits:null!=t?t:{},options:(0,sc.Cl)({},n),integrations:r}))},e.prototype.group=function(e,t,n,r){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize((0,sc.Cl)((0,sc.Cl)({},this.baseEvent()),{type:"group",traits:null!=t?t:{},options:(0,sc.Cl)({},n),integrations:(0,sc.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,sc.Cl)({},n),integrations:(0,sc.Cl)({},r)};return null!==t&&(o.previousId=t),void 0===e?this.normalize((0,sc.Cl)((0,sc.Cl)({},o),this.baseEvent())):this.normalize((0,sc.Cl)((0,sc.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,Pc.J)(i,t,e[t]):(0,Pc.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,sc.Cl)((0,sc.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,sc.Cl)((0,sc.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,sc.Tt)(e,["options"]),f=(0,sc.Cl)((0,sc.Cl)((0,sc.Cl)((0,sc.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,fc.t2)(e))throw new Cc("Event","is nil");if("object"!=typeof e)throw new Cc("Event",kc)}(e),function(e){if(!(0,fc.Kg)(e.type))throw new Cc(".type",Ac)}(e),function(e){if(!(0,fc.Kg)(e.messageId))throw new Cc(".messageId",Ac)}(e),"track"===e.type&&(function(e){if(!(0,fc.Kg)(e.event))throw new Cc(".event",Ac)}(e),function(e){if(!(0,fc.Qd)(e.properties))throw new Cc(".properties",kc)}(e)),["group","identify"].includes(e.type)&&function(e){if(!(0,fc.Qd)(e.traits))throw new Cc(".traits",kc)}(e)}(f),f},e}()),Mc=function(e){return"addMiddleware"in e&&"destination"===e.type},Rc=a(5881),Nc=a(6115),Dc=a(9952),Lc=a(4980),Fc=function(e){function t(t){return e.call(this,"string"==typeof t?new Rc.x(4,t):t)||this}return(0,sc.C6)(t,e),t.prototype.flush=function(){return(0,sc.sH)(this,void 0,void 0,(function(){return(0,sc.YH)(this,(function(t){return(0,yc.a)()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(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(Nc.g,(function(){i.scheduleFlush(0)})),i}return(0,sc.C6)(t,e),t.prototype.register=function(e,t,n){return(0,sc.sH)(this,void 0,void 0,(function(){var r,o,i=this;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var r;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var t;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var t=this;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var t=this;return(0,sc.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,sc.sH)(this,void 0,void 0,(function(){var t,n,r,o;return(0,sc.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 Dc.d&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return(0,sc.sH)(this,void 0,void 0,(function(){var e,t;return(0,sc.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,n,r=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)})),o=(t="type",n={},r.forEach((function(e){var r,o=void 0,i=e[t];void 0!==(o="string"!=typeof i?JSON.stringify(i):i)&&(n[o]=(0,sc.fX)((0,sc.fX)([],null!==(r=n[o])&&void 0!==r?r:[],!0),[e],!1))})),n),i=o.before,a=void 0===i?[]:i,s=o.enrichment,u=void 0===s?[]:s,l=o.destination,c=void 0===l?[]:l,f=o.after;return{before:a,enrichment:u,destinations:c,after:void 0===f?[]:f}},t.prototype.flushOne=function(e){var t,n;return(0,sc.sH)(this,void 0,void 0,(function(){var r,o,i,a,s,u,l,c,f,h,d,p,v,y;return(0,sc.YH)(this,(function(g){switch(g.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,g.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,sc.Cl)((0,sc.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,yc.a)()}),(function(){return(0,sc.sH)(r,void 0,void 0,(function(){var r;return(0,sc.YH)(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,(0,Lc.C)(r,e)]:[2];case 1:return o.sent()instanceof gc.o||n.push(r),[2]}}))}))}))];case 1:return o.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function Ef(e,t,n,r){var o=this;e||setTimeout((function(){return(0,sc.sH)(o,void 0,void 0,(function(){var e,o;return(0,sc.YH)(this,(function(i){switch(i.label){case 0:return e=!0,[4,Of(n,t)];case 1:return o=i.sent(),e=!1,t.todo>0&&r(e,o,n,r),[2]}}))}))}),5e3*Math.random())}var Sf=a(7947),Tf=function(e){return"Segment.io"===e.name};function Pf(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 Nc.M(e.queue.queue.maxAttempts,[]):new Rc.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:Sf.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="batching"===(null==p?void 0: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,sc.Tt)(t,["sentAt"])}));return(0,cc.h)("https://".concat(e,"/b"),{keepalive:(null==t?void 0:t.keepalive)||u,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:o,batch:i,sentAt:(new Date).toISOString()})}).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 bf("Rate limit exceeded: ".concat(e.status),r)}}))}}function d(e){var n;return void 0===e&&(e=1),(0,sc.sH)(this,void 0,void 0,(function(){var r;return(0,sc.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;gc.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,sc.Cl)((0,sc.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=(n=s,r=[],o=0,n.forEach((function(e){_f(r[o])>=64&&o++,r[o]?r[o].push(e):r[o]=[e]})),r).map(h);Promise.all(t).catch(console.error)}var n,r,o},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,sc.sH)(this,void 0,void 0,(function(){var e;return(0,sc.YH)(this,(function(r){return s.push(n),e=s.length>=l||function(e){return _f(e)>=450}(s)||(null==t?void 0:t.keepalive)&&function(e){return _f(e)>=54}(s),[2,e||u?d():p()]}))}))}}}(f,p.config):(a=null==p?void 0:p.config,{dispatch:function(e,t){return(0,cc.h)(e,{keepalive:null==a?void 0:a.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)}).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 bf("Rate limit exceeded: ".concat(e.status),r)}}))}});function y(r){return(0,sc.sH)(this,void 0,void 0,(function(){var o,i;return(0,sc.YH)(this,(function(a){return(0,yc.a)()?(u.push(r),Ef(c,u,g,Ef),[2,r]):(l.add(r),o=r.event.type.charAt(0),i=(0,mf.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)),[2,v.dispatch("".concat(d,"/").concat(o),wf(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 Ef(c,u,g,Ef),r})).finally((function(){l.delete(r)}))])}))}))}var g={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:y,identify:y,page:y,alias:y,group:y,screen:y};return u.todo&&Ef(c,u,g,Ef),g}var Cf="This is being deprecated and will be not be available in future releases of Analytics JS",Af=(0,rf.m)(),kf=null==Af?void 0:Af.analytics,If=function(){function e(e,t){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var e;return null===(e=t.plugins.find(Tf))||void 0===e?void 0:e.metadata},this.writeKey=e.writeKey,this.cdnSettings=null!==(n=e.cdnSettings)&&void 0!==n?n:{integrations:{},edgeFunction:{}},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 jf(){console.warn(Cf)}var Mf,Rf=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=jf,u.addIntegrationMiddleware=jf,u.listeners=jf,u.addEventListener=jf,u.removeAllListeners=jf,u.removeListener=jf,u.removeEventListener=jf,u.hasListeners=jf,u.add=jf,u.addIntegration=jf;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 Nc.M(r,[]):new Rc.x(r,e);return new Fc(o)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,c),u.settings=new If(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 Jc((0,sc.Cl)({persist:!c,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),u._group=null!=i?i:new tf((0,sc.Cl)({persist:!c,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),u.eventFactory=new jc(u._user),u.integrations=null!==(s=null==n?void 0:n.integrations)&&void 0!==s?s:{},u.options=null!=n?n:{},Bc(u),u}return(0,sc.C6)(t,e),t.prototype.createStore=function(e,t,n){return e?new Vc([new Gc]):t&&Wc(t)?new Vc(Zc($c(t.stores,n))):new Vc(Zc([Uc.LocalStorage,{name:Uc.Cookie,settings:n},Uc.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,Ff.p)(i)}return e}),{})}(a));var u=function(){var e=qc.get("_ga");if(e&&e.startsWith("amp"))return e}();u&&(o.amp={id:u}),function(e,t,n){var r,o=new Vc(n?[]:[new Xc(Uf())]),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"!==uc().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 y=T.sent(),[3,6];case 5:y=[],T.label=6;case 6:return v=y,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 g=m,b=(0,Df.J)(t,r),[4,Kf(t,n.integrations,b,r,d,h).catch((function(){return[]}))];case 12:return _=T.sent(),w=(0,sc.fX)((0,sc.fX)([Gf],v,!0),_,!0),g&&w.push(g),!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]:(O=(x=w).push,[4,Pf(n,b["Segment.io"],t.integrations)]);case 13:O.apply(x,[T.sent()]),T.label=14;case 14:return[4,n.register.apply(n,(0,sc.fX)((0,sc.fX)([],w,!1),f,!1))];case 15:return E=T.sent(),[4,lf(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,sc.sH)(S,void 0,void 0,(function(){var e,i;return(0,sc.YH)(this,(function(a){switch(a.label){case 0:return[4,o(E,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[2,E]}var P}))}))}var eh=function(e){function t(){var t=this,n=(0,Lf.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,h,d;return void 0===t&&(t={}),(0,sc.sH)(this,void 0,void 0,(function(){var p,v,y,g,m,b,_,w,x,O,E,S;return(0,sc.YH)(this,(function(T){switch(T.label){case 0:return!0===t.disable?[2,[new Nf,gc.o.system()]]:(t.globalAnalyticsKey&&(0,of.rY)(t.globalAnalyticsKey),e.cdnURL&&(0,lc.qQ)(e.cdnURL),t.initialPageview&&n.add(new pf("page",[])),p=null!==(r=e.cdnURL)&&void 0!==r?r:(0,lc.I2)(),null===(o=e.cdnSettings)||void 0===o?[3,1]:(y=o,[3,3]));case 1:return[4,(P=e.writeKey,C=p,(0,cc.h)("".concat(C,"/v1/projects/").concat(P,"/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:y=T.sent(),T.label=3;case 3:return v=y,t.updateCDNSettings&&(v=t.updateCDNSettings(v)),"function"!=typeof t.disable?[3,5]:[4,t.disable(v)];case 4:if(T.sent())return[2,[new Nf,gc.o.system()]];T.label=5;case 5:return g=null===(a=null===(i=v.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===a||a,t=(0,sc.Cl)({retryQueue:g},t),function(e){var t;null===(t=Zf.attach)||void 0===t||t.call(Zf,e)}(m=new Rf((0,sc.Cl)((0,sc.Cl)({},e),{cdnSettings:v,cdnURL:p}),t)),b=null!==(s=e.plugins)&&void 0!==s?s:[],_=null!==(u=e.classicIntegrations)&&void 0!==u?u:[],w=null===(l=t.integrations)||void 0===l?void 0:l["Segment.io"],$f.U.initRemoteMetrics((0,sc.Cl)((0,sc.Cl)({},v.metrics),{host:null!==(c=null==w?void 0:w.apiHost)&&void 0!==c?c:null===(f=v.metrics)||void 0===f?void 0:f.host,protocol:null==w?void 0:w.protocol})),[4,Jf(e.writeKey,v,m,t,b,_,n)];case 6:return x=T.sent(),O=null!==(h=window.location.search)&&void 0!==h?h:"",E=null!==(d=window.location.hash)&&void 0!==d?d:"",(S=O.length?O:E.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,m.queryString(S).catch(console.error)]:[3,8];case 7:T.sent(),T.label=8;case 8:return m.initialized=!0,m.emit("initialize",e,t),[4,Qf(m,n)];case 9:return T.sent(),[2,[m,x]]}var P,C}))}))}(t[0],t[1],e)}))}))||this,t._resolveLoadStart=function(e,t){return o([e,t])},t}return(0,sc.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}(gf),th={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 q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(o)return r?-1:q(e).length;t=(""+t).toLowerCase(),o=!0}}function y(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 g(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 O(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(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 M(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 R(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 F(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||j(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||j(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||j(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(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||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Q((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(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||W(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||j(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||j(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||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||j(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||j(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||j(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||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Q((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(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||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||j(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(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||M(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||M(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||M(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||M(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||M(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||M(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||M(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 R(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);M(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);M(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||M(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||M(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||M(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||M(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||M(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 R(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 F(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return F(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 B.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,o,i)}function G(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw G(e,n),new B.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.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 Y=/[^+/0-9A-Za-z-_]/g;function q(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 H(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).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,O,E=0,S=0,T=u,P=[],C=[],A=1,k=0,I=0,j=!1,M=!1,R="",N=i,D=r;"300 es"===(e=e||{}).version&&(N=s,D=a);var L={},F={};for(E=0;E0)continue;n=e.slice(0,1).join("")}return B(n),I+=n.length,(P=P.slice(n.length)).length}}function q(){return/[^a-fA-F0-9]/.test(t)?(B(P.join("")),T=u,E):(P.push(t),n=t,E+1)}function H(){return"."===t||/[eE]/.test(t)?(P.push(t),T=v,n=t,E+1):"x"===t&&1===P.length&&"0"===P[0]?(T=w,P.push(t),n=t,E+1):/[^\d]/.test(t)?(B(P.join("")),T=u,E):(P.push(t),n=t,E+1)}function X(){return"f"===t&&(P.push(t),n=t,E+=1),/[eE]/.test(t)?(P.push(t),n=t,E+1):("-"!==t&&"+"!==t||!/[eE]/.test(n))&&/[^\d]/.test(t)?(B(P.join("")),T=u,E):(P.push(t),n=t,E+1)}function K(){if(/[^\d\w_]/.test(t)){var e=P.join("");return T=F[e]?m:L[e]?g:y,B(P.join("")),T=u,E}return P.push(t),n=t,E+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,y=6,g=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]",y="[object Array]",g="[object Boolean]",m="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",x="[object Map]",O="[object Number]",E="[object Object]",S="[object Promise]",T="[object RegExp]",P="[object Set]",C="[object String]",A="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",j="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,H=RegExp(Y.source),X=RegExp(q.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\]$/,ye=/^0o[0-7]+$/i,ge=/^(?: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",Oe="\\u2700-\\u27bf",Ee="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+",je="["+Oe+"]",Me="["+Ee+"]",Re="[^"+we+Pe+Ie+Oe+Ee+Se+"]",Ne="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Se+"]",Ue="\\u200d",ze="(?:"+Me+"|"+Re+")",Ve="(?:"+Be+"|"+Re+")",Ge="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+ke+"|"+Ne+")?",qe="["+Te+"]?",He=qe+Ye+"(?:"+Ue+"(?:"+[De,Le,Fe].join("|")+")"+qe+Ye+")*",Xe="(?:"+[je,Le,Fe].join("|")+")"+He,Ke="(?:"+[De+ke+"?",ke,Le,Fe,Ce].join("|")+")",Ze=RegExp("['’]","g"),$e=RegExp(ke,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ke+He,"g"),Je=RegExp([Be+"?"+Me+"+"+Ge+"(?="+[Ae,Be,"$"].join("|")+")",Ve+"+"+We+"(?="+[Ae,Be+ze,"$"].join("|")+")",Be+"?"+ze+"+"+Ge,Be+"+"+We,"\\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[M]=ot[R]=ot[N]=ot[D]=ot[L]=ot[F]=ot[B]=ot[U]=ot[z]=!0,ot[v]=ot[y]=ot[I]=ot[g]=ot[j]=ot[m]=ot[b]=ot[_]=ot[x]=ot[O]=ot[E]=ot[T]=ot[P]=ot[C]=ot[k]=!1;var it={};it[v]=it[y]=it[I]=it[j]=it[g]=it[m]=it[M]=it[R]=it[N]=it[D]=it[L]=it[x]=it[O]=it[E]=it[T]=it[P]=it[C]=it[A]=it[F]=it[B]=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,yt=function(){try{return dt&&dt.require&&dt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),gt=yt&&yt.isArrayBuffer,mt=yt&&yt.isDate,bt=yt&&yt.isMap,_t=yt&&yt.isRegExp,wt=yt&&yt.isSet,xt=yt&&yt.isTypedArray;function Ot(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 Et(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--&&Bt(t,e[n],0)>-1;);return n}var en=Wt({À:"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=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});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,Oe=t.Math,Ee=t.Object,Se=t.RegExp,Te=t.String,Pe=t.TypeError,Ce=r.prototype,Ae=xe.prototype,ke=Ee.prototype,Ie=t["__core-js_shared__"],je=Ae.toString,Me=ke.hasOwnProperty,Re=0,Ne=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=ke.toString,Le=je.call(Ee),Fe=ft._,Be=Se("^"+je.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=pt?t.Buffer:o,ze=t.Symbol,Ve=t.Uint8Array,Ge=Ue?Ue.allocUnsafe:o,We=an(Ee.getPrototypeOf,Ee),Ye=Ee.create,qe=ke.propertyIsEnumerable,He=Ce.splice,Xe=ze?ze.isConcatSpreadable:o,Ke=ze?ze.iterator:o,Qe=ze?ze.toStringTag:o,et=function(){try{var e=ui(Ee,"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=Oe.ceil,dt=Oe.floor,vt=Ee.getOwnPropertySymbols,yt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Wt=Ce.join,pn=an(Ee.keys,Ee),vn=Oe.max,yn=Oe.min,gn=oe.now,mn=t.parseInt,bn=Oe.random,_n=Ce.reverse,wn=ui(t,"DataView"),xn=ui(t,"Map"),On=ui(t,"Promise"),En=ui(t,"Set"),Sn=ui(t,"WeakMap"),Tn=ui(Ee,"create"),Pn=Sn&&new Sn,Cn={},An=Di(wn),kn=Di(xn),In=Di(On),jn=Di(En),Mn=Di(Sn),Rn=ze?ze.prototype:o,Nn=Rn?Rn.valueOf:o,Dn=Rn?Rn.toString:o;function Ln(e){if(Ja(e)&&!Va(e)&&!(e instanceof zn)){if(e instanceof Un)return e;if(Me.call(e,"__wrapped__"))return Li(e)}return new Un(e)}var Fn=function(){function e(){}return function(t){if(!Qa(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Bn(){}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]&&Me.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(qa(e))return _o(e,u);if(h==E||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 g:case m:return new o(+e);case j:return function(e,t){var n=t?wo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case R:case N:case D:case L:case F:case B:case U:case z:return xo(e,n);case x:return new o;case O: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?Ee(Nn.call(r)):{}}}(e,h,u)}}a||(a=new qn);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 y=f?o:(c?l?ti:ei:l?ks:As)(e);return St(y||e,(function(r,o){y&&(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=Ee(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 Yn(t));e:for(;++o-1},Gn.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},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(xn||Gn),string:new Vn}},Wn.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return ai(this,e).get(e)},Wn.prototype.has=function(e){return ai(this,e).has(e)},Wn.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},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(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var lr=ko(gr),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):jt(o,s):r||(o[o.length]=s)}return o}var vr=Io(),yr=Io(!0);function gr(e,t){return e&&vr(e,t,As)}function mr(e,t){return e&&yr(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=yo(t,e)).length;null!=e&&nt}function Er(e,t){return null!=e&&Me.call(e,t)}function Sr(e,t){return null!=e&&t in Ee(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=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 zr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&He.call(s,u,1),He.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;vi(o)?He.call(e,o,1):so(e,o)}}return e}function Wr(e,t){return e+dt(bn()*(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 Ci(Oi(e,t,tu),e+"")}function Hr(e){return Xn(Fs(e))}function Xr(e,t){var n=Fs(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=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&&!as(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: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=Ge?Ge(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 Oo(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&&yi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Ee(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 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 ki(e){var t=0,n=0;return function(){var r=gn(),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){Me.call(e,n)?++e[n]:nr(e,n,1)})),pa=No(zi),va=No(Vi);function ya(e,t){return(Va(e)?St:lr)(e,ii(t,3))}function ga(e,t){return(Va(e)?Tt:cr)(e,ii(t,3))}var ma=Co((function(e,t,n){Me.call(e,n)?e[n].push(t):nr(e,n,[t])})),ba=qr((function(e,t,n){var o=-1,i="function"==typeof t,a=Wa(e)?r(e.length):[];return lr(e,(function(e){a[++o]=i?Ot(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[[],[]]})),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]]),Ur(e,pr(t,1),[])})),Ea=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=qr((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=qr((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 y(e){var n=e-c;return c===o||n>=t||n<0||d&&e-f>=s}function g(){var e=Ea();if(y(e))return m(e);l=Pi(g,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=Ea(),n=y(e);if(r=arguments,a=this,c=e,n){if(l===o)return function(e){return f=e,l=Pi(g,t),h?v(e):u}(c);if(d)return bo(l),l=Pi(g,t),v(c)}return l===o&&(l=Pi(g,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(Ea())},b}var ka=qr((function(e,t){return sr(e,1,t)})),Ia=qr((function(e,t,n){return sr(e,ps(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||Wn),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=Wn;var Ra=go((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 qr((function(r){for(var o=-1,i=yn(r.length,n);++o=t})),za=Cr(function(){return arguments}())?Cr:function(e){return Ja(e)&&Me.call(e,"callee")&&!qe.call(e,"callee")},Va=r.isArray,Ga=gt?Kt(gt):function(e){return Ja(e)&&xr(e)==I};function Wa(e){return null!=e&&$a(e.length)&&!Ka(e)}function Ya(e){return Ja(e)&&Wa(e)}var qa=yt||pu,Ha=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)==O}function ns(e){if(!Ja(e)||xr(e)!=E)return!1;var t=We(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.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=Go(Rr),ls=Go((function(e,t){return e<=t}));function cs(e){if(!e)return[];if(Wa(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:Fs)(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||ye.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function vs(e){return Po(e,ks(e))}function ys(e){return null==e?"":io(e)}var gs=Ao((function(e,t){if(_i(t)||Wa(t))Po(t,As(t),e);else for(var n in t)Me.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=qr((function(e,t){e=Ee(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})),Po(e,ti(e),n),r&&(n=ir(n,7,$o));for(var o=t.length;o--;)so(n,t[o]);return n})),Rs=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=Ho(As),Ls=Ho(ks);function Fs(e){return null==e?[]:Zt(e,As(e))}var Bs=Mo((function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)}));function Us(e){return Xs(ys(e).toLowerCase())}function zs(e){return(e=ys(e))&&e.replace(me,en).replace($e,"")}var Vs=Mo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=Mo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ws=jo("toLowerCase"),Ys=Mo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),qs=Mo((function(e,t,n){return e+(n?" ":"")+Xs(t)})),Hs=Mo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=jo("toUpperCase");function Ks(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 Zs=qr((function(e,t){try{return Ot(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 jr("function"==typeof e?e:ir(e,1))}var ru=qr((function(e,t){return function(n){return Pr(n,e,t)}})),ou=qr((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,jt([this.value()],arguments))})})),e}function au(){}var su=Uo(It),uu=Uo(Pt),lu=Uo(Nt);function cu(e){return gi(e)?Gt(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,yu=Bo((function(e,t){return e+t}),0),gu=Yo("ceil"),mu=Bo((function(e,t){return e/t}),1),bu=Yo("floor"),_u=Bo((function(e,t){return e*t}),1),wu=Yo("round"),xu=Bo((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=gs,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?yi(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=ys(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),qr((function(n){var r=n[t],o=mo(n,0,t);return r&&jt(o,r),Ot(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(Ri(ys(e)))},Ln.toPlainObject=vs,Ln.transform=function(e,t,n){var r=Va(e),o=r||qa(e)||ss(e);if(t=ii(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Qa(e)&&Ka(i)?Fn(We(e)):{}}return(o?St:gr)(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=Fs,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=yu,Ln.attempt=Zs,Ln.camelCase=Bs,Ln.capitalize=Us,Ln.ceil=gu,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=ys(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=Fa,Ln.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(q,tn):e},Ln.escapeRegExp=function(e){return(e=ys(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Ln.every=function(e,t,n){var r=Va(e)?Pt:fr;return n&&yi(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),gr)},Ln.findLast=va,Ln.findLastIndex=Vi,Ln.findLastKey=function(e,t){return Lt(e,ii(t,3),mr)},Ln.floor=bu,Ln.forEach=ya,Ln.forEachRight=ga,Ln.forIn=function(e,t){return null==e?e:vr(e,ii(t,3),ks)},Ln.forInRight=function(e,t){return null==e?e:yr(e,ii(t,3),ks)},Ln.forOwn=function(e,t){return e&&gr(e,ii(t,3))},Ln.forOwnRight=function(e,t){return e&&mr(e,ii(t,3))},Ln.get=Es,Ln.gt=Ba,Ln.gte=Ua,Ln.has=function(e,t){return null!=e&&hi(e,t,Er)},Ln.hasIn=Ss,Ln.head=Wi,Ln.identity=tu,Ln.includes=function(e,t,n,r){e=Wa(e)?e:Fs(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&&Bt(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)),Bt(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>=yn(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?"":Wt.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):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):Ft(e,zt,i,!0)},Ln.lowerCase=Gs,Ln.lowerFirst=Ws,Ln.lt=us,Ln.lte=ls,Ln.max=function(e){return e&&e.length?hr(e,tu,Or):o},Ln.maxBy=function(e,t){return e&&e.length?hr(e,ii(t,2),Or):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,Rr):o},Ln.minBy=function(e,t){return e&&e.length?hr(e,ii(t,2),Rr):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?Br(e,hs(t)):o},Ln.noConflict=function(){return ft._===this&&(ft._=Fe),this},Ln.noop=au,Ln.now=Ea,Ln.pad=function(e,t,n){e=ys(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=ys(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 yn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Wr(e,t)},Ln.reduce=function(e,t,n){var r=Va(e)?Mt:Yt,o=arguments.length<3;return r(e,ii(t,4),n,o,lr)},Ln.reduceRight=function(e,t,n){var r=Va(e)?Rt:Yt,o=arguments.length<3;return r(e,ii(t,4),n,o,cr)},Ln.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:hs(t),Yr(ys(e),t)},Ln.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Ln.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=ii(t),e-=d;for(var o=Ht(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,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(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=ys(e))&&H.test(e)?e.replace(Y,hn):e},Ln.uniqueId=function(e){var t=++Re;return ys(e)+t},Ln.upperCase=Hs,Ln.upperFirst=Xs,Ln.each=ya,Ln.eachRight=ga,Ln.first=Wi,iu(Ln,(vu={},gr(Ln,(function(e,t){Me.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__=yn(n,r.__takeCount__):r.__views__.push({size:yn(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=qr((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(Ma(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)},gr(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,jt([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 y=e.apply(t,s);return y.__actions__.push({func:fa,args:[f],thisArg:o}),new Un(y,h)}return p&&v?e.apply(this,s):(y=this.thru(f),p?r?y.value()[0]:y.value():y)})})),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)}))}})),gr(zn.prototype,(function(e,t){var n=Ln[t];if(n){var r=n.name+"";Me.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 Bn;){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 y},e.rollback=function(){return g},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"})),y=new l(18,[],(function(){return"COMMIT"})),g=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,y=n.afterComplete,g=n.server,m=n.highRecordWatermark,b=void 0===m?Number.MAX_VALUE:m,_=n.lowRecordWatermark,x=void 0===_?Number.MAX_VALUE:_,O=n.enrichMetadata,E=e.call(this)||this;return E._fieldKeys=null,E._fieldLookup=null,E._head=null,E._queuedRecords=[],E._tail=null,E._error=null,E._observers=[],E._meta={},E._server=g,E._beforeError=f,E._afterError=h,E._beforeKeys=d,E._afterKeys=p,E._beforeComplete=v,E._afterComplete=y,E._enrichMetadata=O||u.functional.identity,E._queryId=null,E._moreFunction=i,E._discardFunction=a,E._discard=!1,E._fetchSize=c,E._lowRecordWatermark=x,E._highRecordWatermark=b,E._setState(o?w.READY:w.READY_STREAMING),E._setupAutoPull(),E._paused=!1,E._pulled=!o,E._haveRecordStreamed=!1,E}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=g},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(),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 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)),y=n(7452),g=d(n(4132)),m=d(n(8987)),b=n(4455),_=n(7721),w=n(6781),x=p.error.SERVICE_UNAVAILABLE,O=p.error.SESSION_EXPIRED,E=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,j="Neo.ClientError.Database.DatabaseNotFound",M="Neo.ClientError.Transaction.InvalidBookmark",R="Neo.ClientError.Transaction.InvalidBookmarkMixture",N="Neo.ClientError.Security.AuthorizationExpired",D="Neo.ClientError.Statement.ArgumentError",L="Neo.ClientError.Request.Invalid",F="Neo.ClientError.Statement.TypeError",B="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,g=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 y.HostNameResolver,x._log=u,x._useSeedRouter=!0,x._routingTableRegistry=new G(g?(0,p.int)(g):z),x._refreshRoutingTable=w.functional.reuseOngoingRequest(x._refreshRoutingTable,x),x}return o(t,e),t.prototype._createConnectionErrorHandler=function(){return new _.ConnectionErrorHandler(O)},t.prototype._handleUnavailability=function(e,t,n){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,n||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,O,e)},t.prototype.acquireConnection=function(e){var t=void 0===e?{}:e,n=t.accessMode,r=t.database,o=t.bookmarks,i=t.impersonatedUser,a=t.onDatabaseNameResolved,s=t.auth;return 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(O,(function(e,t){return v._handleUnavailability(e,t,u.database)}),(function(e,t){return v._handleWriteFailure(e,t,u.database)}),(function(e,t,n){return v._handleSecurityError(e,t,n,u.database)})),[4,this._freshRoutingTable({accessMode:n,database:u.database,bookmarks:o,impersonatedUser:i,auth:s,onDatabaseNameResolved:function(e){u.database=u.database||e,a&&a(e)}})];case 1:if(f=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),O);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,y,g;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],y=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 g=c.sent(),[2,this._handleRediscoveryError(g,u)];case 6:return v.close(),[7];case 7:return[3,9];case 8:return[2,[null,y]];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:O,handleSecurityError:function(e,t,n){return l._handleSecurityError(e,t,n)}}),a=o._sticky?new _.DelegateConnection(o):new _.DelegateConnection(o,i),s=new g.default(a),o.protocol().version<4?[2,[new p.Session({mode:P,bookmarks:E.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[j,M,R,D,L,F,B].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 G=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 y(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 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(!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 y=v.isRetriable;t.isRetriableError=y},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=y(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=y(i,(function(){return e.toString()})),this.startNodeElementId=y(a,(function(){return t.toString()})),this.endNodeElementId=y(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=y(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 y(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 y=a(n(9512));t.Result=y.default;var g=a(n(8917));t.EagerResult=g.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 O=a(n(5481));t.Session=O.default;var E=i(n(7264)),S=E;t.Driver=E.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 j=a(n(1573));t.resultTransformers=j.default;var M=n(8264);Object.defineProperty(t,"clientCertificateProviders",{enumerable:!0,get:function(){return M.clientCertificateProviders}}),Object.defineProperty(t,"resolveCertificateProvider",{enumerable:!0,get:function(){return M.resolveCertificateProvider}});var R=i(n(6995));t.internal=R;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:R,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:y.default,EagerResult:g.default,Transaction:_.default,ManagedTransaction:w.default,TransactionPromise:x.default,Session:O.default,Driver:E.default,Connection:b.default,Releasable:m.Releasable,types:k,driver:S,json:I,auth:T.default,bookmarkManager:P.bookmarkManager,routing:A.routing,resultTransformers:j.default,notificationCategory:p.notificationCategory,notificationClassification:p.notificationClassification,notificationSeverityLevel:p.notificationSeverityLevel,notificationFilterDisabledCategory:v.notificationFilterDisabledCategory,notificationFilterDisabledClassification:v.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:v.notificationFilterMinimumSeverityLevel,clientCertificateProviders:M.clientCertificateProviders,resolveCertificateProvider:M.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 y=i(n(7509));t.serverAddress=y;var g=i(n(9470));t.resolver=g;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,y.label=2;case 2:return y.trys.push([2,4,,6]),[4,this._validateOnAcquire(e,u)];case 3:return l=y.sent(),[3,6];case 4:return h=y.sent(),f(i,this._activeResourceCounts),a.removeInUse(u),[4,this._destroy(u)];case 5:throw y.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:y.sent(),y.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,y.label=11;case 11:return y.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:y.sent(),y.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=y.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=g(e),s=g(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=g(e,2),i=g(t,2),a=g(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=g(e.div(t.SECONDS_PER_HOUR),2),i=g(e.div(t.SECONDS_PER_MINUTE).modulo(t.MINUTES_PER_HOUR),2),s=e.modulo(t.SECONDS_PER_MINUTE),u=s.equals(0)?null:g(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)?g(t,6,{usePositiveSign:!0}):g(t,4)}(e),o=g(t,2),i=g(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 y(e){return(e=(0,a.int)(e)).equals(0)?"":"."+g(e,9)}function g(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),y="".concat(p,":").concat(v),g=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,y,g)},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__",y="__isLocalDateTime__",g="__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 E(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 E(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 E(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 E(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,y,f),t.isLocalDateTime=function(e){return E(e,y)};var O=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 E(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=O,Object.defineProperty(O.prototype,g,f),t.isDateTime=function(e){return E(e,g)}},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==y&&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 y=n(3862);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return y.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return y.animationFrameScheduler}});var g=n(182);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return g.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return g.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 O=n(1342);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return O.noop}});var E=n(6640);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return E.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 j=n(1505);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return j.SequenceError}});var M=n(1554);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return M.TimeoutError}});var R=n(5788);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return R.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 F=n(3865);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return F.concat}});var B=n(7579);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return B.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 G=n(4917);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return G.from}});var W=n(5337);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return W.fromEvent}});var Y=n(347);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return Y.fromEventPattern}});var q=n(7610);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return q.generate}});var H=n(4209);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return H.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 ye=n(8995);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ye.bufferToggle}});var ge=n(8831);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return ge.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 Oe=n(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Oe.concatMap}});var Ee=n(9938);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Ee.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 je=n(8766);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return je.delayWhen}});var Me=n(7441);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Me.dematerialize}});var Re=n(5365);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return Re.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 Fe=n(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Fe.endWith}});var Be=n(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Be.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 Ge=n(7661);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ge.expand}});var We=n(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return We.filter}});var Ye=n(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Ye.finalize}});var qe=n(7714);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return qe.find}});var He=n(9756);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return He.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 yt=n(7220);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var gt=n(6106);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return gt.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 Ot=n(7835);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Ot.retry}});var Et=n(9843);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Et.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 jt=n(3001);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return jt.single}});var Mt=n(3982);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Mt.skip}});var Rt=n(9098);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Rt.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 Ft=n(8960);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Ft.subscribeOn}});var Bt=n(8774);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Bt.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 Gt=n(846);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Gt.take}});var Wt=n(8330);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Wt.takeLast}});var Yt=n(4780);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Yt.takeUntil}});var qt=n(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return qt.takeWhile}});var Ht=n(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Ht.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 g(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 y=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}(),g=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 y(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=g,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 y=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),g=y[0],m=y[1];if(!g&&s.isArrayLike(t))return a.mergeMap((function(t){return e(t,n,p)}))(o.innerFrom(t));if(!g)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),y=n(7315),g=n(3327);function m(e){return new l.Observable((function(t){var n=e[g.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())(g=p.value).push(n),e<=g.length&&(h=null!=h?h:[]).push(g)}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),y=v.next();!y.done;y=v.next()){var g=y.value;a.arrRemove(s,g),o.next(g)}}catch(e){c={error:e}}finally{try{y&&!y.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,y=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 g=(b=a,_=h,(w=new r.Observable((function(e){p++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--p&&v&&y.unsubscribe()}}))).key=b,w);if(l.next(g),n){var m=s.createOperatorSubscriber(h,(function(){h.complete(),null==m||m.unsubscribe()}),void 0,void 0,(function(){return f.delete(a)}));y.add(o.innerFrom(n(g)).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(y)}))}},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()},y=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(y,o,e),m.error(e)},complete:function(){h=!0,v(),r=l(y,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())},y=function(){d=null,p&&r.complete()},g=function(t){return d=i.innerFrom(e(t)).subscribe(o.createOperatorSubscriber(r,v,y))},m=function(){if(f){f=!1;var e=h;h=null,r.next(e),!p&&g(e)}};n.subscribe(o.createOperatorSubscriber(r,(function(e){f=!0,h=e,(!d||d.closed)&&(u?m():g(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,y=n.meta,g=void 0===y?null:y;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:g,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)},y=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 y((function(e){return e.complete()}))}),(function(e){return y((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 y=n(8158);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return y.concatAll}});var g=n(9135);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return g.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 O=n(8079);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return O.debounceTime}});var E=n(378);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return E.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 j=n(1776);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return j.endWith}});var M=n(5510);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return M.every}});var R=n(1551);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return R.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 F=n(783);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return F.filter}});var B=n(3555);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return B.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 G=n(7815);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return G.groupBy}});var W=n(490);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return W.ignoreElements}});var Y=n(9356);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Y.isEmpty}});var q=n(8669);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return q.last}});var H=n(5471);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return H.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 ye=n(5600);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ye.raceWith}});var ge=n(9139);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return ge.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 Oe=n(1731);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Oe.sample}});var Ee=n(6086);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ee.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 je=n(7372);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return je.skipUntil}});var Me=n(4721);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Me.skipWhile}});var Re=n(269);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Re.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 Fe=n(3274);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Fe.switchMapTo}});var Be=n(8712);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Be.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 Ge=n(2129);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ge.takeWhile}});var We=n(3964);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return We.tap}});var Ye=n(8941);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Ye.throttle}});var qe=n(7640);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return qe.throttleTime}});var He=n(4869);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return He.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}},8716:t=>{t.exports=e}},nh={};function rh(e){var t=nh[e];if(void 0!==t)return t.exports;var n=nh[e]={id:e,loaded:!1,exports:{}};return th[e].call(n.exports,n,n.exports,rh),n.loaded=!0,n.exports}rh.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return rh.d(t,{a:t}),t},rh.d=(e,t)=>{for(var n in t)rh.o(t,n)&&!rh.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},rh.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),rh.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),rh.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var oh={};(()=>{rh.d(oh,{RL:()=>To,wK:()=>qi,x_:()=>Ki,lv:()=>Xi,YQ:()=>Hi,BP:()=>rf,GZ:()=>ff,Vw:()=>Zi,Ay:()=>hf,_G:()=>gs,h4:()=>yc});var e=rh(5250);function t(e){return t="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},t(e)}function n(e){var n=function(e){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:String(n)}var r=["onLayoutDone","onLayoutStep","onError","onLayoutComputing","onWebGLContextLost","onZoomTransitionDone","restart"],o=function(){function e(){var t,r,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,(r=n(r="callbacks"))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,this.callbacks=i}var t,r;return t=e,r=[{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}}],r&&function(e,t){for(var r=0;r0}function f(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),rt((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function h(e,t){var n=Qt();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o0}function p(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),rt((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function v(e,t){var n=Qt(),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>C&&N(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;Xt(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=[]),c(this)){var i=h(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return Ze;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=d(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&m(i),this.atom.reportChanged(),o&&v(this,i),r&&_()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&y(),o=d(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&m(i),this.atom.reportChanged(),o&&v(this,i),r&&_()},e}(),I=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+Qe()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new k(r,n,i,o);return dt(i,"$mobx",a),t&&t.length&&i.spliceWithArray(0,0,t),P&&Object.defineProperty(a.array,"0",j),i}return a(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 W(e,t,this,arguments)};return n.originalFn=t,n.isMobxAction=!0,n}function W(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";ht(e,t,ee(i,n))}),(function(e){return this[e]}),(function(){et(!1,V("m001"))}),!1,!0),J=X((function(e,t,n){re(e,t,n)}),(function(e){return this[e]}),(function(){et(!1,V("m001"))}),!1,!1),ee=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?G(e.name||"",e):2===arguments.length&&"function"==typeof t?G(e,t):1===arguments.length&&"string"==typeof e?te(e):te(t).apply(null,arguments)};function te(e){return function(t,n,r){if(r&&"function"==typeof r.value)return r.value=G(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 Q(e).apply(this,arguments)}}function ne(e){return"function"==typeof e&&!0===e.isMobxAction}function re(e,t,n){var r=function(){return W(t,n,e,arguments)};r.isMobxAction=!0,ht(e,t,r)}ee.bound=function(e,t,n){if("function"==typeof e){var r=G("",e);return r.autoBind=!0,r}return J.apply(null,arguments)};var oe=Object.prototype.toString;function ie(e,t){return ae(e,t)}function ae(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=se(e),t=se(t);var o=oe.call(e);if(o!==oe.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(!ae(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(!ue(t,l=c[u])||!ae(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,n,r)}function se(e){return L(e)?e.peek():Ke(e)?e.entries():gt(e)?function(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}(e.entries()):e}function ue(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function le(e,t){return e===t}var ce={identity:le,structural:function(e,t){return ie(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||le(e,t)}};function fe(e,t,n){var r,o,i;"string"==typeof e?(r=e,o=t,i=n):(r=e.name||"Autorun@"+Qe(),o=e,i=t),et("function"==typeof o,V("m004")),et(!1===ne(o),V("m005")),i&&(o=o.bind(i));var a=new rn(r,(function(){this.track(s)}));function s(){o(a)}return a.schedule(),a.getDisposer()}function he(e,t,n){var r;arguments.length>3&&Je(V("m007")),Be(e)&&Je(V("m008")),(r="object"==typeof n?n:{}).name=r.name||e.name||t.name||"Reaction@"+Qe(),r.fireImmediately=!0===n||!0===r.fireImmediately,r.delay=r.delay||0,r.compareStructural=r.compareStructural||r.struct||!1,t=ee(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?ce.structural:ce.default,u=new rn(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 de=function(){function e(e,t,n,r,o){this.derivation=e,this.scope=t,this.equals=n,this.dependenciesState=_t.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=_t.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Qe(),this.value=new Wt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=wt.NONE,this.name=r||"ComputedValue@"+Qe(),o&&(this.setter=G(r+"-setter",o))}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState===_t.UP_TO_DATE){e.lowestObserverState=_t.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===_t.UP_TO_DATE&&(r.dependenciesState=_t.POSSIBLY_STALE,r.isTracing!==wt.NONE&&Vt(r,e),r.onBecomeStale())}}}(this)},e.prototype.onBecomeUnobserved=function(){Zt(this),this.value=void 0},e.prototype.get=function(){et(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===Et.inBatch?(Bt(),qt(this)&&(this.isTracing!==wt.NONE&&console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context and doing a full recompute"),this.value=this.computeValue(!1)),Ut()):(zt(this),qt(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState!==_t.STALE){e.lowestObserverState=_t.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===_t.POSSIBLY_STALE?r.dependenciesState=_t.STALE:r.dependenciesState===_t.UP_TO_DATE&&(e.lowestObserverState=_t.UP_TO_DATE)}}}(this));var e=this.value;if(Yt(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(Yt(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){et(!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 et(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){y()&&g({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.dependenciesState===_t.NOT_TRACKING,n=this.value=this.computeValue(!0);return t||Yt(e)||Yt(n)||!this.equals(e,n)},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Et.computationDepth++,e)t=Kt(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new Wt(e)}return Et.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return fe((function(){var i=n.get();if(!r||t){var a=Qt();e({type:"update",object:n,newValue:i,oldValue:o}),Jt(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 bt(this.get())},e.prototype.whyRun=function(){var e=Boolean(Et.trackingDerivation),t=it(this.isComputing?this.newObserving:this.observing).map((function(e){return e.name})),n=it(Nt(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===_t.NOT_TRACKING?V("m032"):" * This computation will re-run if any of the following observables changes:\n "+at(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 "+at(n)+"\n")},e}();de.prototype[mt()]=de.prototype.valueOf;var pe=yt("ComputedValue",de),ve=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 et(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),p(this,e)},e.prototype.intercept=function(e){return f(this,e)},e}();function ye(e,t){if(Se(e)&&e.hasOwnProperty("$mobx"))return e.$mobx;et(Object.isExtensible(e),V("m035")),ut(e)||(t=(e.constructor.name||"ObservableObject")+"@"+Qe()),t||(t="ObservableObject@"+Qe());var n=new ve(e,t);return dt(e,"$mobx",n),n}function ge(e,t,n,r){if(e.values[t]&&!pe(e.values[t]))return et("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(Be(n.value)){var o=n.value;me(e,t,o.initialValue,o.enhancer)}else ne(n.value)&&!0===n.value.autoBind?re(e.target,t,n.value.originalFn):pe(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,xe(t))}(e,t,n.value):me(e,t,n.value,r);else be(e,t,n.get,n.set,ce.default,!0)}function me(e,t,n,r){if(vt(e.target,t),c(e)){var o=h(e,{object:e.target,name:t,type:"add",newValue:n});if(!o)return;n=o.newValue}n=(e.values[t]=new B(n,r,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,function(e){return _e[e]||(_e[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Oe(this,e,t)}})}(t)),function(e,t,n,r){var o=d(e),i=y(),a=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&m(a),o&&v(e,a),i&&_()}(e,e.target,t,n)}function be(e,t,n,r,o,i){i&&vt(e.target,t),e.values[t]=new de(n,e.target,o,e.name+"."+t,r),i&&Object.defineProperty(e.target,t,xe(t))}var _e={},we={};function xe(e){return we[e]||(we[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function Oe(e,t,n){var r=e.$mobx,o=r.values[t];if(c(r)){if(!(s=h(r,{type:"update",object:e,name:t,newValue:n})))return;n=s.newValue}if((n=o.prepareNewValue(n))!==F){var i=d(r),a=y(),s=i||a?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;a&&m(s),o.setNewValue(n),i&&v(r,s),a&&_()}}var Ee=yt("ObservableObjectAdministration",ve);function Se(e){return!!st(e)&&(Z(e),Ee(e.$mobx))}function Te(e,t){if(null==e)return!1;if(void 0!==t){if(L(e)||Ke(e))throw new Error(V("m019"));if(Se(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return Se(e)||!!e.$mobx||l(e)||cn(e)||pe(e)}function Pe(e){return et(!!e,":("),X((function(t,n,r,o,i){vt(t,n),et(!i||!i.get,V("m022")),me(ye(t,void 0),n,r,e)}),(function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()}),(function(e,t){Oe(this,e,t)}),!0,!1)}function Ce(e){for(var t=[],n=1;n=2,V("m014")),et("object"==typeof e,V("m015")),et(!Ke(e),V("m016")),n.forEach((function(e){et("object"==typeof e,V("m017")),et(!Te(e),V("m018"))}));for(var r=ye(e),o={},i=n.length-1;i>=0;i--){var a=n[i];for(var s in a)if(!0!==o[s]&&ft(a,s)){if(o[s]=!0,e===a&&!pt(e,s))continue;ge(r,s,Object.getOwnPropertyDescriptor(a,s),t)}}return e}var Ie=Pe(ze),je=Pe(Ve),Me=Pe(Ge),Re=Pe(We),Ne=Pe(Ye),De={box:function(e,t){return arguments.length>2&&Fe("box"),new B(e,ze,t)},shallowBox:function(e,t){return arguments.length>2&&Fe("shallowBox"),new B(e,Ge,t)},array:function(e,t){return arguments.length>2&&Fe("array"),new I(e,ze,t)},shallowArray:function(e,t){return arguments.length>2&&Fe("shallowArray"),new I(e,Ge,t)},map:function(e,t){return arguments.length>2&&Fe("map"),new Xe(e,ze,t)},shallowMap:function(e,t){return arguments.length>2&&Fe("shallowMap"),new Xe(e,Ge,t)},object:function(e,t){arguments.length>2&&Fe("object");var n={};return ye(n,t),Ce(n,e),n},shallowObject:function(e,t){arguments.length>2&&Fe("shallowObject");var n={};return ye(n,t),Ae(n,e),n},ref:function(){return arguments.length<2?Ue(Ge,arguments[0]):Me.apply(null,arguments)},shallow:function(){return arguments.length<2?Ue(Ve,arguments[0]):je.apply(null,arguments)},deep:function(){return arguments.length<2?Ue(ze,arguments[0]):Ie.apply(null,arguments)},struct:function(){return arguments.length<2?Ue(We,arguments[0]):Re.apply(null,arguments)}},Le=function(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Ie.apply(null,arguments);if(et(arguments.length<=1,V("m021")),et(!Be(e),V("m020")),Te(e))return e;var t=ze(e,0,void 0);return t!==e?t:Le.box(e)};function Fe(e){Je("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function Be(e){return"object"==typeof e&&null!==e&&!0===e.isMobxModifierDescriptor}function Ue(e,t){return et(!Be(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function ze(e,t,n){return Be(e)&&Je("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),Te(e)?e:Array.isArray(e)?Le.array(e,n):ut(e)?Le.object(e,n):gt(e)?Le.map(e,n):e}function Ve(e,t,n){return Be(e)&&Je("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),null==e||Se(e)||L(e)||Ke(e)?e:Array.isArray(e)?Le.shallowArray(e,n):ut(e)?Le.shallowObject(e,n):gt(e)?Le.shallowMap(e,n):Je("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function Ge(e){return e}function We(e,t,n){if(ie(e,t))return t;if(Te(e))return e;if(Array.isArray(e))return new I(e,We,n);if(gt(e))return new Xe(e,We,n);if(ut(e)){var r={};return ye(r,n),ke(r,We,[e]),r}return e}function Ye(e,t,n){return ie(e,t)?t:e}function qe(e,t){void 0===t&&(t=void 0),Bt();try{return e.apply(t)}finally{Ut()}}Object.keys(De).forEach((function(e){return Le[e]=De[e]})),Le.deep.struct=Le.struct,Le.ref.struct=function(){return arguments.length<2?Ue(Ye,arguments[0]):Ne.apply(null,arguments)};var He={},Xe=function(){function e(e,t,n){void 0===t&&(t=ze),void 0===n&&(n="ObservableMap@"+Qe()),this.enhancer=t,this.name=n,this.$mobx=He,this._data=Object.create(null),this._hasMap=Object.create(null),this._keys=new I(void 0,Ge,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(c(this)){var r=h(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,c(this)&&!(o=h(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=y(),r=d(this),o=r||n?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return n&&m(o),qe((function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0})),r&&v(this,o),n&&_(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new B(t,Ge,this.name+"."+e+"?",!1),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if((t=n.prepareNewValue(t))!==F){var r=y(),o=d(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&m(i),n.setNewValue(t),o&&v(this,i),r&&_()}},e.prototype._addValue=function(e,t){var n=this;qe((function(){var r=n._data[e]=new B(t,n.enhancer,n.name+"."+e,!1);t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)}));var r=y(),o=d(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&m(i),o&&v(this,i),r&&_()},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 Ke(e)&&(e=e.toJS()),qe((function(){ut(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)})):gt(e)?e.forEach((function(e,n){return t.set(n,e)})):null!=e&&Je("Cannot initialize map from "+e)})),this},e.prototype.clear=function(){var e=this;qe((function(){$t((function(){e.keys().forEach(e.delete,e)}))}))},e.prototype.replace=function(e){var t=this;return qe((function(){var n,r=ut(n=e)?Object.keys(n):Array.isArray(n)?n.map((function(e){return e[0]})):gt(n)?Array.from(n.keys()):Ke(n)?n.keys():Je("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 et(!0!==t,V("m033")),p(this,e)},e.prototype.intercept=function(e){return f(this,e)},e}();E(Xe.prototype,(function(){return this.entries()}));var Ke=yt("ObservableMap",Xe),Ze=[];function $e(){return"undefined"!=typeof window?window:rh.g}function Qe(){return++Et.mobxGuid}function Je(e,t){throw et(!1,e,t),"X"}function et(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}Object.freeze(Ze);var tt=[];function nt(e){return-1===tt.indexOf(e)&&(tt.push(e),console.error("[mobx] Deprecated: "+e),!0)}function rt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var ot=function(){};function it(e){var t=[];return e.forEach((function(e){-1===t.indexOf(e)&&t.push(e)})),t}function at(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 st(e){return null!==e&&"object"==typeof e}function ut(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function lt(){for(var e=arguments[0],t=1,n=arguments.length;t0&&(t.dependencies=it(e.observing).map(Mt)),t}function Rt(e){var t={name:e.name};return function(e){return e.observers&&e.observers.length>0}(e)&&(t.observers=Nt(e).map(Rt)),t}function Nt(e){return e.observers}function Dt(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 Lt(e,t){if(1===e.observers.length)e.observers.length=0,Ft(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 Ft(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Et.pendingUnobservations.push(e))}function Bt(){Et.inBatch++}function Ut(){if(0==--Et.inBatch){un();for(var e=Et.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 Gt(e,t,n+1)})))}Ct.__mobxInstanceCount?(Ct.__mobxInstanceCount++,setTimeout((function(){St||Tt||Pt||(Pt=!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)):Ct.__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"}(_t||(_t={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(wt||(wt={}));var Wt=function(e){this.cause=e};function Yt(e){return e instanceof Wt}function qt(e){switch(e.dependenciesState){case _t.UP_TO_DATE:return!1;case _t.NOT_TRACKING:case _t.STALE:return!0;case _t.POSSIBLY_STALE:for(var t=Qt(),n=e.observing,r=n.length,o=0;o0;Et.computationDepth>0&&t&&Je(V("m031")+e.name),!Et.allowStateChanges&&t&&Je(V(Et.strictMode?"m030a":"m030b")+e.name)}function Kt(e,t,n){en(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Et.runId;var r,o=Et.trackingDerivation;Et.trackingDerivation=e;try{r=t.call(n)}catch(e){r=new Wt(e)}return Et.trackingDerivation=o,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=_t.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&&Lt(s,e),s.diffValue=0;for(;o--;){var s;1===(s=n[o]).diffValue&&(s.diffValue=0,Dt(s,e))}r!==_t.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),r}function Zt(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Lt(t[n],e);e.dependenciesState=_t.NOT_TRACKING}function $t(e){var t=Qt(),n=e();return Jt(t),n}function Qt(){var e=Et.trackingDerivation;return Et.trackingDerivation=null,e}function Jt(e){Et.trackingDerivation=e}function en(e){if(e.dependenciesState!==_t.UP_TO_DATE){e.dependenciesState=_t.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=_t.UP_TO_DATE}}function tn(e){return console.log(e),e}function nn(e){switch(e.length){case 0:return Et.trackingDerivation;case 1:return At(e[0]);case 2:return At(e[0],e[1])}}var rn=function(){function e(e,t){void 0===e&&(e="Reaction@"+Qe()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=_t.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+Qe(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=wt.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Et.pendingReactions.push(this),un())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(Bt(),this._isScheduled=!1,qt(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&y()&&g({object:this,type:"scheduled-reaction"})),Ut())},e.prototype.track=function(e){Bt();var t,n=y();n&&(t=Date.now(),m({object:this,type:"reaction",fn:e})),this._isRunning=!0;var r=Kt(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Zt(this),Yt(r)&&this.reportExceptionInDerivation(r.cause),n&&_({time:Date.now()-t}),Ut()},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),y()&&g({type:"error",message:n,error:e,object:this}),Et.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Bt(),Zt(this),Ut()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=on,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=it(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 "+at(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||Et.isRunningReactions||sn(ln)}function ln(){Et.isRunningReactions=!0;for(var e=Et.pendingReactions,t=0;e.length>0;){++t===an&&(console.error("Reaction doesn't converge to a stable state after "+an+" 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&&Et.globalReactionErrorHandlers.splice(t,1)}},reserveArrayBuffer:N,resetGlobalState:function(){Et.resetId++;var e=new Ot;for(var t in e)-1===xt.indexOf(t)&&(Et[t]=e[t]);Et.allowStateChanges=!Et.strictMode},isolateGlobalState:function(){Tt=!0,$e().__mobxInstanceCount--},shareGlobalState:function(){nt("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),St=!0;var e=$e(),t=Et;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?Et=e.__mobxGlobal:e.__mobxGlobal=t},spyReport:g,spyReportEnd:_,spyReportStart:m,setReactionScheduler:function(e){var t=sn;sn=function(n){return e((function(){return t(n)}))}}},gn={Reaction:rn,untracked:$t,Atom:u,BaseAtom:s,useStrict:Y,isStrictModeEnabled:function(){return Et.strictMode},spy:w,comparer:ce,asReference:function(e){return nt("asReference is deprecated, use observable.ref instead"),Le.ref(e)},asFlat:function(e){return nt("asFlat is deprecated, use observable.shallow instead"),Le.shallow(e)},asStructure:function(e){return nt("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),Le.struct(e)},asMap:function(e){return nt("asMap is deprecated, use observable.map or observable.shallowMap instead"),Le.map(e||{})},isModifierDescriptor:Be,isObservableObject:Se,isBoxedObservable:U,isObservableArray:L,ObservableMap:Xe,isObservableMap:Ke,map:function(e){return nt("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),Le.map(e)},transaction:qe,observable:Le,computed:pn,isObservable:Te,isComputed:function(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Se(e))return!1;if(!e.$mobx.values[t])return!1;var n=At(e,t);return pe(n)}return pe(e)},extendObservable:Ce,extendShallowObservable:Ae,observe:function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return kt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return kt(e).observe(t,n)}(e,t,n)},intercept:function(e,t,n){return"function"==typeof n?function(e,t,n){return kt(e,t).intercept(n)}(e,t,n):function(e,t){return kt(e).intercept(t)}(e,t)},autorun:fe,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@"+Qe(),i=e,a=t,s=n),et(!1===ne(i),V("m006")),void 0===a&&(a=1),s&&(i=i.bind(s));var u=!1,l=new rn(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@"+Qe(),i=e,a=t,s=n),fe(o,(function(e){if(i.call(s)){e.dispose();var t=Qt();a.call(s),Jt(t)}}))},reaction:he,action:ee,isAction:ne,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 et("function"==typeof o,V("m002")),et(0===o.length,V("m003")),et("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),W(r,o,i,void 0)},expr:function(e,t){return Ht()||console.warn(V("m013")),pn(e,{context:t}).get()},toJS:vn,createTransformer:function(e,t){et("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var n={},r=Et.resetId,o=function(r){function o(t,n){var o=r.call(this,(function(){return e(n)}),void 0,ce.default,"Transformer-"+e.name+"-"+t,void 0)||this;return o.sourceIdentifier=t,o.sourceObject=n,o}return a(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}(de);return function(e){r!==Et.resetId&&(n={},r=Et.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&&ht(e,"$transformId",t=Qe()),t}(e),i=n[t];return i?i.get():(i=n[t]=new o(t,e)).get()}},whyRun:function(e,t){return nt("`whyRun` is deprecated in favor of `trace`"),(e=nn(arguments))?pe(e)||cn(e)?tn(e.whyRun()):Je(V("m025")):tn(V("m024"))},isArrayLike:function(e){return Array.isArray(e)||L(e)},extras:yn},mn=!1,bn=function(e){var t=gn[e];Object.defineProperty(gn,e,{get:function(){return mn||(mn=!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 _n in gn)bn(_n);"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:w,extras:yn});var wn=rh(1803),xn=rh.n(wn),On={value:()=>{}};function En(){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;--In}()}finally{In=0,function(){for(var e,t,n=An,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:An=t);kn=e,Yn(r)}(),Nn=0}}function Wn(){var e=Ln.now(),t=e-Rn;t>1e3&&(Dn-=t,Rn=e)}function Yn(e){In||(jn&&(jn=clearTimeout(jn)),e-Nn>24?(e<1/0&&(jn=setTimeout(Gn,e-Ln.now()-Dn)),Mn&&(Mn=clearInterval(Mn))):(Mn||(Rn=Ln.now(),Mn=setInterval(Wn,1e3)),In=1,Fn(Gn)))}zn.prototype=Vn.prototype={constructor:zn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Bn():+n)+(null==t?0:+t),this._next||kn===this||(kn?kn._next=this:An=this,kn=this),this._call=e,this._time=n,Yn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Yn())}};const qn=4294967296;function Hn(e){return e.x}function Xn(e){return e.y}var Kn=Math.PI*(3-Math.sqrt(5));function Zn(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,y=e._y0,g=e._x1,m=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((l=t>=(i=(v+g)/2))?v=i:g=i,(c=n>=(a=(y+m)/2))?y=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+g)/2))?v=i:g=i,(c=n>=(a=(y+m)/2))?y=a:m=a}while((f=c<<1|l)==(h=(u>=a)<<1|s>=i));return o[h]=d,o[f]=p,e}function $n(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function Qn(e){return e[0]}function Jn(e){return e[1]}function er(e,t,n){var r=new tr(null==t?Qn:t,null==n?Jn:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function tr(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 nr(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var rr=er.prototype=tr.prototype;function or(e){return function(){return e}}function ir(e){return 1e-6*(e()-.5)}function ar(){var e,t,n,r,o,i=or(-30),a=1,s=1/0,u=.81;function l(n){var o,i=e.length,a=er(e,Hn,Xn).visitAfter(f);for(r=n,o=0;o=s)){(e.data!==t||e.next)&&(0===f&&(p+=(f=ir(n))*f),0===h&&(p+=(h=ir(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)=g)<<1|e>=y)&&(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+y)/2))?p=s:y=s,(c=a>=(u=(v+g)/2))?v=u:g=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)},rr.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 br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?void 0:t.bundledRels[0].color,t.bundledRels.forEach((function(e){t.width+=e.width}))):(t.color=1===a.length?a[0].color:void 0,t.disabled=!1,t.bundledRels.forEach((function(e){t.width+=!0!==e.disabled?e.width:0})))}})),Array.from(n.values())},wr=function(){return void 0!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((function(e){return"size"in e}))};function xr(e){return xr="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},xr(e)}var Or=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:dr)+(null!==(n=e.target.size)&&void 0!==n?n:dr)+90*devicePixelRatio};function Er(e){return"object"===xr(e)}var Sr=function(e){var t;return(null!==(t=e.size)&&void 0!==t?t:dr)+25*devicePixelRatio},Tr=function(){return-400*Math.pow(devicePixelRatio,2)},Pr=function(){return 2*Tr()};function Cr(e){return Cr="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},Cr(e)}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n(e=(1664525*e+1013904223)%qn)/qn}();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",ar().strength(Tr)).force("centerX",function(e){var t,n,r,o=or(.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=wr(o);t||r||s?(n.shouldUpdate=!0,n.shouldReheatNodes=!0,n.shouldCountNodeRels=!0):n.shouldReheatNodes=!1}var u=a.channels[jr];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=t,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[jr],s=i.channels[jr],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=Mr(a.removes);Object.keys(p).forEach((function(e){delete t.d3Nodes[e]}));var v=Mr(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(t,n,r){var o=this;if(!(0,e.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,y=c-s.y-s.vy,g=v*v+y*y;ge.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 Ar(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)?Ar(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(jr),this.state.rels.removeChannel(jr),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;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 zr(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=Ur(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,y=null!==(h=this.oldPositions[u.id])&&void 0!==h?h:Br({},i);void 0===y&&void 0!==n[v];)v=n[v],y=this.oldPositions[v];y.x=null!==(d=y.x)&&void 0!==d?d:i.x,y.y=null!==(p=y.y)&&void 0!==p?p:i.y,f.x=Wr(y.x,l.x,this.t),f.y=Wr(y.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);n=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),y}},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),y}},t}function eo(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 to(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(to=function(){return!!e})()}function no(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ro(){return ro="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=oo(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}},ro.apply(this,arguments)}function oo(e){return oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oo(e)}function io(e,t){return io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},io(e,t)}function ao(e,t,n){return(t=so(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function so(e){var t=function(e){if("object"!=qr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qr(t)?t:String(t)}var uo=function(e){return void 0!==e?vn(e):e},lo=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ao(no(n=function(e,t,n){return t=oo(t),function(e,t){if(t&&("object"===qr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return no(e)}(e,to()?Reflect.construct(t,n||[],oo(e).constructor):t.apply(e,n))}(this,t,[e])),"stateDisposers",void 0),ao(no(n),"cytoCompleteCallback",void 0),ao(no(n),"computing",void 0),ao(no(n),"pendingLayoutData",void 0),ao(no(n),"worker",void 0),n.stateDisposers=[],n.stateDisposers.push(n.state.reaction((function(){return n.state.graphUpdates}),(function(){void 0!==n.state.nodes.version&&(n.shouldUpdate=!0),void 0!==n.state.rels.version&&(n.shouldUpdate=!0)}))),n.cytoCompleteCallback=e.cytoCompleteCallback,n.shouldUpdate=!0,n.computing=!1,n.setOptions(),n.setupWorker().then((function(e){n.worker=e,n.worker.port.start(),n.pendingLayoutData=null})).catch((function(e){Dr.error("Error setting up worker:",e)})),n}var n,r,o,i;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&&io(e,t)}(t,e),n=t,r=[{key:"setupWorker",value:(o=Jr().mark((function e(){var t,n,r,o,i;return Jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(rh.bind(rh,8716));case 3:n=e.sent,r=n.createCoseBilkentLayoutWorker,t=r(),e.next=16;break;case 8:return e.prev=8,e.t0=e.catch(0),Dr.info("Failed to initialise shared worker: ",e.t0," Falling back to syncronous code."),e.next=13,Promise.resolve().then(rh.bind(rh,8716));case 13:o=e.sent,i=o.coseBilkentLayoutFallbackWorker,t=i;case 16:return e.abrupt("return",new Promise((function(e,n){t||n("Cose-bilkent layout code could not be initialized"),e(t)})));case 17:case"end":return e.stop()}}),e,null,[[0,8]])})),i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){eo(i,n,r,a,s,"next",e)}function s(e){eo(i,n,r,a,s,"throw",e)}a(void 0)}))},function(){return i.apply(this,arguments)})},{key:"setOptions",value:function(){this.shouldUpdate=!0}},{key:"update",value:function(){var e=arguments.length>0&&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=uo(n),i=uo(r);(o.length>0||i.length>0)&&(this.updatePositionsFromState(),this.layout(o,i))}ro(oo(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(Zr(r),Zr(o)),spacingFactor:e.reduce((function(e,t){var n;return e+(null!==(n=t.size)&&void 0!==n?n:dr)}),0)/e.length*4.5/50*yr()};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,t),go(this,"shaderProgram",void 0),go(this,"gl",void 0),go(this,"curTexture",void 0),go(this,"attributeInfo",void 0),go(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=vo()(o,i);n.shaderSource(a,s),n.compileShader(a),(0,e.isNil)(n.getShaderParameter(a,n.COMPILE_STATUS))&&Dr.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=vo()(r,i);if(n.shaderSource(u,l),n.compileShader(u),(0,e.isNil)(n.getShaderParameter(u,n.COMPILE_STATUS))&&Dr.info(n.getShaderInfoLog(u)),this.shaderProgram=n.createProgram(),n.attachShader(this.shaderProgram,a),n.attachShader(this.shaderProgram,u),n.linkProgram(this.shaderProgram),(0,e.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=t,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:g}}}],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 Ro(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=wr(o);(t||r||i)&&(n.shouldUpdate=!0,n.checkForUpdates())}var a=l.channels[Lo];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?.1:null!=r?r:100;this.simulationStopVelocitySquared=s*s,this.gravity=null!=o?o:100,this.force=0}}},{key:"setData",value:function(e){var t=Uo(e.nodes),n=t.nodeIdToIndex,r=t.nodeIndexToId;return this.nodeIdToIndex=n,this.nodeIndexToId=r,this.numNodes=e.nodes.length,this.solarMerger=new ko(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,fr,fr,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,Bo,Bo),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,fr,fr),t.drawArrays(t.TRIANGLE_STRIP,0,4),this.useReadpixelWorkaround?this.doReadpixelWorkaround():(t.bindFramebuffer(t.FRAMEBUFFER,this.getPhysData(0).frameBuffer),t.readPixels(0,0,fr,fr,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(){Dr.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=Mo(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=Mo(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=Mo(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){Fo[0]=i.x,Fo[1]=i.y,Fo[2]=0,Fo[3]=0;var s=a%fr,u=(a-s)/fr;t.texSubImage2D(t.TEXTURE_2D,0,s,u,1,1,t.RGBA,t.FLOAT,Fo),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,fr,fr,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=Uo(e.nodes).nodeIdToIndex,o=new ko(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,fr,fr,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(Lo),this.state.rels.removeChannel(Lo)}},{key:"dumpTexture",value:function(e,t,n){var r=this.gl;Dr.info("--- Dumping texture ",n),r.bindFramebuffer(r.FRAMEBUFFER,e),r.readPixels(0,0,fr,fr,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[Lo].adds).length>0,a=Object.values(r.channels[Lo].adds).length>0,s=Object.values(n.channels[Lo].removes).length>0,u=Object.values(r.channels[Lo].removes).length>0,l=Object.values(n.channels[Lo].updates);(i||a||s||u)&&this.addRemoveData(o,{adds:n.channels[Lo].adds,removes:n.channels[Lo].removes}),e?(this.updateNodes(o.nodes),this.reheat(o)):l.length>0&&(this.updateNodes(l),wr(l)&&this.reheat(o)),n.clearChannel(Lo),r.clearChannel(Lo)}},{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 To(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");var n=e.getParameter(e.MAX_TEXTURE_SIZE),r=Math.max(fr,hr);n0&&i.forEach((function(e){return Dr.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=Io({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=Io({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,fr),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 bo(e,Po,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,Bo)}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,Bo),f=e.newFramebuffer(t,c);e.levelsData[u]={texture:c,frameBuffer:f},e.levelsClusterTexture[u]=e.newTexture(t,n,Bo),e.levelsFinestIndexTexture[u]=e.newTexture(t,r,fr,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 clusterRadius = (clusterSize * 0.5) + u_baseLength;\n float clusterArea = PI * clusterRadius * clusterRadius;\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 = (clusterArea * fScale) / (dist * dist);\n\n if (u_isTopLevel == 1.0) {\n repulsionForceScale = 0.3;\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 bo(t,Po,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,fr,fr,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,fr,fr,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 bo(e,Po,"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 bo(e,Po,"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,fr,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,fr,fr),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,fr,fr,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[Ho],i=r.channels[Ho],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(Ho),r.clearChannel(Ho),this.currentLayoutType===Xo&&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(Go(h),Go(u))),p=r.items.map((function(e){return e.id})),v=new Set([].concat(Go(p),Go(l)));if(d.size<=100&&v.size<=300){var y=function(e,t,n,r){var o,i=new Set(e),a=mr(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=mr(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=mr(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=mr(s);try{for(l.s();!(u=l.n()).done;){var c=u.value;y[c.id]||(y[c.id]=c)}}catch(e){l.e(e)}finally{l.f()}}}}}catch(e){i.e(e)}finally{i.f()}}}},m=mr(i);try{for(m.s();!(f=m.n()).done;)g(f.value)}catch(e){m.e(e)}finally{m.f()}return{connectedNodes:v,connectedRels:y}}(c,f,n,r),g=y.connectedNodes,m=y.connectedRels,b=Object.values(g),_=Object.values(m),w=b.length,x=_.length;w===c.size&&x===f.size&&(f.size>0||c.size>0)?(this.setLayout(Ko),this.coseBilkentLayout.update(!0,n.items,r.items)):x>0&&f.size/x>.25&&(this.setLayout(Ko),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(Xo),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 ti(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[oi].adds).length>0,i=Object.values(r.channels[oi].adds).length>0,a=Object.values(n.channels[oi].removes).length>0,s=Object.values(r.channels[oi].removes).length>0;(o||i||a||s)&&this.layout(n.items,n.idToItem,n.idToPosition),n.clearChannel(oi),r.clearChannel(oi)}this.shouldUpdate=!1}},{key:"layout",value:function(t,n,r){var o,i=void 0!==(o=t)?vn(o):o;if(!(0,e.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 ci(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[hi].adds).length>0,i=Object.values(r.channels[hi].adds).length>0,a=Object.values(n.channels[hi].removes).length>0,s=Object.values(r.channels[hi].removes).length>0;(o||i||a||s)&&(this.layout(n.items,n.idToItem,n.idToPosition,r.items),n.idToPosition=this.positions),n.clearChannel(hi),r.clearChannel(hi)}this.shouldUpdate=!1}},{key:"layout",value:function(t,n,r,o){var i,a=(i=t)?vn(i):i;if(!(0,e.isEmpty)(a)){for(var s=a.length,u=Math.ceil(Math.sqrt(s)),l=new Array(s),c=0,f=0;f0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,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}},wi=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))},xi=function(e,t,n,r){return Math.max(Math.min(t,n),Math.min(e,r))},Oi=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),xi(o,i,Math.min(t,a),n)):xi(o,i,t,n)};function Ei(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 Si(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)?Si(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 Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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 fa(){fa=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 g?t:g,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",y={};function g(){}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 O=b.prototype=g.prototype=Object.create(_);function E(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"==la(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===y)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===y)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")),y;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;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,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}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),y}},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),y}},t}function ha(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 da(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(da=function(){return!!e})()}function pa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function va(){return va="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=ya(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}},va.apply(this,arguments)}function ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ya(e)}function ga(e,t){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ga(e,t)}function ma(e,t,n){return(t=ba(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ba(e){var t=function(e){if("object"!=la(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=la(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==la(t)?t:String(t)}var _a="HierarchicalLayout",wa=function(e){return void 0!==e?vn(e):e},xa=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),ma(pa(n=function(e,t,n){return t=ya(t),function(e,t){if(t&&("object"===la(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pa(e)}(e,da()?Reflect.construct(t,n||[],ya(e).constructor):t.apply(e,n))}(this,t,[e])),"direction",void 0),ma(pa(n),"packing",void 0),ma(pa(n),"stateDisposers",void 0),ma(pa(n),"oldComputing",void 0),ma(pa(n),"computing",void 0),ma(pa(n),"pendingLayoutData",void 0),ma(pa(n),"worker",void 0),ma(pa(n),"directionChanged",void 0),ma(pa(n),"packingChanged",void 0),n.direction=na,n.packing=oa;var r=n.state,o=r.nodes,i=r.rels;return o.addChannel(_a),i.addChannel(_a),n.stateDisposers=[n.state.reaction((function(){return n.state.graphUpdates}),(function(){if(void 0!==o.version){var e=o.channels[_a],t=Object.values(e.adds).length>0,r=Object.values(e.removes).length>0,a=Object.values(e.updates),s=wr(a);n.shouldUpdate=n.shouldUpdate||t||r||s}if(void 0!==i.version){var u=i.channels[_a],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.setOptions(e),n.setupWorker().then((function(e){n.worker=e,n.worker.port.start(),n.pendingLayoutData=null,n.layout(o.items,o.idToItem,o.idToPosition,i.items)})).catch((function(e){Dr.error("Error setting up worker:",e)})),n}var n,r,o,i;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&&ga(e,t)}(t,e),n=t,r=[{key:"setupWorker",value:(o=fa().mark((function e(){var t,n,r,o,i;return fa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(rh.bind(rh,8716));case 3:n=e.sent,r=n.createHierarchicalLayoutWorker,t=r(),e.next=16;break;case 8:return e.prev=8,e.t0=e.catch(0),Dr.info("Failed to initialise shared worker: ",e.t0," Falling back to syncronous code."),e.next=13,Promise.resolve().then(rh.bind(rh,8716));case 13:o=e.sent,i=o.hierarchicalLayoutFallbackWorker,t=i;case 16:return e.abrupt("return",new Promise((function(e,n){t||n("Hierarchical layout code could not be initialised"),e(t)})));case 17:case"end":return e.stop()}}),e,null,[[0,8]])})),i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){ha(i,n,r,a,s,"next",e)}function s(e){ha(i,n,r,a,s,"throw",e)}a(void 0)}))},function(){return i.apply(this,arguments)})},{key:"setOptions",value:function(e){if(void 0!==e&&function(e){return Object.keys(e).every((function(e){return Yi.has(e)}))}(e)){var t=e.direction,n=void 0===t?na:t,r=e.packing,o=void 0===r?oa:r;Object.keys(ra).includes(n)&&(this.directionChanged=this.direction&&this.direction!==n,this.direction=n),ia.includes(o)&&(this.packingChanged=this.packing&&this.packing!==o,this.packing=o),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[_a].adds).length>0,u=Object.values(o.channels[_a].adds).length>0,l=Object.values(r.channels[_a].removes).length>0,c=Object.values(o.channels[_a].removes).length>0,f=Object.values(r.channels[_a].updates),h=wr(f);(e||s||u||l||c||i||a||h)&&this.layout(r.items,r.idToItem,r.idToPosition,o.items),r.clearChannel(_a),o.clearChannel(_a),this.directionChanged=!1,this.packingChanged=!1}va(ya(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=wa(e).map((function(e){return e.html,ca(e,aa)})),a=wa(t),s={};Object.keys(a).forEach((function(e){var t=a[e],n=(t.html,ca(t,sa));s[e]=n}));var u=wa(r).map((function(e){return e.captionHtml,ca(e,ua)})),l=wa(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 Dr.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(_a),null===(t=this.state.rels)||void 0===t||t.clearChannel(_a)}},{key:"destroy",value:function(){var e;this.stateDisposers.forEach((function(e){e()})),this.state.nodes.removeChannel(_a),this.state.rels.removeChannel(_a),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 Ta(t,e),i=null!==(r=this.animations.get(t))&&void 0!==r?r:{};return this.animations.set(t,Aa(Aa({},i),{},ka({},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,Na,Na),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=Na,t.height=Na;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,Na,Na)}catch(e){Dr.error("Failed to draw image",n.src,e),o.beginPath(),o.strokeStyle="black",o.rect(0,0,Na,Na),o.moveTo(0,0),o.lineTo(Na,Na),o.moveTo(0,Na),o.lineTo(Na,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 Ba(e)}(t=this.rels.map((function(t){var n=t.rel;return(0,e.isNumber)(n.captionSize)?n.captionSize:1})))||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 Ba(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)?Ba(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.")}());var t}},{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 Ka(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},Ja=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},es=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Za(this,"bundles",void 0),Za(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 Va(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=us(u,l,r))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;e.save(),e.lineWidth=t,e.strokeStyle=n,e.fillStyle=n,e.translate(a.x,a.y),e.rotate(s),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;ie.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(y-=1;n=e[y-1]," \t\n\r\v".includes(n);)y-=1;if(!(y-u>1)){o="",f=!0,c=!1;break}o=e.slice(u,y),d=t(o),f=!0,c=!1}return s[l]={text:o,hasEllipsisChar:f,hasHyphenChar:c},{v:s}}c=!1,f=!1;var g=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},Ds=function(e,t,n,r,o,i,a,s){e.font="bold ".concat(r,"px ").concat(n).replace(/"/g,"");var u=function(t){var n;return null===(n=e.measureText(t))||void 0===n?void 0:n.width},l=2;a===ds[1][1]?l=3:a===ds[2][1]&&(l=4);for(var c=a3&&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+f,t+f,o)},d=1,p=[],v=function(){if(0===(p=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=Is(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,h,d)).length)p=Ns(t,u,h,d,l>d);else if(p.some((function(e){return e.overflowed}))){var e=d;p=p.reduce((function(t,n){var r=l-t.length;if(0===r){var o=t[t.length-1];return o.text.endsWith("…")||(u(o.text)+u("…")>h(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=Ns(n.text,u,h,r);t=t.concat(i)}else t.push({text:n.text,hasEllipsisChar:!1,hasHyphenChar:!1});return t}),[])}else p=p.map((function(e){return ks(ks({},e),{},{hasEllipsisChar:!1,hasHyphenChar:!1})}));d+=1};0===p.length;)v();return Array.from(p)},Ls=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(Cs(e),[ks(ks({},t),{},{value:o,chars:o.split("").map((function(r,o){var i,a;return 0!==n&&e.length?o<2?null:Cs(null!==(i=t.styles)&&void 0!==i?i:[]):Cs(null!==(a=t.styles)&&void 0!==a?a:[])}))})])}return[]}),[]);return{stylesPerChar:e.reduce((function(e,t){return[].concat(Cs(e),Cs(t.chars))}),[]),fullCaption:e.map((function(e){return e.value})).join("")}};function Fs(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 Bs(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)?Bs(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 Bs(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=yr(),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,y=function(e,t,n,r,o,i,a){var s,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=yr(),c=e.size(),f=c>1,h=e.relIsOppositeDirection(i),d=h?n:t,p=h?t:n,v=e.waypointPath,y=null==v?void 0:v.points,g=null==v?void 0:v.from,m=null==v?void 0:v.to,b=as(d,g)&&as(p,m)||as(p,g)&&as(d,m),_=b?y[1]:null,w=b?y[y.length-2]:null,x=Gs(d),O=Gs(p),E=function(e,t){return Math.atan2(e.y-t.y,e.x-t.x)},S=Math.max(Math.PI,Us/(c/2)),T=f?r*S*(a?1:-1)/(null!==(s=d.size)&&void 0!==s?s:dr):0,P=E(b?_:p,d),C=b?E(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)},j=function(e,t){return{x:e.x+(t.x-e.x)/2,y:e.y+(t.y-e.y)/2}},M=function(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))*l},R=k(T,x),N=I(T,O),D=f?k(0,x):null,L=f?I(0,O):null,F=200*l,B=[];if(b){var U=M(R,_)2*(30*l+Math.min(x,O)))if(u){var q=Vs(d,p,x,O,i,e);B.push(new ss(R,q)),B.push(new ss(q,N))}else{var H=r*o,X=30+x,K=Math.sqrt(X*X+H*H),Z=30+O,$=Math.sqrt(Z*Z+H*H),Q=k(0,K),J=I(0,$);B.push(new ss(R,Q)),B.push(new ss(Q,J)),B.push(new ss(J,N))}else if(Y>(x+O)/2){var ee=Vs(d,p,x,O,i,e);B.push(new ss(R,ee)),B.push(new ss(ee,N))}else B.push(new ss(R,N))}return B}(t,n,r,d,p,e,h,s),g=[],m=y[0],b=u(m,h);g.push({x:m.p1.x+b.x,y:m.p1.y+b.y});for(var _=1;_6&&void 0!==arguments[6]&&arguments[6],u=yr(),l=o.selected,c=o.captions,f=void 0===c?[]:c,h=o.caption,d=void 0===h?"":h,p=o.width,v=o.disabled,y=o.captionAlign,g=void 0===y?"top":y,m=o.captionSize,b=void 0===m?1:m,_=f.length>0?null===(a=Ls(f))||void 0===a?void 0:a.fullCaption:d;if(void 0!==_){var w=!0===v?"#DDDDDD":"#848484",x=6*b*u,O=!0===l?"bold":"normal",E=_;e.fillStyle=w,e.font="".concat(O," ").concat(x,"px ").concat('"Open Sans", sans-serif');var S=function(t){return e.measureText(t).width},T=(null!=p?p:1)*(!0===l?1.5:1),P=S(E);if(P>r){var C=Ns(E,S,(function(){return r}),1,!1)[0];E=!0===C.hasEllipsisChar?"".concat(C.text,"..."):E,P=r}e.save(),e.translate(t.x,t.y),s?(e.rotate(n-zs),e.translate(2*x,0),e.rotate(-zs)):e.rotate(n);var A=(1+b)*u,k="bottom"===g?x/2+T+A:-(T+A);e.fillText(E,-P/2,k),e.restore();var I=2*k*Math.sin(n),j=2*k*Math.cos(n),M={position:{x:t.x-I,y:t.y+j},rotation:s?n-Math.PI:n,width:r/u,height:(x+A)/u};i.setLabelInfo(o.id,M)}},Xs=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;i8&&void 0!==arguments[8])||arguments[8];is(n,r)&&(n.id===r.id?function(e,t,n,r,o,i,a){var s=t.overlayIcon,u=t.selected,l=t.width,c=t.hovered,f=t.disabled,h=t.color,d=Qs(t,n,r),p=d.startPoint,v=d.endPoint,y=d.apexPoint,g=d.control1Point,m=d.control2Point,b=a.rings,_=a.shadow,w=yr(),x=b[0].color,O=b[1].color,E=b[0].width*w,S=b[1].width*w,T=40*w,P=(null!=l?l:1)*w,C=P>1?P/2:1,A=9*C,k=2*C,I=7*C,j=!0===u,M=!0===f,R=void 0!==s,N=Math.atan2(v.y-m.y,v.x-m.x),D=j?E*Math.sqrt(1+2*A/I*(2*A/I)):0,L={x:v.x-Math.cos(N)*(.5*A-k+D),y:v.y-Math.sin(N)*(.5*A-k+D)},F={headPosition:{x:v.x+Math.cos(N)*(.5*A-k-D),y:v.y+Math.sin(N)*(.5*A-k-D)},headAngle:N,headHeight:A,headChinHeight:k,headWidth:I};if(e.save(),e.lineCap="round",j&&(Ws(e,_),e.lineWidth=P+S,e.strokeStyle=O,Js(e,p,L,y,g,m),ys(e,S,O,F,!1,!0),Ys(e),e.lineWidth=P+E,e.strokeStyle=x,Js(e,p,L,y,g,m),ys(e,E,x,F,!1,!0)),e.lineWidth=P,!0===c&&!j&&!M){var B=_.color;Ws(e,_),e.strokeStyle=B,e.fillStyle=B,Js(e,p,L,y,g,m),ys(e,P,B,F),Ys(e)}var U=M?qa:null!=h?h:Ga;if(e.fillStyle=U,e.strokeStyle=U,Js(e,p,L,y,g,m),ys(e,P,U,F),i||R){var z,V=r.indexOf(t),G=null!==(z=r.angles[V])&&void 0!==z?z:0,W=y.x-Math.cos(N)*(D/4),Y=y.y-Math.sin(N)*(D/4),q=(G+zs)%Us,H=(G+Us)%Us1?d/2:1),C=9*P,A=2*P,k=7*P,I=Ss(w[w.length-2],w[w.length-1]),j=2*C,M=y?S*Math.sqrt(1+j/k*(j/k)):0,R=2-M,N=Math.floor(w.length/2);w.length>2&&y&&Ir.x,ie=w[N];1&~w.length?(J=w[oe?N:N-1],ee=w[oe?N-1:N],te=(J.x+ee.x)/2,ne=(J.y+ee.y)/2,re=Math.atan2(ee.y-J.y,ee.x-J.x)):(J=w[oe?N+1:N-1],ee=w[oe?N-1:N+1],s?(te=(ie.x+(J.x+ee.x)/2)/2,ne=(ie.y+(J.y+ee.y)/2)/2,re=oe?Math.atan2(n.y-r.y,n.x-r.x):Math.atan2(r.y-n.y,r.x-n.x)):(Ss(ie,J)>Ss(ie,ee)?ee=ie:J=ie,te=(J.x+ee.x)/2,ne=(J.y+ee.y)/2,re=Math.atan2(ee.y-J.y,ee.x-J.x)));var ae=y?Ts(re+zs,Ks(u)):{x:0,y:0},se=Ss(J,ee);if(a){var ue="bottom"===v?1:-1,le={x:te+ae.x*ue,y:ne+ae.y*ue};Hs(e,le,re,se,t,o)}if(m){var ce=l.position,fe=void 0===ce?[0,0]:ce,he=l.url,de=l.size,pe=Zs(void 0===de?1:de),ve=$s(fe,se,pe),ye=ve.widthAlign,ge=ve.heightAlign,me=fe[1]<0?-1:1,be=ae.x*me,_e=ae.y*me,we=pe/2;e.save(),e.translate(te,ne),e.rotate(re);var xe=-we+be+ye,Oe=-we+_e+ge;e.drawImage(i.getImage(he),xe,Oe,pe,pe),e.restore()}}e.restore()}(e,t,n,r,o,i,a,u,s))},tu=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 is(n,r)?n.id===r.id?function(e,t,n){for(var r=Qs(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=Fs(qs(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 nu(e){return nu="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},nu(e)}var ru=/^\s+/,ou=/\s+$/;function iu(e,t){if(t=t||{},(e=e||"")instanceof iu)return e;if(!(this instanceof iu))return new iu(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(ru,"").replace(ou,"").toLowerCase();var t,n=!1;if(xu[e])e=xu[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=Nu.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Nu.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Nu.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Nu.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Nu.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Nu.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Nu.hex8.exec(e))?{r:Pu(t[1]),g:Pu(t[2]),b:Pu(t[3]),a:Iu(t[4]),format:n?"name":"hex8"}:(t=Nu.hex6.exec(e))?{r:Pu(t[1]),g:Pu(t[2]),b:Pu(t[3]),format:n?"name":"hex"}:(t=Nu.hex4.exec(e))?{r:Pu(t[1]+""+t[1]),g:Pu(t[2]+""+t[2]),b:Pu(t[3]+""+t[3]),a:Iu(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=Nu.hex3.exec(e))&&{r:Pu(t[1]+""+t[1]),g:Pu(t[2]+""+t[2]),b:Pu(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==nu(e)&&(Du(e.r)&&Du(e.g)&&Du(e.b)?(t=e.r,n=e.g,r=e.b,o={r:255*Su(t,255),g:255*Su(n,255),b:255*Su(r,255)},l=!0,c="%"===String(e.r).substr(-1)?"prgb":"rgb"):Du(e.h)&&Du(e.s)&&Du(e.v)?(a=Au(e.s),s=Au(e.v),o=function(e,t,n){e=6*Su(e,360),t=Su(t,100),n=Su(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"):Du(e.h)&&Du(e.s)&&Du(e.l)&&(a=Au(e.s),u=Au(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=Su(e,360),t=Su(t,100),n=Su(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=Eu(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 au(e,t,n){e=Su(e,255),t=Su(t,255),n=Su(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(iu(r));return i}function wu(e,t){t=t||6;for(var n=iu(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(iu({h:r,s:o,v:i})),i=(i+s)%1;return a}iu.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=Eu(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=su(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=su(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=au(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=au(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 uu(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=[Cu(Math.round(e).toString(16)),Cu(Math.round(t).toString(16)),Cu(Math.round(n).toString(16)),Cu(ku(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*Su(this._r,255))+"%",g:Math.round(100*Su(this._g,255))+"%",b:Math.round(100*Su(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*Su(this._r,255))+"%, "+Math.round(100*Su(this._g,255))+"%, "+Math.round(100*Su(this._b,255))+"%)":"rgba("+Math.round(100*Su(this._r,255))+"%, "+Math.round(100*Su(this._g,255))+"%, "+Math.round(100*Su(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Ou[uu(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+lu(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=iu(e);n="#"+lu(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 iu(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(du,arguments)},brighten:function(){return this._applyModification(pu,arguments)},darken:function(){return this._applyModification(vu,arguments)},desaturate:function(){return this._applyModification(cu,arguments)},saturate:function(){return this._applyModification(fu,arguments)},greyscale:function(){return this._applyModification(hu,arguments)},spin:function(){return this._applyModification(yu,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(_u,arguments)},complement:function(){return this._applyCombination(gu,arguments)},monochromatic:function(){return this._applyCombination(wu,arguments)},splitcomplement:function(){return this._applyCombination(bu,arguments)},triad:function(){return this._applyCombination(mu,[3])},tetrad:function(){return this._applyCombination(mu,[4])}},iu.fromRatio=function(e,t){if("object"==nu(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:Au(e[r]));e=n}return iu(e,t)},iu.equals=function(e,t){return!(!e||!t)&&iu(e).toRgbString()==iu(t).toRgbString()},iu.random=function(){return iu.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},iu.mix=function(e,t,n){n=0===n?0:n||50;var r=iu(e).toRgb(),o=iu(t).toRgb(),i=n/100;return iu({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})},iu.readability=function(e,t){var n=iu(e),r=iu(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},iu.isReadable=function(e,t,n){var r,o,i,a,s,u=iu.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},iu.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=iu(t[l]));return iu.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,iu.mostReadable(e,["#fff","#000"],n))};var xu=iu.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"},Ou=iu.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(xu);function Eu(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Su(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 Tu(e){return Math.min(1,Math.max(0,e))}function Pu(e){return parseInt(e,16)}function Cu(e){return 1==e.length?"0"+e:""+e}function Au(e){return e<=1&&(e=100*e+"%"),e}function ku(e){return Math.round(255*parseFloat(e)).toString(16)}function Iu(e){return Pu(e)/255}var ju,Mu,Ru,Nu=(Mu="[\\s|\\(]+("+(ju="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+ju+")[,|\\s]+("+ju+")\\s*\\)?",Ru="[\\s|\\(]+("+ju+")[,|\\s]+("+ju+")[,|\\s]+("+ju+")[,|\\s]+("+ju+")\\s*\\)?",{CSS_UNIT:new RegExp(ju),rgb:new RegExp("rgb"+Mu),rgba:new RegExp("rgba"+Ru),hsl:new RegExp("hsl"+Mu),hsla:new RegExp("hsla"+Ru),hsv:new RegExp("hsv"+Mu),hsva:new RegExp("hsva"+Ru),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 Du(e){return!!Nu.CSS_UNIT.exec(e)}var Lu=function(e){return iu.mostReadable(e,["#1A1B1D","#FFFFFF"]).toString()};function Fu(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]:1,a=t.x,s=void 0===a?0:a,u=t.y,l=void 0===u?0:u,c=t.size,f=void 0===c?dr:c,h=t.caption,d=void 0===h?"":h,p=t.captions,v=void 0===p?[]:p,y=t.captionAlign,g=void 0===y?"center":y,m=t.captionSize,b=void 0===m?1:m,_=t.disabled,w=t.activated,x=t.selected,O=t.hovered,E=t.id,S=t.icon,T=t.overlayIcon,P=o.selected,C=yr(),A=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 Fu(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)?Fu(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||dr)*o*yr();return{width:t.getValueForAnimationName(e.id,"ring-".concat(r),a),color:i}}))}(t,r,o),k=A.reduce((function(e,t){return e+t.width}),0),I=P.shadow.width*C,j=P.shadow.opacity,M=P.shadow.color,R=f*C,N=2*R,D=function(e,t){if(!e||!t)return{nodeInfoLevel:0,fontInfoLevel:1.25,iconInfoLevel:1};var n=yr(),r=1600*n*(1200*n),o=Math.pow(e,2)*Math.PI*Math.pow(t,2)/(r/100);return{nodeInfoLevel:_s(o,hs),fontInfoLevel:_s(o,ds),iconInfoLevel:_s(o,ps)}}(R,i),L=D.nodeInfoLevel,F=D.fontInfoLevel,B=D.iconInfoLevel,U=t.color||"#478BFF",z=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:dr)/({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}(F,R,b,Boolean(S)),V=Lu(U),G=R,W=G,Y=Boolean(d.length),q=Boolean(v.length),H=Boolean(S),X=Boolean(T);if(k>0&&(G=R+k),_)U="#EDEDED",V="#DDDDDD";else{if(w){var K=Date.now()%1e3/1e3,Z=K<.7?K/.7:0,$=vs(U,.4-.4*Z);bs(e,s,l,$,R+.88*R*Z)}var Q=x||O?I:0,J=r.getValueForAnimationName(E,"shadowWidth",Q);J>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,vs(r,.5*a)),u.addColorStop(.05,vs(r,.5*a)),u.addColorStop(.5,vs(r,.12*a)),u.addColorStop(.75,vs(r,.03*a)),u.addColorStop(1,vs(r,0)),e.fillStyle=u,ms(e,t,n,s),e.fill()}(e,s,l,M,G,J,j)}if(bs(e,s,l,U,R),k>0&&gs(e,s,l,W,A),H){var ee=L<2||!(Y||q),te=L>0?1:0,ne=ee?1*R:.75*R;ne/=B;var re=ee?.5*ne:ne*(1===B?"center"===g?1.3:"bottom"===g||ee?1.1:0:"center"===g?1.35:"bottom"===g||ee?1.1:0),oe=ne/2;ne=r.getValueForAnimationName(E,"iconSize",ne),oe=r.getValueForAnimationName(E,"iconXPos",oe),re=r.getValueForAnimationName(E,"iconYPos",re),e.save();var ie=!0===_?.1:te;e.globalAlpha=r.getValueForAnimationName(E,"iconOpacity",ie);var ae="#fff"===V,se=n.getImage(S,ae);e.drawImage(se,s-oe,l-re,Math.floor(ne),Math.floor(ne)),e.restore()}if(X){var ue,le,ce,fe,he,de=N*(null!==(ue=T.size)&&void 0!==ue?ue:1),pe=de/2-R*(null!==(le=null===(ce=T.position)||void 0===ce?void 0:ce[1])&&void 0!==le?le:0),ve=de/2-R*(null!==(fe=null===(he=T.position)||void 0===he?void 0:he[0])&&void 0!==fe?fe:0);e.save();var ye=!0===_?.1:1;e.globalAlpha=r.getValueForAnimationName(E,"iconOpacity",ye);var ge=n.getImage(T.url);e.drawImage(ge,s-ve,l-pe,de,de),e.restore()}var me=L<2?0:1,be=r.getValueForAnimationName(E,"textOpacity",me,0),_e=vs(V,be),we='"Open Sans", sans-serif';if(Y&&be>0){var xe=Ds(e,d,we,z,.7*N,H,F,null==t||t.captionAlign);e.fillStyle=_e,e.font="normal ".concat(z,"px ").concat(we);var Oe=1+z,Ee=-(xe.length-2)*Oe/2,Se=d.split("").map((function(e){return[]}));ws(e,xe,Se,Ee,z,we,Oe,s,l)}if(q){var Te=L<2?0:1,Pe=r.getValueForAnimationName(E,"textOpacity",Te,0),Ce=vs(V,Pe),Ae='"Open Sans", sans-serif',ke=Boolean(S);if(Pe>0){var Ie=Ls(v),je=Ie.stylesPerChar,Me=Ie.fullCaption,Re="center"===g?.7*N:2*Math.sqrt(Math.pow(N/2,2)-Math.pow(N/3,2)),Ne=Ds(e,Me,Ae,z,Re,ke,F,null==t||t.captionAlign);e.fillStyle=Ce;var De,Le=z,Fe=-(Ne.length-2)*Le/2;De=g&&"center"!==g?"bottom"===g?Fe+R/Math.PI:Fe-R/Math.PI:Fe,ws(e,Ne,je,De,z,Ae,Le,s,l)}}e.save(),e.restore()};function zu(e){return zu="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},zu(e)}function Vu(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 Gu(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 Yu(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?2.5:i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),qu(this,"arrowBundler",void 0),qu(this,"activeNodes",void 0),qu(this,"canvas",void 0),qu(this,"context",void 0),qu(this,"state",void 0),qu(this,"stateDisposers",void 0),qu(this,"relationshipThreshold",void 0),qu(this,"animationHandler",void 0),qu(this,"imageCache",void 0),qu(this,"needsRun",void 0),qu(this,"nodeVersion",void 0),qu(this,"relVersion",void 0),qu(this,"waypointVersion",void 0),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(Xu),r.rels.addChannel(Xu),this.relationshipThreshold=a,this.nodeVersion=r.nodes.version,this.relVersion=r.rels.version,this.waypointVersion=r.waypoints.counter,this.animationHandler=new ja,this.animationHandler.setOptions({fadeDuration:150,sizeDuration:150}),this.arrowBundler=new es(r.rels.items,r.waypoints.data),this.imageCache=new La,this.needsRun=!0}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[Xu],r=e.rels.channels[Xu],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(Xu)),this.relVersion0||Object.keys(s).length>0,e.rels.clearChannel(Xu),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=yr(),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!==Hi);var y=this.getNodesToRender(e,d,p);this.renderNodes(y,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,y=Wu(h.items);try{for(y.s();!(r=y.n()).done;){var g=r.value,m=s.getBundle(g),b=Gu(Gu({},p[g.from]),v[g.from]),_=Gu(Gu({},p[g.to]),v[g.to]),w=e||f>l||void 0!==g.captionHtml,x=tu(g,m,b,_,w,c!==Hi);if(null!==x){var O,E,S,T,P,C,A=this.isBoundingBoxOffScreen(x,t,n),k=Ss({x:null!==(O=b.x)&&void 0!==O?O:0,y:null!==(E=b.y)&&void 0!==E?E: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:dr)+(null!==(C=_.size)&&void 0!==C?C:dr))*devicePixelRatio,j=b.id!==_.id&&I>k;A||j||(!0===g.disabled?i.push(Gu(Gu({},g),{},{fromNode:b,toNode:_,showLabel:w})):!0===g.selected?o.push(Gu(Gu({},g),{},{fromNode:b,toNode:_,showLabel:w})):a.push(Gu(Gu({},g),{},{fromNode:b,toNode:_,showLabel:w})))}}}catch(e){y.e(e)}finally{y.f()}return[].concat(i,a,o)}},{key:"getNodesToRender",value:function(e,t,n){var r,o=[],i=[],a=[],s=this.state.nodes.idToItem,u=Wu(e);try{for(u.s();!(r=u.n()).done;){var l,c,f=r.value,h=Bu(f);this.isBoundingBoxOffScreen(h,t,n)||(!0===(null===(l=s[f.id])||void 0===l?void 0:l.disabled)?o.push(Gu({},f)):!0===(null===(c=s[f.id])||void 0===c?void 0:c.selected)?i.push(Gu({},f)):a.push(Gu({},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=a.nodes.idToItem,u=a.nodeBorderStyles,l=Wu(e);try{for(l.s();!(r=l.n()).done;){var c=r.value;Uu(t,Gu(Gu({},s[c.id]),c),o,i,u,n)}}catch(e){l.e(e)}finally{l.f()}}},{key:"renderRelationships",value:function(e,t,n){var r,o=this.state.relationshipBorderStyles.selected,i=this.arrowBundler,a=this.imageCache,s=Wu(e);try{for(s.s();!(r=s.n()).done;){var u=r.value,l=i.getBundle(u),c=u.fromNode,f=u.toNode,h=u.showLabel;eu(t,u,c,f,l,a,h,o,n)}}catch(e){s.e(e)}finally{s.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=yr(),u=Wu(i);try{var l=function(){var o=t.value,i=o.id,u=o.size,l=void 0===u?dr: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=Wu(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(!is(n,r))return 1/0;var s=n===r?function(e,t,n,r){var o=Qs(t,n,r),i=o.startPoint,a=o.endPoint,s=o.apexPoint,u=o.control1Point,l=o.control2Point,c=cs(i,s,u,e),f=cs(s,a,l,e);return Math.min(c,f)}(e,t,n,o):function(e,t,n,r,o,i,a){var s=qs(t,n,r,o,i,a),u=1/0;if(a&&3===s.length)u=cs(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(Xu),this.state.rels.removeChannel(Xu)}},{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(t,n){if((0,e.isNil)(t)||(0,e.isNil)(n))return{offsetX:0,offsetY:0};var r=n.getBoundingClientRect(),o=window.devicePixelRatio||1;return{offsetX:o*(t.clientX-r.left-.5*r.width),offsetY:o*(t.clientY-r.top-.5*r.height)}}(t,n);return{x:o+a.offsetX/r,y:i+a.offsetY/r}};function $u(e){return $u="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},$u(e)}function Qu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ju(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[rl].adds).length>0,r=Object.values(t.channels[rl].adds).length>0,o=Object.values(e.channels[rl].removes).length>0,i=Object.values(t.channels[rl].removes).length>0,a=Object.values(e.channels[rl].updates),s=Object.values(t.channels[rl].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(rl),t.clearChannel(rl)}},{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=Zu(e,n.canvas,t.minimapZoom,t.minimapPanX,t.minimapPanY),o=r.x,i=r.y;t.setPan(o,i)}},{key:"handleMinimapWheel",value:function(t){var n=this.state,r=this.mainSceneRenderer;n.setZoom(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,e.isNil)(t)||isNaN(t.deltaY)?n:n-t.deltaY/500*Math.min(1,n)}(t,n.zoom),r.canvas),t.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(rl),this.state.rels.removeChannel(rl),this.mainSceneRenderer.destroy(),this.minimapRenderer.destroy()}}]),t}(),il=function(){function e(){Qu(this,e),tl(this,"mainSceneRenderer",void 0),tl(this,"minimapRenderer",void 0),tl(this,"needsRun",void 0),tl(this,"minimapMouseDown",void 0),tl(this,"stateDisposers",void 0),tl(this,"state",void 0)}return el(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 al(e){return al="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},al(e)}function sl(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 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}}(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 ul(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 ringAlpha = getCircleAlpha(ringSize, nodeSize, dist);\n lowp vec3 finalColor = color.xyz;\n lowp float finalAlpha = nodeAlpha;\n\n if (selected > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(ringSize2, dist);\n lowp float ringAlpha2 = getCircleAlpha(ringSize2, nodeSize, dist);\n\n finalColor = mix(lineColor, finalColor, nodeAlpha);\n finalColor = mix(selectedBorderColor, finalColor, ringAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha2);\n finalAlpha = max(shadowAlpha, max(nodeAlpha, max(ringAlpha, ringAlpha2)));\n } else if (hovered > 0.0) {\n if (drawDefaultBorder > 0.0) {\n lowp float shadowAlpha = getShadowAlpha(ringSize, dist);\n \n finalColor = mix(nodeBorderColor, finalColor, nodeAlpha);\n finalColor = mix(shadowColor, finalColor, ringAlpha);\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 = ringAlpha;\n }\n }\n gl_FragColor = vec4(finalColor, 1.0) * finalAlpha;\n }\n}\n"),this.nodeAnimShader=new bo(e,"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 bo(e,"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 bo(e,"attribute vec2 coordinates;\nuniform mat4 u_projection;\n\nvoid main(void) {\n gl_Position = u_projection * vec4(coordinates, 0.0, 1.0);\n}\n","void main(void) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n}\n"),this.setShaderUniforms(o),e.clearColor(0,0,0,0),e.disable(e.DEPTH_TEST),this.defaultRelColor=4284900966,this.defaultNodeColor=4294937415,this.disableRelColor="#EDEDED",this.disableNodeColor="#EDEDED",e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this.gl=e,this.activeNodes={},this.canvas=e.canvas,this.projection=fo(),this.setData({nodes:n.items,rels:r.items}),this.createPositionTexture(),this.setupViewportRendering()}var n,r;return n=t,r=[{key:"setShaderUniforms",value:function(e){var t,n,r=vi().get.rgb(null===(t=e.nodeBorderStyles.default)||void 0===t||null===(t=t.rings[0])||void 0===t?void 0:t.color),o=vi().get.rgb(null===(n=e.nodeBorderStyles.selected)||void 0===n||null===(n=n.rings[1])||void 0===n?void 0:n.color);if(this.nodeShader.use(),null!=r&&r.length){var i=r.slice(0,3).map((function(e){return e/255}));this.nodeShader.setUniform("u_nodeBorderColor",i),this.nodeShader.setUniform("u_drawDefaultBorder",1)}else this.nodeShader.setUniform("u_drawDefaultBorder",0);var a=o.slice(0,3).map((function(e){return e/255}));this.nodeShader.setUniform("u_selectedBorderColor",a)}},{key:"setData",value:function(e){var t=_r(e.rels);this.setupNodeRendering(e.nodes),this.setupRelationshipRendering(t)}},{key:"render",value:function(e,t,n){var r,o=this.gl,i=this.idToIndex,a=sl(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,fr,fr,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(t){var n,r=this.gl,o=this.idToIndex,i=this.disableNodeColor,a=this.nodeBuffer,s=this.nodeDataByte,u=!1,l=sl(t);try{for(l.s();!(n=l.n()).done;){var c=n.value,f=o[c.id];if(!(0,e.isNil)(c.color)||!0===c.disabled){var h=vi().get.rgb(!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||dr,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 t,n=_r(e),r=this.gl,o=!1,i=sl(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=void 0===l?this.defaultRelColor:dl(!0===c?this.disableRelColor:l);this.relData.positionsAndColors[f*hl+0]=h,this.relData.positionsAndColors[f*hl+4]=h,this.relData.positionsAndColors[f*hl+8]=h,this.relData.positionsAndColors[f*hl+12]=h,this.relData.positionsAndColors[f*hl+16]=h,this.relData.positionsAndColors[f*hl+20]=h,o=!0,void 0!==u&&(this.relData.widths[f*hl+3]=u,this.relData.widths[f*hl+7]=u,this.relData.widths[f*hl+11]=u,this.relData.widths[f*hl+15]=u,this.relData.widths[f*hl+19]=u,this.relData.widths[f*hl+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,fr,fr,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=yr(),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=fo(),c=2.6315789473684212*yr();ho(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(){this.viewportBoxBuffer=this.gl.createBuffer()}},{key:"setupNodeRendering",value:function(t){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=t.length;var a=new ArrayBuffer(3*t.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 Tl(e,t){if(e){if("string"==typeof e)return Pl(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)?Pl(e,t):void 0}}function Pl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);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),y}},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),y}},t}function zl(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 Vl(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($l).pop()},Jl=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),Yl(this,"destroyed",void 0),Yl(this,"state",void 0),Yl(this,"callbacks",void 0),Yl(this,"instanceId",void 0),Yl(this,"glController",void 0),Yl(this,"webGLContext",void 0),Yl(this,"webGLMinimapContext",void 0),Yl(this,"htmlOverlay",void 0),Yl(this,"hasResized",void 0),Yl(this,"hierarchicalLayout",void 0),Yl(this,"gridLayout",void 0),Yl(this,"freeLayout",void 0),Yl(this,"d3ForceLayout",void 0),Yl(this,"forceLayout",void 0),Yl(this,"canvasRenderer",void 0),Yl(this,"glCanvas",void 0),Yl(this,"canvasRect",void 0),Yl(this,"glMinimapCanvas",void 0),Yl(this,"c2dCanvas",void 0),Yl(this,"isInRenderSwitchAnimation",void 0),Yl(this,"justSwitchedRenderer",void 0),Yl(this,"justSwitchedLayout",void 0),Yl(this,"layoutUpdating",void 0),Yl(this,"layoutComputing",void 0),Yl(this,"isRenderingDisabled",void 0),Yl(this,"setRenderSwitchAnimation",void 0),Yl(this,"stateDisposers",void 0),Yl(this,"zoomTransitionHandler",void 0),Yl(this,"currentLayout",void 0),Yl(this,"layoutTimeLimit",void 0),Yl(this,"pixelRatio",void 0),Yl(this,"removeResizeListener",void 0),Yl(this,"removeMinimapResizeListener",void 0),Yl(this,"pendingZoomOperation",void 0),Yl(this,"layoutRunner",void 0),Yl(this,"animationRequestId",void 0),Yl(this,"layoutDoneCallback",void 0),Yl(this,"layoutComputingCallback",void 0),Yl(this,"currentLayoutType",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=t.nodes,v=t.rels,y=t.webGLVisible,g=t.disableWebGL;this.state=t,this.callbacks=new Il,this.instanceId=d;var m=s;m.setAttribute("instanceId",d),m.setAttribute("data-testid","nvl-parent"),null!==(r=m.style.height)&&void 0!==r&&r.length||Object.assign(m.style,{height:"100%"}),null!==(o=m.style.outline)&&void 0!==o&&o.length||Object.assign(m.style,{outline:"none"});var b=bl(m,this.onWebGLContextLost.bind(this)),_=bl(l,this.onWebGLContextLost.bind(this));if(b.setAttribute("data-testid","nvl-gl-canvas"),g)this.glController=new il;else{var w=xl(b),x=xl(_);this.glController=new ol({mainSceneRenderer:new pl(w,p,v,this.state),minimapRenderer:new pl(x,p,v,this.state),state:t}),this.webGLContext=w,this.webGLMinimapContext=x}var O=bl(m,this.onWebGLContextLost.bind(this));O.setAttribute("data-testid","nvl-c2d-canvas");var E=O.getContext("2d"),S=document.createElement("div");Object.assign(S.style,Wl(Wl({},vr),{},{overflow:"hidden"})),m.appendChild(S),this.htmlOverlay=S,this.hasResized=!0,this.hierarchicalLayout=new xa(Wl(Wl({},c),{},{state:this.state})),this.gridLayout=new di({state:this.state}),this.freeLayout=new ii({state:this.state}),this.d3ForceLayout=new Rr({state:this.state}),this.forceLayout=g?this.d3ForceLayout:new Zo(Wl(Wl({},c),{},{webGLContext:this.webGLContext,state:this.state})),this.state.setLayout(f),this.state.setLayoutOptions(c);var T=new Ku(O,E,t,n);this.canvasRenderer=T,this.glCanvas=b,this.canvasRect=b.getBoundingClientRect(),this.glMinimapCanvas=_,this.c2dCanvas=O,this.glCanvas.style.opacity=y?"1":"0",this.c2dCanvas.style.opacity=y?"0":"1",this.isInRenderSwitchAnimation=!1,this.justSwitchedRenderer=!1,this.justSwitchedLayout=!1,this.hasResized=!1,this.layoutUpdating=!1,this.layoutComputing=!1,this.isRenderingDisabled=!1,p.addChannel(Hl),v.addChannel(Hl),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)}))),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 Fl({state:t,getNodePositions:function(e){return a.currentLayout.getNodePositions(e)},canvas:b}),this.layoutTimeLimit=null!==(i=n.layoutTimeLimit)&&void 0!==i?i:16,this.pixelRatio=yr(),this.removeResizeListener=xn()(m,(function(){gl(b),gl(O),a.canvasRect=b.getBoundingClientRect(),a.hasResized=!0})),this.removeMinimapResizeListener=xn()(l,(function(){gl(_)})),$l[d]=this,window.__Nvl_dumpNodes=function(e){var t;return null===(t=Ql(e))||void 0===t?void 0:t.dumpNodes()},window.__Nvl_dumpRelationships=function(e){var t;return null===(t=Ql(e))||void 0===t?void 0:t.dumpRelationships()},window.__Nvl_registerDoneCallback=function(e,t){var n;return null===(n=Ql(t))||void 0===n?void 0:n.on(Zl,e)},window.__Nvl_getNodesOnScreen=function(e){var t;return null===(t=Ql(e))||void 0===t?void 0:t.getNodesOnScreen()},window.__Nvl_getZoomLevel=function(e){var t;return null===(t=Ql(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=bi(Object.values(t.idToPosition),n),a=i.centerX,s=i.centerY,u=i.nodesWidth,l=i.nodesHeight,c=_i(u,l,this.glMinimapCanvas.width,this.glMinimapCanvas.height),f=c.zoomX,h=c.zoomY,d=wi(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(Kl))throw t;e.callIfRegistered(Kl,t)}}),13),this.animationRequestId=window.requestAnimationFrame((function t(){try{!function(t){if(e.destroyed)Dr.info("STEP IN A DESTROYED STRIP");else{var o=yr();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,y=e.glController.minimapMouseDown;if(n.clearChannel(Hl),r.clearChannel(Hl),u||a||c||d||f||h||y||p||v){!v||l||e.currentLayout.getComputing()||(e.pendingZoomOperation(),e.pendingZoomOperation=null);var g=i||s||c;e.zoomTransitionHandler.update(g,(function(){return e.callIfRegistered("onZoomTransitionDone")})),p&&e.glController.onResize();var m=e.currentLayout.getNodePositions(n.items);if(n.updatePositions(m),e.callIfRegistered("onLayoutStep",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(E,"rad")})}}}for(var j=0;j=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(Wl(Wl({},i),{},{x:s.x,y:s.y}))}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"dumpRelationships",value:function(){return vn(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(vn(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&&gc&&mu&&E.xc&&E.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===Hi?this.hierarchicalLayout:e===qi?this.forceLayout:e===Xi?this.gridLayout:e===Ki?this.freeLayout:e===Zi?this.d3ForceLayout:this.forceLayout}},{key:"setLayout",value:function(e){Dr.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=Wl(Wl({},Xl),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=ml(this.c2dCanvas.width,this.c2dCanvas.height),s=wl(a);this.canvasRenderer.processUpdates(),this.canvasRenderer.render(i,{canvas:a,context:s,backgroundColor:r,ignoreAnimations:!0}),this.createDownloadLink(n,a).click(),_l(a),a=null,s=null}},{key:"prepareLargeFileForDownload",value:function(e){var t=this,n=Wl(Wl({},Xl),e),r=this.state.nodes.items,o=n.filename,i=n.backgroundColor,a=this.currentLayout.getNodePositions(r),s=bi(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 Dr.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=ml(h,d),s=wl(r);t.canvasRenderer.processUpdates(),t.canvasRenderer.render(a,{canvas:r,context:s,backgroundColor:i,ignoreAnimations:!0,showCaptions:!0}),t.createDownloadLink(o,r).click(),_l(r),r=null,s=null,e(!0)}catch(e){n(e)}}),500)}))}},{key:"saveFullGraphToLargeFile",value:(r=Ul().mark((function e(t){var n,r,o,i;return Ul().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Wl(Wl({},Xl),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),Dr.error("An error occurred while downloading the image"),!this.callbacks.isCallbackRegistered(Kl)){e.next=16;break}this.callIfRegistered(Kl,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){zl(i,n,o,a,s,"next",e)}function s(e){zl(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}(),ac=function(){function e(t){tc(this,e),this.name=t,this.startTime=performance.now(),this.endTime=null}return rc(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}(),sc=function(){function e(){tc(this,e),this.root=new ic(new ac("Performance Tree"),null),this.current=this.root}return rc(e,[{key:"clear",value:function(){this.root.children=[],this.current=this.root}},{key:"add",value:function(e){if(this.current){var t=new ic(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 ic(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}(),uc=function(){function e(){tc(this,e),window.performance?(this.disabled=!1,this.tree=new sc):(this.disabled=!0,this.tree=null)}return rc(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 ac(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}(),lc=function(e){return Boolean(e)&&"string"==typeof e.id&&e.id.length>0},cc=rh(1187);function fc(e){return fc="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},fc(e)}function hc(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 dc(e){for(var t=1;t{var t={};return rh.d(t,e),t})({AnalyticsBrowser:()=>eh});var mc,bc=new Uint8Array(16);function _c(){if(!mc&&!(mc="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 mc(bc)}const wc=/^(?:[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 xc=[],Oc=0;Oc<256;++Oc)xc.push((Oc+256).toString(16).substr(1));var Ec,Sc,Tc=0,Pc=0;const Cc=function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||Ec,a=void 0!==e.clockseq?e.clockseq:Sc;if(null==i||null==a){var s=e.random||(e.rng||_c)();null==i&&(i=Ec=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=Sc=16383&(s[6]<<8|s[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:Pc+1,c=u-Tc+(l-Pc)/1e4;if(c<0&&void 0===e.clockseq&&(a=a+1&16383),(c<0||u>Tc)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Tc=u,Pc=l,Sc=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=(xc[e[t+0]]+xc[e[t+1]]+xc[e[t+2]]+xc[e[t+3]]+"-"+xc[e[t+4]]+xc[e[t+5]]+"-"+xc[e[t+6]]+xc[e[t+7]]+"-"+xc[e[t+8]]+xc[e[t+9]]+"-"+xc[e[t+10]]+xc[e[t+11]]+xc[e[t+12]]+xc[e[t+13]]+xc[e[t+14]]+xc[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&wc.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n}(o)};function Ac(e){return Ac="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},Ac(e)}function kc(){kc=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 g?t:g,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",y={};function g(){}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 O=b.prototype=g.prototype=Object.create(_);function E(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"==Ac(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===y)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===y)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")),y;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;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,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}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),y}},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),y}},t}function Ic(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 jc(e){var t=function(e){if("object"!=Ac(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ac(t)?t:String(t)}var Mc=window.localStorage,Rc="neo4j.nvl.sTid",Nc=!1,Dc=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=jc(n="analytics"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;var o=new gc.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=kc().mark((function e(t){var n;return kc().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){Dr.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){Ic(i,r,o,a,s,"next",e)}function s(e){Ic(i,r,o,a,s,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)})},{key:"identify",value:function(){if(!Nc){var e=this.getSegmentTrackingId();this.analytics.identify(e).catch((function(e){Dr.debug("TRACKING: Identifying user for Segment tracking failed. err: ".concat(e))})),Nc=!0}}},{key:"loadSavedSegmentId",value:function(){try{var e=Mc.getItem(Rc);return"string"==typeof e?e:null}catch(e){return Dr.debug("TRACKING: Retrieving tracking Id failed. err: ".concat(e)),null}}},{key:"getSegmentTrackingId",value:function(){var e=this.loadSavedSegmentId(),t=null!=e?e:Cc();return this.saveTrackingId(t),t}},{key:"saveTrackingId",value:function(e){Mc.setItem(Rc,e)}},{key:"ready",value:function(){return this.analytics.ready().catch((function(e){Dr.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 Uc(e,t){if(e){if("string"==typeof e)return zc(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)?zc(e,t):void 0}}function zc(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]:[],i=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,t),qc(this,n=nf),n.add(this),Yc(this,Zc,void 0),Yc(this,$c,void 0),Yc(this,Qc,void 0),Yc(this,Jc,void 0),Yc(this,ef,void 0),Yc(this,tf,void 0),!0!==a.disableTelemetry&&(Xc(tf,this,new Dc),Hc(tf,this).init("4SGwdwzuDm5WkFvQtz7D6ATQlo14yjmW"),Hc(tf,this).identify()),Kc(nf,this,af).call(this,a),Xc(Zc,this,new o(s)),Xc($c,this,new uc),Xc(ef,this,a),Hc(ef,this).frame=e,this.checkWebGLCompatibility(),Kc(nf,this,of).call(this,r,i,a)}var n,r;return n=t,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=Hc(Qc,this),o=r.zoom,i=r.layout,a=r.layoutOptions,s=r.nodes,u=r.rels;Hc(Jc,this).destroy(),Object.assign(Hc(ef,this),e),Kc(nf,this,of).call(this,s.items,u.items,Hc(ef,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]:[];Kc(nf,this,lf).call(this,e),Kc(nf,this,cf).call(this,t,e);var n={added:!1,updated:!1};Hc(Qc,this).nodes.update(e,Gc({},n)),Hc(Qc,this).rels.update(t,Gc({},n)),Hc(Qc,this).nodes.add(e,Gc({},n)),Hc(Qc,this).rels.add(t,Gc({},n)),Hc(Qc,this).setGraphUpdated(),Hc(Jc,this).updateHtmlOverlay()}},{key:"getSelectedNodes",value:function(){var e=this;return Hc(Qc,this).nodes.items.filter((function(e){return e.selected})).map((function(t){return Gc(Gc({},t),Hc(Qc,e).nodes.idToPosition[t.id])}))}},{key:"getSelectedRelationships",value:function(){return Hc(Qc,this).rels.items.filter((function(e){return e.selected}))}},{key:"updateElementsInGraph",value:function(e,t){var n={added:!1,updated:!1};Kc(nf,this,lf).call(this,e),Kc(nf,this,cf).call(this,t,e),Hc(Qc,this).nodes.update(e,Gc({},n)),Hc(Qc,this).rels.update(t,Gc({},n)),Hc(Jc,this).updateHtmlOverlay()}},{key:"addElementsToGraph",value:function(e,t){Kc(nf,this,lf).call(this,e),Kc(nf,this,cf).call(this,t,e);var n={added:!1,updated:!1};Hc(Qc,this).nodes.add(e,Gc({},n)),Hc(Qc,this).rels.add(t,Gc({},n)),Hc(Jc,this).updateHtmlOverlay()}},{key:"removeNodesWithIds",value:function(t){if(Array.isArray(t)&&!(0,e.isEmpty)(t)){var n,r={},o=Bc(t);try{for(o.s();!(n=o.n()).done;)r[n.value]=!0}catch(e){o.e(e)}finally{o.f()}var i,a=[],s=Bc(Hc(Qc,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&&Kc(nf,this,uf).call(this,a),Kc(nf,this,sf).call(this,t),Hc(Qc,this).setGraphUpdated(),Hc(Jc,this).updateHtmlOverlay()}}},{key:"removeRelationshipsWithIds",value:function(t){Array.isArray(t)&&!(0,e.isEmpty)(t)&&(Kc(nf,this,uf).call(this,t),Hc(Qc,this).setGraphUpdated(),Hc(Jc,this).updateHtmlOverlay())}},{key:"getNodes",value:function(){return Hc(Jc,this).dumpNodes()}},{key:"getRelationships",value:function(){return Hc(Jc,this).dumpRelationships()}},{key:"getNodeById",value:function(e){return Hc(Qc,this).nodes.idToItem[e]}},{key:"getRelationshipById",value:function(e){return Hc(Qc,this).rels.idToItem[e]}},{key:"getPositionById",value:function(e){return Hc(Qc,this).nodes.idToPosition[e]}},{key:"getCurrentOptions",value:function(){return Hc(ef,this)}},{key:"destroy",value:function(){Hc(Jc,this).destroy()}},{key:"deselectAll",value:function(){this.updateElementsInGraph(Hc(Qc,this).nodes.items.map((function(e){return Gc(Gc({},e),{},{selected:!1})})),Hc(Qc,this).rels.items.map((function(e){return Gc(Gc({},e),{},{selected:!1})})))}},{key:"fit",value:function(e,t){Hc(Jc,this).fit(e,t)}},{key:"resetZoom",value:function(){Hc(Jc,this).resetZoom()}},{key:"setUseWebGLRenderer",value:function(e){Hc(Jc,this).setRenderer(e?$i:Qi)}},{key:"setRenderer",value:function(e){Hc(Jc,this).setRenderer(e)}},{key:"setDisableWebGL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Hc(ef,this).disableWebGL!==e&&(Hc(ef,this).disableWebGL=e,this.restart())}},{key:"pinNode",value:function(e){Hc(Qc,this).nodes.update([{id:e,pinned:!0}],{})}},{key:"unPinNode",value:function(e){Hc(Qc,this).nodes.update(e.map((function(e){return{id:e,pinned:!1}})),{})}},{key:"setLayout",value:function(e){Hc(Qc,this).setLayout(e)}},{key:"setLayoutOptions",value:function(e){Hc(Qc,this).setLayoutOptions(e)}},{key:"getNodesOnScreen",value:function(){return Hc(Jc,this).getNodesOnScreen()}},{key:"getNodePositions",value:function(){return Hc(Jc,this).getNodePositions()}},{key:"setNodePositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Hc(Jc,this).setNodePositions(e,t)}},{key:"isLayoutMoving",value:function(){return Hc(Jc,this).isLayoutMoving()}},{key:"saveToFile",value:function(e){Hc(Jc,this).saveToFile(e)}},{key:"saveFullGraphToLargeFile",value:function(e){Hc(Jc,this).saveFullGraphToLargeFile(e)}},{key:"setZoom",value:function(e){Hc(Jc,this).setZoomLevel(e)}},{key:"setPan",value:function(e,t){Hc(Jc,this).setPanCoordinates(e,t)}},{key:"setZoomAndPan",value:function(e,t,n){Hc(Jc,this).setZoomAndPan(e,t,n)}},{key:"getScale",value:function(){return Hc(Jc,this).getScale()}},{key:"getPan",value:function(){return Hc(Jc,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=Hc(Qc,this),o=r.zoom,i=r.panX,a=r.panY,s=r.webGLVisible,u=Zu(e,Hc(ef,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,El(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=Sl(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:dr)*yr(),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=Sl(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=us({x:l.x,y:l.y},{x:c.x,y:c.y},{x:e,y:t});if(f<=Cl){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,Hc(Qc,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,El(n.getCanvasNodesAt({x:e,y:t},o.hitNodeMarginWidth))),r.includes("relationship")&&a.push.apply(a,El(n.getCanvasRelsAt({x:e,y:t}))),{nodes:i,relationships:a}}(l,c,Hc(Jc,this),t,n);return Gc(Gc({},e),{},{nvlTargets:f})}},{key:"getContainer",value:function(){return Hc(ef,this).frame}},{key:"checkWebGLCompatibility",value:function(){var e=Hc(ef,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 To("Could not initialize WebGL");Hc(ef,this).renderer=Qi,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&&(Hc(ef,this).disableWebGL=!t)}}}],r&&function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Xc(Qc,this,function(t){var n=t.minZoom,r=t.maxZoom,o=t.allowDynamicMinZoom,i=void 0===o||o,a=t.layout,s=t.layoutOptions,u=t.nodeDefaultBorderColor,l=t.selectedBorderColor,c=t.panX,f=void 0===c?0:c,h=t.panY,d=void 0===h?0:h,p=t.initialZoom,v=t.renderer,y=void 0===v?!0===t.useWebGL?$i:Qi:v,g=t.disableWebGL,m=void 0!==g&&g,b=t.disableTelemetry,_=void 0!==b&&b;Y(!0),yn.isolateGlobalState();var w=void 0!==n?n:.075,x=void 0!==r?r:10,O=Fi({},Vi.default);void 0!==u&&("string"==typeof u&&null!==vi().get.rgb(u)?O.rings=[{color:u,widthFactor:.05}]:Dr.warn("Invalid color string for nodeDefaultBorderColor:",u));var E=Fi({},Vi.selected),S=Fi({},Gi.selected);void 0!==l&&("string"==typeof u&&null!==vi().get.rgb(l)?(E.rings[1].color=l,S.rings[1].color=l):Dr.warn("Invalid color string for selectedBorderColor:",l));var T=Le({zoom:p||Wi,minimapZoom:Wi,defaultZoomLevel:Wi,panX:f,panY:d,minimapPanX:0,minimapPanY:0,fitNodeIds:[],resetZoom:!1,zoomOptions:Ji,forceWebGL:!1,renderer:y,disableWebGL:m,disableTelemetry:_,fitMovement:0,layout:a,layoutOptions:s,maxDistance:0,maxNodeRadius:50,nodeBorderStyles:{default:O,selected:E},relationshipBorderStyles:{default:Gi.default,selected:S},get minZoom(){return w},get maxZoom(){return x},get minMinimapZoom(){return 0},get maxMinimapZoom(){return.2},get webGLVisible(){var e=this.fitMovement>50;return this.renderer===$i||e},nodes:Ni(),rels:Ni(),graphUpdates:0,waypoints:{data:Le.shallow({}),counter:0},setGraphUpdated:ee((function(){this.graphUpdates+=1})),setRenderer:ee((function(e){ee((function(){this.graphUpdates+=1})),this.renderer=e})),setWaypoints:ee((function(e){this.waypoints.data=e,this.waypoints.counter+=1})),setZoomPan:ee((function(e,t,n,r){if(i){var o=Object.values(this.nodes.idToPosition),a=Oi(o,w,x,r,e,this.zoom);a!==this.zoom&&(this.zoom=a,e===a&&(this.panX=t,this.panY=n))}else{var s=xi(e,this.zoom,w,x);s!==this.zoom&&(this.zoom=s,this.panX=t,this.panY=n)}this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1})),setZoom:ee((function(e,t){if(i){var n=Object.values(this.nodes.idToPosition);this.zoom=Oi(n,w,x,t,e,this.zoom)}else this.zoom=xi(e,this.zoom,w,x);this.fitNodeIds=[],this.fitMovement=0,this.resetZoom=!1,this.forceWebGL=!1})),setPan:ee((function(e,t){this.panX=e,this.panY=t,this.fitNodeIds=[],this.resetZoom=!1,this.forceWebGL=!1})),setLayout:ee((function(e){this.layout=e})),setLayoutOptions:ee((function(e){this.layoutOptions=e})),fitNodes:ee((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.fitNodeIds=(0,e.intersection)(t,(0,e.map)(this.nodes.items,"id")),this.zoomOptions=Fi(Fi({},Ji),n)})),setZoomReset:ee((function(){this.resetZoom=!0})),clearFit:ee((function(){this.fitNodeIds=[],this.forceWebGL=!1,this.fitMovement=0,this.zoomOptions=Ji})),clearReset:ee((function(){this.resetZoom=!1,this.fitMovement=0})),updateZoomToFit:ee((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=Oi(a,w,x,r,e,this.zoom)}else o=xi(e,this.zoom,w,x);this.zoom=o,this.panX=t,this.panY=n})),updateMinimapZoomToFit:ee((function(e,t,n){this.minimapZoom=e,this.minimapPanX=t,this.minimapPanY=n})),autorun:fe,reaction:he});return T}(i)),i.minimapContainer instanceof HTMLElement||delete i.minimapContainer,Xc(Jc,this,new Jl(Hc(Qc,this),i)),this.addAndUpdateElementsInGraph(r,o),Hc(Jc,this).on("restart",this.restart.bind(this));var a,s,u=Bc((a=Hc(Zc,this).callbacks,Object.entries(a)));try{for(u.s();!(s=u.n()).done;){var l=Fc(s.value,2),c=l[0];void 0!==l[1]&&Hc(Jc,this).on(c,Hc(Zc,this)[c].bind(Hc(Zc,this)))}}catch(e){u.e(e)}finally{u.f()}var f=null===(t=Hc(ef,this).frame)||void 0===t?void 0:t.getAttribute("id");!0!==Hc(ef,this).disableTelemetry&&setTimeout((function(){Hc(Jc,n).isDestroyed()||Hc(tf,n).trackEvent({eventPrefix:gr.includes(f)?f:null,event:"instantiated",properties:{}})}),200)}function af(e){var t,n=e.logging;void 0!==(null==n?void 0:n.level)&&(t=n.level,Dr.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=Hc(Qc,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 uh extends sh{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)}}a(1582);var lh=a(2543);class ch extends sh{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,lh.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 fh extends sh{constructor(e,t={}){super(e,t),this.addEventListener("wheel",this.handleWheel)}throttledZoom=(0,lh.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 hh{nvl;zoomInteraction;panInteraction;dragNodeInteraction;constructor(e,t=[],n=[],r={},o={}){this.nvl=new ah(e,t,n,{...r,disableTelemetry:!0},o),this.zoomInteraction=new fh(this.nvl),this.panInteraction=new ch(this.nvl),this.dragNodeInteraction=new uh(this.nvl),r.layout===ih&&this.nvl.setNodePositions(t,!1)}}})(),NVLBase=s})(); \ No newline at end of file diff --git a/python-wrapper/tests/test_render.py b/python-wrapper/tests/test_render.py index e823bcc7..092ea28a 100644 --- a/python-wrapper/tests/test_render.py +++ b/python-wrapper/tests/test_render.py @@ -12,19 +12,20 @@ "default": {}, "force layout": {"layout": Layout.FORCE_DIRECTED}, "grid layout": {"layout": Layout.GRID}, + "coordinate layout": {"layout": Layout.COORDINATE}, } @pytest.mark.parametrize("render_option", render_cases.values(), ids=render_cases.keys()) def test_basic_render(render_option: dict[str, Any], tmp_path: Path) -> None: nodes = [ - Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:0", caption="Person"), - Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:6", caption="Product"), - Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:11", caption="Product", pinned=True), - Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:12", caption="Product"), - Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:1", caption="Person"), - Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:7", caption="Product"), - Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:8", caption="Product"), + Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:0", caption="Person", x=1, y=10), + Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:6", caption="Product", x=2, y=15), + Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:11", caption="Product", x=3, pinned=True), + Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:12", caption="Product", x=4), + Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:1", caption="Person", x=5), + Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:7", caption="Product", x=6), + Node(id="4:d09f48a4-5fca-421d-921d-a30a896c604d:8", caption="Product", x=7), ] relationships = [ Relationship( diff --git a/scripts/build_js_applet.sh b/scripts/build_js_applet.sh new file mode 100755 index 00000000..19c844cf --- /dev/null +++ b/scripts/build_js_applet.sh @@ -0,0 +1,11 @@ +GIT_ROOT=$(git rev-parse --show-toplevel) + +set -o errexit +set -o nounset +set -o pipefail + +( + cd "${GIT_ROOT}/js-applet" + yarn + yarn build +) From f5decd811d4c3f2f30da152c593e2c268f82d999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Tue, 21 Jan 2025 10:17:33 +0100 Subject: [PATCH 2/2] Add x and y as typed fields to Node --- python-wrapper/src/neo4j_viz/node.py | 2 ++ python-wrapper/tests/test_node.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/python-wrapper/src/neo4j_viz/node.py b/python-wrapper/src/neo4j_viz/node.py index 8f6c9580..0ed9cfb9 100644 --- a/python-wrapper/src/neo4j_viz/node.py +++ b/python-wrapper/src/neo4j_viz/node.py @@ -34,6 +34,8 @@ class Node(BaseModel, extra="allow"): size: Optional[RealNumber] = Field(None, ge=0, description="The size of the node as radius in pixel") color: Optional[ColorType] = Field(None, description="The color of the node") pinned: Optional[bool] = Field(None, description="Whether the node is pinned in the visualization") + x: Optional[RealNumber] = Field(None, description="The x-coordinate of the node") + y: Optional[RealNumber] = Field(None, description="The y-coordinate of the node") @field_serializer("color") def serialize_color(self, color: Color) -> str: diff --git a/python-wrapper/tests/test_node.py b/python-wrapper/tests/test_node.py index 25e70d23..faa32e5b 100644 --- a/python-wrapper/tests/test_node.py +++ b/python-wrapper/tests/test_node.py @@ -12,6 +12,8 @@ def test_nodes_with_all_options() -> None: color="#FF0000", size=10, pinned=True, + x=1, + y=10, ) assert node.to_dict() == { @@ -22,6 +24,8 @@ def test_nodes_with_all_options() -> None: "color": "#ff0000", "size": 10, "pinned": True, + "x": 1, + "y": 10, } @@ -66,3 +70,8 @@ def test_id_aliases(alias: str) -> None: assert node.to_dict() == { "id": "1", } + + +def test_node_validation() -> None: + with pytest.raises(ValueError, match="Input should be a valid integer, unable to parse string as an integer"): + Node(id="1", x="not a number")